/* Clay & Sage — demo apothecary storefront (a madebyruby demo build)
   Look: Neutral Luxury — warm greige + taupe (Variation 3 / "LUMIÈRE")
   Palette: bg #ECE7DD · panel #E3DDD0 · headings #2E2A24 · body #63594B
            taupe #655C4D (passes as text) · taupe-deep #6E6151 (actions) */

@font-face {
  font-family: "Bricolage Grotesque";
  font-style: normal;
  font-weight: 600 800;
  font-stretch: 100%;
  font-display: swap;
  src: url("../../assets/fonts/bricolage-grotesque-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Source Serif 4";
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url("../../assets/fonts/source-serif-4-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --bg: #ECE7DD;
  --panel: #E3DDD0;
  --head: #2E2A24;
  --body: #63594B;
  --sage: #655C4D;
  --terra: #6E6151;
  --terra-dark: #574B3D;
  --line: #DBD3C4;
  --white: #FFFFFF;
  --display: "Bricolage Grotesque", system-ui, sans-serif;
  --serif: "Source Serif 4", Georgia, serif;
}

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--body);
  font: 400 1rem/1.65 var(--serif);
}

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

h1, h2 { font-family: var(--display); font-weight: 700; color: var(--head); margin: 0 0 0.4em; letter-spacing: -0.01em; }
h1 { font-size: clamp(1.9rem, 4.5vw, 2.6rem); line-height: 1.1; }
h2 { font-size: clamp(1.4rem, 3.5vw, 1.8rem); }

a { color: var(--terra); text-decoration: underline; text-underline-offset: 3px; }
a:hover { color: var(--terra-dark); }
:focus-visible { outline: 3px solid var(--terra); outline-offset: 3px; }

/* --- Chrome ------------------------------------------------------------ */

.attrib {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  background: var(--head);
  color: var(--bg);
  padding: 0.55rem 1.4rem;
  font-size: 0.85rem;
  font-family: var(--display);
  font-weight: 600;
}
.attrib p { margin: 0; font-weight: 400; }
.attrib a { color: #CBC3B2; }
.attrib a:hover { color: var(--bg); }

.head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1.2rem 1.4rem;
  border-bottom: 1px solid var(--line);
}
.wordmark { margin: 0; font-family: var(--display); font-weight: 700; letter-spacing: 0.22em; color: var(--head); font-size: 1.05rem; display: flex; align-items: center; gap: 0.6rem; }
.head nav { display: none; gap: 1.6rem; }
.head nav span { font-size: 0.92rem; cursor: default; font-family: var(--display); font-weight: 600; }
.bag { margin: 0; display: flex; align-items: center; gap: 0.45rem; color: var(--head); font-family: var(--display); font-weight: 700; font-size: 0.95rem; }

@media (min-width: 760px) {
  .head { padding: 1.2rem 2.5rem; }
  .head nav { display: flex; }
}

/* --- PDP layout ---------------------------------------------------------- */

.pdp {
  display: grid;
  gap: 2.2rem;
  width: min(100% - 2.5rem, 72rem);
  margin: 2rem auto 0;
}

@media (min-width: 900px) {
  .pdp { grid-template-columns: 1.05fr 1fr; gap: 4rem; margin-top: 3rem; }
  .gallery { position: sticky; top: 2rem; align-self: start; }
}

.gallery-main { margin: 0; border-radius: 14px; overflow: hidden; background: var(--panel); aspect-ratio: 1; }
.gallery-main img { width: 100%; height: 100%; object-fit: cover; }
.thumbs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.7rem; margin-top: 0.7rem; }
.thumb {
  padding: 0;
  border: 2px solid transparent;
  border-radius: 10px;
  overflow: hidden;
  background: var(--panel);
  cursor: pointer;
  aspect-ratio: 1;
}
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb.is-active { border-color: var(--terra); }
.thumb:hover { border-color: var(--sage); }
.img-caption { font-size: 0.85rem; margin: 0.7rem 0 0; }

/* --- Buy column ------------------------------------------------------------ */

.eyebrow {
  margin: 0 0 0.5rem;
  font-family: var(--display);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--sage);
}

.rating { display: flex; align-items: center; gap: 0.6rem; margin: 0 0 1rem; font-size: 0.9rem; }
.intro { margin: 0 0 1.6rem; max-width: 34em; }

.tiers { border: 0; margin: 0 0 1.2rem; padding: 0; display: grid; gap: 0.7rem; }
.tiers legend { font-family: var(--display); font-size: 0.78rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--head); margin-bottom: 0.7rem; }
.tier { position: relative; display: block; cursor: pointer; }
.tier input { position: absolute; opacity: 0; }
.tier-body {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  background: var(--white);
  border: 1.5px solid var(--line);
  border-radius: 12px;
  padding: 0.95rem 1.1rem 0.95rem 2.7rem;
  position: relative;
}
.tier-body::before {
  content: "";
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  width: 15px;
  height: 15px;
  border: 1.5px solid var(--body);
  border-radius: 50%;
  background: var(--white);
}
.tier input:checked + .tier-body { background: var(--panel); border-color: var(--sage); border-width: 2px; }
.tier input:checked + .tier-body::before { border: 5px solid var(--sage); }
.tier input:focus-visible + .tier-body { outline: 3px solid var(--terra); outline-offset: 3px; }
.tier-name { color: var(--head); font-weight: 600; font-size: 0.98rem; display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap; }
.tier-each { font-size: 0.82rem; white-space: nowrap; }

.badge {
  font-family: var(--display);
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--sage);
  border: 1.5px solid var(--sage);
  border-radius: 999px;
  padding: 0.3em 0.75em;
}
.badge-solid { background: var(--sage); color: var(--bg); }

.cta {
  display: block;
  width: 100%;
  background: var(--terra);
  color: var(--white);
  border: 0;
  border-radius: 10px;
  font: 700 1rem/1 var(--display);
  padding: 1.05em 1.4em;
  cursor: pointer;
  transition: background 0.15s ease;
}
.cta:hover { background: var(--terra-dark); }

.savings { margin: 0.8rem 0 0; font-weight: 600; color: var(--sage); font-size: 0.95rem; }
.micro { margin: 0.35rem 0 1.6rem; font-size: 0.85rem; }

details { border-top: 1px solid var(--line); }
details:last-of-type { border-bottom: 1px solid var(--line); }
summary {
  cursor: pointer;
  font-family: var(--display);
  font-weight: 600;
  color: var(--head);
  font-size: 0.95rem;
  padding: 0.85rem 0.2rem;
}
details p { margin: 0 0 1rem; font-size: 0.93rem; padding: 0 0.2rem; }

.chips { display: flex; gap: 0.6rem; flex-wrap: wrap; margin: 1.5rem 0 0; }
.chips span {
  font-family: var(--display);
  font-weight: 600;
  font-size: 0.8rem;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.55em 1em;
}

/* --- Reviews ------------------------------------------------------------------ */

.reviews { width: min(100% - 2.5rem, 72rem); margin: 3.5rem auto 0; padding-top: 2.5rem; border-top: 1px solid var(--line); }
.review-grid { display: grid; gap: 1rem; }
@media (min-width: 700px) { .review-grid { grid-template-columns: 1fr 1fr; } }
.review { background: var(--white); border: 1px solid var(--line); border-radius: 12px; padding: 1.2rem 1.3rem; }
.review p { margin: 0 0 0.6rem; font-size: 0.95rem; }
.reviewer { font-family: var(--display); font-size: 0.74rem; letter-spacing: 0.1em; text-transform: uppercase; }

/* --- Footer + toast --------------------------------------------------------------- */

.foot {
  margin-top: 3.5rem;
  border-top: 1px solid var(--line);
  padding: 2.2rem 1.4rem 3rem;
  text-align: center;
}
.foot .wordmark { justify-content: center; }
.foot p { max-width: 46rem; margin: 0.6rem auto; font-size: 0.9rem; }

.toast {
  position: fixed;
  left: 50%;
  bottom: 2rem;
  transform: translate(-50%, 12px);
  z-index: 30;
  margin: 0;
  background: var(--head);
  color: var(--bg);
  font-family: var(--display);
  font-weight: 600;
  font-size: 0.88rem;
  padding: 0.7em 1.2em;
  border-radius: 999px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  max-width: min(92vw, 30rem);
  text-align: center;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
}
