/* =====================================================
   الألوان والهوية
   كل ثيم يغيّر لون البراند فقط، والباقي ثابت
   ===================================================== */
:root {
  --brand: #6b1d3a;          /* اللون الأساسي */
  --brand-deep: #3d0f21;     /* نسخة أغمق للغلاف */
  --brand-ink: #ffffff;      /* لون الكتابة فوق البراند */
  --gold: #b48a47;
  --gold-soft: #e9d8b8;
  --bg: #fbf8f4;             /* عاجي */
  --card: #ffffff;
  --ink: #241a1e;
  --mute: #7b6f72;
  --line: #ece4dc;
  --ok: #1f7a4d;
  --bad: #b3261e;
  --warn: #9a6a00;
  --wa: #1fa855;
  --radius: 18px;
  --shadow: 0 1px 2px rgba(40, 20, 25, 0.04), 0 8px 24px rgba(40, 20, 25, 0.06);
  --font-head: 'El Messiri', 'Tajawal', serif;
  --font-body: 'Tajawal', system-ui, sans-serif;
  /* أسماء قديمة تستخدمها لوحة التحكم */
  --wine: var(--brand);
  --wine-ink: var(--brand-ink);
  color-scheme: light;
}

[data-theme='emerald'] { --brand: #0f5c4a; --brand-deep: #06302a; }
[data-theme='navy']    { --brand: #1d2f5c; --brand-deep: #0c1631; }
[data-theme='noir']    { --brand: #1f1b1c; --brand-deep: #0b0909; --gold: #c09a5b; }

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #151012;
    --card: #1f181b;
    --ink: #f4ece6;
    --mute: #a99ca0;
    --line: #342a2e;
    --gold: #d6b074;
    --gold-soft: #4a3c28;
    --ok: #5fd39a;
    --bad: #ff8f86;
    --warn: #f0c060;
    --shadow: none;
    --brand-ink: #ffffff;
    color-scheme: dark;
  }
  /* في الوضع الليلي نستخدم الذهبي للعناصر الملونة عشان تكون واضحة */
  :root { --wine: var(--gold); --wine-ink: #1a1214; }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  line-height: 1.65;
  -webkit-tap-highlight-color: transparent;
}

main {
  max-width: 640px;
  margin: 0 auto;
  padding: 0 16px 40px;
}

h1, h2, h3 { font-family: var(--font-head); }
h1 { font-size: 28px; font-weight: 700; margin: 8px 0 2px; color: var(--wine); }
h2 { font-size: 20px; font-weight: 700; margin: 0 0 14px; display: flex; align-items: center; gap: 10px; }
h2 .num {
  display: inline-grid; place-items: center; flex: none;
  width: 30px; height: 30px; border-radius: 50%;
  border: 1.5px solid var(--gold); color: var(--gold);
  font-family: var(--font-body); font-size: 15px; font-weight: 700;
}
h2 small { font-family: var(--font-body); font-weight: 400; font-size: 14px; }
.sub { color: var(--mute); margin: 0 0 18px; font-size: 15px; }
.muted { color: var(--mute); }
.hidden { display: none !important; }

section.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  margin-bottom: 16px;
  box-shadow: var(--shadow);
}

/* =====================================================
   الغلاف (أول شي يشوفه الزبون)
   ===================================================== */
.hero {
  position: relative;
  min-height: 78vh;
  min-height: 78svh;
  display: grid;
  place-items: center;
  text-align: center;
  color: #fff;
  padding: calc(40px + env(safe-area-inset-top, 0px)) 20px 70px;
  background:
    radial-gradient(ellipse at 50% 0%, color-mix(in srgb, var(--gold) 35%, transparent), transparent 60%),
    linear-gradient(160deg, var(--brand), var(--brand-deep));
  overflow: hidden;
}
.hero.has-cover { background: var(--brand-deep); }
.hero .cover {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
}
.hero.has-cover::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.25) 0%, rgba(0, 0, 0, 0.35) 45%, rgba(0, 0, 0, 0.75) 100%);
}
/* نقشة زخرفية خفيفة لما ما فيه صورة غلاف */
.hero:not(.has-cover)::before {
  content: ''; position: absolute; inset: 0; opacity: 0.08;
  background-image:
    radial-gradient(circle at 25% 25%, #fff 1px, transparent 1.5px),
    radial-gradient(circle at 75% 75%, #fff 1px, transparent 1.5px);
  background-size: 28px 28px;
}
.hero .inner { position: relative; z-index: 1; max-width: 560px; }
.hero .logo {
  width: 108px; height: 108px; border-radius: 50%; object-fit: cover;
  border: 2px solid var(--gold-soft); background: #fff;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  margin-bottom: 18px;
}
.hero .monogram {
  width: 96px; height: 96px; border-radius: 50%; margin: 0 auto 18px;
  display: grid; place-items: center;
  border: 1.5px solid var(--gold-soft); color: var(--gold-soft);
  font-family: var(--font-head); font-size: 42px;
}
.hero h1 {
  color: #fff; font-size: clamp(34px, 9vw, 52px); line-height: 1.2; margin: 0;
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.25);
}
.ornament {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  color: var(--gold-soft); margin: 14px auto; width: 180px;
}
.ornament::before, .ornament::after { content: ''; flex: 1; height: 1px; background: currentColor; opacity: 0.7; }
.hero .tagline { font-size: 17px; opacity: 0.92; margin: 0 0 26px; }
.hero .cta {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 14px 34px; border-radius: 99px;
  background: var(--gold); color: #1a1214; font-weight: 800; font-size: 17px;
  text-decoration: none; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}
.hero .meta { margin-top: 18px; font-size: 14px; opacity: 0.85; }
.scroll-hint {
  position: absolute; bottom: 18px; left: 50%; transform: translateX(-50%); z-index: 1;
  color: var(--gold-soft); font-size: 22px; animation: bob 2s ease-in-out infinite;
}
@keyframes bob { 50% { transform: translate(-50%, 6px); } }
@media (prefers-reduced-motion: reduce) { .scroll-hint { animation: none; } html { scroll-behavior: auto; } }

.about {
  text-align: center; max-width: 520px; margin: 34px auto 10px; padding: 0 8px;
  font-size: 16px; color: var(--mute); white-space: pre-line;
}
.section-title {
  text-align: center; margin: 36px 0 18px;
}
.section-title h2 { justify-content: center; font-size: 26px; color: var(--wine); margin: 0; }
.section-title p { margin: 4px 0 0; color: var(--mute); }
.section-title .ornament { color: var(--gold); margin: 10px auto 0; width: 140px; }

/* =====================================================
   حقول الإدخال والأزرار
   ===================================================== */
label.f { display: block; font-size: 14px; color: var(--mute); margin: 12px 0 4px; }
input, select, textarea {
  width: 100%;
  font: inherit;
  font-size: 16px; /* أقل من 16 يخلي الآيفون يكبّر الصفحة */
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--ink);
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--gold); outline-offset: 1px; }
textarea { resize: vertical; min-height: 76px; }

button { font: inherit; cursor: pointer; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 11px 16px; border-radius: 12px; border: none;
  background: var(--wine); color: var(--wine-ink); font-weight: 700;
  text-decoration: none;
}
.btn.block { width: 100%; }
.btn.ghost { background: transparent; color: var(--ink); border: 1px solid var(--line); }
.btn.danger { background: var(--bad); color: #fff; }
.btn.ok { background: var(--ok); color: #fff; }
.btn.wa { background: var(--wa); color: #fff; font-size: 18px; padding: 15px; border-radius: 14px; }
.btn.small { padding: 6px 12px; font-size: 14px; border-radius: 10px; }
.btn:disabled, .btn[aria-disabled='true'] { opacity: 0.45; cursor: not-allowed; pointer-events: none; }

/* =====================================================
   التقويم
   ===================================================== */
.cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.cal-head b { font-family: var(--font-head); font-size: 19px; }
.cal-nav {
  width: 40px; height: 40px; border-radius: 50%;
  border: 1px solid var(--line); background: var(--bg); color: var(--ink); font-size: 18px;
}
.cal-nav:disabled { opacity: 0.3; cursor: default; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.cal-dow { text-align: center; font-size: 12px; color: var(--mute); padding: 4px 0; }
.cal-day {
  position: relative;
  aspect-ratio: 1;
  border-radius: 12px;
  border: 1px solid transparent;
  background: var(--bg);
  color: var(--ink);
  font-weight: 700;
  font-size: 15px;
  padding: 0;
}
.cal-day.empty { background: none; pointer-events: none; }
.cal-day.today { border-color: var(--gold); }
.cal-day.past { color: var(--mute); opacity: 0.35; background: none; cursor: default; }
.cal-day.partial::after {
  content: ''; position: absolute; bottom: 6px; left: 50%; transform: translateX(-50%);
  width: 6px; height: 6px; border-radius: 50%; background: var(--gold);
}
.cal-day.full {
  color: var(--bad); background: color-mix(in srgb, var(--bad) 8%, transparent);
  text-decoration: line-through; cursor: not-allowed;
}
.cal-day.selected { background: var(--wine); color: var(--wine-ink); border-color: var(--wine); }
.cal-day.selected.partial::after { background: var(--wine-ink); }
.cal-day:not(.past):not(.full):not(.selected):hover { border-color: var(--gold); }
.cal-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 13px; color: var(--mute); margin-top: 12px; }
.cal-legend span { display: inline-flex; align-items: center; gap: 6px; }
.cal-legend i { width: 12px; height: 12px; border-radius: 4px; display: inline-block; }
.cal-legend .l-ok { background: var(--bg); border: 1px solid var(--line); }
.cal-legend .l-partial { background: var(--gold); border-radius: 50%; width: 8px; height: 8px; }
.cal-legend .l-full { background: color-mix(in srgb, var(--bad) 25%, transparent); }
.picked-date {
  margin-top: 12px; padding: 10px 14px; border-radius: 12px;
  background: color-mix(in srgb, var(--gold) 12%, transparent);
  font-weight: 700; text-align: center;
}

/* =====================================================
   بطاقة الكوشة
   ===================================================== */
.kosha {
  border: 1.5px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
  margin-bottom: 14px;
  background: var(--bg);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.kosha.selected { border-color: var(--gold); box-shadow: 0 0 0 3px color-mix(in srgb, var(--gold) 25%, transparent); }
.kosha.unavailable { opacity: 0.5; }

.gallery {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  aspect-ratio: 4 / 5;
  max-height: 520px;
  background: var(--line);
}
.gallery::-webkit-scrollbar { display: none; }
.gallery img {
  flex: 0 0 100%;
  width: 100%;
  height: 100%;
  object-fit: cover;
  scroll-snap-align: center;
  cursor: zoom-in;
}
.gallery .noimg {
  flex: 0 0 100%; display: grid; place-items: center; color: var(--mute);
  font-family: var(--font-head); font-size: 20px;
  background: linear-gradient(160deg, color-mix(in srgb, var(--brand) 12%, var(--bg)), var(--bg));
}
.gwrap { position: relative; }
.gcount {
  position: absolute; bottom: 10px; left: 10px;
  background: rgba(0, 0, 0, 0.55); color: #fff;
  font-size: 12px; padding: 2px 10px; border-radius: 99px;
}

.kbody {
  display: flex; gap: 12px; align-items: center;
  width: 100%; padding: 14px; background: none; border: none; color: inherit; text-align: right;
}
.kbody .info { flex: 1; min-width: 0; }
.kbody b { font-family: var(--font-head); font-size: 20px; display: block; line-height: 1.4; }
.kbody small { color: var(--mute); display: block; font-size: 14px; }
.price { font-weight: 800; color: var(--wine); white-space: nowrap; }
.kbody .price { display: block; font-size: 18px; margin-top: 4px; }
.radio {
  flex: none; width: 26px; height: 26px; border-radius: 50%;
  border: 2px solid var(--line); display: grid; place-items: center;
}
.selected .radio { border-color: var(--gold); background: var(--gold); }
.selected .radio::after { content: '✓'; color: #fff; font-size: 14px; font-weight: 800; }

.tag { display: inline-block; font-size: 12px; font-weight: 700; padding: 1px 9px; border-radius: 99px; margin-top: 6px; }
.tag.ok { color: var(--ok); border: 1px solid var(--ok); }
.tag.bad { color: var(--bad); border: 1px solid var(--bad); }
.tag.warn { color: var(--warn); border: 1px solid var(--warn); }
.tag.mute { color: var(--mute); border: 1px solid var(--line); }

/* =====================================================
   الإضافات
   ===================================================== */
.group { border-bottom: 1px solid var(--line); padding: 10px 0; }
.group:last-child { border-bottom: 0; }
.ghead {
  display: flex; align-items: center; gap: 10px; width: 100%;
  background: none; border: none; color: inherit; padding: 6px 0; text-align: right;
}
.ghead b { flex: 1; font-size: 17px; }
.ghead .picked { font-size: 13px; color: var(--gold); font-weight: 700; }
.arrow { transition: transform 0.15s; color: var(--mute); }
.group.open .arrow { transform: rotate(180deg); }
.opts { display: none; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 10px; }
.group.open .opts { display: grid; }
.opt {
  border: 1.5px solid var(--line); border-radius: 14px; overflow: hidden;
  background: var(--bg); text-align: right; color: inherit; padding: 0;
}
.opt.selected { border-color: var(--gold); box-shadow: 0 0 0 2px color-mix(in srgb, var(--gold) 25%, transparent); }
.opt img, .opt .noimg { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; display: block; background: var(--line); }
.opt .noimg { background: linear-gradient(160deg, color-mix(in srgb, var(--gold) 15%, var(--bg)), var(--bg)); }
.opt .oi { padding: 8px 10px 10px; }
.opt b { display: block; font-size: 15px; }
.opt small { color: var(--mute); font-size: 13px; }

/* =====================================================
   الشريط السفلي (الإجمالي والإرسال)
   ===================================================== */
.bar {
  position: fixed; inset-inline: 0; bottom: 0; z-index: 10;
  background: color-mix(in srgb, var(--card) 92%, transparent);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  border-top: 1px solid var(--line);
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px));
  box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.06);
  transform: translateY(0); transition: transform 0.25s;
}
.bar.away { transform: translateY(110%); }
.bar > div { max-width: 640px; margin: 0 auto; }
.lines { font-size: 14px; color: var(--mute); margin: 0 0 6px; padding: 0; list-style: none; max-height: 72px; overflow: auto; }
.lines li { display: flex; justify-content: space-between; gap: 8px; }
.total { display: flex; justify-content: space-between; font-weight: 800; font-size: 20px; margin-bottom: 10px; }
.total span:last-child { color: var(--wine); }
.msg { font-size: 14px; min-height: 20px; margin-bottom: 6px; }
.msg.err { color: var(--bad); }
.msg.ok { color: var(--ok); }

/* =====================================================
   التذييل
   ===================================================== */
footer.site {
  text-align: center; padding: 34px 16px calc(40px + env(safe-area-inset-bottom, 0px));
  color: var(--mute); font-size: 14px; border-top: 1px solid var(--line); margin-top: 20px;
}
footer.site b { font-family: var(--font-head); font-size: 22px; color: var(--wine); display: block; }
.links { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 14px 0; }
.links a {
  padding: 7px 16px; border-radius: 99px; border: 1px solid var(--line);
  color: var(--ink); text-decoration: none; font-weight: 700; font-size: 14px; background: var(--card);
}

/* =====================================================
   عارض الصور وشاشة النجاح
   ===================================================== */
.lightbox {
  position: fixed; inset: 0; z-index: 50; background: rgba(0, 0, 0, 0.94);
  display: grid; place-items: center;
}
.lightbox img { max-width: 100vw; max-height: 100vh; object-fit: contain; }
.lightbox button {
  position: absolute; top: calc(12px + env(safe-area-inset-top, 0px)); left: 12px;
  width: 44px; height: 44px; border-radius: 50%; border: none;
  background: rgba(255, 255, 255, 0.15); color: #fff; font-size: 22px;
}

.success { text-align: center; padding: 34px 12px; }
.success .check {
  width: 76px; height: 76px; border-radius: 50%; margin: 0 auto 14px;
  border: 2px solid var(--gold); color: var(--gold); display: grid; place-items: center; font-size: 36px;
}
.success .bid { font-size: 32px; font-weight: 800; color: var(--wine); }

.empty { text-align: center; color: var(--mute); padding: 20px 0; }
.spinner { text-align: center; color: var(--mute); padding: 30px 0; }

/* ===== أدوات صغيرة ===== */
.note { background: var(--card); border: 1px solid var(--gold); border-radius: 14px; padding: 12px 14px; margin-top: 16px; }
.tight { margin-bottom: 6px; }
.m0 { margin: 0; }
.mt8 { margin-top: 8px; }
.small-note { font-size: 14px; margin-top: 14px; }

/* ===== أسهم ونقاط المعرض ===== */
.gnav {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 2;
  width: 36px; height: 36px; border-radius: 50%; border: none;
  background: rgba(0, 0, 0, 0.45); color: #fff; font-size: 16px;
  display: grid; place-items: center;
}
.gnav.prev { right: 8px; }
.gnav.next { left: 8px; }
.dots {
  position: absolute; bottom: 10px; left: 0; right: 0; z-index: 2;
  display: flex; justify-content: center; gap: 5px; pointer-events: none;
}
.dots span { width: 7px; height: 7px; border-radius: 50%; background: rgba(255, 255, 255, 0.55); transition: all 0.2s; }
.dots span.on { background: #fff; width: 18px; border-radius: 99px; }
.opt .gallery { aspect-ratio: 4 / 3; max-height: none; }
.opt .gallery img { cursor: pointer; }
.opt .gnav { width: 26px; height: 26px; font-size: 12px; }
.opt .gnav.prev { right: 4px; }
.opt .gnav.next { left: 4px; }
.opt .dots { bottom: 6px; }
.opt .dots span { width: 5px; height: 5px; }
.opt .dots span.on { width: 12px; }
.opt:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

/* =====================================================
   الرئيسية: التصنيفات وشبكة المنتجات
   ===================================================== */
.cats {
  display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none;
  margin: 0 -16px 16px; padding: 2px 16px;
  justify-content: flex-start;
}
.cats::-webkit-scrollbar { display: none; }
.cats button {
  flex: none; padding: 8px 20px; border-radius: 99px; font-weight: 700; font-size: 15px;
  border: 1px solid var(--line); background: var(--card); color: var(--ink);
}
.cats button.active { background: var(--wine); color: var(--wine-ink); border-color: var(--wine); }

.grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
@media (min-width: 600px) { .grid { grid-template-columns: repeat(3, 1fr); } main:has(.grid) { max-width: 900px; } }
.pcard {
  display: flex; flex-direction: column; padding: 0; text-align: right; color: inherit;
  background: var(--card); border: 1px solid var(--line); border-radius: 16px; overflow: hidden;
  box-shadow: var(--shadow); transition: transform 0.15s;
}
.pcard:active { transform: scale(0.98); }
.pimg { position: relative; aspect-ratio: 4 / 5; background: var(--line); }
.pimg img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pimg .noimg {
  display: grid; place-items: center; width: 100%; height: 100%;
  font-family: var(--font-head); font-size: 44px; color: var(--gold);
  background: linear-gradient(160deg, color-mix(in srgb, var(--brand) 14%, var(--bg)), var(--bg));
}
.pcolors {
  position: absolute; top: 8px; right: 8px; font-size: 11px; font-weight: 700;
  background: rgba(0, 0, 0, 0.55); color: #fff; padding: 2px 8px; border-radius: 99px;
}
.pbody { padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 2px; }
.pbody small { color: var(--gold); font-weight: 700; font-size: 12px; }
.pbody b { font-family: var(--font-head); font-size: 17px; line-height: 1.35; }
.pbody .price { font-size: 15px; }

/* =====================================================
   صفحة المنتج
   ===================================================== */
.backbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 12px;
  padding: calc(10px + env(safe-area-inset-top, 0px)) 16px 10px;
  background: color-mix(in srgb, var(--bg) 90%, transparent);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.backbar b { font-family: var(--font-head); font-size: 17px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.back {
  flex: none; border: 1px solid var(--line); background: var(--card); color: var(--ink);
  border-radius: 99px; padding: 7px 16px; font-weight: 800;
}
main.product { padding-top: 14px; padding-bottom: 260px; }
main.product > .gwrap { border-radius: 18px; overflow: hidden; margin-bottom: 14px; box-shadow: var(--shadow); }
.gallery.big { aspect-ratio: 4 / 5; max-height: 72vh; }
.pinfo h1 { font-size: 28px; margin: 2px 0 4px; }
.pcat { color: var(--gold); font-weight: 700; font-size: 14px; }
.pprice { font-size: 22px; font-weight: 800; color: var(--wine); }
.pdesc { white-space: pre-line; color: var(--mute); margin: 10px 0 0; }
.pdesc:empty { display: none; }
.pinfo h3 { font-size: 17px; margin: 18px 0 10px; }

.colors { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 5px 14px 5px 6px; border-radius: 99px;
  border: 1.5px solid var(--line); background: var(--bg); color: var(--ink); font-weight: 700;
}
.chip img, .chip i { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; background: var(--line); display: block; }
.chip small { color: var(--mute); font-weight: 500; font-size: 12px; }
.chip.active { border-color: var(--gold); box-shadow: 0 0 0 2px color-mix(in srgb, var(--gold) 30%, transparent); }
.chip.other { padding: 9px 16px; border-style: dashed; color: var(--mute); }
.chip.other.active { color: var(--ink); border-style: solid; }
#customColorBox { margin-top: 4px; }

.picked-date.bad { color: var(--bad); background: color-mix(in srgb, var(--bad) 10%, transparent); }

/* الإضافات بالكمية */
.opt { display: flex; flex-direction: column; }
.opt .oi { display: flex; flex-direction: column; gap: 4px; flex: 1; }
.opt .tag { align-self: flex-start; margin-top: 0; }
.opt.soldout { opacity: 0.55; }
.opt .add { margin-top: auto; width: 100%; }
.stepper {
  margin-top: auto; display: flex; align-items: center; justify-content: space-between;
  border: 1.5px solid var(--gold); border-radius: 12px; overflow: hidden;
}
.stepper button {
  width: 40px; height: 36px; border: none; background: color-mix(in srgb, var(--gold) 14%, transparent);
  color: var(--ink); font-size: 20px; font-weight: 800;
}
.stepper button:disabled { opacity: 0.35; }
.stepper span { font-weight: 800; font-size: 17px; }
#addonsSection textarea { margin-top: 2px; }
.group { padding: 12px 0; }
.pbody .price { white-space: normal; line-height: 1.4; }

/* =====================================================
   زر السلة العائم
   ===================================================== */
.cart-fab {
  position: fixed; z-index: 30; left: 14px; top: calc(12px + env(safe-area-inset-top, 0px));
  height: 46px; min-width: 46px; padding: 0 14px; border-radius: 99px; border: none;
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--gold); color: #1a1214; font-weight: 800; font-size: 16px;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.22);
}
.cart-fab .bag { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linejoin: round; }
.cart-fab .count { min-width: 12px; }

/* =====================================================
   البحث بالتاريخ
   ===================================================== */
.datesearch {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 14px 16px; margin-bottom: 16px; box-shadow: var(--shadow);
}
.datesearch label { font-family: var(--font-head); font-weight: 700; font-size: 17px; display: block; margin-bottom: 8px; }
.ds-row { display: flex; gap: 8px; align-items: center; }
.ds-row input { flex: 1; }
.ds-msg { margin: 8px 0 0; font-size: 14px; }
.avail {
  position: absolute; bottom: 8px; right: 8px; font-size: 11px; font-weight: 800;
  padding: 2px 9px; border-radius: 99px; color: #fff;
}
.avail.ok { background: var(--ok); }
.avail.bad { background: var(--bad); }
.pcard.dim .pimg img { filter: grayscale(0.7); opacity: 0.6; }

/* =====================================================
   معرض من مناسباتنا
   ===================================================== */
.showcase { margin-top: 10px; }
.strip {
  display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none;
  margin: 0 -16px; padding: 0 16px 6px;
}
.strip::-webkit-scrollbar { display: none; }
.strip figure {
  flex: 0 0 72%; max-width: 320px; margin: 0; scroll-snap-align: center; cursor: zoom-in;
  border-radius: 16px; overflow: hidden; position: relative; background: var(--line);
}
.strip img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; display: block; }
.strip figcaption {
  position: absolute; inset-inline: 0; bottom: 0; padding: 24px 12px 10px; color: #fff; font-weight: 700; font-size: 14px;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.7));
}
.lb-caption { position: absolute; bottom: calc(20px + env(safe-area-inset-bottom, 0px)); inset-inline: 0; text-align: center; color: #fff; margin: 0; font-weight: 700; }

/* =====================================================
   السلة
   ===================================================== */
.citem { display: flex; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.citem:last-child { border-bottom: 0; }
.citem > img, .citem > .ph {
  width: 78px; height: 96px; border-radius: 12px; object-fit: cover; flex: none; background: var(--line);
  display: grid; place-items: center; font-family: var(--font-head); font-size: 26px; color: var(--gold);
}
.cinfo { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.cinfo b { font-family: var(--font-head); font-size: 17px; }
.cinfo small { font-size: 13px; }
.cinfo .price { margin-top: 2px; }
.cinfo .tag { align-self: flex-start; }
.cactions { display: flex; gap: 6px; margin-top: 6px; }
.citem.problem > img { outline: 2px solid var(--bad); }
.cal-day.incart:not(.selected) { box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--gold) 60%, transparent); }
.cart-date-note { margin: 0 0 12px; font-size: 14px; }

.terms {
  white-space: pre-line; max-height: 200px; overflow: auto; font-size: 14px; color: var(--mute);
  background: var(--bg); border: 1px solid var(--line); border-radius: 12px; padding: 12px;
}
.check-row { display: flex; align-items: center; gap: 10px; margin-top: 12px; font-weight: 700; cursor: pointer; }
.check-row input { width: 22px; height: 22px; accent-color: var(--wine); flex: none; }
.row { display: flex; gap: 8px; align-items: center; }
.row > input { flex: 1; min-width: 0; }
.redirecting { font-weight: 700; color: var(--ok); }

/* =====================================================
   النافذة السفلية
   ===================================================== */
.sheet-backdrop {
  position: fixed; inset: 0; z-index: 60; background: rgba(10, 5, 8, 0.5);
  display: flex; align-items: flex-end; justify-content: center;
  -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px);
}
.sheet {
  width: 100%; max-width: 520px; background: var(--card); color: var(--ink);
  border-radius: 22px 22px 0 0; padding: 22px 18px calc(18px + env(safe-area-inset-bottom, 0px));
  text-align: center; animation: up 0.22s ease-out;
}
@keyframes up { from { transform: translateY(40px); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .sheet { animation: none; } }
.sheet-icon {
  width: 56px; height: 56px; border-radius: 50%; margin: 0 auto 10px; display: grid; place-items: center;
  border: 2px solid var(--gold); color: var(--gold); font-size: 26px;
}
.sheet h3 { font-family: var(--font-head); font-size: 22px; margin: 0 0 4px; }
.sheet p { margin: 0 0 16px; }
.sheet-actions { display: flex; flex-direction: column; gap: 8px; }
.lines li.discount { color: var(--ok); font-weight: 700; }

/* ===== خصم المنتج ===== */
.sale-badge {
  position: absolute; top: 8px; left: 8px; z-index: 1;
  background: var(--bad); color: #fff; font-size: 12px; font-weight: 800;
  padding: 3px 10px; border-radius: 99px; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}
.on-sale { display: inline-flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; }
s.was { color: var(--mute); font-weight: 500; font-size: 0.82em; text-decoration-thickness: 1.5px; }
.pprice .pp { font-size: inherit; }
.sale-note {
  display: inline-block; margin-top: 6px; padding: 3px 12px; border-radius: 99px;
  background: color-mix(in srgb, var(--bad) 10%, transparent); color: var(--bad); font-weight: 800; font-size: 14px;
}
.chip small .was { margin-inline-end: 4px; }
.chip small { white-space: nowrap; }
