/* Bare Beauty — mobile-first styles. Logical properties throughout so Arabic (RTL) mirrors for free. */

/* ---------- Tokens ---------- */
:root {
  --bg: #f8f2ee;
  --bg-2: #f2e7e1;          /* sampled from the logo background */
  --surface: #fffbf8;
  --ink: #3a2b24;
  --brown: #5b463b;         /* logo letterforms */
  --muted: #86726a;
  --line: #e7d9d0;
  --accent: #a5806c;
  --blush: #ecd8cd;
  --wa: #24704f;
  --wa-hover: #1c5a3f;
  --danger: #9a4a3c;

  --serif: 'Cormorant Garamond', 'Times New Roman', serif;
  --sans: 'Jost', system-ui, -apple-system, 'Segoe UI', sans-serif;

  --radius: 18px;
  --radius-sm: 12px;
  --gutter: 16px;
  --maxw: 1240px;
  --header-h: 60px;

  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --ease-in-out: cubic-bezier(.65, 0, .35, 1);
  --ease-spring: cubic-bezier(.34, 1.4, .64, 1);
  --dirx: 1;                 /* flips horizontal motion in RTL */

  --shadow-sm: 0 1px 2px rgb(58 43 36 / .06), 0 2px 8px rgb(58 43 36 / .05);
  --shadow: 0 10px 30px -12px rgb(58 43 36 / .25);
  --shadow-lg: 0 30px 60px -20px rgb(58 43 36 / .35);
}
:root[dir='rtl'] { --dirx: -1; }
:root[lang='ar'] {
  /* Latin font first: it has no Arabic glyphs, so Arabic falls through to Amiri/Tajawal while brand names stay in the Latin face */
  --serif: 'Cormorant Garamond', 'Amiri', 'Noto Naskh Arabic', serif;
  --sans: 'Jost', 'Tajawal', system-ui, 'Segoe UI', sans-serif;
}
@media (min-width: 700px) { :root { --gutter: 28px; --header-h: 72px; } }

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 12px); }
html.sheet-open { overflow: hidden; }
body {
  margin: 0; min-height: 100dvh; background: var(--bg); color: var(--ink);
  font: 400 16px/1.6 var(--sans); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  overflow-x: clip;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; -webkit-tap-highlight-color: transparent; }
a { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 2px solid var(--brown); outline-offset: 3px; border-radius: 6px; }
::selection { background: var(--blush); }
h1, h2, h3 { font-family: var(--serif); font-weight: 400; line-height: 1.1; margin: 0; letter-spacing: -.01em; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
.container { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.tnum { font-variant-numeric: lining-nums tabular-nums; }
/* Cormorant defaults to old-style figures ("2,1oo") — prices and counts need lining digits */
.product-price, .drawer-total strong, .type-count, .step-num, .price { font-variant-numeric: lining-nums tabular-nums; }
.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; }
.icon { width: 1.25em; height: 1.25em; flex: none; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
[dir='rtl'] .flip-rtl { transform: scaleX(-1); }

/* Arabic script must never be letter-spaced (it breaks letter joining) or upper-cased. */
:root[lang='ar'] body * { letter-spacing: 0 !important; text-transform: none !important; }
:root[lang='ar'] .logo-word { letter-spacing: var(--logo-track) !important; }
:root[lang='ar'] .marquee-track a { letter-spacing: .14em !important; }
:root[lang='ar'] body { line-height: 1.75; }
:root[lang='ar'] h1, :root[lang='ar'] h2, :root[lang='ar'] h3 { line-height: 1.35; }

/* Hide copy for a moment while Arabic strings load, so English never flashes. */
.i18n-pending body { opacity: 0; animation: unhide 0s 1.2s forwards; } /* failsafe if JS never runs */
body { transition: opacity .25s ease; }
@keyframes unhide { to { opacity: 1; } }

.skip-link { position: absolute; inset-inline-start: 12px; top: -60px; z-index: 100; background: var(--ink); color: var(--surface); padding: 10px 16px; border-radius: 10px; transition: top .2s; }
.skip-link:focus { top: 12px; }

/* ---------- Buttons ---------- */
.btn {
  --b: var(--ink);
  display: inline-flex; align-items: center; justify-content: center; gap: .55em;
  min-height: 48px; padding: 0 22px; border-radius: 999px; border: 1px solid var(--b);
  font-weight: 500; font-size: .95rem; letter-spacing: .02em; white-space: nowrap;
  transition: background-color .25s, color .25s, border-color .25s, transform .2s var(--ease-out), box-shadow .25s;
  user-select: none;
}
.btn:active:not(:disabled) { transform: scale(.97); }
.btn:disabled { cursor: default; }
.btn-dark { background: var(--ink); color: var(--surface); }
.btn-outline { background: transparent; color: var(--ink); }
.btn-wa { --b: var(--wa); background: var(--wa); color: #fff; }
.btn-block { width: 100%; }
.btn-grow { flex: 1; }
.btn-sm { min-height: 40px; padding: 0 16px; font-size: .9rem; }
.btn .icon-arrow { transition: transform .3s var(--ease-out); }
@media (hover: hover) {
  .btn-dark:hover:not(:disabled) { background: var(--brown); border-color: var(--brown); box-shadow: var(--shadow); }
  .btn-outline:hover { background: var(--ink); color: var(--surface); }
  .btn-wa:hover { background: var(--wa-hover); border-color: var(--wa-hover); box-shadow: 0 10px 24px -10px rgb(36 112 79 / .6); }
  .btn:hover .icon-arrow { transform: translateX(calc(4px * var(--dirx))) scaleX(var(--dirx)); }
}
.btn-dark.is-done { background: var(--surface); color: var(--ink); border-color: var(--line); }
.icon-btn {
  display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 50%;
  background: transparent; border: 0; color: var(--ink); position: relative; transition: background-color .2s, transform .2s var(--ease-out);
}
.icon-btn:active { transform: scale(.92); }
@media (hover: hover) { .icon-btn:hover { background: rgb(58 43 36 / .06); } }
.icon-btn-sm { width: 36px; height: 36px; color: var(--muted); }
.link-btn { background: none; border: 0; padding: 6px 0; color: var(--muted); text-decoration: underline; text-underline-offset: 3px; font-size: .9rem; }
.link-btn:hover { color: var(--ink); }

/* ---------- Header ---------- */
#site-header { display: contents; }
.announce { background: var(--ink); color: var(--bg-2); font-size: .8rem; letter-spacing: .03em; }
.announce p { display: flex; align-items: center; justify-content: center; gap: .5em; padding: 8px var(--gutter); text-align: center; }
.announce .icon { width: 1.1em; height: 1.1em; }
.site-header {
  position: sticky; top: 0; z-index: 40; height: var(--header-h);
  background: rgb(248 242 238 / .82); backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid transparent;
  transition: transform .45s var(--ease-out), border-color .3s, box-shadow .3s;
  view-transition-name: site-header;
}
.is-scrolled .site-header { border-color: var(--line); box-shadow: 0 6px 20px -16px rgb(58 43 36 / .4); }
.header-hidden .site-header { transform: translateY(-100%); }
.header-inner { height: 100%; display: flex; align-items: center; gap: 8px; }
.logo { display: flex; align-items: center; gap: 10px; margin-inline-end: auto; padding: 4px 0; }
.logo-mark { width: 34px; height: 34px; }
.logo-word { --logo-track: .3em; font-family: 'Cormorant Garamond', serif; font-weight: 500; font-size: 1.05rem; letter-spacing: var(--logo-track); color: var(--brown); white-space: nowrap; }
.menu-btn { margin-inline-start: -10px; }
.main-nav { display: none; }
.header-actions { display: flex; align-items: center; gap: 2px; }
.lang-btn {
  min-width: 44px; height: 36px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface);
  font-size: .85rem; font-weight: 500; transition: background-color .2s, border-color .2s, transform .2s var(--ease-out);
}
.lang-btn[lang='ar'] { font-family: 'Tajawal', sans-serif; }
.lang-btn[lang='en'] { font-family: 'Jost', sans-serif; }
.lang-btn:active { transform: scale(.95); }
@media (hover: hover) { .lang-btn:hover { border-color: var(--accent); } }
.bag-count {
  position: absolute; top: 4px; inset-inline-end: 2px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px;
  background: var(--brown); color: var(--surface); font-size: .7rem; font-weight: 500; line-height: 18px; text-align: center;
  transform: scale(0); transition: transform .35s var(--ease-spring);
}
.bag-count.has-items { transform: scale(1); }
/* Phones: search lives in the shop toolbar, so the header keeps menu, logo, language and bag */
@media (max-width: 699px) { .search-btn { display: none; } }
@media (max-width: 420px) {
  .header-inner { gap: 4px; }
  .logo { gap: 8px; }
  .logo-word { --logo-track: .2em; font-size: .85rem; }
  .logo-mark { width: 30px; height: 30px; }
  .lang-btn { padding: 0 10px; font-size: .8rem; }
}
@media (max-width: 359px) { .logo-word { display: none; } }

@media (min-width: 1100px) {
  .menu-btn { display: none; }
  .logo { margin-inline-end: 0; }
  .main-nav { display: flex; align-items: center; gap: 6px; margin-inline: auto; }
  .nav-link {
    position: relative; display: inline-flex; align-items: center; gap: 4px; padding: 10px 12px; background: none; border: 0; white-space: nowrap;
    font-size: .92rem; letter-spacing: .02em; color: var(--ink);
  }
  .nav-link::after {
    content: ''; position: absolute; inset-inline: 12px; bottom: 4px; height: 1px; background: currentColor;
    transform: scaleX(0); transform-origin: var(--origin, left); transition: transform .35s var(--ease-out);
  }
  [dir='rtl'] .nav-link::after { --origin: right; }
  .nav-link:hover::after, .nav-link[aria-current='page']::after, .nav-shop-wrap.is-open .nav-shop::after { transform: scaleX(1); }
  .nav-shop .icon { width: 1em; height: 1em; transition: transform .3s var(--ease-out); }
  .nav-shop-wrap.is-open .nav-shop .icon { transform: rotate(180deg); }
}

/* Mega menu (desktop) */
.mega {
  position: fixed; inset-inline: 0; top: var(--header-h); background: var(--surface); border-block: 1px solid var(--line);
  box-shadow: var(--shadow-lg); opacity: 0; visibility: hidden; transform: translateY(-8px);
  transition: opacity .3s var(--ease-out), transform .4s var(--ease-out), visibility 0s .3s;
}
.nav-shop-wrap.is-open .mega { opacity: 1; visibility: visible; transform: none; transition-delay: 0s; }
.mega-inner { display: grid; grid-template-columns: 1.1fr 1fr 1.3fr 260px; gap: 40px; padding-block: 36px 40px; }
.mega-title { font-size: .75rem; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); margin-bottom: 14px; }
.mega-col a { display: inline-block; padding: 5px 0; font-size: .95rem; transition: color .2s, transform .3s var(--ease-out); }
.mega-col a:hover { color: var(--accent); transform: translateX(calc(4px * var(--dirx))); }
.mega-brands ul { columns: 2; column-gap: 24px; }
.mega-feature { position: relative; border-radius: var(--radius); overflow: hidden; align-self: start; }
.mega-feature img { width: 100%; aspect-ratio: 2 / 3; object-fit: cover; transition: transform .8s var(--ease-out); }
.mega-feature:hover img { transform: scale(1.05); }
.mega-feature-label {
  position: absolute; inset-inline: 12px; bottom: 12px; display: flex; justify-content: space-between; align-items: center;
  padding: 12px 16px; border-radius: 999px; background: rgb(255 251 248 / .9); backdrop-filter: blur(8px); font-weight: 500;
}

/* Floating "view order" pill */
.order-pill {
  position: fixed; z-index: 35; inset-inline: var(--gutter); bottom: calc(14px + env(safe-area-inset-bottom));
  display: flex; align-items: center; gap: 12px; padding: 8px 8px 8px 8px; padding-inline-end: 18px;
  border: 0; border-radius: 999px; background: var(--ink); color: var(--surface); box-shadow: var(--shadow-lg);
  transform: translateY(160%); opacity: 0; transition: transform .55s var(--ease-spring), opacity .3s;
  text-align: start;
}
.order-pill.is-visible { transform: none; opacity: 1; }
.order-pill-icon { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: rgb(255 255 255 / .12); }
.order-pill-text { display: flex; flex-direction: column; line-height: 1.2; font-size: .85rem; }
.order-pill-text strong { font-weight: 500; }
.order-pill-total { opacity: .75; font-variant-numeric: tabular-nums; }
.order-pill-cta { margin-inline-start: auto; display: inline-flex; align-items: center; gap: 6px; font-size: .9rem; font-weight: 500; }
@media (min-width: 700px) {
  .order-pill { inset-inline: auto var(--gutter); inset-inline-end: 28px; bottom: 28px; min-width: 320px; }
}
.sheet-open .order-pill { opacity: 0; pointer-events: none; }

/* Item flying into the bag */
.fly-ghost { position: fixed; z-index: 90; object-fit: cover; pointer-events: none; border-radius: 14px; box-shadow: var(--shadow); }

/* ---------- Sheets (dialogs): menu, order drawer, filters ---------- */
dialog.sheet {
  position: fixed; margin: 0; padding: 0; border: 0; max-width: none; max-height: none;
  background: var(--surface); color: var(--ink); display: flex; flex-direction: column;
  inset: auto 0 0 0; width: 100%; max-height: 92dvh; border-radius: 24px 24px 0 0;
  transform: translateY(100%); transition: transform .5s var(--ease-out);
  box-shadow: var(--shadow-lg); overscroll-behavior: contain;
}
dialog.sheet:not([open]) { display: none; }
dialog.sheet.is-open { transform: none; }
dialog.sheet::backdrop { background: rgb(40 28 22 / 0); backdrop-filter: blur(0); transition: background-color .4s, backdrop-filter .4s; }
dialog.sheet.is-open::backdrop { background: rgb(40 28 22 / .38); backdrop-filter: blur(3px); }
.sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 12px 12px; padding-inline-start: 22px; border-bottom: 1px solid var(--line); }
.sheet-head h2 { font-size: 1.6rem; }
.sheet-body { overflow-y: auto; padding: 8px 22px 20px; flex: 1; overscroll-behavior: contain; }
.sheet-foot { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 22px calc(14px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); }
.sheet-foot .btn { flex: 1; }
/* drag handle look on bottom sheets */
dialog.sheet.drawer::before, dialog.sheet.filter-sheet::before {
  content: ''; position: absolute; top: 7px; left: 50%; width: 40px; height: 4px; border-radius: 4px; background: var(--line); transform: translateX(-50%);
}

/* Mobile menu slides in from the start edge, full height */
dialog.menu-sheet { inset: 0 auto 0 0; inset-inline-start: 0; width: min(88vw, 420px); height: 100dvh; max-height: none; border-radius: 0; transform: translateX(calc(-100% * var(--dirx))); }
[dir='rtl'] dialog.menu-sheet { inset: 0 0 0 auto; }
dialog.menu-sheet.is-open { transform: none; }
.menu-body { flex: 1; overflow-y: auto; padding: 8px 22px; }
.menu-big { display: flex; justify-content: space-between; align-items: center; padding: 18px 0; font-family: var(--serif); font-size: 1.9rem; border-bottom: 1px solid var(--line); }
.menu-acc { border-bottom: 1px solid var(--line); }
.menu-acc summary, .acc summary, .order-details summary {
  list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 16px 0; cursor: pointer; font-size: 1.05rem;
}
.menu-acc summary::-webkit-details-marker, .acc summary::-webkit-details-marker, .order-details summary::-webkit-details-marker { display: none; }
.menu-acc summary .icon, .acc summary .icon, .order-details summary .icon { transition: transform .35s var(--ease-out); }
.menu-acc[open] summary .icon, .acc[open] summary .icon, .order-details[open] summary .icon { transform: rotate(45deg); }
.menu-acc ul { padding-bottom: 12px; display: grid; gap: 2px; }
.menu-acc li a { display: block; padding: 8px 0; color: var(--muted); }
.menu-acc li a:hover { color: var(--ink); }
.menu-acc[open] ul { animation: drop-in .45s var(--ease-out); }
.menu-link { display: block; padding: 16px 0; border-bottom: 1px solid var(--line); font-size: 1.05rem; }
.menu-foot { display: grid; gap: 10px; padding: 16px 22px calc(18px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); }
.lang-btn-lg { height: 48px; }
/* stagger menu items in */
.menu-sheet .menu-body > * { opacity: 0; transform: translateX(calc(-16px * var(--dirx))); transition: opacity .4s, transform .5s var(--ease-out); }
.menu-sheet.is-open .menu-body > * { opacity: 1; transform: none; }
.menu-sheet.is-open .menu-body > :nth-child(2) { transition-delay: .04s; }
.menu-sheet.is-open .menu-body > :nth-child(3) { transition-delay: .08s; }
.menu-sheet.is-open .menu-body > :nth-child(4) { transition-delay: .12s; }
.menu-sheet.is-open .menu-body > :nth-child(5) { transition-delay: .16s; }
.menu-sheet.is-open .menu-body > :nth-child(6) { transition-delay: .2s; }
.menu-sheet.is-open .menu-body > :nth-child(7) { transition-delay: .24s; }

@keyframes drop-in { from { opacity: 0; transform: translateY(-6px); } }

/* Order drawer: bottom sheet on phones, side panel from the end edge on larger screens */
.drawer-title { font-size: 1.7rem; }
.drawer-body { flex: 1; overflow-y: auto; padding: 4px 22px 16px; overscroll-behavior: contain; }
.drawer-foot { padding: 16px 22px calc(16px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); display: grid; gap: 10px; background: var(--surface); }
.drawer-total { display: flex; justify-content: space-between; align-items: baseline; font-size: 1.05rem; }
.drawer-total strong { font-family: var(--serif); font-size: 1.6rem; font-weight: 500; }
.drawer-help { text-align: center; }
.order-lines { display: grid; }
.order-line { display: grid; grid-template-columns: 72px minmax(0, 1fr) auto; gap: 14px; padding: 16px 0; border-bottom: 1px solid var(--line); animation: line-in .45s var(--ease-out) both; }
.order-line-img img { width: 72px; height: 90px; object-fit: cover; border-radius: 10px; background: var(--bg-2); }
.order-line-name { display: block; font-size: .95rem; line-height: 1.35; margin-block: 2px 2px; }
.order-line-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 8px; }
@media (max-width: 360px) {
  .order-line { grid-template-columns: 56px minmax(0, 1fr) auto; gap: 10px; }
  .order-line-img img { width: 56px; height: 70px; }
}
.order-line-sub { font-weight: 500; font-variant-numeric: tabular-nums; white-space: nowrap; }
@keyframes line-in { from { opacity: 0; transform: translateY(8px); } }
.order-details { margin-top: 8px; border-bottom: 1px solid var(--line); }
.order-details .field { margin-bottom: 14px; }
.drawer-empty { display: grid; justify-items: center; text-align: center; gap: 10px; padding: 48px 12px; }
.drawer-empty-title { font-family: var(--serif); font-size: 1.6rem; }
.drawer-empty .btn { margin-top: 10px; }
.empty-mark { display: grid; place-items: center; width: 72px; height: 72px; border-radius: 50%; background: var(--bg-2); color: var(--brown); animation: float 5s var(--ease-in-out) infinite; }
.empty-mark .icon { width: 30px; height: 30px; }
@media (min-width: 700px) {
  dialog.sheet.drawer { inset: 0 0 0 auto; width: min(460px, 100vw); height: 100dvh; max-height: none; border-radius: 0; transform: translateX(calc(100% * var(--dirx))); }
  [dir='rtl'] dialog.sheet.drawer { inset: 0 auto 0 0; }
  dialog.sheet.drawer.is-open { transform: none; }
  dialog.sheet.drawer::before { display: none; }
}

/* Forms */
.field { display: grid; gap: 6px; }
.field label { font-size: .82rem; color: var(--muted); }
.field input, .field textarea, .search input, select {
  width: 100%; min-height: 46px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg);
  font-size: 16px; /* 16px stops iOS zooming on focus */ transition: border-color .2s, box-shadow .2s, background-color .2s;
}
.field textarea { resize: vertical; min-height: 70px; }
.field input:focus, .field textarea:focus, .search input:focus, select:focus { outline: none; border-color: var(--accent); background: var(--surface); box-shadow: 0 0 0 4px rgb(165 128 108 / .15); }

/* Toasts */
.toasts { position: fixed; z-index: 95; inset-inline: 0; top: calc(var(--header-h) + 10px); display: grid; justify-items: center; gap: 8px; pointer-events: none; padding-inline: var(--gutter); }
.toast {
  display: flex; align-items: center; gap: 10px; padding: 12px 18px; border-radius: 999px; background: var(--ink); color: var(--surface);
  box-shadow: var(--shadow-lg); font-size: .9rem; max-width: 520px;
  opacity: 0; transform: translateY(-12px) scale(.96); transition: opacity .3s, transform .45s var(--ease-spring);
}
.toast.is-in { opacity: 1; transform: none; }
.toast-ok .icon { color: #b9e4cd; }

/* ---------- Motion helpers ---------- */
[data-reveal] { opacity: 0; transform: translateY(22px); transition: opacity .8s var(--ease-out), transform .9s var(--ease-out); transition-delay: calc(var(--i, 0) * 60ms); }
[data-reveal].is-in { opacity: 1; transform: none; }
html:not(.js) [data-reveal] { opacity: 1; transform: none; }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Sections ---------- */
.section { padding-block: 64px; }
@media (min-width: 900px) { .section { padding-block: 96px; } }
.section-alt { background: var(--bg-2); }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 28px; flex-wrap: wrap; }
.section-head-center { flex-direction: column; align-items: center; text-align: center; }
.eyebrow { font-size: .75rem; letter-spacing: .22em; text-transform: uppercase; color: var(--accent); margin-bottom: 12px; }
.eyebrow-sm { font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.section-title { font-size: clamp(2.1rem, 6vw, 3.4rem); }
.section-sub { color: var(--muted); margin-top: 10px; max-width: 46ch; }
.head-actions { display: flex; align-items: center; gap: 8px; }
.rail-btn { border: 1px solid var(--line); background: var(--surface); }
.rail-btn:disabled { opacity: .35; cursor: default; }
@media (max-width: 699px) { .rail-btn { display: none; } }
.text-link { display: inline-flex; align-items: center; gap: 6px; font-weight: 500; border-bottom: 1px solid currentColor; padding-bottom: 2px; }
.text-link .icon { transition: transform .3s var(--ease-out); }
.text-link:hover .icon { transform: translateX(calc(4px * var(--dirx))) scaleX(var(--dirx)); }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; padding-block: 28px 56px; }
.hero::before { /* soft blush glow */
  content: ''; position: absolute; inset: -20% -10% auto auto; width: 80vw; height: 80vw; max-width: 760px; max-height: 760px;
  background: radial-gradient(closest-side, rgb(236 216 205 / .9), transparent); pointer-events: none;
}
[dir='rtl'] .hero::before { inset: -20% auto auto -10%; }
.hero-inner { position: relative; display: grid; gap: 36px; }
.hero-title { font-size: clamp(3.3rem, 15vw, 7.4rem); line-height: .95; color: var(--brown); margin-block: 6px 20px; }
.hero-title .line { display: block; overflow: hidden; padding-bottom: .06em; }
.hero-title .line > * { display: inline-block; transform: translateY(140%); transition: transform 1.1s var(--ease-out); } /* 140%: tall Arabic glyphs overhang their box */
.hero-title em { font-style: italic; font-weight: 300; color: var(--accent); }
:root[lang='ar'] .hero-title { font-size: clamp(3rem, 13vw, 6.2rem); line-height: 1.2; }
:root[lang='ar'] .hero-title em { font-style: normal; }
.is-ready .hero-title .line > * { transform: none; }
.is-ready .hero-title .line:nth-child(2) > * { transition-delay: .1s; }
.is-ready .hero-title .line:nth-child(3) > * { transition-delay: .2s; }
.hero-anim { opacity: 0; transform: translateY(16px); transition: opacity .9s var(--ease-out) .35s, transform 1s var(--ease-out) .35s; }
.hero-anim + .hero-anim { transition-delay: .45s; }
.hero-anim + .hero-anim + .hero-anim { transition-delay: .55s; }
.is-ready .hero-anim { opacity: 1; transform: none; }
.hero-sub { font-size: 1.08rem; max-width: 40ch; color: var(--muted); }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }

.hero-visual { position: relative; height: 420px; max-width: 520px; width: 100%; margin-inline: auto; }
.hero-arch {
  position: absolute; inset: 6% 16% 0; border-radius: 999px 999px 24px 24px; background: linear-gradient(180deg, var(--blush), var(--bg-2));
  transform: scaleY(.2); transform-origin: bottom; opacity: 0; transition: transform 1.3s var(--ease-out) .1s, opacity .8s .1s;
}
.is-ready .hero-arch { transform: none; opacity: 1; }
.hero-arch img { position: absolute; left: 50%; top: 16%; width: 46%; transform: translateX(-50%); opacity: .35; }
.hero-card { position: absolute; margin: 0; transform: translate(var(--px, 0), var(--py, 0)); will-change: transform; }
.hero-card .float { animation: float 7s var(--ease-in-out) infinite; }
.hero-card img {
  width: 100%; border-radius: 20px; box-shadow: var(--shadow-lg); aspect-ratio: 4 / 5; object-fit: cover;
  clip-path: inset(100% 0 0 0 round 20px); transition: clip-path 1.3s var(--ease-out);
}
.is-ready .hero-card img { clip-path: inset(0 0 0 0 round 20px); }
.hc-1 { width: 46%; inset-inline-start: 4%; top: 18%; z-index: 2; }
.hc-1 img { transition-delay: .35s; }
.hc-2 { width: 38%; inset-inline-end: 2%; top: 2%; }
.hc-2 .float { animation-delay: -2.5s; }
.hc-2 img { transition-delay: .5s; }
.hc-3 { width: 34%; inset-inline-end: 10%; bottom: 0; z-index: 3; }
.hc-3 .float { animation-delay: -4.5s; animation-duration: 8s; }
.hc-3 img { transition-delay: .65s; }
.hero-badge { position: absolute; z-index: 4; inset-inline-start: 0; bottom: 4%; width: 112px; height: 112px; opacity: 0; transform: scale(.6); transition: opacity .8s 1s, transform 1s var(--ease-spring) 1s; }
.is-ready .hero-badge { opacity: 1; transform: none; }
.hero-badge svg { width: 100%; height: 100%; animation: spin 26s linear infinite; direction: ltr; } /* English ring text vanishes if it inherits RTL */
.hero-badge text { font: 500 9px 'Jost', sans-serif; fill: var(--brown); text-transform: uppercase; }
.hero-badge .badge-core { position: absolute; inset: 26%; border-radius: 50%; background: var(--surface); display: grid; place-items: center; box-shadow: var(--shadow-sm); }
.hero-badge .badge-core img { width: 70%; }
@media (min-width: 900px) {
  .hero { padding-block: 56px 96px; }
  .hero-inner { grid-template-columns: 1.05fr 1fr; align-items: center; gap: 48px; }
  .hero-visual { height: 560px; }
  .hero-badge { width: 140px; height: 140px; }
}

/* ---------- Brand marquee ---------- */
.marquee { border-block: 1px solid var(--line); background: var(--surface); overflow: hidden; padding-block: 18px; }
.marquee-inner { display: flex; width: max-content; }
.marquee-track { display: flex; align-items: center; gap: 36px; padding-inline-end: 36px; animation: marquee 38s linear infinite; }
.marquee-track li { display: flex; align-items: center; gap: 36px; }
.marquee-track a { font-family: 'Cormorant Garamond', serif; font-size: 1.5rem; letter-spacing: .14em; text-transform: uppercase; color: var(--brown); white-space: nowrap; transition: color .2s; }
.marquee-track a:hover { color: var(--accent); }
.marquee-track .icon { width: 14px; height: 14px; color: var(--accent); }
.marquee:hover .marquee-track, .marquee:focus-within .marquee-track { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(calc(-100% * var(--dirx))); } }

/* ---------- Shop by concern tiles ---------- */
.concern-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.concern-tile { position: relative; display: block; border-radius: var(--radius); overflow: hidden; isolation: isolate; background: var(--bg-2); }
.concern-img img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; transition: transform 1s var(--ease-out); }
.concern-label {
  position: absolute; z-index: 1; inset-inline: 8px; bottom: 8px; display: grid; gap: 2px; padding: 10px 12px; border-radius: 14px;
  background: rgb(255 251 248 / .88); backdrop-filter: blur(10px) saturate(1.3); -webkit-backdrop-filter: blur(10px) saturate(1.3);
  color: var(--ink); box-shadow: 0 6px 18px -10px rgb(58 43 36 / .35); transition: background-color .35s, color .35s;
}
.concern-name { font-family: var(--serif); font-size: 1.2rem; line-height: 1.12; color: var(--brown); transition: color .35s; }
.concern-count { display: inline-flex; align-items: center; gap: 6px; font-size: .75rem; color: var(--muted); letter-spacing: .03em; transition: color .35s; }
.concern-count .icon { width: 1em; height: 1em; transition: transform .35s var(--ease-out); }
.concern-tile:active { transform: scale(.98); transition: transform .2s; }
@media (hover: hover) {
  .concern-tile:hover img { transform: scale(1.07); }
  .concern-tile:hover .concern-label { background: var(--ink); }
  .concern-tile:hover .concern-name { color: var(--surface); }
  .concern-tile:hover .concern-count { color: var(--blush); }
  .concern-tile:hover .concern-count .icon { transform: translateX(calc(4px * var(--dirx))) scaleX(var(--dirx)); }
}
@media (min-width: 700px) { .concern-grid { grid-template-columns: repeat(3, 1fr); gap: 16px; } }
@media (min-width: 1000px) { .concern-grid { grid-template-columns: repeat(5, 1fr); } .concern-name { font-size: 1.3rem; } }

/* ---------- Product cards / grids / rails ---------- */
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px 12px; }
@media (min-width: 700px) { .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 36px 20px; } }
.rail {
  display: grid; grid-auto-flow: column; grid-auto-columns: 62%; gap: 14px; overflow-x: auto; overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory; scrollbar-width: none; padding-bottom: 6px;
  margin-inline: calc(var(--gutter) * -1); padding-inline: var(--gutter); scroll-padding-inline: var(--gutter);
}
.rail::-webkit-scrollbar { display: none; }
.rail > * { scroll-snap-align: start; }
@media (min-width: 700px) { .rail { grid-auto-columns: calc((100% - 2 * 20px) / 3.2); gap: 20px; } }
@media (min-width: 1100px) { .rail { grid-auto-columns: calc((100% - 3 * 20px) / 4); margin-inline: 0; padding-inline: 0; } }

.card { display: flex; flex-direction: column; min-width: 0; }
.card-media { position: relative; display: block; border-radius: var(--radius); overflow: hidden; background: var(--bg-2); aspect-ratio: 4 / 5; isolation: isolate; }
.card-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .9s var(--ease-out), opacity .5s; }
.card-img-alt { opacity: 0; }
@media (hover: hover) {
  .card:hover .card-img { transform: scale(1.05); }
  .card:hover .card-img-alt { opacity: 1; }
}
.badge { position: absolute; z-index: 2; inset-inline-start: 10px; top: 10px; padding: 4px 10px; border-radius: 999px; font-size: .72rem; font-weight: 500; background: var(--surface); }
.badge-out { color: var(--danger); }
.badge-low { color: var(--brown); background: var(--blush); }
.badge-inline { position: static; display: inline-block; vertical-align: middle; }
.product-price-row { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; }
.badge-lg { position: static; display: inline-block; font-size: .85rem; margin-bottom: 12px; }
.card-body { display: flex; flex-direction: column; flex: 1; padding-top: 12px; }
.card-brand { font-size: .7rem; letter-spacing: .16em; text-transform: uppercase; color: var(--accent); }
.card-title { font-family: var(--sans); font-weight: 400; font-size: .95rem; line-height: 1.35; margin-top: 4px; letter-spacing: 0; }
.card-title a { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card-title a::before { content: ''; } /* keeps clamp happy in Safari */
.card-meta { font-size: .8rem; color: var(--muted); margin-top: 2px; }
.card-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: auto; padding-top: 10px; flex-wrap: wrap; }
.price { font-weight: 500; font-size: .98rem; }
.add-btn {
  display: inline-flex; align-items: center; gap: 4px; height: 36px; padding: 0 14px; padding-inline-start: 10px; border-radius: 999px;
  border: 1px solid var(--ink); background: transparent; font-size: .85rem; font-weight: 500;
  transition: background-color .25s, color .25s, transform .2s var(--ease-out);
}
.add-btn .icon { width: 1.05em; height: 1.05em; transition: transform .4s var(--ease-spring); }
.add-btn:active { transform: scale(.94); }
@media (hover: hover) { .add-btn:hover { background: var(--ink); color: var(--surface); } .add-btn:hover .icon { transform: rotate(90deg); } }
@media (max-width: 380px) { .add-btn span { display: none; } .add-btn { padding: 0; width: 36px; justify-content: center; } }

/* Stepper */
.stepper { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); animation: pop-in .35s var(--ease-spring); }
.stepper button { display: grid; place-items: center; width: 34px; height: 34px; border: 0; border-radius: 50%; background: none; transition: background-color .2s, transform .15s; }
.stepper button:active:not(:disabled) { transform: scale(.88); }
.stepper button:disabled { opacity: .3; cursor: default; }
@media (hover: hover) { .stepper button:hover:not(:disabled) { background: var(--bg-2); } }
.stepper output { min-width: 22px; text-align: center; font-weight: 500; font-size: .92rem; }
.stepper .icon { width: 1em; height: 1em; }
.stepper-lg button { width: 46px; height: 46px; }
.stepper-lg output { min-width: 30px; font-size: 1rem; }
@keyframes pop-in { from { transform: scale(.85); opacity: 0; } }

/* ---------- Shop by type ---------- */
.type-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.type-tile {
  position: relative; display: flex; align-items: flex-end; justify-content: space-between; gap: 8px; min-height: 104px; padding: 16px 18px;
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); overflow: hidden; isolation: isolate;
  transition: border-color .3s, transform .3s var(--ease-out), color .3s;
}
.type-tile::before { content: ''; position: absolute; inset: 0; z-index: -1; background: var(--ink); transform: translateY(101%); transition: transform .5s var(--ease-out); }
.type-name { font-family: var(--serif); font-size: 1.3rem; line-height: 1.1; }
.type-count { font-family: var(--serif); font-size: 2rem; line-height: 1; color: var(--accent); transition: color .3s; }
.type-tile:active { transform: scale(.98); }
@media (hover: hover) {
  .type-tile:hover { color: var(--surface); border-color: var(--ink); }
  .type-tile:hover::before { transform: none; }
  .type-tile:hover .type-count { color: var(--blush); }
}
@media (min-width: 700px) { .type-grid { grid-template-columns: repeat(4, 1fr); gap: 14px; } .type-tile { min-height: 140px; } }

/* ---------- How it works ---------- */
.steps { display: grid; gap: 14px; counter-reset: step; }
.step { position: relative; padding: 26px 22px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); }
.step-num { font-family: 'Cormorant Garamond', serif; font-size: 3.2rem; line-height: 1; color: var(--blush); position: absolute; inset-inline-end: 18px; top: 12px; }
.step-icon { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; background: var(--bg-2); color: var(--brown); margin-bottom: 16px; }
.step-icon .icon { width: 22px; height: 22px; }
.step h3 { font-size: 1.5rem; margin-bottom: 6px; }
.step p { color: var(--muted); }
@media (min-width: 800px) { .steps { grid-template-columns: repeat(3, 1fr); gap: 20px; } }

/* ---------- TikTok band ---------- */
.band { background: var(--ink); color: var(--bg-2); border-radius: 28px; padding: 40px 24px; display: grid; gap: 22px; justify-items: center; text-align: center; position: relative; overflow: hidden; }
.band::before { content: ''; position: absolute; width: 420px; height: 420px; border-radius: 50%; background: radial-gradient(closest-side, rgb(165 128 108 / .35), transparent); top: -200px; inset-inline-end: -120px; }
.band h2 { font-size: clamp(2rem, 6vw, 3rem); color: var(--surface); position: relative; }
.band .btn-outline { --b: var(--bg-2); color: var(--bg-2); position: relative; }
@media (hover: hover) { .band .btn-outline:hover { background: var(--bg-2); color: var(--ink); } }
.band .eyebrow { color: var(--blush); margin: 0; position: relative; }

/* ---------- Page heads ---------- */
.page-head { padding-block: 32px 16px; }
.page-title { font-size: clamp(2.4rem, 9vw, 4.2rem); color: var(--brown); }
.page-head .muted { margin-top: 8px; max-width: 52ch; }
@media (min-width: 900px) { .page-head { padding-block: 56px 24px; } }

/* ---------- Shop ---------- */
.chips-wrap { position: relative; }
.chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding-block: 6px 14px; scroll-snap-type: x proximity; scroll-padding-inline: var(--gutter); }
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: none; display: inline-flex; align-items: center; gap: 8px; height: 44px; padding: 4px 16px 4px 4px; padding-inline: 4px 16px;
  border-radius: 999px; border: 1px solid var(--line); background: var(--surface); font-size: .88rem; white-space: nowrap; scroll-snap-align: start;
  transition: background-color .3s, color .3s, border-color .3s, transform .2s var(--ease-out);
}
.chip img { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; }
.chip > .icon { width: 34px; height: 18px; color: var(--accent); }
.chip:active { transform: scale(.96); }
.chip[aria-pressed='true'] { background: var(--ink); color: var(--surface); border-color: var(--ink); }
@media (hover: hover) { .chip:hover:not([aria-pressed='true']) { border-color: var(--accent); } }

.shop-toolbar { position: sticky; top: var(--header-h); z-index: 20; display: flex; align-items: center; gap: 8px; padding-block: 10px; background: rgb(248 242 238 / .9); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); transition: top .45s var(--ease-out); }
.header-hidden .shop-toolbar { top: 0; }
.filter-btn { flex: none; position: relative; }
.filter-n:empty { display: none; }
.filter-n { display: inline-grid; place-items: center; min-width: 20px; height: 20px; border-radius: 999px; background: var(--brown); color: var(--surface); font-size: .72rem; }
.search { position: relative; flex: 1; min-width: 0; }
.search .icon { position: absolute; inset-inline-start: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.search input { padding-inline-start: 42px; border-radius: 999px; background: var(--surface); }
.search input::-webkit-search-cancel-button { cursor: pointer; }
.sort { flex: none; }
.sort select {
  appearance: none; -webkit-appearance: none; border-radius: 999px; background: var(--surface); padding-inline: 14px 34px; width: auto; max-width: 170px; cursor: pointer;
  background-image: linear-gradient(45deg, transparent 50%, var(--ink) 50%), linear-gradient(135deg, var(--ink) 50%, transparent 50%);
  background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%; background-size: 5px 5px; background-repeat: no-repeat;
}
[dir='rtl'] .sort select { padding-inline: 34px 14px; background-position: 18px 50%, 13px 50%; background-image: linear-gradient(135deg, var(--ink) 50%, transparent 50%), linear-gradient(45deg, transparent 50%, var(--ink) 50%); }
.sort-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
@media (max-width: 560px) { .sort select { max-width: 48px; color: transparent; padding-inline: 0; background-position: 50% 50%, calc(50% + 5px) 50%; } [dir='rtl'] .sort select { background-position: calc(50% - 5px) 50%, 50% 50%; } .sort select option { color: var(--ink); } }

.shop-layout { display: grid; gap: 28px; padding-bottom: 96px; }
.shop-side { display: none; }
.shop-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; min-height: 40px; margin-block: 6px 16px; }
.active-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.pill { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 10px 0 12px; padding-inline: 12px 10px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); font-size: .82rem; animation: pop-in .3s var(--ease-spring); }
.pill .icon { width: .95em; height: .95em; color: var(--muted); }
.pill:hover { border-color: var(--accent); }
@media (min-width: 1000px) {
  .filter-btn { display: none; }
  .shop-layout { grid-template-columns: 230px 1fr; gap: 44px; }
  .shop-side { display: block; position: sticky; top: calc(var(--header-h) + 80px); align-self: start; max-height: calc(100dvh - var(--header-h) - 100px); overflow-y: auto; scrollbar-width: none; }
}

.facet { border: 0; padding: 0; margin: 0 0 26px; min-width: 0; }
.facet-title { font-size: .72rem; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; padding: 0; }
.facet-opt {
  width: 100%; display: flex; align-items: center; gap: 10px; padding: 7px 4px; border: 0; background: none; text-align: start; font-size: .92rem;
  border-radius: 8px; transition: color .2s, background-color .2s;
}
.facet-opt:disabled { opacity: .35; cursor: default; }
.facet-dot { width: 14px; height: 14px; flex: none; border-radius: 50%; border: 1px solid var(--muted); position: relative; transition: border-color .2s; }
.facet-dot::after { content: ''; position: absolute; inset: 3px; border-radius: 50%; background: var(--ink); transform: scale(0); transition: transform .3s var(--ease-spring); }
.facet-opt[aria-pressed='true'] .facet-dot { border-color: var(--ink); }
.facet-opt[aria-pressed='true'] .facet-dot::after { transform: scale(1); }
.facet-opt[aria-pressed='true'] { font-weight: 500; }
.facet-label { flex: 1; }
.facet-n { font-size: .78rem; color: var(--muted); }
@media (hover: hover) { .facet-opt:hover:not(:disabled) { background: var(--bg-2); } }
.filter-sheet .sheet-body { padding-top: 18px; }

.empty, .load-error { grid-column: 1 / -1; display: grid; justify-items: center; text-align: center; gap: 10px; padding: 56px 16px; }
.empty-title { font-family: var(--serif); font-size: 1.8rem; }
.empty .btn, .load-error .btn { margin-top: 10px; }
.load-error .icon { width: 28px; height: 28px; color: var(--accent); }

/* ---------- Product page ---------- */
.crumbs { display: flex; flex-wrap: wrap; gap: 8px; padding-block: 18px 14px; font-size: .82rem; color: var(--muted); }
.crumbs a:hover { color: var(--ink); }
.product { display: grid; gap: 26px; padding-bottom: 40px; }
.gallery { min-width: 0; }
.gallery-track {
  display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; border-radius: 22px; background: var(--bg-2);
  margin-inline: calc(var(--gutter) * -1); border-radius: 0;
}
.gallery-track::-webkit-scrollbar { display: none; }
.gallery-slide { flex: 0 0 100%; margin: 0; scroll-snap-align: start; }
.gallery-slide img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }
.vt-hero-target, .vt-hero { view-transition-name: product-hero; }
.gallery-thumbs { display: flex; gap: 8px; margin-top: 12px; justify-content: center; }
.gallery-thumb { width: 54px; padding: 0; border: 1px solid transparent; border-radius: 10px; overflow: hidden; background: none; opacity: .55; transition: opacity .3s, border-color .3s, transform .2s; }
.gallery-thumb img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }
.gallery-thumb[aria-current='true'] { opacity: 1; border-color: var(--brown); }
.gallery-thumb:active { transform: scale(.94); }
.product-info { display: flex; flex-direction: column; gap: 14px; }
.product-info > * { animation: rise .6s var(--ease-out) both; }
.product-info > :nth-child(2) { animation-delay: .03s; } .product-info > :nth-child(3) { animation-delay: .06s; }
.product-info > :nth-child(4) { animation-delay: .09s; } .product-info > :nth-child(5) { animation-delay: .12s; }
.product-info > :nth-child(6) { animation-delay: .15s; } .product-info > :nth-child(n+7) { animation-delay: .18s; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } }
.product-brand { font-size: .78rem; letter-spacing: .2em; text-transform: uppercase; color: var(--accent); align-self: flex-start; }
.product-brand:hover { text-decoration: underline; text-underline-offset: 4px; }
.product-name { font-size: clamp(2rem, 7vw, 3rem); color: var(--brown); line-height: 1.08; }
.product-price { font-family: var(--serif); font-size: 1.9rem; font-weight: 500; }
.product-desc { font-size: 1.05rem; color: #5d4c44; max-width: 56ch; }
.tag-row { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.tag { display: inline-block; padding: 6px 14px; border-radius: 999px; background: var(--bg-2); font-size: .85rem; transition: background-color .25s, color .25s; }
.tag:hover { background: var(--ink); color: var(--surface); }
.buy { display: grid; gap: 10px; margin-top: 6px; }
.buy-row { display: flex; gap: 10px; }
.buy-row .btn { min-height: 48px; }
.product-note { display: flex; align-items: center; gap: 8px; }
.accordions { border-top: 1px solid var(--line); margin-top: 8px; }
.acc { border-bottom: 1px solid var(--line); }
.acc summary { font-weight: 500; }
.acc-body { padding-bottom: 18px; color: #5d4c44; }
.acc[open] .acc-body { animation: drop-in .4s var(--ease-out); }
.ingredients { display: flex; flex-wrap: wrap; gap: 6px; }
.ingredients li { padding: 5px 12px; border: 1px solid var(--line); border-radius: 999px; font-size: .85rem; }
.related { padding-top: 24px; }
@media (min-width: 900px) {
  .product { grid-template-columns: 1.1fr 1fr; gap: 56px; align-items: start; }
  .gallery { position: sticky; top: calc(var(--header-h) + 20px); display: grid; grid-template-columns: 72px 1fr; gap: 14px; }
  .gallery-track { grid-column: 2; grid-row: 1; margin-inline: 0; border-radius: 24px; }
  .gallery-thumbs { grid-column: 1; grid-row: 1; flex-direction: column; justify-content: flex-start; margin-top: 0; }
  .gallery-thumb { width: 72px; }
  .product-info { padding-top: 12px; }
}

/* ---------- Content pages (about / contact / faq) ---------- */
.prose { max-width: 62ch; display: grid; gap: 18px; font-size: 1.08rem; color: #5d4c44; margin-top: 24px; }
.about-grid { display: grid; gap: 36px; align-items: center; }
.about-img { border-radius: 999px 999px 28px 28px; overflow: hidden; background: var(--bg-2); }
.about-img img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }
.values { display: grid; gap: 14px; margin-top: 8px; }
.value { padding: 24px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); }
.value .step-icon { margin-bottom: 12px; }
.value h3 { font-size: 1.5rem; margin-bottom: 4px; }
.value p { color: var(--muted); }
@media (min-width: 900px) { .about-grid { grid-template-columns: 1fr 1.1fr; gap: 64px; } .values { grid-template-columns: repeat(3, 1fr); gap: 20px; } }

.contact-grid { display: grid; gap: 14px; }
.contact-card { display: grid; gap: 10px; align-content: start; padding: 26px 22px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); transition: transform .4s var(--ease-out), box-shadow .4s; }
a.contact-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.contact-card h2 { font-size: 1.6rem; }
.contact-card .step-icon { margin-bottom: 4px; }
.contact-card .text-link { justify-self: start; margin-top: 6px; }
.contact-wa { background: var(--ink); color: var(--bg-2); border-color: var(--ink); }
.contact-wa .step-icon { background: rgb(255 255 255 / .1); color: var(--surface); }
.contact-wa h2 { color: var(--surface); }
.qr { display: none; }
@media (min-width: 800px) {
  .contact-grid { grid-template-columns: 1.3fr 1fr 1fr; gap: 20px; }
  .contact-wa { grid-row: span 2; }
  .qr { display: block; margin-top: 16px; background: #fff; border-radius: 16px; padding: 14px; max-width: 240px; }
  .qr img { width: 100%; }
  .qr p { color: var(--ink); font-size: .8rem; text-align: center; margin-top: 6px; }
}

.faq-list { max-width: 760px; border-top: 1px solid var(--line); }
.faq-list .acc summary { font-family: var(--serif); font-size: 1.35rem; font-weight: 400; padding-block: 20px; }
.faq-cta { margin-top: 40px; display: flex; flex-wrap: wrap; align-items: center; gap: 16px; }
.faq-cta p { font-family: var(--serif); font-size: 1.6rem; }

.notfound { min-height: 60vh; display: grid; place-content: center; justify-items: center; text-align: center; gap: 14px; padding-block: 64px; }
.notfound img { width: 140px; animation: float 6s var(--ease-in-out) infinite; }

/* ---------- Admin (admin.html) ---------- */
.admin { display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; padding-bottom: 96px; } /* minmax: the wide table must scroll, not stretch the page */
.admin-status { display: grid; gap: 14px; }
.admin-source { display: flex; align-items: center; gap: 14px; padding: 18px 20px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); }
.admin-dot { width: 12px; height: 12px; flex: none; border-radius: 50%; background: #c9a227; box-shadow: 0 0 0 5px rgb(201 162 39 / .18); }
.admin-source.is-live .admin-dot { background: var(--wa); box-shadow: 0 0 0 5px rgb(36 112 79 / .18); animation: pulse 2.4s var(--ease-in-out) infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 9px rgb(36 112 79 / .05); } }
.admin-stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.admin-stat { display: grid; gap: 2px; padding: 16px 18px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); }
.admin-stat strong { font-family: var(--serif); font-size: 2.2rem; font-weight: 500; line-height: 1; color: var(--brown); }
.admin-stat span { font-size: .82rem; color: var(--muted); }
.admin-stat.is-bad strong { color: var(--danger); }
@media (min-width: 800px) { .admin-stats { grid-template-columns: repeat(4, 1fr); } }
.admin-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.btn.is-disabled { opacity: .45; cursor: not-allowed; }
.admin-card { padding: 22px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); }
.admin-card h2 { font-size: 1.7rem; margin-bottom: 12px; }
.admin-ok { display: flex; align-items: center; gap: 10px; color: var(--wa); }
.admin-gap { margin-top: 14px; }
.admin-issues { display: grid; gap: 8px; }
.issue { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border-radius: 12px; background: var(--bg); border-inline-start: 3px solid var(--line); }
.issue-error { border-color: var(--danger); background: #f9ece8; }
.issue-warn { border-color: #c9a227; }
.issue-row { flex: none; font-size: .75rem; font-weight: 500; padding: 3px 8px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); }
.admin-howto { border-top: 1px solid var(--line); }
.admin-steps { padding-inline-start: 20px; list-style: decimal; display: grid; gap: 6px; }
.admin-table-wrap { overflow-x: auto; margin-inline: -8px; }
.admin-table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.admin-table th { text-align: start; font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); font-weight: 500; padding: 8px; border-bottom: 1px solid var(--line); }
.admin-table td { padding: 8px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.admin-table img { width: 44px; height: 55px; object-fit: cover; border-radius: 8px; background: var(--bg-2); }
.admin-table a:hover { text-decoration: underline; }

/* ---------- Privacy policy ---------- */
.policy-body { max-width: 760px; display: grid; gap: 14px; }
.policy-block { padding: 22px 24px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); }
.policy-block h2 { font-size: 1.5rem; margin-bottom: 8px; color: var(--brown); }
.policy-block p { color: #5d4c44; }
.policy-lead { background: var(--ink); border-color: var(--ink); }
.policy-lead h2 { color: var(--surface); }
.policy-lead p { color: var(--bg-2); font-size: 1.05rem; }
.policy-cta { margin-top: 16px; }

/* ---------- Loading skeletons (while the product sheet loads) ---------- */
.skel { position: relative; overflow: hidden; background: var(--bg-2); border-radius: 10px; }
.skel::after {
  content: ''; position: absolute; inset: 0; transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, rgb(255 251 248 / .7), transparent);
  animation: shimmer 1.4s var(--ease-in-out) infinite;
}
[dir='rtl'] .skel::after { animation-direction: reverse; }
@keyframes shimmer { to { transform: translateX(100%); } }
.skel-card { gap: 10px; }
.skel-media { aspect-ratio: 4 / 5; border-radius: var(--radius); }
.skel-line { height: 12px; width: 85%; }
.skel-short { width: 40%; }
.skel-title { height: 34px; width: 90%; }
.skel-price { width: 30%; height: 16px; }
.skel-tile { aspect-ratio: 4 / 5; border-radius: var(--radius); }
.skel-gallery { aspect-ratio: 4 / 5; border-radius: 24px; }
.skel-info { display: grid; gap: 14px; align-content: start; padding-top: 12px; }
.skel-button { height: 48px; border-radius: 999px; }

/* ---------- Order form states ---------- */
.form-error {
  display: flex; align-items: center; flex-wrap: wrap; gap: 8px 10px; padding: 12px 14px; border-radius: 12px;
  background: #f9ece8; color: var(--danger); border: 1px solid #ecc9bf; font-size: .88rem;
}
.form-error[hidden] { display: none; }
.form-error p { flex: 1; min-width: 160px; }
.form-error .icon { width: 1.1em; height: 1.1em; }
.btn.is-sending { opacity: .75; pointer-events: none; }
.btn.is-sending .icon { animation: spin 1s linear infinite; }
.inline-link { text-decoration: underline; text-underline-offset: 3px; color: var(--ink); }

/* ---------- Thank-you page ---------- */
.thanks { display: grid; gap: 40px; padding-block: 40px 96px; justify-items: center; }
.thanks-card { display: grid; justify-items: center; text-align: center; gap: 10px; max-width: 560px; }
.thanks-check { width: 88px; height: 88px; margin-bottom: 8px; }
.thanks-ring { fill: var(--blush); stroke: var(--brown); stroke-width: 2; stroke-dasharray: 227; stroke-dashoffset: 227; animation: draw .9s var(--ease-out) .1s forwards; }
.thanks-tick { fill: none; stroke: var(--brown); stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 50; stroke-dashoffset: 50; animation: draw .5s var(--ease-out) .8s forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.thanks-card .page-title { animation: rise .7s var(--ease-out) .3s both; }
.thanks-sub { color: var(--muted); font-size: 1.05rem; animation: rise .7s var(--ease-out) .4s both; }
.thanks-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 18px; animation: rise .7s var(--ease-out) .5s both; }
.thanks-continue { flex-basis: 100%; justify-content: center; border: 0; margin-top: 6px; }
.thanks-next { width: 100%; max-width: 900px; }
.thanks-next h2 { font-size: 1.8rem; text-align: center; margin-bottom: 18px; }
.thanks-next .step p { color: var(--ink); padding-top: 26px; }

/* ---------- Sticky buy bar on phones (product page) ---------- */
.buybar {
  position: fixed; z-index: 36; inset-inline: 10px; bottom: calc(10px + env(safe-area-inset-bottom));
  display: flex; align-items: center; gap: 10px; padding: 8px; padding-inline-end: 10px;
  border-radius: 20px; background: rgb(255 251 248 / .94); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--line); box-shadow: var(--shadow-lg);
  transform: translateY(140%); opacity: 0; transition: transform .5s var(--ease-spring), opacity .3s;
}
.buybar.is-visible { transform: none; opacity: 1; }
.buybar-thumb { width: 44px; height: 55px; object-fit: cover; border-radius: 10px; flex: none; }
.buybar-info { flex: 1; min-width: 0; }
.buybar-name { font-size: .82rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.buybar-price { font-weight: 500; }
.buybar .btn { flex: none; }
.buybar .badge-lg { margin: 0; }
@media (max-width: 899px) { .buybar-on .order-pill { opacity: 0; pointer-events: none; transform: translateY(160%); } }
@media (min-width: 900px) { .buybar { display: none; } }
.more-from { align-self: flex-start; margin-top: 4px; }
.faq-link { margin-top: 12px; }

/* ---------- Admin: tracked links ---------- */
.admin-links { display: grid; gap: 8px; margin-top: 12px; }
.admin-links li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 12px; border-radius: 12px; background: var(--bg); }
.admin-links li > div { display: grid; gap: 2px; min-width: 0; }
.admin-links code { font-size: .78rem; color: var(--muted); word-break: break-all; }

/* ---------- Footer ---------- */
.site-footer { background: var(--bg-2); border-top: 1px solid var(--line); padding-block: 56px calc(96px + env(safe-area-inset-bottom)); }
.footer-inner { display: grid; gap: 36px; grid-template-columns: 1fr 1fr; }
.footer-brand { grid-column: 1 / -1; display: grid; gap: 6px; justify-items: start; }
.footer-brand img { width: 56px; }
.footer-tag { font-family: 'Cormorant Garamond', serif; font-style: italic; font-size: 1.2rem; color: var(--accent); }
:root[lang='ar'] .footer-tag { font-family: var(--serif); font-style: normal; }
.footer-brand .muted { max-width: 34ch; }
.footer-title { font-size: .72rem; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); margin-bottom: 12px; }
.footer-col li { padding-block: 4px; }
.footer-col a { transition: color .2s; }
.footer-col a:hover { color: var(--accent); }
.footer-social a, .footer-social span { display: inline-flex; align-items: center; gap: 8px; }
.footer-bottom { grid-column: 1 / -1; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; padding-top: 22px; border-top: 1px solid var(--line); }
.footer-bottom p { display: inline-flex; align-items: center; gap: 6px; }
@media (min-width: 800px) { .footer-inner { grid-template-columns: 1.6fr 1fr 1fr 1fr; } .footer-brand { grid-column: auto; } .site-footer { padding-bottom: 56px; } }

/* ---------- View transitions (page-to-page crossfade + product photo morph) ---------- */
@view-transition { navigation: auto; }
::view-transition-old(root) { animation: vt-out .28s var(--ease-in-out) both; }
::view-transition-new(root) { animation: vt-in .42s var(--ease-out) both; }
::view-transition-group(product-hero) { animation-duration: .5s; animation-timing-function: var(--ease-out); }
::view-transition-group(*) { animation-duration: .45s; animation-timing-function: var(--ease-out); }
@keyframes vt-out { to { opacity: 0; } }
@keyframes vt-in { from { opacity: 0; transform: translateY(10px); } }

/* ---------- Reduced motion: keep everything, drop the movement ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; transition-delay: 0s !important; scroll-behavior: auto !important; }
  .hero-card { transform: none !important; }
  .marquee-track { animation: none !important; }
  ::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*) { animation: none !important; }
}
