/* ==========================================================================
   Dutchess Beauty & Butters: shared components for every page
   Load AFTER css/styles.css (which holds the tokens, base reset, .btn,
   .eyebrow, .text-link and the home hero). Nothing here edits those rules.
   ========================================================================== */

/* ---- Tokens -------------------------------------------------------------- */

:root {
  /* styles.css sizes .btn, .eyebrow, the header and logo with --u (and --m on
     mobile). The hero and the story define their own; everything else on any
     page (inner pages, the footer, the bag drawer) uses these. */
  --u: clamp(0.75px, calc(100vw / 1672), 1px);
  --m: min(calc(100vw / 851), 1px);
  /* The inner-page header uses the home hero header's own scale (styles.css .hero --u),
     so the logo and bar don't jump between Home and the other pages; capped so the
     sticky bar stays compact on very large screens. */
  --hu: min(calc(min(var(--vh), 56.28vw) / 941), 1.15px);
  --header-h: max(64px, calc(98 * var(--hu)));

  --gutter: clamp(16px, 4vw, 56px);
  --maxw: 1320px;
  --maxw-text: 42rem;

  --tile: #fbf7f1;              /* product photo tiles (white photos multiply into it) */
  --paper: #fdf9f3;             /* drawer, inputs, raised surfaces */
  --rule-soft: rgba(58, 38, 28, 0.16);
  --gold: #a88c5c;
  --error: #8f2f1f;
  --ok: #4f5a2f;

  --footer-bg: #2a1a12;
  --footer-ink: #f7efe5;
  --footer-muted: rgba(247, 239, 229, 0.68);
  --footer-rule: rgba(247, 239, 229, 0.16);
  --footer-accent: #cdb790;

  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --shadow-panel: -24px 0 60px -28px rgba(35, 22, 15, 0.45);
  --z-header: 40;
  --z-drawer: 100;
  --z-toast: 120;
}

/* ---- Base additions (styles.css only resets p, h1, ul) -------------------- */

h2, h3, h4, h5, h6, ol, dl, dd, figure, blockquote, fieldset { margin: 0; }
ol { padding: 0; list-style: none; }
fieldset { padding: 0; border: 0; min-width: 0; }
legend { padding: 0; }
img { max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
address { font-style: normal; }
[hidden] { display: none !important; }

html.is-locked { overflow: hidden; }

/* Inner pages (<body class="page">): footer sits at the bottom of short pages */
body.page {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100svh;
}
.page-main { flex: 1 0 auto; }
.page-main: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;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -100px;
  z-index: calc(var(--z-toast) + 1);
  padding: 12px 18px;
  background: var(--brown);
  color: var(--cream);
  font: 500 15px/1 var(--serif);
  transition: top 0.2s var(--ease);
}
.skip-link:focus { top: 12px; }
/* the home page's skip-link target (tabindex="-1"; .page-main is handled above) */
.hero__body:focus { outline: none; }

/* Focus: styles.css sets a 2px brown outline; keep it visible on dark surfaces too */
.btn:focus-visible { outline-offset: 3px; }
.site-footer :focus-visible { outline-color: var(--footer-accent); }
.toast :focus-visible { outline-color: var(--cream); }

/* ---- Layout -------------------------------------------------------------- */

.container {
  width: 100%;
  max-width: calc(var(--maxw) + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.container--narrow { max-width: calc(var(--maxw-text) + 2 * var(--gutter)); }

.section { padding-block: clamp(56px, 8vw, 112px); }
.section--tight { padding-block: clamp(36px, 5vw, 64px); }
.section + .section--ruled,
.section--ruled { border-top: 1px solid var(--rule-soft); }
.section--tile { background: var(--tile); }

.stack > * + * { margin-top: var(--stack, 1rem); }

.rule {
  height: 0;
  margin: 0;
  border: 0;
  border-top: 1px solid var(--rule);
}
.rule--soft { border-top-color: var(--rule-soft); }

/* ---- Type utilities ----------------------------------------------------- */

.eyebrow--sm {
  font-size: 12px;
  letter-spacing: 0.28em;
}

.page-title,
.section-title {
  font-family: var(--serif-display);
  font-weight: 500;
  color: var(--ink);
  letter-spacing: -0.025em;
}
.page-title {
  font-size: clamp(44px, 6.2vw, 92px);
  line-height: 0.95;
}
.section-title {
  font-size: clamp(34px, 4.2vw, 60px);
  line-height: 1;
}
.page-title em,
.section-title em { font-style: italic; }
.page-title,
.section-title,
.site-footer__tagline,
.product-card__title { text-wrap: balance; }

.lede {
  font-size: clamp(16px, 1.25vw, 19px);
  line-height: 1.65;
  color: var(--ink-soft);
  max-width: 36em;
}

.section-head { margin-bottom: clamp(28px, 4vw, 52px); }
.section-head > * + * { margin-top: 16px; }
.section-head--center { text-align: center; }
.section-head--center .lede { margin-inline: auto; }
.section-head--split {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px 32px;
}
.section-head--split > * + * { margin-top: 0; }

.text-muted { color: var(--ink-soft); }
.nowrap { white-space: nowrap; }

/* Botanical line art (assets/story/*.svg are white strokes: tint with a mask) */
.botanical {
  display: inline-block;
  width: var(--size, 72px);
  aspect-ratio: 1;
  background-color: var(--tint, var(--olive));
  -webkit-mask: var(--art, url("../assets/story/sprig.svg")) center / contain no-repeat;
  mask: var(--art, url("../assets/story/sprig.svg")) center / contain no-repeat;
  flex: none;
}
.botanical--hibiscus { --art: url("../assets/story/hibiscus.svg"); }
.botanical--seamoss { --art: url("../assets/story/seamoss.svg"); }
.botanical--sprig { --art: url("../assets/story/sprig.svg"); }

/* ---- Buttons (the home .btn is the primary; these are variants) ---------- */

.btn { cursor: pointer; border: 0; text-align: center; }
.btn[disabled],
.btn[aria-disabled="true"] { opacity: 0.5; cursor: not-allowed; }
.btn.is-busy { cursor: progress; }

.btn--ghost {
  background: transparent;
  color: var(--brown);
  box-shadow: inset 0 0 0 1px var(--brown);
}
.btn--ghost:hover { background: var(--brown); color: var(--cream); }

.btn--light {
  background: var(--cream);
  color: var(--brown);
}
.btn--light:hover { background: #fff; }

.btn--block { width: 100%; min-width: 0; }
.btn--sm {
  height: 44px;
  min-width: 0;
  padding-inline: 20px;
  gap: 14px;
  font-size: 16px;
}
@media (max-width: 767px), (max-aspect-ratio: 1/1) {
  .btn--inline { width: auto; } /* styles.css makes every .btn full-width on mobile */
}

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--serif);
  font-size: 17px;
  color: var(--ink);
  border-bottom: 1px solid currentColor;
  padding-bottom: 3px;
  transition: opacity 0.2s ease;
}
.link-arrow svg { width: 22px; fill: none; stroke: currentColor; stroke-width: 1.3; stroke-linecap: round; stroke-linejoin: round; transition: transform 0.25s var(--ease); }
.link-arrow:hover { opacity: 0.7; }
.link-arrow:hover svg { transform: translateX(3px); }

/* ---- Inner-page header (same lockup as the home hero header, on cream) --- */

.page-header {
  position: sticky;
  top: 0;
  z-index: var(--z-header);
  background: var(--cream);
  transition: box-shadow 0.3s ease;
}
.page-header.is-stuck { box-shadow: 0 14px 30px -26px rgba(35, 22, 15, 0.55); }
.site-header--inner { --u: var(--hu); }

.site-nav a[aria-current="page"]::after { transform: scaleX(1); }

/* "Search" link: only in the phone / portrait menu (desktop has the search icon) */
@media (min-width: 768px) and (min-aspect-ratio: 1001/1000) {
  .site-nav__search { display: none; }
}

@media (max-width: 767px), (max-aspect-ratio: 1/1) {
  .site-header.site-header--inner { position: relative; }
  .site-nav a[aria-current="page"] { font-style: italic; }

  /* 44px tap targets for the bag and menu buttons; the negative margin keeps the layout */
  .header-actions .icon-btn {
    min-width: 44px;
    min-height: 44px;
    padding: 0;
    margin: -10px;
  }
  .header-actions .bag-count { top: 3px; right: -2px; }

  /* The menu button turns into a close (×) while the menu is open */
  .menu-toggle { position: relative; }
  .site-header.is-open .menu-toggle svg { opacity: 0; }
  .site-header.is-open .menu-toggle::before,
  .site-header.is-open .menu-toggle::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    width: max(20px, calc(32 * var(--m)));
    height: 1.4px;
    background: currentColor;
    transform: translate(-50%, -50%) rotate(45deg);
  }
  .site-header.is-open .menu-toggle::after { transform: translate(-50%, -50%) rotate(-45deg); }
}

/* Portrait tablets get the phone layout from styles.css, whose .btn and header scale with
   --m (100vw / 851): at 768px wide that is an 87px button with 31px text and a 98px
   header. Keep buttons (page content and the bag drawer) and the header at a comfortable
   size; phones (under 600px) are unchanged. The home hero and story keep their own --m. */
@media (min-width: 600px) and (max-aspect-ratio: 1/1) {
  .bag,
  .page-main { --m: 0.56px; }
  .site-header { --m: 0.66px; }
}

/* Bag icon + count badge (header on every page, including the home hero) */
.icon-btn--bag { position: relative; }
.bag-count {
  position: absolute;
  top: -3px;
  right: -9px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 9px;
  background: var(--brown);
  color: var(--cream);
  font: 500 10.5px/18px var(--sans);
  letter-spacing: 0;
  text-align: center;
  pointer-events: none;
}
.bag-count.is-bumped { animation: bag-bump 0.45s var(--ease); }
@keyframes bag-bump {
  0% { transform: scale(1); }
  40% { transform: scale(1.35); }
  100% { transform: scale(1); }
}

/* ---- Inner-page intro + breadcrumb ------------------------------------- */

.page-intro {
  padding-block: clamp(36px, 6vw, 88px) clamp(28px, 4vw, 56px);
}
.page-intro > * + * { margin-top: 18px; }
.page-intro--center { text-align: center; }
.page-intro--center .lede { margin-inline: auto; }

.breadcrumb ol {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
  font-size: 13px;
  letter-spacing: 0.02em;
  color: var(--ink-soft);
}
.breadcrumb li { display: inline-flex; align-items: center; gap: 10px; }
.breadcrumb li + li::before {
  content: "";
  width: 5px;
  height: 5px;
  border-top: 1px solid currentColor;
  border-right: 1px solid currentColor;
  transform: rotate(45deg);
  opacity: 0.6;
}
.breadcrumb a { border-bottom: 1px solid transparent; transition: border-color 0.2s ease; }
.breadcrumb a:hover { border-bottom-color: currentColor; }
.breadcrumb [aria-current="page"] { color: var(--ink); }

/* ---- Badges, price ------------------------------------------------------ */

.badge {
  display: inline-flex;
  align-items: center;
  height: 24px;
  padding: 0 10px;
  background: var(--cream);
  color: var(--brown);
  box-shadow: inset 0 0 0 1px rgba(66, 41, 29, 0.35);
  font: 500 10.5px/1 var(--sans);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  white-space: nowrap;
}
.badge--solid { background: var(--brown); color: var(--cream); box-shadow: none; }
.badge--olive { background: var(--olive); color: var(--cream); box-shadow: none; }

.price {
  font-family: var(--serif);
  font-size: 18px;
  color: var(--ink);
  font-variant-numeric: lining-nums;
  white-space: nowrap;
}
.price__from {
  margin-right: 0.35em;
  font: 500 10.5px/1 var(--sans);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--eyebrow);
  vertical-align: 0.2em;
}
.price--lg { font-size: clamp(24px, 2vw, 30px); }

/* ---- Product grid + card ------------------------------------------------ */

.product-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 36px 14px;
}
@media (min-width: 700px) {
  .product-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 48px 24px; }
}
@media (min-width: 1100px) {
  .product-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 56px 32px; }
}

.product-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.product-card__media {
  position: relative;
  aspect-ratio: 4 / 5;
  /* a band at the top keeps the badge off the jar lids; every card gets it, so the
     jars sit at the same height across a row (border-box: the tile stays 4:5) */
  padding: 40px 12px 8px;
  overflow: hidden;
  background: var(--tile);
  isolation: isolate;
}
.product-card__media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  mix-blend-mode: multiply; /* white studio backgrounds melt into the tile */
  transition: transform 0.7s var(--ease);
}
/* Legacy photos (real backgrounds, not white studio shots) sit on the same light tile
   as an inset print, so they don't break the run of white-background jars */
.product-card--photo .product-card__media { padding: 14%; }
.product-card--photo .product-card__media img {
  object-fit: contain;
  mix-blend-mode: normal;
  filter: drop-shadow(0 12px 14px rgba(35, 22, 15, 0.2));
}
.product-card:hover .product-card__media img { transform: scale(1.035); }

.product-card__badges {
  position: absolute;
  top: 12px;
  left: 12px;
  right: 12px;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  pointer-events: none;
}
/* a long label wraps inside the tile instead of being cut off */
.product-card__badges .badge {
  max-width: 100%;
  height: auto;
  min-height: 24px;
  padding-block: 5px;
  line-height: 1.2;
  white-space: normal;
}
/* grid rows stretch every card to the tallest; the price row sits at the bottom of each */
.product-card__body {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-top: 16px;
}
.product-card__eyebrow {
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--eyebrow);
}
.product-card__title {
  font-family: var(--serif-display);
  font-weight: 500;
  font-size: clamp(19px, 1.55vw, 23px);
  line-height: 1.12;
  letter-spacing: -0.005em;
  color: var(--ink);
}
.product-card__link::after { /* whole card is clickable; the add button sits above */
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
}
.product-card__link:focus-visible { outline: none; }
.product-card__link:focus-visible::after { outline: 2px solid var(--brown); outline-offset: 6px; }
.product-card__meta {
  font-size: 13px;
  color: var(--ink-soft);
}
.product-card__foot {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 6px 12px;
  margin-top: auto;
}
.product-card__add {
  position: relative;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 0 4px;
  background: none;
  border: 0;
  border-bottom: 1px solid currentColor;
  color: var(--brown);
  font: 400 15px/1.2 var(--serif);
  cursor: pointer;
  transition: opacity 0.2s ease;
}
.product-card__add:hover { opacity: 0.65; }
.product-card__add svg { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.product-card__add .product-card__arrow { width: 15px; height: 11px; stroke-width: 1.4; transition: transform 0.25s var(--ease); }
.product-card__add:hover .product-card__arrow { transform: translateX(2px); }
.product-card__add.is-busy { opacity: 0.5; cursor: progress; }
.product-card__soldout {
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
@media (max-width: 599px) {
  .product-card__media { padding: 32px 8px 6px; }
  .product-card__badges { top: 8px; left: 8px; right: 8px; }
  .product-card__badges .badge { min-height: 21px; padding: 4px 7px; font-size: 9.5px; letter-spacing: 0.12em; }
  .product-card__body { padding-top: 12px; gap: 5px; }
  .product-card__eyebrow { font-size: 10px; letter-spacing: 0.16em; }
  .product-card__foot { flex-direction: column; align-items: flex-start; }
  .product-card__add { font-size: 14px; }
}

/* ---- Rich text (product descriptions) ----------------------------------- */

.prose {
  font-size: 16px;
  line-height: 1.7;
  color: var(--ink-soft);
}
.prose > * + * { margin-top: 1em; }
.prose h3 {
  margin-top: 1.6em;
  font-family: var(--serif-display);
  font-weight: 500;
  font-size: 26px;
  line-height: 1.15;
  color: var(--ink);
}
.prose h4 {
  margin-top: 1.4em;
  font-family: var(--sans);
  font-weight: 500;
  font-size: 12px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--eyebrow);
}
.prose h3 + *,
.prose h4 + * { margin-top: 0.6em; }
.prose h3 + h4 { margin-top: 0.9em; }
.prose strong { font-weight: 500; color: var(--ink); }
.prose ul > li {
  position: relative;
  padding-left: 22px;
}
.prose ul > li + li { margin-top: 0.45em; }
.prose ul > li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 0.78em;
  width: 9px;
  border-top: 1px solid var(--olive);
}
.prose .prose__label { display: block; color: var(--ink); font-weight: 500; }
.prose a { color: var(--brown); text-decoration: underline; text-underline-offset: 0.2em; }

/* Scent/infusion notes */
.notes {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 10px 24px;
  align-items: baseline;
}
.notes dt {
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--eyebrow);
}
.notes dd {
  font-family: var(--serif);
  font-size: 18px;
  color: var(--ink);
}

/* Highlight chips (e.g. Vegan / Mineral-Rich) */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 4px 12px;
  box-shadow: inset 0 0 0 1px var(--rule-soft);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

/* Review / testimonial */
.quote { position: relative; }
.quote__text {
  font-family: var(--serif-display);
  font-style: italic;
  font-weight: 500;
  font-size: clamp(24px, 2.4vw, 34px);
  line-height: 1.25;
  color: var(--ink);
}
.quote__text::before { content: "\201C"; }
.quote__text::after { content: "\201D"; }
.quote__by {
  margin-top: 18px;
  font-size: 12px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--eyebrow);
}
/* "Toni Louise Goodwin · Facebook review": one credit format everywhere */
.review__source { letter-spacing: 0.16em; opacity: 0.85; }

/* Small underlined text button ("Copy order", "Copy address") */
.copy-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 0 3px;
  background: none;
  border: 0;
  border-bottom: 1px solid currentColor;
  color: var(--brown);
  font: 400 15px/1.2 var(--serif);
  cursor: pointer;
  transition: opacity 0.2s ease;
}
.copy-btn:hover { opacity: 0.65; }

/* ---- Accordion (native <details>) --------------------------------------- */

.accordion { border-bottom: 1px solid var(--rule-soft); }
.accordion__item { border-top: 1px solid var(--rule-soft); }
.accordion__summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 58px;
  padding-block: 14px;
  list-style: none;
  cursor: pointer;
  font-family: var(--serif);
  font-size: 19px;
  color: var(--ink);
}
.accordion__summary::-webkit-details-marker { display: none; }
.accordion__summary::after {
  content: "";
  flex: none;
  width: 14px;
  height: 14px;
  background:
    linear-gradient(currentColor, currentColor) center / 14px 1px no-repeat,
    linear-gradient(currentColor, currentColor) center / 1px 14px no-repeat;
  transition: transform 0.3s var(--ease);
}
.accordion__item[open] > .accordion__summary::after {
  background: linear-gradient(currentColor, currentColor) center / 14px 1px no-repeat;
  transform: rotate(180deg);
}
.accordion__summary:hover { color: var(--brown-hover); }
.accordion__body {
  padding-bottom: 22px;
  font-size: 15.5px;
  line-height: 1.7;
  color: var(--ink-soft);
}
.accordion__body > * + * { margin-top: 0.8em; }

/* ---- Forms ---------------------------------------------------------------- */

.field { display: flex; flex-direction: column; gap: 8px; }
.field + .field { margin-top: 18px; }
.field__label {
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--eyebrow);
}
.field__optional { letter-spacing: 0.06em; text-transform: none; opacity: 0.8; }
.input,
.select,
.textarea {
  width: 100%;
  min-height: 50px;
  padding: 12px 14px;
  background: var(--paper);
  border: 1px solid rgba(58, 38, 28, 0.32);
  border-radius: 0;
  font-family: var(--sans);
  font-size: 16px; /* 16px stops iOS zooming on focus */
  line-height: 1.4;
  color: var(--ink);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  -webkit-appearance: none;
  appearance: none;
}
.textarea { min-height: 150px; resize: vertical; }
.select {
  padding-right: 42px;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--ink) 50%),
    linear-gradient(-45deg, transparent 50%, var(--ink) 50%);
  background-position: calc(100% - 22px) 50%, calc(100% - 17px) 50%;
  background-size: 5px 5px;
  background-repeat: no-repeat;
}
.input::placeholder,
.textarea::placeholder { color: rgba(58, 42, 32, 0.5); }
.input:hover,
.select:hover,
.textarea:hover { border-color: rgba(58, 38, 28, 0.55); }
.input:focus,
.select:focus,
.textarea:focus {
  outline: none;
  border-color: var(--brown);
  box-shadow: 0 0 0 1px var(--brown);
}
.input[aria-invalid="true"],
.select[aria-invalid="true"],
.textarea[aria-invalid="true"] { border-color: var(--error); box-shadow: 0 0 0 1px var(--error); }
.field__hint { font-size: 13px; color: var(--ink-soft); }
.field__error { font-size: 13px; color: var(--error); }

.check {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 15px;
  line-height: 1.5;
  color: var(--ink-soft);
  cursor: pointer;
}
.check input {
  flex: none;
  width: 20px;
  height: 20px;
  margin: 1px 0 0;
  accent-color: var(--brown);
}

/* Choice pills (size / scent radios) */
.choices { display: flex; flex-wrap: wrap; gap: 10px; }
.choices__legend {
  margin-bottom: 12px;
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--eyebrow);
}
.choice { position: relative; display: inline-flex; }
.choice input {
  position: absolute;
  inset: 0;
  opacity: 0;
  margin: 0;
  cursor: pointer;
}
.choice span {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 46px;
  padding: 10px 18px;
  box-shadow: inset 0 0 0 1px rgba(58, 38, 28, 0.32);
  font-family: var(--serif);
  font-size: 16px;
  color: var(--ink);
  transition: background-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}
.choice small { font-family: var(--sans); font-size: 12.5px; color: inherit; opacity: 0.75; }
.choice input:hover + span { box-shadow: inset 0 0 0 1px var(--brown); }
.choice input:checked + span { background: var(--brown); color: var(--cream); box-shadow: none; }
.choice input:focus-visible + span { outline: 2px solid var(--brown); outline-offset: 3px; }
.choice input:disabled + span { opacity: 0.45; text-decoration: line-through; cursor: not-allowed; }

/* Quantity stepper */
.qty {
  display: inline-flex;
  align-items: stretch;
  height: 50px;
  box-shadow: inset 0 0 0 1px rgba(58, 38, 28, 0.32);
  background: var(--paper);
}
.qty__btn {
  display: grid;
  place-items: center;
  width: 46px;
  padding: 0;
  background: none;
  border: 0;
  color: var(--ink);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  transition: background-color 0.2s ease;
}
.qty__btn:hover { background: rgba(66, 41, 29, 0.06); }
.qty__btn:disabled { opacity: 0.35; cursor: not-allowed; background: none; }
.qty__input {
  width: 44px;
  padding: 0;
  background: none;
  border: 0;
  text-align: center;
  font-family: var(--sans);
  font-size: 16px;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
  -moz-appearance: textfield;
  appearance: textfield;
}
.qty__input::-webkit-outer-spin-button,
.qty__input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.qty__input:focus-visible { outline: 2px solid var(--brown); outline-offset: -2px; }
.qty--sm { height: 38px; }
.qty--sm .qty__btn { width: 36px; font-size: 17px; }
.qty--sm .qty__input { width: 34px; font-size: 15px; }

/* Delivery note line (van icon + text) */
.delivery-note {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: var(--ink-soft);
}
.delivery-note svg { width: 22px; flex: none; fill: none; stroke: var(--olive); stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }

/* ---- Footer -------------------------------------------------------------- */

.site-footer {
  position: relative;
  overflow: hidden;
  background: var(--footer-bg);
  color: var(--footer-ink);
}
.site-footer a { transition: color 0.2s ease, opacity 0.2s ease; }
.site-footer__inner {
  position: relative;
  z-index: 1;
  max-width: calc(var(--maxw) + 2 * var(--gutter));
  margin-inline: auto;
  padding: clamp(56px, 7vw, 96px) var(--gutter) 28px;
}
.site-footer__art {
  position: absolute;
  right: -40px;
  top: -30px;
  width: clamp(220px, 26vw, 380px);
  aspect-ratio: 1;
  opacity: 0.09;
  pointer-events: none;
}
@media (max-width: 599px) {
  .site-footer__art { width: 170px; right: -56px; top: -44px; opacity: 0.08; }
}
.site-footer__top {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(0, 1fr));
  gap: 48px 40px;
}
.site-footer .logo { color: var(--footer-ink); align-items: flex-start; }
.site-footer .logo__name { font-size: 38px; }
.site-footer .logo__sub { font-size: 11px; }
.site-footer__tagline {
  margin-top: 26px;
  max-width: 18em;
  font-family: var(--serif-display);
  font-style: italic;
  font-size: clamp(24px, 2vw, 30px);
  line-height: 1.2;
  color: var(--footer-ink);
}
.site-footer__est {
  margin-top: 14px;
  font-size: 12px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--footer-accent);
}
.site-footer__heading {
  margin-bottom: 18px;
  font: 500 12px/1 var(--sans);
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--footer-accent);
}
.site-footer__links li + li { margin-top: 12px; }
.site-footer__links a,
.site-footer__contact a {
  font-family: var(--serif);
  font-size: 17px;
  color: var(--footer-ink);
}
.site-footer__links a:hover,
.site-footer__contact a:hover { color: var(--footer-accent); }
.site-footer__contact { font-size: 15px; line-height: 1.6; color: var(--footer-muted); }
.site-footer__contact > * + * { margin-top: 14px; }
.site-footer__contact a { word-break: break-word; }
.site-footer__socials { display: flex; gap: 12px; margin-top: 28px; }
.site-footer__socials a {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  box-shadow: inset 0 0 0 1px var(--footer-rule);
  color: var(--footer-ink);
}
.site-footer__socials a:hover { box-shadow: inset 0 0 0 1px var(--footer-accent); color: var(--footer-accent); }
.site-footer__socials svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }

.site-footer__delivery {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px 28px;
  margin-top: clamp(44px, 5vw, 72px);
  padding-block: 20px;
  border-top: 1px solid var(--footer-rule);
  border-bottom: 1px solid var(--footer-rule);
  font-family: var(--serif);
  font-size: 16px;
  letter-spacing: 0.04em;
  color: var(--footer-ink);
}
.site-footer__delivery span { display: inline-flex; align-items: center; gap: 10px; }
.site-footer__delivery svg { width: 22px; fill: none; stroke: var(--footer-accent); stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }

.site-footer__bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 24px;
  padding-top: 24px;
  font-size: 13px;
  color: var(--footer-muted);
}
.site-footer__bottom a:hover { color: var(--footer-ink); }

/* the 4-column footer needs ~1200px: below that the contact column would break the email address */
@media (max-width: 1199px) {
  .site-footer__top { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .site-footer__brand { grid-column: 1 / -1; }
}
@media (max-width: 599px) {
  .site-footer__top { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 40px 24px; }
  .site-footer__visit { grid-column: 1 / -1; }
  .site-footer .logo__name { font-size: 32px; }
  .site-footer__delivery { justify-content: flex-start; flex-direction: column; align-items: flex-start; font-size: 15px; }
  .site-footer__bottom { flex-direction: column; align-items: flex-start; }
}

/* ---- Bag drawer ---------------------------------------------------------- */

.bag {
  position: fixed;
  inset: 0;
  z-index: var(--z-drawer);
}
.bag__overlay {
  position: absolute;
  inset: 0;
  background: rgba(35, 22, 15, 0.42);
  opacity: 0;
  transition: opacity 0.35s ease;
}
.bag__panel {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  width: min(440px, 100%);
  background: var(--cream);
  box-shadow: var(--shadow-panel);
  transform: translateX(100%);
  transition: transform 0.45s var(--ease);
  outline: none;
}
.bag.is-open .bag__overlay { opacity: 1; }
.bag.is-open .bag__panel { transform: none; }

.bag__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 72px;
  padding: 0 24px;
  border-bottom: 1px solid var(--rule-soft);
}
.bag__title {
  font-family: var(--serif-display);
  font-weight: 500;
  font-size: 30px;
  line-height: 1;
  color: var(--ink);
}
.bag__title-count {
  margin-left: 8px;
  font: 400 13px/1 var(--sans);
  letter-spacing: 0.08em;
  color: var(--ink-soft);
  vertical-align: 0.35em;
}
.bag__close svg { width: 22px; height: 22px; }

.bag__body {
  flex: 1;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 8px 24px;
}
.bag__lines > li + li { border-top: 1px solid var(--rule-soft); }

.bag-line {
  display: grid;
  grid-template-columns: 84px 1fr;
  gap: 16px;
  padding-block: 18px;
}
.bag-line__media {
  display: block;
  aspect-ratio: 4 / 5;
  background: var(--tile);
  overflow: hidden;
}
.bag-line__media img { width: 100%; height: 100%; object-fit: contain; mix-blend-mode: multiply; }
.bag-line__media--photo img { object-fit: cover; mix-blend-mode: normal; }
.bag-line__main { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.bag-line__top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.bag-line__name {
  font-family: var(--serif-display);
  font-weight: 500;
  font-size: 19px;
  line-height: 1.15;
  color: var(--ink);
}
.bag-line__name:hover { color: var(--brown-hover); }
.bag-line__price { font-family: var(--serif); font-size: 17px; white-space: nowrap; }
.bag-line__meta,
.bag-line__unit { font-size: 13px; color: var(--ink-soft); }
.bag-line__actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 8px;
}
.bag-line__remove {
  padding: 4px 0;
  background: none;
  border: 0;
  border-bottom: 1px solid currentColor;
  font-size: 13px;
  color: var(--ink-soft);
  cursor: pointer;
}
.bag-line__remove:hover { color: var(--ink); }

.bag__empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  min-height: 100%;
  padding: 40px 8px;
  text-align: center;
}
.bag__empty .botanical { --size: 96px; opacity: 0.7; }
.bag__empty-title {
  font-family: var(--serif-display);
  font-weight: 500;
  font-size: 30px;
  color: var(--ink);
}
.bag__empty p { color: var(--ink-soft); }

.bag__footer {
  padding: 18px 24px max(22px, env(safe-area-inset-bottom));
  border-top: 1px solid var(--rule-soft);
  background: var(--paper);
}
.bag__progress { margin-bottom: 16px; }
.bag__progress-text { font-size: 13.5px; color: var(--ink-soft); }
.bag__progress-text strong { font-weight: 500; color: var(--ink); }
.bag__bar {
  height: 3px;
  margin-top: 10px;
  background: var(--rule-soft);
  overflow: hidden;
}
.bag__bar span {
  display: block;
  height: 100%;
  background: var(--olive);
  transform-origin: left;
  transition: transform 0.5s var(--ease);
}
.bag__totals { display: grid; gap: 8px; font-size: 15px; color: var(--ink-soft); }
.bag__totals div { display: flex; justify-content: space-between; gap: 16px; }
.bag__totals dd { color: var(--ink); font-family: var(--serif); font-size: 17px; }
.bag__totals .bag__total {
  margin-top: 4px;
  padding-top: 12px;
  border-top: 1px solid var(--rule-soft);
  color: var(--ink);
  font-size: 16px;
}
.bag__totals .bag__total dd { font-size: 22px; }
.bag__checkout { margin-top: 18px; }
/* After Checkout: what to do if no email app opened */
.bag__sent {
  margin-top: 14px;
  padding: 14px 16px;
  background: rgba(79, 90, 47, 0.07);
  box-shadow: inset 0 0 0 1px rgba(79, 90, 47, 0.3);
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--ink-soft);
}
.bag__sent-title {
  margin-bottom: 4px;
  font-family: var(--serif-display);
  font-weight: 500;
  font-size: 20px;
  line-height: 1.15;
  color: var(--ink);
}
.bag__sent a { color: var(--brown); text-decoration: underline; text-underline-offset: 0.2em; overflow-wrap: anywhere; }
.bag__sent-actions { display: flex; flex-wrap: wrap; gap: 6px 22px; margin-top: 10px; }
.bag__sent .copy-btn { font-size: 14.5px; }
.bag__note {
  margin-top: 12px;
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--ink-soft);
  text-align: center;
}

@media (max-width: 480px) {
  .bag__header,
  .bag__body,
  .bag__footer { padding-inline: 18px; }
  .bag-line { grid-template-columns: 72px 1fr; gap: 14px; }
}

/* ---- Toast --------------------------------------------------------------- */

.toast-region {
  position: fixed;
  left: 50%;
  bottom: max(20px, env(safe-area-inset-bottom));
  z-index: var(--z-toast);
  display: grid;
  gap: 10px;
  width: min(440px, calc(100% - 32px));
  transform: translateX(-50%);
  pointer-events: none;
}
.toast {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 18px;
  background: var(--ink);
  color: var(--cream);
  font-size: 14.5px;
  line-height: 1.4;
  box-shadow: 0 18px 40px -18px rgba(35, 22, 15, 0.6);
  pointer-events: auto;
  animation: toast-in 0.35s var(--ease);
}
.toast.is-leaving { animation: toast-out 0.25s ease forwards; }
.toast__action {
  flex: none;
  padding: 2px 0;
  background: none;
  border: 0;
  border-bottom: 1px solid currentColor;
  color: var(--footer-accent);
  font: 400 15px/1.2 var(--serif);
  cursor: pointer;
}
.toast--error { background: var(--error); }
@keyframes toast-in { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes toast-out { to { opacity: 0; transform: translateY(8px); } }

/* ---- Reduced motion ------------------------------------------------------ */

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