/* Direction B — top menu, mega menu, phone sheet and the palette dock. Shared by the home page and inner pages. */
.ticker, .nav, .sheet, .dock { font-family: "Switzer", "Inter", system-ui, sans-serif; --nav-ease: cubic-bezier(.16, 1, .3, 1); }
html[lang="ar"] .ticker, html[lang="ar"] .nav, html[lang="ar"] .sheet, html[lang="ar"] .dock { font-family: "IBM Plex Sans Arabic", "Switzer", system-ui, sans-serif; }
.nav button, .sheet button, .dock button { font: inherit; color: inherit; cursor: pointer; background: none; border: 0; padding: 0; }
.nav a, .sheet a, .dock a { color: inherit; text-decoration: none; }

/* ---------- rotating announcement ---------- */
.ticker { position: relative; height: 34px; overflow: hidden; transition: height .45s cubic-bezier(.16, 1, .3, 1); background: var(--olive-4); color: var(--on-deep); font-size: 12.5px; letter-spacing: .02em; }
.ticker__track { display: grid; animation: ticker 12s var(--nav-ease) infinite; }
.ticker__track span { height: 34px; display: grid; place-items: center; text-align: center; padding-inline: 16px; white-space: nowrap; }
@keyframes ticker {
  0%, 28% { transform: translateY(0); }
  33%, 61% { transform: translateY(-34px); }
  66%, 94% { transform: translateY(-68px); }
  100% { transform: translateY(-102px); }
}

/* ---------- bar ---------- */
.nav {
  position: sticky; top: 0; z-index: 60; color: var(--ink);
  background: color-mix(in srgb, var(--sand) 86%, transparent);
  -webkit-backdrop-filter: blur(14px) saturate(1.2); backdrop-filter: blur(14px) saturate(1.2);
  box-shadow: 0 1px 0 var(--line);
  transition: transform .5s var(--nav-ease), background .4s, color .4s, box-shadow .4s;
}
.nav.is-hidden { transform: translateY(-100%); }
.nav--overlay { position: fixed; inset: 0 0 auto 0; }
.nav.is-scrolled .ticker { height: 0; }
.nav__bar {
  max-width: 1440px; margin-inline: auto; padding-inline: clamp(16px, 4vw, 56px);
  height: 76px; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 32px;
  transition: height .4s var(--nav-ease);
}
.nav.is-scrolled .nav__bar { height: 62px; }
.nav__logo img { height: 30px; width: auto; display: block; filter: var(--logo-filter, none); transition: filter .4s; }
.nav__links { display: flex; justify-content: center; gap: clamp(18px, 2.4vw, 40px); font-size: 14.5px; }
.nav__link { position: relative; display: inline-flex; align-items: center; gap: 6px; height: 44px; }
.nav__link::after {
  content: ""; position: absolute; inset-inline: 0; bottom: 8px; height: 1px; background: currentColor;
  transform: scaleX(0); transform-origin: var(--from, left); transition: transform .45s var(--nav-ease);
}
html[dir="rtl"] .nav__link::after { --from: right; }
.nav__link:hover::after, .nav__link[aria-current="page"]::after, .nav__item.is-open > .nav__link::after { transform: scaleX(1); }
.nav__link svg { width: 10px; height: 10px; stroke: currentColor; fill: none; stroke-width: 1.6; transition: rotate .3s; }
.nav__item.is-open > .nav__link svg { rotate: 180deg; }
.nav__actions { display: flex; align-items: center; gap: 18px; font-size: 14px; }
.nav__lang { font-size: 14px; opacity: .85; }
html[lang="en"] .nav__lang { font-family: "IBM Plex Sans Arabic", system-ui, sans-serif; }
.nav__bag { display: inline-flex; align-items: center; gap: 8px; height: 44px; transition: opacity .3s; }
.nav__bag:hover { opacity: .65; }
.nav__bag svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 1.4; }
.nav__bag .cart-count {
  position: static; display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 10px;
  background: var(--accent); color: var(--on-deep); font: 500 11px/1 system-ui, sans-serif;
}
.nav__bag .cart-count[data-n="0"] { display: none; }
.nav__burger { display: none; width: 44px; height: 44px; position: relative; }
.nav__burger span { position: absolute; left: 11px; right: 11px; height: 1.5px; background: currentColor; transition: transform .45s var(--nav-ease), top .45s var(--nav-ease); }
.nav__burger span:first-child { top: 17px; }
.nav__burger span:last-child { top: 26px; }
.sheet-open .nav__burger span:first-child { top: 21.5px; transform: rotate(45deg); }
.sheet-open .nav__burger span:last-child { top: 21.5px; transform: rotate(-45deg); }

/* over dark sections of the home page: transparent, light text */
.nav.is-over-dark:not(.is-mega) { background: transparent; box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; color: var(--on-deep); }
.nav.is-over-dark:not(.is-mega) .nav__logo img { filter: invert(1) brightness(.95); }

/* ---------- mega menu ---------- */
.mega {
  position: absolute; inset-inline: 0; top: 100%;
  background: var(--paper); color: var(--ink); box-shadow: 0 1px 0 var(--line), 0 30px 60px rgba(20, 16, 12, .12);
  opacity: 0; visibility: hidden; translate: 0 -10px; transition: opacity .35s, translate .5s var(--nav-ease), visibility 0s .35s;
}
.nav__item.is-open .mega { opacity: 1; visibility: visible; translate: 0 0; transition: opacity .35s, translate .5s var(--nav-ease); }
.mega__inner { max-width: 1440px; margin-inline: auto; padding: 32px clamp(16px, 4vw, 56px) 40px; display: grid; grid-template-columns: 280px 1fr; gap: 40px; }
.mega__intro { display: grid; gap: 14px; align-content: start; }
.mega__kicker { font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
html[lang="ar"] .mega__kicker { letter-spacing: .02em; font-size: 12.5px; }
.mega__title { margin: 0; font-family: "Instrument Serif", serif; font-size: 32px; line-height: 1.05; }
html[lang="ar"] .mega__title { font-family: "Zain", sans-serif; font-weight: 300; font-size: 30px; line-height: 1.3; }
.mega__facts { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-size: 13px; color: var(--ink-2); }
.mega__facts li::before { content: "— "; color: var(--muted); }
.nav .mega__all { justify-self: start; display: inline-flex; gap: 8px; align-items: center; height: 40px; padding: 0 18px; border-radius: 999px; background: var(--ink); color: var(--sand); font-size: 13.5px; }
.mega__grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; }
.mega__card { display: grid; gap: 8px; }
.mega__stage {
  position: relative; aspect-ratio: 3 / 4; border-radius: 14px; overflow: hidden;
  background: radial-gradient(65% 55% at 50% 45%, var(--olive-1) 0%, var(--olive-2) 62%, var(--olive-3) 100%);
}
.mega__stage img { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; object-fit: cover; object-position: 50% 55%; transition: transform .8s var(--nav-ease); }
.mega__card:hover .mega__stage img { transform: scale(1.05); }
.mega__row { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.mega__name { font-family: "Instrument Serif", serif; font-size: 21px; line-height: 1; }
.mega__price { font-size: 12.5px; color: var(--ink-2); white-space: nowrap; }

/* ---------- phone sheet ---------- */
.sheet {
  position: fixed; inset: 0; z-index: 59; background: var(--olive-4); color: var(--on-deep);
  clip-path: inset(0 0 100% 0); visibility: hidden; transition: clip-path .7s var(--nav-ease), visibility 0s .7s;
  overflow-y: auto; overscroll-behavior: contain;
}
.sheet-open .sheet { clip-path: inset(0 0 0 0); visibility: visible; transition: clip-path .7s var(--nav-ease); }
.sheet__inner { min-height: 100%; padding: 120px clamp(16px, 5vw, 40px) 40px; display: grid; grid-template-rows: auto 1fr auto; gap: 28px; }
.sheet__links { display: grid; }
.sheet__links a {
  display: flex; align-items: baseline; gap: 14px; padding-block: 10px; border-bottom: 1px solid rgb(var(--on-deep-rgb) / .14);
  font-family: "Instrument Serif", serif; font-size: clamp(38px, 10vw, 56px); line-height: 1.05;
  opacity: 0; translate: 0 24px; transition: opacity .6s var(--nav-ease), translate .6s var(--nav-ease);
}
html[lang="ar"] .sheet__links a { font-family: "Zain", sans-serif; font-weight: 300; font-size: clamp(34px, 9vw, 50px); line-height: 1.3; }
.sheet__links small { font-family: "Instrument Serif", serif; font-size: 15px; opacity: .55; min-width: 22px; }
.sheet-open .sheet__links a { opacity: 1; translate: 0 0; }
.sheet-open .sheet__links a:nth-child(1) { transition-delay: .18s; }
.sheet-open .sheet__links a:nth-child(2) { transition-delay: .23s; }
.sheet-open .sheet__links a:nth-child(3) { transition-delay: .28s; }
.sheet-open .sheet__links a:nth-child(4) { transition-delay: .33s; }
.sheet-open .sheet__links a:nth-child(5) { transition-delay: .38s; }
.sheet-open .sheet__links a:nth-child(6) { transition-delay: .43s; }
.sheet__feature {
  position: relative; border-radius: 18px; overflow: hidden; min-height: 220px; display: flex; align-items: flex-end; padding: 18px;
  background: radial-gradient(65% 60% at 70% 45%, var(--olive-1) 0%, var(--olive-2) 60%, var(--olive-3) 100%);
}
.sheet__feature img { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; object-fit: cover; object-position: 50% 40%; }
.sheet__feature::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,0) 40%, rgba(0,0,0,.55)); }
.sheet__feature span { position: relative; z-index: 1; display: grid; gap: 2px; font-size: 13px; }
.sheet__feature b { font-family: "Instrument Serif", serif; font-weight: 400; font-size: 30px; }
.sheet__foot { display: flex; flex-wrap: wrap; gap: 10px; }
.sheet__foot a { display: inline-flex; align-items: center; height: 44px; padding: 0 18px; border-radius: 999px; box-shadow: inset 0 0 0 1px rgb(var(--on-deep-rgb) / .35); font-size: 14px; }
.sheet-open { overflow: hidden; }
.sheet-open .nav { color: var(--on-deep); background: transparent; box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; transform: none; }
.sheet-open .nav .nav__logo img { filter: invert(1) brightness(.95); }

/* ---------- breakpoints ---------- */
@media (max-width: 1080px) {
  .nav__links, .nav__contact, .nav__account { display: none; }
  .nav__burger { display: inline-block; }
  .nav__bar { grid-template-columns: auto 1fr; gap: 12px; }
  .nav__actions { justify-content: flex-end; gap: 6px; }
  .nav__bag-label { display: none; }
  .nav__bag { padding: 0 8px; }
  .nav__lang { padding-inline: 8px; }
}
@media (min-width: 1081px) { .sheet { display: none; } }

/* ---------- palette dock ---------- */
.dock {
  position: fixed; z-index: 70; bottom: 16px; left: 50%; translate: -50% 0;
  display: flex; align-items: center; gap: 4px; padding: 4px; border-radius: 999px;
  background: rgba(22, 18, 15, .84); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  color: #f1ede3; font-size: 12.5px; white-space: nowrap; box-shadow: 0 10px 30px rgba(0, 0, 0, .2);
}
.dock > a { padding: 8px 12px; border-radius: 999px; opacity: .8; }
.dock > a:hover { opacity: 1; }
.dock__label { padding-inline: 8px 4px; opacity: .6; }
.dock__sw { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; }
.dock__sw i { width: 20px; height: 20px; border-radius: 50%; background: linear-gradient(135deg, var(--a) 0 50%, var(--b) 50% 100%); box-shadow: 0 0 0 1px rgba(255, 255, 255, .25); }
.dock__sw[aria-pressed="true"] { box-shadow: inset 0 0 0 1.5px #f1ede3; }
.dock__name { padding-inline: 4px 10px; min-width: 88px; }
@media (max-width: 560px) { .dock .hide-sm { display: none; } .dock__name { min-width: 0; } }
/* inner pages: corner opposite the WhatsApp button, clear of buy and checkout buttons */
html.theme-b .dock { left: auto; translate: none; inset-inline-end: 16px; }
@media (max-width: 600px) { html:has([data-pdp]) .dock, html:has([data-checkout]) .dock { display: none; } }

@media (prefers-reduced-motion: reduce) {
  .ticker__track { animation: none; }
  .nav, .mega, .sheet, .sheet__links a { transition: none; }
}
/* keep the open phone menu clear */
.sheet-open .wa, .sheet-open .dock { display: none; }
