/* ==========================================================================
   Miracles by Nature - "Desert Botanical" theme
   Concept website by Lumhaven
   --------------------------------------------------------------------------
   1. Tokens          5. Hero              9. Product page
   2. Base            6. Home sections    10. Cart + checkout
   3. Layout + type   7. Cards + frames   11. About + form
   4. Header/footer   8. Shop pages       12. Toast, motion, utilities
   ========================================================================== */

/* 1. Tokens ---------------------------------------------------------------- */
:root {
  --sand: #E4D3BA;        /* main background */
  --olive: #3F4630;       /* hero, reviews, footer */
  --olive-deep: #343A27;
  --clay: #D9C3A3;        /* cards */
  --clay-deep: #CDB48F;
  --brown: #3A2A20;       /* text */
  --brown-soft: #5E4A3B;
  --terracotta: #B4623B;  /* small accents only: icons, focus rings, thin lines (3.0:1 on sand, too low for text) */
  --terracotta-deep: #9A4F2C;
  --gold: #C6A15E;        /* small details, Table Tales accent */
  --gold-text: #D8B97E;   /* gold for small text on olive (5.2:1; plain gold is 4.1:1) */
  --terracotta-ink: #8A4627; /* button backgrounds and anything else behind sand text (4.8:1) */
  --terracotta-ink-deep: #733A20; /* button hover */

  --font-display: "Cormorant Garamond", "Cormorant", Georgia, "Times New Roman", serif;
  --font-body: "DM Sans", system-ui, -apple-system, "Segoe UI", sans-serif;

  --radius: 16px;
  --radius-sm: 10px;
  --shadow-soft: 0 1px 2px rgba(58, 42, 32, .06), 0 10px 28px -12px rgba(58, 42, 32, .28);
  --shadow-lift: 0 2px 4px rgba(58, 42, 32, .08), 0 22px 44px -18px rgba(58, 42, 32, .42);

  --wrap: 1240px;
  --gutter: clamp(18px, 4.5vw, 48px);
  --header-h: 72px;
  --section: clamp(72px, 10vw, 148px);
  --ease: cubic-bezier(.22, .7, .2, 1);
}

/* 2. Base ------------------------------------------------------------------ */
*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  /* No CSS smooth scrolling here: it makes the scroll animations mis-measure the
     page. In-page links are scrolled smoothly by js/core.js instead. */
  scroll-padding-top: calc(var(--header-h) + 76px);
  /* Stops a sideways trackpad swipe from triggering browser back/forward. */
  overscroll-behavior-x: none;
  overflow-x: clip;
  background: var(--sand);
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--sand);
  color: var(--brown);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  overflow-x: clip;
  overscroll-behavior-x: none;
}

/* Subtle paper grain over the whole page */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: url("../assets/brand/grain.png") 0 0 / 220px 220px;
  opacity: .16;
  mix-blend-mode: multiply;
}

main { flex: 1 0 auto; position: relative; }

img, video, svg { display: block; max-width: 100%; }
img { height: auto; }

a { color: inherit; text-decoration-color: rgba(58, 42, 32, .35); text-underline-offset: .2em; }
a:hover { text-decoration-color: currentColor; }

button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }

:focus-visible {
  outline: 2px solid var(--terracotta);
  outline-offset: 3px;
  border-radius: 4px;
}
.on-olive :focus-visible, .site-footer :focus-visible, .hero :focus-visible, .page-head :focus-visible {
  outline-color: var(--gold);
}

::selection { background: var(--terracotta-ink); color: var(--sand); }

h1, h2, h3, h4 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 500;
  line-height: 1.04;
  letter-spacing: -.012em;
  text-wrap: balance;
}
p { margin: 0 0 1em; text-wrap: pretty; }
p:last-child { margin-bottom: 0; }
ul { margin: 0; padding: 0; list-style: none; }

.skip-link {
  position: absolute;
  left: 12px;
  top: -80px;
  z-index: 300;
  padding: 10px 16px;
  background: var(--brown);
  color: var(--sand);
  border-radius: var(--radius-sm);
  text-decoration: none;
}
.skip-link:focus { top: 12px; }
/* sections focused by an in-page link are not controls: no focus ring around a whole section */
main:focus, section:focus { outline: none; }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* 3. Layout + type ---------------------------------------------------------- */
.wrap {
  width: 100%;
  max-width: calc(var(--wrap) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section { padding-block: var(--section); position: relative; }
.section--tight { padding-block: clamp(48px, 6vw, 88px); }
.section--flush-top { padding-top: 0; }

.on-olive { background: var(--olive); color: var(--sand); }
.on-olive a { text-decoration-color: rgba(228, 211, 186, .4); }

.display-xl { font-size: clamp(3.5rem, 10.4vw, 8.4rem); line-height: .9; letter-spacing: -.02em; }
.display-l  { font-size: clamp(2.5rem, 6vw, 4.6rem); }
.display-m  { font-size: clamp(2rem, 4vw, 3.1rem); }
.display-s  { font-size: clamp(1.5rem, 2.4vw, 2rem); }

.lede { font-size: clamp(1.05rem, 1.5vw, 1.2rem); max-width: 56ch; color: var(--brown-soft); }
.on-olive .lede, .page-head .lede { color: rgba(228, 211, 186, .84); }

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px 40px;
  margin-bottom: clamp(28px, 4vw, 52px);
}
.section-head p { margin: 12px 0 0; }

.rule-gold {
  display: block;
  width: 56px; height: 1px;
  background: var(--gold);
  margin: 0 0 22px;
}

/* Buttons */
.btn {
  --btn-bg: var(--terracotta-ink);   /* sand on this is 4.8:1, so labels pass WCAG AA at normal size */
  --btn-fg: var(--sand);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 14px 28px;
  border: 1.5px solid var(--btn-bg);
  border-radius: 999px;
  background: var(--btn-bg);
  color: var(--btn-fg);
  font-weight: 600;
  font-size: 1rem;
  line-height: 1.1;
  letter-spacing: .005em;
  text-decoration: none;
  text-align: center;
  transition: background-color .25s var(--ease), border-color .25s var(--ease), color .25s var(--ease), transform .25s var(--ease), box-shadow .25s var(--ease);
  -webkit-tap-highlight-color: transparent;
}
.btn:hover { --btn-bg: var(--terracotta-ink-deep); box-shadow: 0 10px 22px -12px rgba(58, 42, 32, .6); }
.btn:active { transform: translateY(1px) scale(.985); }

.btn--ghost { background: transparent; color: var(--brown); border-color: rgba(58, 42, 32, .5); }
.btn--ghost:hover { background: var(--brown); border-color: var(--brown); color: var(--sand); }
.on-olive .btn--ghost, .hero .btn--ghost, .page-head .btn--ghost { color: var(--sand); border-color: rgba(228, 211, 186, .55); }
.on-olive .btn--ghost:hover, .hero .btn--ghost:hover, .page-head .btn--ghost:hover { background: var(--sand); border-color: var(--sand); color: var(--olive); }

.btn--dark { --btn-bg: var(--brown); }
.btn--dark:hover { --btn-bg: #2A1D15; }

.btn--small { min-height: 44px; padding: 10px 18px; font-size: .94rem; }
.btn--block { width: 100%; }

.btn[disabled], .btn[aria-disabled="true"] {
  --btn-bg: transparent;
  background: transparent;
  border-color: rgba(58, 42, 32, .28);
  color: rgba(58, 42, 32, .55);
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  white-space: nowrap;
  flex: 0 0 auto;
  text-decoration: none;
  border-bottom: 1px solid currentColor;
  padding-bottom: 2px;
  background: none;
  border-top: 0; border-left: 0; border-right: 0;
}
.link-arrow svg { transition: transform .3s var(--ease); }
.link-arrow:hover svg { transform: translateX(4px); }

/* 4. Header + footer -------------------------------------------------------- */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  height: var(--header-h);
  color: var(--brown);
  background: var(--sand);
  box-shadow: 0 1px 0 rgba(58, 42, 32, .1);
  transition: background-color .15s linear, box-shadow .15s linear, color .15s linear;
}
/* Overlay mode: transparent over an olive page top until the visitor scrolls */
.site-header.is-overlay { background: transparent; color: var(--sand); box-shadow: none; }
.site-header.is-overlay.is-solid {
  background: var(--sand);
  color: var(--brown);
  box-shadow: 0 1px 0 rgba(58, 42, 32, .1), 0 14px 30px -22px rgba(58, 42, 32, .55);
}
body:not([data-header="overlay"]) main { padding-top: var(--header-h); }

.site-header__bar {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand { display: inline-flex; align-items: center; flex: 0 0 auto; text-decoration: none; position: relative; }
.brand img { height: 52px; width: auto; }
.brand .brand__light { display: none; }
.site-header.is-overlay:not(.is-solid) .brand__dark { display: none; }
.site-header.is-overlay:not(.is-solid) .brand__light { display: block; }

.nav { display: none; }
.nav__list { display: flex; align-items: center; gap: clamp(18px, 2.6vw, 40px); }
.nav__item { position: relative; display: flex; align-items: center; gap: 2px; }
.nav__link {
  position: relative;
  display: inline-block;
  padding: 10px 2px;
  font-size: .98rem;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
}
.nav__link::after {
  content: "";
  position: absolute;
  left: 2px; right: 2px; bottom: 4px;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .35s var(--ease);
}
.nav__link:hover::after, .nav__link[aria-current="page"]::after { transform: scaleX(1); }

.nav__toggle {
  display: grid;
  place-items: center;
  width: 32px; height: 32px;
  margin-left: -2px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
}
.nav__toggle svg { transition: transform .3s var(--ease); }
.nav__item.is-open .nav__toggle svg { transform: rotate(180deg); }

.nav__menu {
  position: absolute;
  top: calc(100% + 6px);
  left: -18px;
  min-width: 220px;
  padding: 10px;
  background: var(--clay);
  color: var(--brown);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lift);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity .22s var(--ease), transform .22s var(--ease), visibility .22s;
}
.nav__menu::before { content: ""; position: absolute; inset: -12px 0 100% 0; }
.nav__item:hover .nav__menu,
.nav__item:focus-within .nav__menu,
.nav__item.is-open .nav__menu { opacity: 1; visibility: visible; transform: none; }
.nav__menu a {
  display: block;
  padding: 11px 14px;
  border-radius: var(--radius-sm);
  text-decoration: none;
  font-size: .98rem;
}
.nav__menu a:hover { background: var(--sand); }

.header-actions { display: flex; align-items: center; gap: 4px; }

.icon-btn {
  position: relative;
  display: grid;
  place-items: center;
  width: 46px; height: 46px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: inherit;
  text-decoration: none;
  transition: background-color .25s var(--ease);
}
.icon-btn:hover { background: rgba(58, 42, 32, .1); }
.site-header.is-overlay:not(.is-solid) .icon-btn:hover { background: rgba(228, 211, 186, .16); }

.cart-badge {
  position: absolute;
  top: 3px; right: 1px;
  min-width: 20px; height: 20px;
  padding: 0 5px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: var(--terracotta-ink);
  color: var(--sand);
  font-size: .72rem;
  font-weight: 700;
  line-height: 1;
  box-shadow: 0 0 0 2px var(--sand);
}
.site-header.is-overlay:not(.is-solid) .cart-badge { box-shadow: 0 0 0 2px var(--olive); }
.cart-badge[hidden] { display: none; }
.cart-badge.is-bump { animation: badge-bump .5s var(--ease); }
@keyframes badge-bump {
  0% { transform: scale(1); }
  35% { transform: scale(1.5); }
  100% { transform: scale(1); }
}

.burger { display: grid; }
.burger span, .burger span::before, .burger span::after {
  display: block;
  width: 22px; height: 1.5px;
  background: currentColor;
  border-radius: 2px;
  transition: transform .3s var(--ease), opacity .2s;
}
.burger span { position: relative; }
.burger span::before, .burger span::after { content: ""; position: absolute; left: 0; }
.burger span::before { top: -7px; }
.burger span::after { top: 7px; }
.burger[aria-expanded="true"] span { background: transparent; }
.burger[aria-expanded="true"] span::before { transform: translateY(7px) rotate(45deg); }
.burger[aria-expanded="true"] span::after { transform: translateY(-7px) rotate(-45deg); }

/* Mobile menu panel */
.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 90;
  padding: calc(var(--header-h) + 28px) var(--gutter) 40px;
  background: var(--olive);
  color: var(--sand);
  overflow-y: auto;
  overscroll-behavior: contain;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-12px);
  transition: opacity .3s var(--ease), transform .3s var(--ease), visibility .3s;
}
.mobile-menu.is-open { opacity: 1; visibility: visible; transform: none; }
.mobile-menu a { display: block; text-decoration: none; }
.mobile-menu__main > li { border-bottom: 1px solid rgba(228, 211, 186, .18); }
.mobile-menu__main > li > a {
  padding: 16px 0;
  font-family: var(--font-display);
  font-size: clamp(2rem, 9vw, 2.6rem);
  line-height: 1.1;
}
.mobile-menu__sub { padding: 0 0 16px 2px; display: grid; gap: 4px; }
.mobile-menu__sub a { padding: 9px 0; font-size: 1.05rem; color: var(--gold-text); }
body.menu-open { overflow: hidden; }
body.menu-open .site-header { background: var(--olive); color: var(--sand); box-shadow: none; }
body.menu-open .site-header .brand__dark { display: none; }
body.menu-open .site-header .brand__light { display: block; }
body.menu-open .cart-badge { box-shadow: 0 0 0 2px var(--olive); }

@media (min-width: 900px) {
  :root { --header-h: 84px; }
  .nav { display: block; }
  .burger { display: none; }
  .mobile-menu { display: none; }
  .brand img { height: 64px; }
}

/* Footer */
.site-footer {
  position: relative;
  z-index: 2;
  background: var(--olive);
  color: var(--sand);
  padding: clamp(56px, 7vw, 96px) 0 28px;
  border-top: 1px solid rgba(228, 211, 186, .14);
}
.site-footer__grid {
  display: grid;
  gap: 40px;
  grid-template-columns: 1fr;
}
.site-footer__brand img { height: 78px; width: auto; }
.site-footer__brand p { margin-top: 18px; max-width: 34ch; color: rgba(228, 211, 186, .78); }
.site-footer h2 {
  font-family: var(--font-body);
  font-size: .92rem;
  font-weight: 600;
  letter-spacing: 0;
  color: var(--gold-text);
  margin-bottom: 14px;
}
.site-footer__links { display: grid; gap: 8px; }
.site-footer__links a { text-decoration: none; }
.site-footer__links a:hover { text-decoration: underline; }
.site-footer__contact { display: grid; gap: 14px; align-content: start; }
.social { display: flex; gap: 10px; }
.social__icon {
  display: grid;
  place-items: center;
  width: 46px; height: 46px;
  border: 1px solid rgba(228, 211, 186, .4);
  border-radius: 50%;
}
/* The address may wrap only before the @ (see the <wbr> in js/core.js), never mid-word */
.site-footer__email { font-size: .95rem; overflow-wrap: normal; word-break: normal; }
.site-footer__email span { white-space: nowrap; }
.site-footer__base {
  margin-top: clamp(40px, 6vw, 72px);
  padding-top: 22px;
  border-top: 1px solid rgba(228, 211, 186, .2);
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  justify-content: space-between;
  font-size: .9rem;
  color: rgba(228, 211, 186, .84);
}
@media (min-width: 760px) {
  .site-footer__grid { grid-template-columns: 1.4fr .8fr 1.15fr; gap: clamp(32px, 4vw, 56px); }
}

/* 5. Hero: the "ingredients to soap" story ----------------------------------
   Layers inside .hero__media, bottom to top:
     poster (first frame) -> canvas (scroll film)
     -> final soap image -> olive "time passes" veil with its line of text
   Mobile-first: the film fills the first screen under the header; the
   headline, tagline and buttons follow below it on olive. The hero is pinned
   while the scroll plays the film, then scrolls on (js/home.js).            */
.hero {
  /* the film's height: one screen, measured with the phone's address bar showing */
  --film-h: 100vh;
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  background: var(--olive);
  color: var(--sand);
  overflow: hidden;
  overflow: clip;
}
@supports (height: 100svh) { .hero { --film-h: 100svh; } }
/* the strip that shows under the pinned hero when a phone's address bar slides away */
.hero-spacer { background: var(--olive); }
.hero__media {
  position: relative;
  height: var(--film-h);
  background: #6B5136;
  overflow: hidden;
}
/* a soft olive band at the top keeps the logo, menu and cart readable over any frame of the story:
   deep olive (#3F4630) at 60%, fading out */
.hero__media::after {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 160px;
  background: linear-gradient(180deg, rgba(63, 70, 48, .6) 0%, rgba(63, 70, 48, .38) 45%, rgba(63, 70, 48, 0) 100%);
  pointer-events: none;
}
.hero__content { position: relative; z-index: 3; padding-block: clamp(44px, 11vw, 80px) clamp(52px, 13vw, 92px); }
.hero__poster, .hero__canvas, .hero__final {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 50%;     /* tall screens show the middle of the wide film */
}
.hero__canvas { visibility: hidden; }
.hero.has-film .hero__canvas { visibility: visible; }
.hero__final { opacity: 0; object-position: 40% 50%; transform-origin: 40% 50%; }   /* keeps the soap bar in view on a tall screen */
.hero__olive {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 6%;
  background: var(--olive);
  opacity: 0;
  pointer-events: none;
}
.hero__beat {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(2rem, 8.4vw, 3.6rem);
  line-height: 1.08;
  letter-spacing: -.01em;
  text-align: center;
  color: var(--sand);
  opacity: 0;
}
.hero__beat span { display: block; }
.hero__beat span:nth-child(2) { font-style: italic; }
.hero__shade, .hero__cue, .hero__progress { display: none; }

/* Scroll cue + progress line, shown while the scroll film is live (sizes for phones; larger from 900px) */
.hero.has-film .hero__cue {
  display: flex;
  position: absolute;
  left: 50%;
  top: var(--film-h);                               /* the bottom edge of the film, not of the whole hero */
  z-index: 4;
  transform: translate(-50%, calc(-100% - 36px));
  flex-direction: column;
  align-items: center;
  gap: 5px;
  padding: 9px 18px 7px;
  border-radius: 999px;
  background: rgba(36, 32, 18, .58);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  color: var(--sand);
  font-size: .94rem;
  font-weight: 500;
  letter-spacing: .01em;
  white-space: nowrap;
  opacity: var(--cue-label, 1);
  pointer-events: none;
}
.hero__cue svg { color: var(--gold); animation: cue-bounce 1.5s ease-in-out infinite; }
@keyframes cue-bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(6px); }
}
.hero.has-film .hero__progress {
  display: block;
  position: absolute;
  left: 50%;
  top: calc(var(--film-h) - 20px);
  z-index: 4;
  width: min(220px, 56vw);
  height: 2px;
  transform: translateX(-50%);
  background: rgba(228, 211, 186, .28);
  border-radius: 2px;
  overflow: hidden;
  opacity: var(--cue, 1);
  pointer-events: none;
}
.hero__progress span {
  display: block;
  width: 100%;
  height: 100%;
  background: var(--gold);
  transform-origin: left center;
  transform: scaleX(var(--progress, 0));
}

/* Finished state (reduced motion, or the film cannot run): the soap, nothing else */
.hero.is-final .hero__final { opacity: 1; transform: none; }
.hero.is-final .hero__olive, .hero.is-final .hero__beat { opacity: 0; }

.hero__title { margin-bottom: clamp(18px, 2.4vw, 30px); }
.hero__title span { display: block; }
.hero__title span:nth-child(2) { font-style: italic; font-weight: 400; padding-left: .5em; }
.hero__tag {
  font-size: clamp(1.1rem, 1.8vw, 1.4rem);
  color: rgba(228, 211, 186, .92);
  margin-bottom: clamp(26px, 3.4vw, 40px);
}
.hero__cta { display: flex; flex-wrap: wrap; gap: 12px; }

/* Desktop: full-screen film; the headline and buttons arrive with the finished soap */
@media (min-width: 900px) {
  .hero {
    display: block;
    width: 100%;
    height: 100vh;
    min-height: 560px;
    padding: 0;
    background: #3A2E1E;
  }
  .hero-spacer { background: #3A2E1E; }
  .hero__media { position: absolute; inset: 0; height: auto; }
  .hero__poster, .hero__canvas, .hero__final { object-position: 58% 50%; }
  .hero__final { transform-origin: 58% 50%; }
  .hero__shade {
    display: block;
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    background: linear-gradient(90deg, rgba(36, 32, 18, .88) 0%, rgba(36, 32, 18, .7) 24%, rgba(36, 32, 18, .34) 46%, rgba(36, 32, 18, 0) 66%);
  }
  /* the side shade arrives with the headline */
  .js .hero:not(.is-final):not(.is-plain) .hero__shade { opacity: var(--copy, 0); }
  .hero__content { height: 100%; display: flex; align-items: center; padding-block: var(--header-h) 0; }
  .hero__copy { position: relative; max-width: min(46vw, 640px); }
  .hero__copy::before {
    content: "";
    position: absolute;
    inset: -18% -22% -22% -30%;
    z-index: -1;
    background: radial-gradient(closest-side, rgba(30, 26, 14, .78), rgba(30, 26, 14, .52) 55%, rgba(30, 26, 14, 0) 100%);
    pointer-events: none;
  }
  /* --copy is driven by the story (0 = hidden, 1 = shown). Without script it stays visible. */
  .js .hero:not(.is-final):not(.is-plain) .hero__copy {
    opacity: var(--copy, 0);
    transform: translateY(calc((1 - var(--copy, 0)) * 18px));
    visibility: var(--copy-visibility, hidden);
  }
  .hero.is-final .hero__copy, .hero.is-final .hero__shade { transition: opacity .6s var(--ease); }
  .hero__title { font-size: clamp(3.6rem, 7.6vw, 7.2rem); text-shadow: 0 2px 30px rgba(20, 16, 8, .45); }
  .hero__tag { text-shadow: 0 1px 14px rgba(20, 16, 8, .6); }
  .hero .btn--ghost { background: rgba(36, 32, 18, .28); border-color: rgba(228, 211, 186, .7); }
  .hero__beat { font-size: clamp(2.6rem, 5.2vw, 5.4rem); }

  /* Scroll cue + progress line: larger and lower on the full-screen film */
  .hero.has-film .hero__cue { top: auto; bottom: 54px; transform: translateX(-50%); gap: 8px; padding: 12px 22px 10px; background: rgba(36, 32, 18, .5); font-size: 1rem; }
  .hero.has-film .hero__progress { top: auto; bottom: 34px; width: min(320px, 40vw); }
}

/* 6. Home sections ---------------------------------------------------------- */
.quote { text-align: center; padding-block: clamp(84px, 13vw, 190px); position: relative; z-index: 2; }
.quote__text {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(2.3rem, 7vw, 5.6rem);
  line-height: 1;
  letter-spacing: -.015em;
  max-width: 16ch;
  margin-inline: auto;
  text-wrap: balance;
}
.quote__text em { font-style: italic; }
.quote__mark { display: block; width: 34px; height: 34px; margin: 0 auto 26px; color: var(--gold); }
.quote__mark svg { width: 100%; height: 100%; }

.quote--photo { color: var(--sand); overflow: hidden; overflow: clip; isolation: isolate; }
.quote--photo .quote__bg {
  position: absolute;
  inset: -12% 0;
  z-index: -2;
  background: #6B5136 url("../assets/generated/hero-ingredients.webp") center / cover no-repeat;
  will-change: transform;
}
.quote--photo::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg, rgba(52, 58, 39, .78), rgba(58, 42, 32, .72));
}

/* Category grid */
.cats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.cat {
  position: relative;
  display: block;
  aspect-ratio: 4 / 5;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--clay-deep);
  box-shadow: var(--shadow-soft);
  text-decoration: none;
  color: var(--brown);
  isolation: isolate;
  transition: box-shadow .4s var(--ease), transform .4s var(--ease);
}
.cat:hover { box-shadow: var(--shadow-lift); transform: translateY(-3px); }
.cat__art { position: absolute; inset: 0; transition: transform .7s var(--ease); }
.cat:hover .cat__art { transform: scale(1.04); }
.cat__art img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.cat__label {
  position: absolute;
  left: 10px; right: 10px; bottom: 10px;
  z-index: 2;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 12px;
  background: rgba(228, 211, 186, .9);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}
.cat__name { font-family: var(--font-display); font-size: clamp(1.25rem, 2.2vw, 1.6rem); line-height: 1.05; font-weight: 600; }
.cat__count { font-size: .84rem; color: var(--brown-soft); white-space: nowrap; }
@media (max-width: 719px) {
  .cat:not(.cat--soaps) .cat__label { flex-direction: column; align-items: flex-start; gap: 1px; padding: 9px 12px; left: 8px; right: 8px; bottom: 8px; }
  .cat__count { font-size: .8rem; }
  .cat--table { aspect-ratio: 4 / 3; }
}

.cat--soaps { grid-column: span 2; aspect-ratio: 16 / 11; }
.cat--soaps .cat__art img { object-position: 58% 50%; }
.cat--table {
  grid-column: span 2;
  aspect-ratio: 16 / 11;
  color: var(--sand);
  background-color: #6B5136;
}
.cat--table .cat__art { background: url("../assets/generated/hero-tableware.webp") center / cover no-repeat; }
.cat--table::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(90deg, rgba(40, 28, 18, .82) 0%, rgba(40, 28, 18, .45) 48%, rgba(40, 28, 18, .05) 80%);
}
.cat--table::before {
  content: "";
  position: absolute;
  inset: 8px;
  z-index: 2;
  border: 1px solid rgba(198, 161, 94, .65);
  border-radius: 10px;
  pointer-events: none;
}
.cat__table-copy {
  position: absolute;
  z-index: 2;
  left: clamp(22px, 5vw, 64px);
  top: 50%;
  transform: translateY(-50%);
  max-width: min(78%, 440px);
}
.cat__table-copy h3 { font-size: clamp(2rem, 5vw, 3.6rem); margin-bottom: 10px; }
.cat__table-copy p { color: rgba(228, 211, 186, .88); margin-bottom: 18px; font-size: clamp(.95rem, 1.4vw, 1.08rem); }
.cat__table-copy .link-arrow { color: var(--gold-text); }

@media (min-width: 720px) {
  .cats { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 16px; }
  .cat { grid-column: span 2; aspect-ratio: 4 / 5; }
  .cat--soaps, .cat--table { grid-column: span 6; aspect-ratio: 21 / 9; }
}
@media (min-width: 1080px) {
  .cats { grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 20px; }
  .cat { grid-column: span 3; aspect-ratio: 4 / 5; }
  .cat--soaps { grid-column: span 6; aspect-ratio: auto; }
  .cat--table { grid-column: span 12; aspect-ratio: 24 / 7; }
}

/* Reviews */
.reviews { position: relative; z-index: 2; overflow: hidden; overflow: clip; }
.review {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 18px;
  height: 100%;
  padding: clamp(22px, 2.6vw, 32px);
  border-radius: var(--radius);
  background: var(--olive-deep);
  border: 1px solid rgba(198, 161, 94, .3);
  color: var(--sand);
}
.stars { display: flex; gap: 3px; color: var(--gold); }
.review__quote {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.28rem, 1.8vw, 1.5rem);
  line-height: 1.28;
  font-weight: 500;
  flex: 1;
}
.review__name { font-size: .92rem; color: rgba(228, 211, 186, .75); display: flex; align-items: center; gap: 10px; }
.review__name::before { content: ""; width: 22px; height: 1px; background: var(--gold); }

/* 7. Sliders, cards, frames ------------------------------------------------- */
.slider { position: relative; }
.slider__track {
  display: flex;
  gap: clamp(12px, 1.6vw, 20px);
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  /* The fix for the sideways-swipe bug: scrolling stays inside the row and
     never chains to the page or to the browser's back/forward gesture. */
  overscroll-behavior-x: contain;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  /* bleed to the viewport edges so cards slide off-screen, not into a hard edge */
  --edge: max(var(--gutter), calc((100vw - var(--wrap)) / 2));
  margin-inline: calc(var(--edge) * -1);
  padding: 6px var(--edge) 26px;
  scroll-padding-inline: var(--edge);
}
.slider__track::-webkit-scrollbar { display: none; }
.slider__track > * { flex: 0 0 var(--slide, clamp(236px, 68vw, 290px)); scroll-snap-align: start; min-width: 0; }
@media (hover: hover) and (pointer: fine) {
  .slider__track { scroll-snap-type: x proximity; }
}
.slider--reviews .slider__track > * { --slide: clamp(280px, 82vw, 400px); }

.slider__nav { display: flex; gap: 8px; }
.slider__btn {
  display: grid;
  place-items: center;
  width: 48px; height: 48px;
  padding: 0;
  border-radius: 50%;
  border: 1px solid rgba(58, 42, 32, .4);
  background: transparent;
  color: var(--brown);
  transition: background-color .25s var(--ease), color .25s var(--ease), border-color .25s var(--ease), opacity .25s;
}
.slider__btn:hover:not([disabled]) { background: var(--brown); border-color: var(--brown); color: var(--sand); }
.slider__btn[disabled] { opacity: .32; cursor: default; }
.on-olive .slider__btn { border-color: rgba(228, 211, 186, .45); color: var(--sand); }
.on-olive .slider__btn:hover:not([disabled]) { background: var(--sand); border-color: var(--sand); color: var(--olive); }
[data-slider].is-static .slider__nav { visibility: hidden; }

@media (min-width: 1180px) {
  .slider--five .slider__track > * { --slide: calc((100% - 4 * 20px) / 5); }
  .slider--five .slider__track { gap: 20px; }
}

/* Product card */
.card {
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
  background: var(--clay);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
  transition: box-shadow .4s var(--ease), transform .4s var(--ease);
}
.card:hover { box-shadow: var(--shadow-lift); transform: translateY(-3px); }
.card__media { display: block; position: relative; text-decoration: none; }
.card__body {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
  padding: 14px 14px 14px;
}
.card__name { font-family: var(--font-display); font-size: 1.32rem; font-weight: 600; line-height: 1.1; letter-spacing: 0; }
.card__name a { text-decoration: none; }
.card__name a::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.card__price { margin: 0 0 12px; color: var(--brown-soft); font-size: .98rem; font-variant-numeric: tabular-nums; }

/* Olive cards: used for the categories photographed on dark backgrounds, so the dark
   photos read as the intended look. Sand text on olive is 6.7:1. */
.card--olive { background: var(--olive); color: var(--sand); }
.card--olive .card__price { color: var(--sand); }
.card--olive .frame { background: var(--olive-deep); }
.card--olive .frame::after { border-color: rgba(198, 161, 94, .85); }   /* thin gold line */
.card--olive :focus-visible { outline-color: var(--gold); }
.card--olive .btn[disabled] { border-color: rgba(228, 211, 186, .4); color: rgba(228, 211, 186, .78); }
.card--olive .badge { background: var(--sand); color: var(--olive); }
.card__body .btn { margin-top: auto; position: relative; z-index: 2; }

/* Product photo: her original photograph in a 4:5 frame. Nothing is layered on it. */
.frame {
  display: block;
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: var(--clay-deep);
  isolation: isolate;
}
.frame__photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .6s var(--ease), opacity .14s ease-out;
}
/* lazy photos fade in very briefly once loaded (class set by MBN.primeImages) */
.cat__art img { transition: opacity .14s ease-out; }
.frame img.is-pending, .cat__art img.is-pending { opacity: 0; }
.card:hover .frame__photo { transform: scale(1.03); }
/* Every product photo sits in the same rounded frame, with a thin sand line just inside
   the edge and a faint warm wash, so dark and light photographs sit together calmly. */
.frame { border-radius: 12px; }
.frame::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: var(--terracotta);
  opacity: .08;
  mix-blend-mode: multiply;
  pointer-events: none;
}
.frame::after {
  content: "";
  position: absolute;
  inset: 7px;
  z-index: 2;
  border: 1px solid rgba(228, 211, 186, .78);
  border-radius: 7px;
  pointer-events: none;
}
.card__media { padding: 8px 8px 0; }
.cat__art::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--terracotta);
  opacity: .08;
  mix-blend-mode: multiply;
  pointer-events: none;
}

.badge {
  position: absolute;
  top: 12px; left: 12px;
  z-index: 4;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--brown);
  color: var(--sand);
  font-size: .82rem;
  font-weight: 600;
  line-height: 1.2;
}
.card.is-soldout .frame__photo { opacity: .55; filter: grayscale(.4); }

/* Product grid */
.grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
@media (max-width: 420px) {
  .grid .card__body { padding: 12px 10px 10px; }
  .grid .card__name { font-size: 1.14rem; }
  .grid .btn--small { padding: 10px 8px; font-size: .88rem; }
}
@media (min-width: 720px)  { .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; } }
@media (min-width: 1080px) { .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 22px; } }

/* 8. Shop pages -------------------------------------------------------------- */
.page-head {
  position: relative;
  z-index: 2;
  background: var(--olive);
  color: var(--sand);
  padding: calc(var(--header-h) + clamp(40px, 7vw, 92px)) 0 clamp(44px, 6vw, 84px);
  overflow: hidden;
  overflow: clip;
  isolation: isolate;
}
.page-head::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: radial-gradient(60% 80% at 90% 10%, rgba(198, 161, 94, .26), transparent 70%);
}
.page-head__grid { display: grid; gap: 32px; align-items: end; }
.page-head h1 { margin-bottom: 18px; }
.page-head__photo {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 30px 60px -30px rgba(20, 16, 8, .7), 0 0 0 1px rgba(198, 161, 94, .45);
  background: #6B5136;
}
.page-head__photo img { width: 100%; height: 100%; object-fit: cover; }
@media (min-width: 900px) {
  .page-head__grid { grid-template-columns: minmax(0, 1fr) minmax(0, .9fr); gap: 64px; }
}

.filters {
  position: sticky;
  top: var(--header-h);
  z-index: 40;
  background: var(--sand);
  box-shadow: 0 1px 0 rgba(58, 42, 32, .12);
}
.filters__track {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
  margin-inline: calc(var(--gutter) * -1);
  padding: 12px var(--gutter);
  scroll-padding-inline: var(--gutter);
}
.filters__track::-webkit-scrollbar { display: none; }
.chip {
  flex: 0 0 auto;
  min-height: 44px;
  padding: 9px 18px;
  border-radius: 999px;
  border: 1px solid rgba(58, 42, 32, .32);
  background: transparent;
  color: var(--brown);
  font-size: .96rem;
  font-weight: 500;
  white-space: nowrap;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  transition: background-color .25s var(--ease), color .25s var(--ease), border-color .25s var(--ease);
}
.chip:hover { border-color: var(--brown); }
.chip[aria-pressed="true"], .chip.is-active { background: var(--brown); border-color: var(--brown); color: var(--sand); }

.shelf { padding-block: clamp(36px, 5vw, 64px) 0; }
.shelf:last-child { padding-bottom: clamp(36px, 5vw, 64px); }
.shelf__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}
.shelf__title { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; }
.shelf__meta { font-size: .95rem; color: var(--brown-soft); }
.shelf__tools { display: flex; align-items: center; gap: 18px; }
.shelf__tools .slider__nav { display: none; }
@media (min-width: 720px) { .shelf__tools .slider__nav { display: flex; } }

.results-head { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; margin: clamp(32px, 4vw, 56px) 0 22px; }

/* Table Tales */
.tt-section { padding-block: clamp(56px, 8vw, 110px); position: relative; z-index: 2; }
.tt-section + .tt-section { padding-top: 0; }
.tt-intro { display: grid; gap: 18px; margin-bottom: clamp(26px, 4vw, 48px); max-width: 780px; }
.care-note {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  padding: 18px 22px;
  border-radius: var(--radius);
  border: 1px solid var(--gold);
  background: var(--clay);
  box-shadow: var(--shadow-soft);
  max-width: 780px;
}
.care-note > span { flex: 0 0 auto; display: flex; }
.care-note svg { flex: 0 0 auto; color: var(--terracotta); margin-top: 3px; }
.care-note p { margin: 0; }
.care-note strong { display: block; font-family: var(--font-display); font-size: 1.3rem; font-weight: 600; line-height: 1.1; margin-bottom: 4px; }

/* 9. Product page ------------------------------------------------------------ */
.crumbs { display: flex; flex-wrap: wrap; gap: 6px 10px; font-size: .92rem; color: var(--brown-soft); padding-block: 22px 18px; }
.crumbs a { text-decoration: none; }
.crumbs a:hover { text-decoration: underline; }
.crumbs span[aria-hidden] { opacity: .5; }

.pdp { display: grid; gap: clamp(26px, 5vw, 72px); align-items: start; padding-bottom: clamp(56px, 8vw, 110px); }
.pdp__media { display: grid; gap: 12px; }
/* Product pages follow their category: an olive panel for the dark-photo categories */
.pdp--olive {
  background: var(--olive);
  color: var(--sand);
  border-radius: var(--radius);
  padding: clamp(14px, 2.6vw, 36px);
  margin-bottom: clamp(48px, 7vw, 96px);
  box-shadow: var(--shadow-soft);
}
.pdp--olive .frame { background: var(--olive-deep); box-shadow: none; }
.pdp--olive .frame::after { border-color: rgba(198, 161, 94, .85); }
.pdp--olive .pdp__cat { color: #D6C6AB; border-bottom-color: rgba(228, 211, 186, .45); }
.pdp--olive .pdp__block { border-top-color: rgba(228, 211, 186, .24); }
.pdp--olive .pdp__block p, .pdp--olive .pdp__note { color: #D6C6AB; }
.pdp--olive .qty { border-color: rgba(228, 211, 186, .55); }
.pdp--olive .qty button:hover:not([disabled]) { background: rgba(228, 211, 186, .14); }
.pdp--olive .btn--dark { --btn-bg: var(--sand); color: var(--olive); }
.pdp--olive .btn--dark:hover { --btn-bg: #D6C6AB; }
.pdp--olive .btn[disabled] { border-color: rgba(228, 211, 186, .4); color: rgba(228, 211, 186, .78); background: transparent; }
.pdp--olive .badge { background: var(--sand); color: var(--olive); }
.pdp--olive .pdp__thumb { background: var(--olive-deep); box-shadow: none; }
.pdp--olive .pdp__thumb[aria-pressed="true"] { border-color: var(--gold); }
.pdp--olive :focus-visible { outline-color: var(--gold); }
.pdp__frame { border-radius: var(--radius); box-shadow: var(--shadow-soft); }
.pdp__frame::after { inset: 10px; border-radius: 9px; }
.pdp__thumbs { display: flex; gap: 10px; }
.pdp__thumb {
  width: 76px;
  aspect-ratio: 4 / 5;
  padding: 3px;
  border-radius: 12px;
  border: 1.5px solid transparent;
  background: var(--clay);
  box-shadow: var(--shadow-soft);
}
.pdp__thumb img { width: 100%; height: 100%; object-fit: cover; border-radius: 7px; }
.pdp__thumb[aria-pressed="true"] { border-color: var(--terracotta); }
.pdp__info { display: grid; gap: 20px; align-content: start; }
.pdp__cat { font-size: .95rem; color: var(--brown-soft); text-decoration: none; justify-self: start; border-bottom: 1px solid rgba(58, 42, 32, .3); }
.pdp__title { font-size: clamp(2.4rem, 5.4vw, 4rem); }
.pdp__price { font-size: 1.5rem; font-variant-numeric: tabular-nums; display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin: 0; }
.pdp__price .badge { position: static; }
.pdp__desc { max-width: 58ch; font-size: 1.08rem; }
.pdp__block { border-top: 1px solid rgba(58, 42, 32, .16); padding-top: 18px; max-width: 58ch; }
.pdp__block h2 { font-family: var(--font-body); font-size: .95rem; font-weight: 600; letter-spacing: 0; margin-bottom: 6px; }
.pdp__block p { color: var(--brown-soft); }
.pdp__buy { display: grid; gap: 14px; padding-top: 4px; max-width: 480px; }
.pdp__buy-row { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.pdp__actions { display: grid; grid-template-columns: 1fr; gap: 10px; }
@media (min-width: 480px) { .pdp__actions { grid-template-columns: 1fr 1fr; } }
.pdp__note { font-size: .92rem; color: var(--brown-soft); margin: 0; }
@media (min-width: 900px) {
  .pdp { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .pdp__media { position: sticky; top: calc(var(--header-h) + 24px); }
}

.qty {
  display: inline-grid;
  grid-template-columns: 44px minmax(40px, auto) 44px;
  align-items: center;
  border: 1px solid rgba(58, 42, 32, .4);
  border-radius: 999px;
  overflow: hidden;
  height: 48px;
}
.qty button {
  height: 100%;
  border: 0;
  background: transparent;
  font-size: 1.25rem;
  line-height: 1;
  display: grid;
  place-items: center;
  transition: background-color .2s;
}
.qty button:hover:not([disabled]) { background: rgba(58, 42, 32, .1); }
.qty button[disabled] { opacity: .35; cursor: not-allowed; }
.qty output, .qty input {
  text-align: center;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  min-width: 40px;
  border: 0;
  background: transparent;
  padding: 0;
}
.qty--small { height: 40px; grid-template-columns: 38px minmax(32px, auto) 38px; }

.also { padding-block: clamp(48px, 7vw, 96px); border-top: 1px solid rgba(58, 42, 32, .14); }

/* 10. Cart + checkout --------------------------------------------------------- */
.page-title { padding-block: clamp(28px, 5vw, 60px) clamp(20px, 3vw, 36px); }
.page-title h1 { font-size: clamp(2.6rem, 6vw, 4.4rem); }

.promo {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 20px;
  border-radius: var(--radius);
  background: var(--olive);
  color: var(--sand);
  margin-bottom: clamp(22px, 3vw, 36px);
}
.promo svg { flex: 0 0 auto; color: var(--gold); }
.promo p { margin: 0; }
.promo code {
  font-family: var(--font-body);
  font-weight: 700;
  letter-spacing: .04em;
  color: var(--gold-text);
  border: 1px dashed rgba(198, 161, 94, .7);
  border-radius: 6px;
  padding: 1px 8px;
  white-space: nowrap;
}

.cart-layout { display: grid; gap: clamp(24px, 4vw, 56px); align-items: start; padding-bottom: clamp(64px, 9vw, 120px); }
@media (min-width: 980px) { .cart-layout { grid-template-columns: minmax(0, 1.5fr) minmax(320px, 1fr); } }

.lines { display: grid; gap: 12px; }
.line {
  display: grid;
  grid-template-columns: 84px minmax(0, 1fr);
  gap: 14px 16px;
  padding: 12px;
  background: var(--clay);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
}
.line__thumb { border-radius: 10px; aspect-ratio: 4 / 5; width: 84px; display: block; }
.line__thumb::after { inset: 3px; border-radius: 6px; }
.line__main { display: grid; gap: 10px; align-content: space-between; min-width: 0; }
.line__top { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.line__name { font-family: var(--font-display); font-size: 1.36rem; font-weight: 600; line-height: 1.1; }
.line__name a { text-decoration: none; }
.line__name a:hover { text-decoration: underline; }
.line__unit { font-size: .92rem; color: var(--brown-soft); margin: 2px 0 0; }
.line__total { font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.line__bottom { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.line__remove {
  border: 0;
  background: transparent;
  padding: 10px 4px;
  font-size: .92rem;
  color: var(--brown-soft);
  text-decoration: underline;
  text-underline-offset: .2em;
}
.line__remove:hover { color: var(--terracotta-deep); }
@media (min-width: 560px) {
  .line { grid-template-columns: 104px minmax(0, 1fr); padding: 16px; gap: 14px 22px; }
  .line__thumb { width: 104px; }
}
.line--static { box-shadow: none; background: transparent; padding: 0 0 14px; border-radius: 0; border-bottom: 1px solid rgba(58, 42, 32, .14); grid-template-columns: 64px minmax(0, 1fr); }
.line--static .line__thumb { width: 64px; }
.line--static .line__name { font-size: 1.2rem; }

.summary {
  display: grid;
  gap: 22px;
  padding: clamp(20px, 2.6vw, 30px);
  background: var(--clay);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
}
@media (min-width: 980px) { .summary { position: sticky; top: calc(var(--header-h) + 24px); } }
.summary h2 { font-size: 1.9rem; }
.summary h3 { font-family: var(--font-body); font-size: .95rem; font-weight: 600; letter-spacing: 0; margin-bottom: 10px; }

.field { display: grid; gap: 6px; }
.field label, .field legend { font-size: .95rem; font-weight: 600; padding: 0; }
.input, .textarea {
  width: 100%;
  min-height: 50px;
  padding: 12px 16px;
  border: 1px solid rgba(58, 42, 32, .4);
  border-radius: var(--radius-sm);
  background: var(--sand);
  color: var(--brown);
  font-size: 1rem;
  transition: border-color .2s, box-shadow .2s;
}
.input::placeholder, .textarea::placeholder { color: rgba(58, 42, 32, .5); }
.input:focus, .textarea:focus { outline: none; border-color: var(--terracotta); box-shadow: 0 0 0 3px rgba(180, 98, 59, .25); }
.input[aria-invalid="true"], .textarea[aria-invalid="true"] { border-color: #8E2F1B; }
.textarea { min-height: 150px; resize: vertical; }
.field__error { font-size: .9rem; color: #8E2F1B; min-height: 0; margin: 0; }
.field__error:empty { display: none; }

.code-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
.code-row .input { text-transform: uppercase; }
.code-row .input::placeholder { text-transform: none; }
.code-msg { font-size: .92rem; margin: 8px 0 0; }
.code-msg[data-tone="error"] {
  color: #7A2616;
  font-weight: 600;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  background: rgba(142, 47, 27, .1);
  border: 1px solid rgba(142, 47, 27, .35);
}
.code-msg[data-tone="ok"] { color: #4A5530; font-weight: 600; }
.code-msg:empty { display: none; }
.code-applied {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  border: 1px dashed rgba(63, 70, 48, .6);
  font-size: .95rem;
}
.code-applied button { border: 0; background: none; text-decoration: underline; font-size: .9rem; padding: 6px 0; color: var(--brown-soft); }

.ship { border: 0; margin: 0; padding: 0; display: grid; gap: 8px; min-width: 0; }
.ship legend { font-size: .95rem; font-weight: 600; margin-bottom: 10px; }
.ship__opt {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid rgba(58, 42, 32, .3);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: border-color .2s, background-color .2s;
}
.ship__opt:has(input:checked) { border-color: var(--terracotta); background: rgba(228, 211, 186, .7); }
.ship__opt input { accent-color: var(--terracotta); width: 18px; height: 18px; margin: 0; flex: 0 0 auto; }
.ship__opt span { flex: 1; }
.ship__opt b { font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ship__opt s { color: var(--brown-soft); font-weight: 400; margin-right: 6px; }
.ship__note { font-size: .9rem; color: var(--brown-soft); margin: 2px 0 0; }

.totals { display: grid; gap: 8px; margin: 0; padding-top: 18px; border-top: 1px solid rgba(58, 42, 32, .18); }
.totals div { display: flex; justify-content: space-between; gap: 16px; }
.totals dt { color: var(--brown-soft); }
.totals dd { margin: 0; font-variant-numeric: tabular-nums; white-space: nowrap; }
.totals .totals__grand { margin-top: 8px; padding-top: 14px; border-top: 1px solid rgba(58, 42, 32, .18); align-items: baseline; }
.totals__grand dt { color: var(--brown); font-weight: 600; }
.totals__grand dd { font-family: var(--font-display); font-size: 2rem; font-weight: 600; line-height: 1; font-variant-numeric: lining-nums tabular-nums; }

.empty {
  text-align: center;
  padding: clamp(48px, 8vw, 96px) 20px;
  background: var(--clay);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  margin-bottom: clamp(64px, 9vw, 120px);
}
.empty h2 { font-size: clamp(2rem, 4vw, 2.8rem); margin-bottom: 10px; }
.empty p { color: var(--brown-soft); margin-bottom: 26px; }
.empty__actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

.demo-note {
  display: grid;
  gap: 6px;
  padding: 18px 20px;
  border-radius: var(--radius-sm);
  background: var(--olive);
  color: var(--sand);
}
.demo-note[hidden] { display: none; }
.demo-note strong { font-family: var(--font-display); font-size: 1.4rem; font-weight: 600; line-height: 1.15; }
.demo-note p { margin: 0; font-size: .95rem; color: rgba(228, 211, 186, .85); }
.pay-hint { font-size: .9rem; color: var(--brown-soft); text-align: center; margin: 0; }

/* 11. About + form ------------------------------------------------------------ */
.story { display: grid; gap: clamp(32px, 6vw, 80px); align-items: center; }
.story__media { position: relative; max-width: 520px; width: 100%; margin-inline: auto; }
.story__arch {
  aspect-ratio: 4 / 5;
  border-radius: 999px 999px var(--radius) var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-lift), 0 0 0 1px rgba(198, 161, 94, .6);
  background: #6B5136;
}
.story__arch img { width: 100%; height: 100%; object-fit: cover; object-position: 58% 50%; }
.story__text { display: grid; gap: 4px; max-width: 60ch; }
.story__text h2 { margin-bottom: 22px; }
.story__text p { font-size: 1.08rem; }
.story__text .story__sign { font-family: var(--font-display); font-style: italic; font-size: 1.6rem; line-height: 1.2; margin-top: 12px; color: var(--terracotta-deep); }
@media (min-width: 900px) {
  .story { grid-template-columns: minmax(0, .85fr) minmax(0, 1fr); }
}

.values { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: clamp(48px, 7vw, 96px); }
.value {
  padding: 22px 18px;
  border-radius: var(--radius);
  background: var(--clay);
  box-shadow: var(--shadow-soft);
  display: grid;
  gap: 12px;
  justify-items: start;
}
.value svg { color: var(--terracotta); }
.value span { font-family: var(--font-display); font-size: clamp(1.3rem, 2.2vw, 1.7rem); font-weight: 600; line-height: 1.05; }
@media (min-width: 900px) { .values { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; } }

.feedback { display: grid; gap: clamp(28px, 5vw, 72px); align-items: start; }
@media (min-width: 900px) { .feedback { grid-template-columns: minmax(0, .8fr) minmax(0, 1fr); } }
.feedback__intro h2 { margin-bottom: 18px; }
.form {
  display: grid;
  gap: 18px;
  padding: clamp(20px, 3vw, 36px);
  border-radius: var(--radius);
  background: var(--clay);
  color: var(--brown);
  box-shadow: var(--shadow-lift);
}
.form__row { display: grid; gap: 18px; }
@media (min-width: 620px) { .form__row { grid-template-columns: 1fr 1fr; } }
.form .hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form__status { font-size: .95rem; margin: 0; color: #8E2F1B; }
.form__status:empty { display: none; }

.rating { border: 0; margin: 0; padding: 0; min-width: 0; }
.rating legend { font-size: .95rem; font-weight: 600; margin-bottom: 6px; padding: 0; }
.rating__stars { display: inline-flex; gap: 2px; }
.rating__stars input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.rating__stars label { display: grid; place-items: center; width: 46px; height: 46px; cursor: pointer; color: rgba(58, 42, 32, .26); transition: color .15s, transform .15s; border-radius: 8px; }
.rating__stars label:hover { transform: scale(1.08); }
.rating__stars label.is-on { color: var(--terracotta); }
.rating__stars input:focus-visible + label { outline: 2px solid var(--terracotta); outline-offset: 2px; }

.form-success { text-align: center; padding: clamp(28px, 5vw, 56px) 20px; display: grid; gap: 12px; justify-items: center; }
.form-success[hidden] { display: none; }
.form-success svg { color: var(--olive); }
.form-success h3 { font-size: clamp(2rem, 4vw, 2.6rem); }
.form-success p { color: var(--brown-soft); max-width: 40ch; }

/* 12. Toast, motion, utilities ------------------------------------------------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: max(20px, env(safe-area-inset-bottom));
  z-index: 200;
  width: min(440px, calc(100vw - 24px));
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 10px 12px 10px 10px;
  border-radius: var(--radius);
  background: var(--brown);
  color: var(--sand);
  box-shadow: 0 24px 50px -16px rgba(20, 12, 6, .7);
  transform: translate(-50%, calc(100% + 40px));
  opacity: 0;
  visibility: hidden;
  transition: transform .5s var(--ease), opacity .3s var(--ease), visibility .5s;
}
.toast.is-visible { transform: translate(-50%, 0); opacity: 1; visibility: visible; }
.toast__thumb { width: 52px; height: 52px; border-radius: 10px; background: var(--clay); overflow: hidden; }
.toast__thumb img { width: 100%; height: 100%; object-fit: cover; }
.toast__text { min-width: 0; }
.toast__title { font-weight: 600; margin: 0; line-height: 1.25; display: flex; align-items: center; gap: 7px; }
.toast__title svg { color: var(--gold); flex: 0 0 auto; }
.toast__name { margin: 0; font-size: .9rem; color: rgba(228, 211, 186, .75); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.toast .btn { min-height: 44px; padding: 10px 16px; font-size: .92rem; white-space: nowrap; }

[hidden] { display: none !important; }
.center { text-align: center; }
.mt-l { margin-top: clamp(28px, 4vw, 48px); }

.not-found { padding-block: clamp(64px, 10vw, 140px); text-align: center; }
.not-found h1 { margin-bottom: 14px; }
.not-found p { color: var(--brown-soft); margin-bottom: 26px; }
/* 404 page */
.not-found--page { max-width: 640px; margin-inline: auto; min-height: 52vh; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.not-found__leaf { display: flex; color: var(--olive); margin-bottom: 10px; }
.not-found__leaf svg { width: 40px; height: 40px; }
.not-found .not-found__code { font-family: var(--font-display); font-size: 1.5rem; font-style: italic; letter-spacing: .12em; color: var(--brown-soft); margin-bottom: 6px; }
.not-found .not-found__more { display: flex; gap: 12px; justify-content: center; margin: 22px 0 0; font-size: .98rem; }
.not-found__more a { color: var(--brown); text-underline-offset: 3px; }

noscript .noscript-msg { display: block; padding: 14px var(--gutter); background: var(--brown); color: var(--sand); text-align: center; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
  .card:hover, .cat:hover, .card:hover .frame__photo, .cat:hover .cat__art { transform: none; }
}
