﻿/* واجهة تسوق زاهية بوضعين فاتح وداكن */
:root {
  --teal: #14b0a6;
  --coral: #ec7156;
  --hot: #ec7156;
  --hot-text: #b8452c;
  --pink: #f0047f;
  --violet: #6a2cff;
  --sun: #ffd23f;
  --sun-deep: #ffb000;
  --gold: #f5a623;
  --blue: #0a66e8;
  --green: #0d8a82;
  --grad: linear-gradient(100deg, #c9472d 0%, #dc5a3f 55%, #e2694c 100%);
  --head: linear-gradient(100deg, #d93a2b 0%, #ec5b34 50%, #f5813a 100%);
  --grad-v: linear-gradient(120deg, #e8336d, #ff7a45);
  --grad-b: linear-gradient(120deg, #ff8a00, #ffb300);
  --grad-g: linear-gradient(120deg, #0fa39a, #2cc4b8);
  --bg: #f1f2f6;
  --surface: #fff;
  --surface-2: #f6f7fa;
  --ink: #14171d;
  --muted: #5b6370;
  --line: #e3e5eb;
  --tile: #fff;
  --shadow: 0 2px 6px rgba(20, 23, 29, .07);
  --lift: 0 14px 34px rgba(20, 23, 29, .18);
  --r: 10px;
  --spring: cubic-bezier(.2, 1.4, .4, 1);
  --ease: cubic-bezier(.2, .7, .2, 1);
  --font: "Cairo", "Segoe UI", Tahoma, sans-serif;
  color-scheme: light;
}
[data-theme="dark"] {
  --hot-text: #f2937e;
  --blue: #6aa8ff;
  --green: #5cc8c8;
  --bg: #0c0e13;
  --surface: #171a21;
  --surface-2: #20242d;
  --ink: #f3f4f7;
  --muted: #a7afbc;
  --line: #2b303b;
  --tile: #f3f4f7;
  --shadow: 0 2px 8px rgba(0, 0, 0, .5);
  --lift: 0 16px 38px rgba(0, 0, 0, .7);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 500 15px/1.5 var(--font); padding-bottom: 66px; overflow-x: hidden; transition: background .3s, color .3s; }
h1, h2, h3, h4, p { margin: 0; }
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
img { display: block; max-width: 100%; }
svg { display: block; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; border-radius: 4px; }
main:focus { outline: 0; }
.num { direction: ltr; unicode-bidi: isolate; font-variant-numeric: tabular-nums; }
.wrap { width: min(100%, 1440px); margin-inline: auto; padding-inline: 12px; }
.muted { color: var(--muted); }
.tiny { font-size: 12.5px; }
.small { font-size: 13.5px; }
.bold { font-weight: 800; }
.row { display: flex; align-items: center; gap: 8px; }
.wraprow { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.between { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.stack { display: grid; gap: 10px; }
.skip { position: fixed; inset-inline-start: 12px; top: -60px; background: #000; color: #fff; padding: 10px 14px; border-radius: 8px; z-index: 200; }
.skip:focus { top: 8px; }
.scrollbar { position: fixed; z-index: 120; inset-inline: 0; top: 0; height: 3px; background: var(--sun); transform: scaleX(0); transform-origin: right; pointer-events: none; }

/* أزرار */
.btn { position: relative; overflow: hidden; display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 44px; padding: 0 18px; border: 0; border-radius: 999px; font-weight: 800; background: var(--grad); color: #fff; background-size: 160% 100%; transition: background-position .35s var(--ease), transform .12s, box-shadow .2s; }
.btn:hover { background-position: 100% 0; box-shadow: 0 6px 18px rgba(236, 113, 86, .4); }
.btn:active { transform: scale(.96); }
.btn.sun { background: linear-gradient(100deg, var(--sun), var(--sun-deep)); color: #2a1600; }
.btn.sun:hover { box-shadow: 0 6px 18px rgba(255, 170, 0, .45); }
.btn.line { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--line); }
.btn.line:hover { box-shadow: inset 0 0 0 1.5px var(--hot); color: var(--hot-text); }
.btn.block { width: 100%; }
.btn.s { min-height: 38px; padding: 0 14px; font-size: 13.5px; }
.ripple { position: absolute; border-radius: 50%; background: rgba(255, 255, 255, .45); transform: scale(0); animation: ripple .55s ease-out; pointer-events: none; }
@keyframes ripple { to { transform: scale(3.4); opacity: 0; } }
.link { background: none; border: 0; padding: 0; color: var(--blue); font-weight: 700; min-height: 26px; }
.link:hover { text-decoration: underline; }

/* شريط متحرك */
.ticker { background: #111; color: #fff; overflow: hidden; font-size: 13px; font-weight: 600; }
.ticker div { display: flex; gap: 46px; width: max-content; padding-block: 5px; animation: ticker 34s linear infinite; }
.ticker:hover div { animation-play-state: paused; }
.ticker b { color: var(--sun); }
@keyframes ticker { to { transform: translateX(50%); } }

/* الترويسة */
.head { position: sticky; top: 0; z-index: 50; background: var(--head); background-size: 220% 100%; color: #fff; animation: flow 12s ease-in-out infinite alternate; box-shadow: 0 3px 14px rgba(0, 0, 0, .18); }
@keyframes flow { to { background-position: 100% 0; } }
.head-main { display: grid; grid-template-columns: auto 1fr auto; gap: 8px 12px; align-items: center; padding-block: 8px; transition: padding .2s; }
.logo { font-size: 27px; font-weight: 900; letter-spacing: -.5px; display: inline-flex; align-items: center; gap: 6px; transition: transform .25s var(--spring); }
.logo:hover { transform: scale(1.06) rotate(-2deg); }
.logo i { width: 12px; height: 12px; border-radius: 50%; background: var(--sun); animation: pulse 2s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(255, 196, 0, .8); } 80%, 100% { box-shadow: 0 0 0 10px rgba(255, 196, 0, 0); } }
.search { grid-column: 1 / -1; grid-row: 2; display: flex; background: #fff; border-radius: 999px; overflow: hidden; position: relative; }
.search input { flex: 1; min-width: 0; border: 0; background: none; padding: 9px 16px; outline: 0; color: #14171d; font-weight: 600; }
.search input::placeholder { color: #6b7380; }
.search button { min-width: 54px; margin: 3px; border: 0; border-radius: 999px; background: linear-gradient(100deg, var(--sun), var(--sun-deep)); color: #2a1600; display: grid; place-items: center; transition: transform .15s var(--spring); }
.search button:hover { transform: scale(1.08); }
.tools { display: flex; align-items: center; gap: 1px; }
.tool { position: relative; display: inline-flex; align-items: center; gap: 5px; min-height: 42px; min-width: 42px; justify-content: center; padding: 0 7px; border: 0; background: none; border-radius: 10px; color: #fff; font-size: 13px; font-weight: 700; transition: background .15s; }
.tool:hover { background: rgba(255, 255, 255, .18); }
.tool .lbl { display: none; }
.tool svg { transition: transform .25s var(--spring); }
.tool:hover svg { transform: translateY(-2px) scale(1.1); }
.badge { position: absolute; top: 2px; inset-inline-end: 0; min-width: 19px; height: 19px; padding: 0 5px; border-radius: 10px; background: var(--sun); color: #2a1600; font-size: 12px; font-weight: 800; line-height: 19px; text-align: center; }
.badge.pop { animation: pop .5s var(--spring); }
@keyframes pop { 0% { transform: scale(.4); } 50% { transform: scale(1.5); } 100% { transform: scale(1); } }
.sub { background: rgba(0, 0, 0, .16); font-size: 13.5px; font-weight: 700; }
.sub .wrap { display: flex; align-items: center; gap: 4px; overflow-x: auto; scrollbar-width: none; }
.sub a, .sub button { flex: none; padding: 7px 10px; border: 0; background: none; color: #fff; position: relative; font-weight: 700; }
.sub a::after { content: ""; position: absolute; inset-inline: 10px; bottom: 3px; height: 2px; background: var(--sun); transform: scaleX(0); transition: transform .22s var(--ease); }
.sub a:hover::after { transform: scaleX(1); }
.placebtn { display: inline-flex; align-items: center; gap: 4px; }
.placebtn b { color: #fff; font-weight: 800; text-decoration: underline; text-decoration-color: var(--sun); text-decoration-thickness: 2px; text-underline-offset: 4px; }

/* التنقل السفلي */
.tabbar { position: fixed; inset-inline: 0; bottom: 0; z-index: 60; background: var(--surface); border-top: 1px solid var(--line); display: grid; grid-template-columns: repeat(5, 1fr); padding-bottom: env(safe-area-inset-bottom); }
.tabbar a { position: relative; display: grid; justify-items: center; font-size: 11.5px; font-weight: 700; color: var(--muted); padding: 7px 2px 5px; min-height: 56px; }
.tabbar a.on { color: var(--hot-text); }
.tabbar a.on svg { animation: pop .45s var(--spring); }
.tabbar .badge { inset-inline-end: calc(50% - 24px); top: 3px; }

/* أقسام */
main { padding-block: 12px 30px; min-height: 70vh; }
.sec { margin-top: 18px; background: var(--surface); border-radius: var(--r); padding: 14px 12px; box-shadow: var(--shadow); }
.sec.flat { background: none; box-shadow: none; padding: 0; }
.sec-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.sec-h h2 { font-size: 20px; font-weight: 900; }

/* الظهور عند التمرير */
.rv { opacity: 0; transform: translateY(26px) scale(.98); transition: opacity .5s var(--ease), transform .55s var(--ease); transition-delay: var(--d, 0ms); }
.rv.in { opacity: 1; transform: none; }

/* الواجهة */
.top-grid { display: grid; gap: 12px; }
.sidecats { display: none; }
.hero { position: relative; overflow: hidden; border-radius: var(--r); height: 250px; background: #222; box-shadow: var(--shadow); }
.slide { position: absolute; inset: 0; display: grid; grid-template-columns: 1.15fr 1fr; align-items: center; padding: 18px; color: #fff; opacity: 0; transition: opacity .6s; pointer-events: none; }
.slide.on { opacity: 1; pointer-events: auto; }
.slide h1, .slide h2 { font-size: clamp(23px, 3.4vw, 42px); line-height: 1.15; font-weight: 900; }
.slide p { font-size: clamp(13px, 1.4vw, 17px); margin-block: 6px 12px; font-weight: 600; }
.slide .tx > * { opacity: 0; transform: translateX(-30px); }
.slide.on .tx > * { animation: slidein .6s var(--ease) forwards; }
.slide.on .tx > :nth-child(2) { animation-delay: .1s; }
.slide.on .tx > :nth-child(3) { animation-delay: .2s; }
.slide.on .tx > :nth-child(4) { animation-delay: .3s; }
@keyframes slidein { to { opacity: 1; transform: none; } }
.slide .pics { position: relative; height: 100%; }
.slide .pics img { position: absolute; width: 62%; filter: drop-shadow(0 16px 20px rgba(0, 0, 0, .35)); }
.slide.on .pics img { animation: floatin .8s var(--spring) both, bob 4.5s ease-in-out .8s infinite alternate; }
.slide.on .pics img:nth-child(1) { top: 2%; inset-inline-start: 34%; }
.slide.on .pics img:nth-child(2) { top: 34%; inset-inline-start: 0; animation-delay: .12s, 1s; }
.slide .pics img:nth-child(1) { top: 2%; inset-inline-start: 34%; }
.slide .pics img:nth-child(2) { top: 34%; inset-inline-start: 0; }
@keyframes floatin { from { opacity: 0; transform: translateY(60px) rotate(-10deg) scale(.7); } to { opacity: 1; transform: none; } }
@keyframes bob { to { transform: translateY(-10px) rotate(1.5deg); } }
.deco { position: absolute; border-radius: 50%; background: rgba(255, 255, 255, .13); animation: bob 6s ease-in-out infinite alternate; }
.dots { position: absolute; bottom: 9px; inset-inline: 0; display: flex; justify-content: center; gap: 6px; z-index: 3; }
.dots button { width: 22px; height: 5px; padding: 0; border: 0; border-radius: 3px; background: rgba(255, 255, 255, .4); overflow: hidden; position: relative; }
.dots button.on::after { content: ""; position: absolute; inset: 0; background: #fff; transform-origin: right; animation: dotfill 5s linear forwards; }
@keyframes dotfill { from { transform: scaleX(0); } }
.hero-arrow { position: absolute; top: 50%; translate: 0 -50%; z-index: 3; width: 38px; height: 38px; border: 0; border-radius: 50%; background: rgba(0, 0, 0, .3); color: #fff; font-size: 20px; opacity: 0; transition: opacity .2s; }
.hero:hover .hero-arrow { opacity: 1; }
.hero-arrow.prev { inset-inline-start: 8px; } .hero-arrow.next { inset-inline-end: 8px; }
.side-col { display: none; }

.benefits { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin-top: 12px; }
.benefit { display: flex; align-items: center; gap: 8px; background: var(--surface); border-radius: var(--r); padding: 9px 10px; box-shadow: var(--shadow); font-size: 12.5px; font-weight: 800; }
.benefit i { flex: none; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; color: #fff; background: var(--grad); transition: transform .4s var(--spring); }
.benefit:nth-child(2) i { background: var(--grad-b); } .benefit:nth-child(3) i { background: var(--grad-g); } .benefit:nth-child(4) i { background: var(--grad-v); }
.benefit:hover i { transform: rotate(-12deg) scale(1.15); }

.catrow { display: grid; grid-auto-flow: column; grid-auto-columns: 80px; gap: 10px; overflow-x: auto; scrollbar-width: none; }
.catc { display: grid; justify-items: center; gap: 4px; text-align: center; font-size: 12.5px; font-weight: 700; }
.catc i { width: 66px; height: 66px; border-radius: 50%; background: var(--tile); box-shadow: inset 0 0 0 2px var(--line); display: grid; place-items: center; overflow: hidden; transition: transform .3s var(--spring), box-shadow .2s; }
.catc img { width: 76%; transition: transform .35s var(--spring); }
.catc:hover i { box-shadow: inset 0 0 0 2.5px var(--hot); transform: translateY(-4px); }
.catc:hover img { transform: scale(1.2) rotate(-4deg); }

/* العروض */
.flash { margin-top: 18px; border-radius: var(--r); overflow: hidden; box-shadow: var(--shadow); background: var(--surface); }
.flash-h { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; padding: 10px 12px; background: var(--grad); color: #fff; }
.flash-h h2 { font-size: 21px; font-weight: 900; display: flex; gap: 6px; align-items: center; }
.flash-h h2 svg { animation: zap 1.4s infinite; color: var(--sun); }
@keyframes zap { 0%, 60%, 100% { transform: scale(1); } 70% { transform: scale(1.35) rotate(-12deg); } 80% { transform: scale(.95); } }
.count { display: inline-flex; gap: 4px; align-items: center; direction: ltr; font-weight: 800; }
.count span { position: relative; overflow: hidden; display: inline-block; min-width: 31px; height: 30px; line-height: 30px; text-align: center; border-radius: 6px; background: #111; color: #fff; font-size: 15px; }
.count span.tick b { display: block; animation: tick .4s var(--ease); }
.count b { font-weight: 800; }
@keyframes tick { from { transform: translateY(-100%); opacity: 0; } to { transform: none; opacity: 1; } }
.rail { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(150px, 42%); gap: 10px; overflow-x: auto; padding: 10px 12px; scroll-snap-type: x proximity; scrollbar-width: thin; }
.rail > * { scroll-snap-align: start; }
.bar { height: 13px; border-radius: 7px; background: var(--surface-2); overflow: hidden; position: relative; font-size: 10px; font-weight: 800; }
.bar i { display: block; height: 100%; width: 0; border-radius: 7px; background: var(--grad); transition: width 1.2s var(--ease); }
.bar span { position: absolute; inset: 0; display: grid; place-items: center; color: var(--ink); line-height: 13px; }
.in .bar i, .bar.in i { width: var(--w); }

/* بطاقات مجمعة */
.blocks { display: grid; gap: 12px; margin-top: 18px; }
.bk { background: var(--surface); border-radius: var(--r); padding: 12px; box-shadow: var(--shadow); }
.bk h3 { font-size: 17px; font-weight: 900; margin-bottom: 8px; }
.b4 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.b4 a { font-size: 12.5px; font-weight: 700; }
.b4 .tile { aspect-ratio: 1; border-radius: 6px; }

/* بطاقة المنتج */
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.tile { position: relative; overflow: hidden; background: var(--tile); display: grid; place-items: center; }
.tile img { width: 100%; height: 100%; object-fit: contain; padding: 6%; transition: transform .45s var(--ease), opacity .3s; }
.tile img.alt { position: absolute; inset: 0; opacity: 0; }
.tile.loading { background: linear-gradient(100deg, #e8eaf0 30%, #f7f8fb 50%, #e8eaf0 70%); background-size: 240% 100%; animation: shimmer 1.2s linear infinite; }
@keyframes shimmer { from { background-position: 120% 0; } to { background-position: -120% 0; } }
.pc { position: relative; display: flex; flex-direction: column; background: var(--surface); border-radius: var(--r); overflow: hidden; box-shadow: var(--shadow); transition: transform .25s var(--spring), box-shadow .25s; }
.pc .tile { aspect-ratio: 1; }
@media (hover: hover) {
  .pc:hover { transform: translateY(-6px); box-shadow: var(--lift); z-index: 2; }
  .pc:hover .tile img { transform: scale(1.09); }
  .pc:hover .tile img.alt { opacity: 1; }
  .pc:hover .quick { transform: none; opacity: 1; }
}
.quick { position: absolute; inset-inline: 8px; bottom: 8px; min-height: 36px; border: 0; border-radius: 999px; background: var(--grad); color: #fff; font-size: 13px; font-weight: 800; transform: translateY(14px); opacity: 0; transition: transform .25s var(--spring), opacity .2s; }
.quick:active { scale: .96; }
.heart { position: absolute; z-index: 2; top: 6px; inset-inline-end: 6px; width: 32px; height: 32px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .9); color: #39404c; display: grid; place-items: center; transition: transform .2s var(--spring); }
.heart:hover { transform: scale(1.15); }
.heart.on { color: var(--pink); animation: pop .5s var(--spring); }
.heart.on svg { fill: currentColor; }
.off { position: absolute; z-index: 2; top: 6px; inset-inline-start: 6px; padding: 1px 7px; border-radius: 5px; background: var(--grad); color: #fff; font-size: 12.5px; font-weight: 800; }
.pb { display: grid; gap: 2px; padding: 8px 9px 10px; flex: 1; align-content: start; }
.pt { font-size: 13.5px; font-weight: 600; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.8em; }
.pr { font-size: 19px; font-weight: 900; color: var(--hot-text); line-height: 1.3; }
.pr small { font-size: 12px; font-weight: 700; }
.was { color: var(--muted); text-decoration: line-through; font-size: 12.5px; font-weight: 600; }
.meta { display: flex; align-items: center; gap: 5px; font-size: 12px; color: var(--muted); font-weight: 600; flex-wrap: wrap; }
.stars { color: var(--gold); display: inline-flex; }
.fast { display: inline-flex; align-items: center; gap: 3px; font-size: 12px; font-weight: 800; color: var(--green); }
.cpn { display: inline-block; padding: 0 6px; font-size: 11.5px; font-weight: 800; color: var(--hot-text); border: 1px dashed var(--hot-text); border-radius: 4px; width: fit-content; }

.more-load { display: grid; place-items: center; padding: 18px; }

.stores { display: grid; gap: 10px; }
.sc { display: flex; gap: 10px; align-items: center; padding: 10px; background: var(--surface-2); border-radius: var(--r); transition: transform .2s var(--spring); }
.sc:hover { transform: scale(1.02); }
.logo-s { flex: none; width: 52px; height: 52px; border-radius: 50%; background: var(--grad); color: #fff; display: grid; place-items: center; font-size: 22px; font-weight: 900; }
.tag { display: inline-flex; gap: .3em; padding: 0 7px; border-radius: 5px; font-size: 12px; font-weight: 800; background: var(--blue); color: #fff; }
[data-theme="dark"] .tag { color: #071a33; }
.tag.g { background: var(--green); } .tag.h { background: var(--hot); color: #fff; } .tag.o { background: var(--surface-2); color: var(--ink); }

.wanted { margin-top: 18px; display: grid; gap: 10px; padding: 16px; border-radius: var(--r); color: #fff; background: var(--grad-v); background-size: 200% 100%; animation: flow 8s ease-in-out infinite alternate; }
.wanted h2 { font-size: 22px; font-weight: 900; }

.foot { margin-top: 26px; background: #241b20; color: #d9cfd3; padding-block: 24px; font-size: 13.5px; }
.foot-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.foot h4 { color: #fff; margin-bottom: 6px; font-weight: 800; }
.foot a { display: block; padding-block: 3px; transition: transform .15s, color .15s; }
.foot a:hover { color: var(--sun); transform: translateX(-4px); }

/* القائمة */
.crumbs { display: flex; flex-wrap: wrap; gap: 6px; font-size: 12.5px; color: var(--muted); margin-bottom: 8px; }
.crumbs a:hover { color: var(--hot-text); }
.ll { display: grid; gap: 12px; align-items: start; }
.filters { display: none; background: var(--surface); border-radius: var(--r); padding: 12px; box-shadow: var(--shadow); }
.filters.open { display: block; animation: drop .25s var(--ease); }
@keyframes drop { from { opacity: 0; transform: translateY(-10px); } }
.chk { display: flex; align-items: center; gap: 9px; min-height: 38px; font-weight: 600; }
.chk input, .opt input { width: 19px; height: 19px; accent-color: var(--hot); flex: none; }
.barx { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 10px; padding: 7px 10px; background: var(--surface); border-radius: var(--r); box-shadow: var(--shadow); }
.select { min-height: 38px; padding: 0 8px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }

/* المنتج */
.pd { display: grid; gap: 12px; }
.box { background: var(--surface); border-radius: var(--r); padding: 12px; box-shadow: var(--shadow); }
.gal { display: grid; gap: 8px; }
.gal-main { aspect-ratio: 1; border-radius: var(--r); cursor: zoom-in; }
.gal-main img { transition: transform .2s; }
.thumbs { display: flex; gap: 7px; overflow-x: auto; }
.thumbs button { flex: none; width: 62px; height: 62px; padding: 0; border: 2px solid var(--line); border-radius: 8px; background: var(--tile); overflow: hidden; transition: transform .2s var(--spring), border-color .15s; }
.thumbs button.on, .thumbs button:hover { border-color: var(--hot); transform: translateY(-2px); }
.thumbs img { width: 100%; height: 100%; object-fit: contain; }
.pd h1 { font-size: 20px; font-weight: 800; line-height: 1.35; }
.price-band { margin-block: 8px; padding: 10px 12px; border-radius: var(--r); background: var(--grad); background-size: 200% 100%; animation: flow 8s ease-in-out infinite alternate; color: #fff; }
.price-band .big { font-size: 32px; font-weight: 900; line-height: 1.1; }
.price-band .was { color: #ffe3d9; }
.plain-price { font-size: 32px; font-weight: 900; color: var(--hot-text); margin-block: 6px; line-height: 1.2; }
.spark { width: 100%; height: 60px; }
.spark polyline { stroke-dasharray: 900; stroke-dashoffset: 900; animation: draw 1.4s var(--ease) .2s forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.branch { display: flex; justify-content: space-between; padding-block: 7px; border-bottom: 1px dashed var(--line); font-size: 13.5px; }
.branch:last-child { border: 0; }
.opts { display: flex; flex-wrap: wrap; gap: 7px; }
.opts button { padding: 5px 13px; border: 2px solid var(--line); border-radius: 8px; background: none; font-weight: 700; transition: transform .15s var(--spring); }
.opts button.on { border-color: var(--hot); color: var(--hot-text); }
.opts button:active { transform: scale(.93); }
.qty { display: inline-flex; align-items: center; border: 1.5px solid var(--line); border-radius: 999px; overflow: hidden; }
.qty button { width: 38px; height: 38px; border: 0; background: none; font-size: 19px; font-weight: 700; }
.qty button:hover { background: var(--surface-2); }
.qty span { min-width: 30px; text-align: center; font-weight: 800; }
.rev-bar { display: grid; grid-template-columns: 26px 1fr 34px; gap: 8px; align-items: center; font-size: 12.5px; }
.buybar { position: fixed; z-index: 55; inset-inline: 0; bottom: 56px; display: flex; gap: 8px; padding: 8px 10px; background: var(--surface); border-top: 1px solid var(--line); animation: rise .35s var(--spring); }
@keyframes rise { from { transform: translateY(100%); } }
.buybar .btn { flex: 1; }

/* المتجر */
.cover { height: 130px; border-radius: var(--r); background: var(--grad); background-size: 200% 100%; animation: flow 8s ease-in-out infinite alternate; position: relative; overflow: hidden; }
.shop { display: grid; gap: 10px; padding-inline: 12px; margin-top: -38px; position: relative; }
.shop .logo-s { width: 80px; height: 80px; font-size: 32px; border: 4px solid var(--surface); }
.scores { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin-top: 12px; }
.scores div { background: var(--surface); border-radius: var(--r); padding: 9px 12px; box-shadow: var(--shadow); }
.scores b { display: block; font-size: 22px; font-weight: 900; color: var(--hot-text); }
.tabs { position: relative; display: flex; gap: 4px; overflow-x: auto; border-bottom: 2px solid var(--line); margin-block: 14px 12px; }
.tabs button { flex: none; min-height: 42px; padding: 0 14px; border: 0; background: none; font-weight: 700; color: var(--muted); }
.tabs button.on { color: var(--hot-text); box-shadow: inset 0 -3px 0 var(--hot); }

/* السلة والدفع */
.cols { display: grid; gap: 12px; align-items: start; }
div.line { display: grid; grid-template-columns: 76px 1fr; gap: 10px; padding-block: 10px; border-bottom: 1px dashed var(--line); animation: drop .3s var(--ease); }
div.line:last-of-type { border: 0; }
.line .tile { width: 76px; height: 76px; border-radius: 8px; }
.tip { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; padding: 9px 12px; border-radius: var(--r); background: #fff3cc; color: #4a3500; font-size: 13.5px; font-weight: 700; }
.tip .link { color: #0a4fb8; }
.safe { display: flex; gap: 8px; align-items: flex-start; padding: 9px 12px; border-radius: var(--r); background: rgba(51, 162, 162, .14); font-size: 13.5px; font-weight: 700; color: var(--green); }
.safe svg { flex: none; }
.sum { display: grid; gap: 7px; }
.sum div { display: flex; justify-content: space-between; gap: 10px; }
.sum .total { border-top: 1px solid var(--line); padding-top: 9px; font-size: 21px; font-weight: 900; color: var(--hot-text); }
.opt { display: grid; grid-template-columns: auto 1fr auto; gap: 3px 10px; align-items: start; padding: 10px; border: 2px solid var(--line); border-radius: 10px; cursor: pointer; transition: border-color .15s, transform .15s var(--spring); }
.opt + .opt { margin-top: 7px; }
.opt:hover { transform: translateY(-1px); }
.opt:has(input:checked) { border-color: var(--hot); background: rgba(236, 113, 86, .06); }
.opt .fee { font-weight: 900; white-space: nowrap; }
.opt .fee.free { color: var(--green); }
.tag.best { margin-inline-start: 6px; background: var(--sun); color: #2a1600; vertical-align: 1px; }
.landed { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; padding: 8px 10px; border-radius: 9px; background: rgba(255, 210, 63, .18); font-size: 13.5px; font-weight: 700; }
.landed b { font-size: 17px; font-weight: 900; color: var(--hot-text); }
.others { display: grid; gap: 4px; }
.others a { padding-block: 6px; border-top: 1px solid var(--line); color: var(--ink); }
.others a:hover { color: var(--hot-text); }
.nearer { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 10px; padding: 8px 10px; border-radius: 9px; background: rgba(20, 176, 166, .12); font-size: 12.5px; font-weight: 700; }
.nearer > span { display: inline-flex; align-items: flex-start; gap: 5px; flex: 1 1 200px; }
.nearer > span svg { flex: none; margin-top: 2px; color: var(--green); }
.nearer .btn { min-height: 34px; padding: 0 12px; font-size: 12.5px; background: var(--grad-g); }
.fast .freeship { padding: 0 6px; border-radius: 5px; background: var(--sun); color: #2a1600; font-size: 11.5px; font-weight: 800; }
.freebar { position: relative; overflow: hidden; margin-block: 6px; padding: 8px 10px 12px; border-radius: 9px; background: rgba(255, 210, 63, .18); font-size: 13px; font-weight: 700; }
.freebar i { position: absolute; inset-inline-start: 0; bottom: 0; height: 4px; width: var(--w); background: linear-gradient(90deg, var(--sun-deep), var(--hot)); border-radius: 0 3px 3px 0; transition: width .6s var(--ease); }
.freebar.done { background: rgba(20, 176, 166, .14); color: var(--green); }
.freebar.done i { background: var(--teal); }
.freebar span { display: inline-flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.freeline { display: flex; align-items: center; gap: 5px; color: var(--green); font-weight: 700; }
.fast .near { display: inline-flex; align-items: center; gap: 2px; padding: 0 6px; border-radius: 5px; background: var(--green); color: #fff; font-size: 11.5px; }
.opt .extra { grid-column: 2 / -1; animation: drop .25s var(--ease); }
.field { display: grid; gap: 3px; font-size: 13.5px; font-weight: 700; }
.field input { min-height: 44px; border: 1.5px solid var(--line); border-radius: 8px; padding: 0 12px; background: var(--surface); font-weight: 500; }
.notice { font-size: 12.5px; font-weight: 600; color: var(--hot-text); background: rgba(236, 113, 86, .1); padding: 7px 9px; border-radius: 7px; }

/* التتبع */
.okmark { width: 74px; height: 74px; border-radius: 50%; background: var(--grad-g); color: #fff; display: grid; place-items: center; animation: pop .6s var(--spring); margin-inline: auto; }
.okmark path { stroke-dasharray: 30; stroke-dashoffset: 30; animation: draw .6s var(--ease) .3s forwards; }
.route { position: relative; height: 54px; margin-block: 10px; }
.route::before { content: ""; position: absolute; inset-inline: 0; top: 38px; height: 6px; border-radius: 3px; background: var(--surface-2); }
.route i { position: absolute; inset-inline-start: 0; top: 38px; height: 6px; width: 0; border-radius: 3px; background: var(--grad); animation: routego 1.8s var(--ease) .3s forwards; }
.route span { position: absolute; top: 2px; inset-inline-start: 0; color: var(--hot-text); animation: truck 1.8s var(--ease) .3s forwards; }
.route span svg { transform: scaleX(-1); }
@keyframes routego { to { width: var(--p); } }
@keyframes truck { to { inset-inline-start: calc(var(--p) - 26px); } }
.code { justify-self: start; display: inline-flex; gap: 6px; direction: ltr; }
.code b { width: 44px; height: 54px; display: grid; place-items: center; font-size: 28px; font-weight: 900; border-radius: 9px; background: var(--grad); color: #fff; animation: flip .5s var(--spring) both; }
.code b:nth-child(2) { animation-delay: .1s; } .code b:nth-child(3) { animation-delay: .2s; } .code b:nth-child(4) { animation-delay: .3s; }
@keyframes flip { from { transform: rotateX(90deg); opacity: 0; } }
.tl { list-style: none; margin: 0; padding: 0; }
.tl li { position: relative; padding-inline-start: 26px; padding-bottom: 12px; font-size: 13.5px; font-weight: 600; }
.tl li::before { content: ""; position: absolute; inset-inline-start: 5px; top: 6px; width: 12px; height: 12px; border-radius: 50%; background: var(--line); }
.tl li::after { content: ""; position: absolute; inset-inline-start: 10px; top: 18px; bottom: -6px; width: 2px; background: var(--line); }
.tl li:last-child::after { display: none; }
.tl li.done::before, .tl li.done::after { background: var(--green); }
.tl li.now::before { background: var(--hot); animation: pulse2 1.5s infinite; }
@keyframes pulse2 { 0% { box-shadow: 0 0 0 0 rgba(236, 113, 86, .6); } 100% { box-shadow: 0 0 0 10px rgba(236, 113, 86, 0); } }
.confetti { position: fixed; z-index: 150; top: 0; left: 0; pointer-events: none; }

/* النوافذ */
.back { position: fixed; inset: 0; z-index: 90; background: rgba(0, 0, 0, .55); animation: fade .2s; }
@keyframes fade { from { opacity: 0; } }
.sheet { position: fixed; z-index: 91; inset-inline: 0; bottom: 0; max-height: 86vh; overflow: auto; background: var(--surface); border-radius: 16px 16px 0 0; padding: 16px; animation: rise .35s var(--spring); }
.drawer { position: fixed; z-index: 91; top: 0; bottom: 0; inset-inline-end: 0; width: min(92vw, 400px); display: flex; flex-direction: column; background: var(--surface); animation: drawerin .35s var(--ease); }
@keyframes drawerin { from { transform: translateX(-100%); } }
.drawer-b { flex: 1; overflow: auto; padding: 12px; }
.drawer-f { padding: 12px; border-top: 1px solid var(--line); display: grid; gap: 8px; }
.placeo { width: 100%; display: flex; justify-content: space-between; gap: 10px; align-items: center; min-height: 54px; padding: 7px 12px; border: 2px solid var(--line); border-radius: 10px; background: none; text-align: start; transition: transform .15s var(--spring); }
.placeo + .placeo { margin-top: 7px; }
.placeo.on { border-color: var(--hot); }
.placeo:hover { transform: scale(1.015); }
.toast { position: fixed; z-index: 120; inset-inline: 12px; bottom: 134px; margin-inline: auto; max-width: 420px; display: flex; justify-content: space-between; gap: 12px; padding: 11px 14px; border-radius: 12px; background: #111; color: #fff; font-weight: 700; animation: rise .3s var(--spring); }
.toast a { color: var(--sun); font-weight: 800; }
.fly { position: fixed; z-index: 140; pointer-events: none; border-radius: 50%; background: #fff; overflow: hidden; box-shadow: 0 8px 20px rgba(0, 0, 0, .35); }
.fly img { width: 100%; height: 100%; object-fit: contain; }

/* نوع الانتقال بين الصفحات */
::view-transition-old(root) { animation: vt-out .18s ease both; }
::view-transition-new(root) { animation: vt-in .26s var(--ease) both; }
@keyframes vt-out { to { opacity: 0; transform: translateX(14px); } }
@keyframes vt-in { from { opacity: 0; transform: translateX(-22px); } }
::view-transition-group(hero-img) { animation-duration: .36s; animation-timing-function: var(--ease); }
html.theming::view-transition-old(root) { animation: none; z-index: 1; }
html.theming::view-transition-new(root) { animation: none; z-index: 2; }

@media (min-width: 640px) {
  .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .rail { grid-auto-columns: minmax(170px, 24%); }
  .benefits { grid-template-columns: repeat(4, 1fr); }
  .hero { height: 320px; }
  .blocks { grid-template-columns: repeat(2, 1fr); }
  .stores { grid-template-columns: repeat(2, 1fr); }
  .scores { grid-template-columns: repeat(4, 1fr); }
  .foot-grid { grid-template-columns: repeat(4, 1fr); }
  .wanted { grid-template-columns: 1fr auto; align-items: center; }
  .sheet { inset: auto; top: 50%; left: 50%; translate: -50% -50%; width: 480px; border-radius: 16px; animation: fade .25s; }
}
@media (min-width: 1020px) {
  body { padding-bottom: 0; }
  .tabbar, .buybar { display: none; }
  .wrap { padding-inline: 18px; }
  .head-main { grid-template-columns: auto minmax(0, 1fr) auto; gap: 20px; }
  .search { grid-column: 2; grid-row: 1; }
  .search input { padding: 10px 18px; }
  .tool { padding: 0 9px; }
  .tool .lbl { display: inline; }
  .logo { font-size: 31px; }
  .top-grid { grid-template-columns: 220px minmax(0, 1fr) 250px; }
  .hero { height: 400px; }
  .sidecats { display: block; background: var(--surface); border-radius: var(--r); padding: 6px; box-shadow: var(--shadow); }
  .sidecats a { display: flex; align-items: center; gap: 9px; padding: 7px 8px; border-radius: 7px; font-weight: 700; font-size: 14px; transition: background .15s, padding .2s var(--ease); }
  .sidecats a:hover { background: var(--surface-2); color: var(--hot-text); padding-inline-start: 14px; }
  .sidecats img { width: 28px; height: 28px; object-fit: contain; background: var(--tile); border-radius: 50%; }
  .side-col { display: grid; gap: 12px; grid-template-rows: auto 1fr; }
  .welcome { background: var(--surface); border-radius: var(--r); padding: 12px; box-shadow: var(--shadow); display: grid; gap: 8px; }
  .coupon { position: relative; overflow: hidden; display: grid; align-content: center; gap: 2px; padding: 12px; border-radius: var(--r); background: var(--grad-v); color: #fff; }
  .coupon b { font-size: 32px; font-weight: 900; }
  .coupon::after { content: ""; position: absolute; inset: 0; background: linear-gradient(115deg, transparent 40%, rgba(255, 255, 255, .4) 50%, transparent 60%); transform: translateX(100%); animation: shine 3.5s infinite; }
  @keyframes shine { 60%, 100% { transform: translateX(-100%); } }
  .rail { grid-auto-columns: calc((100% - 74px) / 6); overflow-x: auto; }
  .catrow { grid-auto-flow: row; grid-template-columns: repeat(8, 1fr); }
  .grid { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; }
  .home-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .blocks { grid-template-columns: repeat(4, 1fr); }
  .stores { grid-template-columns: repeat(4, 1fr); }
  .ll { grid-template-columns: 230px minmax(0, 1fr); }
  .filters { display: block; position: sticky; top: 130px; }
  .filter-btn { display: none; }
  .ll .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .pd { grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr) 320px; gap: 14px; align-items: start; }
  .pd-s { position: sticky; top: 130px; }
  .gal { grid-template-columns: 72px 1fr; position: sticky; top: 130px; }
  .thumbs { flex-direction: column; order: -1; overflow: visible; }
  .pd h1 { font-size: 23px; }
  .cols { grid-template-columns: minmax(0, 1fr) 340px; }
  .cols > aside { position: sticky; top: 130px; }
  .toast { inset-inline: auto 24px; bottom: 22px; width: 370px; }
  .shop { grid-template-columns: auto 1fr auto; align-items: start; }
  .shop > div { padding-top: 44px; }
}
.mob-only { display: inline; }
@media (min-width: 1020px) { .mob-only { display: none; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .rv { opacity: 1; transform: none; }
  ::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*) { animation: none !important; }
}


/* ---- الموقع الفعلي: إضافات على تصميم النموذج ---- */
@view-transition { navigation: auto; }
.page-t { font-size: 23px; font-weight: 900; margin-bottom: 8px; }
.sub-t, .sum-t { font-size: 17px; font-weight: 900; margin-bottom: 8px; }
.empty { text-align: center; padding: 44px 16px; }
.empty h1, .empty h2 { font-weight: 900; margin-bottom: 8px; }
.empty .btn { margin-top: 12px; }
.bigicon { color: var(--hot-text); display: grid; place-items: center; }
.deco-a { width: 220px; height: 220px; bottom: -90px; inset-inline-end: -50px; }
.deco-b { width: 120px; height: 120px; top: -40px; inset-inline-start: 30%; }
.ci { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--surface-2, rgba(236, 113, 86, .08)); color: var(--hot-text); }
.catc i { display: grid; place-items: center; color: var(--hot-text); }
.tool.lang { font-weight: 800; font-size: 14px; min-width: 42px; justify-content: center; }
.cityp { position: relative; flex: none; }
.cityp summary { list-style: none; cursor: pointer; }
.cityp summary::-webkit-details-marker { display: none; }
.citym { position: fixed; z-index: 70; top: 118px; inset-inline-start: max(12px, calc((100vw - 1320px) / 2)); min-width: 190px; display: grid; gap: 4px; padding: 8px; background: var(--surface); color: var(--ink, inherit); border-radius: 12px; box-shadow: 0 12px 34px rgba(0, 0, 0, .22); }
.citym button, .sub .citym button { display: block; width: 100%; padding: 9px 12px; border-radius: 9px; text-align: start; font-weight: 700; background: none; color: var(--ink); }
.citym button::after { content: none; }
.citym button:hover, .citym button.on, .sub .citym button:hover { background: rgba(51, 162, 162, .14); color: var(--ink); }
.citym button.on { font-weight: 800; }
.citym { max-height: 70vh; overflow-y: auto; }
.citym .grp { margin: 8px 12px 2px; font-size: 12px; font-weight: 800; color: var(--muted, #888); }
.pager { display: flex; justify-content: center; align-items: center; gap: 12px; margin-top: 14px; }
.tile { background: #fff; }
.qty form { display: contents; }
.optf { margin-bottom: 6px; }
.tip.err { background: rgba(236, 113, 86, .1); color: var(--hot-text); margin-bottom: 10px; }
.paybox { max-width: 520px; margin-inline: auto; }
.prose { max-width: 760px; margin-inline: auto; }
.badge[hidden] { display: none; }
body.has-buybar { padding-bottom: 128px; }
@media (min-width: 1020px) { body.has-buybar { padding-bottom: 0; } }

.phone { display: flex; gap: 6px; }
.phone input { flex: 1; min-width: 0; }
.phone select { flex: none; width: 92px; }
details.cancel summary { list-style: none; cursor: pointer; display: inline-flex; }
details.cancel summary::-webkit-details-marker { display: none; }
fieldset { border: 0; padding: 0; margin: 0; }

.field select, .phone select { min-height: 44px; padding-inline: 10px; border: 1.5px solid var(--line); border-radius: 10px; background: var(--surface); color: inherit; font: inherit; }
form.stack > .btn.s, .stack > form > .btn.s, details.cancel .btn { justify-self: start; width: auto; white-space: nowrap; }
.btn.s { white-space: nowrap; }

.thumbs-row { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.thumbs-row img { width: 72px; height: 72px; object-fit: cover; border-radius: 8px; background: var(--surface-2); }
.thread { gap: 8px; }
.msg { padding: 8px 10px; border-radius: 10px; background: var(--surface-2); }
.msg.me { background: rgba(236, 113, 86, .08); }
textarea { width: 100%; padding: 10px; border: 1.5px solid var(--line); border-radius: 10px; background: var(--surface); color: inherit; font: inherit; }

.count { font-variant-numeric: tabular-nums; font-weight: 800; }
.ending:empty { display: none; }
.ending { position: absolute; z-index: 2; bottom: auto; top: 34px; inset-inline-start: 6px; padding: 1px 6px; border-radius: 5px; background: rgba(0, 0, 0, .72); color: #fff; font-size: 11px; font-weight: 700; }

/* الاتجاه الإنجليزي: ما كتبه النموذج ثابتًا لليمين */
@keyframes ticker-ltr { to { transform: translateX(-50%); } }
@keyframes drawerin-ltr { from { transform: translateX(100%); } }
[dir="ltr"] .ticker > div { animation-name: ticker-ltr; }
[dir="ltr"] .slide .tx > * { transform: translateX(30px); }
[dir="ltr"] .slide.on .tx > * { transform: none; }
[dir="ltr"] .dots button.on::after { transform-origin: left; }
[dir="ltr"] .foot a:hover { transform: translateX(4px); }
[dir="ltr"] .drawer { animation-name: drawerin-ltr; }

.btn.disabled { opacity: .5; pointer-events: none; }
.logo img { display: block; height: 48px; margin-block: -4px; padding: 3px; border-radius: 14px; background: #fff; box-shadow: 0 2px 8px rgba(0, 0, 0, .18); width: auto; max-width: 180px; object-fit: contain; }
@media (min-width: 900px) { .logo img { height: 54px; } }
