/* Rose Avenue — storefront */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  /* cream and black carry the whole thing; the rose red appears only in traces */
  --sand:  #C6B097;   /* the logo disc — used sparingly */
  --sand-d:#B49B7E;
  --cream: #F1EBE0;
  --ivory: #FBF9F5;
  --ink:   #0E0E0E;
  --wine:  #6E1420;
  --muted: #8B8177;
  --line:  #E7E0D5;
  --ok:    #3F6B4E;

  --display: 'Italiana', 'Bodoni MT', serif;
  --body:    'Assistant', 'Segoe UI', system-ui, sans-serif;

  --wrap: 1240px;
  --nav-h: 76px;
  --r: 2px;
  --shadow: 0 18px 60px rgba(20,17,15,.10);
}

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  background: var(--ivory);
  color: var(--ink);
  font-family: var(--body);
  font-weight: 300;
  line-height: 1.65;
  direction: rtl;
  overflow-x: hidden;
}
body.locked { overflow: hidden; }

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { background: none; border: 0; cursor: pointer; }

.wrap { max-width: var(--wrap); margin-inline: auto; padding-inline: 28px; }

/* latin display type is isolated LTR so tracking sits on the correct side */
.lat { font-family: var(--display); direction: ltr; unicode-bidi: isolate; letter-spacing: .18em; }

.eyebrow {
  font-size: 11px; letter-spacing: .34em; text-transform: uppercase;
  color: var(--muted); font-weight: 400;
}
.h-sec {
  font-family: var(--display); direction: ltr; unicode-bidi: isolate;
  letter-spacing: .16em; font-size: clamp(30px, 4.4vw, 52px); line-height: 1.1;
  font-weight: 400;
}
.h-he { font-size: clamp(26px, 3.6vw, 40px); font-weight: 300; letter-spacing: -.01em; line-height: 1.25; }
.lede { color: var(--muted); font-size: 16px; max-width: 56ch; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 15px 34px; border-radius: var(--r); font-size: 13px; font-weight: 500;
  letter-spacing: .12em; text-transform: uppercase;
  background: var(--ink); color: var(--ivory);
  transition: background .25s, color .25s, opacity .25s;
}
.btn:hover { background: var(--wine); }
.btn.ghost { background: transparent; color: var(--ink); border: 1px solid var(--ink); }
.btn.ghost:hover { background: var(--ink); color: var(--ivory); }
.btn.wide { width: 100%; }
.btn[disabled] { opacity: .45; cursor: not-allowed; }

/* ── header ─────────────────────────────────────────────── */
header {
  position: fixed; inset: 0 0 auto; z-index: 90;
  background: rgba(253,250,246,.86); backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent; transition: border-color .3s;
}
header.on { border-bottom-color: var(--line); }
.bar { height: var(--nav-h); display: flex; align-items: center; gap: 26px; }
.brand { display: flex; align-items: center; gap: 12px; margin-inline-end: auto; }
.brand img { width: 42px; height: 42px; border-radius: 50%; }
.brand .nm { font-family: var(--display); direction: ltr; letter-spacing: .22em; font-size: 17px; white-space: nowrap; }
nav.links { display: flex; gap: 30px; font-size: 14px; }
nav.links a { position: relative; padding: 4px 0; color: var(--muted); transition: color .2s; }
nav.links a:hover { color: var(--ink); }
nav.links a::after {
  content: ""; position: absolute; inset: auto 0 0; height: 1px;
  background: var(--ink); transform: scaleX(0); transition: transform .3s;
}
nav.links a:hover::after { transform: scaleX(1); }
.tools { display: flex; align-items: center; gap: 6px; }
.icon-btn { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 50%; transition: background .2s; }
.icon-btn:hover { background: var(--cream); }
.icon-btn svg { width: 21px; height: 21px; stroke: var(--ink); stroke-width: 1.4; fill: none; }
.cart-btn { position: relative; }
.cart-count {
  position: absolute; top: 4px; inset-inline-start: 4px; min-width: 18px; height: 18px; padding: 0 5px;
  border-radius: 9px; background: var(--wine); color: #fff;
  font-size: 11px; font-weight: 600; display: grid; place-items: center;
  transform: scale(0); transition: transform .25s cubic-bezier(.34,1.56,.64,1);
}
.cart-count.show { transform: scale(1); }
.burger { display: none; }

/* ── hero ───────────────────────────────────────────────── */
.hero {
  min-height: 92vh; display: grid; place-items: center; text-align: center;
  padding: calc(var(--nav-h) + 70px) 0 80px;
  background:
    radial-gradient(1100px 620px at 50% -12%, rgba(198,176,151,.34), transparent 68%),
    var(--ivory);
}
.hero .mark { width: min(232px, 46vw); border-radius: 50%; box-shadow: var(--shadow); margin-inline: auto; }
.hero h1 { margin-top: 34px; font-size: clamp(34px, 6.4vw, 74px); }
.hero p { margin: 20px auto 0; color: var(--muted); font-size: 17px; max-width: 46ch; }
.hero .cta { margin-top: 40px; display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* ── strip ──────────────────────────────────────────────── */
.strip { background: var(--cream); color: var(--ink); border-block: 1px solid var(--line); }
.strip .wrap { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; padding-block: 30px; }
.strip .cell { display: flex; align-items: center; justify-content: center; gap: 12px; font-size: 14px; }
.strip svg { width: 22px; height: 22px; stroke: var(--ink); stroke-width: 1.3; fill: none; flex: none; }

/* ── section frame ──────────────────────────────────────── */
.sec { padding: 104px 0; }
.sec-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 30px; flex-wrap: wrap; margin-bottom: 42px; }

/* ── filters ────────────────────────────────────────────── */
.filters { display: flex; gap: 10px; flex-wrap: wrap; }
.chip {
  padding: 9px 20px; border: 1px solid var(--line); border-radius: 999px;
  font-size: 13px; color: var(--muted); transition: all .22s;
}
.chip:hover { border-color: var(--sand-d); color: var(--ink); }
.chip.on { background: var(--ink); border-color: var(--ink); color: var(--ivory); }

/* ── product grid ───────────────────────────────────────── */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(258px, 1fr)); gap: 34px 26px; }
.card { position: relative; }
.card .shot {
  position: relative; aspect-ratio: 3/4; overflow: hidden; background: #fff;
  border: 1px solid var(--line); border-radius: var(--r); cursor: pointer;
}
.card .shot img { width: 100%; height: 100%; object-fit: contain; transition: transform .8s cubic-bezier(.2,.6,.2,1); }
.card:hover .shot img { transform: scale(1.045); }
.card .badge {
  position: absolute; top: 12px; inset-inline-start: 12px; z-index: 2;
  background: var(--ivory); color: var(--ink);
  font-size: 10px; letter-spacing: .16em; text-transform: uppercase;
  padding: 6px 11px; border-radius: var(--r);
}
.card .badge.sale { background: var(--wine); color: #fff; }
.card .quick {
  position: absolute; inset: auto 12px 12px; z-index: 2;
  background: rgba(253,250,246,.95); color: var(--ink); backdrop-filter: blur(6px);
  padding: 13px; text-align: center; font-size: 12px; letter-spacing: .14em; text-transform: uppercase;
  border-radius: var(--r); opacity: 0; transform: translateY(10px); transition: opacity .3s, transform .3s;
}
.card:hover .quick, .card:focus-within .quick { opacity: 1; transform: none; }
.card .meta { padding-top: 15px; display: flex; justify-content: space-between; gap: 14px; align-items: baseline; }
.card .nm { font-size: 15px; font-weight: 400; }
.card .cat { font-size: 12px; color: var(--muted); margin-top: 2px; }
.card .price { font-size: 15px; white-space: nowrap; }
.was { color: var(--muted); text-decoration: line-through; font-size: 13px; margin-inline-start: 7px; }
/* every price is its own bidi run, so two of them never merge on an RTL line */
.m { direction: ltr; unicode-bidi: isolate; }
.swatches { display: flex; gap: 6px; margin-top: 9px; }
.swatches i { width: 13px; height: 13px; border-radius: 50%; border: 1px solid var(--line); display: block; }

/* photo not supplied yet — a designed stand-in rather than a broken image */
.ph { position: absolute; inset: 0; display: grid; place-items: center; align-content: center; gap: 10px;
      background: linear-gradient(150deg, var(--cream), var(--sand)); text-align: center; padding: 20px; }
.ph span { font-size: 11px; letter-spacing: .2em; text-transform: uppercase; color: rgba(20,17,15,.5); }
.ph svg { width: 40px; height: 40px; stroke: rgba(20,17,15,.42); stroke-width: 1.1; fill: none; }

/* ── story ──────────────────────────────────────────────── */
.story { background: var(--cream); }
.story .wrap { display: grid; grid-template-columns: 1fr 1fr; gap: 70px; align-items: center; }
.story .art { aspect-ratio: 4/5; position: relative; overflow: hidden; border-radius: var(--r); background: #fff; border: 1px solid var(--line); }
.story .art img { width: 100%; height: 100%; object-fit: cover; }
.story h2 { margin-bottom: 20px; }
.story p + p { margin-top: 15px; }

/* ── drawer + modal shell ───────────────────────────────── */
.scrim { position: fixed; inset: 0; z-index: 100; background: rgba(20,17,15,.42);
         opacity: 0; pointer-events: none; transition: opacity .35s; }
.scrim.open { opacity: 1; pointer-events: auto; }

.drawer {
  position: fixed; inset-block: 0; inset-inline-end: 0; z-index: 110;
  width: min(430px, 100%); background: var(--ivory);
  display: flex; flex-direction: column;
  transform: translateX(-100%); transition: transform .42s cubic-bezier(.4,0,.2,1);
}
.drawer.open { transform: none; }
.drawer-head { display: flex; align-items: center; justify-content: space-between;
               padding: 22px 26px; border-bottom: 1px solid var(--line); }
.drawer-head h3 { font-size: 15px; letter-spacing: .12em; text-transform: uppercase; font-weight: 500; }
.drawer-body { flex: 1; overflow-y: auto; padding: 22px 26px; }
.drawer-foot { border-top: 1px solid var(--line); padding: 22px 26px; background: var(--cream); }

.line-item { display: grid; grid-template-columns: 78px 1fr auto; gap: 15px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.line-item:first-child { padding-top: 0; }
.line-item .thumb { aspect-ratio: 3/4; overflow: hidden; border-radius: var(--r); background: #fff; border: 1px solid var(--line); position: relative; }
.line-item .thumb img { width: 100%; height: 100%; object-fit: contain; }
.line-item .nm { font-size: 14px; }
.line-item .opt { font-size: 12px; color: var(--muted); margin-top: 3px; }
.qty { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: var(--r); margin-top: 9px; }
.qty button { width: 28px; height: 28px; display: grid; place-items: center; color: var(--muted); font-size: 15px; }
.qty button:hover { color: var(--ink); }
.qty span { min-width: 26px; text-align: center; font-size: 13px; }
.line-item .right { text-align: end; display: flex; flex-direction: column; justify-content: space-between; }
.line-item .rm { font-size: 12px; color: var(--muted); text-decoration: underline; }
.line-item .rm:hover { color: var(--wine); }

.totals { font-size: 14px; }
.totals .row { display: flex; justify-content: space-between; padding: 5px 0; }
.totals .row.big { font-size: 17px; font-weight: 500; border-top: 1px solid var(--line); margin-top: 10px; padding-top: 13px; }
.ship-note { font-size: 12px; color: var(--muted); margin: 6px 0 16px; }
.ship-bar { height: 3px; background: var(--line); border-radius: 2px; overflow: hidden; margin-top: 8px; }
.ship-bar i { display: block; height: 100%; background: var(--ok); transition: width .4s; }
.empty { text-align: center; color: var(--muted); padding: 70px 0; }
.empty svg { width: 46px; height: 46px; stroke: var(--line); stroke-width: 1.2; fill: none; margin: 0 auto 16px; }

/* ── product modal ──────────────────────────────────────── */
.modal {
  position: fixed; inset: 0; z-index: 110; display: grid; place-items: center; padding: 22px;
  opacity: 0; pointer-events: none; transition: opacity .3s;
}
.modal.open { opacity: 1; pointer-events: auto; }
.modal .box {
  background: var(--ivory); width: min(940px, 100%); max-height: 90vh; overflow: auto;
  display: grid; grid-template-columns: 1fr 1fr; border-radius: var(--r);
  transform: translateY(16px) scale(.985); transition: transform .35s cubic-bezier(.4,0,.2,1);
}
.modal.open .box { transform: none; }
.modal .gal { background: #fff; position: relative; border-inline-end: 1px solid var(--line); }
.modal .gal .main { aspect-ratio: 3/4; position: relative; overflow: hidden; }
.modal .gal .main img { width: 100%; height: 100%; object-fit: contain; }
.modal .gal .thumbs { display: flex; gap: 8px; padding: 10px; }
.modal .gal .thumbs button { width: 54px; aspect-ratio: 3/4; overflow: hidden; border: 1px solid transparent; border-radius: var(--r); position: relative; }
.modal .gal .thumbs button.on { border-color: var(--ink); }
.modal .gal .thumbs img { width: 100%; height: 100%; object-fit: contain; background: #fff; }
.modal .info { padding: 40px 38px; position: relative; }
.modal .close { position: absolute; top: 14px; inset-inline-end: 14px; font-size: 24px; line-height: 1; color: var(--muted); }
.modal .close:hover { color: var(--ink); }
.modal .info h3 { font-size: 25px; font-weight: 300; }
.modal .info .cat { font-size: 12px; color: var(--muted); letter-spacing: .12em; text-transform: uppercase; margin-bottom: 8px; }
.modal .info .pr { font-size: 21px; margin: 14px 0 20px; }
.modal .info .desc { color: var(--muted); font-size: 15px; }
.opt-group { margin-top: 24px; }
.opt-group .lbl { font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-bottom: 10px; display: flex; justify-content: space-between; }
.opt-group .lbl a { text-decoration: underline; }
.sizes { display: flex; gap: 8px; flex-wrap: wrap; }
.sizes button {
  min-width: 46px; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r);
  font-size: 13px; transition: all .2s;
}
.sizes button:hover { border-color: var(--ink); }
.sizes button.on { background: var(--ink); border-color: var(--ink); color: var(--ivory); }
.sizes button.out { opacity: .35; text-decoration: line-through; cursor: not-allowed; }
.colors { display: flex; gap: 10px; }
.colors button { width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--line); }
.colors button.on { box-shadow: 0 0 0 1px var(--ivory) inset, 0 0 0 2px var(--ink); }
.err { color: var(--wine); font-size: 13px; margin-top: 10px; min-height: 19px; }

/* ── checkout ───────────────────────────────────────────── */
.co { padding: calc(var(--nav-h) + 56px) 0 90px; }
.co-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 56px; align-items: start; }
.panel { border: 1px solid var(--line); border-radius: var(--r); padding: 30px; background: var(--ivory); }
.panel + .panel { margin-top: 22px; }
.panel h3 { font-size: 13px; letter-spacing: .16em; text-transform: uppercase; font-weight: 500; margin-bottom: 20px; }
.fields { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field { display: flex; flex-direction: column; gap: 7px; }
.field.full { grid-column: 1 / -1; }
.field label { font-size: 12px; color: var(--muted); }
.field input, .field textarea, .field select {
  border: 1px solid var(--line); border-radius: var(--r); padding: 12px 14px;
  background: var(--ivory); font-size: 15px; font-weight: 300; transition: border-color .2s;
}
.field input:focus, .field textarea:focus, .field select:focus { outline: none; border-color: var(--ink); }
.field .hint { font-size: 11px; color: var(--muted); }
.ship-opt { display: flex; gap: 14px; align-items: flex-start; border: 1px solid var(--line); border-radius: var(--r); padding: 15px; cursor: pointer; }
.ship-opt + .ship-opt { margin-top: 10px; }
.ship-opt.on { border-color: var(--ink); background: var(--cream); }
.ship-opt input { margin-top: 5px; accent-color: var(--ink); }
.ship-opt .t { font-size: 14px; }
.ship-opt .s { font-size: 12px; color: var(--muted); }
.ship-opt .p { margin-inline-start: auto; font-size: 14px; }
.summary { position: sticky; top: calc(var(--nav-h) + 22px); background: var(--cream); }
.summary .line-item { grid-template-columns: 62px 1fr auto; }
.pay-note { font-size: 12px; color: var(--muted); margin-top: 14px; text-align: center; }
.done { text-align: center; max-width: 620px; margin-inline: auto; padding: 60px 0; }
.done svg { width: 62px; height: 62px; stroke: var(--ok); stroke-width: 1.2; fill: none; margin: 0 auto 24px; }

/* ── footer ─────────────────────────────────────────────── */
footer { background: var(--ink); color: #CFC5B8; padding: 74px 0 30px; }
footer .cols { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 42px; }
footer h4 { color: var(--ivory); font-size: 12px; letter-spacing: .18em; text-transform: uppercase; margin-bottom: 16px; font-weight: 500; }
footer a { display: block; padding: 5px 0; font-size: 14px; transition: color .2s; }
footer a:hover { color: var(--ivory); }
footer .logo { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
footer .logo img { width: 46px; height: 46px; border-radius: 50%; }
footer .logo .nm { font-family: var(--display); direction: ltr; letter-spacing: .22em; font-size: 17px; color: var(--ivory); }
footer .bottom { border-top: 1px solid rgba(255,255,255,.1); margin-top: 52px; padding-top: 22px;
                 display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: 12.5px; }

/* ── toast ──────────────────────────────────────────────── */
.toast {
  position: fixed; bottom: 26px; left: 50%; transform: translate(-50%, 22px); z-index: 200;
  background: var(--ink); color: var(--ivory); padding: 13px 24px; border-radius: var(--r);
  font-size: 14px; opacity: 0; pointer-events: none; transition: opacity .3s, transform .3s;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ── responsive ─────────────────────────────────────────── */
@media (max-width: 900px) {
  .story .wrap, .co-grid, .modal .box { grid-template-columns: 1fr; }
  .modal .box { max-height: 92vh; }
  .modal .info { padding: 30px 26px 38px; }
  .summary { position: static; }
  nav.links {
    position: fixed; inset: var(--nav-h) 0 auto; flex-direction: column; gap: 0;
    background: var(--ivory); border-bottom: 1px solid var(--line); padding: 10px 28px 22px;
    transform: translateY(-120%); transition: transform .35s; z-index: -1;
  }
  nav.links.open { transform: none; }
  nav.links a { padding: 13px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
  .burger { display: grid; }
  .strip .wrap { grid-template-columns: 1fr; gap: 14px; }
  .sec { padding: 74px 0; }
  footer .cols { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .wrap { padding-inline: 20px; }
  .grid { grid-template-columns: 1fr 1fr; gap: 26px 14px; }
  .card .quick { opacity: 1; transform: none; padding: 10px; font-size: 11px; }
  .fields { grid-template-columns: 1fr; }
  footer .cols { grid-template-columns: 1fr; gap: 30px; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition-duration: .01ms !important; }
  html { scroll-behavior: auto; }
}

/* ── rose accents ───────────────────────────────────────────
   the mark shows up as a quiet punctuation, never as decoration
   for its own sake: a divider between sections and a corner note. */
.rose-div { display: flex; align-items: center; gap: 18px; margin: 0 auto; max-width: 300px; }
.rose-div::before, .rose-div::after {
  content: ""; flex: 1; height: 1px;
  background: linear-gradient(to var(--to, right), transparent, var(--line));
}
.rose-div::before { --to: left; }
.rose-ico { width: 26px; height: 26px; stroke: var(--wine); stroke-width: 1.25; fill: none; flex: none; opacity: .8; stroke-linecap: round; stroke-linejoin: round; }
.rose-ico.lg { width: 34px; height: 34px; }
.rose-watermark {
  position: absolute; pointer-events: none; opacity: .05;
  width: 300px; height: 300px; stroke: var(--ink); stroke-width: .7; fill: none;
}

/* ── lookbook ───────────────────────────────────────────── */
.look { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.look figure { position: relative; overflow: hidden; border-radius: var(--r); background: #fff; border: 1px solid var(--line); }
.look img { width: 100%; object-fit: contain; aspect-ratio: 1106/1422; transition: transform .9s cubic-bezier(.2,.6,.2,1); }
.look figure:hover img { transform: scale(1.03); }
@media (max-width: 760px) { .look { grid-template-columns: 1fr; } }

/* ── pickup points ──────────────────────────────────────── */
.spots { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 18px; }
.spot { border: 1px solid var(--line); border-radius: var(--r); padding: 18px 20px; background: var(--ivory); }
.spot .c { font-size: 15px; }
.spot .s { font-size: 13px; color: var(--muted); }
@media (max-width: 560px) { .spots { grid-template-columns: 1fr; } }

/* ── legal pages ────────────────────────────────────────── */
.legal { padding: calc(var(--nav-h) + 56px) 0 90px; }
.legal .body { max-width: 74ch; }
.legal h2 { font-size: 19px; font-weight: 500; margin: 34px 0 10px; }
.legal p, .legal li { color: var(--muted); font-size: 15.5px; }
.legal ul { margin: 8px 24px 0; }
.legal li { margin-bottom: 6px; }
.legal .note { background: var(--cream); border: 1px solid var(--line); border-radius: var(--r); padding: 18px 20px; margin-top: 26px; font-size: 14px; }

/* footer links are display:block, which would otherwise defeat [hidden] */
footer a[hidden] { display: none; }

/* ── product gallery ────────────────────────────────────── */
.modal .gal .main { position: relative; aspect-ratio: auto; }   /* .frame now owns the height */
.modal .gal .frame { aspect-ratio: 3/4; overflow: hidden; }
.modal .gal .frame img { width: 100%; height: 100%; object-fit: contain; }
.gnav {
  position: absolute; top: 50%; translate: 0 -50%; z-index: 3;
  width: 38px; height: 38px; border-radius: 50%;
  background: rgba(253,250,246,.92); color: var(--ink);
  font-size: 22px; line-height: 1; display: grid; place-items: center;
  box-shadow: 0 2px 12px rgba(20,17,15,.14);
  opacity: 0; transition: opacity .25s, background .2s;
}
.modal .gal:hover .gnav, .gnav:focus-visible { opacity: 1; }
.gnav:hover { background: var(--ivory); }
.gnav.prev { inset-inline-start: 12px; }
.gnav.next { inset-inline-end: 12px; }
.gcount {
  direction: ltr; unicode-bidi: isolate;
  position: absolute; inset-block-end: 12px; inset-inline-end: 12px; z-index: 3;
  background: rgba(253,250,246,.9); border-radius: 999px;
  padding: 4px 12px; font-size: 12px; letter-spacing: .06em;
}
@media (hover: none) { .gnav { opacity: 1; } }

/* ═══════════════════════════════════════════════════════════
   PHONES
   The layout already reflows; what follows fixes the things
   that only bite on a real handset — the buy button sitting
   below the fold, iOS zooming into 15px inputs, and the
   address bar eating a vh-sized hero.
   ═══════════════════════════════════════════════════════════ */

/* ── product sheet ──────────────────────────────────────── */
@media (max-width: 900px) {
  .modal { padding: 0; align-items: end; }
  .modal .box {
    width: 100%;
    max-height: 92vh;
    max-height: 92svh;
    border-radius: 14px 14px 0 0;
    transform: translateY(28px);
  }
  .modal.open .box { transform: none; }

  /* cap the gallery so size buttons and price start above the fold */
  .modal .gal .frame { aspect-ratio: auto; height: min(26svh, 232px); }
  .modal .gal .thumbs { padding: 7px; gap: 6px; }
  .modal .gal .thumbs button { width: 40px; }

  .modal .info { padding: 16px 20px 16px; }
  .modal .info h3 { font-size: 21px; line-height: 1.2; }
  .modal .info .pr { font-size: 19px; margin: 8px 0 0; }
  .modal .info .desc { font-size: 14.5px; }
  .opt-group { margin-top: 16px; }
  .modal .info .lbl { margin-bottom: 8px; }

  /* the buy button sits directly under the size row - sticky would shove it
     to the foot of the sheet and cover the sizes it belongs to */
  .modal .info #pAdd { margin-top: 18px; }

  .gnav { width: 34px; height: 34px; font-size: 19px; }
}

/* ── everything else ────────────────────────────────────── */
@media (max-width: 640px) {
  :root { --nav-h: 62px; }

  .brand img { width: 36px; height: 36px; }
  .brand .nm { font-size: 15px; letter-spacing: .18em; }

  .sec { padding: 58px 0; }
  .sec-head { margin-bottom: 26px; gap: 18px; }
  .h-sec { font-size: 27px; letter-spacing: .09em; }
  .h-he  { font-size: 25px; }
  .lede  { font-size: 15px; }

  /* svh, so a collapsing address bar cannot push the buttons off screen */
  .hero { min-height: 86vh; min-height: 86svh; padding: calc(var(--nav-h) + 38px) 0 54px; }
  .hero .mark { width: min(158px, 44vw); }
  .hero h1 { margin-top: 24px; }
  .hero p { font-size: 15.5px; margin-top: 16px; }
  .hero .cta { margin-top: 28px; gap: 10px; }
  .hero .cta .btn { flex: 1 1 140px; padding-inline: 16px; }

  /* filters slide sideways rather than stacking into three rows */
  .filters {
    flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none;
    margin-inline: -20px; padding-inline: 20px;
    scroll-snap-type: x proximity; -webkit-overflow-scrolling: touch;
  }
  .filters::-webkit-scrollbar { display: none; }
  .chip { flex: none; scroll-snap-align: start; }

  /* a 160px card cannot hold name and price on one line */
  .card .meta { display: block; padding-top: 12px; }
  .card .nm { font-size: 14px; line-height: 1.35; }
  .card .price { display: block; margin-top: 5px; font-size: 14px; }
  .card .quick { inset: auto 8px 8px; }

  .strip .wrap { padding-block: 22px; }
  .story .wrap { gap: 34px; }
  .panel { padding: 24px 20px; }

  .drawer-head, .drawer-body { padding-inline: 20px; }
  .drawer-foot { padding: 18px 20px calc(18px + env(safe-area-inset-bottom)); }

  .co { padding-top: calc(var(--nav-h) + 34px); }
  .co-grid { gap: 26px; }
  /* the form comes first: the pay button must not sit above the fields */

  footer { padding: 54px 0 calc(24px + env(safe-area-inset-bottom)); }
  footer .bottom { flex-direction: column; gap: 8px; }

  .legal { padding-top: calc(var(--nav-h) + 34px); }
  .legal h2 { font-size: 17.5px; margin-top: 28px; }
}

/* iOS zooms the whole page in when a focused field is under 16px */
@media (max-width: 900px) {
  .field input, .field textarea, .field select { font-size: 16px; }
}

/* the drawer should scroll on its own without dragging the page behind it */
.drawer-body { overscroll-behavior: contain; }
.modal .box { overscroll-behavior: contain; }

/* On a phone the buying decision comes first: colour, size and the button
   sit above the fold, and the description follows underneath. */
@media (max-width: 900px) {
  .modal .info { display: flex; flex-direction: column; }
  .modal .info .cat  { order: 0; }
  .modal .info h3    { order: 0; }
  .modal .info .pr   { order: 1; }
  .modal .info .opt-group { order: 2; }
  .modal .info .err  { order: 3; }
  .modal .info #pAdd { order: 4; }
  .modal .info .desc { order: 5; margin-top: 22px; }
  .modal .info .pay-note { order: 6; }
  .modal .info .panel { order: 7; }
  .modal .info .opt-group:first-of-type { margin-top: 14px; }
}
