/* =========================================================
   YallaShop · Hero Visual  —  v1.0
   مكوّن مستقل بالكامل: كل الكلاسات تبدأ بـ .ysh علشان مايتعارضش مع ستايل الموقع.
   المقاسات كلها نسبية لعرض الحاوية (var(--u) = 1/1720 من العرض)، فالمكوّن بيكبر ويصغر بنفس الشكل.
   الحركة: transform و opacity فقط + بتقف لما المكوّن يخرج من الشاشة + بتتلغي مع prefers-reduced-motion.
   ========================================================= */

.ysh {
  /* Brand tokens — YallaShop Creative Visual Rules V1.1 */
  --ysh-y: #FFCC05;          /* Primary Yellow */
  --ysh-y2: #EDB900;         /* Secondary Yellow */
  --ysh-black: #0F0F0F;
  --ysh-gray: #6D6D6D;
  --ysh-lgray: #C9C9C9;
  --ysh-sgray: #E3E3E3;
  --ysh-white: #FFFFFF;
  /* UI surfaces (dark dashboard) */
  --ysh-screen: #0F1012;
  --ysh-side: #16191D;
  --ysh-surface: #14171A;
  --ysh-surface-2: #1C2024;
  --ysh-line: rgba(255, 255, 255, .07);
  --ysh-muted: #9A9FA5;
  --ysh-ok: #3FBF7F;
  --ysh-up: #22C55E;
  --ysh-font: var(--font-primary, "Almarai", Arial, sans-serif);

  --u: calc(100cqw / 1720);
  position: relative;
  width: 100%;
  aspect-ratio: 1720 / 1340;
  container-type: inline-size;
  direction: rtl;
  font-family: var(--ysh-font);
  color: var(--ysh-white);
  line-height: 1.2;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
  user-select: none;
  -webkit-user-select: none;
}
@supports not (width: 1cqw) {
  .ysh { --u: calc(min(92vw, 760px) / 1720); }
}
/* عزل خفيف عن ستايل الموقع العام (margin/padding/borders على العناصر العامة) */
.ysh *, .ysh *::before, .ysh *::after { box-sizing: border-box; }
.ysh :where(div, span, ul, li, b, strong, i, bdi, picture, img, svg) {
  margin: 0; padding: 0; border: 0; float: none; background: none; box-shadow: none;
  text-transform: none; letter-spacing: normal; font-style: normal; line-height: inherit;
}
.ysh :where(ul) { list-style: none; }
.ysh img { display: block; width: 100%; height: 100%; max-width: none; object-fit: cover; }
.ysh picture { display: contents; }
.ysh-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

.ysh-i {
  width: calc(24 * var(--u)); height: calc(24 * var(--u)); flex: none;
  fill: none; stroke: currentColor; stroke-width: 2;
  stroke-linecap: round; stroke-linejoin: round;
}
.ysh-i--fill { fill: currentColor; stroke: none; }
.ysh-wm { display: block; fill: currentColor; }

.ysh-stage {
  position: absolute; inset: 0;
  contain: layout style;
  white-space: nowrap;
}
.ysh-glow {
  position: absolute; left: calc(230 * var(--u)); top: calc(160 * var(--u)); width: calc(1260 * var(--u)); height: calc(1000 * var(--u));
  background: radial-gradient(closest-side, rgba(255, 204, 5, .16), rgba(255, 204, 5, 0));
  pointer-events: none;
}
.ysh--no-glow .ysh-glow { display: none; }

/* ---------- Layers (position + parallax + entrance) ---------- */
.ysh-layer {
  position: absolute;
  translate: calc(var(--px, 0) * var(--depth, 10) * var(--u)) calc(var(--py, 0) * var(--depth, 10) * var(--u));
  transition: translate .8s cubic-bezier(.2, .8, .2, 1);
  animation: var(--in, ysh-in-up) var(--in-dur, .9s) cubic-bezier(.2, .8, .2, 1) var(--in-delay, 0s) both;
}
.ysh-bob {
  width: 100%; height: 100%;
  animation: ysh-bob var(--bob-dur, 7s) ease-in-out var(--bob-delay, 0s) infinite;
  will-change: transform;
}
.ysh-card {
  position: relative;
  background: linear-gradient(180deg, #171B1F, var(--ysh-surface));
  border: calc(1.5 * var(--u)) solid var(--ysh-line);
  border-radius: calc(16 * var(--u));
  box-shadow: inset 0 var(--u) 0 rgba(255, 255, 255, .06), 0 calc(34 * var(--u)) calc(60 * var(--u)) calc(-24 * var(--u)) rgba(0, 0, 0, .55), 0 calc(10 * var(--u)) calc(24 * var(--u)) calc(-10 * var(--u)) rgba(0, 0, 0, .4);
}
.ysh-card__title { position: absolute; right: calc(20 * var(--u)); top: calc(26 * var(--u)); font-size: calc(26 * var(--u)); font-weight: 700; }

/* ---------- Laptop ---------- */
.ysh-laptop { left: calc(86 * var(--u)); top: calc(214 * var(--u)); width: calc(1398 * var(--u)); height: calc(862 * var(--u)); z-index: 1; --in-dur: 1s; }
.ysh-laptop__lid {
  position: absolute; left: calc(89 * var(--u)); top: 0; width: calc(1220 * var(--u)); height: calc(830 * var(--u));
  padding: calc(4 * var(--u));
  border-radius: calc(34 * var(--u)) calc(34 * var(--u)) calc(10 * var(--u)) calc(10 * var(--u));
  background: linear-gradient(160deg, #4A4E55, #23262B 30%, #3B3F45 60%, #1D1F23);
  box-shadow: 0 calc(40 * var(--u)) calc(80 * var(--u)) calc(-30 * var(--u)) rgba(0, 0, 0, .6);
}
.ysh-laptop__lid::before {
  content: ""; position: absolute; inset: calc(4 * var(--u));
  border-radius: calc(30 * var(--u)) calc(30 * var(--u)) calc(8 * var(--u)) calc(8 * var(--u)); background: #05080D;
}
.ysh-screen {
  position: absolute; left: calc(22 * var(--u)); top: calc(20 * var(--u)); width: calc(1176 * var(--u)); height: calc(792 * var(--u));
  background: var(--ysh-screen);
  border-radius: calc(10 * var(--u));
  overflow: hidden;
}
.ysh-laptop__base {
  position: absolute; left: 0; top: calc(818 * var(--u)); width: calc(1398 * var(--u)); height: calc(34 * var(--u));
  border-radius: calc(4 * var(--u)) calc(4 * var(--u)) calc(40 * var(--u)) calc(40 * var(--u)) / calc(4 * var(--u)) calc(4 * var(--u)) calc(26 * var(--u)) calc(26 * var(--u));
  background: linear-gradient(180deg, #A3A7AD 0%, #6B6F76 18%, #3A3D43 55%, #16171A 100%);
  box-shadow: 0 calc(26 * var(--u)) calc(40 * var(--u)) calc(-18 * var(--u)) rgba(0, 0, 0, .7);
}
.ysh-laptop__base i {
  position: absolute; left: 50%; top: 0; width: calc(250 * var(--u)); height: calc(12 * var(--u)); translate: -50% 0;
  border-radius: 0 0 calc(14 * var(--u)) calc(14 * var(--u));
  background: linear-gradient(180deg, #4A4D53, #9A9EA4);
}
.ysh-dots { position: absolute; left: calc(16 * var(--u)); top: calc(12 * var(--u)); display: flex; gap: calc(10 * var(--u)); direction: ltr; z-index: 2; }
.ysh-dots i { width: calc(13 * var(--u)); height: calc(13 * var(--u)); border-radius: 50%; background: #FF5F57; }
.ysh-dots i:nth-child(2) { background: #FEBC2E; }
.ysh-dots i:nth-child(3) { background: #28C840; }

/* Sidebar */
.ysh-side { position: absolute; right: 0; top: 0; width: calc(230 * var(--u)); height: 100%; background: var(--ysh-side); border-left: calc(1.5 * var(--u)) solid var(--ysh-line); }
.ysh-side__wm { position: absolute; right: calc(24 * var(--u)); top: calc(42 * var(--u)); width: calc(166 * var(--u)); height: calc(30 * var(--u)); color: var(--ysh-white); }
.ysh-nav { position: absolute; right: calc(10 * var(--u)); top: calc(104 * var(--u)); width: calc(212 * var(--u)); display: flex; flex-direction: column; gap: var(--u); }
.ysh-nav li {
  height: calc(47 * var(--u)); display: flex; align-items: center; gap: calc(18 * var(--u)); padding-right: calc(22 * var(--u));
  font-size: calc(19 * var(--u)); color: var(--ysh-sgray); border-radius: calc(10 * var(--u));
}
.ysh-nav li .ysh-i { width: calc(26 * var(--u)); height: calc(26 * var(--u)); color: var(--ysh-lgray); stroke-width: 1.7; }
.ysh-nav li.is-active { background: rgba(255, 204, 5, .30); color: var(--ysh-y); font-weight: 700; }
.ysh-nav li.is-active .ysh-i { color: var(--ysh-y); }

/* Main */
.ysh-main { position: absolute; left: 0; top: 0; width: calc(946 * var(--u)); height: 100%; }
.ysh-top { position: absolute; left: calc(20 * var(--u)); right: calc(26 * var(--u)); top: calc(35 * var(--u)); height: calc(42 * var(--u)); }
.ysh-top::after { content: ""; position: absolute; left: 0; right: 0; top: calc(60 * var(--u)); height: calc(1.5 * var(--u)); background: var(--ysh-line); }
.ysh-search {
  position: absolute; right: 0; top: 0; width: calc(346 * var(--u)); height: calc(42 * var(--u));
  display: flex; align-items: center; gap: calc(12 * var(--u)); padding-right: calc(14 * var(--u));
  background: #15191C; border: calc(1.5 * var(--u)) solid var(--ysh-line); border-radius: calc(10 * var(--u));
  font-size: calc(16 * var(--u)); color: var(--ysh-muted);
}
.ysh-search .ysh-i { width: calc(22 * var(--u)); height: calc(22 * var(--u)); color: var(--ysh-lgray); }
.ysh-bell { position: absolute; left: calc(68 * var(--u)); top: calc(8 * var(--u)); width: calc(26 * var(--u)); height: calc(26 * var(--u)); color: var(--ysh-lgray); transform-origin: 50% 8%; animation: ysh-bell 7s ease-in-out 2.5s infinite; }
.ysh-bell .ysh-i { width: calc(26 * var(--u)); height: calc(26 * var(--u)); stroke-width: 1.7; }
.ysh-bell i { position: absolute; right: calc(2 * var(--u)); top: var(--u); width: calc(8 * var(--u)); height: calc(8 * var(--u)); border-radius: 50%; background: var(--ysh-y); box-shadow: 0 0 0 calc(2 * var(--u)) var(--ysh-screen); }
.ysh-avatar { position: absolute; left: calc(7 * var(--u)); top: calc(2 * var(--u)); width: calc(38 * var(--u)); height: calc(38 * var(--u)); border-radius: 50%; }
.ysh-avatar img { border-radius: 50%; }
.ysh-avatar i { position: absolute; right: calc(-1 * var(--u)); bottom: 0; width: calc(11 * var(--u)); height: calc(11 * var(--u)); border-radius: 50%; background: var(--ysh-up); box-shadow: 0 0 0 calc(2.5 * var(--u)) var(--ysh-screen); }
.ysh-avatar i::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: var(--ysh-up); animation: ysh-ring 2.6s ease-out infinite; }

.ysh-title { position: absolute; right: calc(30 * var(--u)); top: calc(110 * var(--u)); font-size: calc(32 * var(--u)); font-weight: 700; }

.ysh-panel {
  position: absolute;
  background: var(--ysh-surface);
  border: calc(1.5 * var(--u)) solid var(--ysh-line);
  border-radius: calc(12 * var(--u));
}
.ysh-panel__title { position: absolute; right: calc(25 * var(--u)); top: calc(20 * var(--u)); font-size: calc(19 * var(--u)); font-weight: 700; }

.ysh-orders { right: calc(26 * var(--u)); top: calc(166 * var(--u)); width: calc(115 * var(--u)); height: calc(150 * var(--u)); display: flex; flex-direction: column; align-items: center; padding-top: calc(22 * var(--u)); }
.ysh-orders__icon { width: calc(36 * var(--u)); height: calc(36 * var(--u)); color: var(--ysh-y); stroke-width: 1.8; }
.ysh-orders__label { margin-top: calc(12 * var(--u)); font-size: calc(17 * var(--u)); color: var(--ysh-lgray); }
.ysh-orders__num { margin-top: calc(10 * var(--u)); font-size: calc(31 * var(--u)); font-weight:700; font-variant-numeric: tabular-nums; }

.ysh-chart { right: calc(157 * var(--u)); top: calc(166 * var(--u)); width: calc(365 * var(--u)); height: calc(250 * var(--u)); }
.ysh-chart__svg { position: absolute; inset: 0; width: 100%; height: 100%; direction: ltr; overflow: visible; }
.ysh-chart__grid path { fill: none; stroke: rgba(255, 255, 255, .06); stroke-width: 1; }
.ysh-chart__y text { fill: var(--ysh-lgray); font-size: 15px; text-anchor: end; font-family: var(--ysh-font); }
.ysh-chart__x text { fill: var(--ysh-lgray); font-size: 14px; text-anchor: middle; font-family: var(--ysh-font); }
.ysh-chart__line {
  fill: none; stroke: var(--ysh-y); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round;
  stroke-dasharray: 1; stroke-dashoffset: 0;
  animation: ysh-draw 1.5s cubic-bezier(.45, 0, .2, 1) .8s both;
}
.ysh-chart__pts circle {
  fill: var(--ysh-y); stroke: var(--ysh-surface); stroke-width: 2.5;
  transform-box: fill-box; transform-origin: center;
  animation: ysh-pop .45s cubic-bezier(.3, 1.6, .5, 1) calc(.9s + var(--i) * .2s) both;
}
.ysh-chart__ring {
  fill: var(--ysh-y); transform-box: fill-box; transform-origin: center;
  animation: ysh-ring 2.2s ease-out 2.4s infinite both;
}

.ysh-donut { left: calc(27 * var(--u)); top: calc(166 * var(--u)); width: calc(378 * var(--u)); height: calc(250 * var(--u)); }
.ysh-donut .ysh-panel__title { right: calc(28 * var(--u)); }
.ysh-legend { position: absolute; right: calc(30 * var(--u)); top: calc(84 * var(--u)); display: flex; flex-direction: column; gap: calc(19 * var(--u)); }
.ysh-legend li { display: flex; align-items: center; gap: calc(14 * var(--u)); height: calc(26 * var(--u)); font-size: calc(19 * var(--u)); color: var(--ysh-sgray); }
.ysh-legend i { width: calc(16 * var(--u)); height: calc(16 * var(--u)); border-radius: 50%; background: var(--c); }
.ysh-donut__svg { position: absolute; left: calc(10 * var(--u)); top: calc(34 * var(--u)); width: calc(200 * var(--u)); height: calc(200 * var(--u)); overflow: visible; }
.ysh-donut__seg {
  fill: none; stroke: var(--c); stroke-width: 24;
  stroke-dasharray: var(--len) 100;
  transform: rotate(var(--rot)); transform-origin: 100px 100px;
  animation: ysh-seg 1s cubic-bezier(.45, 0, .2, 1) calc(.6s + var(--d, 0s)) both;
}
.ysh-donut__center {
  position: absolute; left: calc(10 * var(--u)); top: calc(34 * var(--u)); width: calc(200 * var(--u)); height: calc(200 * var(--u));
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: calc(5 * var(--u));
  font-size: calc(15 * var(--u)); color: var(--ysh-lgray);
}
.ysh-donut__center strong { font-size: calc(19 * var(--u)); font-weight: 700; color: var(--ysh-white); font-variant-numeric: tabular-nums; }

.ysh-table { left: calc(27 * var(--u)); top: calc(448 * var(--u)); width: calc(758 * var(--u)); height: calc(290 * var(--u)); overflow: hidden; }
.ysh-table .ysh-panel__title { right: calc(23 * var(--u)); top: calc(16 * var(--u)); font-size: calc(21 * var(--u)); }
.ysh-table__head { position: absolute; left: 0; right: 0; top: calc(60 * var(--u)); height: calc(44 * var(--u)); background: rgba(255, 255, 255, .025); border-block: calc(1.5 * var(--u)) solid var(--ysh-line); font-size: calc(17 * var(--u)); color: var(--ysh-muted); }
.ysh-table__head span, .ysh-row > * { position: absolute; top: 50%; translate: 0 -50%; }
.ysh-table__body { position: absolute; left: 0; right: 0; top: calc(104 * var(--u)); height: calc(180 * var(--u)); }
.ysh-row { position: relative; height: calc(60 * var(--u)); border-bottom: calc(1.5 * var(--u)) solid var(--ysh-line); font-size: calc(20 * var(--u)); }
.ysh-table .c1 { right: calc(48 * var(--u)); }
.ysh-table .c2 { right: calc(291 * var(--u)); }
.ysh-table__head .c3 { right: calc(483 * var(--u)); }
.ysh-row .c1 { font-weight: 700; font-variant-numeric: tabular-nums; }
.ysh-row .c2 { color: var(--ysh-sgray); }
.ysh-badge {
  right: calc(480 * var(--u)); width: calc(94 * var(--u)); height: calc(34 * var(--u)); border-radius: calc(8 * var(--u));
  display: flex; align-items: center; justify-content: center; gap: calc(7 * var(--u));
  font-size: calc(15 * var(--u)); font-weight: 700;
}
.ysh-badge--ok { background: rgba(34, 197, 94, .13); color: var(--ysh-ok); }
.ysh-badge--wait { background: rgba(255, 204, 5, .20); color: var(--ysh-y); }
.ysh-badge--wait i { width: calc(7 * var(--u)); height: calc(7 * var(--u)); border-radius: 50%; background: currentColor; animation: ysh-blink 1.6s ease-in-out infinite; }
.ysh-table__scan {
  position: absolute; left: 0; right: 0; top: 0; height: calc(60 * var(--u));
  background: linear-gradient(270deg, rgba(255, 204, 5, .09), rgba(255, 204, 5, .02) 70%, rgba(255, 204, 5, 0));
  box-shadow: inset calc(-3 * var(--u)) 0 0 var(--ysh-y);
  animation: ysh-scan 9s ease-in-out 2s infinite both;
}

/* ---------- Floating cards ---------- */
.ysh-sales { left: calc(170 * var(--u)); top: 0; width: calc(454 * var(--u)); height: calc(190 * var(--u)); z-index: 3; --in: ysh-in-down; --in-delay: .35s; --bob-dur: 7s; --bob-delay: -1s; }
.ysh-sales__card { width: 100%; height: 100%; }
.ysh-iconbox {
  position: absolute; right: calc(20 * var(--u)); top: calc(20 * var(--u)); width: calc(74 * var(--u)); height: calc(70 * var(--u));
  display: grid; place-items: center;
  background: rgba(255, 204, 5, .10); border-radius: calc(14 * var(--u)); color: var(--ysh-y);
}
.ysh-iconbox .ysh-i { width: calc(40 * var(--u)); height: calc(40 * var(--u)); stroke-width: 1.9; }
.ysh-sales__txt { position: absolute; right: calc(142 * var(--u)); left: calc(34 * var(--u)); top: calc(24 * var(--u)); display: flex; flex-direction: column; gap: calc(14 * var(--u)); }
.ysh-sales__label { font-size: calc(25 * var(--u)); color: var(--ysh-sgray); }
.ysh-sales__num { font-size: calc(36 * var(--u)); font-weight:700; letter-spacing: calc(.5 * var(--u)); font-variant-numeric: tabular-nums; }
.ysh-sales__meta { display: flex; align-items: center; justify-content: space-between; font-size: calc(21 * var(--u)); color: var(--ysh-muted); }
.ysh-sales__meta b { display: flex; align-items: center; gap: calc(8 * var(--u)); font-size: calc(26 * var(--u)); font-weight: 700; color: var(--ysh-up); }
.ysh-sales__meta .ysh-i { width: calc(26 * var(--u)); height: calc(26 * var(--u)); stroke-width: 2.4; animation: ysh-nudge 2s ease-in-out infinite; }

.ysh-product { left: 0; top: calc(555 * var(--u)); width: calc(322 * var(--u)); height: calc(495 * var(--u)); z-index: 4; --in: ysh-in-left; --in-delay: .55s; --bob-dur: 7.5s; --bob-delay: -4s; }
.ysh-product__card { width: 100%; height: 100%; background: linear-gradient(180deg, #15171A, #101113); }
.ysh-product__img { position: absolute; left: calc(24 * var(--u)); top: calc(22 * var(--u)); width: calc(276 * var(--u)); height: calc(278 * var(--u)); border-radius: calc(10 * var(--u)); overflow: hidden; background: #161719; }
.ysh-product__name { position: absolute; right: calc(24 * var(--u)); top: calc(316 * var(--u)); font-size: calc(26 * var(--u)); font-weight: 700; }
.ysh-product__price { position: absolute; right: calc(24 * var(--u)); top: calc(360 * var(--u)); font-size: calc(24 * var(--u)); font-weight: 700; color: var(--ysh-sgray); }
.ysh-btn {
  position: absolute; left: calc(23 * var(--u)); top: calc(408 * var(--u)); width: calc(276 * var(--u)); height: calc(57 * var(--u));
  display: flex; align-items: center; justify-content: center; gap: calc(10 * var(--u));
  background: var(--ysh-y); color: var(--ysh-black); border-radius: calc(10 * var(--u));
  font-size: calc(19 * var(--u)); font-weight: 700; overflow: hidden;
}
.ysh-btn .ysh-i { width: calc(24 * var(--u)); height: calc(24 * var(--u)); stroke-width: 2.2; }
.ysh-btn::after {
  content: ""; position: absolute; top: 0; bottom: 0; left: 0; width: 40%;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, .55), rgba(255, 255, 255, 0));
  transform: translateX(-120%) skewX(-20deg);
  animation: ysh-shine 4.5s ease-in-out 2.8s infinite;
}

.ysh-pay { left: calc(1407 * var(--u)); top: calc(284 * var(--u)); width: calc(313 * var(--u)); height: calc(339 * var(--u)); z-index: 2; --in: ysh-in-right; --in-delay: .45s; --bob-dur: 8s; --bob-delay: -3s; }
.ysh-pay__card { width: 100%; height: 100%; }
.ysh-pay__grid { position: absolute; left: calc(18 * var(--u)); top: calc(82 * var(--u)); width: calc(277 * var(--u)); display: grid; grid-template-columns: repeat(2, calc(132 * var(--u))); gap: calc(14 * var(--u)) calc(13 * var(--u)); }
.ysh-pay__tile {
  height: calc(107 * var(--u)); padding: calc(7 * var(--u)); border-radius: calc(12 * var(--u)); background: #FAFAFA; overflow: hidden;
  animation: ysh-lift 8s ease-in-out infinite; animation-delay: calc(3s + var(--t, 0) * 2s);
}
.ysh-pay__tile:nth-child(2) { --t: 1; }
.ysh-pay__tile:nth-child(3) { --t: 2; }
.ysh-pay__tile:nth-child(4) { --t: 3; }
.ysh-pay__tile img { object-fit: contain; }

.ysh-secure { left: calc(1407 * var(--u)); top: calc(646 * var(--u)); width: calc(313 * var(--u)); height: calc(125 * var(--u)); z-index: 2; --in: ysh-in-right; --in-delay: .6s; --bob-dur: 6.5s; --bob-delay: -2s; }
.ysh-secure__card { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; gap: calc(36 * var(--u)); }
.ysh-secure__txt { font-size: calc(28 * var(--u)); font-weight: 700; }
.ysh-secure__shield { position: relative; width: calc(74 * var(--u)); height: calc(80 * var(--u)); color: var(--ysh-y); }
.ysh-secure__shield::before {
  content: ""; position: absolute; inset: calc(-26 * var(--u));
  background: radial-gradient(closest-side, rgba(255, 204, 5, .45), rgba(255, 204, 5, 0));
  animation: ysh-glow 3.2s ease-in-out infinite;
}
.ysh-secure__shield .ysh-i { position: relative; width: 100%; height: 100%; stroke-width: 1.6; }

.ysh-ship { left: calc(302 * var(--u)); top: calc(1120 * var(--u)); width: calc(509 * var(--u)); height: calc(137 * var(--u)); z-index: 3; --in-delay: .7s; --bob-dur: 6s; --bob-delay: -1.5s; }
.ysh-ship__card { width: 100%; height: 100%; }
.ysh-ship__txt { position: absolute; right: calc(26 * var(--u)); top: calc(24 * var(--u)); display: flex; flex-direction: column; gap: calc(18 * var(--u)); }
.ysh-ship__title { font-size: calc(27 * var(--u)); font-weight: 700; }
.ysh-ship__track { font-size: calc(22 * var(--u)); color: var(--ysh-lgray); }
.ysh-ship__track bdi { letter-spacing: calc(.5 * var(--u)); }
.ysh-ship__icon { position: absolute; left: calc(33 * var(--u)); top: calc(23 * var(--u)); width: calc(106 * var(--u)); height: calc(90 * var(--u)); display: grid; place-items: center; background: var(--ysh-surface-2); border-radius: calc(14 * var(--u)); color: var(--ysh-y); }
.ysh-truck { width: calc(88 * var(--u)); height: calc(62 * var(--u)); overflow: visible; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.ysh-truck__body { animation: ysh-truck 1.4s ease-in-out infinite; }
.ysh-truck__lines path { animation: ysh-speed 1.1s linear infinite; }
.ysh-truck__lines path:nth-child(2) { animation-delay: -.35s; }
.ysh-truck__lines path:nth-child(3) { animation-delay: -.7s; }

/* ---------- Phone ---------- */
.ysh-phone { left: calc(972 * var(--u)); top: calc(637 * var(--u)); width: calc(370 * var(--u)); height: calc(698 * var(--u)); z-index: 5; --in-dur: 1.05s; --in-delay: .2s; --bob-dur: 9s; --bob-delay: -2s; --bob-amp: calc(-8 * var(--u)); }
.ysh-phone__rim {
  width: calc(370 * var(--u)); height: calc(698 * var(--u)); padding: calc(4 * var(--u)); border-radius: calc(58 * var(--u));
  background: linear-gradient(135deg, #E4E4E7, #8E9095 22%, #D9D9DC 48%, #74767B 72%, #C9C9CC);
  box-shadow: 0 calc(50 * var(--u)) calc(80 * var(--u)) calc(-30 * var(--u)) rgba(0, 0, 0, .65), 0 calc(14 * var(--u)) calc(30 * var(--u)) calc(-12 * var(--u)) rgba(0, 0, 0, .45);
}
.ysh-phone__bezel { width: 100%; height: 100%; padding: calc(11 * var(--u)); border-radius: calc(54 * var(--u)); background: #050607; }
.ysh-phone__screen { position: relative; width: 100%; height: 100%; border-radius: calc(43 * var(--u)); background: var(--ysh-screen); overflow: hidden; }
.ysh-status { position: absolute; left: calc(30 * var(--u)); right: calc(22 * var(--u)); top: calc(13 * var(--u)); height: calc(20 * var(--u)); display: flex; align-items: center; justify-content: space-between; }
.ysh-status__time { font-size: calc(15 * var(--u)); font-weight: 700; font-family: system-ui, -apple-system, "Segoe UI", sans-serif; }
.ysh-status__icons { width: calc(52 * var(--u)); height: calc(12 * var(--u)); color: var(--ysh-white); }
.ysh-notch { position: absolute; left: calc(74 * var(--u)); top: 0; width: calc(192 * var(--u)); height: calc(30 * var(--u)); border-radius: 0 0 calc(20 * var(--u)) calc(20 * var(--u)); background: #050607; }
.ysh-notch i { position: absolute; right: calc(44 * var(--u)); top: calc(9 * var(--u)); width: calc(10 * var(--u)); height: calc(10 * var(--u)); border-radius: 50%; background: #10182B; box-shadow: inset 0 0 0 calc(2 * var(--u)) #1B2236; }
.ysh-app__head { position: absolute; left: calc(20 * var(--u)); right: calc(17 * var(--u)); top: calc(46 * var(--u)); height: calc(30 * var(--u)); }
.ysh-app__menu { position: absolute; left: 0; top: calc(3 * var(--u)); width: calc(26 * var(--u)); height: calc(26 * var(--u)); color: var(--ysh-sgray); }
.ysh-app__wm { position: absolute; right: 0; top: calc(2 * var(--u)); width: calc(132 * var(--u)); height: calc(24 * var(--u)); color: var(--ysh-y); }
.ysh-app__search {
  position: absolute; left: calc(14 * var(--u)); right: calc(13 * var(--u)); top: calc(97 * var(--u)); height: calc(46 * var(--u));
  display: flex; align-items: center; gap: calc(10 * var(--u)); padding-right: calc(14 * var(--u));
  background: #202328; border-radius: calc(12 * var(--u)); font-size: calc(16 * var(--u)); color: var(--ysh-muted);
}
.ysh-app__search .ysh-i { width: calc(22 * var(--u)); height: calc(22 * var(--u)); color: var(--ysh-lgray); }
.ysh-banner { position: absolute; left: calc(14 * var(--u)); right: calc(13 * var(--u)); top: calc(164 * var(--u)); height: calc(169 * var(--u)); border-radius: calc(14 * var(--u)); overflow: hidden; background: linear-gradient(90deg, #14181B, #1B2125); }
.ysh-banner__img {
  position: absolute; left: 0; top: 0; width: calc(158 * var(--u)); height: calc(169 * var(--u));
  -webkit-mask-image: linear-gradient(90deg, #000 72%, transparent);
  mask-image: linear-gradient(90deg, #000 72%, transparent);
}
.ysh-banner__img img { animation: ysh-bob-sm 5s ease-in-out infinite; }
.ysh-banner__txt { position: absolute; right: calc(15 * var(--u)); top: calc(34 * var(--u)); display: flex; flex-direction: column; align-items: flex-start; gap: calc(10 * var(--u)); }
.ysh-banner__txt strong { font-size: calc(22 * var(--u)); font-weight:700; }
.ysh-banner__txt span { font-size: calc(13.5 * var(--u)); color: var(--ysh-sgray); }
.ysh-banner__txt .ysh-btn--sm { position: relative; left: auto; top: auto; margin-top: calc(6 * var(--u)); width: calc(107 * var(--u)); height: calc(35 * var(--u)); border-radius: calc(8 * var(--u)); font-size: calc(13.5 * var(--u)); color: var(--ysh-black); }
.ysh-btn--sm::after { animation-delay: 4.6s; }
.ysh-app__h { position: absolute; right: calc(17 * var(--u)); top: calc(370 * var(--u)); font-size: calc(20 * var(--u)); font-weight: 700; }
.ysh-thumbs { position: absolute; left: calc(14 * var(--u)); right: calc(13 * var(--u)); top: calc(416 * var(--u)); height: calc(122 * var(--u)); display: grid; grid-template-columns: repeat(3, 1fr); gap: calc(12 * var(--u)); }
.ysh-thumbs span { border-radius: calc(10 * var(--u)); overflow: hidden; background: #CACACA; }
.ysh-tabbar {
  position: absolute; left: 0; right: 0; top: calc(562 * var(--u)); height: calc(106 * var(--u));
  display: grid; grid-template-columns: repeat(4, 1fr); align-items: start; padding-top: calc(16 * var(--u));
  border-top: calc(1.5 * var(--u)) solid var(--ysh-line); background: #121417;
}
.ysh-tabbar span { display: flex; flex-direction: column; align-items: center; gap: calc(6 * var(--u)); font-size: calc(15 * var(--u)); color: var(--ysh-lgray); }
.ysh-tabbar .ysh-i { width: calc(28 * var(--u)); height: calc(28 * var(--u)); stroke-width: 1.7; }
.ysh-tabbar .is-active { color: var(--ysh-y); font-weight: 700; }

/* ---------- Keyframes ---------- */
@keyframes ysh-in-up    { from { opacity: 0; transform: translate3d(0, calc(46 * var(--u)), 0) scale(.97); } to { opacity: 1; transform: none; } }
@keyframes ysh-in-down  { from { opacity: 0; transform: translate3d(0, calc(-40 * var(--u)), 0); } to { opacity: 1; transform: none; } }
@keyframes ysh-in-left  { from { opacity: 0; transform: translate3d(calc(-56 * var(--u)), 0, 0); } to { opacity: 1; transform: none; } }
@keyframes ysh-in-right { from { opacity: 0; transform: translate3d(calc(56 * var(--u)), 0, 0); } to { opacity: 1; transform: none; } }
@keyframes ysh-bob      { 0%, 100% { transform: translate3d(0, 0, 0); } 50% { transform: translate3d(0, var(--bob-amp, calc(-12 * var(--u))), 0); } }
@keyframes ysh-bob-sm   { 0%, 100% { transform: translate3d(0, 0, 0); } 50% { transform: translate3d(0, calc(-5 * var(--u)), 0); } }
@keyframes ysh-draw     { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
@keyframes ysh-seg      { from { stroke-dasharray: 0 100; } to { stroke-dasharray: var(--len) 100; } }
@keyframes ysh-pop      { from { transform: scale(0); } to { transform: scale(1); } }
@keyframes ysh-ring     { 0% { transform: scale(1); opacity: .6; } 75%, 100% { transform: scale(2.8); opacity: 0; } }
@keyframes ysh-blink    { 0%, 100% { opacity: 1; } 50% { opacity: .25; } }
@keyframes ysh-nudge    { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(calc(-4 * var(--u))); } }
@keyframes ysh-shine    { 0%, 60% { transform: translateX(-120%) skewX(-20deg); } 100% { transform: translateX(320%) skewX(-20deg); } }
@keyframes ysh-lift     { 0%, 14%, 100% { transform: translateY(0); } 7% { transform: translateY(calc(-5 * var(--u))); } }
@keyframes ysh-glow     { 0%, 100% { opacity: .35; } 50% { opacity: 1; } }
@keyframes ysh-truck    { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-.6px); } }
@keyframes ysh-speed    { 0% { transform: translateX(3px); opacity: 0; } 30% { opacity: 1; } 100% { transform: translateX(-4px); opacity: 0; } }
@keyframes ysh-bell     { 0%, 84%, 100% { transform: rotate(0); } 87% { transform: rotate(14deg); } 90% { transform: rotate(-11deg); } 93% { transform: rotate(6deg); } 96% { transform: rotate(-3deg); } }
@keyframes ysh-scan {
  0%        { transform: translateY(0);     opacity: 0; }
  4%, 29%   { transform: translateY(0);     opacity: 1; }
  34%, 62%  { transform: translateY(calc(60 * var(--u)));   opacity: 1; }
  67%, 92%  { transform: translateY(calc(120 * var(--u)));  opacity: 1; }
  97%, 100% { transform: translateY(calc(120 * var(--u)));  opacity: 0; }
}

/* بيقف لما المكوّن يخرج من الشاشة (الـ JS بيضيف data-paused) */
.ysh[data-paused] *, .ysh[data-paused] *::before, .ysh[data-paused] *::after { animation-play-state: paused !important; }

/* احترام إعداد تقليل الحركة في الجهاز */
@media (prefers-reduced-motion: reduce) {
  .ysh *, .ysh *::before, .ysh *::after { animation: none !important; transition: none !important; }
  .ysh-table__scan { opacity: 0; }
}

/* Home integration: the supplied composition keeps its own aspect ratio. */
.home-hero .hero-showcase { aspect-ratio: 1720 / 1340; }
.hero-showcase::before { content: none; }

/* English text flows left to right within the original artwork positions. */
.ysh[dir="ltr"] { direction: ltr; text-align: left; }
.ysh[dir="ltr"] .ysh-nav li,
.ysh[dir="ltr"] .ysh-search,
.ysh[dir="ltr"] .ysh-app__search { padding-left: calc(14 * var(--u)); padding-right: 0; }
.ysh[dir="ltr"] .ysh-nav li { gap: calc(12 * var(--u)); }
.ysh[dir="ltr"] .ysh-sales__num { font-size: calc(37 * var(--u)); }
.ysh[dir="ltr"] .ysh-sales__meta { font-size: calc(17 * var(--u)); }
.ysh[dir="ltr"] .ysh-legend { font-size: calc(17 * var(--u)); }
.ysh[dir="ltr"] .ysh-legend li { gap: calc(8 * var(--u)); font-size: inherit; }
.ysh[dir="ltr"] .ysh-badge { width: calc(128 * var(--u)); font-size: calc(14 * var(--u)); }
.ysh[dir="ltr"] .ysh-product__name { font-size: calc(22 * var(--u)); }
.ysh[dir="ltr"] .ysh-card__title { font-size: calc(24 * var(--u)); }
.ysh[dir="ltr"] .ysh-secure__card { gap: calc(18 * var(--u)); }
.ysh[dir="ltr"] .ysh-secure__txt { font-size: calc(23 * var(--u)); }
.ysh[dir="ltr"] .ysh-ship__title { font-size: calc(25 * var(--u)); }
.ysh[dir="ltr"] .ysh-ship__track { font-size: calc(19 * var(--u)); }
.ysh[dir="ltr"] .ysh-banner__txt strong { font-size: calc(20 * var(--u)); }
.ysh[dir="ltr"] .ysh-banner__txt span { font-size: calc(12.5 * var(--u)); }
