/* Products (agent A, round 4): Noor walks to the new abaya on the rail, scans its tag where it hangs,
   photographs it up close and prices it.
   The big phone is the view of the phone in her hand (the dotted fan and the ring). */
.products { --mark: #D8C2FF; }
.products .pd-wall { background: linear-gradient(180deg, #F1F5EC 0%, #EEF1E6 62%, #E9E8DA 100%); }

.products .pd-scene { position: absolute; left: 0; top: 0; width: 1440px; height: 900px; transform-origin: 720px 0; pointer-events: none; }
.products[dir="rtl"] .pd-scene { transform: scaleX(-1); }
.products .pd-room, .products .pd-front, .products .pd-new > svg { position: absolute; left: 0; top: 0; overflow: visible; }
.products .pd-new { position: absolute; left: 0; top: 0; transition: transform 1.1s cubic-bezier(.5,.05,.2,1); }
.products .pd-new > svg { overflow: visible; }
.products.s-v2 .pd-new, .products.s-end .pd-new { transform: translateX(80px); }
.products .pd-noor { position: absolute; left: 670px; top: 484px; z-index: 1; will-change: transform; }
.products .pd-front { z-index: 2; }
.products .pd-noor > svg { display: block; overflow: visible; }
.products .kc .pr-bag, .products .kc .fing { opacity: 0 !important; }

/* Noor's poses (flipped figure: her right hand holds the phone toward the big phone) */
.products .pd-scanpose .kc { --sh-r: -43deg; --el-r: -154.3deg; --sh-l: 7deg; --el-l: -5deg; }
.products .pd-photopose .kc { --sh-r: -122.5deg; --el-r: -100.1deg; --sh-l: 7deg; --el-l: -5deg; }
.products .pd-pushpose .kc { --sh-r: -9.3deg; --el-r: 114.4deg; --sh-l: 19.1deg; --el-l: 87.4deg; }
.products .pd-scanpose .kc .pr-phone, .products .pd-photopose .kc .pr-phone, .products .pd-pushpose .kc .pr-phone { opacity: 1; }

/* the tag stays on the abaya's sleeve; it lights while she works on it */
.products .pd-nm { fill: #D9DEE2; transition: fill .4s; }
.products .pd-pr { fill: #D9DEE2; transition: fill .4s; }
.products .pd-scan { opacity: 0; }
.products.s-a1 .pd-scan { opacity: 1; animation: pd-scan .9s ease-in-out infinite alternate; }
@keyframes pd-scan { from { transform: translateY(-4px) } to { transform: translateY(7px) } }
.products.s-a1 .pd-bars, .products.s-a0 .pd-bars { }
.products[class*=" s-n"] .pd-nm, .products[class*=" s-p"] .pd-nm, .products[class*=" s-q"] .pd-nm, .products[class*=" s-v"] .pd-nm, .products.s-end .pd-nm { fill: #1B2A33; }
.products.s-n0 .pd-nm { animation: pd-glow 1.2s ease-in-out 2 alternate; }
.products[class*=" s-q"] .pd-pr, .products[class*=" s-v"] .pd-pr, .products.s-end .pd-pr { fill: #0A8A9C; }
.products.s-q0 .pd-pr { animation: pd-glow 1.2s ease-in-out 2 alternate; }
@keyframes pd-glow { from { opacity: 1 } to { opacity: .35 } }
/* a soft ring on what the beat is about */
.products .pd-tag rect:first-child { transition: stroke .3s, stroke-width .3s; }
.products.s-a1 .pd-tag rect:first-child, .products.s-n0 .pd-tag rect:first-child, .products.s-q0 .pd-tag rect:first-child { stroke: #0BBAD8; stroke-width: 2.4; }

/* the view of her phone: the dotted fan to the big phone, and a ring on the tag while she scans it */
.products .pd-beamfan, .products .pd-beamedge { transition: opacity .5s var(--ease); }
.products .pd-beamedge { opacity: .75; }
.products.calm .pd-beamfan, .products.s-idle .pd-beamfan, .products.s-v2 .pd-beamfan { opacity: .5; }
.products .pd-zoom { opacity: 0; transform-box: fill-box; transform-origin: 50% 50%; transform: scale(.7); transition: opacity .35s ease, transform .5s var(--spring); }
.products.s-a1 .pd-zoom, .products.s-n0 .pd-zoom, .products.s-q0 .pd-zoom { opacity: .95; transform: none; }

/* the flash */
.products .pd-flash { opacity: 0; transform-box: fill-box; transform-origin: 50% 50%; transform: scale(.3); }
.products.s-p1 .pd-flash { animation: pd-flash .7s ease-out 1 forwards; }
@keyframes pd-flash { 0% { opacity: 0; transform: scale(.3) } 12% { opacity: 1; transform: scale(1) } 100% { opacity: 0; transform: scale(1.6) } }
.products .pd-newab { transition: filter .25s; }
.products.s-p1 .pd-newab { filter: brightness(1.6) saturate(.7); }
.products .pd-ringlit { opacity: 0; transition: opacity .3s; }
.products.s-p1 .pd-ringlit, .products.s-p2 .pd-ringlit { opacity: 1; }

/* ---------- copy (top end) ---------- */
.products .pd-copy { position: absolute; inset-inline-end: 80px; top: 100px; width: 540px; z-index: 2; }
.products .pd-copy .eyebrow img { width: 30px; height: 30px; border-radius: 9px; background: #fff; padding: 5px; box-shadow: var(--shadow-1); }
.products .pd-copy .h2 { font-size: 48px; }
.products .pd-copy .lead { margin-top: 14px; font-size: 18px; }
.products .pd-facts { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 5px; }
.products .pd-facts li { position: relative; padding-inline-start: 18px; font-size: 15px; font-weight: 700; line-height: 1.4; }
.products .pd-facts li::before { content: ""; position: absolute; inset-inline-start: 0; top: .45em; width: 8px; height: 8px; border-radius: 2px; background: var(--ai); }
.products .pd-beats { margin-top: 18px; }
.products .pd-beats .beats { gap: 4px 18px; }
.products .pd-beats .beats li { font-size: 14px; padding-bottom: 7px; }

/* ---------- the live phone (start edge) ---------- */
.products .pd-phone { position: absolute; inset-inline-start: 72px; top: 98px; }
.products .pd-phone .phone { --pz: .8; }
.products[lang="ar"] .pd-p-en, .products:not([lang="ar"]) .pd-p-ar { display: none; }

/* ---------- narrow ---------- */
html.kp-narrow .products .kframe { display: flex; flex-direction: column; padding: 88px 0 40px; }
html.kp-narrow .products .pd-copy { position: static; width: auto; padding: 0 20px; order: 1; }
html.kp-narrow .products .pd-copy .h2 { font-size: 38px; }
html.kp-narrow .products .pd-copy .lead { font-size: 17px; }
.products .pd-view { position: absolute; inset: 0; }
html.kp-narrow .products .pd-view { position: relative; inset: auto; order: 2; width: 760px; height: 430px; overflow: hidden; margin: 10px auto 0; zoom: .5; }
html.kp-narrow .products .pd-scene { left: -560px; top: -450px; }
html.kp-narrow .products[dir="rtl"] .pd-scene { left: -120px; }
html.kp-narrow .products .pd-phone { position: static; order: 3; display: flex; justify-content: center; margin-top: 18px; }
html.kp-narrow .products .pd-phone .phone { --pz: .7; }
@media (min-width: 420px) { html.kp-narrow .products .pd-view { zoom: .56; } }
@media (min-width: 520px) { html.kp-narrow .products .pd-view { zoom: .7; } }
@media (prefers-reduced-motion: reduce) { .products .pd-flash { display: none; } }
/* narrow: the big phone sits below the picture, so the dotted view to it would point nowhere */
html.kp-narrow .products .pd-beamfan, html.kp-narrow .products .pd-beamedge { display: none; }

/* small phones (round 5): the drawing fits the screen width, nothing cut at the edge */
@media (max-width: 389px) { html.kp-narrow .products .pd-view { zoom: 0.473; } }
@media (max-width: 359px) { html.kp-narrow .products .pd-view { zoom: 0.42; } }

/* phones, told full screen (kphone-story.js, story/products.js): the whole 1440 x 900 scene,
   moved by the story's camera; the old phone crop is undone */
html.kp-narrow .products[data-kst] .pd-view { position: absolute; inset: 0; width: auto; height: auto; margin: 0; overflow: visible; zoom: 1; }
html.kp-narrow .products[data-kst] .pd-scene, html.kp-narrow .products[dir="rtl"][data-kst] .pd-scene { left: 0; top: 0; }
