/* A consistent scale for content, commerce and editorial pages. */
:root {
  --text-small: .875rem;
  --text-body: 1rem;
  --text-section: clamp(1.5rem, 2.4vw, 2rem);
  --text-page: clamp(1.875rem, 3.5vw, 2.75rem);
  --text-display: clamp(2.25rem, 4.8vw, 4rem);
}
body { font-size: var(--text-body); line-height: 1.6; }
button, input, textarea, select { font: inherit; }
h1, h2, h3, h4 { text-wrap: balance; letter-spacing: -.025em; }
h1 { line-height: 1.15; }
h2, h3 { line-height: 1.3; }
.hero h1 { font-size: var(--text-display); line-height: 1.08; }
.page-hero h1, .cart-heading h1, .error-copy h1 { font-size: var(--text-page); line-height: 1.15; }
.hero p, .page-hero p { font-size: 1.0625rem; line-height: 1.7; }
.intro h2, .section-heading h2, .materials h2, .final-cta h2,
.content-section h2, .journal-heading h2 { font-size: var(--text-section); line-height: 1.25; }
.rich-hero-overlay h1 { font-size: clamp(2rem, 3.5vw, 3rem); line-height: 1.15; }
.rich-section-card h2 { font-size: clamp(1.375rem, 2vw, 1.75rem); }
.rich-lead { font-size: 1.125rem; }
.rich-section-card p, .rich-question-list, .rich-closing-card { font-size: 1rem; line-height: 1.75; }
.category-copy h2, .category-copy h3, .product-copy h3, .journal-card h3 { font-size: 1.1875rem; line-height: 1.4; }
.category-copy p, .product-copy p { font-size: .9375rem; line-height: 1.6; }
.product-copy { display: flex; flex-direction: column; gap: 10px; padding: 20px; }
.product-copy h3, .product-copy p { margin: 0; }
.product-copy > strong { margin-top: auto; font-size: 1.125rem; }
.site-footer { font-size: var(--text-small); }
.site-footer h4 { font-size: .9375rem; letter-spacing: 0; }
.cookie-banner h2, .cookie-modal h2 { font-size: clamp(1.375rem, 2.5vw, 1.875rem); line-height: 1.25; }
.cookie-group-copy h3 { font-size: 1.0625rem; }
.cart-item-copy a { font-size: 1.0625rem; line-height: 1.4; }
.cart-heading { align-items: center; }
.hero-actions { flex-wrap: wrap; }
.btn { min-height: 46px; line-height: 1.35; }

/* A gallery and a compact purchase area share the first screen. */
.product-main { padding: 32px 0 48px; background: var(--paper); }
.product-back { display: inline-block; margin-bottom: 24px; font-size: .875rem; }
.product-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  grid-template-rows: auto 1fr;
  grid-template-areas: "gallery heading" "gallery purchase";
  gap: 0 48px;
  align-items: start;
}
.product-layout > * { min-width: 0; }
.product-heading { grid-area: heading; }
.product-heading h1 { margin: 8px 0 12px; font-size: clamp(1.75rem, 2.6vw, 2.25rem); line-height: 1.22; }
.product-heading .eyebrow { font-size: .75rem; }
.product-heading .product-badges { margin: 0 0 20px; }
.product-badges span { padding: 4px 9px; border-radius: 5px; font-size: .75rem; font-weight: 600; }
.product-layout > .product-gallery { grid-area: gallery; }
.product-gallery-main { border-radius: 12px; background: #f1ede6; }
.product-gallery-main img { aspect-ratio: 1; object-fit: contain; max-height: 620px; }
.product-gallery-thumbs { display: flex; flex-wrap: wrap; gap: 10px; }
.product-gallery-thumb { flex: 0 0 64px; width: 64px; height: 64px; }
.product-purchase { grid-area: purchase; }
.product-summary { margin: 0 0 24px; color: var(--muted); font-size: 1rem; line-height: 1.65; }
.variant-picker { margin: 0 0 24px; padding: 20px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.variant-picker h2 { margin: 0 0 16px; font-size: 1rem; letter-spacing: 0; }
.variant-group { margin: 0 0 16px; }
.variant-group:last-of-type { margin-bottom: 0; }
.variant-group legend { margin-bottom: 8px; font-size: .8125rem; text-transform: none; letter-spacing: 0; font-weight: 600; }
.variant-option { min-height: 42px; padding: 8px 12px; border-radius: 7px; font-size: .9375rem; font-weight: 500; }
.product-price-box { width: 100%; padding: 0; border: 0; background: none; grid-template-columns: 1fr auto; align-items: center; gap: 6px 20px; }
.product-price-box > strong { font-size: 1.875rem; font-weight: 750; line-height: 1.2; }
.product-price-box > small { grid-column: 1; font-size: .8125rem; font-weight: 500; color: var(--accent); }
.product-price-box > .btn { grid-column: 2; grid-row: 1 / 3; min-width: 170px; }
.product-details { padding: 48px 0 64px; border-top: 1px solid var(--line); background: white; }
.product-details-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); align-items: start; gap: 48px; }
.product-details h2 { margin: 0 0 20px; font-size: 1.375rem; }
.product-description p { color: var(--muted); font-size: 1rem; line-height: 1.8; margin: 0 0 16px; }
.product-specifications .feature-list { gap: 0; margin: 0; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.product-specifications .feature-list li { padding: 12px 16px; border: 0; border-radius: 0; background: #fff; }
.product-specifications .feature-list li:nth-child(even) { background: var(--paper); }
.product-specifications .feature-list strong { font-size: .9375rem; font-weight: 500; }

/* Checkout: clear steps, stable fields and an independently scrolling order. */
.checkout-section { padding: 36px 0 64px; }
.checkout-main .cart-heading { margin-bottom: 28px; }
.checkout-main .cart-heading h1 { margin: 4px 0 0; font-size: var(--text-page); }
.checkout-main .cart-heading .eyebrow { color: var(--muted); font-size: .875rem; font-weight: 400; text-transform: none; letter-spacing: 0; }
.checkout-layout { grid-template-columns: minmax(0, 1fr) 360px; gap: 28px; }
.checkout-form { padding: 28px; gap: 28px; background: white; border-radius: 12px; }
.checkout-form > section { gap: 18px; padding-bottom: 28px; border-bottom: 1px solid var(--line); }
.checkout-form h2, .checkout-summary h2 { display: flex; align-items: center; gap: 10px; margin: 0 0 4px; font-size: 1.125rem; line-height: 1.4; letter-spacing: -.015em; }
.step-number { display: inline-grid; place-items: center; flex: 0 0 28px; height: 28px; background: var(--warm); color: var(--accent-dark); border-radius: 50%; font-size: .8125rem; }
.checkout-form .contact-form-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.checkout-form .contact-form-row .field:last-child { grid-column: 1 / -1; }
.field { min-width: 0; gap: 6px; }
.field > span { font-size: .875rem; font-weight: 500; }
.field input, .field textarea { width: 100%; min-width: 0; padding: 11px 13px; border-radius: 7px; font-size: 1rem; line-height: 1.5; }
.field input { min-height: 46px; }
.field input:focus, .field textarea:focus { outline: 2px solid rgba(47,111,98,.24); outline-offset: 1px; border-color: var(--accent); }
.checkout-provider-list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.checkout-provider { min-width: 0; gap: 10px; padding: 14px; border-radius: 8px; }
.checkout-provider strong { font-size: .9375rem; line-height: 1.45; }
.checkout-provider small { margin-top: 4px; font-size: .8125rem; line-height: 1.5; }
.checkout-provider input, .checkout-consent input { width: 18px; height: 18px; min-height: 18px; flex: 0 0 18px; margin: 3px 0 0; accent-color: var(--accent); }
.checkout-provider-form.active { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.checkout-consents { gap: 14px; }
.checkout-consent { flex-wrap: wrap; gap: 10px; align-items: start; font-size: .875rem; line-height: 1.55; }
.checkout-consent > span { flex: 1; min-width: 0; }
.checkout-consent small { display: block; margin-top: 2px; color: var(--muted); font-size: .8125rem; font-weight: 400; }
.checkout-confirmations-title { padding-top: 8px; }
.checkout-form > button[type=submit] { justify-self: start; min-width: 220px; }
.checkout-summary { position: sticky; top: var(--checkout-sticky-top, 100px); max-height: calc(100dvh - var(--checkout-sticky-top, 100px) - 24px); display: flex; flex-direction: column; padding: 24px; border-radius: 12px; background: #fff; box-shadow: 0 8px 30px rgba(33,26,23,.035); }
.checkout-summary-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.checkout-summary-heading a { font-size: .8125rem; color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
[data-checkout-items] { overflow-y: auto; min-height: 0; overscroll-behavior: contain; }
.checkout-item { display: grid; grid-template-columns: 56px minmax(0,1fr); gap: 12px; align-items: start; padding: 18px 0; }
.checkout-item img { width: 56px; height: 56px; object-fit: cover; border: 1px solid var(--line); border-radius: 6px; }
.checkout-item-copy { display: grid; gap: 5px; min-width: 0; }
.checkout-item a { font-size: .875rem; font-weight: 600; line-height: 1.45; }
.checkout-item small { font-size: .75rem; color: var(--muted); line-height: 1.5; }
.checkout-item-meta { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px; font-size: .8125rem; }
.checkout-item-meta strong { font-size: .875rem; }
.checkout-total { display: flex; align-items: baseline; flex-wrap: wrap; justify-content: space-between; gap: 10px; padding-top: 16px; border-top: 1px solid var(--line); font-size: .875rem; }
.checkout-total strong { font-size: 1.375rem; white-space: nowrap; }
.checkout-delivery-note { margin: 0; font-size: .75rem; color: var(--muted); line-height: 1.5; }
.field.invalid input, .field.invalid textarea, input[aria-invalid=true] { border-color: #b54438; }
.field-error { display: block; flex-basis: 100%; color: #a5342b !important; font-size: .8125rem !important; line-height: 1.45; margin-top: 2px; font-weight: 400; }
.form-error { margin: 0; padding: 12px 14px; border: 1px solid #ebc7c2; border-radius: 7px; background: #fff5f3; color: #a5342b; font-size: .875rem; }
.checkout-lookup { position: relative; }
.checkout-lookup-results { z-index: 20; max-height: 260px; overflow-y: auto; padding: 5px; border-radius: 8px; box-shadow: 0 8px 24px rgba(33,26,23,.14); }
.checkout-lookup-results button { min-height: 42px; font-size: .875rem; padding: 9px 10px; border-radius: 4px; text-align: left; }
.checkout-lookup-results button:focus, .checkout-lookup-results button.lookup-active { background: var(--warm); outline: none; }
.lookup-message { display: block; padding: 10px; color: var(--muted); font-size: .8125rem; line-height: 1.5; }

@media (max-width: 1000px) {
  .product-layout, .product-details-grid { column-gap: 28px; }
  .checkout-layout { grid-template-columns: minmax(0, 1fr) 310px; gap: 20px; }
  .checkout-form { padding: 20px; }
  .checkout-provider-list, .checkout-provider-form.active { grid-template-columns: 1fr; }
}
@media (max-width: 780px) {
  .product-layout { grid-template-columns: minmax(0,1fr); grid-template-rows: auto; grid-template-areas: "heading" "gallery" "purchase"; gap: 20px; }
  .product-heading h1 { font-size: 1.75rem; }
  .product-heading .product-badges { margin-bottom: 0; }
  .product-summary { margin-top: 0; }
  .product-details-grid { grid-template-columns: minmax(0,1fr); gap: 32px; }
  .product-main { padding: 24px 0 32px; }
  .product-details { padding: 32px 0; }
  .product-gallery-main img { max-height: 540px; }
  .checkout-layout { grid-template-columns: minmax(0,1fr); }
  .checkout-summary { position: static; max-height: none; }
  .checkout-summary [data-checkout-items] { max-height: none; overflow: visible; }
  .checkout-section { padding: 24px 0 40px; }
  .checkout-main .cart-heading { align-items: start; }
  .checkout-main .cart-heading .hero-actions { gap: 8px; }
  .checkout-provider-list { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 480px) {
  .hero, .page-hero { padding: 36px 0; }
  .hero h1 { font-size: 2.25rem; }
  .page-hero h1, .cart-heading h1, .error-copy h1 { font-size: 1.875rem; }
  .product-heading h1 { font-size: 1.625rem; }
  .product-price-box { grid-template-columns: 1fr; gap: 8px; }
  .product-price-box > .btn { grid-column: 1; grid-row: auto; margin-top: 8px; }
  .product-gallery-thumb { flex-basis: 56px; width: 56px; height: 56px; }
  .checkout-form, .checkout-summary { padding: 18px; }
  .checkout-form .contact-form-row, .checkout-provider-list { grid-template-columns: minmax(0,1fr); }
  .checkout-form > button[type=submit] { width: 100%; min-width: 0; }
  .checkout-main .cart-heading { display: grid; gap: 16px; }
  .rich-section-card { padding: 22px; }
}
