/* =========================================================
   Al-Janatain Honey — storefront
   Cool-cream palette · honey accents · scroll-flying bee
   ========================================================= */
:root {
  --bg: #F2EFE8;
  --bg-2: #E8E4DA;
  --paper: #FAF8F3;
  --ink: #1C1A17;
  --ink-2: #5E584E;
  --ink-3: #8C857A;
  --line: rgba(28, 26, 23, .12);
  --honey: #FCC632;
  --amber: #E0A126;
  --brown: #54381A;
  --sage: #A9B19A;
  --dark: #1A1714;

  --f-display: 'Fraunces', Georgia, serif;
  --f-body: 'Manrope', system-ui, sans-serif;
  --radius: 0px;
  --wrap: 1280px;
  --gutter: clamp(16px, 4vw, 48px);
  --ease: cubic-bezier(.22, .8, .2, 1);
}
html[lang="ar"] {
  --f-display: 'El Messiri', 'Tajawal', serif;
  --f-body: 'Tajawal', 'Manrope', system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 400 16px/1.6 var(--f-body);
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
html[lang="ar"] body { font-size: 17px; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }
:focus-visible { outline: 2px solid var(--amber); outline-offset: 3px; border-radius: 0; }
.skip { position: fixed; inset-inline-start: 8px; top: 8px; z-index: 999; background: var(--ink); color: #fff; padding: 8px 14px; border-radius: 0; transform: translateY(-160%); }
.skip:focus-visible { transform: none; }
.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }
.narrow { max-width: 760px; }
.center { text-align: center; display: flex; flex-direction: column; align-items: center; }
.hp { position: absolute !important; left: -9999px !important; }

/* ---------- type ---------- */
h1, h2, h3, h4 { font-family: var(--f-display); font-weight: 500; line-height: 1.05; margin: 0; letter-spacing: -.02em; }
html[lang="ar"] h1, html[lang="ar"] h2, html[lang="ar"] h3 { letter-spacing: 0; line-height: 1.25; }
.h-xxl { font-size: clamp(44px, 7vw, 104px); }
.h-xl  { font-size: clamp(36px, 5vw, 72px); }
.h-lg  { font-size: clamp(28px, 3.4vw, 46px); }
.lead { font-size: clamp(17px, 1.4vw, 20px); color: var(--ink-2); max-width: 46ch; }
em { font-style: italic; font-weight: 400; color: var(--brown); }
html[lang="ar"] em { font-style: normal; color: var(--amber); }
.kicker {
  display: inline-flex; align-items: center; gap: 10px; margin: 0 0 18px;
  font: 600 12px/1 var(--f-body); letter-spacing: .18em; text-transform: uppercase; color: var(--ink-2);
}
html[lang="ar"] .kicker { letter-spacing: 0; font-size: 14px; }
.kicker .dot { width: 8px; height: 8px; background: var(--honey); clip-path: polygon(25% 0, 75% 0, 100% 50%, 75% 100%, 25% 100%, 0 50%); }
.price { font: 600 18px/1 var(--f-body); font-variant-numeric: tabular-nums; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 16px 26px; border-radius: 0; border: 1px solid transparent;
  font: 600 15px/1 var(--f-body); transition: transform .35s var(--ease), background .3s, color .3s, border-color .3s;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); }
.btn .arrow { transition: transform .35s var(--ease); display: inline-block; }
.btn:hover .arrow { transform: translateX(4px); }
html[dir="rtl"] .btn .arrow { transform: scaleX(-1); }
html[dir="rtl"] .btn:hover .arrow { transform: scaleX(-1) translateX(4px); }
.btn-dark { background: var(--ink); color: var(--paper); }
.btn-dark:hover { background: var(--brown); }
.btn-ghost { border-color: var(--line); background: transparent; }
.btn-ghost:hover { border-color: var(--ink); }
.btn-honey { background: var(--honey); color: var(--ink); }
.btn-honey:hover { background: #ffd65c; }
.btn-ghost-light { border-color: rgba(255,255,255,.3); color: var(--paper); }
.btn-ghost-light:hover { border-color: var(--paper); }
.btn-block { width: 100%; }
.btn-grow { flex: 1; }
.icon-btn { background: none; border: 0; width: 40px; height: 40px; border-radius: 50%; }
.icon-btn:hover { background: var(--bg-2); }

/* ---------- header ---------- */
.site-header {
  position: fixed; inset: 0 0 auto; z-index: 50; padding: 14px 0;
  transition: background .4s, backdrop-filter .4s, padding .4s, box-shadow .4s;
}
.site-header::before { content: ''; position: absolute; inset: 0; z-index: -1; background: rgba(242, 239, 232, .82); backdrop-filter: blur(14px) saturate(1.2); -webkit-backdrop-filter: blur(14px); box-shadow: 0 1px 0 var(--line); opacity: 0; transition: opacity .4s; }
.site-header.is-scrolled { padding: 8px 0; }
.site-header.is-scrolled::before { opacity: 1; }
body.menu-open .site-header::before { opacity: 0; }
.header-row { display: flex; align-items: center; gap: 24px; }
.brand { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.brand-bee { width: 38px; }
.brand-word { height: 38px; width: auto; color: var(--ink); }
.brand-en { display: flex; flex-direction: column; font: 700 11px/1.1 var(--f-body); letter-spacing: .2em; padding-inline-start: 10px; border-inline-start: 1px solid var(--line); }
.brand-en small { font-size: 9px; color: var(--ink-3); letter-spacing: .32em; }
html[lang="ar"] .brand-en { display: none; }
.main-nav { display: flex; gap: 6px; margin-inline: auto; }
.main-nav a { padding: 10px 14px; border-radius: 0; font-weight: 500; font-size: 15px; transition: background .3s; }
.main-nav a:hover { background: rgba(28,26,23,.06); }
.header-actions { display: flex; align-items: center; gap: 8px; }
.lang-btn { padding: 9px 14px; border: 1px solid var(--line); border-radius: 0; font-weight: 600; font-size: 14px; }
.lang-btn:hover { border-color: var(--ink); }
html[lang="en"] .lang-btn { font-family: 'Tajawal', sans-serif; }
.cart-btn { position: relative; width: 46px; height: 46px; border-radius: 50%; background: var(--ink); color: var(--paper); border: 0; display: grid; place-items: center; transition: transform .3s var(--ease); }
.cart-btn:hover { transform: scale(1.06); }
.cart-count { position: absolute; top: -3px; inset-inline-end: -3px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 0; background: var(--honey); color: var(--ink); font: 700 11px/20px var(--f-body); text-align: center; }
.cart-count.bump { animation: bump .5s var(--ease); }
@keyframes bump { 40% { transform: scale(1.5); } }
.menu-btn { display: none; width: 46px; height: 46px; border-radius: 50%; border: 1px solid var(--line); background: none; position: relative; }
.menu-btn span { position: absolute; left: 14px; right: 14px; height: 1.6px; background: var(--ink); transition: transform .3s; }
.menu-btn span:first-child { top: 19px; } .menu-btn span:last-child { top: 26px; }
.menu-btn[aria-expanded="true"] span:first-child { transform: translateY(3.5px) rotate(45deg); }
.menu-btn[aria-expanded="true"] span:last-child { transform: translateY(-3.5px) rotate(-45deg); }

/* ---------- flying bee ---------- */
.bee-layer { position: absolute; inset: 0 0 auto 0; pointer-events: none; z-index: 40; }
.bee-layer .fly-bee { z-index: 1; }
body.menu-open .bee-layer { opacity: 0; transition: opacity .3s; }
.bee-trail { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.bee-trail path { fill: none; stroke-linecap: round; }
.trail-bg { stroke: rgba(84, 56, 26, .14); stroke-width: 1.5; stroke-dasharray: 2 9; }
.trail-fg { stroke: var(--amber); stroke-width: 2; stroke-dasharray: 2 9; opacity: .9; }
.fly-bee { position: absolute; top: 0; left: 0; width: 74px; will-change: transform; opacity: 0; transition: opacity .6s; }
.fly-bee.ready { opacity: 1; }
.fly-bee-inner { animation: hover-bob 1.4s ease-in-out infinite; filter: drop-shadow(0 14px 12px rgba(60, 40, 10, .18)); }
@keyframes hover-bob { 50% { transform: translateY(-5px); } }
.wing { transform-box: fill-box; }
.wing-l { transform-origin: 96% 30%; }
.wing-r { transform-origin: 4% 30%; }
.bee-svg .wing { animation: flap .09s linear infinite alternate; }
@keyframes flap { from { transform: scaleX(1); } to { transform: scaleX(.55); } }
.bee-svg .wing path { fill: var(--ink); }
.fly-bee .bee-svg .wing { opacity: .92; }
.fly-bee .bee-svg path { transition: fill .5s; }
/* over the dark footer the black parts turn cream so wings and outline stay visible */
.fly-bee.on-dark .bee-svg .wing path,
.fly-bee.on-dark .bee-svg path[fill="#1d1a1a"] { fill: var(--paper); }
.fly-bee.on-dark .fly-bee-inner { filter: drop-shadow(0 8px 14px rgba(252, 198, 50, .25)); }
/* header logo: calm by default, a soft flutter + lift on hover */
.brand-bee { transition: transform .6s var(--ease); }
.brand-bee .wing { transition: transform .4s var(--ease); }
.brand:hover .brand-bee { transform: translateY(-2px) rotate(-4deg); }
.brand:hover .brand-bee .wing { animation: flutter .32s ease-in-out infinite alternate; }
@keyframes flutter { from { transform: scaleX(1); } to { transform: scaleX(.8); } }
@media (prefers-reduced-motion: reduce) { .brand:hover .brand-bee .wing { animation: none; } }

/* ---------- hero ---------- */
.hero { position: relative; min-height: 100svh; padding: 130px 0 90px; display: flex; align-items: center; overflow: hidden; }
.hero-ghost {
  position: absolute; inset-inline-end: -2vw; top: 14vh; font: 600 clamp(140px, 26vw, 420px)/.8 'Fraunces', serif;
  color: transparent; -webkit-text-stroke: 1px rgba(84,56,26,.09); letter-spacing: -.04em; user-select: none; pointer-events: none;
}
.hero-grid { position: relative; display: grid; grid-template-columns: 1.05fr 1fr; gap: 40px; align-items: center; }
.hero-verse { margin: 0 0 30px; }
.hero-title { font-size: clamp(34px, 4.1vw, 64px); font-weight: 400; line-height: 1.08; margin-bottom: 18px; }
html[lang="ar"] .hero-title { font-family: 'Amiri', 'El Messiri', serif; font-size: clamp(38px, 4.5vw, 70px); line-height: 1.75; font-weight: 700; }  /* Amiri: built for vowelled Qur'anic text */
.hero-verse-ref { font-size: 14px; letter-spacing: .08em; color: var(--ink-3); opacity: 0; animation: fade 1s .45s forwards; }
.hero-verse-ref::before { content: ""; display: inline-block; width: 34px; height: 1px; background: var(--amber); vertical-align: middle; margin-inline-end: 12px; }
html[lang="ar"] .hero-verse-ref { letter-spacing: 0; font-size: 15px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
/* room for italic overhang + descenders (the y in "way"), cancelled with negative margins */
.hero-title .line { display: block; overflow: hidden; padding: .22em .14em .24em; margin: -.22em -.14em -.18em; }  /* room for Arabic diacritics */
.hero-title .line > span { display: inline-block; transform: translateY(105%); animation: rise 1.1s var(--ease) forwards; }
.hero-title .line:nth-child(2) > span { animation-delay: .12s; }
.hero-title .line:nth-child(3) > span { animation-delay: .24s; }
@keyframes rise { to { transform: none; } }
.hero-text { font-size: clamp(17px, 1.35vw, 19px); color: var(--ink-2); max-width: 44ch; margin: 0 0 32px; opacity: 0; animation: fade 1s .5s forwards; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 12px; opacity: 0; animation: fade 1s .65s forwards; }
.hero-ctas.center { justify-content: center; flex-direction: row; }
@keyframes fade { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.hero-stats { display: flex; gap: 36px; margin: 48px 0 0; padding-top: 26px; border-top: 1px solid var(--line); max-width: 480px; opacity: 0; animation: fade 1s .8s forwards; }
.hero-stats div { margin: 0; }
.hero-stats dt { font: 500 34px/1 var(--f-display); }
.hero-stats dd { margin: 6px 0 0; font-size: 13px; color: var(--ink-3); }
.hero-stage { position: relative; min-height: 560px; }
.hero-logo { position: absolute; top: 0; inset-inline-end: 2%; width: 80%; display: flex; direction: ltr; align-items: flex-start; opacity: 0; animation: fade 1.2s .3s forwards; }
.hero-word { flex: 1 1 auto; min-width: 0; width: 64%; height: auto; color: var(--ink); margin-top: 3%; }
/* the flying bee starts here at the same size it has in the logo, then shrinks as it flies */
.hero-bee-slot { flex: 0 0 34%; aspect-ratio: 482.74 / 382.85; margin-inline-end: -2%; }
html[dir="rtl"] .hero-logo { inset-inline-end: auto; inset-inline-start: 2%; }
/* product photography: studio shots on a warm paper backdrop, shown as soft rounded photos */
.hero-photo { position: absolute; top: 26%; inset-inline-end: -19%; inset-inline-start: -22%; aspect-ratio: 4 / 3; margin: 0; opacity: 0; animation: jar-in 1.4s .45s var(--ease) forwards;
  /* watercolour painted straight onto the page: the irregular wash edge is in the image's alpha,
     and multiply lets the page colour show through like paper */
  mix-blend-mode: multiply; }
.hero-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
@keyframes jar-in { from { opacity: 0; transform: translateY(60px) scale(.94); } to { opacity: 1; transform: none; } }
.hex-field { position: absolute; inset: 0; pointer-events: none; }
.hx { position: absolute; width: 60px; aspect-ratio: 1.15; background: var(--honey); clip-path: polygon(25% 0, 75% 0, 100% 50%, 75% 100%, 25% 100%, 0 50%); opacity: .55; }
.hx-0 { top: 18%; left: 6%; width: 22px; } .hx-1 { top: 72%; left: 44%; width: 34px; opacity: .3; }
.hx-2 { top: 28%; right: 8%; width: 46px; opacity: .25; } .hx-3 { bottom: 12%; right: 30%; width: 18px; }
.hx-4 { top: 12%; left: 48%; width: 14px; opacity: .8; } .hx-5 { bottom: 22%; left: 3%; width: 30px; opacity: .2; background: var(--brown); }
.hx-6 { top: 52%; right: 2%; width: 20px; background: var(--sage); opacity: .6; } .hx-7 { top: 86%; left: 18%; width: 12px; }
.hx-8 { display: none; }   /* sat on the brand lettering and read as a stray dot */
.scroll-hint { position: absolute; bottom: 26px; left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 8px; font-size: 11px; letter-spacing: .2em; text-transform: uppercase; color: var(--ink-3); }
.scroll-hint i { width: 1px; height: 42px; background: linear-gradient(var(--ink-3), transparent); animation: drip 2s infinite; transform-origin: top; }
@keyframes drip { 0% { transform: scaleY(0); } 50% { transform: scaleY(1); } 100% { transform: scaleY(1); opacity: 0; } }

/* ---------- marquee ---------- */
.marquee { overflow: hidden; border-block: 1px solid var(--line); padding: 22px 0; background: var(--paper); }
.marquee-track { display: flex; gap: 28px; width: max-content; animation: marquee 60s linear infinite; align-items: center; }
html[dir="rtl"] .marquee-track { animation-name: marquee-rtl; }
.marquee span { font: 400 clamp(22px, 2.6vw, 36px)/1 var(--f-display); white-space: nowrap; }
.marquee i { color: var(--honey); font-style: normal; font-size: 18px; }
@keyframes marquee { to { transform: translateX(-50%); } }
@keyframes marquee-rtl { to { transform: translateX(50%); } }

/* ---------- journey (pinned) ---------- */
.journey { position: relative; height: 420vh; background: var(--bg); }
.bee-mark { position: absolute; left: 0; width: 1px; height: 1px; display: block; }
.journey-pin { position: sticky; top: 0; height: 100svh; display: flex; flex-direction: column; justify-content: center; padding-top: 70px; overflow: hidden; }
.journey-grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: 40px; align-items: center; flex: 1; }
.journey-copy { position: relative; display: grid; grid-template-rows: auto 1fr auto; align-content: center; }
.journey-chapters { display: grid; }
.chapter { grid-area: 1 / 1; opacity: 0; transform: translateY(30px); transition: opacity .6s, transform .8s var(--ease); pointer-events: none; }
.chapter.is-on { opacity: 1; transform: none; pointer-events: auto; }
.chapter .ch-num { display: block; font: 600 12px/1 var(--f-body); letter-spacing: .2em; text-transform: uppercase; color: var(--amber); margin-bottom: 18px; }
.chapter h2 { font-size: clamp(40px, 5.4vw, 84px); font-weight: 400; margin-bottom: 22px; }
.chapter p { color: var(--ink-2); font-size: 18px; max-width: 42ch; margin: 0; }
.journey-cta { justify-self: start; margin-top: 32px; }
.journey-stage { position: relative; height: min(70vh, 640px); display: grid; place-items: center; }
.journey-ghost { position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none; }
.journey-ghost span { grid-area: 1/1; font: 600 clamp(80px, 13vw, 210px)/1 var(--f-display); color: transparent; -webkit-text-stroke: 1px rgba(84,56,26,.12); opacity: 0; transform: scale(.9); transition: opacity .6s, transform 1s var(--ease); white-space: nowrap; }
.journey-ghost span.is-on { opacity: 1; transform: none; }
.journey-disc { display: none; position: absolute; width: min(70%, 480px); aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fff8e3, var(--honey) 60%, var(--amber)); opacity: .55; transition: background 1s; }
.journey-jar { position: absolute; margin: 0; width: min(78%, 440px); opacity: 0; transform: translateY(40px) rotate(-6deg) scale(.92); transition: opacity .7s, transform 1s var(--ease); }
.journey-jar.is-on { opacity: 1; transform: none; }
.journey-jar img { width: 100%; height: auto; display: block; border-radius: 0; box-shadow: 0 40px 70px -40px rgba(84,56,26,.4); }
.journey-jar figcaption { text-align: center; font: 500 14px/1 var(--f-body); color: var(--ink-2); margin-top: 8px; }
.journey-tabs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; padding-bottom: 28px; }
/* journey progress: honeycomb cells that fill with honey, joined by the bee's flight path */
.jtab { --cell: 40px; --p: 0; display: grid; grid-template-columns: var(--cell) 1fr; align-items: center; column-gap: 10px; row-gap: 8px; text-align: start; background: none; border: 0; padding: 0; font-size: 14px; color: var(--ink-3); cursor: pointer; }
.jcell { position: relative; width: var(--cell); aspect-ratio: 1 / 1.1547; display: grid; place-items: center; font-style: normal; background: rgba(84, 56, 26, .28); clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%); transition: background .4s; }
.jcell::before, .jcell::after { content: ''; position: absolute; inset: 2px; clip-path: inherit; }
.jcell::before { background: var(--bg); }
.jcell::after { background: linear-gradient(180deg, var(--honey), var(--amber)); transform: scaleY(var(--p)); transform-origin: bottom; }
.jcell span { position: relative; z-index: 1; font: 600 12px/1 var(--f-body); color: var(--ink-2); letter-spacing: .02em; }
.jtrack { position: relative; height: 2px; background-image: radial-gradient(circle, rgba(84, 56, 26, .3) 1px, transparent 1.3px); background-size: 9px 2px; background-repeat: repeat-x; }
.jtrack::after { content: ''; position: absolute; inset: 0; background-image: radial-gradient(circle, var(--amber) 1px, transparent 1.3px); background-size: 9px 2px; clip-path: inset(0 calc((1 - var(--p)) * 100%) 0 0); }
html[dir="rtl"] .jtrack::after { clip-path: inset(0 0 0 calc((1 - var(--p)) * 100%)); }
.jbee { position: absolute; top: 50%; inset-inline-start: calc(var(--p) * 100%); width: 28px; height: 28px; margin: -14px; background: url('../img/brand/bee.svg') center / contain no-repeat; transform: rotate(90deg) scale(.4); opacity: 0; transition: opacity .3s, transform .4s var(--ease); z-index: 1; }
html[dir="rtl"] .jbee { transform: rotate(-90deg) scale(.4); }
.jtab.is-on .jbee { opacity: 1; transform: rotate(90deg); }
html[dir="rtl"] .jtab.is-on .jbee { transform: rotate(-90deg); }
.jlabel { grid-column: 1 / -1; font-weight: 500; }
.jtab.is-on { color: var(--ink); }
.jtab.is-on .jcell { background: var(--amber); }
.jtab.is-on .jcell span { color: var(--ink); }
.jtab:hover .jcell { background: var(--amber); }

/* ---------- sections ---------- */
.section { padding: clamp(80px, 11vw, 150px) 0; position: relative; }
.section-tight { padding: 40px 0 100px; }
.section-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 40px; margin-bottom: 44px; flex-wrap: wrap; }
.section-head .lead { margin: 0; }
.filters { display: flex; gap: 30px; flex-wrap: wrap; margin-bottom: 40px; border-bottom: 1px solid var(--line); }
.chip { padding: 12px 0 14px; border: 0; background: transparent; font-weight: 600; font-size: 14.5px; color: var(--ink-3); position: relative; transition: color .3s; }
.chip::after { content: ''; position: absolute; inset: auto 0 -1px 0; height: 2px; background: var(--amber); transform: scaleX(0); transition: transform .4s var(--ease); }
.chip:hover { color: var(--ink); }
.chip.is-on { color: var(--ink); }
.chip.is-on::after { transform: scaleX(1); }

/* ---------- product grid & card ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 48px 26px; }
.grid-4 { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.grid-item.is-hidden { display: none; }
.collection .center { margin-top: 48px; }
/* product card: editorial, no boxes — the photo's corners are cut like the jar label */
.card { --cut: 18px; background: none; border: 0; display: flex; flex-direction: column; height: 100%; }
.card-media { position: relative; aspect-ratio: 4 / 5; display: block; overflow: hidden; background: #EBDDCB; clip-path: polygon(var(--cut) 0, calc(100% - var(--cut)) 0, 100% var(--cut), 100% calc(100% - var(--cut)), calc(100% - var(--cut)) 100%, var(--cut) 100%, 0 calc(100% - var(--cut)), 0 var(--cut)); }
.card-media::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 60%, rgba(84, 56, 26, .16)); opacity: 0; transition: opacity .5s; pointer-events: none; }
.card:hover .card-media::after { opacity: 1; }
.card-hex { display: none; }
.card-media img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease), opacity .25s; }
.card:hover .card-media img { transform: scale(1.05); }
.card-body { padding: 18px 2px 0; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.card-title { font-size: 21px; font-weight: 500; line-height: 1.25; }
html[lang="ar"] .card-title { font-size: 22px; }
.card-title a { background: linear-gradient(var(--amber), var(--amber)) 100% 100% / 0 1px no-repeat; transition: background-size .5s var(--ease); padding-bottom: 2px; }
html[dir="ltr"] .card-title a { background-position: 0 100%; }
.card:hover .card-title a { background-size: 100% 1px; }
.card-alt { margin: 0; font-size: 11.5px; color: var(--ink-3); letter-spacing: .12em; text-transform: uppercase; }
html[lang="en"] .card-alt { font-family: 'Tajawal', sans-serif; font-size: 14px; letter-spacing: 0; }
.card-sizes { display: flex; gap: 18px; flex-wrap: wrap; margin: 12px 0 14px; }
.size-pill { padding: 4px 0 6px; border: 0; background: none; font-size: 12.5px; font-weight: 600; color: var(--ink-3); position: relative; transition: color .25s; }
.size-pill::after { content: ''; position: absolute; inset: auto 0 0 0; height: 1.5px; background: var(--ink); transform: scaleX(0); transition: transform .3s var(--ease); }
.size-pill:hover { color: var(--ink); }
.size-pill.is-on { color: var(--ink); }
.size-pill.is-on::after { transform: scaleX(1); }
.card-foot { display: flex; align-items: center; justify-content: space-between; margin-top: auto; padding-top: 14px; border-top: 1px solid var(--line); }
.btn-add { display: inline-flex; align-items: center; gap: 8px; padding: 9px 14px; border: 0; font-weight: 700; font-size: 12.5px; letter-spacing: .04em; clip-path: polygon(7px 0, calc(100% - 7px) 0, 100% 7px, 100% calc(100% - 7px), calc(100% - 7px) 100%, 7px 100%, 0 calc(100% - 7px), 0 7px); background: var(--ink); color: var(--paper); transition: background .3s, color .3s; }
.btn-add:hover { background: var(--amber); color: var(--ink); }
.btn-add.is-done { background: var(--sage); color: var(--ink); }

/* ---------- sizes ---------- */
.sizes { background: var(--bg-2); overflow: hidden; }
.sizes-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: 40px; align-items: center; }
.size-readout { display: flex; align-items: baseline; gap: 16px; flex-wrap: wrap; margin: 30px 0 24px; padding: 20px 0; border-block: 1px solid var(--line); }
.size-readout strong { font: 500 44px/1 var(--f-display); }
.size-readout span { color: var(--ink-2); }
.size-readout .price { margin-inline-start: auto; color: var(--ink); font-size: 24px; }
.sizes-stage { display: flex; align-items: flex-end; justify-content: center; gap: 2%; min-height: 520px; }
.size-jar { background: none; border: 0; padding: 0; display: flex; flex-direction: column; align-items: center; gap: 10px; transition: transform .6s var(--ease), opacity .4s, filter .4s; opacity: .55; filter: saturate(.7); }
.size-jar img { width: 100%; height: auto; display: block; border-radius: 0; box-shadow: 0 30px 50px -34px rgba(84,56,26,.4); }
.size-jar span { font-weight: 600; font-size: 14px; padding: 6px 12px; border-radius: 0; border: 1px solid var(--line); }
.size-jar.sj-0 { width: 24%; } .size-jar.sj-1 { width: 30%; } .size-jar.sj-2 { width: 36%; }
.size-jar:hover { opacity: .85; }
.size-jar.is-on { opacity: 1; filter: none; transform: translateY(-14px); }
.size-jar.is-on span { background: var(--ink); color: var(--paper); border-color: var(--ink); }

/* ---------- hive rail ---------- */
.rail-wrap { position: relative; margin-inline: calc(var(--gutter) * -1); }
.hive-rail {
  display: grid; grid-auto-flow: column; grid-auto-columns: clamp(240px, 24vw, 300px); gap: 22px;
  overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-inline: var(--gutter);
  padding: 10px var(--gutter) 24px; scrollbar-width: none; overscroll-behavior-x: contain; cursor: grab;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 var(--gutter), #000 calc(100% - var(--gutter)), transparent 100%);
          mask-image: linear-gradient(90deg, transparent 0, #000 var(--gutter), #000 calc(100% - var(--gutter)), transparent 100%);
}
.hive-rail::-webkit-scrollbar { display: none; }
.hive-rail.is-dragging { cursor: grabbing; scroll-snap-type: none; user-select: none; }
.hive-rail.is-dragging .card { pointer-events: none; }
.rail-item { scroll-snap-align: start; }
.rail-controls { display: flex; align-items: center; gap: 10px; margin-top: 14px; }
.rail-progress { flex: 1; height: 2px; background: var(--line); border-radius: 0; position: relative; overflow: hidden; margin-inline-end: 18px; }
.rail-progress i { position: absolute; inset-block: 0; inset-inline-start: 0; width: 30%; background: var(--ink); border-radius: 0; transition: transform .35s var(--ease), width .35s var(--ease); }
.rail-btn { width: 50px; height: 50px; border-radius: 50%; border: 1px solid var(--line); background: var(--paper); color: var(--ink); display: grid; place-items: center; cursor: pointer; transition: background .3s, color .3s, border-color .3s, opacity .3s, transform .3s var(--ease); }
.rail-btn:hover:not(:disabled) { background: var(--ink); color: var(--paper); border-color: var(--ink); transform: scale(1.05); }
.rail-btn:disabled { opacity: .35; cursor: default; }
html[dir="rtl"] .rail-btn svg { transform: scaleX(-1); }

/* ---------- promise ---------- */
.promise { background: var(--paper); }
.promise-head { text-align: center; margin: 0 auto 60px; max-width: 760px; display: flex; flex-direction: column; align-items: center; }
.promise-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.promise-item { padding: 30px 26px; border-radius: 0; background: var(--bg); transition-delay: var(--d, 0ms); }
.p-hex { display: grid; place-items: center; width: 54px; aspect-ratio: 1.15; background: var(--honey); clip-path: polygon(25% 0, 75% 0, 100% 50%, 75% 100%, 25% 100%, 0 50%); font-weight: 700; font-size: 14px; margin-bottom: 26px; }
.promise-item h3 { font-size: 24px; margin-bottom: 10px; }
.promise-item p { margin: 0; color: var(--ink-2); font-size: 15px; }

/* ---------- CTA ---------- */
.cta-band { background: var(--dark); color: var(--paper); padding: clamp(70px, 9vw, 120px) 0; position: relative; overflow: hidden; }
.cta-band::before { content: ''; position: absolute; width: 520px; aspect-ratio: 1.15; background: var(--honey); opacity: .08; clip-path: polygon(25% 0, 75% 0, 100% 50%, 75% 100%, 25% 100%, 0 50%); inset-inline-end: -120px; top: -140px; }
.cta-inner { display: flex; justify-content: space-between; align-items: center; gap: 40px; flex-wrap: wrap; position: relative; }
.cta-inner p { color: rgba(250,248,243,.65); margin: 14px 0 0; font-size: 18px; }
.cta-actions { display: flex; gap: 12px; flex-wrap: wrap; }

/* ---------- footer ---------- */
.site-footer { background: var(--dark); color: rgba(250,248,243,.7); padding: 30px 0 30px; border-top: 1px solid rgba(255,255,255,.08); }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.2fr; gap: 40px; padding: 40px var(--gutter) 50px; }
.footer-brand { position: relative; }
.footer-word { height: 70px; width: auto; color: var(--paper); margin-bottom: 18px; }
.footer-brand p { max-width: 32ch; margin: 0; }
.hive-landing { position: absolute; top: -10px; inset-inline-end: 8%; width: 84px; color: rgba(252,198,50,.35); }
.site-footer h4 { font: 600 12px/1 var(--f-body); letter-spacing: .18em; text-transform: uppercase; color: var(--paper); margin-bottom: 18px; }
.site-footer .footer-grid > div:not(.footer-brand) { display: flex; flex-direction: column; gap: 10px; }
.site-footer a:hover { color: var(--honey); }
.footer-bottom { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; font-size: 13px; border-top: 1px solid rgba(255,255,255,.08); padding-top: 24px; }
.footer-tag { font-family: var(--f-display); font-style: italic; color: var(--honey); }

/* ---------- inner pages ---------- */
.page-hero { padding: 160px 0 50px; }
.page-hero-sm { padding: 140px 0 20px; }
.page-hero .lead { margin-top: 18px; }
.empty { padding: 60px 0; display: flex; flex-direction: column; align-items: flex-start; gap: 20px; color: var(--ink-2); font-size: 18px; }
.back-link { display: inline-block; font-size: 14px; color: var(--ink-3); margin-bottom: 18px; }
.back-link:hover { color: var(--ink); }

/* product page */
.pdp { padding: 130px 0 60px; }
.pdp-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 60px; align-items: start; }
.pdp-stage { position: sticky; top: 100px; aspect-ratio: 1 / 1.05; display: grid; place-items: center; border-radius: 0; overflow: hidden; background: #EBDDCB; }
.pdp-ghost { position: absolute; top: 8%; inset-inline: 0; text-align: center; font: 600 clamp(60px, 9vw, 140px)/1 var(--f-display); color: transparent; -webkit-text-stroke: 1px color-mix(in srgb, var(--c) 35%, transparent); white-space: nowrap; }
html[lang="en"] .pdp-ghost { font-family: 'El Messiri', serif; }
.pdp-disc { position: absolute; width: 62%; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fff8e3, color-mix(in srgb, var(--h) 70%, #fff)); opacity: .6; }
.pdp-img { position: relative; width: 100%; height: 100%; object-fit: cover; transition: opacity .25s, transform .6s var(--ease); }
.pdp-img.swap { opacity: 0; transform: translateY(14px) scale(.97); }
.pdp-info { padding-top: 20px; }
.pdp-alt { color: var(--ink-3); margin: 8px 0 18px; font-size: 18px; }
html[lang="en"] .pdp-alt { font-family: 'Tajawal', sans-serif; font-size: 20px; }
.pdp-price { font-size: 28px; margin: 0 0 18px; }
.pdp-form fieldset { border: 0; padding: 0; margin: 30px 0 22px; }
.pdp-form legend { font-weight: 700; font-size: 13px; letter-spacing: .14em; text-transform: uppercase; margin-bottom: 12px; }
html[lang="ar"] .pdp-form legend { letter-spacing: 0; font-size: 15px; }
.size-options { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 10px; }
.size-opt input { position: absolute; opacity: 0; }
.size-opt span { display: flex; flex-direction: column; gap: 4px; padding: 14px 16px; border-radius: 0; border: 1.5px solid var(--line); cursor: pointer; transition: all .25s; }
.size-opt b { font-size: 17px; }
.size-opt small { color: var(--ink-3); }
.size-opt input:checked + span { border-color: var(--ink); background: var(--paper); box-shadow: 0 0 0 3px color-mix(in srgb, var(--h) 40%, transparent); }
.size-opt input:focus-visible + span { outline: 2px solid var(--amber); }
.size-opt input:disabled + span { opacity: .4; cursor: not-allowed; }
.pdp-buy { display: flex; gap: 12px; }
.qty { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 0; overflow: hidden; background: var(--paper); }
.qty button { width: 42px; height: 50px; border: 0; background: none; font-size: 18px; }
.qty button:hover { background: var(--bg-2); }
.qty input { width: 42px; border: 0; text-align: center; font: 600 16px var(--f-body); background: none; -moz-appearance: textfield; }
.qty input::-webkit-inner-spin-button { -webkit-appearance: none; }
.pdp-details { margin: 40px 0 0; border-top: 1px solid var(--line); }
.pdp-details div { display: grid; grid-template-columns: 140px 1fr; gap: 20px; padding: 16px 0; border-bottom: 1px solid var(--line); margin: 0; }
.pdp-details dt { font-weight: 700; font-size: 14px; }
.pdp-details dd { margin: 0; color: var(--ink-2); font-size: 15px; }

/* cart & checkout */
.cart-layout, .checkout-layout { display: grid; grid-template-columns: 1.5fr 1fr; gap: 40px; align-items: start; }
.cart-line { display: grid; grid-template-columns: 90px 1fr auto auto; gap: 20px; align-items: center; padding: 18px 0; border-bottom: 1px solid var(--line); }
.cl-img { background: #EBDDCB; border-radius: 0; overflow: hidden; }
.cl-img img, .sum-line img { display: block; object-fit: cover; border-radius: 0; }
.cl-info { display: flex; flex-direction: column; gap: 4px; }
.cl-info strong { font: 500 20px/1.2 var(--f-display); }
.cl-info span { color: var(--ink-3); font-size: 14px; }
.summary { background: var(--paper); border-radius: 0; padding: 28px; position: sticky; top: 100px; }
.summary h3 { font-size: 26px; margin-bottom: 20px; }
.summary .row, .drawer-foot .row { display: flex; justify-content: space-between; padding: 10px 0; }
.summary .row.total { border-top: 1px solid var(--line); margin-top: 8px; padding-top: 18px; font-size: 19px; }
.summary .btn { margin-top: 18px; }
.summary .note { font-size: 13px; color: var(--ink-3); margin: 4px 0; }
.summary-inline { position: static; width: 100%; max-width: 520px; margin: 30px 0; text-align: start; }
.sum-line { display: grid; grid-template-columns: 48px 1fr auto; gap: 12px; align-items: center; padding: 8px 0; }
.sum-line span { display: flex; flex-direction: column; font-weight: 600; font-size: 14px; }
.sum-line small { color: var(--ink-3); font-weight: 400; }
.form-card { background: var(--paper); border-radius: 0; padding: clamp(22px, 3vw, 36px); }
.form-card h3 { font-size: 26px; margin: 0 0 20px; }
.form-card h3:not(:first-of-type) { margin-top: 30px; }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; flex: 1; }
.field span { font-size: 13px; font-weight: 600; color: var(--ink-2); }
.field input, .field textarea { width: 100%; padding: 14px 16px; border-radius: 0; border: 1.5px solid var(--line); background: var(--bg); font: 16px var(--f-body); color: var(--ink); transition: border-color .25s, background .25s; }
.field input:focus, .field textarea:focus { outline: 0; border-color: var(--ink); background: #fff; }
.field.has-error input, .field.has-error textarea { border-color: #b3412e; }
.err { color: #b3412e; font-size: 13px; }
.success { font-size: 18px; color: var(--brown); }
.field-row { display: flex; gap: 14px; }
.pay-opt { display: flex; gap: 12px; align-items: flex-start; padding: 16px; border: 1.5px solid var(--ink); border-radius: 0; }
.pay-opt span { display: flex; flex-direction: column; }
.pay-opt small { color: var(--ink-3); }
.thanks-hex { width: 120px; margin-bottom: 20px; }
.thanks .lead { max-width: 52ch; }

/* story / contact */
.story-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 40px; align-items: center; }
.story-body p { font-size: 19px; color: var(--ink-2); margin: 0 0 26px; }
.story-body .lead { font-size: clamp(22px, 2.2vw, 30px); color: var(--ink); font-family: var(--f-display); line-height: 1.35; max-width: none; }
.contact-grid { display: grid; grid-template-columns: 1fr 1.3fr; gap: 30px; align-items: start; }
.contact-cards { display: grid; gap: 14px; }
.c-card { background: var(--paper); border-radius: 0; padding: 22px 24px; display: flex; flex-direction: column; gap: 6px; transition: transform .4s var(--ease); }
a.c-card:hover { transform: translateY(-3px); }
.c-card small { color: var(--ink-3); font-size: 12px; text-transform: uppercase; letter-spacing: .14em; }
.c-card b { font: 500 22px/1.2 var(--f-display); }
.c-wa { background: var(--honey); }

/* ---------- drawer & toast ---------- */
.drawer-backdrop { position: fixed; inset: 0; background: rgba(26,23,20,.35); opacity: 0; pointer-events: none; transition: opacity .4s; z-index: 80; backdrop-filter: blur(2px); }
.cart-drawer { position: fixed; top: 0; bottom: 0; inset-inline-end: 0; width: min(440px, 100%); background: var(--bg); z-index: 90; display: flex; flex-direction: column; transform: translateX(105%); transition: transform .55s var(--ease); box-shadow: -30px 0 60px rgba(0,0,0,.12); }
html[dir="rtl"] .cart-drawer { transform: translateX(-105%); }
body.drawer-open .cart-drawer { transform: none; }
body.drawer-open .drawer-backdrop { opacity: 1; pointer-events: auto; }
.drawer-head { display: flex; justify-content: space-between; align-items: center; padding: 22px 24px; border-bottom: 1px solid var(--line); }
.drawer-head h3 { font-size: 28px; }
.drawer-body { flex: 1; overflow-y: auto; padding: 8px 24px; }
.drawer-foot { padding: 18px 24px 24px; border-top: 1px solid var(--line); display: grid; gap: 8px; }
.drawer-foot .muted { color: var(--ink-3); font-size: 14px; }
.d-line { display: grid; grid-template-columns: 64px 1fr auto; gap: 14px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--line); }
.d-line img { border-radius: 0; background: var(--paper); }
.d-line b { display: block; font: 500 17px/1.2 var(--f-display); }
.d-line small { color: var(--ink-3); }
.d-line .qty button { width: 30px; height: 34px; font-size: 15px; }
.d-line .qty input { width: 28px; font-size: 14px; }
.d-line .d-right { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.d-empty { padding: 40px 0; color: var(--ink-3); text-align: center; }
.toast { position: fixed; bottom: 24px; left: 50%; transform: translate(-50%, 140%); background: var(--ink); color: var(--paper); padding: 14px 22px; border-radius: 0; z-index: 100; transition: transform .5s var(--ease); font-weight: 600; display: flex; gap: 10px; align-items: center; }
.toast.show { transform: translate(-50%, 0); }
.toast::before { content: ''; width: 12px; height: 12px; background: var(--honey); clip-path: polygon(25% 0, 75% 0, 100% 50%, 75% 100%, 25% 100%, 0 50%); }

/* ---------- reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(36px); transition: opacity 1s var(--ease), transform 1.1s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

/* ---------- responsive ---------- */
@media (max-width: 1080px) {
  .main-nav { position: fixed; inset: 0; height: 100svh; background: var(--bg); flex-direction: column; justify-content: center; align-items: center; gap: 4px; transform: translateY(-100%); visibility: hidden; transition: transform .6s var(--ease), visibility 0s .6s; z-index: -2; }
  body.menu-open .main-nav { visibility: visible; transition: transform .6s var(--ease); }
  .main-nav a { font: 400 34px/1.2 var(--f-display); }
  body.menu-open .main-nav { transform: none; }
  .menu-btn { display: block; }
  .header-actions { margin-inline-start: auto; }
  .promise-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 860px) {
  .hero { padding-top: 110px; }
  .hero-grid, .journey-grid, .sizes-grid, .pdp-grid, .cart-layout, .checkout-layout, .story-grid, .contact-grid { grid-template-columns: 1fr; }
  .hero-grid { gap: 10px; }
  .hero-stage { min-height: 300px; order: -1; }
  .hero-logo { width: 62%; inset-inline-end: 4%; }
  .hero-photo { position: relative; inset: auto; margin: 30% calc(-1 * var(--gutter) - 6%) -4%; aspect-ratio: 4 / 3; }
  .hero-title { font-size: clamp(30px, 8.4vw, 44px); }
  html[lang="ar"] .hero-title { font-size: clamp(32px, 9vw, 48px); }
  .hero-stats { margin-top: 32px; }
  .journey-jar figcaption { display: none; }
  .hero-stats { gap: 22px; }
  .journey { height: 380vh; }
  .journey-grid { gap: 0; grid-template-rows: auto 1fr; }
  .journey-stage { height: 42vh; order: -1; }
  .journey-copy { align-content: start; padding-top: 16px; }
  .chapter h2 { font-size: 34px; margin-bottom: 12px; }
  .chapter p { font-size: 16px; }
  .journey-cta { display: none; }
  .journey-tabs { gap: 8px; font-size: 12px; }
  .jtab { font-size: 11px; --cell: 30px; column-gap: 6px; }
  .jcell span { font-size: 10px; }
  .jbee { width: 16px; height: 16px; margin: -8px; }
  .sizes-stage { min-height: 340px; }
  .pdp-stage { position: relative; top: 0; }
  .summary { position: static; }
  .cart-line { grid-template-columns: 70px 1fr; }
  .cart-line .qty, .cart-line .cl-total { grid-column: 2; justify-self: start; }
  .field-row { flex-direction: column; gap: 0; }
  .brand-en { display: none; }
  .lang-btn { padding: 8px 11px; font-size: 13px; }
  .fly-bee { width: 52px; }
}
@media (max-width: 560px) {
  .promise-grid, .footer-grid { grid-template-columns: 1fr; }
  /* land the bee where the last screen can still see it */
  .site-footer { position: relative; }
  .footer-brand { position: static; }
  .hive-landing { top: auto; bottom: 90px; inset-inline-end: 7%; width: 70px; }
  .grid { grid-template-columns: 1fr 1fr; gap: 30px 12px; }
  .card { --cut: 12px; }
  .card-body { padding: 12px 0 0; }
  .card-title { font-size: 17px; }
  .size-pill { font-size: 11px; }
  .card-sizes { gap: 12px; }
  .btn-add span { display: none; }
  .card-foot .price { font-size: 15px; }
  .pdp-details div { grid-template-columns: 1fr; gap: 4px; }
  .hero-ctas .btn { flex: 1; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
}


/* ==========================================================================
   CUT CORNERS — the site uses the jar label's chamfered corners instead of rounding.
   Filled shapes are clipped directly; outlined shapes draw their 1px edge as a
   clipped backing layer with the fill inset on ::before (a clipped border would lose its corners).
   ========================================================================== */
.btn-dark, .btn-honey, .toast, .summary, .form-card, .promise-item, .c-card, .pdp-stage, .journey-jar img, .size-jar img,
.cl-img, .sum-line img, .d-line img, .skip, .cart-count, .main-nav a,
.btn-ghost, .btn-ghost-light, .lang-btn, .size-jar span, .size-opt span, .qty, .pay-opt, .rail-btn, .menu-btn,
.btn-ghost::before, .btn-ghost-light::before, .lang-btn::before, .size-jar span::before, .size-opt span::before, .qty::before, .pay-opt::before, .rail-btn::before, .menu-btn::before {
  clip-path: polygon(var(--cut) 0, calc(100% - var(--cut)) 0, 100% var(--cut), 100% calc(100% - var(--cut)), calc(100% - var(--cut)) 100%, var(--cut) 100%, 0 calc(100% - var(--cut)), 0 var(--cut));
}
.btn, .lang-btn, .qty, .toast, .skip, .main-nav a, .size-jar span { --cut: 8px; }
.cart-count { --cut: 5px; }
.size-opt span, .pay-opt, .cl-img, .sum-line img, .d-line img { --cut: 10px; }
.summary, .form-card, .promise-item, .c-card, .size-jar img { --cut: 18px; }
.pdp-stage, .journey-jar img { --cut: 26px; }
/* outlined shapes */
.btn-ghost, .btn-ghost-light, .lang-btn, .size-jar span, .size-opt span, .qty, .pay-opt, .rail-btn, .menu-btn {
  --edge: var(--line); --fill: var(--bg); --bw: 1px;
  border-color: transparent; position: relative; isolation: isolate; background: var(--edge);
}
.btn-ghost::before, .btn-ghost-light::before, .lang-btn::before, .size-jar span::before, .size-opt span::before, .qty::before, .pay-opt::before, .rail-btn::before, .menu-btn::before {
  content: ''; position: absolute; inset: var(--bw); z-index: -1; background: var(--fill); transition: background .3s;
}
.btn-ghost:hover, .lang-btn:hover { --edge: var(--ink); border-color: transparent; }
.btn-ghost-light { --edge: rgba(255, 255, 255, .3); --fill: var(--dark); }
.btn-ghost-light:hover { --edge: var(--paper); border-color: transparent; }
.size-opt span, .pay-opt { --bw: 1.5px; }
.pay-opt { --edge: var(--ink); }
.size-opt input:checked + span { --edge: var(--ink); --fill: var(--paper); border-color: transparent; background: var(--edge); box-shadow: none; }
.size-opt input:checked + span::after { content: ''; position: absolute; inset-block-start: 0; inset-inline-end: 0; width: 0; height: 0; border-style: solid; border-width: 0 18px 18px 0; border-color: transparent var(--amber) transparent transparent; }
html[dir="rtl"] .size-opt input:checked + span::after { border-width: 18px 18px 0 0; border-color: var(--amber) transparent transparent transparent; }
.qty { --fill: var(--paper); padding: 1px; }
.rail-btn { --fill: var(--paper); }
.rail-btn:hover:not(:disabled) { --edge: var(--ink); --fill: var(--ink); background: var(--edge); }
/* round icon buttons become honeycomb cells */
.cart-btn, .rail-btn, .menu-btn { height: 52px; }
.rail-btn { width: 46px; }
.rail-btn, .menu-btn, .rail-btn::before, .menu-btn::before, .cart-btn::before { clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%); }
.cart-btn { background: none; isolation: isolate; }
.cart-btn::before { content: ''; position: absolute; inset: 0; z-index: -1; background: var(--ink); }
.cart-count { top: 1px; inset-inline-end: -5px; }
/* soft shadows survive the clip when cast by the wrapper */
.journey-jar, .size-jar { filter: drop-shadow(0 30px 34px rgba(84, 56, 26, .22)); }
.size-jar { filter: saturate(.7) drop-shadow(0 24px 26px rgba(84, 56, 26, .2)); }
.size-jar.is-on { filter: drop-shadow(0 24px 26px rgba(84, 56, 26, .2)); }
/* a clipped element cannot show an outer focus ring: draw it inside */
.btn:focus-visible, .lang-btn:focus-visible, .rail-btn:focus-visible, .menu-btn:focus-visible, .main-nav a:focus-visible, .c-card:focus-visible { outline-offset: -4px; }
.size-opt input:focus-visible + span { outline-offset: -5px; }
.size-jar.is-on span { --edge: var(--ink); --fill: var(--ink); background: var(--edge); border-color: transparent; }
@media (max-width: 640px) {
  .filters { flex-wrap: nowrap; gap: 22px; overflow-x: auto; scrollbar-width: none; }
  .filters::-webkit-scrollbar { display: none; }
  .chip { white-space: nowrap; flex-shrink: 0; }
}
/* rail arrows: two identical dark cells; amber on hover, pale outline when there is nowhere left to scroll */
.rail-btn { --edge: var(--ink); --fill: var(--ink); color: var(--paper); width: 46px; height: 53px; }
.rail-btn:hover:not(:disabled) { --edge: var(--amber); --fill: var(--amber); color: var(--ink); background: var(--edge); transform: none; }
.rail-btn:disabled { --edge: var(--line); --fill: var(--bg); color: var(--ink-3); opacity: 1; }
/* outlined shapes: the inner fill needs a slightly smaller cut, otherwise the diagonal edge is 1.4x thicker than the straight ones */
.btn-ghost::before, .btn-ghost-light::before, .lang-btn::before, .size-jar span::before, .size-opt span::before, .qty::before, .pay-opt::before {
  --ci: calc(var(--cut) - var(--bw) * .586);
  clip-path: polygon(var(--ci) 0, calc(100% - var(--ci)) 0, 100% var(--ci), 100% calc(100% - var(--ci)), calc(100% - var(--ci)) 100%, var(--ci) 100%, 0 calc(100% - var(--ci)), 0 var(--ci));
}
/* hover on outlined buttons: fill instead of a heavier outline */
.btn-ghost:hover, .lang-btn:hover { --edge: var(--ink); --fill: var(--ink); color: var(--paper); }
.btn-ghost-light:hover { --edge: var(--paper); --fill: var(--paper); color: var(--ink); }
.lang-btn { transition: color .3s; }
/* Tajawal sits high in its line box: nudge button labels down so they are optically centred */
.lang-btn { display: inline-flex; align-items: center; justify-content: center; line-height: 1; padding-block: 15px 12px; }
html[lang="ar"] .btn { padding-block: 17px 15px; }
html[lang="ar"] .btn-add span { padding-top: 2px; line-height: 1; }
html[lang="ar"] .btn-add { padding-block: 10px; }
html[lang="ar"] .main-nav a { padding-block: 11px 9px; }
html[lang="ar"] .size-jar span { padding-block: 7px 5px; }
.cart-count { line-height: 22px; }
/* the old circle radius must go, or the hexagon is drawn from a clipped ellipse */
.rail-btn, .menu-btn, .cart-btn, .icon-btn { border-radius: 0; }
.rail-btn, .menu-btn { border: 0; }
