/*
Theme Name: Stitchlings Child
Theme URI: https://stitchlingsclub.com
Description: Storefront child theme for Stitchlings Club. Cozy, simple branding with a persistent left sidebar, minicart drawer, and a 3-step purchase flow.
Author: Stitchlings Club
Template: storefront
Version: 1.6.1
Text Domain: stitchlings-child
*/

/* ====================================================================
   1. BRAND TOKENS
   ==================================================================== */
:root {
  --sc-peach:        #e69b7b;
  --sc-peach-dark:   #d97f5e;
  --sc-peach-deep:   #ad5638;   /* AA-contrast text accent on white */
  --sc-peach-soft:   #fbe9df;
  --sc-ink:          #46303c;
  --sc-ink-soft:     #6d5560;
  --sc-cream:        #fdf8f3;
  --sc-paper:        #ffffff;
  --sc-white:        #ffffff;
  --sc-radius:       16px;
  --sc-rail:         236px;   /* sidebar width, expanded */
  --sc-rail-slim:    76px;    /* sidebar width, collapsed */
  --sc-bar-h:        38px;    /* announcement bar height */
  --sc-font-head:    'Chewy', 'Comic Sans MS', cursive;
  --sc-font-body:    'Red Hat Display', 'Segoe UI', sans-serif;
}

body {
  font-family: var(--sc-font-body);
  background-color: var(--sc-white);
  color: var(--sc-ink);
  line-height: 1.6;
}

h1, h2, h3,
.site-branding .site-title,
.wp-block-heading {
  font-family: var(--sc-font-head);
  font-weight: 400;
  letter-spacing: 0.01em;
  color: var(--sc-ink);
}

h4, h5, h6,
button,
input,
select,
textarea,
.main-navigation,
.sc-sidebar,
.woocommerce-loop-product__title,
.wc-block-components-product-title {
  font-family: var(--sc-font-body);
  color: var(--sc-ink);
}

.woocommerce-loop-product__title,
.wc-block-components-product-title {
  font-weight: 700;
}

/* ====================================================================
   1b. ANNOUNCEMENT BAR (static free-shipping note)
   ==================================================================== */
.sc-announce {
  position: fixed;
  top: var(--wp-admin--admin-bar--height, 0px);
  left: 0;
  right: 0;
  height: var(--sc-bar-h);
  z-index: 1004;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: var(--sc-peach);
  color: var(--sc-ink);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  padding: 0 12px;
  text-align: center;
}

/* Shift the fixed chrome + page content below the bar */
body.sc-has-announce .sc-sidebar {
  top: calc(var(--sc-bar-h) + var(--wp-admin--admin-bar--height, 0px));
}
body.sc-has-announce .sc-topbar,
body.sc-has-announce .sc-burger {
  top: calc(var(--sc-bar-h) + 10px + var(--wp-admin--admin-bar--height, 0px));
}
body.sc-has-announce #page.site { padding-top: var(--sc-bar-h); }
body.sc-has-announce [id] { scroll-margin-top: calc(var(--sc-bar-h) + 12px); }

@media (max-width: 600px) {
  .sc-announce { font-size: 0.72rem; }
  .sc-announce__track { width: 72px; }
}

/* ====================================================================
   2. YOUTUBE-STYLE LEFT SIDEBAR
   ==================================================================== */
.sc-sidebar {
  position: fixed;
  top: var(--wp-admin--admin-bar--height, 0px);
  left: 0;
  bottom: 0;
  width: var(--sc-rail);
  background: var(--sc-white);
  border-right: 1px solid #f0e4da;
  z-index: 999;
  display: flex;
  flex-direction: column;
  padding: 0.75rem 0.6rem;
  overflow-y: auto;
  overscroll-behavior: contain;
  transition: width 0.18s ease, transform 0.24s ease;
  font-family: var(--sc-font-body);
}

.sc-sidebar__toggle {
  background: none !important;
  border: none !important;
  border-radius: 12px;
  padding: 0.65rem;
  margin: 0 0 0.4rem 0.2rem;
  cursor: pointer;
  color: var(--sc-ink);
  align-self: flex-start;
  line-height: 0;
}
.sc-sidebar__toggle:hover { background: var(--sc-peach-soft) !important; }

/* Toggle icon: X while the menu is open (expanded rail), burger when
   collapsed to icons only. */
.sc-sidebar__toggle .sc-ic-burger { display: none; }
.sc-sidebar__toggle .sc-ic-x { display: inline-block; }
html.sc-collapsed .sc-sidebar__toggle .sc-ic-burger { display: inline-block; }
html.sc-collapsed .sc-sidebar__toggle .sc-ic-x { display: none; }

.sc-sidebar__nav { flex: 1 1 auto; }
.sc-sidebar__nav ul,
.sc-sidebar__bottom ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.sc-sidebar a {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.62rem 0.8rem;
  margin-bottom: 2px;
  border-radius: 12px;
  color: var(--sc-ink);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 400;
  white-space: nowrap;
}
.sc-sidebar a:hover { background: var(--sc-peach-soft); color: var(--sc-ink); }
.sc-sidebar li.is-current > a {
  background: var(--sc-peach);
  color: var(--sc-ink);
}
.sc-sidebar li.is-current > a svg { stroke: var(--sc-ink); }

.sc-sidebar svg {
  width: 22px;
  height: 22px;
  flex: 0 0 22px;
  stroke: var(--sc-ink);
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.sc-sidebar__label--section {
  display: block;
  padding: 0.9rem 0.8rem 0.25rem;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--sc-ink-soft);
  list-style: none;
}

/* Sticky cart + account, pinned top-right on every viewport */
.sc-topbar {
  position: fixed;
  top: calc(10px + var(--wp-admin--admin-bar--height, 0px));
  right: 14px;
  z-index: 1002;
  display: flex;
  gap: 4px;
  background: var(--sc-white);
  border: 1.5px solid #f0e4da;
  border-radius: 999px;
  padding: 5px;
  box-shadow: 0 4px 16px rgba(70, 48, 60, 0.12);
}
.sc-topbar a,
.sc-topbar__search {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  color: var(--sc-ink);
  background: transparent !important;
  background-color: transparent !important;
  border: 0 !important;
  padding: 0;
  cursor: pointer;
}
.sc-topbar a:hover,
.sc-topbar__search:hover { background: var(--sc-peach-soft) !important; color: var(--sc-ink); }
.sc-topbar svg {
  width: 22px;
  height: 22px;
  stroke: var(--sc-ink);
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.sc-topbar__cart-badge {
  position: absolute;
  top: -3px;
  right: -3px;
  background: var(--sc-peach);
  color: var(--sc-ink);
  border-radius: 999px;
  font-size: 0.68rem;
  min-width: 1.25rem;
  height: 1.25rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 0.3rem;
  font-family: var(--sc-font-body);
  font-weight: 700;
}
.sc-topbar__cart-badge.is-empty { display: none; }

/* The topbar replaces Storefront's header cart + search + handheld-footer cart/account */
.site-header-cart { display: none !important; }
.site-header .site-search { display: none !important; }
.storefront-handheld-footer-bar { display: none !important; }
@media (max-width: 768px) {
  body { margin-bottom: 0 !important; }
}

/* Push the whole Storefront page right of the rail */
#page.site { margin-left: var(--sc-rail); transition: margin-left 0.18s ease; }

/* Collapsed rail (icons only): toggled on <html> by sidebar.js */
html.sc-collapsed .sc-sidebar { width: var(--sc-rail-slim); }
html.sc-collapsed #page.site  { margin-left: var(--sc-rail-slim); }
html.sc-collapsed .sc-sidebar a { justify-content: center; padding: 0.7rem 0; }
html.sc-collapsed .sc-sidebar .sc-label,
html.sc-collapsed .sc-sidebar__label--section { display: none; }

/* Tablet: start collapsed feel: narrower rail */
@media (max-width: 1024px) and (min-width: 769px) {
  .sc-sidebar { width: var(--sc-rail-slim); }
  #page.site  { margin-left: var(--sc-rail-slim); }
  .sc-sidebar a { justify-content: center; padding: 0.7rem 0; }
  .sc-sidebar .sc-label,
  .sc-sidebar__label--section,
  .sc-sidebar__toggle { display: none; }
}

/* Mobile drawer: burger button opens the off-canvas sidebar */
@media (max-width: 768px) {
  .sc-burger {
    position: fixed;
    top: calc(10px + var(--wp-admin--admin-bar--height, 0px));
    left: 14px;
    z-index: 1003;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    background: var(--sc-white) !important;
    border: 1.5px solid #f0e4da !important;
    border-radius: 999px !important;
    box-shadow: 0 4px 16px rgba(70, 48, 60, 0.12);
    padding: 0 !important;
  }
  .sc-burger span {
    position: absolute;
    width: 20px;
    height: 2px;
    border-radius: 999px;
    background: var(--sc-ink);
    transition: transform 0.2s ease, opacity 0.2s ease;
  }
  .sc-burger span:nth-child(1) { transform: translateY(-7px); }
  .sc-burger span:nth-child(3) { transform: translateY(7px); }
  .sc-burger:hover { background: var(--sc-peach-soft) !important; }
  .sc-burger.is-open span:nth-child(1) { transform: rotate(45deg); }
  .sc-burger.is-open span:nth-child(2) { opacity: 0; }
  .sc-burger.is-open span:nth-child(3) { transform: rotate(-45deg); }

  .sc-sidebar {
    display: flex;
    width: min(80vw, 300px);
    max-width: min(80vw, 300px);
    transform: translateX(-110%);
    z-index: 1004;
    box-shadow: 8px 0 24px rgba(70, 48, 60, 0.16);
  }
  html.sc-drawer-open .sc-sidebar { transform: translateX(0); }
  html.sc-drawer-open { overflow: hidden; }
  .sc-sidebar__toggle { display: none; }
  html.sc-collapsed .sc-sidebar {
    width: min(80vw, 300px);
    max-width: min(80vw, 300px);
  }
  html.sc-collapsed .sc-sidebar a {
    justify-content: flex-start;
    padding: 0.62rem 0.8rem;
  }
  html.sc-collapsed .sc-sidebar .sc-label,
  html.sc-collapsed .sc-sidebar__label--section { display: block; }
  #page.site  { margin-left: 0; }

  .sc-drawer-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1002;
    background: rgba(70, 48, 60, 0.4);
  }
  .sc-drawer-backdrop[hidden] { display: none !important; }
}

@media (min-width: 769px) {
  .sc-burger { display: none; }
}

/* Desktop: the sidebar replaces the horizontal menu (keep cart in header) */
@media (min-width: 769px) {
  .storefront-primary-navigation .main-navigation { display: none; }
}

/* ====================================================================
   3. WOOBLES-STYLE POLISH (soft, rounded, friendly)
   ==================================================================== */
.site-header { background-color: var(--sc-white) !important; }

/* Buttons: pill-shaped, peach */
.button, button, input[type="button"], input[type="submit"],
.woocommerce a.button,
.wp-block-button__link,
.added_to_cart,
.wc-block-components-button:not(.is-link) {
  background-color: var(--sc-peach) !important;
  border-color: var(--sc-peach) !important;
  color: var(--sc-ink) !important;
  border-radius: 999px !important;
  font-family: var(--sc-font-body);
  font-weight: 700;
  padding-left: 1.4em;
  padding-right: 1.4em;
}
.button:hover, button:hover, input[type="submit"]:hover,
.woocommerce a.button:hover,
.wp-block-button__link:hover,
.wc-block-components-button:not(.is-link):hover {
  background-color: var(--sc-peach-dark) !important;
  border-color: var(--sc-peach-dark) !important;
  color: var(--sc-ink) !important;
}

/* Product cards */
ul.products li.product,
.wc-block-grid__product,
li.wc-block-product {
  background: var(--sc-white);
  border-radius: var(--sc-radius);
  border: 1px solid #f0e4da;
  padding: 14px;
  box-shadow: 0 2px 10px rgba(70, 48, 60, 0.06);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
ul.products li.product:hover,
li.wc-block-product:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 18px rgba(70, 48, 60, 0.12);
}
ul.products li.product img,
.wc-block-grid__product img,
li.wc-block-product img {
  border-radius: calc(var(--sc-radius) - 6px);
}
ul.products li.product .price,
.wc-block-grid__product-price,
.wc-block-components-product-price {
  color: var(--sc-peach-deep);
  font-weight: 700;
  font-family: var(--sc-font-body);
}
ul.products li.product .woocommerce-loop-product__title,
.wc-block-components-product-title {
  font-size: 1rem;
  line-height: 1.35;
  text-align: left;
}
ul.products li.product .onsale {
  background-color: var(--sc-peach);
  border-radius: 999px;
  font-family: var(--sc-font-head);
}

/* Links */
a { color: var(--sc-peach-deep); }
a:hover { color: var(--sc-ink); }

/* Single product: make Add to Cart unmissable */
.single-product .single_add_to_cart_button {
  font-size: 1.15em;
  padding: 0.9em 2.2em;
}

/* Checkout blocks: round the panels, brand the place-order button */
.wc-block-components-checkout-step,
.wc-block-components-sidebar .wc-block-components-panel,
.wc-block-cart-items {
  border-radius: var(--sc-radius);
}
.wc-block-components-checkout-place-order-button {
  width: 100%;
  font-size: 1.1em;
}

/* Storefront handheld footer bar: brand it */
.storefront-handheld-footer-bar { background-color: var(--sc-peach); }
.storefront-handheld-footer-bar a { color: var(--sc-ink) !important; }

/* Tidy: hide the storefront credit  */
.site-info a[href*="woocommerce.com"] { opacity: 0.6; }

/* ====================================================================
   4. HOMEPAGE HERO: desktop fixes
   ==================================================================== */
/* Storefront caps page .entry-content to a narrow reading column: on the
   homepage the hero/sections should span the full shell instead */
.home .entry-content {
  max-width: none !important;
  width: 100% !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  float: none !important;
}
/* The hero has its own H1: hide the (now empty) page title header */
.home.page .site-main .entry-header { display: none; }
/* Let the hero breathe: full content width instead of a squeezed column */
.home .entry-content > .wp-block-cover .wp-block-cover__inner-container {
  max-width: min(1320px, 100%);
  width: 100%;
}
.home .entry-content > .wp-block-cover {
  padding: clamp(36px, 6vw, 56px) clamp(20px, 4vw, 48px) !important;
}
/* Fluid heading: never wraps awkwardly or overflows */
.home .wp-block-cover h1 {
  font-size: clamp(2.1rem, 3.2vw, 3.6rem) !important;
  max-width: 21ch;
}
.home .wp-block-cover .wp-block-columns { gap: 40px; }
@media (max-width: 900px) {
  .home .entry-content > .wp-block-cover { padding-left: 24px !important; padding-right: 24px !important; }
  .home .wp-block-cover h1 { max-width: none; }
}
/* Stop first-block cover from inheriting entry margins awkwardly */
.home .entry-content { margin-top: 0; }
.home .entry-content > * + * { margin-top: clamp(20px, 3.5vw, 36px); }
.home .entry-content > .wp-block-group {
  padding: clamp(28px, 5vw, 44px) clamp(18px, 4vw, 40px) !important;
}
.home .hero-product-img img { border-radius: 24px; }

/* ====================================================================
   5. FIND YOUR STITCHLING MATCH: quiz
   ==================================================================== */
.sc-quiz {
  max-width: 620px;
  margin: 0 auto;
  padding: 1.5rem 1.25rem 2.5rem;
  text-align: center;
  font-family: var(--sc-font-body);
}
.sc-quiz__dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-bottom: 1.75rem;
}
.sc-quiz__dots span {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--sc-peach-soft);
  transition: background 0.15s ease, transform 0.15s ease;
}
.sc-quiz__dots span.is-on { background: var(--sc-peach); transform: scale(1.15); }
.sc-quiz__step h2,
.sc-quiz__result h2 {
  font-family: var(--sc-font-head);
  font-size: 1.7rem;
  font-weight: 400;
  letter-spacing: 0.01em;
  margin-bottom: 1.5rem;
}
.sc-quiz__options {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.sc-quiz__options--grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
@media (max-width: 520px) { .sc-quiz__options--grid { grid-template-columns: 1fr; } }
.sc-quiz__options button {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 1.15rem 1rem !important;
  background: var(--sc-white) !important;
  color: var(--sc-ink) !important;
  border: 2px solid var(--sc-peach-soft) !important;
  border-radius: var(--sc-radius) !important;
  font-family: var(--sc-font-body);
  font-size: 1rem;
  font-weight: 700;
  min-height: 56px;
  cursor: pointer;
  transition: transform 0.12s ease, border-color 0.12s ease, box-shadow 0.12s ease;
}
.sc-quiz__options button span { font-size: 1.9rem; line-height: 1; }
.sc-quiz__options button:hover {
  transform: translateY(-2px);
  border-color: var(--sc-peach) !important;
  box-shadow: 0 6px 16px rgba(70, 48, 60, 0.12);
  background: var(--sc-white) !important;
  color: var(--sc-ink) !important;
}
.sc-quiz__club-note {
  background: var(--sc-peach-soft);
  border-radius: var(--sc-radius);
  padding: 0.85rem 1.1rem;
  font-size: 0.92rem;
  margin-bottom: 1rem;
}
.sc-quiz__kit img {
  max-height: 260px;
  width: auto;
  margin: 0 auto 0.75rem;
  border-radius: var(--sc-radius);
}
.sc-quiz__kit h3 { font-family: var(--sc-font-head); font-size: 1.35rem; margin-bottom: 0.25rem; }
.sc-quiz__kit-price { font-weight: 700; color: var(--sc-peach-deep); font-size: 1.1rem; }
.sc-quiz__kit-skill { font-size: 0.95rem; color: var(--sc-ink-soft); max-width: 40ch; margin: 0.5rem auto 1.25rem; }
.sc-quiz__kit-actions { display: flex; flex-direction: column; gap: 10px; align-items: center; }
.sc-quiz__buy {
  background: var(--sc-peach);
  color: var(--sc-ink) !important;
  border-radius: 999px;
  padding: 0.9em 2em;
  font-family: var(--sc-font-body);
  font-weight: 700;
  font-size: 1.05rem;
  text-decoration: none;
  display: inline-block;
}
.sc-quiz__buy:hover { background: var(--sc-peach-dark); }
.sc-quiz__meet { font-size: 0.92rem; color: var(--sc-ink-soft) !important; }
.sc-quiz__back,
.sc-quiz__restart {
  margin-top: 1.5rem;
  background: none !important;
  border: none !important;
  color: var(--sc-ink-soft) !important;
  font-size: 0.9rem;
  cursor: pointer;
  padding: 0.4rem 0.9rem !important;
}
.sc-quiz__back:hover,
.sc-quiz__restart:hover { color: var(--sc-ink) !important; background: var(--sc-peach-soft) !important; border-radius: 999px !important; }

/* ====================================================================
   6. CARDS & STEPPER
   ==================================================================== */
.sc-hidden { display: none !important; }

.sc-card-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 4px 4px;
  margin-top: auto;
  text-align: left;
}
.sc-card-buy {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  flex: 0 0 auto;
}

.sc-card-price {
  color: #b3591f;
  font-family: var(--sc-font-head);
  font-size: 1.35rem;
  font-weight: 400;
  letter-spacing: 0.01em;
  line-height: 1.1;
}
.sc-card-price .price,
.sc-card-price .wc-block-components-product-price {
  margin: 0;
  color: inherit;
  font-family: inherit;
  font-size: inherit;
  font-weight: inherit;
}
.sc-card-price del {
  color: var(--sc-ink-soft);
  font-size: 0.85em;
  opacity: 1;
}
.sc-card-price ins {
  text-decoration: none;
}

.sc-add {
  min-width: 64px;
  min-height: 48px;
  padding: 8px 26px !important;
  border: 0 !important;
  border-radius: 999px !important;
  background: var(--sc-peach) !important;
  color: var(--sc-ink) !important;
  font-family: var(--sc-font-body);
  font-weight: 800;
  font-size: 1.7rem !important;
  letter-spacing: 0.04em;
  line-height: 1;
}
.sc-add:hover {
  background: var(--sc-peach-dark) !important;
  color: var(--sc-ink) !important;
  transform: translateY(-1px);
}
.sc-add.is-busy,
.sc-stepper.is-busy {
  opacity: 0.6;
  pointer-events: none;
}

.sc-stepper {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  border-radius: 999px;
  background: var(--sc-peach);
  color: var(--sc-ink);
  overflow: hidden;
}
.sc-stepper__dec,
.sc-stepper__inc {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  min-width: 44px;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  color: var(--sc-ink) !important;
  font-family: var(--sc-font-body);
  font-size: 1.2rem;
  font-weight: 800;
  line-height: 1;
}
.sc-stepper__dec:hover,
.sc-stepper__inc:hover {
  background: rgba(70, 48, 60, 0.08) !important;
  color: var(--sc-ink) !important;
}
.sc-stepper__qty {
  min-width: 1.5ch;
  color: var(--sc-ink);
  font-family: var(--sc-font-body);
  font-weight: 800;
  text-align: center;
}

ul.products,
.wc-block-product-template,
.wc-block-grid__products {
  gap: 24px;
}
.wc-block-product-template,
.wc-block-grid__products {
  display: flex !important;
  flex-wrap: wrap;
  justify-content: center;
  align-items: stretch;
  padding-left: 0;
}
ul.products {
  display: grid;
  /* auto-fit + capped track width: cards keep a sane size on wide screens
     and partial rows center instead of leaving empty tracks trailing */
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 320px));
  justify-content: center;
}
ul.products::before,
ul.products::after {
  content: none;
}
ul.products li.product,
li.wc-block-product,
.wc-block-grid__product {
  display: flex;
  flex-direction: column;
}
li.wc-block-product,
.wc-block-grid__product,
.wc-block-grid.has-2-columns .wc-block-grid__product,
.wc-block-grid.has-3-columns .wc-block-grid__product,
.wc-block-grid.has-4-columns .wc-block-grid__product {
  flex: 0 1 320px !important;
  max-width: min(100%, 320px) !important;
  width: 100%;
  margin: 0 !important;
}
ul.products li.product {
  width: auto !important;
  margin: 0 !important;
}

/* ====================================================================
   7. SEARCH MODAL
   ==================================================================== */
.sc-search-modal[hidden],
[hidden] {
  display: none !important;
}

.sc-search-modal {
  position: fixed;
  inset: 0;
  z-index: 1100;
}
.sc-search-modal__backdrop {
  position: fixed;
  inset: 0;
  background: rgba(70, 48, 60, 0.45);
}
.sc-search-modal__panel {
  position: relative;
  z-index: 1;
  width: min(92vw, 560px);
  max-width: 560px;
  margin: 18vh auto 0;
  padding: 18px;
  border-radius: 24px;
  background: var(--sc-white);
  box-shadow: 0 18px 48px rgba(70, 48, 60, 0.22);
}
.sc-search-modal__panel form {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
}
.sc-search-modal__input {
  flex: 1 1 auto;
  min-width: 0;
  border: 2px solid #ecddd7;
  border-radius: 999px;
  padding: 14px 22px;
  color: var(--sc-ink);
  font-family: var(--sc-font-body);
  font-size: 1rem;
}
.sc-search-modal__input:focus {
  border-color: var(--sc-peach-dark);
  outline: 0;
  box-shadow: 0 0 0 3px rgba(179, 89, 31, 0.24);
}
.sc-search-modal__go,
.sc-search-modal__close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px !important;
  color: var(--sc-ink) !important;
}
.sc-search-modal__go {
  width: 48px;
  height: 48px;
  min-width: 48px;
  padding: 0 !important;
  border: 0 !important;
  background: var(--sc-peach) !important;
}
.sc-search-modal__go svg {
  width: 22px;
  height: 22px;
  stroke: var(--sc-ink);
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.sc-search-modal__close {
  position: absolute;
  top: -14px;
  right: -14px;
  width: 44px;
  height: 44px;
  padding: 0 !important;
  border: 0 !important;
  background: var(--sc-white) !important;
  box-shadow: 0 4px 14px rgba(70, 48, 60, 0.16);
}
.sc-search-modal__close:hover {
  background: var(--sc-peach-soft) !important;
}

@media (prefers-reduced-motion: no-preference) {
  .sc-search-modal.is-open .sc-search-modal__panel {
    animation: sc-modal-in 160ms ease-out both;
  }
  @keyframes sc-modal-in {
    from { opacity: 0; transform: scale(0.96); }
    to { opacity: 1; transform: scale(1); }
  }
}

/* ====================================================================
   8. CHECKOUT / SHIPPING
   ==================================================================== */
.wc-block-components-shipping-rates-control .wc-block-components-radio-control__option:only-child {
  padding: 12px 16px !important;
  border-radius: 12px;
  background: #f2f9f2;
}
.wc-block-components-shipping-rates-control .wc-block-components-radio-control__option:only-child input.wc-block-components-radio-control__input {
  display: none;
}
.wc-block-components-shipping-rates-control .wc-block-components-radio-control__option:only-child label::before {
  content: "✓ ";
  color: #2e7d32;
  font-weight: 800;
}

/* ====================================================================
   8b. PRODUCT PAGE TRUST STRIP + SHOP HEADER
   ==================================================================== */
.sc-trust {
  list-style: none;
  margin: 16px 0 0;
  padding: 14px 18px;
  background: var(--sc-cream);
  border: 1.5px solid #f0e4da;
  border-radius: 12px;
  display: grid;
  gap: 7px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--sc-ink-soft);
}
.sc-trust li { margin: 0; }

.sc-shop-sub {
  max-width: 660px;
  color: var(--sc-ink-soft);
  font-weight: 600;
  font-size: 0.95rem;
  margin: 0 0 20px;
}

/* ====================================================================
   9. CONDENSE & A11Y
   ==================================================================== */
/* High-res: let the shell grow fluidly (Storefront caps .col-full ~1064px,
   which looks lost on 1440p/4K). Content scales up to 1520px, then centers. */
.col-full {
  max-width: min(1520px, 94vw);
}
@media (min-width: 1920px) {
  html { font-size: 112.5%; } /* 18px base: rem-sized type grows gently */
}
/* Homepage product/category rows: don't let 2-3 cards balloon across the
   full wide shell: cap card width, center partial rows */
.home ul.products,
.home .wc-block-product-template,
.home .wc-block-grid__products {
  max-width: 1240px;
  margin-left: auto;
  margin-right: auto;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 320px)) !important;
  justify-content: center;
}

.entry-content > p,
.entry-content .wp-block-group p {
  max-width: 68ch;
}

.site-footer {
  padding-top: 1.5rem;
  padding-bottom: 1.5rem;
}

:focus-visible {
  outline: 3px solid #b3591f;
  outline-offset: 2px;
}
.sc-add:focus-visible,
.sc-stepper button:focus-visible,
.sc-burger:focus-visible,
.sc-search-modal__go:focus-visible {
  outline-color: var(--sc-ink);
}

@media (max-width: 768px) {
  ul.products,
  .wc-block-product-template,
  .wc-block-grid__products {
    gap: 16px;
  }
  .home .entry-content > .wp-block-cover {
    padding: clamp(32px, 8vw, 44px) 20px !important;
  }
  .sc-topbar {
    right: 14px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ====================================================================
   10. WHITE CANVAS + F-SHAPE
   ==================================================================== */
html {
  background-color: var(--sc-white);
}

body {
  background-color: var(--sc-white);
}

#page.site {
  background-color: var(--sc-white) !important;
}

.site-content,
.content-area,
.site-main {
  background: transparent !important;
}

.site-header,
.storefront-primary-navigation,
.woocommerce-breadcrumb,
.hentry,
.entry-content,
.wp-block-cover:not(.has-background),
.wp-block-group:not(.has-background) {
  background-color: transparent !important;
}

.sc-sidebar,
.sc-topbar,
.sc-burger,
.sc-search-modal__panel,
ul.products li.product,
.wc-block-grid__product,
li.wc-block-product,
.sc-quiz__options button {
  background-color: var(--sc-white) !important;
}

.sc-trust,
.sc-quiz__club-note {
  background-color: var(--sc-cream) !important;
}

@media (min-width: 769px) {
  .col-full {
    width: auto;
    max-width: none;
    margin-left: clamp(48px, 3vw, 64px);
    margin-right: clamp(48px, 3vw, 64px);
    padding-left: 0;
    padding-right: 0;
  }

  /* Storefront's classic wide-align hack (.storefront-align-wide .alignwide
     { margin: calc(25% - 25vw); max-width: 1000% }) hits alignwide/alignfull
     at ANY depth; with the full-width F-shape layout those viewport-based
     negative margins bleed under the sidebar and off-viewport (cart block,
     FAQ/About bands). Neutralize them everywhere in content. */
  .entry-content .alignwide,
  .entry-content .alignfull,
  .hentry .entry-content > .wp-block-woocommerce-cart.alignwide,
  .hentry .entry-content > .wp-block-woocommerce-checkout.alignwide {
    margin-left: 0 !important;
    margin-right: 0 !important;
    max-width: 100% !important;
  }

  .hentry .col-full {
    margin-left: 0;
    margin-right: 0;
  }

  .home .entry-content > .wp-block-cover {
    padding-left: clamp(16px, 2vw, 24px) !important;
  }

  .home .entry-content > .wp-block-cover .wp-block-cover__inner-container {
    padding-left: 0 !important;
  }

  .home .entry-content > .wp-block-cover,
  .home .entry-content > .wp-block-cover .wp-block-cover__inner-container,
  .home .entry-content > .wp-block-cover .wp-block-column:first-child,
  .home .entry-content > .wp-block-cover h1,
  .home .entry-content > .wp-block-cover p,
  .home .entry-content > .wp-block-cover .has-text-align-center {
    text-align: left !important;
  }

  .home .entry-content > .wp-block-cover .wp-block-cover__inner-container,
  .home .entry-content > .wp-block-cover .wp-block-column:first-child {
    margin-left: 0;
  }

  .home .entry-content > .wp-block-cover .wp-block-buttons {
    justify-content: flex-start !important;
  }

  .home .entry-content > .wp-block-group {
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  .home .entry-content > .wp-block-group > .wp-block-group__inner-container {
    width: 100%;
    max-width: none;
    margin-left: 0;
    margin-right: 0;
  }

  .home .entry-content h2,
  .home .entry-content > .wp-block-group p,
  .woocommerce-products-header,
  .woocommerce-products-header__title,
  .sc-shop-sub,
  .single-product div.product .product_title,
  .single-product div.product .summary,
  .page:not(.home) .entry-header,
  .page:not(.home) .entry-title,
  .page:not(.home) .entry-content > h2,
  .page:not(.home) .entry-content > p,
  .sc-quiz__step h2,
  .sc-quiz__result h2 {
    text-align: left !important;
  }

  .home .entry-content h2,
  .woocommerce-products-header__title,
  .single-product div.product .product_title,
  .page:not(.home) .entry-title,
  .page:not(.home) .entry-content > h2,
  .sc-quiz__step h2,
  .sc-quiz__result h2 {
    margin-left: 0;
    margin-right: auto;
  }

  .entry-content > p,
  .entry-content .wp-block-group p,
  .sc-shop-sub {
    margin-left: 0;
    margin-right: auto;
  }

  .sc-quiz {
    margin-left: 0;
    margin-right: auto;
    text-align: left;
  }

  .sc-quiz__dots,
  .sc-quiz__kit-actions {
    justify-content: flex-start;
    align-items: flex-start;
  }
}

/* ====================================================================
   11. CONTRAST FIXES (WCAG AA)
   ==================================================================== */
/* Hero badge: white on peach was 2.25: use ink on peach (5.3:1). */
.hero-badge {
  color: var(--sc-ink) !important;
}

/* Complianz cookie banner: peach-on-pale links/buttons were 2.2. */
.cmplz-cookiebanner {
  color: var(--sc-ink) !important;
}
.cmplz-cookiebanner .cmplz-title,
.cmplz-cookiebanner .cmplz-message,
.cmplz-cookiebanner .cmplz-message a,
.cmplz-cookiebanner a.cmplz-link,
.cmplz-cookiebanner .cmplz-categories .cmplz-category .cmplz-category-header,
.cmplz-cookiebanner .cmplz-btn.cmplz-manage-options {
  color: var(--sc-ink) !important;
}
.cmplz-cookiebanner .cmplz-btn.cmplz-accept,
.cmplz-cookiebanner .cmplz-btn.cmplz-deny {
  color: var(--sc-ink) !important;
}

/* ====================================================================
   12. MINICART DRAWER
   ==================================================================== */
.sc-minicart {
  position: fixed;
  inset: 0;
  z-index: 1200;
}
.sc-minicart__backdrop {
  position: fixed;
  inset: 0;
  background: rgba(70, 48, 60, 0.45);
}
.sc-minicart__panel {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 1;
  width: min(92vw, 400px);
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 22px;
  background: var(--sc-white);
  border-radius: 24px 0 0 24px;
  box-shadow: -12px 0 40px rgba(70, 48, 60, 0.2);
  overflow-y: auto;
  overscroll-behavior: contain;
}
@media (prefers-reduced-motion: no-preference) {
  .sc-minicart.is-open .sc-minicart__panel {
    animation: sc-minicart-in 200ms ease-out both;
  }
  @keyframes sc-minicart-in {
    from { transform: translateX(40px); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
  }
}
.sc-minicart__panel.is-busy { opacity: 0.7; pointer-events: none; }
html.sc-minicart-open { overflow: hidden; }

.sc-minicart__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.sc-minicart__head h2 {
  font-family: var(--sc-font-head);
  font-size: 1.5rem;
  margin: 0;
}
.sc-minicart__count {
  font-family: var(--sc-font-body);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--sc-ink-soft);
}
.sc-minicart__close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  min-width: 44px;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 999px !important;
  background: var(--sc-peach-soft) !important;
  color: var(--sc-ink) !important;
}
.sc-minicart__close:hover { background: var(--sc-peach) !important; }
.sc-minicart__close svg {
  width: 20px;
  height: 20px;
  stroke: var(--sc-ink);
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
}

.sc-minicart__ship {
  padding: 12px 16px;
  border-radius: var(--sc-radius);
  background: var(--sc-peach-soft);
}
.sc-minicart__ship.is-free { background: #eaf5ea; }
.sc-minicart__ship-msg {
  margin: 0 0 8px;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--sc-ink);
}
.sc-minicart__ship-track {
  display: block;
  height: 8px;
  border-radius: 999px;
  background: rgba(70, 48, 60, 0.1);
  overflow: hidden;
}
.sc-minicart__ship-fill {
  display: block;
  height: 100%;
  width: 0;
  border-radius: 999px;
  background: var(--sc-peach);
  transition: width 0.3s ease;
}
.sc-minicart__ship.is-free .sc-minicart__ship-fill { background: #3e7d4f; }

.sc-minicart__items {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.sc-minicart__item {
  display: flex;
  align-items: center;
  gap: 12px;
}
.sc-minicart__item img {
  width: 64px;
  height: 64px;
  min-width: 64px;
  object-fit: cover;
  border-radius: 12px;
}
.sc-minicart__item-info { flex: 1 1 auto; min-width: 0; }
.sc-minicart__item-name {
  margin: 0 0 6px;
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--sc-ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sc-minicart__item-controls {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  border-radius: 999px;
  background: var(--sc-peach-soft);
}
.sc-minicart__step {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  min-width: 34px;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 999px !important;
  background: transparent !important;
  color: var(--sc-ink) !important;
  font-size: 1.05rem;
  font-weight: 800;
  line-height: 1;
}
.sc-minicart__step:hover { background: var(--sc-peach) !important; }
.sc-minicart__item-qty {
  min-width: 1.5ch;
  text-align: center;
  font-size: 0.9rem;
  font-weight: 800;
  color: var(--sc-ink);
}
.sc-minicart__item-price {
  font-family: var(--sc-font-head);
  font-size: 1.05rem;
  color: var(--sc-peach-deep);
  white-space: nowrap;
}

.sc-minicart__empty {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  color: var(--sc-ink-soft);
  font-weight: 600;
  text-align: center;
}

.sc-minicart__foot {
  display: flex;
  flex-direction: column;
  gap: 12px;
  border-top: 1.5px solid #f0e4da;
  padding-top: 16px;
}
.sc-minicart__subtotal {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-weight: 700;
  color: var(--sc-ink);
}
.sc-minicart__subtotal strong {
  font-family: var(--sc-font-head);
  font-size: 1.2rem;
  color: var(--sc-peach-deep);
}
.sc-minicart__checkout {
  display: block;
  text-align: center;
  background: var(--sc-peach) !important;
  color: var(--sc-ink) !important;
  border-radius: 999px !important;
  padding: 0.95em 1.5em;
  font-family: var(--sc-font-body);
  font-weight: 800;
  font-size: 1.05rem;
  text-decoration: none;
}
.sc-minicart__checkout:hover { background: var(--sc-peach-dark) !important; }
.sc-minicart__keep {
  background: none !important;
  border: none !important;
  color: var(--sc-ink-soft) !important;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  padding: 0.4rem !important;
}
.sc-minicart__keep:hover { color: var(--sc-ink) !important; }

/* ====================================================================
   13. ORDER CONFIRMATION CLUB WELCOME
   ==================================================================== */
.sc-club-welcome {
  --sc-club-accent: var(--sc-peach-deep);
  --sc-club-soft: var(--sc-peach-soft);
  background: var(--sc-club-soft);
  border: 2px solid var(--sc-club-accent);
  border-radius: 24px;
  padding: 28px 24px;
  margin: 0 0 28px;
  text-align: center;
}
.sc-club-welcome__emoji {
  display: block;
  font-size: 2.2rem;
  line-height: 1;
  margin-bottom: 10px;
}
.sc-club-welcome h2 {
  font-family: var(--sc-font-head);
  color: var(--sc-club-accent);
  font-size: clamp(1.7rem, 4vw, 2.3rem);
  margin: 0 0 8px;
}
.sc-club-welcome p {
  margin: 0;
  color: var(--sc-ink);
  font-weight: 600;
}

