/* =====================================================================
   [STORE NAME] — Cairo beauty boutique · Phase 1 preview stylesheet
   Themes: beige (default) · light · dark  → html[data-theme]
   Direction: html[dir=rtl] (Arabic, default) · html[dir=ltr] (English)
   ===================================================================== */

/* ---------- Design tokens ---------- */
:root {
  --font-body: "IBM Plex Sans Arabic", "Segoe UI", system-ui, sans-serif;
  --font-display: "Amiri", "Cormorant Garamond", Georgia, serif;

  --radius-s: 10px;
  --radius-m: 18px;
  --radius-l: 28px;
  --container: 1280px;
  --gutter: clamp(16px, 4vw, 48px);
  --section-gap: clamp(56px, 8vw, 120px);

  --motion-intensity: 0.7;   /* 0..1, admin-controlled */
  --ease: cubic-bezier(.22,.8,.26,1);

  /* Beige (default) */
  --bg: #F3ECE2;
  --bg-2: #EBE1D3;
  --surface: #FBF7F1;
  --surface-2: #F6F0E7;
  --text: #2A2320;
  --text-2: #6E6058;
  --muted: #9A8C82;
  --line: rgba(42, 35, 32, .12);
  --accent: #B0765A;
  --accent-ink: #FFFFFF;
  --accent-soft: rgba(176, 118, 90, .12);
  --sage: #7F8F78;
  --sage-soft: rgba(127, 143, 120, .14);
  --gold: #C9A46A;
  --danger: #B04A3B;
  --success: #4F7F5A;
  --shadow: 0 12px 40px rgba(60, 40, 25, .10);
  --shadow-s: 0 4px 16px rgba(60, 40, 25, .08);
  --hero-wash-1: rgba(243, 236, 226, .0);
  --hero-wash-2: rgba(243, 236, 226, .92);
  --droplet: rgba(255, 255, 255, .55);
  --droplet-edge: rgba(176, 118, 90, .25);
  --scrim: rgba(42, 35, 32, .45);
  color-scheme: light;
}

html[data-theme="light"] {
  --bg: #FAFAF8;
  --bg-2: #F1F0EC;
  --surface: #FFFFFF;
  --surface-2: #F6F5F2;
  --text: #1F1F22;
  --text-2: #5B5A60;
  --muted: #8E8D93;
  --line: rgba(31, 31, 34, .10);
  --accent: #9C6B4E;
  --accent-soft: rgba(156, 107, 78, .10);
  --sage: #6E8C7E;
  --sage-soft: rgba(110, 140, 126, .14);
  --shadow: 0 12px 40px rgba(20, 20, 30, .08);
  --shadow-s: 0 4px 16px rgba(20, 20, 30, .06);
  --hero-wash-1: rgba(250, 250, 248, 0);
  --hero-wash-2: rgba(250, 250, 248, .92);
  --droplet: rgba(255, 255, 255, .7);
  --droplet-edge: rgba(156, 107, 78, .22);
}

html[data-theme="dark"] {
  --bg: #1B1A19;
  --bg-2: #222020;
  --surface: #262423;
  --surface-2: #2E2B29;
  --text: #F1EBE3;
  --text-2: #C6BBB0;
  --muted: #8F857C;
  --line: rgba(241, 235, 227, .12);
  --accent: #D5A382;
  --accent-ink: #1B1A19;
  --accent-soft: rgba(213, 163, 130, .14);
  --sage: #93A48E;
  --sage-soft: rgba(147, 164, 142, .16);
  --gold: #D9B87C;
  --danger: #E07A6A;
  --success: #7FB58B;
  --shadow: 0 16px 48px rgba(0, 0, 0, .45);
  --shadow-s: 0 6px 20px rgba(0, 0, 0, .35);
  --hero-wash-1: rgba(27, 26, 25, 0);
  --hero-wash-2: rgba(27, 26, 25, .94);
  --droplet: rgba(255, 245, 235, .18);
  --droplet-edge: rgba(213, 163, 130, .35);
  --scrim: rgba(0, 0, 0, .6);
  color-scheme: dark;
}

html[lang="en"] { --font-display: "Cormorant Garamond", "Amiri", Georgia, serif; }
html[lang="ar"] { --font-display: "Amiri", "Cormorant Garamond", Georgia, serif; }

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  overflow-x: hidden;
  transition: background-color .35s var(--ease), color .35s var(--ease);
}
img, svg, picture { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; background: none; border: 0; }
input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 600; line-height: 1.15; margin: 0; letter-spacing: -0.01em; }
html[lang="ar"] h1, html[lang="ar"] h2, html[lang="ar"] h3 { letter-spacing: 0; font-weight: 700; }
p { margin: 0; }
.container { width: min(100% - 2 * var(--gutter), var(--container)); margin-inline: auto; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
[hidden] { display: none !important; }

.eyebrow { font-size: .78rem; letter-spacing: .18em; text-transform: uppercase; color: var(--accent); font-weight: 600; }
html[lang="ar"] .eyebrow { letter-spacing: .04em; font-size: .85rem; }
.section-title { font-size: clamp(1.9rem, 3.4vw, 2.8rem); margin-top: .35rem; }
.section-lead { color: var(--text-2); max-width: 60ch; margin-top: .75rem; font-size: 1.05rem; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; flex-wrap: wrap; margin-bottom: clamp(24px, 4vw, 44px); }
.section { padding-block: var(--section-gap); }
.section.tight { padding-block: clamp(36px, 5vw, 72px); }
.section.alt { background: var(--bg-2); }

/* ---------- Buttons & chips ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 0 26px; border-radius: 999px;
  background: var(--accent); color: var(--accent-ink); font-weight: 600;
  border: 1px solid transparent; transition: transform .2s var(--ease), box-shadow .2s var(--ease), background .2s;
  box-shadow: 0 8px 22px rgba(176,118,90,.28);
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 12px 28px rgba(176,118,90,.34); }
.btn:active { transform: translateY(0); }
.btn.ghost { background: transparent; color: var(--text); border-color: var(--line); box-shadow: none; }
.btn.ghost:hover { background: var(--surface); }
.btn.soft { background: var(--accent-soft); color: var(--accent); box-shadow: none; }
.btn.sm { min-height: 40px; padding: 0 18px; font-size: .92rem; }
.btn.block { width: 100%; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .55; cursor: not-allowed; transform: none; box-shadow: none; }
.icon-btn {
  display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 50%;
  border: 1px solid var(--line); background: var(--surface); position: relative; transition: background .2s, transform .2s var(--ease);
}
.icon-btn:hover { background: var(--surface-2); transform: translateY(-1px); }
.icon-btn svg { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.badge-count { position: absolute; top: -4px; inset-inline-end: -4px; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--accent); color: var(--accent-ink); font-size: .72rem; font-weight: 700; display: grid; place-items: center; }

.chip {
  display: inline-flex; align-items: center; gap: 8px; padding: 9px 16px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--surface); font-size: .92rem; transition: all .2s var(--ease);
}
.chip:hover { border-color: var(--accent); color: var(--accent); }
.chip.active, .chip[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.tag { display: inline-flex; align-items: center; padding: 4px 10px; border-radius: 8px; font-size: .74rem; font-weight: 600; letter-spacing: .02em; }
.tag.demo { background: var(--sage-soft); color: var(--sage); }
.tag.pending { background: rgba(201,164,106,.18); color: #8a6a2e; }
html[data-theme="dark"] .tag.pending { color: var(--gold); }
.tag.sale { background: var(--accent-soft); color: var(--accent); }
.tag.out { background: rgba(176,74,59,.12); color: var(--danger); }

/* ---------- Preview ribbon ---------- */
.preview-bar {
  background: var(--text); color: var(--bg); font-size: .82rem; text-align: center; padding: 8px var(--gutter);
  display: flex; gap: 14px; justify-content: center; align-items: center; flex-wrap: wrap;
}
.preview-bar strong { color: var(--gold); }
.preview-bar a { text-decoration: underline; text-underline-offset: 3px; opacity: .85; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.header-row { display: flex; align-items: center; gap: 18px; min-height: 76px; }
.brand { display: flex; align-items: center; gap: 12px; }
.brand-mark { width: 40px; height: 40px; border-radius: 12px; background: linear-gradient(135deg, var(--accent), var(--gold)); display: grid; place-items: center; color: #fff; font-family: var(--font-display); font-size: 1.25rem; font-weight: 700; }
.brand-name { font-family: var(--font-display); font-size: 1.35rem; font-weight: 700; letter-spacing: .01em; }
.brand-sub { display: block; font-family: var(--font-body); font-size: .68rem; color: var(--muted); letter-spacing: .12em; text-transform: uppercase; }
html[lang="ar"] .brand-sub { letter-spacing: .02em; }
.nav { display: flex; gap: 6px; margin-inline: auto; }
.nav a { padding: 10px 14px; border-radius: 999px; font-weight: 500; color: var(--text-2); transition: all .2s; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--text); background: var(--surface); }
.header-actions { display: flex; align-items: center; gap: 8px; }
.search-form { display: flex; align-items: center; gap: 8px; border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 4px 6px 4px 16px; }
html[dir="rtl"] .search-form { padding: 4px 16px 4px 6px; }
.search-form input { border: 0; background: transparent; width: 160px; outline: none; }
.search-form input::placeholder { color: var(--muted); }
.pref-group { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); padding: 3px; gap: 2px; }
.pref-group button { padding: 7px 12px; border-radius: 999px; font-size: .82rem; font-weight: 600; color: var(--text-2); }
.pref-group button[aria-pressed="true"] { background: var(--text); color: var(--bg); }
.theme-dot { width: 14px; height: 14px; border-radius: 50%; border: 1px solid rgba(0,0,0,.15); display: inline-block; vertical-align: -2px; }
.theme-dot.beige { background: #EBDCC8; } .theme-dot.light { background: #FFFFFF; } .theme-dot.dark { background: #232120; }
.menu-btn { display: none; }
.mobile-nav { display: none; }

@media (max-width: 1024px) {
  .nav, .search-form { display: none; }
  .menu-btn { display: inline-grid; }
  .header-row { min-height: 66px; gap: 10px; }
  .pref-group.lang button { padding: 7px 10px; }
  .mobile-nav { display: block; position: fixed; inset: 0; z-index: 70; background: var(--scrim); opacity: 0; pointer-events: none; visibility: hidden; transition: opacity .25s, visibility 0s linear .25s; }
  .mobile-nav.open { opacity: 1; pointer-events: auto; visibility: visible; transition-delay: 0s; }
  .mobile-nav .panel { position: absolute; top: 0; bottom: 0; inset-inline-start: 0; width: min(88vw, 360px); background: var(--bg); padding: 22px; overflow: auto; transform: translateX(-16px); transition: transform .3s var(--ease); display: flex; flex-direction: column; gap: 18px; }
  html[dir="rtl"] .mobile-nav .panel { transform: translateX(16px); }
  .mobile-nav.open .panel { transform: none; }
  .mobile-nav a { display: block; padding: 14px 6px; border-bottom: 1px solid var(--line); font-size: 1.1rem; font-family: var(--font-display); }
  .mobile-nav .search-form { display: flex; }
  .mobile-nav .search-form input { width: 100%; }
}
@media (max-width: 640px) {
  .brand-sub { display: none; }
  .header-row { gap: 8px; }
  .brand-mark { width: 36px; height: 36px; }
  .brand-name { font-size: 1.15rem; }
  .header-actions .pref-group.theme { display: none; }   /* theme control stays visible inside the mobile menu */
  .header-actions .pref-group.lang button { padding: 6px 9px; font-size: .78rem; }
}
.mobile-nav .pref-group.theme { display: inline-flex; }

/* ---------- HERO with 4D-style layered background ---------- */
.hero {
  position: relative; isolation: isolate; overflow: hidden;
  min-height: min(88vh, 820px); display: grid; align-items: center;
  background: var(--bg);
  perspective: 1200px;
}
.hero .layer { position: absolute; inset: 0; pointer-events: none; will-change: transform; }
.hero .layer-photo { z-index: 1; inset: -3% -3%; transform: translate3d(calc(var(--px, 0) * var(--motion-intensity) * -14px), calc(var(--py, 0) * var(--motion-intensity) * -10px), 0) scale(1.03); transition: transform .12s linear; }
.hero .layer-photo picture { width: 100%; height: 100%; }
.hero .layer-photo img { width: 100%; height: 100%; object-fit: cover; object-position: var(--focal, 72% 36%); }
.hero .layer-wash { z-index: 2; background: linear-gradient(90deg, var(--hero-wash-2) 0%, var(--hero-wash-2) 34%, var(--hero-wash-1) 72%); }
html[dir="rtl"] .hero .layer-wash { background: linear-gradient(90deg, var(--hero-wash-2) 0%, var(--hero-wash-2) 34%, var(--hero-wash-1) 72%); }
.hero .layer-wash::after { content: ""; position: absolute; inset: auto 0 0 0; height: 32%; background: linear-gradient(180deg, transparent, var(--bg)); }
.hero .layer-light { z-index: 3; mix-blend-mode: soft-light; opacity: .8;
  background:
    radial-gradient(60% 40% at 20% 30%, rgba(255,255,255,.65), transparent 70%),
    linear-gradient(115deg, transparent 40%, rgba(255,255,255,.35) 50%, transparent 60%);
  transform: translate3d(calc(var(--px, 0) * var(--motion-intensity) * 22px), calc(var(--py, 0) * var(--motion-intensity) * 14px), 0);
  transition: transform .18s linear;
}
.hero .layer-botanical { z-index: 4; }
.hero .layer-botanical svg { position: absolute; width: clamp(160px, 22vw, 340px); height: auto; opacity: .16; color: var(--sage); }
.hero .leaf-1 { left: -4%; bottom: 8%; transform-origin: bottom left; animation: sway 9s ease-in-out infinite; }
.hero .leaf-2 { right: 6%; top: -6%; transform: rotate(140deg); animation: sway 12s ease-in-out infinite reverse; }
.hero .layer-droplets { z-index: 5; transform: translate3d(calc(var(--px, 0) * var(--motion-intensity) * 34px), calc(var(--py, 0) * var(--motion-intensity) * 24px), 0); transition: transform .22s linear; }
.droplet {
  position: absolute; border-radius: 50%;
  background: radial-gradient(circle at 32% 28%, rgba(255,255,255,.95), var(--droplet) 38%, rgba(255,255,255,.05) 62%, transparent 70%);
  box-shadow: inset -6px -8px 18px rgba(255,255,255,.35), inset 4px 6px 12px var(--droplet-edge), 0 18px 30px rgba(80,50,30,.08);
  backdrop-filter: blur(2px); -webkit-backdrop-filter: blur(2px);
  animation: float var(--dur, 14s) ease-in-out infinite; animation-delay: var(--delay, 0s);
  opacity: .9;
}
.droplet::after { content: ""; position: absolute; width: 22%; height: 14%; left: 22%; top: 18%; border-radius: 50%; background: rgba(255,255,255,.9); filter: blur(1px); transform: rotate(-30deg); }
.d1 { width: 104px; height: 104px; left: 36%; top: 16%; --dur: 16s; }
.d2 { width: 64px; height: 64px; left: 30%; top: 62%; --dur: 13s; --delay: -4s; }
.d3 { width: 38px; height: 38px; left: 52%; top: 74%; --dur: 11s; --delay: -7s; }
.d4 { width: 84px; height: 84px; left: 57%; top: 80%; --dur: 18s; --delay: -2s; }
.d5 { width: 26px; height: 26px; left: 44%; top: 40%; --dur: 10s; --delay: -6s; }
.d6 { width: 54px; height: 54px; right: 42%; top: 8%; --dur: 15s; --delay: -9s; }
.hero .layer-grain { z-index: 6; opacity: .05; mix-blend-mode: multiply; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence baseFrequency='.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='120' height='120' filter='url(%23n)' opacity='.9'/%3E%3C/svg%3E"); }

.hero-content { position: relative; z-index: 10; padding-block: clamp(72px, 10vw, 140px); }
.hero-inner { max-width: 560px; display: grid; gap: 22px; }
.hero h1 { font-size: clamp(2.4rem, 5.2vw, 4.4rem); line-height: 1.05; }
.hero .lead { font-size: clamp(1.02rem, 1.4vw, 1.2rem); color: var(--text-2); max-width: 46ch; }
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 8px; }
.hero-note { font-size: .82rem; color: var(--muted); display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.hero-credit { position: absolute; z-index: 11; bottom: 14px; inset-inline-start: 16px; font-size: .68rem; color: var(--text-2); background: color-mix(in srgb, var(--bg) 70%, transparent); padding: 4px 10px; border-radius: 999px; pointer-events: none; }
/* Headline block is pinned over the photo's negative space (left third) in both directions */
html[dir="rtl"] .hero-content .hero-inner { margin-inline-start: 0; text-align: right; }
@media (min-width: 1025px) { html[dir="rtl"] .hero-content .container { display: flex; justify-content: flex-end; } html[dir="rtl"] .hero-inner { direction: rtl; } }

@keyframes float { 0%, 100% { transform: translate3d(0, 0, 0) scale(1); } 33% { transform: translate3d(8px, -18px, 0) scale(1.03); } 66% { transform: translate3d(-6px, 10px, 0) scale(.98); } }
@keyframes sway { 0%, 100% { rotate: 0deg; } 50% { rotate: 3deg; } }

/* Pause when offscreen or disabled */
.hero.is-paused .droplet, .hero.is-paused .layer-botanical svg { animation-play-state: paused; }
html[data-motion="off"] .hero .droplet, html[data-motion="off"] .hero .layer-botanical svg { animation: none !important; }
html[data-motion="off"] .hero .layer { transform: none !important; transition: none !important; }
html[data-motion="off"] .hero .layer-droplets .d3, html[data-motion="off"] .hero .layer-droplets .d5, html[data-motion="off"] .hero .layer-droplets .d6 { display: none; }
@media (prefers-reduced-motion: reduce) {
  .hero .droplet, .hero .layer-botanical svg { animation: none !important; }
  .hero .layer { transform: none !important; transition: none !important; }
  .hero .d3, .hero .d5, .hero .d6 { display: none; }
  * { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
/* Mobile: smaller layers, no pointer parallax (JS also disables tracking) */
@media (max-width: 820px) {
  .hero { min-height: auto; }
  .hero .layer-photo { inset: 0; transform: none !important; }
  .hero .layer-photo img { object-position: var(--focal-mobile, 68% 22%); }
  .hero .layer-wash { background: linear-gradient(180deg, transparent 0%, transparent 38%, var(--hero-wash-2) 62%); }
  .hero .layer-light, .hero .layer-grain, .hero .d1, .hero .d4, .hero .d6, .hero .leaf-2 { display: none; }
  .hero .layer-droplets { transform: none !important; }
  .hero .d2 { left: 8%; top: 46%; width: 42px; height: 42px; }
  .hero .d3 { left: 78%; top: 52%; }
  .hero .d5 { left: 20%; top: 58%; }
  .hero-content { padding-top: min(58vh, 500px); padding-bottom: 44px; }
  .hero h1 { font-size: clamp(2rem, 9vw, 2.8rem); }
  .hero-inner { max-width: none; }
  html[dir="rtl"] .hero-content .container { display: block; }
}

/* ---------- USP strip ---------- */
.usp { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; margin-top: -32px; position: relative; z-index: 12; }
.usp-item { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-m); padding: 18px 20px; display: flex; gap: 14px; align-items: flex-start; box-shadow: var(--shadow-s); }
.usp-item svg { width: 26px; height: 26px; flex: none; stroke: var(--accent); fill: none; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; margin-top: 2px; }
.usp-item strong { display: block; font-size: .98rem; }
.usp-item span { color: var(--text-2); font-size: .88rem; }
@media (max-width: 820px) { .usp { margin-top: 20px; } }

/* ---------- Needs ---------- */
.needs-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 26px; }
.needs-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-l); padding: clamp(22px, 3vw, 36px); }
.needs-card h3 { font-size: 1.5rem; margin-bottom: 6px; }
.needs-card p { color: var(--text-2); margin-bottom: 18px; }
.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.needs-sub { font-size: .8rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin: 18px 0 8px; font-weight: 600; }
html[lang="ar"] .needs-sub { letter-spacing: .02em; }
@media (max-width: 820px) { .needs-grid { grid-template-columns: 1fr; } }

/* ---------- Product cards ---------- */
.product-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(16px, 2.2vw, 28px); }
@media (max-width: 1100px) { .product-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 760px) { .product-grid { grid-template-columns: repeat(2, 1fr); gap: 14px; } }
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-m); overflow: hidden;
  display: flex; flex-direction: column; transition: transform .3s var(--ease), box-shadow .3s var(--ease);
  position: relative;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.card-media { position: relative; aspect-ratio: 4/5; background: var(--surface-2); display: grid; place-items: center; overflow: hidden; }
.card-media img { width: 72%; height: 82%; object-fit: contain; transition: transform .5s var(--ease); }
.card:hover .card-media img { transform: translateY(-4px) scale(1.03); }
.card-tags { position: absolute; top: 12px; inset-inline-start: 12px; display: flex; gap: 6px; flex-wrap: wrap; }
.provisional { position: absolute; bottom: 8px; inset-inline-end: 10px; font-size: .62rem; color: var(--muted); letter-spacing: .06em; text-transform: uppercase; }
html[lang="ar"] .provisional { letter-spacing: 0; }
.card-body { padding: 16px 18px 18px; display: grid; gap: 6px; flex: 1; }
.card-brand { font-size: .74rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
html[lang="ar"] .card-brand { letter-spacing: 0; }
.card-name { font-size: 1.05rem; font-weight: 600; font-family: var(--font-body); line-height: 1.35; }
.card-name a::after { content: ""; position: absolute; inset: 0; }
.card-attrs { font-size: .8rem; color: var(--text-2); }
.card-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: auto; padding-top: 8px; }
.price { font-weight: 700; font-size: 1.08rem; display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.price s { color: var(--muted); font-weight: 400; font-size: .88rem; }
.price .cur { font-size: .74rem; font-weight: 600; color: var(--text-2); }
.card .add-btn { position: relative; z-index: 2; width: 42px; height: 42px; border-radius: 50%; background: var(--text); color: var(--bg); display: grid; place-items: center; transition: transform .2s var(--ease), background .2s; }
.card .add-btn:hover { transform: scale(1.06); background: var(--accent); color: var(--accent-ink); }
.card .add-btn svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 2; }
.card .add-btn[disabled] { opacity: .4; cursor: not-allowed; }
.no-reviews { font-size: .76rem; color: var(--muted); }

/* ---------- Feature bands (campaign B & C placements) ---------- */
.feature { display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(28px, 5vw, 72px); align-items: center; }
.feature.reverse .feature-media { order: 2; }
.feature-media { position: relative; border-radius: var(--radius-l); overflow: hidden; aspect-ratio: 4/3; background: var(--surface-2); box-shadow: var(--shadow); }
.feature-media img, .feature-media picture { width: 100%; height: 100%; object-fit: cover; }
.feature-media .placeholder-art { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; padding: 28px; gap: 12px;
  background: radial-gradient(80% 80% at 30% 20%, var(--accent-soft), transparent 70%), linear-gradient(160deg, var(--surface-2), var(--bg-2)); }
.feature-media .placeholder-art svg { width: 80px; height: 80px; stroke: var(--accent); fill: none; stroke-width: 1.2; opacity: .8; }
.feature-media .placeholder-art strong { font-family: var(--font-display); font-size: 1.4rem; }
.feature-media .placeholder-art small { color: var(--text-2); max-width: 34ch; line-height: 1.5; }
.feature-body h2 { font-size: clamp(1.9rem, 3.2vw, 2.7rem); margin: .4rem 0 1rem; }
.feature-body p { color: var(--text-2); font-size: 1.05rem; max-width: 52ch; }
.feature-body ul { margin: 18px 0 26px; padding: 0; list-style: none; display: grid; gap: 10px; }
.feature-body li { display: flex; gap: 10px; align-items: flex-start; }
.feature-body li::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); margin-top: .55em; flex: none; }
@media (max-width: 900px) { .feature { grid-template-columns: 1fr; } .feature.reverse .feature-media { order: 0; } }

/* ---------- Delivery & payments ---------- */
.info-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 26px; }
.info-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-l); padding: clamp(22px, 3vw, 34px); }
.info-card h3 { font-size: 1.45rem; margin-bottom: 14px; }
.zone-table { width: 100%; border-collapse: collapse; font-size: .95rem; }
.zone-table th, .zone-table td { text-align: start; padding: 10px 6px; border-bottom: 1px solid var(--line); }
.zone-table th { font-size: .78rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
html[lang="ar"] .zone-table th { letter-spacing: 0; }
.pay-list { display: grid; gap: 10px; list-style: none; padding: 0; margin: 0; }
.pay-list li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 12px; border-radius: var(--radius-s); background: var(--surface-2); }
.pay-list .status { font-size: .74rem; font-weight: 600; padding: 4px 10px; border-radius: 999px; white-space: nowrap; }
.status.ok { background: rgba(79,127,90,.14); color: var(--success); }
.status.pending { background: rgba(201,164,106,.2); color: #8a6a2e; }
html[data-theme="dark"] .status.pending { color: var(--gold); }
.status.off { background: var(--line); color: var(--text-2); }
.footnote { font-size: .82rem; color: var(--muted); margin-top: 14px; line-height: 1.5; }
@media (max-width: 900px) { .info-grid { grid-template-columns: 1fr; } }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); background: var(--bg-2); padding: clamp(44px, 6vw, 80px) 0 32px; margin-top: var(--section-gap); }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 32px; }
.footer-grid h4 { font-family: var(--font-body); font-size: .8rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-bottom: 14px; }
html[lang="ar"] .footer-grid h4 { letter-spacing: 0; font-size: .9rem; }
.footer-grid ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.footer-grid a:hover { color: var(--accent); }
.footer-bottom { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-top: 40px; padding-top: 22px; border-top: 1px solid var(--line); font-size: .82rem; color: var(--muted); }
@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .footer-grid { grid-template-columns: 1fr; } }

/* ---------- Catalog ---------- */
.catalog-head { padding: clamp(28px, 4vw, 56px) 0 20px; }
.catalog-layout { display: grid; grid-template-columns: 280px 1fr; gap: clamp(24px, 3vw, 44px); align-items: start; padding-bottom: var(--section-gap); }
.filters { position: sticky; top: 92px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-l); padding: 22px; display: grid; gap: 22px; max-height: calc(100vh - 110px); overflow: auto; }
.filters-head { display: flex; justify-content: space-between; align-items: center; }
.filters-head h2 { font-size: 1.3rem; }
.filter-group { display: grid; gap: 10px; }
.filter-group > legend, .filter-group > h3 { font-family: var(--font-body); font-size: .8rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); font-weight: 600; padding: 0; }
html[lang="ar"] .filter-group > h3 { letter-spacing: 0; font-size: .9rem; }
fieldset.filter-group { border: 0; padding: 0; margin: 0; }
.check { display: flex; align-items: center; gap: 10px; font-size: .95rem; cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--accent); margin: 0; }
.check .n { margin-inline-start: auto; color: var(--muted); font-size: .78rem; }
.range-row { display: flex; gap: 8px; align-items: center; }
.range-row input { width: 100%; border: 1px solid var(--line); border-radius: var(--radius-s); padding: 9px 10px; background: var(--surface-2); }
.toolbar { display: flex; justify-content: space-between; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 18px; }
.result-count { color: var(--text-2); }
.result-count b { color: var(--text); }
.toolbar select { border: 1px solid var(--line); border-radius: 999px; padding: 10px 16px; background: var(--surface); }
.active-chips { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.active-chips .chip { padding: 6px 12px; font-size: .84rem; }
.active-chips .chip button { display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; background: var(--line); font-size: .7rem; }
.filters-open-btn { display: none; }
.state { padding: 60px 20px; text-align: center; border: 1px dashed var(--line); border-radius: var(--radius-l); color: var(--text-2); display: grid; gap: 12px; justify-items: center; }
.state h3 { font-size: 1.5rem; color: var(--text); }
.skeleton .card-media { background: linear-gradient(90deg, var(--surface-2) 25%, var(--bg-2) 50%, var(--surface-2) 75%); background-size: 200% 100%; animation: shimmer 1.2s infinite; }
.skeleton .line { height: 12px; border-radius: 6px; background: var(--surface-2); margin: 6px 0; }
@keyframes shimmer { to { background-position: -200% 0; } }
@media (max-width: 900px) {
  .catalog-layout { grid-template-columns: 1fr; }
  .filters-open-btn { display: inline-flex; }
  .filters { position: fixed; inset: 0 auto 0 0; z-index: 80; width: min(88vw, 380px); max-height: none; border-radius: 0; transform: translateX(-100%); visibility: hidden; transition: transform .3s var(--ease), visibility 0s linear .3s; top: 0; }
  html[dir="rtl"] .filters { inset: 0 0 0 auto; transform: translateX(100%); }
  .filters.open { transform: none; visibility: visible; transition-delay: 0s; }
  .filters-backdrop { position: fixed; inset: 0; background: var(--scrim); z-index: 79; opacity: 0; pointer-events: none; transition: opacity .25s; }
  .filters-backdrop.show { opacity: 1; pointer-events: auto; }
}
.filters-close { display: none; }
@media (max-width: 900px) { .filters-close { display: inline-grid; } }

/* ---------- Product page ---------- */
.breadcrumbs { font-size: .86rem; color: var(--muted); padding: 22px 0 0; display: flex; gap: 8px; flex-wrap: wrap; }
.breadcrumbs a:hover { color: var(--accent); }
.pdp { display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(28px, 5vw, 72px); padding: 28px 0 var(--section-gap); align-items: start; }
.gallery { position: sticky; top: 96px; display: grid; gap: 14px; }
.gallery-main { position: relative; aspect-ratio: 1/1; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-l); overflow: hidden; display: grid; place-items: center; cursor: zoom-in; }
.gallery-main img { width: 68%; height: 80%; object-fit: contain; transition: transform .2s ease-out; transform-origin: var(--zx, 50%) var(--zy, 50%); }
.gallery-main.zoomed img { transform: scale(2); cursor: zoom-out; }
.gallery-main .provisional { bottom: 12px; }
.thumbs { display: flex; gap: 10px; flex-wrap: wrap; }
.thumbs button { width: 72px; height: 72px; border-radius: var(--radius-s); border: 1px solid var(--line); background: var(--surface); padding: 8px; overflow: hidden; }
.thumbs button[aria-current="true"] { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft); }
.thumbs img { width: 100%; height: 100%; object-fit: contain; }
.pdp-info { display: grid; gap: 18px; }
.pdp-info h1 { font-size: clamp(1.9rem, 3.2vw, 2.7rem); font-family: var(--font-display); }
.pdp-brand { font-size: .8rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
html[lang="ar"] .pdp-brand { letter-spacing: 0; }
.pdp-short { color: var(--text-2); font-size: 1.05rem; }
.pdp-price { font-size: 1.7rem; }
.pdp-meta { font-size: .84rem; color: var(--muted); display: flex; gap: 14px; flex-wrap: wrap; }
.variants { display: flex; gap: 10px; flex-wrap: wrap; }
.variant { padding: 10px 16px; border-radius: var(--radius-s); border: 1px solid var(--line); background: var(--surface); display: grid; gap: 2px; text-align: start; min-width: 110px; }
.variant small { color: var(--muted); font-size: .76rem; }
.variant[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-soft); }
.variant.out { opacity: .5; text-decoration: line-through; }
.stock-line { font-size: .9rem; display: flex; gap: 8px; align-items: center; }
.stock-line .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--success); }
.stock-line.low .dot { background: var(--gold); }
.stock-line.out .dot { background: var(--danger); }
.buy-row { display: flex; gap: 12px; align-items: stretch; flex-wrap: wrap; }
.qty { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); }
.qty button { width: 44px; height: 48px; font-size: 1.2rem; }
.qty input { width: 44px; text-align: center; border: 0; background: transparent; font-weight: 600; -moz-appearance: textfield; }
.qty input::-webkit-inner-spin-button { display: none; }
.buy-row .btn { flex: 1; min-width: 200px; }
.attr-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.attr-chips .chip { padding: 6px 12px; font-size: .82rem; }
.accordion { border-top: 1px solid var(--line); }
.accordion details { border-bottom: 1px solid var(--line); }
.accordion summary { list-style: none; cursor: pointer; padding: 18px 0; display: flex; justify-content: space-between; align-items: center; font-weight: 600; font-size: 1.02rem; }
.accordion summary::-webkit-details-marker { display: none; }
.accordion summary::after { content: "+"; font-size: 1.4rem; color: var(--accent); font-weight: 300; transition: transform .25s; }
.accordion details[open] summary::after { transform: rotate(45deg); }
.accordion .acc-body { padding: 0 0 20px; color: var(--text-2); display: grid; gap: 10px; }
.origin-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.origin-grid div { background: var(--surface-2); border-radius: var(--radius-s); padding: 12px 14px; }
.origin-grid small { display: block; color: var(--muted); font-size: .74rem; letter-spacing: .06em; text-transform: uppercase; }
html[lang="ar"] .origin-grid small { letter-spacing: 0; }
.reviews-empty { background: var(--surface); border: 1px dashed var(--line); border-radius: var(--radius-l); padding: 34px; text-align: center; color: var(--text-2); display: grid; gap: 8px; }
@media (max-width: 900px) { .pdp { grid-template-columns: 1fr; } .gallery { position: static; } }

/* ---------- Cart drawer ---------- */
.drawer-backdrop { position: fixed; inset: 0; background: var(--scrim); z-index: 90; opacity: 0; pointer-events: none; transition: opacity .25s; }
.drawer-backdrop.show { opacity: 1; pointer-events: auto; }
.cart-drawer {
  position: fixed; top: 0; bottom: 0; inset-inline-end: 0; width: min(94vw, 440px); background: var(--bg); z-index: 95;
  transform: translateX(100%); transition: transform .35s var(--ease), visibility 0s linear .35s; visibility: hidden; display: flex; flex-direction: column; box-shadow: var(--shadow);
}
html[dir="rtl"] .cart-drawer { transform: translateX(-100%); }
.cart-drawer.open { transform: none; visibility: visible; transition-delay: 0s; }
.cart-head { display: flex; justify-content: space-between; align-items: center; padding: 20px 22px; border-bottom: 1px solid var(--line); }
.cart-head h2 { font-size: 1.5rem; }
.cart-lines { flex: 1; overflow: auto; padding: 16px 22px; display: grid; gap: 14px; align-content: start; }
.cart-line { display: grid; grid-template-columns: 72px 1fr auto; gap: 14px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-m); padding: 12px; }
.cart-line img { width: 72px; height: 72px; object-fit: contain; background: var(--surface-2); border-radius: var(--radius-s); padding: 6px; }
.cart-line .name { font-weight: 600; font-size: .95rem; line-height: 1.3; }
.cart-line .var { font-size: .8rem; color: var(--muted); }
.cart-line .qty { margin-top: 8px; }
.cart-line .qty button { width: 34px; height: 34px; font-size: 1rem; }
.cart-line .qty input { width: 32px; }
.cart-line .rm { color: var(--muted); font-size: .8rem; text-decoration: underline; margin-top: 6px; }
.cart-line .line-price { font-weight: 700; text-align: end; }
.cart-foot { border-top: 1px solid var(--line); padding: 18px 22px 22px; display: grid; gap: 10px; }
.cart-foot .row { display: flex; justify-content: space-between; color: var(--text-2); font-size: .95rem; }
.cart-foot .row.total { color: var(--text); font-weight: 700; font-size: 1.15rem; }
.cart-empty { text-align: center; padding: 60px 20px; color: var(--text-2); display: grid; gap: 12px; justify-items: center; }
.cart-empty svg { width: 56px; height: 56px; stroke: var(--muted); fill: none; stroke-width: 1.2; }

/* ---------- Dialog / toast ---------- */
dialog.sheet { border: 0; border-radius: var(--radius-l); padding: 0; background: var(--surface); color: var(--text); width: min(92vw, 520px); box-shadow: var(--shadow); }
dialog.sheet::backdrop { background: var(--scrim); }
dialog.sheet .sheet-body { padding: 30px; display: grid; gap: 14px; }
dialog.sheet h3 { font-size: 1.6rem; }
dialog.sheet p { color: var(--text-2); }
dialog.sheet ul { margin: 0; padding-inline-start: 20px; color: var(--text-2); display: grid; gap: 6px; }
.toast { position: fixed; bottom: 24px; inset-inline-start: 50%; transform: translate(-50%, 20px); background: var(--text); color: var(--bg); padding: 12px 20px; border-radius: 999px; font-size: .92rem; z-index: 200; opacity: 0; transition: all .3s var(--ease); pointer-events: none; box-shadow: var(--shadow); }
html[dir="rtl"] .toast { transform: translate(50%, 20px); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
html[dir="rtl"] .toast.show { transform: translate(50%, 0); }

/* ---------- Preview settings panel (demo of admin controls) ---------- */
.settings-fab { position: fixed; bottom: 22px; inset-inline-end: 22px; z-index: 60; width: 52px; height: 52px; border-radius: 50%; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); display: grid; place-items: center; }
.settings-fab svg { width: 22px; height: 22px; stroke: var(--text); fill: none; stroke-width: 1.6; }
.settings-panel { position: fixed; bottom: 86px; inset-inline-end: 22px; z-index: 60; width: min(92vw, 340px); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-l); box-shadow: var(--shadow); padding: 20px; display: grid; gap: 14px; transform: translateY(12px); opacity: 0; pointer-events: none; transition: all .25s var(--ease); }
.settings-panel.open { transform: none; opacity: 1; pointer-events: auto; visibility: visible; }
.settings-panel:not(.open) { visibility: hidden; }
.settings-panel h3 { font-size: 1.2rem; }
.settings-panel .row { display: flex; justify-content: space-between; align-items: center; gap: 12px; font-size: .92rem; }
.settings-panel input[type="range"] { width: 130px; accent-color: var(--accent); }
.switch { position: relative; width: 44px; height: 26px; border-radius: 999px; background: var(--line); transition: background .2s; flex: none; }
.switch::after { content: ""; position: absolute; top: 3px; inset-inline-start: 3px; width: 20px; height: 20px; border-radius: 50%; background: var(--surface); box-shadow: 0 1px 4px rgba(0,0,0,.25); transition: transform .2s; }
.switch[aria-checked="true"] { background: var(--accent); }
.switch[aria-checked="true"]::after { transform: translateX(18px); }
html[dir="rtl"] .switch[aria-checked="true"]::after { transform: translateX(-18px); }
.settings-panel .note { font-size: .76rem; color: var(--muted); line-height: 1.45; }
.settings-panel .file { font-size: .84rem; }

/* ---------- Info pages ---------- */
.prose { max-width: 72ch; display: grid; gap: 14px; color: var(--text-2); }
.prose h2 { color: var(--text); font-size: 1.8rem; margin-top: 18px; }
.prose h3 { color: var(--text); font-size: 1.25rem; font-family: var(--font-body); }
.form { display: grid; gap: 14px; max-width: 640px; }
.form label { display: grid; gap: 6px; font-size: .9rem; font-weight: 600; }
.form input, .form select, .form textarea { border: 1px solid var(--line); border-radius: var(--radius-s); padding: 12px 14px; background: var(--surface); font-weight: 400; }
.form .two { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 560px) { .form .two { grid-template-columns: 1fr; } }
.callout { border-inline-start: 4px solid var(--accent); background: var(--accent-soft); padding: 14px 18px; border-radius: var(--radius-s); color: var(--text-2); font-size: .95rem; }
.callout.warn { border-color: var(--gold); background: rgba(201,164,106,.14); }

/* ---------- Draft results module (hidden from storefront) ---------- */
.draft-banner { background: repeating-linear-gradient(135deg, rgba(201,164,106,.25) 0 12px, rgba(201,164,106,.12) 12px 24px); border: 1px solid var(--gold); border-radius: var(--radius-m); padding: 16px 20px; font-weight: 600; }
.compare { position: relative; border-radius: var(--radius-l); overflow: hidden; box-shadow: var(--shadow); }
.compare .disclosure { position: absolute; inset: auto 0 0 0; background: rgba(42,35,32,.86); color: #fff; padding: 12px 18px; font-weight: 600; text-align: center; font-size: .95rem; }
.compare-labels { display: grid; grid-template-columns: 1fr 1fr; text-align: center; font-family: var(--font-display); font-size: 1.2rem; padding: 12px 0 0; }
