/* الألوان الأساسية تنضبط من لوحة التحكم (المظهر) */
:root {
  --bg: #050505;
  --panel: #0f0f0f;
  --gold: #c9668c;
  --text: #f6eaee;
  --font: "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, Tahoma, Arial, sans-serif;

  /* البطاقات والخطوط مايلة للون المميز (وردي) عشان يكون الثيم أسود ووردي.
     القيم هنا للثيم الافتراضي، والمتجر يعيد حسابها من ألوان لوحة التحكم (applyTheme في db.js)
     بدون color-mix عشان تشتغل على الآيفونات القديمة */
  --bg-rgb: 5, 5, 5;
  --panel-rgb: 15, 15, 15;
  --gold-rgb: 201, 102, 140;
  --text-rgb: 246, 234, 238;
  --sale-rgb: 224, 103, 90;
  --tile: rgb(26, 20, 23);
  --tile-art: rgb(37, 25, 30);
  --line: rgba(201, 102, 140, .3);
  --muted: rgb(226, 175, 194);
  --gold-dark: rgb(171, 87, 119);
  --on-gold: #ffffff; /* لون الكلام فوق اللون المميز */
  --sale: #e0675a;
  --radius: 12px;
  --header-h: 64px;
  --nav-h: 0px;
  --announce-h: 0px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font), system-ui, -apple-system, "Segoe UI", Tahoma, sans-serif;
  line-height: 1.6;
  -webkit-tap-highlight-color: transparent;
  min-height: 100vh;
}
body.locked { overflow: hidden; }
body.no-sections main { display: none; }
body.no-sections .footer::before { content: attr(data-coming); display: block; font-size: 18px; color: var(--text); padding: 80px 0 24px; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .55; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

/* ---------- خلفية القسم ---------- */
.page-bg {
  position: fixed; inset: 0; z-index: -1;
  background-color: var(--bg); background-size: cover; background-position: center;
  transition: background-image .4s;
}
/* تعتيم: الأطراف (خلف المنتجات) غامقة جداً، والنص بدرجة «تعتيم الخلفية» من لوحة التحكم */
.page-bg::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg,
    rgba(var(--bg-rgb), .96) 0%,
    rgba(var(--bg-rgb), .88) 28%,
    rgba(var(--bg-rgb), var(--overlay, .35)) 40%,
    rgba(var(--bg-rgb), var(--overlay, .35)) 60%,
    rgba(var(--bg-rgb), .88) 72%,
    rgba(var(--bg-rgb), .96) 100%);
}
@media (max-width: 1100px) {
  .page-bg::after {
    background: linear-gradient(180deg,
      rgba(var(--bg-rgb), var(--overlay, .35)) 0%,
      rgba(var(--bg-rgb), var(--overlay, .35)) 35%,
      rgba(var(--bg-rgb), .92) 60%,
      rgba(var(--bg-rgb), .96) 100%);
  }
}

/* ---------- شريط الإعلانات ---------- */
.announce {
  position: relative; height: 34px; overflow: hidden;
  background: var(--gold); color: var(--on-gold);
  font-size: 13px; font-weight: 500; text-align: center;
}
.announce span {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  padding: 0 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  opacity: 0; transition: opacity .8s ease-in-out; /* تلاشي بين النصوص */
}
.announce span.on { opacity: 1; }

/* ---------- الهيدر ---------- */
.header {
  position: sticky; top: 0; z-index: 30;
  background: rgba(var(--panel-rgb), .94);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(var(--gold-rgb), .55);
}
/* القائمة يمين · الشعار بالنص · السلة يسار */
.header-inner {
  max-width: 1320px; margin: auto;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px;
  padding: 0 20px; height: var(--header-h);
}
.menu-btn {
  justify-self: start; width: 44px; height: 44px; border-radius: 50%;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px;
  border: 1px solid var(--line); transition: .2s;
}
.menu-btn:hover { border-color: var(--gold); }
.menu-btn span { display: block; width: 18px; height: 2px; border-radius: 2px; background: currentColor; }
.logo {
  justify-self: center; display: flex; align-items: center; justify-content: center;
  font-size: 24px; font-weight: 700; color: var(--gold); letter-spacing: .5px; white-space: nowrap;
}
.logo img { height: 46px; width: auto; max-width: 180px; object-fit: contain; }
.header-actions { justify-self: end; display: flex; align-items: center; gap: 8px; }

/* درج الأقسام */
.menu-drawer {
  position: fixed; top: 0; bottom: 0; right: 0; z-index: 60;
  width: min(360px, 88vw); background: var(--panel);
  display: flex; flex-direction: column;
  transform: translateX(100%); transition: transform .3s;
}
.menu-drawer.open { transform: none; }
.cat-nav { display: flex; flex-direction: column; gap: 6px; padding: 12px; overflow-y: auto; }
.cat-nav button {
  display: flex; align-items: center; gap: 14px; width: 100%; text-align: start;
  padding: 8px; border-radius: 14px; border: 1px solid transparent; transition: .2s;
}
.cat-nav button:hover { background: var(--tile); }
.cat-nav button.active { border-color: var(--gold); background: var(--tile); }
.nav-thumb { flex: 0 0 56px; height: 56px; border-radius: 10px; overflow: hidden; background: var(--tile-art); }
.nav-thumb img { width: 100%; height: 100%; object-fit: cover; }
.nav-text { display: flex; flex-direction: column; min-width: 0; }
.nav-text b { font-size: 16px; font-weight: 500; }
.nav-text small { color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cat-nav button.active .nav-text b { color: var(--gold); }
.cart-btn, .lang-btn {
  /* نفس شكل زر الثلاث شرطات: دائرة بأيقونة بس، والعدد شارة صغيرة على الزاوية */
  position: relative; width: 44px; height: 44px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--line); transition: .2s;
}
.cart-btn:hover, .lang-btn:hover { border-color: var(--gold); color: var(--gold); }
.cart-btn .badge { position: absolute; top: -4px; inset-inline-end: -4px; }
.badge {
  min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px;
  background: var(--gold); color: var(--on-gold); font-size: 12px; font-weight: 700;
  display: inline-flex; align-items: center; justify-content: center;
}
.badge.bump { animation: bump .35s; }
@keyframes bump { 50% { transform: scale(1.35); } }

/* ---------- العرض الرئيسي ----------
   صف الأزرار فوق، وتحته: عمودين منتجات | صورة القسم المربعة | عمودين منتجات */
.showcase {
  --hero-size: min(520px, 34vw);
  max-width: 1400px; margin: 20px auto 0; padding: 0 20px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) var(--hero-size) minmax(0, 1fr);
  column-gap: 24px; row-gap: 20px; align-items: start;
}
.sec-head { grid-column: 1 / -1; grid-row: 1; }
.subs { grid-column: 1 / -1; grid-row: 2; }
.products-right { grid-column: 1; grid-row: 3; }
.hero { grid-column: 2; grid-row: 3; }
.products-left { grid-column: 3; grid-row: 3; }

/* اسم القسم فوق الأزرار */
.sec-head { text-align: center; margin-bottom: -6px; }
.sec-head h1 { font-size: 30px; font-weight: 400; line-height: 1.3; letter-spacing: .3px; }
.sec-head h1::after {
  content: ""; display: block; width: 48px; height: 2px; margin: 8px auto 0; border-radius: 2px; background: var(--gold);
}
.sec-head p { color: var(--muted); font-size: 14px; margin-top: 6px; }
.products { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; align-content: start; }

.tile {
  background: var(--tile); border-radius: var(--radius); padding: 8px;
  border: 1px solid rgba(var(--gold-rgb), .18); text-align: center; transition: .2s;
  display: flex; flex-direction: column; gap: 6px; width: 100%;
}
.tile:hover { border-color: var(--gold); transform: translateY(-2px); }
.tile:hover .art img { transform: scale(1.05); }
.tile.is-out .art img { filter: grayscale(.8); opacity: .6; }
.art {
  /* صور المنتجات طولية 4:5 (مثل 1122×1402) عشان ما تنقص */
  position: relative; aspect-ratio: 4 / 5; border-radius: 8px; background: var(--tile-art);
  display: flex; align-items: center; justify-content: center; overflow: hidden;
}
.art img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.ph {
  width: 100%; height: 100%; display: flex; align-items: center; justify-content: center;
  font-size: 42px; font-weight: 700; color: var(--gold); background: var(--tile-art);
}
.tags { position: absolute; top: 8px; inset-inline-start: 8px; display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
.tag {
  background: var(--gold); color: var(--on-gold); font-size: 11px; font-weight: 700;
  padding: 2px 8px; border-radius: 6px; line-height: 1.6;
}
.tag-sale { background: var(--sale); color: #fff; }
.tag-out { background: #111; color: #fff; }
.tile .name { font-size: 14px; line-height: 1.4; padding: 0 2px; }
.prices { display: flex; gap: 8px; justify-content: center; align-items: baseline; flex-wrap: wrap; }
.price { color: var(--gold); font-size: 14px; font-weight: 700; }
.was { color: var(--muted); font-size: 12px; }
.empty { grid-column: 1 / -1; text-align: center; color: var(--muted); padding: 40px 0; }

/* المساحة اللي بالنص فاضية: تبان منها صورة خلفية القسم */
.hero { position: sticky; top: calc(var(--header-h) + 20px); pointer-events: none; }
.hero:not(:has(.wardrobe, .scene)) { aspect-ratio: 1 / 1; }

/* ---------- الخزانة اللي بالنص ---------- */
.wardrobe {
  --wood: #1b1412; --wood-hi: #2b201c; --wood-lo: #110c0b;
  position: relative; margin: 6px auto 0;
  width: min(84%, calc((100vh - var(--header-h) - 280px) * .72));
}
.wd-crown {
  height: 16px; margin: 0 -5%; border-radius: 6px 6px 2px 2px;
  background: linear-gradient(var(--wood-hi), var(--wood));
  box-shadow: 0 3px 6px rgba(0, 0, 0, .6);
  border-bottom: 2px solid rgba(var(--gold-rgb), .55);
}
.wd-frame {
  display: grid; grid-template-columns: 14% 1fr 14%;
  aspect-ratio: 3 / 4; padding: 10px 6px;
  background: linear-gradient(90deg, var(--wood-lo), var(--wood) 20%, var(--wood) 80%, var(--wood-lo));
}
.wd-inside {
  position: relative; overflow: hidden; border-radius: 2px; background: #0b0908;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, .8);
}
.wd-inside img { width: 100%; height: 100%; object-fit: cover; filter: brightness(.88) saturate(.92); }
/* ظل داخلي + إضاءة دافية من فوق */
.wd-inside::after {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(ellipse 90% 55% at 50% 0%, rgba(255, 214, 172, .28), transparent 70%);
  box-shadow: inset 0 0 50px 12px rgba(0, 0, 0, .8);
}
.wd-led {
  position: absolute; top: 0; left: 6%; right: 6%; height: 3px; z-index: 1; border-radius: 0 0 3px 3px;
  background: #ffe9cf; box-shadow: 0 0 16px 5px rgba(255, 222, 184, .5);
}
/* الأبواب مفتوحة بزاوية */
.wd-door { position: relative; background: linear-gradient(90deg, var(--wood-hi), var(--wood)); }
.wd-door-r { clip-path: polygon(0 0, 100% 5%, 100% 95%, 0 100%); }
.wd-door-l { clip-path: polygon(0 5%, 100% 0, 100% 100%, 0 95%); background: linear-gradient(90deg, var(--wood), var(--wood-hi)); }
.wd-door i { position: absolute; top: 46%; width: 3px; height: 13%; border-radius: 2px; background: var(--gold); }
.wd-door-r i { left: 22%; }
.wd-door-l i { right: 22%; }
.wd-base { position: relative; height: 14px; margin: 0 -3%; background: linear-gradient(var(--wood), var(--wood-lo)); border-radius: 0 0 3px 3px; }
.wd-base b { position: absolute; bottom: -10px; width: 9px; height: 10px; background: var(--wood-lo); border-radius: 0 0 2px 2px; }
.wd-base b:first-child { right: 7%; }
.wd-base b:last-child { left: 7%; }
.wd-shadow { height: 26px; margin: 8px 6% 0; background: radial-gradient(ellipse at center, rgba(0, 0, 0, .75), transparent 70%); }
/* ---------- صورة جاهزة بالنص (فيها الخزانة) ---------- */
.products { position: relative; z-index: 2; }
.hero { z-index: 1; }
.hero:has(.scene) { aspect-ratio: auto; }
.scene {
  /* أعرض من عمود الوسط وبنصه بالضبط (يشتغل مع اتجاه اليمين لليسار) */
  width: var(--scene, 206%);
  margin-inline-start: calc((100% - var(--scene, 206%)) / 2);
  -webkit-mask-image: radial-gradient(ellipse 50% 50% at 50% 50%, #000 62%, transparent 100%);
  mask-image: radial-gradient(ellipse 50% 50% at 50% 50%, #000 62%, transparent 100%);
}
.scene img { width: 100%; height: auto; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

/* وضوح الكلام فوق صورة الخلفية */
.sub-btn:not(.active) {
  background: rgba(var(--bg-rgb), .7);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
}
.strip-head h2, .footer { text-shadow: 0 1px 8px rgba(0, 0, 0, .8); }

/* أزرار القسم: صف أفقي فوق المنتجات */
.subs {
  display: flex; gap: 8px; justify-content: center;
  overflow-x: auto; scrollbar-width: none;
}
.subs::-webkit-scrollbar { display: none; }
.sub-btn {
  flex: 0 0 auto; display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 16px; border-radius: 999px; border: 1px solid var(--line);
  font-size: 14px; white-space: nowrap; transition: .2s;
}
.sub-btn:hover { border-color: var(--gold); }
.sub-btn small { color: var(--muted); font-size: 12px; }
.sub-btn.active { background: var(--gold); color: var(--on-gold); border-color: var(--gold); }
.sub-btn.active small { color: var(--on-gold); }

/* ---------- الشريط السفلي ---------- */
.strip { max-width: 1320px; margin: 40px auto 0; padding: 0 20px; }
.strip-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.strip-head h2 { font-size: 20px; font-weight: 500; }
.strip-arrows { display: flex; gap: 8px; }
.strip-arrows button { width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line); font-size: 18px; }
.strip-arrows button:hover { border-color: var(--gold); color: var(--gold); }
.strip-track {
  display: flex; gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory;
  scroll-behavior: smooth; scrollbar-width: none; padding-bottom: 6px;
}
.strip-track::-webkit-scrollbar { display: none; }
.strip-track .tile { flex: 0 0 180px; scroll-snap-align: start; }

.footer { text-align: center; color: var(--muted); font-size: 13px; padding: 40px 20px 32px; margin-top: 40px; border-top: 1px solid var(--line); }
/* أيقونات التواصل (دائرية بسيطة) وروابط الصفحات الرسمية */
.footer-social { display: flex; justify-content: center; gap: 12px; margin-bottom: 18px; }
.footer-social:empty { display: none; }
.social-btn {
  width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line); color: var(--text);
  display: flex; align-items: center; justify-content: center; transition: .2s;
}
.social-btn:hover { border-color: var(--gold); color: var(--gold); }
.social-btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.footer-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 18px; margin-bottom: 12px; }
.footer-links button { color: var(--text); font-size: 13px; opacity: .85; }
.footer-links button:hover { color: var(--gold); opacity: 1; }
.footer-city { margin-bottom: 6px; }
.footer-city:empty { display: none; }

/* ---------- تأثيرات الانتقال بين الأقسام ---------- */
#stage { transition: opacity .18s, transform .18s, filter .18s; }
#stage.fx-out { opacity: 0; }
.fx-in { animation-duration: .55s; animation-timing-function: cubic-bezier(.2, .7, .2, 1); animation-fill-mode: both; }
.fx-fade  { animation-name: fx-fade; }
.fx-slide { animation-name: fx-slide; }
.fx-rise  { animation-name: fx-rise; }
.fx-zoom  { animation-name: fx-zoom; }
.fx-flip  { animation-name: fx-flip; transform-origin: center top; }
.fx-blur  { animation-name: fx-blur; }
@keyframes fx-fade  { from { opacity: 0; } }
@keyframes fx-slide { from { opacity: 0; transform: translateX(-60px); } }
@keyframes fx-rise  { from { opacity: 0; transform: translateY(40px); } }
@keyframes fx-zoom  { from { opacity: 0; transform: scale(.94); } }
@keyframes fx-flip  { from { opacity: 0; transform: perspective(1200px) rotateX(-12deg); } }
@keyframes fx-blur  { from { opacity: 0; filter: blur(12px); } }
@media (prefers-reduced-motion: reduce) { .fx-in { animation: none; } }

/* ---------- نافذة المنتج ---------- */
.overlay {
  position: fixed; inset: 0; z-index: 50; background: rgba(0, 0, 0, .6);
  display: flex; align-items: center; justify-content: center; padding: 20px;
  opacity: 0; pointer-events: none; transition: opacity .25s;
}
.overlay.open { opacity: 1; pointer-events: auto; }
.modal {
  position: relative; background: var(--panel); border-radius: 18px;
  width: 100%; max-width: 880px; max-height: 90vh; overflow: auto;
  transform: translateY(20px); transition: transform .25s;
}
.overlay.open .modal { transform: none; }
.modal-body { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; padding: 28px; }
.gallery { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.gallery .art { border-radius: 14px; }
.thumbs { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; }
.thumb { flex: 0 0 64px; height: 64px; border-radius: 8px; overflow: hidden; border: 2px solid transparent; opacity: .7; }
.thumb.active { border-color: var(--gold); opacity: 1; }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.modal-info { display: flex; flex-direction: column; gap: 14px; }
.modal-info .crumb { color: var(--muted); font-size: 13px; }
.modal-info h2 { font-size: 24px; font-weight: 700; line-height: 1.3; }
.prices.big { justify-content: flex-start; }
.prices.big .price { font-size: 22px; }
.prices.big .was { font-size: 15px; }
.offer-note {
  align-self: flex-start; font-size: 13px; padding: 4px 10px; border-radius: 6px;
  background: rgba(var(--sale-rgb), .18); color: var(--sale);
}
.low-stock { color: var(--sale); font-size: 13px; }
.modal-info .desc { color: var(--muted); font-size: 15px; }
.opt-label { font-size: 14px; color: var(--muted); margin-bottom: 8px; }
.sizes { display: flex; flex-wrap: wrap; gap: 8px; }
.size { min-width: 48px; height: 44px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--line); font-size: 14px; }
.size.active { border-color: var(--gold); color: var(--gold); }
.opt-error { color: #f09595; font-size: 13px; margin-top: 6px; min-height: 1em; }
.qty { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 10px; }
.qty button { width: 44px; height: 44px; font-size: 18px; }
.qty span { min-width: 32px; text-align: center; }
.modal-actions { display: flex; gap: 12px; align-items: center; margin-top: auto; }
.btn-primary {
  flex: 1; min-height: 50px; padding: 0 20px; border-radius: 12px;
  background: var(--gold); color: var(--on-gold); font-weight: 700; font-size: 16px; transition: .2s;
}
.btn-primary:hover:not(:disabled) { background: var(--gold-dark); }
.close {
  position: absolute; top: 12px; inset-inline-end: 12px; z-index: 2;
  width: 40px; height: 40px; border-radius: 50%; font-size: 24px; line-height: 1;
  background: rgba(0, 0, 0, .45); color: #fff;
}

/* ---------- السلة ---------- */
.drawer {
  position: fixed; top: 0; bottom: 0; left: 0; z-index: 60;
  width: min(400px, 100%); background: var(--panel);
  display: flex; flex-direction: column;
  transform: translateX(-100%); transition: transform .3s;
}
.drawer.open { transform: none; }
.drawer-head { position: relative; display: flex; align-items: center; padding: 18px 20px; border-bottom: 1px solid var(--line); }
.drawer-head h2 { font-size: 20px; font-weight: 500; }
.drawer-head .close { top: 50%; transform: translateY(-50%); }
.drawer-items { flex: 1; overflow-y: auto; padding: 12px 20px; }
.cart-item {
  display: grid; grid-template-columns: 72px 1fr auto; gap: 12px; align-items: center;
  padding: 12px 0; border-bottom: 1px solid var(--line);
}
.cart-item .art { width: 72px; }
.cart-item .name { font-size: 14px; }
.cart-item .meta { color: var(--muted); font-size: 12px; }
.cart-item .qty button { width: 34px; height: 34px; font-size: 16px; }
.cart-item .remove { color: var(--muted); font-size: 12px; text-decoration: underline; margin-top: 4px; }
.cart-item .end { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.drawer-foot {
  padding: 16px 20px calc(16px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 12px;
}
.total { display: flex; justify-content: space-between; font-size: 16px; }
.total strong { color: var(--gold); }
.cart-empty { text-align: center; color: var(--muted); padding: 60px 0; }

/* نموذج إتمام الطلب (بدل محتوى السلة) */
.checkout-view { display: none; flex: 1; overflow-y: auto; padding: 14px 20px calc(20px + env(safe-area-inset-bottom)); }
.drawer.is-checkout .checkout-view { display: block; }
.drawer.is-checkout .drawer-items, .drawer.is-checkout .drawer-foot { display: none; }
.checkout { display: flex; flex-direction: column; gap: 12px; }
.checkout h3 { font-size: 18px; font-weight: 500; }
.checkout-back { align-self: flex-start; color: var(--muted); font-size: 13px; text-decoration: underline; }
.cf { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--muted); }
.cf input, .cf select, .cf textarea {
  width: 100%; font: inherit; font-size: 16px; color: var(--text); background: var(--tile);
  border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; resize: vertical;
}
.cf input:focus, .cf select:focus, .cf textarea:focus { outline: none; border-color: var(--gold); }
.cf .invalid { border-color: var(--sale); }
.cf em { font-style: normal; color: var(--sale); font-size: 12px; min-height: 0; }
.cf em:empty { display: none; }
.pay-opts { display: flex; gap: 8px; flex-wrap: wrap; }
.pay { flex: 1; min-width: 130px; display: flex; align-items: center; gap: 8px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; color: var(--text); cursor: pointer; }
.pay:has(input:checked) { border-color: var(--gold); background: rgba(var(--gold-rgb), .12); }
.pay input { accent-color: var(--gold); width: auto; flex: 0 0 auto; padding: 0; margin: 0; border: 0; background: none; } /* زر الاختيار ما ياخذ عرض الخانة كاملة */
.pay b { font-weight: 500; font-size: 14px; }
.checkout .btn-primary { flex: none; }
.cf-note { color: var(--muted); font-size: 12px; text-align: center; }

/* نافذة الصفحات الرسمية */
.page-modal { max-width: 620px; }
.page-body { padding: 32px 28px 28px; display: flex; flex-direction: column; gap: 12px; line-height: 1.9; }
.page-body h2 { font-size: 22px; font-weight: 500; padding-inline-end: 40px; }
.page-body p { color: rgba(var(--text-rgb), .85); font-size: 15px; }

.toast {
  position: fixed; z-index: 70; bottom: calc(24px + env(safe-area-inset-bottom)); left: 50%;
  transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
  background: var(--text); color: var(--bg); padding: 12px 20px; border-radius: 999px;
  font-size: 14px; font-weight: 500; transition: .25s; white-space: nowrap;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- اللون المميز (ثابت بدون لمعة) ---------- */
.btn-primary:hover:not(:disabled) { filter: brightness(1.1); }
.price, .total strong, .logo:not(:has(img)), .cat-nav button.active .nav-text b { color: var(--gold); }


.menu-btn:hover { color: var(--gold); }
.cat-nav button.active, .tile:hover { border-color: rgba(var(--gold-rgb), .7); }

/* ---------- الصفحة الرئيسية: بطاقات الأقسام ---------- */
body.is-home #stage { display: none; }
body.no-sections .home { display: none; }
/* دخول وخروج الصفحة الرئيسية بتلاشي بطيء */
.home.entering { animation: home-in 1.4s cubic-bezier(.16, 1, .3, 1); }
@keyframes home-in { from { opacity: 0; transform: scale(.98); } }
.nav-home { display: flex; align-items: center; justify-content: center; color: var(--gold); }
.home {
  min-height: calc(100svh - var(--header-h) - var(--announce-h));
  display: flex; flex-direction: column; justify-content: center;
  padding: 28px 0 20px; overflow: hidden;
  --card-h: min(58svh, 580px);
  --card-w: calc(var(--card-h) * .68);
}
.deck {
  position: relative; height: var(--card-h);
  touch-action: pan-y; user-select: none; -webkit-user-select: none; cursor: grab;
  isolation: isolate; /* ترتيب البطاقات يبقى داخل الشريط (تحت تأثيرات الدخول) */
}
.deck.dragging { cursor: grabbing; }
.card {
  position: absolute; top: 0; left: 50%; width: var(--card-w); height: 100%;
  margin-left: calc(var(--card-w) / -2);
  border-radius: 22px; overflow: hidden; background: var(--tile-art);
  border: 1px solid rgba(var(--gold-rgb), .22);
  will-change: transform, opacity; text-align: center; -webkit-user-drag: none;
}
.card.is-active { border-color: rgba(var(--gold-rgb), .55); }
/* صورة البطاقة فوق خلفية بلون الثيم (أسود مع توهّج وردي) */
.card { background: radial-gradient(ellipse 80% 62% at 50% 40%, rgba(var(--gold-rgb), .24), transparent 72%), var(--tile-art); }
.card-media { position: absolute; inset: 0 -12%; will-change: transform; }
.card-media img { width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
/* صورة عادية: أطرافها تذوب في لون الثيم */
.card-media img:not(.cutout):not(.card-photo) {
  -webkit-mask-image: radial-gradient(ellipse 72% 70% at 50% 42%, #000 50%, transparent 100%);
  mask-image: radial-gradient(ellipse 72% 70% at 50% 42%, #000 50%, transparent 100%);
}
/* صورة بدون خلفية (PNG/WebP شفاف): الموديل واقف على لون الثيم */
/* صورة بدون خلفية: مجهّزة بقياس البطاقة (المنتج كامل فوق مساحة الكلام)، فتعبّي البطاقة بالضبط بدون قص
   (صندوق الصورة أعرض من البطاقة بـ 24% عشان حركة الجنب، فالبطاقة نفسها من 9.68% لين 90.32%) */
/* صورة البطاقة من لوحة التحكم: تعبّي البطاقة نفسها (مو الصندوق الأعرض) وتنعرض كاملة بخلفيتها */
.card-media img.card-photo { position: absolute; top: 0; left: 9.68%; width: 80.65%; height: 100%; object-fit: cover; object-position: 50% 50%; }
.card-media img.cutout { position: absolute; top: 0; left: 9.68%; width: 80.65%; height: 100%; object-fit: contain; object-position: 50% 50%; }
/* تكبير بطيء جداً للصورة في البطاقة الحالية */
.card.is-active .card-media img { animation: kenburns 26s ease-in-out infinite alternate; transform-origin: 50% 70%; }
@keyframes kenburns { from { transform: scale(1); } to { transform: scale(1.08); } }
.card-shade { position: absolute; inset: 0; z-index: 1; background: var(--bg); opacity: 0; pointer-events: none; }
/* اسم القسم ووصفه وزرّه تحت البطاقة (مو فوق الصورة)، ويتغيرون مع البطاقة اللي بالنص */
.deck-info { display: flex; flex-direction: column; align-items: center; text-align: center; margin-top: 22px; min-height: 124px; padding: 0 16px; }
.deck-info h2 { font-size: 30px; font-weight: 400; line-height: 1.3; }
.deck-info p { font-size: 14px; color: rgba(var(--text-rgb), .7); margin-top: 2px; }
.deck-info.swap > * { animation: info-in 1.1s cubic-bezier(.16, 1, .3, 1) backwards; }
.deck-info.swap > :nth-child(2) { animation-delay: .1s; }
.deck-info.swap > :nth-child(3) { animation-delay: .2s; }
@keyframes info-in { from { opacity: 0; transform: translateY(10px); } }
.card-cta {
  display: inline-block; margin-top: 14px; padding: 10px 28px; border-radius: 999px;
  background: var(--gold); color: var(--on-gold); font-size: 14px; font-weight: 500;
}
.deck-nav { display: flex; align-items: center; justify-content: center; gap: 18px; margin-top: 14px; }
.deck-arrow {
  width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line);
  display: flex; align-items: center; justify-content: center; transition: .3s;
}
.deck-arrow:hover { border-color: var(--gold); color: var(--gold); }
[dir=ltr] .deck-arrow svg { transform: scaleX(-1); }
.deck-dots { display: flex; gap: 8px; }
.deck-dots button {
  width: 7px; height: 7px; border-radius: 999px; background: var(--line); padding: 0;
  transition: width 1.2s cubic-bezier(.16, 1, .3, 1), background-color 1.2s;
}
.deck-dots button.active { width: 24px; background: var(--gold); }
.deck-hint { text-align: center; color: var(--muted); font-size: 12px; margin-top: 10px; }
@media (hover: hover) and (pointer: fine) { .deck-hint { display: none; } }

/* المنتجات تظهر بتلاشي ناعم وبطيء جداً (ultra fade) */
.ultra-fade .tile { animation: ultra-fade 1.2s cubic-bezier(.25, .1, .25, 1) backwards; animation-delay: var(--fade-base, 0s); }
.ultra-fade .products .tile:nth-child(2) { animation-delay: calc(var(--fade-base, 0s) + .07s); }
.ultra-fade .products .tile:nth-child(3) { animation-delay: calc(var(--fade-base, 0s) + .14s); }
.ultra-fade .products .tile:nth-child(4) { animation-delay: calc(var(--fade-base, 0s) + .21s); }
.ultra-fade .products .tile:nth-child(5) { animation-delay: calc(var(--fade-base, 0s) + .28s); }
.ultra-fade .products .tile:nth-child(n+6) { animation-delay: calc(var(--fade-base, 0s) + .35s); }
.ultra-fade .products-left .tile:first-child { animation-delay: calc(var(--fade-base, 0s) + .035s); }
@keyframes ultra-fade { from { opacity: 0; filter: blur(3px); } to { opacity: 1; filter: blur(0); } }

/* خلفية خفيفة ورا صور المنتجات المقصوصة (بدون خلفية) */
.art { background: radial-gradient(ellipse 70% 60% at 50% 45%, rgba(var(--gold-rgb), .16), transparent 75%), var(--tile-art); }

/* ---------- الإنجليزي (من اليسار لليمين) ---------- */
[dir=ltr] .menu-drawer { right: auto; left: 0; transform: translateX(-100%); }
[dir=ltr] .drawer { left: auto; right: 0; transform: translateX(100%); }
[dir=ltr] .menu-drawer.open, [dir=ltr] .drawer.open { transform: none; }
[dir=ltr] .wardrobe { direction: rtl; } /* الخزانة نفس الشكل باللغتين */

/* ---------- تابلت: الصورة فوق، والمنتجات تحتها (عمودين + عمودين) ---------- */
@media (max-width: 1100px) {
  .showcase { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .hero { grid-column: 1 / -1; grid-row: 3; position: static; }
  .hero:not(:has(.wardrobe, .scene)) { aspect-ratio: 16 / 7; }
  .wardrobe { width: min(46%, 340px); }
  .hero:has(.scene) { overflow: hidden; }
  .scene { --scene: 100% !important; width: min(100%, 760px); margin-inline: auto; }
  .products-right { grid-column: 1; grid-row: 4; }
  .products-left { grid-column: 2; grid-row: 4; }
}

/* ---------- موبايل ---------- */
@media (max-width: 760px) {
  :root { --header-h: 56px; }

  .announce { height: 30px; font-size: 12px; }
  .header-inner { padding: 0 12px; gap: 8px; }
  .menu-btn { width: 40px; height: 40px; }
  .logo { font-size: 20px; }
  .logo img { height: 36px; max-width: 130px; }
  .cart-btn, .lang-btn { width: 40px; height: 40px; }

  .showcase { display: flex; flex-direction: column; align-items: stretch; gap: 0; margin-top: 0; padding: 0; }
  .showcase > * { min-width: 0; }

  /* المساحة الفاضية أول شي (تبان منها الخلفية) */
  .hero { order: 1; position: static; padding: 14px 0 6px; }
  .hero:not(:has(.wardrobe, .scene)) { aspect-ratio: 4 / 3; }
  .wardrobe { width: min(66%, 270px); }
  .hero:has(.scene) { padding: 0; }
  .scene { --scene: 150% !important; width: 150%; margin-inline-start: -25%; }

  /* أزرار القسم كشريط ثابت تحت الهيدر */
  .sec-head { order: 2; margin: 0; padding: 4px 12px 12px; }
  .sec-head h1 { font-size: 24px; }
  .sec-head p { font-size: 13px; margin-top: 4px; }
  .subs {
    order: 3; justify-content: flex-start;
    position: sticky; top: var(--header-h); z-index: 20;
    background: rgba(var(--bg-rgb), .94);
    -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
    padding: 10px 12px; border-bottom: 1px solid var(--line);
  }

  /* النصين ورا بعض = شبكة وحدة بعمودين */
  .products { gap: 10px; }
  .products-right { order: 4; padding: 14px 12px 0; }
  .products-left { order: 5; padding: 10px 12px 0; }
  .tile { padding: 6px; }
  .tile:hover { transform: none; }
  .tile:hover .art img { transform: none; }
  .tile .name { font-size: 13px; }

  .strip { margin-top: 28px; padding: 0 12px; }
  .strip-head h2 { font-size: 18px; }
  .strip-arrows { display: none; }
  .strip-track { gap: 10px; margin: 0 -12px; padding: 0 12px 6px; scroll-padding: 0 12px; }
  .strip-track .tile { flex-basis: 42%; }

  .fx-slide { animation-name: fx-rise; }

  .home { padding: 18px 0 14px; --card-w: 74vw; --card-h: min(calc(74vw * 1.5), 54svh); }
  .card { border-radius: 18px; }
  .deck-info { margin-top: 16px; min-height: 110px; }
  .deck-info h2 { font-size: 26px; }
  .deck-info p { font-size: 13px; }
  .deck-nav { margin-top: 10px; }
  .deck-arrow { width: 40px; height: 40px; }

  /* نافذة المنتج تصير ورقة من تحت */
  .overlay { align-items: flex-end; padding: 0; }
  .modal { max-width: none; max-height: 92vh; border-radius: 20px 20px 0 0; transform: translateY(100%); }
  .modal::before {
    content: ""; display: block; width: 40px; height: 4px; border-radius: 2px;
    background: var(--line); margin: 10px auto 0;
  }
  .modal-body { grid-template-columns: 1fr; gap: 16px; padding: 12px 16px 0; }
  .gallery .art { aspect-ratio: 4 / 5; max-height: 62vh; margin-inline: auto; }
  .modal-info h2 { font-size: 20px; }
  .modal-actions {
    position: sticky; bottom: 0; background: var(--panel);
    margin: 0 -16px; padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
    border-top: 1px solid var(--line);
  }
  .close { top: 16px; }

  .drawer { width: 100%; }
  .toast { bottom: auto; top: calc(12px + env(safe-area-inset-top)); transform: translate(-50%, -20px); }
}

/* ---------- زر البحث (جنب القائمة) ---------- */
.header-start { justify-self: start; display: flex; align-items: center; gap: 8px; }
.search-btn {
  width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line);
  display: flex; align-items: center; justify-content: center; transition: .2s;
}
.search-btn:hover { border-color: var(--gold); color: var(--gold); }

/* ---------- نافذة البحث ---------- */
.overlay.search-overlay {
  align-items: stretch; justify-content: center; padding: 0;
  background: rgba(var(--bg-rgb), .97);
}
.search-panel { width: 100%; max-width: 1100px; display: flex; flex-direction: column; min-height: 0; }
.search-bar {
  position: relative; display: flex; align-items: center; gap: 10px;
  margin: 18px 20px 6px; padding: 0 6px 0 16px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--tile);
}
[dir=rtl] .search-bar { padding: 0 16px 0 6px; }
.search-bar svg { flex: 0 0 auto; color: var(--muted); }
.search-bar input {
  flex: 1; min-width: 0; height: 50px; font: inherit; font-size: 16px; color: var(--text);
  background: none; border: 0; outline: none;
}
.search-bar input::-webkit-search-cancel-button { display: none; }
.search-bar .close { position: static; flex: 0 0 auto; background: none; color: var(--text); }
.search-results { flex: 1; overflow-y: auto; padding: 8px 20px calc(24px + env(safe-area-inset-bottom)); }
.search-hint, .search-count { text-align: center; color: var(--muted); font-size: 14px; padding: 18px 0; }
.search-count { padding: 6px 0 14px; font-size: 13px; }
.search-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 14px; }

/* ---------- ترتيب المنتجات (تحت اسم القسم) ---------- */
.sort {
  position: relative; display: inline-flex; align-items: center; gap: 6px; margin-top: 10px;
  font-size: 13px; color: var(--muted);
}
.sort select {
  appearance: none; -webkit-appearance: none; font: inherit; font-size: 13px; color: var(--text);
  background: rgba(var(--bg-rgb), .7); border: 1px solid var(--line); border-radius: 999px;
  padding: 5px 30px 5px 14px; cursor: pointer;
}
[dir=rtl] .sort select { padding: 5px 14px 5px 30px; }
.sort::after {
  content: ""; position: absolute; inset-inline-end: 12px; top: 50%; width: 6px; height: 6px; margin-top: -5px;
  border: solid var(--muted); border-width: 0 1.5px 1.5px 0; transform: rotate(45deg); pointer-events: none;
}
.sort select:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.sort option { background: var(--panel); color: var(--text); }

/* ---------- مشاركة المنتج ---------- */
.crumb-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.share-btn {
  flex: 0 0 auto; width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--line);
  display: flex; align-items: center; justify-content: center; transition: .2s;
}
.share-btn:hover { border-color: var(--gold); color: var(--gold); }
@media (min-width: 761px) { .crumb-row { padding-inline-end: 44px; } } /* بعيد عن زر الإغلاق */

/* ---------- زر واتساب العائم ---------- */
.wa-float {
  position: fixed; z-index: 40; bottom: calc(20px + env(safe-area-inset-bottom)); inset-inline-end: 20px;
  width: 56px; height: 56px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--gold); color: var(--on-gold);
  box-shadow: 0 6px 20px rgba(0, 0, 0, .45); transition: transform .2s, filter .2s;
}
.wa-float:hover { transform: translateY(-2px); filter: brightness(1.08); }
body.locked .wa-float { display: none; }

/* ---------- بعد إرسال الطلب ---------- */
.order-done { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 12px; padding: 36px 4px 12px; }
.done-icon {
  width: 64px; height: 64px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  background: rgba(var(--gold-rgb), .16); color: var(--gold); margin-bottom: 4px;
}
.order-done h3 { font-size: 22px; font-weight: 500; }
.order-done p { color: var(--muted); font-size: 14px; line-height: 1.8; margin-bottom: 8px; }
.order-done .btn-primary { flex: none; width: 100%; }
.done-link { color: var(--text); font-size: 13px; text-decoration: underline; opacity: .85; }
.order-done .checkout-back { align-self: center; }

@media (max-width: 760px) {
  .header-start { gap: 6px; }
  .search-btn { width: 40px; height: 40px; }
  .search-bar { margin: 12px 12px 4px; }
  .search-results { padding: 6px 12px calc(20px + env(safe-area-inset-bottom)); }
  .search-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .wa-float { width: 52px; height: 52px; bottom: calc(16px + env(safe-area-inset-bottom)); inset-inline-end: 14px; }
  .sort { margin-top: 8px; }
}

/* ---------- دليل المقاسات (ينفتح فوق نافذة المنتج) ---------- */
#pageOverlay { z-index: 55; }
.opt-label { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.guide-link { color: var(--gold); font-size: 13px; text-decoration: underline; text-underline-offset: 3px; }
.guide-wrap { overflow-x: auto; margin: 4px 0; }
.guide-table { width: 100%; border-collapse: collapse; font-size: 14px; text-align: center; }
.guide-table th, .guide-table td { padding: 10px 8px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.guide-table thead th { color: var(--muted); font-weight: 500; font-size: 13px; }
.guide-table tbody th { color: var(--gold); font-weight: 700; }

/* ---------- الإظهار والإخفاء (لوحة التحكم): body.hide-<العنصر> ---------- */
.hide-search .search-btn, .hide-lang .lang-btn,
.hide-cardText .deck-info, .hide-deckNav .deck-nav, .hide-swipeHint .deck-hint,
.hide-sort .sort, .hide-subs .subs, .hide-subCounts .sub-btn small, .hide-hero .hero, .hide-strip .strip,
.hide-share .share-btn, .hide-sizeGuide .guide-link,
.hide-waFloat .wa-float, .hide-footerSocial .footer-social, .hide-footerLinks .footer-links,
.hide-footerCity .footer-city, .hide-footerCopy .footer-copy { display: none !important; }
/* بدون اسم القسم: يبقى الترتيب لو ظاهر */
.hide-secHead .sec-head h1, .hide-secHead .sec-head > p { display: none; }
.hide-secHead.hide-sort .sec-head { display: none; }
/* بدون صورة الوسط: المنتجات تاخذ العرض كامل */
.hide-hero .showcase { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.hide-hero .products-left { grid-column: 2; }

/* ---------- صور المنتج: الرئيسية تنسحب، والصور الإضافية على الجنب ---------- */
.gallery .main-art { position: relative; border-radius: 14px; overflow: hidden; min-width: 0; }
.slides { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior-x: contain; }
.slides::-webkit-scrollbar { display: none; }
.gallery .slide { flex: 0 0 100%; scroll-snap-align: center; border-radius: 0; cursor: zoom-in; }
.gallery .slide img { object-fit: contain; }
.gallery.has-thumbs { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 10px; align-items: start; }
.gallery.has-thumbs .thumbs {
  grid-column: 1; grid-row: 1; position: relative;
  flex-direction: column; overflow-x: hidden; overflow-y: auto; height: 0; min-height: 100%;
}
.gallery.has-thumbs .main-art { grid-column: 2; grid-row: 1; }
.gallery .thumb { flex: 0 0 auto; width: 100%; height: auto; aspect-ratio: 4 / 5; background: var(--tile-art); }
.gallery .thumb img { object-fit: contain; }

/* ---------- تكبير الصورة (شاشة كاملة) ---------- */
.zoom {
  position: fixed; inset: 0; z-index: 65; background: rgba(var(--bg-rgb), .97);
  opacity: 0; pointer-events: none; transition: opacity .2s;
}
.zoom.open { opacity: 1; pointer-events: auto; }
.zoom-stage { position: absolute; inset: calc(64px + env(safe-area-inset-top)) 0 calc(56px + env(safe-area-inset-bottom)); overflow: hidden; touch-action: none; cursor: zoom-in; }
.zoom.zoomed .zoom-stage { cursor: grab; }
#zoomImg { width: 100%; height: 100%; object-fit: contain; transition: transform .3s ease; user-select: none; -webkit-user-select: none; -webkit-user-drag: none; }
#zoomImg.dragging { transition: none; }
.zoom .close { top: calc(12px + env(safe-area-inset-top)); }
.zoom-nav {
  position: absolute; top: 50%; z-index: 2; width: 44px; height: 44px; margin-top: -22px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--line); background: rgba(var(--bg-rgb), .6); transition: opacity .2s;
}
.zoom-nav:hover { border-color: var(--gold); color: var(--gold); }
.zoom-prev { inset-inline-start: 14px; }
.zoom-next { inset-inline-end: 14px; }
[dir=ltr] .zoom-nav svg { transform: scaleX(-1); }
.zoom-count { position: absolute; top: calc(22px + env(safe-area-inset-top)); left: 50%; transform: translateX(-50%); font-size: 14px; color: var(--muted); }
.zoom-hint { position: absolute; bottom: calc(18px + env(safe-area-inset-bottom)); width: 100%; padding: 0 16px; text-align: center; font-size: 13px; color: var(--muted); transition: opacity .2s; }
.zoom.zoomed .zoom-nav, .zoom.zoomed .zoom-hint { opacity: 0; pointer-events: none; }

@media (max-width: 760px) {
  .gallery.has-thumbs { grid-template-columns: 52px minmax(0, 1fr); gap: 8px; }
  .gallery .slide { max-height: none; }
  .gallery .main-art { max-height: 62vh; }
  .gallery .main-art .slide { height: 100%; max-height: 62vh; }
  .zoom-nav { width: 40px; height: 40px; margin-top: -20px; }
}

/* ---------- كود الخصم وسطور المجموع ---------- */
.coupon { display: flex; gap: 8px; }
.coupon input {
  flex: 1; min-width: 0; height: 44px; padding: 0 12px; border-radius: 10px; font: inherit; font-size: 15px;
  color: var(--text); background: var(--tile); border: 1px solid var(--line); letter-spacing: .5px; text-transform: uppercase;
}
.coupon input::placeholder { text-transform: none; letter-spacing: 0; }
.coupon input:focus { outline: none; border-color: var(--gold); }
.coupon button { flex: 0 0 auto; height: 44px; padding: 0 18px; border-radius: 10px; border: 1px solid var(--gold); color: var(--gold); font-weight: 500; }
.coupon button:hover { background: rgba(var(--gold-rgb), .12); }
.coupon-msg { color: var(--sale); font-size: 12px; margin-top: 6px; }
.coupon-on {
  display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px; border-radius: 10px;
  background: rgba(var(--gold-rgb), .12); border: 1px dashed var(--gold); font-size: 13px;
}
.coupon-on b { color: var(--gold); letter-spacing: .5px; }
.coupon-on button { color: var(--muted); font-size: 12px; text-decoration: underline; }
.cart-sum:empty { display: none; }
.cart-sum, .checkout-sum { display: flex; flex-direction: column; gap: 6px; }
.sum-line { display: flex; justify-content: space-between; font-size: 14px; color: var(--muted); }
.sum-line.is-disc span:last-child { color: var(--sale); }
.free-note { font-size: 12px; color: var(--muted); display: flex; flex-direction: column; gap: 6px; margin: 2px 0; }
.free-note i { display: block; height: 4px; border-radius: 4px; background: rgba(var(--gold-rgb), .18); position: relative; overflow: hidden; }
.free-note i::after { content: ""; position: absolute; inset: 0; inset-inline-end: auto; width: var(--p); background: var(--gold); border-radius: 4px; }
.free-note.is-free { color: var(--gold); }
.checkout-sum { padding-top: 10px; border-top: 1px solid var(--line); }

/* «بلغيني لما يتوفر» */
.btn-notify { display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1.3; }
.btn-notify small { font-size: 11px; font-weight: 500; opacity: .85; }

/* ---------- الدفع الإلكتروني ---------- */
.pay-online { flex-basis: 100%; }
.pay-online b { flex: 1; }
.pay-icons { margin-inline-start: auto; color: var(--gold); display: flex; }
.pay-error { color: var(--sale); font-size: 13px; text-align: center; }
.pay-error:empty { display: none; }
.order-done a.btn-primary { display: flex; align-items: center; justify-content: center; width: 100%; }
.paid-info { width: 100%; display: flex; flex-direction: column; gap: 6px; padding: 12px 14px; border-radius: 12px; background: var(--tile); border: 1px solid var(--line); }
.paid-info bdi { color: var(--text); font-weight: 700; letter-spacing: .5px; }

/* ---------- المفضلة ---------- */
.tile-wrap { position: relative; min-width: 0; }
.fav-btn {
  position: absolute; top: 14px; inset-inline-end: 14px; z-index: 2;
  width: 34px; height: 34px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  background: rgba(var(--bg-rgb), .55); color: var(--text); transition: transform .2s, color .2s;
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}
.fav-btn svg, .fav-modal svg { fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linejoin: round; }
.fav-btn.on, .fav-modal.on { color: var(--gold); }
.fav-btn.on svg, .fav-modal.on svg { fill: currentColor; }
.fav-btn:active { transform: scale(.88); }
.crumb-row .crumb { flex: 1; }
.nav-fav svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.6; }
.list-head { display: flex; align-items: center; justify-content: space-between; margin: 18px 20px 6px; }
.list-head h2 { font-size: 22px; font-weight: 400; }
.list-head .close { position: static; background: none; color: var(--text); }
.strip-track .tile-wrap { flex: 0 0 180px; scroll-snap-align: start; }
.strip-track .tile-wrap .tile { flex: none; }
@media (max-width: 760px) {
  .strip-track .tile-wrap { flex-basis: 42%; }
  .fav-btn { top: 10px; inset-inline-end: 10px; width: 30px; height: 30px; }
  .list-head { margin: 12px 12px 4px; }
}
/* تلاشي المنتجات: الترتيب صار على .tile-wrap */
.ultra-fade .products .tile-wrap:nth-child(2) .tile { animation-delay: calc(var(--fade-base, 0s) + .07s); }
.ultra-fade .products .tile-wrap:nth-child(3) .tile { animation-delay: calc(var(--fade-base, 0s) + .14s); }
.ultra-fade .products .tile-wrap:nth-child(4) .tile { animation-delay: calc(var(--fade-base, 0s) + .21s); }
.ultra-fade .products .tile-wrap:nth-child(5) .tile { animation-delay: calc(var(--fade-base, 0s) + .28s); }
.ultra-fade .products .tile-wrap:nth-child(n+6) .tile { animation-delay: calc(var(--fade-base, 0s) + .35s); }
.ultra-fade .products-left .tile-wrap:first-child .tile { animation-delay: calc(var(--fade-base, 0s) + .035s); }
.ultra-fade .tile-wrap .fav-btn { animation: ultra-fade 1.2s cubic-bezier(.25, .1, .25, 1) backwards; animation-delay: var(--fade-base, 0s); }
.hide-favs .fav-btn, .hide-favs .fav-modal { display: none; }
