/* Functional styles shared by every generated site. Palette, type and layout
   accents come from the per-site theme.css that is generated next to this. */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  overflow-x: hidden;
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.55 var(--font-body);
  -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); }
h1, h2, h3 { font-family: var(--font-display); line-height: 1.15; margin: 0 0 0.5rem; text-wrap: balance; letter-spacing: -0.01em; }
h1 { font-size: clamp(2rem, 5vw, 3.25rem); }
h2 { font-size: clamp(1.4rem, 3vw, 2rem); }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1rem; }
.muted { color: var(--muted); }
.small { font-size: 0.85rem; }
.lede { color: var(--muted); font-size: 1.1rem; max-width: 56ch; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 1rem; }
.narrow { max-width: 680px; }
.eyebrow { text-transform: uppercase; letter-spacing: 0.12em; font-size: 0.75rem; font-weight: 700; color: var(--accent); margin-bottom: 0.5rem; }

/* header */
.site-header { position: sticky; top: 0; z-index: 10; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; align-items: center; gap: 1.5rem; height: 68px; }
.brand { display: flex; align-items: center; text-decoration: none; color: var(--text); }
.brand svg, .brand img { height: 36px; width: auto; max-width: 240px; object-fit: contain; }
.nav { display: none; gap: 1.25rem; margin-left: auto; }
.nav a { text-decoration: none; color: var(--text); font-weight: 600; font-size: 0.95rem; }
.nav a:hover { color: var(--accent); }
.cart-link { margin-left: auto; text-decoration: none; font-weight: 700; color: var(--text); display: inline-flex; align-items: center; gap: 0.4rem; }
.nav + .cart-link { margin-left: 0; }
.cart-count { display: inline-block; min-width: 1.5em; padding: 0 0.4em; border-radius: 999px; background: var(--accent); color: var(--accent-text); text-align: center; font-size: 0.8rem; font-variant-numeric: tabular-nums; }
@media (min-width: 760px) { .nav { display: flex; } }

main { padding-bottom: 3rem; }
section { padding: 3rem 0; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 1rem; margin-bottom: 1.5rem; flex-wrap: wrap; }
.section-head p { margin: 0; max-width: 60ch; }

/* buttons */
.button { display: inline-block; border: 0; border-radius: var(--radius-btn); background: var(--accent); color: var(--accent-text); font: inherit; font-weight: 700; padding: 0.8rem 1.3rem; cursor: pointer; text-decoration: none; text-align: center; transition: transform 0.12s ease, filter 0.12s ease; }
.button:hover { filter: brightness(1.07); transform: translateY(-1px); }
.button:focus-visible, input:focus-visible, select:focus-visible, a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.button[disabled] { opacity: 0.6; cursor: progress; transform: none; }
.button.secondary { background: transparent; color: var(--accent); border: 2px solid currentColor; }
.button.light { background: #fff; color: var(--accent-deep, var(--accent)); }
.button.plain { background: none; color: var(--muted); padding: 0.25rem 0.5rem; font-weight: 400; text-decoration: underline; }
.button.added { background: var(--ok); color: #fff; }

/* product cards */
.products { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 1.25rem; }
.products .product, .bundle { min-width: 0; }
.product { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; transition: transform 0.15s ease, box-shadow 0.15s ease; }
.product:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.product .art { background: var(--art-bg); padding: 1.25rem; display: grid; place-items: center; aspect-ratio: 1 / 0.9; }
.product .art svg, .product .art img { height: 100%; max-height: 220px; width: auto; object-fit: contain; }
.product .body { display: flex; flex-direction: column; gap: 0.35rem; padding: 1rem 1.1rem 1.25rem; flex: 1; }
.product h3 { margin: 0; }
.product h3 a { color: inherit; text-decoration: none; }
.product .tag { color: var(--muted); font-size: 0.9rem; flex: 1; margin: 0; min-height: 3.2em; }
.product .price { font-weight: 800; font-size: 1.15rem; font-variant-numeric: tabular-nums; margin: 0.25rem 0 0.5rem; }
.product .price s { color: var(--muted); font-weight: 400; font-size: 0.9rem; margin-left: 0.4rem; }
.badge { display: inline-block; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; padding: 0.2rem 0.55rem; border-radius: 999px; background: var(--accent-soft); color: var(--accent-deep, var(--accent)); align-self: flex-start; }

/* product page */
.pdp { display: grid; gap: 2rem; padding-top: 2rem; }
@media (min-width: 860px) { .pdp { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; } }
.pdp .art { background: var(--art-bg); border-radius: var(--radius); padding: 2rem; display: grid; place-items: center; min-height: 380px; }
.pdp .art svg, .pdp .art img { max-height: 420px; width: auto; }
.pdp .price { font-size: 1.6rem; font-weight: 800; margin: 0.5rem 0 1rem; }
.benefits { list-style: none; padding: 0; margin: 1rem 0 1.5rem; display: grid; gap: 0.6rem; }
.benefits li { padding-left: 1.75rem; position: relative; }
.benefits li::before { content: ""; position: absolute; left: 0; top: 0.35em; width: 1.1rem; height: 1.1rem; border-radius: 50%; background: var(--accent-soft); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='%23000' stroke-opacity='.7' stroke-width='2' d='M3.5 8.5l3 3 6-6'/%3E%3C/svg%3E"); background-size: 70%; background-position: center; background-repeat: no-repeat; }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 0.75rem; margin: 1.5rem 0; }
@media (min-width: 560px) { .facts { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.facts div { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 0.75rem 0.9rem; }
.facts dt { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); font-weight: 700; }
.facts dd { margin: 0.2rem 0 0; font-weight: 600; }
.ingredients { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.25rem; margin: 1.5rem 0; }
.ingredients ul { margin: 0.5rem 0 0; padding-left: 1.2rem; }
.disclaimer { font-size: 0.8rem; color: var(--muted); border-top: 1px solid var(--line); padding-top: 1rem; }

/* bundles */
.bundles { display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); }
.bundle { background: var(--surface); border: 2px solid var(--line); border-radius: var(--radius); padding: 1.5rem; display: flex; flex-direction: column; gap: 0.75rem; position: relative; }
.bundle.featured { border-color: var(--accent); }
.bundle .art { display: flex; justify-content: center; align-items: flex-end; gap: 4px; background: var(--art-bg); border-radius: var(--radius); padding: 0.75rem; height: 210px; overflow: hidden; }
.bundle .art svg, .bundle .art img { height: 100%; width: auto; max-width: 48%; object-fit: contain; margin: 0 -6px; }
.bundle .art img:nth-child(3), .bundle .art img:nth-child(3) ~ img, .bundle .art img:first-child:nth-last-child(3), .bundle .art img:first-child:nth-last-child(3) ~ img { max-width: 34%; }
.bundle ul { margin: 0; padding-left: 1.2rem; color: var(--muted); font-size: 0.95rem; }
.bundle .price { font-size: 1.4rem; font-weight: 800; margin: 0; }
.bundle .price s { color: var(--muted); font-weight: 400; font-size: 1rem; margin-left: 0.4rem; }
.bundle .save { color: var(--ok); font-weight: 700; font-size: 0.9rem; }

/* trust strip & footer */
.trust { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 1rem; padding: 1.5rem 0; }
.trust div { display: flex; gap: 0.75rem; align-items: flex-start; font-size: 0.95rem; }
.trust svg { flex: none; width: 28px; height: 28px; color: var(--accent); }
.trust strong { display: block; }
.steps { display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); counter-reset: step; }
.steps div { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.25rem; }
.steps div::before { counter-increment: step; content: counter(step, decimal-leading-zero); font-family: var(--font-display); font-size: 2rem; font-weight: 800; color: var(--accent); display: block; margin-bottom: 0.25rem; }
.faq details { border-top: 1px solid var(--line); padding: 0.9rem 0; }
.faq summary { font-weight: 700; cursor: pointer; }
.faq p { margin: 0.6rem 0 0; color: var(--muted); }
.site-footer { background: var(--footer-bg); color: var(--footer-text); padding: 3rem 0 2rem; margin-top: 2rem; font-size: 0.9rem; }
.site-footer a { color: inherit; }
.site-footer .cols { display: grid; gap: 2rem; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); margin-bottom: 2rem; }
.site-footer ul { list-style: none; padding: 0; margin: 0.5rem 0 0; display: grid; gap: 0.4rem; }
.site-footer .legal { border-top: 1px solid color-mix(in srgb, currentColor 20%, transparent); padding-top: 1.25rem; opacity: 0.85; font-size: 0.8rem; }
.site-footer .brand svg, .site-footer .brand img { height: 28px; max-width: 300px; }

/* legal pages */
.legal-page { max-width: 760px; padding-top: 2rem; }
.legal-page h2 { font-size: 1.25rem; margin-top: 2rem; }
.legal-page .updated { color: var(--muted); font-size: 0.85rem; }

/* cart / checkout (markup is shared with the API-driven scripts) */
.lines { list-style: none; margin: 0 0 1rem; padding: 0; border-top: 1px solid var(--line); }
.lines li { display: flex; align-items: center; gap: 0.75rem; padding: 0.75rem 0; border-bottom: 1px solid var(--line); }
.lines .name { flex: 1; min-width: 0; }
.lines .amount { font-variant-numeric: tabular-nums; white-space: nowrap; }
.qty { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: var(--radius-btn); }
.qty button { border: 0; background: none; color: var(--text); font: inherit; width: 2.2rem; height: 2.2rem; cursor: pointer; }
.qty span { min-width: 1.5rem; text-align: center; font-variant-numeric: tabular-nums; }
.total { display: flex; justify-content: space-between; font-weight: 700; font-size: 1.1rem; margin: 1rem 0; font-variant-numeric: tabular-nums; }
.checkout { display: grid; gap: 2rem; grid-template-columns: minmax(0, 1fr); padding-top: 2rem; }
@media (min-width: 860px) { .checkout { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); align-items: start; } }
.summary { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.25rem; position: sticky; top: 84px; }
fieldset { border: 0; padding: 0; margin: 0 0 1.5rem; min-width: 0; }
legend { font-weight: 700; padding: 0; margin-bottom: 0.5rem; font-family: var(--font-display); font-size: 1.1rem; }
label { display: block; font-size: 0.9rem; font-weight: 600; margin-bottom: 0.75rem; }
.optional { font-weight: 400; color: var(--muted); }
input, select { display: block; width: 100%; margin-top: 0.25rem; padding: 0.65rem 0.75rem; font: inherit; color: var(--text); background: var(--surface); border: 1px solid var(--line); border-radius: 8px; }
input[aria-invalid="true"], select[aria-invalid="true"] { border-color: var(--danger); }
label small { display: block; min-height: 1.1em; color: var(--danger); font-weight: 400; }
.row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.75rem; }
.row.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.notice { background: var(--danger-bg); color: var(--danger); border-radius: var(--radius); padding: 0.75rem 1rem; }
.notice.info { background: var(--ok-bg); color: var(--text); }
.receipt { background: var(--ok-bg); border-radius: var(--radius); padding: 1.5rem; margin-bottom: 1.5rem; }
.fda { font-size: 0.78rem; opacity: 0.85; max-width: 80ch; }
/* utilities (the CSP forbids inline style attributes) */
.u-m0 { margin: 0; } .u-mt { margin: .75rem 0 0; } .u-mt-lg { margin: 1rem 0 0; } .u-pt { padding-top: 1rem; }
.u-compare { font-size: 1rem; font-weight: 400; } .u-footer-blurb { margin-top: .75rem; max-width: 34ch; }
