/*
 * Cedar & Sage Rituals — Brand Palette Override
 *
 * Loaded after vite.css. Overrides the Tailwind/shadcn CSS custom
 * property base with the approved brand palette. Because all colours
 * in the templates reference hsl(var(--token)), updating :root here
 * cascades to every bg-*, text-*, border-* utility automatically.
 *
 * HSL values are written without the hsl() wrapper — Tailwind's pattern.
 *
 * Approved hex reference
 * ──────────────────────────────────────────────────────────────────
 *   #e6e5de  main background
 *   #2f3d3b  primary headings / foreground          ~9:1 on bg
 *   #3d4c46  main body text                         ~7:1 on bg
 *   #4f685a  button hover
 *   #5d655a  secondary / supporting text            ~4.7:1 on bg (WCAG AA)
 *   #618171  sage / primary-link green
 *   #72897e  medium sage
 *   #7d9889  light sage
 *   #826f55  warm brown label text                  ~3.2:1 on bg
 *   #bab8a7  borders / dividers
 *   #c1a67f  warm clay accent
 *   #a6a493  placeholder / ghost text only          ~1.9:1 — do NOT use for readable text
 *
 * TEXT CONTRAST HIERARCHY
 * ──────────────────────────────────────────────────────────────────
 *   --foreground        #2f3d3b   headings, page titles, primary labels
 *   --text-body         #3d4c46   main body copy, product descriptions
 *   --muted-foreground  #5d655a   supporting text, prices, helper copy (WCAG AA)
 *   --text-label        #826f55   small labels, tracking text, footnotes
 *   placeholder only    #a6a493   input placeholders — never for readable text
 */

/* ================================================================
   BRAND TOKENS — :root override
   ================================================================ */

:root {
  /* ── Surfaces ─────────────────────────────────────────────── */
  --background:  53 14% 89%;   /* #e6e5de */
  --card:        50 10% 95%;   /* near-white card surface */
  --popover:     53 14% 89%;   /* matches background */
  --secondary:   54 10% 84%;   /* warm-gray for inputs & thumbnails */
  --muted:       54 10% 84%;

  /* ── Text ─────────────────────────────────────────────────── */
  --foreground:            171 13% 21%;   /* #2f3d3b — headings, primary labels */
  --card-foreground:       171 13% 21%;
  --popover-foreground:    171 13% 21%;
  --secondary-foreground:  171 13% 21%;

  /*
   * --muted-foreground is used site-wide for supporting text.
   * Raised from #a6a493 (1.9:1, WCAG fail) to #5d655a (4.7:1, WCAG AA pass).
   * Use --text-label for non-critical small labels.
   */
  --muted-foreground:  104 8% 37%;   /* #5d655a — supporting text, WCAG AA */

  /* Extra text tokens — referenced in overrides below */
  --text-body:   156 11% 27%;   /* #3d4c46 — main body copy */
  --text-label:   35 21% 42%;   /* #826f55 — small labels, footnotes */
  --text-ghost:   54 10% 61%;   /* #a6a493 — placeholders only */

  /* ── Primary — sage green (links, hover, ring) ─────────────── */
  --primary:            150 14% 44%;   /* #618171 */
  --primary-foreground:  53 14% 89%;   /* #e6e5de */

  /* ── Accent — warm clay ───────────────────────────────────── */
  --accent:             36 35% 63%;   /* #c1a67f */
  --accent-foreground: 171 13% 21%;   /* dark text on clay */

  /* ── Borders & inputs ─────────────────────────────────────── */
  --border:  54 12% 69%;   /* #bab8a7 */
  --input:   54 12% 69%;

  /* ── Focus ring ───────────────────────────────────────────── */
  --ring:   146 14% 36%;   /* #4f685a */

  /* ── Named brand tokens ───────────────────────────────────── */
  --forest:            156 11% 27%;   /* #3d4c46 — CTA buttons */
  --forest-foreground:  53 14% 89%;   /* #e6e5de — text on forest */
  --cream:              53 14% 89%;   /* #e6e5de */
  --sand:               54 12% 69%;   /* #bab8a7 */
  --sage:              150 14% 44%;   /* #618171 */
  --clay:               36 35% 63%;   /* #c1a67f */
}


/* ================================================================
   GLOBAL BASE
   ================================================================ */

body {
  background-color: hsl(var(--background));
  color: hsl(var(--foreground));
}


/* ================================================================
   BUTTON HOVER — explicit brand hover (#4f685a) for .bg-forest
   Tailwind's /90 opacity modifier gives close results on-page, but
   an explicit solid colour is more consistent across all surfaces
   (product images, cart drawer, modals).
   ================================================================ */

a.bg-forest:hover,
button.bg-forest:hover {
  background-color: hsl(146 14% 36%) !important; /* #4f685a */
}

/* Don't override disabled state */
button.bg-forest:disabled:hover,
button.bg-forest[aria-disabled="true"]:hover {
  background-color: hsl(var(--forest)) !important;
}


/* ================================================================
   HEADER — logo CSS
   WordPress outputs custom-logo as:
     <a class="custom-logo-link" rel="home">
       <img class="custom-logo" src="…" alt="Site Name">
     </a>
   When delivered via the topbar-brand widget area the wrapper may
   vary, so both the semantic class and generic img are targeted.
   ================================================================ */

/* Custom-logo link in header */
#sage-header .custom-logo-link {
  display: flex;
  align-items: center;
  line-height: 1;
  text-decoration: none;
}

/* Cap logo height — never distort proportions */
#sage-header .custom-logo,
#sage-header .custom-logo-link img {
  max-height: 40px;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
}

/* Strip default widget box model when logo is inside a widget area */
#sage-header .widget {
  margin: 0;
  padding: 0;
}

#sage-header .widget img {
  max-height: 40px;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
}

/* Footer brand logo (via widget or custom-logo) */
footer .custom-logo-link {
  display: inline-flex;
  align-items: center;
}

footer .custom-logo,
footer .widget img {
  max-height: 32px;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
}


/* ================================================================
   WOOCOMMERCE — harmonise WC default styles with brand palette
   WC styles (woocommerce-general, -layout, -smallscreen) are only
   dequeued on the front page; on shop, account, cart, and checkout
   they remain active and need brand overrides.
   ================================================================ */

/* ── Primary buttons ─────────────────────────────────────────── */
.woocommerce a.button,
.woocommerce button.button,
.woocommerce input.button,
.woocommerce #respond input#submit,
.woocommerce-cart .wc-proceed-to-checkout a.checkout-button {
  background-color: hsl(var(--forest)) !important;
  color: hsl(var(--forest-foreground)) !important;
  border: none !important;
  border-radius: 0 !important;
  font-family: var(--font-body, sans-serif) !important;
  font-size: 0.75rem !important;
  letter-spacing: 0.1em !important;
  text-transform: uppercase !important;
  padding: 0.875rem 1.5rem !important;
  transition: background-color 0.2s ease !important;
  box-shadow: none !important;
}

.woocommerce a.button:hover,
.woocommerce button.button:hover,
.woocommerce input.button:hover,
.woocommerce #respond input#submit:hover,
.woocommerce-cart .wc-proceed-to-checkout a.checkout-button:hover {
  background-color: hsl(146 14% 36%) !important; /* #4f685a */
  color: hsl(var(--forest-foreground)) !important;
}

/* ── Secondary / outlined buttons ───────────────────────────── */
.woocommerce a.button.alt,
.woocommerce button.button.alt,
.woocommerce input.button.alt {
  background-color: hsl(var(--secondary)) !important;
  color: hsl(var(--foreground)) !important;
  border: 1px solid hsl(var(--border)) !important;
}

.woocommerce a.button.alt:hover,
.woocommerce button.button.alt:hover,
.woocommerce input.button.alt:hover {
  background-color: hsl(var(--border)) !important;
}

/* ── Form inputs ─────────────────────────────────────────────── */
.woocommerce form .form-row input.input-text,
.woocommerce form .form-row textarea,
.woocommerce form .form-row select,
.woocommerce-page form .form-row input.input-text,
.woocommerce-page form .form-row select {
  background-color: hsl(var(--secondary) / 0.5);
  border: 1px solid hsl(var(--border));
  border-radius: 0;
  color: hsl(var(--foreground));
  font-family: var(--font-body, sans-serif);
  font-size: 0.8125rem;
  padding: 0.75rem 1rem;
  box-shadow: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.woocommerce form .form-row input.input-text:focus,
.woocommerce form .form-row textarea:focus,
.woocommerce form .form-row select:focus {
  border-color: hsl(var(--ring));
  box-shadow: 0 0 0 1px hsl(var(--ring) / 0.3);
  outline: none;
}

/* ── Form labels ─────────────────────────────────────────────── */
.woocommerce form .form-row label {
  color: hsl(var(--muted-foreground));
  font-family: var(--font-body, sans-serif);
  font-size: 0.6875rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* ── Notices ─────────────────────────────────────────────────── */
.woocommerce-message,
.woocommerce-info {
  background-color: hsl(var(--secondary));
  color: hsl(var(--foreground));
  border-top-color: hsl(var(--sage)) !important;
  font-family: var(--font-body, sans-serif);
}

.woocommerce-error {
  background-color: hsl(var(--secondary));
  color: hsl(var(--foreground));
  border-top-color: #c0392b !important;
  font-family: var(--font-body, sans-serif);
}

/* ── Shop table (cart & order review) ───────────────────────── */
.woocommerce table.shop_table {
  border: 1px solid hsl(var(--border));
  border-radius: 0;
  font-family: var(--font-body, sans-serif);
  font-size: 0.875rem;
}

.woocommerce table.shop_table thead {
  background-color: hsl(var(--secondary));
  color: hsl(var(--foreground));
}

.woocommerce table.shop_table thead th {
  font-family: var(--font-heading, serif);
  font-size: 0.6875rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 400;
  color: hsl(var(--foreground));
  border-bottom: 1px solid hsl(var(--border));
  padding: 0.75rem 1rem;
}

.woocommerce table.shop_table td {
  border-top: 1px solid hsl(var(--border));
  padding: 0.875rem 1rem;
  color: hsl(var(--foreground));
  vertical-align: middle;
}

.woocommerce table.shop_table .cart-subtotal td,
.woocommerce table.shop_table .order-total td {
  background-color: hsl(var(--secondary) / 0.5);
}

/* ── Prices ──────────────────────────────────────────────────── */
.woocommerce .price,
.woocommerce-Price-amount,
.woocommerce .amount {
  color: hsl(var(--foreground));
  font-family: var(--font-body, sans-serif);
}

/* Price inside Add to Cart button — inherit button's light text */
.sage-quick-add .woocommerce-Price-amount,
.sage-quick-add .woocommerce-Price-currencySymbol {
  color: inherit;
}

.woocommerce del .woocommerce-Price-amount {
  color: hsl(var(--muted-foreground));
}

.woocommerce ins .woocommerce-Price-amount {
  color: hsl(var(--foreground));
  text-decoration: none;
}

/* ── Account navigation ──────────────────────────────────────── */
.woocommerce-account .woocommerce-MyAccount-navigation ul {
  list-style: none;
  padding: 0;
  margin: 0 0 1.5rem;
}

.woocommerce-account .woocommerce-MyAccount-navigation li a {
  display: block;
  font-family: var(--font-body, sans-serif);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: hsl(var(--muted-foreground));
  padding: 0.5rem 0;
  border-bottom: 1px solid hsl(var(--border));
  text-decoration: none;
  transition: color 0.2s ease;
}

.woocommerce-account .woocommerce-MyAccount-navigation li a:hover,
.woocommerce-account .woocommerce-MyAccount-navigation li.is-active a {
  color: hsl(var(--foreground));
}

.woocommerce-account .woocommerce-MyAccount-navigation li.is-active a {
  font-weight: 500;
}

/* ── Account section headings ───────────────────────────────── */
.woocommerce-account h2,
.woocommerce-account h3 {
  font-family: var(--font-heading, serif);
  font-weight: 400;
  color: hsl(var(--foreground));
  letter-spacing: 0.02em;
}

/* ── Account order table ─────────────────────────────────────── */
.woocommerce-account table.woocommerce-orders-table {
  border: 1px solid hsl(var(--border));
  font-family: var(--font-body, sans-serif);
  font-size: 0.875rem;
  width: 100%;
}

.woocommerce-account table.woocommerce-orders-table th {
  background-color: hsl(var(--secondary));
  color: hsl(var(--foreground));
  font-family: var(--font-heading, serif);
  font-weight: 400;
  font-size: 0.6875rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  border-bottom: 1px solid hsl(var(--border));
  padding: 0.75rem 1rem;
}

.woocommerce-account table.woocommerce-orders-table td {
  border-top: 1px solid hsl(var(--border));
  padding: 0.75rem 1rem;
  color: hsl(var(--foreground));
}


/* ================================================================
   SHOP ARCHIVE — filter / sorting bar
   ================================================================ */

.sage-filter-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
  padding: 0.75rem 0 1rem;
  border-bottom: 1px solid hsl(var(--border));
  margin-bottom: 1.5rem;
}

.woocommerce-result-count {
  font-family: var(--font-body, sans-serif);
  font-size: 0.75rem;
  color: hsl(var(--muted-foreground));
  letter-spacing: 0.05em;
  margin: 0;
}

.woocommerce-ordering select {
  font-family: var(--font-body, sans-serif);
  font-size: 0.75rem;
  color: hsl(var(--foreground));
  background-color: transparent;
  border: 1px solid hsl(var(--border));
  padding: 0.4rem 0.75rem;
  border-radius: 0;
  cursor: pointer;
}

.woocommerce-ordering select:focus {
  outline: none;
  border-color: hsl(var(--ring));
  box-shadow: 0 0 0 1px hsl(var(--ring) / 0.3);
}


/* ================================================================
   SINGLE PRODUCT — gallery thumbnail active state
   ================================================================ */

.sage-thumb-btn.is-active {
  border-bottom-color: hsl(var(--foreground));
  opacity: 1;
}


/* ================================================================
   PAGE / POST CONTENT — legal, info, about pages
   ================================================================ */

.sage-page-content,
.entry-content,
.page-content {
  color: hsl(var(--foreground));
  font-family: var(--font-body, sans-serif);
  font-size: 0.9375rem;
  line-height: 1.75;
}

.sage-page-content h1, .entry-content h1,
.sage-page-content h2, .entry-content h2,
.sage-page-content h3, .entry-content h3,
.sage-page-content h4, .entry-content h4,
.sage-page-content h5, .entry-content h5 {
  font-family: var(--font-heading, serif);
  color: hsl(var(--foreground));
  font-weight: 400;
  letter-spacing: 0.02em;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
}

.sage-page-content p,
.entry-content p {
  margin-bottom: 1.25rem;
}

.sage-page-content a,
.entry-content a {
  color: hsl(var(--primary));
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color 0.2s ease;
}

.sage-page-content a:hover,
.entry-content a:hover {
  color: hsl(var(--forest));
}

.sage-page-content hr,
.entry-content hr {
  border: none;
  border-top: 1px solid hsl(var(--border));
  margin: 2rem 0;
}

.sage-page-content ul,
.entry-content ul,
.sage-page-content ol,
.entry-content ol {
  padding-left: 1.5rem;
  margin-bottom: 1.25rem;
}

.sage-page-content li,
.entry-content li {
  margin-bottom: 0.25rem;
}


/* ================================================================
   CHECKOUT — WooCommerce field colour harmonisation
   (layout handled in inc/checkout.php — this file handles colours)
   ================================================================ */

/* Checkout heading style */
.woocommerce-checkout h3 {
  font-family: var(--font-heading, serif);
  font-weight: 400;
  font-size: 1.125rem;
  color: hsl(var(--foreground));
  letter-spacing: 0.02em;
}

/* Payment box */
#payment {
  background-color: hsl(var(--secondary)) !important;
  border-radius: 0 !important;
}

#payment .payment_methods li {
  border-bottom: 1px solid hsl(var(--border)) !important;
}

#payment .payment_methods li label {
  color: hsl(var(--foreground)) !important;
  font-family: var(--font-body, sans-serif) !important;
  font-size: 0.875rem !important;
}

#payment div.payment_box {
  background-color: hsl(var(--background)) !important;
  color: hsl(var(--muted-foreground)) !important;
  font-family: var(--font-body, sans-serif) !important;
  font-size: 0.8125rem !important;
}

#payment div.payment_box::before {
  border-bottom-color: hsl(var(--background)) !important;
}


/* ================================================================
   CART DRAWER — brand scrollbar tinting (webkit)
   ================================================================ */

#sage-cart-drawer-panel::-webkit-scrollbar {
  width: 4px;
}

#sage-cart-drawer-panel::-webkit-scrollbar-track {
  background: hsl(var(--secondary));
}

#sage-cart-drawer-panel::-webkit-scrollbar-thumb {
  background: hsl(var(--border));
  border-radius: 2px;
}


/* ================================================================
   MODAL / OVERLAY — product quick-view
   ================================================================ */

/* Modal overlay panel background uses bg-background/90 via Tailwind.
   The CSS variable cascade covers it automatically. These rules
   handle edge cases where WC or JS injects inline background. */
.sage-overlay-content {
  background-color: hsl(var(--background));
}


/* ================================================================
   WHOLESALE MODAL — info panel background
   ================================================================ */

#sage-wholesale-panel {
  background-color: hsl(var(--background));
  border-color: hsl(var(--border));
}


/* ================================================================
   FOOTER — contact form send button matches primary colour
   (the template uses bg-primary, already covered by --primary var,
   but the footer Send Message button uses bg-primary directly)
   ================================================================ */

#sage-contact-form button[type="submit"] {
  background-color: hsl(var(--forest));
  color: hsl(var(--forest-foreground));
}

#sage-contact-form button[type="submit"]:hover {
  background-color: hsl(146 14% 36%); /* #4f685a */
}


/* ================================================================
   FOCUS VISIBLE — accessible ring in brand colour
   ================================================================ */

*:focus-visible {
  outline: 2px solid hsl(var(--ring));
  outline-offset: 2px;
}

/* Suppress outline on mouse click (handled per-element by Tailwind) */
*:focus:not(:focus-visible) {
  outline: none;
}


/* ================================================================
   TYPOGRAPHY CONTRAST — site-wide text hierarchy
   ================================================================
   Background: #e6e5de
   Contrast ratios (approximate):
     #2f3d3b  9.1:1   primary headings         WCAG AAA
     #3d4c46  7.2:1   main body copy            WCAG AAA
     #5d655a  4.7:1   supporting / helper text  WCAG AA  ← --muted-foreground
     #826f55  3.2:1   small labels / tracking   WCAG AA at 14px bold / 18px+
     #a6a493  1.9:1   placeholders only         do NOT use for readable text
   ================================================================ */


/* ── INPUT PLACEHOLDERS — only place #a6a493 is appropriate ───── */

input::placeholder,
textarea::placeholder,
.woocommerce form .form-row input.input-text::placeholder,
.woocommerce form .form-row textarea::placeholder {
  color: hsl(var(--text-ghost));
  opacity: 1; /* Firefox adds 0.54 opacity by default */
}


/* ── FORM LABELS — use label tone, not ghost ──────────────────── */

/* WooCommerce labels were set to --muted-foreground; now slightly darker */
.woocommerce form .form-row label,
.woocommerce-checkout .form-row label {
  color: hsl(var(--foreground)) !important;
}

/* Theme forms (footer contact, wholesale reg) */
#sage-contact-form label,
#sage-wholesale-form label,
#sage-wholesale-reg-form label {
  color: hsl(var(--text-label));
}


/* ── PRODUCT CARD — info panel ────────────────────────────────── */

/* Product name */
.sage-product-card .font-heading {
  color: hsl(var(--foreground));
}

/* Price line in card */
.sage-product-price {
  color: hsl(var(--text-body));
}

/* Description snippet inside card overlay */
.sage-card-overlay .font-body {
  color: hsl(var(--text-body));
}


/* ── SINGLE PRODUCT PAGE ──────────────────────────────────────── */

/* Category label above title */
.type-product .font-body.text-muted-foreground {
  color: hsl(var(--text-label));
}

/* Short description */
.woocommerce-product-details__short-description,
.woocommerce div.product .woocommerce-product-details__short-description p {
  color: hsl(var(--text-body));
  font-size: 0.9375rem;
  line-height: 1.7;
}

/* Long description body */
.woocommerce-Tabs-panel,
.woocommerce div.product .woocommerce-Tabs-panel p {
  color: hsl(var(--text-body));
  line-height: 1.75;
}

/* Price on single product */
.woocommerce div.product p.price,
.woocommerce div.product span.price {
  color: hsl(var(--foreground)) !important;
  font-size: 1.125rem;
}

/* Accordion / details elements: Ingredients + How to Use */
.type-product details summary {
  color: hsl(var(--foreground));
  font-weight: 500; /* slightly heavier so serif heading reads more crisply */
}

.type-product details > p,
.type-product details .font-body {
  color: hsl(var(--text-body));
}

/* "Free shipping" helper line */
.type-product .text-muted-foreground.text-center {
  color: hsl(var(--muted-foreground));
}

/* Out of stock text */
.type-product .text-muted-foreground.border {
  color: hsl(var(--text-body));
}

/* "Back to shop" link */
.type-product a.text-muted-foreground {
  color: hsl(var(--muted-foreground));
}

/* Gallery thumbnail opacity — active is full, inactive needs to remain readable */
.sage-thumb-btn {
  opacity: 0.75; /* raised from default 0.6 for better visibility */
}
.sage-thumb-btn:hover,
.sage-thumb-btn.is-active {
  opacity: 1;
}


/* ── PRODUCT GRID / SHOP ARCHIVE ──────────────────────────────── */

/* Product name on archive card */
.woocommerce ul.products li.product .woocommerce-loop-product__title,
.woocommerce ul.products li.product h2 {
  color: hsl(var(--foreground));
  font-size: 1.0625rem;
}

/* Price on archive card */
.woocommerce ul.products li.product .price {
  color: hsl(var(--text-body)) !important;
}

/* Result count & ordering */
.woocommerce-result-count {
  color: hsl(var(--muted-foreground));
}


/* ── BUNDLES SECTION ──────────────────────────────────────────── */

/* Bundle name */
#bundles .font-heading.text-foreground {
  color: hsl(var(--foreground));
}

/* Bundle description */
#bundles .font-body.text-muted-foreground {
  color: hsl(var(--text-body));
}

/* Bundle price */
#bundles .font-heading.text-foreground:not(h2):not(h3) {
  color: hsl(var(--foreground));
}

/* Strikethrough original price */
#bundles .text-muted-foreground.line-through {
  color: hsl(var(--muted-foreground));
}


/* ── HERO ─────────────────────────────────────────────────────── */

/* Hero text always lives on the image overlay — white is correct.
   These rules ensure it doesn't accidentally inherit body colour. */
.type-page section.relative h1,
.type-page section.relative p {
  /* no override — hero already forces white/90 inline */
}


/* ── HEADER NAV ───────────────────────────────────────────────── */

/* Nav links */
#sage-header nav a {
  color: hsl(var(--foreground));
}

/* Account / muted icons */
#sage-header .text-muted-foreground {
  color: hsl(var(--muted-foreground));
}


/* ── CART DRAWER ──────────────────────────────────────────────── */

/* Item name */
#sage-cart-drawer-panel .font-heading {
  color: hsl(var(--foreground));
}

/* Item price */
#sage-cart-drawer-panel .font-body.text-muted-foreground {
  color: hsl(var(--text-body));
}

/* Subtotal label */
#sage-cart-drawer-panel .text-muted-foreground:not(button) {
  color: hsl(var(--muted-foreground));
}

/* Subtotal amount */
#sage-cart-drawer-panel .text-foreground {
  color: hsl(var(--foreground));
}


/* ── WHOLESALE MODAL ──────────────────────────────────────────── */

#sage-wholesale-modal .font-body.text-muted-foreground {
  color: hsl(var(--text-body));
}

/* Info bullets in approved state */
#sage-wholesale-modal .font-body.text-sm.text-foreground {
  color: hsl(var(--foreground));
}


/* ── CHECKOUT PAGE ────────────────────────────────────────────── */

/* Section subheadings (#order_review_heading handled in checkout.php) */
.woocommerce-checkout .woocommerce-billing-fields h3,
.woocommerce-checkout .woocommerce-shipping-fields h3,
.woocommerce-checkout h3 {
  color: hsl(var(--foreground));
  font-weight: 500;
}

/* Helper / required text */
.woocommerce-checkout .woocommerce-privacy-policy-text p,
.woocommerce form .woocommerce-privacy-policy-text {
  color: hsl(var(--muted-foreground));
  font-size: 0.8125rem;
}

/* Coupon / notes labels */
.woocommerce-checkout .woocommerce-additional-fields h3 {
  color: hsl(var(--foreground));
}

/* Order review table */
.woocommerce-checkout #order_review table.shop_table th,
.woocommerce-checkout #order_review table.shop_table td {
  color: hsl(var(--foreground));
}

/* Order total */
.woocommerce-checkout .order-total th,
.woocommerce-checkout .order-total td {
  color: hsl(var(--foreground));
  font-weight: 500;
}

/* Payment description text inside payment_box — readable supporting tone */
#payment div.payment_box {
  color: hsl(var(--text-body)) !important;
}


/* ── ACCOUNT PAGES ────────────────────────────────────────────── */

/* Nav links: raise from muted to secondary text */
.woocommerce-account .woocommerce-MyAccount-navigation li a {
  color: hsl(var(--muted-foreground));
}

/* Account content body text */
.woocommerce-account .woocommerce-MyAccount-content p,
.woocommerce-account .woocommerce-MyAccount-content li {
  color: hsl(var(--text-body));
}

/* Account address blocks */
.woocommerce-account address {
  color: hsl(var(--text-body));
  font-style: normal;
  line-height: 1.7;
}

/* Order status badges */
.woocommerce-account .woocommerce-orders-table .woocommerce-orders-table__cell-order-status mark {
  background: transparent;
  color: hsl(var(--foreground));
  font-weight: 500;
}


/* ── FOOTER ───────────────────────────────────────────────────── */

/* Footer column headings */
footer h4.font-heading {
  color: hsl(var(--foreground));
}

/* Brand tagline */
footer .font-body.text-muted-foreground.leading-relaxed {
  color: hsl(var(--muted-foreground));
}

/* Nav link text in footer */
footer a.font-body.text-muted-foreground {
  color: hsl(var(--muted-foreground));
}

footer a.font-body.text-muted-foreground:hover {
  color: hsl(var(--foreground));
}

/* Canada badge label */
footer .font-body.text-muted-foreground.tracking-wider {
  color: hsl(var(--muted-foreground));
}

/* Contact form inputs placeholder */
#sage-contact-form input::placeholder,
#sage-contact-form textarea::placeholder {
  color: hsl(var(--text-ghost));
  opacity: 1;
}

/* Copyright line */
footer .font-body.text-muted-foreground.text-center {
  color: hsl(var(--muted-foreground));
}


/* ── LEGAL / INFO PAGES (page.php, about blocks) ──────────────── */

/* Generic page content */
.page-template-default .entry-content,
.page-template-default .entry-content p,
.page.type-page .entry-content p {
  color: hsl(var(--text-body));
  line-height: 1.8;
}

/* About section body text */
[class*="about-"] .font-body {
  color: hsl(var(--text-body));
}

[class*="about-"] h1,
[class*="about-"] h2,
[class*="about-"] h3 {
  color: hsl(var(--foreground));
}


/* ── HELPER / METADATA TEXT ────────────────────────────────────── */

/*
 * Very small tracking labels (e.g. "FREE SHIPPING · MADE IN CANADA",
 * category slug, badge text) use the --text-label token.
 * These are large enough at 10–11px uppercase + letter-spacing to
 * satisfy WCAG AA at 3.2:1 (#826f55 on #e6e5de) per the large-text rule.
 */
.font-body.text-\[10px\].text-muted-foreground,
.font-body.text-\[11px\].text-muted-foreground,
.font-body.text-\[10px\].tracking-wider,
.font-body.text-xs.tracking-\[0\.25em\] {
  color: hsl(var(--text-label));
}

/* But keep cart count badge, notification badges at full contrast */
#sage-cart-count {
  color: hsl(var(--forest-foreground));
}
