/* KussiAmma.lk — single-page coconut ordering site.
   Modernist structure — zero corner radius, 2px rules doing all the
   structural work — on a tropical palette: cream ground, tan mid-tones,
   deep green accent, picked to sit with the green on the packs. */
@import url('https://fonts.googleapis.com/css2?family=Archivo:wght@400;600;800&display=swap');

:root {
  --color-bg: #f7f2e7;          /* cream */
  --color-surface: #ece2cd;     /* tan */
  --color-text: #1e3026;        /* deep green, dark enough to act as ink */
  --color-accent: #2d6a4f;      /* deep green */
  --color-accent-700: #1b4732;  /* darker, for hover and pressed */
  --color-divider: color-mix(in srgb, #1e3026 40%, transparent);

  /* Errors must not be green in a green palette, or they stop reading as
     errors. A warm rust keeps the tropical family and still says "wrong". */
  --color-error: #a3412a;

  --color-accent-300: #b7d7c2;  /* pale green */
  --color-neutral-300: #d9cdb4; /* tan rule */
  --color-neutral-600: #8a7c62;
  --color-neutral-700: #6b5f49;
  --color-neutral-800: #4a4232;

  --font: "Archivo", system-ui, -apple-system, sans-serif;

  --wrap: 1200px;
  --gutter: clamp(20px, 5vw, 72px);
  --rule: 2px;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 118px; }

body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3, h4 {
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -0.015em;
  margin: 0 0 8px;
}
p { margin: 0 0 12px; }
a { color: inherit; }
img { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 2px; }

.wrap { width: min(100% - (2 * var(--gutter)), var(--wrap)); margin-inline: auto; }
.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;
}

/* Section scaffolding ─────────────────────────────────────────────────── */
.section { padding: clamp(48px, 7vw, 88px) 0; }
.kicker {
  font-size: 13px; font-weight: 600;
  letter-spacing: .08em; text-transform: uppercase;
  color: var(--color-accent);
  margin: 0 0 10px;
}
.section h2 { font-size: clamp(26px, 3.4vw, 40px); line-height: 1.1; }
.lede { font-size: 16px; line-height: 1.7; max-width: 52ch; color: var(--color-neutral-800); }

/* Buttons — square, heavy, two weights only ───────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 11px 22px;
  border: 0; border-radius: 0;
  font-size: 15px; font-weight: 800;
  text-decoration: none; cursor: pointer;
  transition: background .15s ease, color .15s ease;
}
.btn--primary { background: var(--color-accent); color: var(--color-bg); }
.btn--primary:hover { background: var(--color-accent-700); }
.btn--ghost { background: transparent; color: var(--color-text); box-shadow: inset 0 0 0 var(--rule) var(--color-text); }
.btn--ghost:hover { background: var(--color-text); color: var(--color-bg); }
.btn--paper { background: transparent; color: var(--color-bg); box-shadow: inset 0 0 0 1px var(--color-bg); }
.btn--paper:hover { background: var(--color-bg); color: var(--color-accent); }
.btn--block { width: 100%; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }

/* Navigation ──────────────────────────────────────────────────────────── */
.nav {
  position: sticky; top: 0; z-index: 40;
  background: var(--color-bg);
  border-bottom: var(--rule) solid var(--color-divider);
}
/* Frosted paper, so the page reads through the bar as it scrolls under. */
@supports (backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px)) {
  .nav {
    background: color-mix(in srgb, var(--color-bg) 72%, transparent);
    -webkit-backdrop-filter: blur(16px) saturate(1.3);
    backdrop-filter: blur(16px) saturate(1.3);
  }
}
.nav-inner {
  display: flex; flex-wrap: wrap; align-items: center; gap: 16px;
  padding: 12px var(--gutter);
}
/* The logo carries its own colour and detail, so it is given height and
   left alone — no filters, no frame. */
.brand { display: block; line-height: 0; text-decoration: none; }
.brand img { height: 80px; width: auto; }
.nav-links { display: flex; flex-wrap: wrap; gap: 20px; margin-left: auto; }
.nav-links a {
  font-size: 14px; font-weight: 600; text-decoration: none;
  color: var(--color-neutral-800);
}
.nav-links a:hover { color: var(--color-accent); }

/* Hero — full bleed, rotating photographs ─────────────────────────────── */
.hero {
  position: relative; overflow: hidden;
  min-height: clamp(500px, 68vh, 760px);
  display: grid; align-items: center;
  background: var(--color-surface);
}
.hero-photo {
  position: absolute; inset: 0;
  opacity: 0; transition: opacity 600ms ease;
}
.hero-photo.is-active { opacity: 1; }
.hero-photo img { width: 100%; height: 100%; object-fit: cover; }
/* The plate needs a readable ground whatever photograph is behind it. */
.hero::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(16,32,24,.66), rgba(16,32,24,.2) 62%, transparent);
  pointer-events: none;
}
.hero-inner { position: relative; z-index: 2; padding: clamp(40px, 6vw, 72px) 0; }
/* Frosted glass, because there is a photograph behind it to frost. The
   opaque paper fill stays as the fallback wherever backdrop-filter is not
   supported, so the type never lands on bare photography. */
.hero-plate {
  max-width: 620px;
  background: var(--color-bg);
  padding: clamp(24px, 3.4vw, 40px);
  box-shadow: inset 0 0 0 var(--rule) var(--color-text);
}
@supports (backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px)) {
  .hero-plate {
    background: color-mix(in srgb, var(--color-bg) 62%, transparent);
    -webkit-backdrop-filter: blur(18px) saturate(1.25);
    backdrop-filter: blur(18px) saturate(1.25);
  }
}
.hero-plate h1 { font-size: clamp(30px, 4.6vw, 56px); letter-spacing: -0.02em; }
.hero-plate .lede { margin-bottom: 20px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.rotator {
  position: relative; z-index: 2;
  display: flex; gap: 8px; margin-top: 18px;
}
.rotator button {
  width: 44px; height: 44px; display: grid; place-items: center;
  border: 0; background: transparent; cursor: pointer; padding: 0;
}
.rotator span { display: block; width: 26px; height: 6px; background: var(--color-bg); opacity: .35; transition: opacity .2s ease; }
.rotator button.is-active span { opacity: 1; }

/* Stat row ────────────────────────────────────────────────────────────── */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 28px; padding: 40px 0; }
.stat b { display: block; font-weight: 800; font-size: clamp(28px, 3.2vw, 44px); color: var(--color-accent); line-height: 1.05; }
.stat span { font-size: 13px; text-transform: uppercase; letter-spacing: .08em; color: var(--color-neutral-800); }

/* Cards — the repeating 2px-bordered box ──────────────────────────────── */
.card {
  border: var(--rule) solid var(--color-divider);
  padding: 26px;
  display: flex; flex-direction: column;
  background: var(--color-bg);
}
.card h3 { font-size: 19px; }
.card p { font-size: 14.5px; color: var(--color-neutral-800); margin: 0; }

.grid-4 { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px; }

/* Packs ───────────────────────────────────────────────────────────────── */
.pack-group { margin-top: 30px; }
.pack-group > h3 {
  font-size: 13px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase;
  color: var(--color-neutral-600); margin-bottom: 12px;
  padding-bottom: 8px; border-bottom: var(--rule) solid var(--color-divider);
}
.packs { display: grid; grid-template-columns: repeat(auto-fit, minmax(252px, 1fr)); gap: 18px; }
.pack { border: var(--rule) solid var(--color-divider); padding: 26px; display: flex; flex-direction: column; }
.pack-photo { aspect-ratio: 1; overflow: hidden; background: var(--color-surface); margin: -26px -26px 16px; }
.pack-photo img { width: 100%; height: 100%; object-fit: cover; }
.pack .eyebrow { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--color-neutral-600); margin: 0 0 4px; }
.pack h3 { font-size: 23px; font-weight: 800; margin: 0 0 6px; }
.pack .desc { font-size: 14px; color: var(--color-neutral-800); margin: 0 0 16px; }
.pack-foot {
  margin-top: auto; padding-top: 14px;
  border-top: var(--rule) solid var(--color-divider);
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.price { font-weight: 800; font-size: 22px; }
.price small { display: block; font-size: 12px; font-weight: 400; color: var(--color-neutral-600); }

.stepper { display: flex; border: 1px solid var(--color-divider); }
.stepper button {
  width: 44px; height: 44px; border: 0; background: transparent;
  font-size: 20px; font-weight: 800; line-height: 1; cursor: pointer;
}
.stepper button:first-child { color: var(--color-text); }
.stepper button:last-child { color: var(--color-accent); }
.stepper button:hover { background: var(--color-surface); }
.stepper .qty {
  width: 46px; height: 44px; display: grid; place-items: center;
  border-inline: 1px solid var(--color-divider);
  font-weight: 800; font-size: 16px;
}
.footnote { font-size: 14px; color: var(--color-neutral-800); margin-top: 18px; }

/* Order ───────────────────────────────────────────────────────────────── */
.order-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 18px; align-items: start; }
.panel { border: var(--rule) solid var(--color-divider); padding: clamp(24px, 3vw, 36px); background: var(--color-bg); }
.panel--summary { position: sticky; top: 118px; }

.field { margin-bottom: 16px; }
.field label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; }
.field .opt { font-weight: 400; color: var(--color-neutral-600); text-transform: none; }
.input {
  width: 100%; min-height: 44px; padding: 10px 12px;
  background: var(--color-bg);
  border: 1px solid var(--color-divider); border-radius: 0;
  font-size: 15px;
}
.input:focus { border-color: var(--color-accent); outline: none; }
textarea.input { min-height: 88px; resize: vertical; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.err { display: none; font-size: 14px; font-weight: 600; color: var(--color-error); margin-top: 5px; }
.field.has-error .input { border-color: var(--color-error); }
.field.has-error .err { display: block; }

.pay-opts { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin-bottom: 8px; }
.pay-opt input { position: absolute; opacity: 0; }
.pay-opt span {
  display: block; min-height: 44px; padding: 12px;
  text-align: center; font-size: 14px; font-weight: 600; cursor: pointer;
  box-shadow: inset 0 0 0 1px var(--color-divider);
}
.pay-opt input:checked + span { box-shadow: inset 0 0 0 var(--rule) var(--color-accent); color: var(--color-accent-700); }
fieldset { border: 0; padding: 0; margin: 0 0 16px; }
fieldset legend { padding: 0; font-size: 13px; font-weight: 600; margin-bottom: 6px; }

.bank-box { border: var(--rule) solid var(--color-divider); padding: 16px; font-size: 14px; margin-top: 12px; }
.bank-box div { display: flex; justify-content: space-between; gap: 14px; padding: 5px 0; }
.bank-box div + div { border-top: 1px solid var(--color-neutral-300); }
.bank-box span:first-child { color: var(--color-neutral-600); }

.sum-lines { margin-bottom: 14px; }
.sum-lines .line { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--color-neutral-300); font-size: 14.5px; }
.sum-lines .line span:last-child { font-weight: 800; white-space: nowrap; }
.sum-empty { font-size: 14.5px; color: var(--color-neutral-600); padding: 10px 0 16px; }
.sum-totals div { display: flex; justify-content: space-between; padding: 6px 0; font-size: 14.5px; color: var(--color-neutral-800); }
.sum-totals .grand {
  margin-top: 10px; padding-top: 12px;
  border-top: var(--rule) solid var(--color-divider);
  color: var(--color-text); font-size: 18px; font-weight: 800;
}
.sum-totals .grand b { font-size: 24px; }
.ship-hint { font-size: 13px; font-weight: 600; color: var(--color-accent-700); margin: 10px 0 0; }


/* How it's made ───────────────────────────────────────────────────────── */
.steps-rows { margin-top: 30px; }
.step-row { display: flex; flex-wrap: wrap; align-items: baseline; gap: 12px clamp(24px, 4vw, 64px); padding: 22px 0; }
.step-row + .step-row { border-top: var(--rule) solid var(--color-divider); }
.step-row .num { flex: 0 0 56px; font-weight: 800; font-size: 15px; color: var(--color-accent); }
.step-row h3 { flex: 1 1 260px; font-size: 24px; margin: 0; }
.step-row p { flex: 1 1 300px; font-size: 16px; line-height: 1.7; max-width: 52ch; margin: 0; color: var(--color-neutral-800); }

.plates { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 18px; margin-top: 28px; }
.plate img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.plate figcaption { font-size: 13px; color: var(--color-neutral-600); margin-top: 8px; }
figure { margin: 0; }

/* Split sections ──────────────────────────────────────────────────────── */
.split { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); align-items: center; gap: 28px clamp(24px, 5vw, 80px); }

/* Reviews ─────────────────────────────────────────────────────────────── */
/* A swipe rail rather than a grid: scroll-snap gives touch swiping free, and
   the arrows are there for mice. */
.reviews-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 20px; flex-wrap: wrap;
}
.reviews-nav { display: flex; gap: 8px; }
/* Frosted arrows. There is a tinted band behind them to blur, so the glass
   has something to work with; the solid fill stays as the fallback. */
.rev-btn {
  width: 48px; height: 48px;
  border: 0; cursor: pointer;
  background: color-mix(in srgb, var(--color-bg) 70%, transparent);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--color-text) 22%, transparent);
  color: var(--color-text);
  font-size: 22px; line-height: 1;
  transition: background .15s ease, color .15s ease, box-shadow .15s ease;
}
@supports (backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px)) {
  .rev-btn {
    background: color-mix(in srgb, var(--color-bg) 42%, transparent);
    -webkit-backdrop-filter: blur(14px) saturate(1.4);
    backdrop-filter: blur(14px) saturate(1.4);
  }
}
.rev-btn:hover {
  background: color-mix(in srgb, var(--color-accent) 88%, transparent);
  color: var(--color-bg);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--color-bg) 40%, transparent);
}
.rev-btn[disabled] { opacity: .4; cursor: not-allowed; }
.rev-btn[disabled]:hover {
  background: color-mix(in srgb, var(--color-bg) 42%, transparent);
  color: var(--color-text);
}

.reviews {
  display: grid; grid-auto-flow: column;
  grid-auto-columns: minmax(270px, 1fr);
  gap: 18px; margin-top: 28px;
  overflow-x: auto; overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  /* The rail advances itself and has arrows, so the bar is just noise —
     hidden, not disabled: swiping and keyboard scrolling still work. */
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.reviews::-webkit-scrollbar { display: none; }
@media (min-width: 900px) { .reviews { grid-auto-columns: minmax(300px, 1fr); } }
.review {
  border: var(--rule) solid var(--color-divider);
  padding: 26px;
  scroll-snap-align: start;
  background: var(--color-bg);
}
.review blockquote { margin: 0 0 14px; font-size: 19px; font-weight: 800; line-height: 1.3; }
.review figcaption { font-size: 13px; color: var(--color-neutral-600); }
.placeholder-note { font-size: 12px; color: var(--color-neutral-600); margin-top: 14px; }

/* Bulk checklist ──────────────────────────────────────────────────────── */
.checklist { border: var(--rule) solid var(--color-divider); padding: 22px; margin-top: 18px; }
.checklist h3 { font-size: 15px; margin-bottom: 6px; }
.checklist div { padding: 10px 0; font-size: 14.5px; }
.checklist div + div { border-top: 1px solid var(--color-neutral-300); }

/* FAQ ─────────────────────────────────────────────────────────────────── */
.faq { max-width: 70ch; margin-top: 24px; }
.faq details { border-bottom: var(--rule) solid var(--color-divider); padding: 18px 2px; }
.faq summary {
  display: flex; align-items: center; gap: 10px;
  min-height: 44px; cursor: pointer;
  font-size: 17px; font-weight: 800; list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::before { content: "+"; color: var(--color-accent); font-size: 20px; width: 16px; }
.faq details[open] summary::before { content: "–"; }
.faq p { font-size: 15px; margin: 6px 0 0 26px; color: var(--color-neutral-800); }

/* Contact ─────────────────────────────────────────────────────────────── */
.contact-rows div { padding: 12px 0; font-size: 15px; }
.contact-rows div + div { border-top: 1px solid var(--color-neutral-300); }
.contact-rows b { display: block; font-size: 13px; text-transform: uppercase; letter-spacing: .08em; color: var(--color-neutral-600); }

/* Closing banner — the page's one large colour field ──────────────────── */
.closing { background: var(--color-accent); color: var(--color-bg); padding: clamp(48px, 7vw, 96px) 0; }
.closing h2 {
  font-size: clamp(30px, 4.2vw, 56px); line-height: 1.06;
  letter-spacing: -0.015em; margin: 0 0 24px 0;
  text-indent: -0.058em;
}
.closing-actions { display: flex; flex-wrap: wrap; gap: 10px; }

/* Footer ──────────────────────────────────────────────────────────────── */
.footer {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px;
  font-size: 13px; color: var(--color-neutral-800);
  padding: 32px 0 96px;
}
.footer-brand { display: flex; align-items: center; gap: 14px; }
.footer-brand img { height: 72px; width: auto; flex: none; }

/* Fixed cart bar ──────────────────────────────────────────────────────── */
.cartbar {
  position: fixed; inset: auto 0 0 0; z-index: 45;
  background: var(--color-text); color: var(--color-bg);
  transform: translateY(100%);
  transition: transform .25s ease;
}
/* Smoked glass over whatever the bar is covering. */
@supports (backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px)) {
  .cartbar {
    background: color-mix(in srgb, var(--color-text) 78%, transparent);
    -webkit-backdrop-filter: blur(16px) saturate(1.3);
    backdrop-filter: blur(16px) saturate(1.3);
  }
}
.cartbar.is-open { transform: none; }
.cartbar-inner {
  display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px;
  padding: 12px var(--gutter);
}
.cartbar b { font-size: 17px; font-weight: 800; }
.cartbar .muted { font-size: 13px; color: var(--color-neutral-300); }
.cartbar .btn { margin-left: auto; }

/* Toast ───────────────────────────────────────────────────────────────── */
.toast {
  position: fixed; left: 50%; bottom: 96px; z-index: 60;
  transform: translate(-50%, 12px);
  background: var(--color-text); color: var(--color-bg);
  padding: 12px 20px; font-size: 14px; font-weight: 600;
  opacity: 0; visibility: hidden;
  transition: opacity .2s ease, transform .2s ease, visibility .2s;
}
.toast.is-open { opacity: 1; visibility: visible; transform: translate(-50%, 0); }

/* Responsive ──────────────────────────────────────────────────────────── */
@media (max-width: 760px) {
  /* The handoff wraps the nav on narrow widths rather than hiding it. */
  .nav-links { order: 3; width: 100%; margin-left: 0; gap: 14px; }
  .nav-links a { font-size: 13px; }
  .brand img { height: 60px; }
  .field-row { grid-template-columns: 1fr; }
  .panel--summary { position: static; }
  .step-row h3 { flex-basis: 100%; }
}

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

/* ── Product search ───────────────────────────────────────────────────── */
.pack-search { margin-top: 26px; max-width: 460px; }
.pack-search .input { min-height: 48px; }
.search-count {
  font-size: 13px; font-weight: 600; color: var(--color-neutral-600);
  margin: 8px 0 0; min-height: 1.2em;
}
.packs-empty {
  border: var(--rule) dashed var(--color-divider);
  padding: 32px; text-align: center;
  color: var(--color-neutral-800); font-size: 15px;
}

/* ── Expandable product detail ────────────────────────────────────────── */
.pack-more {
  display: inline-flex; align-items: center; gap: 6px;
  background: none; border: 0; padding: 0;
  margin: 0 0 16px;
  font-size: 13px; font-weight: 800;
  letter-spacing: .04em; text-transform: uppercase;
  color: var(--color-accent); cursor: pointer;
}
.pack-more::after { content: "+"; font-size: 15px; }
.pack-more[aria-expanded="true"]::after { content: "–"; }
.pack-more:hover { color: var(--color-accent-700); }

.pack-detail {
  border-top: 1px solid var(--color-neutral-300);
  margin: 0 0 16px; padding-top: 12px;
  font-size: 14px; line-height: 1.65;
  color: var(--color-neutral-800);
}
.pack-detail[hidden] { display: none; }
.pack-detail dl { margin: 10px 0 0; font-size: 13.5px; }
.pack-detail dl div { display: flex; justify-content: space-between; gap: 12px; padding: 5px 0; }
.pack-detail dl div + div { border-top: 1px solid var(--color-neutral-300); }
.pack-detail dt { color: var(--color-neutral-600); }
.pack-detail dd { margin: 0; font-weight: 600; }

/* ── Payment methods that are not live yet ────────────────────────────── */
.pay-opts--soon { margin-bottom: 4px; }
.pay-opt--soon span {
  display: block; min-height: 44px; padding: 8px 12px;
  text-align: center; font-size: 13.5px; font-weight: 600;
  color: var(--color-neutral-600);
  box-shadow: inset 0 0 0 1px var(--color-neutral-300);
  background: repeating-linear-gradient(
    -45deg,
    transparent, transparent 7px,
    color-mix(in srgb, var(--color-neutral-300) 45%, transparent) 7px,
    color-mix(in srgb, var(--color-neutral-300) 45%, transparent) 14px
  );
  cursor: not-allowed;
}
.pay-opt--soon b {
  display: block; font-size: 11px; font-weight: 800;
  letter-spacing: .08em; text-transform: uppercase;
  color: var(--color-accent); margin-top: 2px;
}

/* ── Order-placed popup ───────────────────────────────────────────────── */
.modal {
  position: fixed; inset: 0; z-index: 70;
  display: grid; place-items: center;
  padding: 20px;
  background: color-mix(in srgb, var(--color-text) 55%, transparent);
  opacity: 0; visibility: hidden;
  transition: opacity .2s ease, visibility .2s;
}
@supports (backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px)) {
  .modal { -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
}
.modal.is-open { opacity: 1; visibility: visible; }
.modal-card {
  position: relative;
  width: min(520px, 100%); max-height: 88vh; overflow-y: auto;
  background: var(--color-bg);
  border: var(--rule) solid var(--color-text);
  padding: clamp(24px, 4vw, 40px);
  transform: translateY(10px);
  transition: transform .2s ease;
}
.modal.is-open .modal-card { transform: none; }
.modal-close {
  position: absolute; top: 10px; right: 10px;
  width: 44px; height: 44px;
  border: 0; background: none; cursor: pointer;
  font-size: 18px; line-height: 1; color: var(--color-neutral-600);
}
.modal-close:hover { color: var(--color-text); }
.placed-mark {
  width: 56px; height: 56px; margin-bottom: 16px;
  display: grid; place-items: center;
  background: var(--color-accent); color: var(--color-bg);
  font-size: 28px; font-weight: 800;
}
.modal-card h3 { font-size: clamp(22px, 3vw, 30px); margin-bottom: 12px; }
.modal-card .order-id {
  font-size: clamp(22px, 3vw, 32px); font-weight: 800;
  letter-spacing: .02em; margin: 0 0 12px;
}
.placed-actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 18px 0 14px; }
.placed-actions .btn { flex: 1 1 150px; }

/* ── WhatsApp contact float ───────────────────────────────────────────── */
/* Square rather than the usual circle, so it belongs to a page built from
   right angles. Sits above the cart bar, which owns the very bottom. */
.wa {
  position: fixed; right: 20px; bottom: 92px; z-index: 55;
  display: flex; flex-direction: column; align-items: flex-end; gap: 12px;
}
.wa-fab {
  width: 56px; height: 56px;
  display: grid; place-items: center;
  border: 0; cursor: pointer;
  background: var(--color-accent); color: var(--color-bg);
  box-shadow: 0 6px 18px color-mix(in srgb, var(--color-text) 30%, transparent);
  transition: background .15s ease, transform .15s ease;
}
.wa-fab:hover { background: var(--color-accent-700); }
.wa-fab[aria-expanded="true"] { transform: scale(.94); }

.wa-panel {
  width: min(300px, calc(100vw - 40px));
  background: var(--color-bg);
  border: var(--rule) solid var(--color-text);
  padding: 20px;
  box-shadow: 0 12px 34px color-mix(in srgb, var(--color-text) 26%, transparent);
}
.wa-panel[hidden] { display: none; }
.wa-panel h4 { font-size: 18px; margin-bottom: 8px; }
.wa-panel p { font-size: 14px; color: var(--color-neutral-800); }
.wa-num {
  font-weight: 800; font-size: 17px;
  color: var(--color-text) !important;
  margin: 0 0 14px;
}

@media (max-width: 480px) {
  .wa { right: 14px; bottom: 86px; }
  .wa-fab { width: 52px; height: 52px; }
}
