/*
 * DS BRAND Theme — assets/css/theme.css
 * Batch 2: Design system foundation.
 * Tokens, typography, header, footer, buttons, forms, cards, WooCommerce baseline.
 */

/* ═══════════════════════════════════════════════════════════════════════════════
   1. DESIGN TOKENS
   ═══════════════════════════════════════════════════════════════════════════════ */

:root {
    /* Brand colours */
    --clr-brand:           #1a8648;   /* DS BRAND green — primary action colour */
    --clr-brand-dark:      #156935;   /* Hover / pressed state */
    --clr-brand-light:     #edf7f2;   /* Tint background / soft highlight */
    --clr-brand-ring:      rgba(26, 134, 72, 0.28); /* Focus ring */

    /* Text */
    --clr-text:            #111827;   /* Primary body text */
    --clr-text-muted:      #6b7280;   /* Secondary / caption */
    --clr-text-light:      #9ca3af;   /* Placeholder / disabled */
    --clr-text-inverse:    #ffffff;   /* Text on dark/brand backgrounds */

    /* Surfaces */
    --clr-bg:              #ffffff;   /* Page background */
    --clr-surface:         #f9fafb;   /* Light grey panel / card */
    --clr-surface-alt:     #f3f4f6;   /* Slightly darker surface */

    /* Borders */
    --clr-border:          #e5e7eb;   /* Default border */
    --clr-border-dark:     #d1d5db;   /* Stronger border / divider */

    /* Status */
    --clr-success:         #16a34a;
    --clr-success-bg:      #f0fdf4;
    --clr-warning:         #d97706;
    --clr-warning-bg:      #fffbeb;
    --clr-error:           #dc2626;
    --clr-error-bg:        #fef2f2;
    --clr-info:            #2563eb;
    --clr-info-bg:         #eff6ff;

    /* Typography */
    --font-base:           'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-size-xs:        0.75rem;   /* 12px */
    --font-size-sm:        0.875rem;  /* 14px */
    --font-size-base:      1rem;      /* 16px */
    --font-size-md:        1.0625rem; /* 17px */
    --font-size-lg:        1.125rem;  /* 18px */
    --font-size-xl:        1.25rem;   /* 20px */
    --font-size-2xl:       1.5rem;    /* 24px */
    --font-size-3xl:       1.875rem;  /* 30px */
    --font-size-4xl:       2.25rem;   /* 36px */

    --font-weight-normal:  400;
    --font-weight-medium:  500;
    --font-weight-semibold:600;
    --font-weight-bold:    700;

    --line-height-tight:   1.2;
    --line-height-snug:    1.4;
    --line-height-base:    1.65;
    --line-height-loose:   1.8;

    --letter-spacing-tight: -0.025em;
    --letter-spacing-wide:   0.05em;

    /* Spacing scale (4px base) */
    --space-1:   0.25rem;   /*  4px */
    --space-2:   0.5rem;    /*  8px */
    --space-3:   0.75rem;   /* 12px */
    --space-4:   1rem;      /* 16px */
    --space-5:   1.25rem;   /* 20px */
    --space-6:   1.5rem;    /* 24px */
    --space-8:   2rem;      /* 32px */
    --space-10:  2.5rem;    /* 40px */
    --space-12:  3rem;      /* 48px */
    --space-16:  4rem;      /* 64px */
    --space-20:  5rem;      /* 80px */

    /* Border radius */
    --radius-sm:    4px;
    --radius:       8px;
    --radius-lg:    12px;
    --radius-xl:    16px;
    --radius-full:  9999px;

    /* Shadows */
    --shadow-xs:  0 1px 2px rgba(0, 0, 0, 0.04);
    --shadow-sm:  0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
    --shadow:     0 4px 12px rgba(0, 0, 0, 0.08);
    --shadow-md:  0 8px 24px rgba(0, 0, 0, 0.10);
    --shadow-lg:  0 16px 48px rgba(0, 0, 0, 0.12);

    /* Layout */
    --container-max:    1200px;
    --container-narrow:  800px;
    --container-wide:   1400px;
    --container-px:     1.25rem;

    /* Header */
    --header-height:    68px;
    --header-bg:        #ffffff;
    --header-border:    var(--clr-border);

    /* Footer */
    --footer-bg:        #111827;
    --footer-text:      #d1d5db;
    --footer-text-muted:#9ca3af;
    --footer-border:    #1f2937;
    --footer-link:      #d1d5db;
    --footer-link-hover:#ffffff;

    /* Transitions */
    --ease:           cubic-bezier(0.4, 0, 0.2, 1);
    --transition:     150ms var(--ease);
    --transition-md:  250ms var(--ease);

    /* Z-index scale */
    --z-header:     100;
    --z-dropdown:   200;
    --z-modal:      300;
    --z-toast:      400;
}


/* ═══════════════════════════════════════════════════════════════════════════════
   2. RESET & BASE
   ═══════════════════════════════════════════════════════════════════════════════ */

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

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    padding: 0;
    font-family: var(--font-base);
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-normal);
    line-height: var(--line-height-base);
    color: var(--clr-text);
    background-color: var(--clr-bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

a {
    color: var(--clr-brand);
    text-decoration: none;
    transition: color var(--transition);
}

a:hover {
    color: var(--clr-brand-dark);
    text-decoration: underline;
}

ul, ol {
    padding-left: var(--space-6);
}

table {
    border-collapse: collapse;
    width: 100%;
}


/* ═══════════════════════════════════════════════════════════════════════════════
   3. TYPOGRAPHY
   ═══════════════════════════════════════════════════════════════════════════════ */

h1, h2, h3, h4, h5, h6 {
    margin-top: 0;
    margin-bottom: var(--space-4);
    font-weight: var(--font-weight-bold);
    line-height: var(--line-height-tight);
    color: var(--clr-text);
    letter-spacing: var(--letter-spacing-tight);
}

h1 { font-size: var(--font-size-4xl); }
h2 { font-size: var(--font-size-3xl); }
h3 { font-size: var(--font-size-2xl); }
h4 { font-size: var(--font-size-xl); }
h5 { font-size: var(--font-size-lg); }
h6 { font-size: var(--font-size-base); }

p {
    margin-top: 0;
    margin-bottom: var(--space-4);
}

p:last-child {
    margin-bottom: 0;
}

strong, b { font-weight: var(--font-weight-bold); }
em, i     { font-style: italic; }
small     { font-size: var(--font-size-sm); }

.entry-content h1,
.entry-content h2,
.entry-content h3,
.entry-content h4,
.entry-content h5,
.entry-content h6 {
    margin-top: var(--space-8);
    margin-bottom: var(--space-3);
}

.entry-content h1:first-child,
.entry-content h2:first-child,
.entry-content h3:first-child {
    margin-top: 0;
}


/* ═══════════════════════════════════════════════════════════════════════════════
   4. LAYOUT UTILITIES
   ═══════════════════════════════════════════════════════════════════════════════ */

#page {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.site-main {
    flex: 1;
    padding-top: var(--space-10);
    padding-bottom: var(--space-12);
}

/* Standard container */
.container {
    width: 100%;
    max-width: var(--container-max);
    margin-left: auto;
    margin-right: auto;
    padding-left: var(--container-px);
    padding-right: var(--container-px);
}

/* Narrower reading container */
.container--narrow {
    max-width: var(--container-narrow);
}

/* Section vertical spacing */
.section {
    padding-top: var(--space-16);
    padding-bottom: var(--space-16);
}

.section--sm {
    padding-top: var(--space-10);
    padding-bottom: var(--space-10);
}

/* Horizontal rule */
hr {
    border: none;
    border-top: 1px solid var(--clr-border);
    margin: var(--space-8) 0;
}


/* ═══════════════════════════════════════════════════════════════════════════════
   5. ACCESSIBILITY
   ═══════════════════════════════════════════════════════════════════════════════ */

.screen-reader-text,
.skip-link {
    clip: rect(1px, 1px, 1px, 1px);
    clip-path: inset(50%);
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    white-space: nowrap;
}

.skip-link:focus {
    clip: auto;
    clip-path: none;
    position: fixed;
    top: 0.5rem;
    left: 0.5rem;
    width: auto;
    height: auto;
    padding: var(--space-2) var(--space-4);
    background: var(--clr-bg);
    color: var(--clr-text);
    border: 2px solid var(--clr-brand);
    border-radius: var(--radius);
    font-weight: var(--font-weight-semibold);
    font-size: var(--font-size-sm);
    z-index: 99999;
    text-decoration: none;
}

/* Consistent focus ring — all interactive elements */
:focus-visible {
    outline: 2px solid var(--clr-brand);
    outline-offset: 3px;
}

:focus:not(:focus-visible) {
    outline: none;
}


/* ═══════════════════════════════════════════════════════════════════════════════
   6. SITE HEADER
   ═══════════════════════════════════════════════════════════════════════════════ */

.site-header {
    position: sticky;
    top: 0;
    z-index: var(--z-header);
    background: var(--header-bg);
    border-bottom: 1px solid var(--header-border);
    height: var(--header-height);
    display: flex;
    align-items: center;
    box-shadow: var(--shadow-xs);
}

.site-header__inner {
    display: flex;
    align-items: center;
    gap: var(--space-6);
    height: 100%;
}

/* ── Brand / Logo ─────────────────────────────────────────────────────────── */

.site-branding {
    flex-shrink: 0;
    display: flex;
    align-items: center;
}

.site-brand-link {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    text-decoration: none;
    color: var(--clr-text);
}

.site-brand-link:hover {
    text-decoration: none;
    color: var(--clr-brand);
}

.site-brand-wordmark {
    font-size: var(--font-size-xl);
    font-weight: var(--font-weight-bold);
    letter-spacing: var(--letter-spacing-tight);
    line-height: 1;
}

.site-brand-wordmark .brand-ds {
    color: var(--clr-brand);
}

.site-brand-wordmark .brand-label {
    color: var(--clr-text);
}

/* Custom logo when uploaded via Customizer */
.custom-logo-link {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.custom-logo {
    max-height: 44px;
    width: auto;
    display: block;
}

/* ── Primary Navigation ───────────────────────────────────────────────────── */

.main-navigation {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.main-navigation .nav-menu {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    gap: var(--space-1);
    flex-wrap: nowrap;
}

.main-navigation .nav-menu > li > a {
    display: block;
    padding: var(--space-2) var(--space-3);
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-medium);
    color: var(--clr-text);
    text-decoration: none;
    border-radius: var(--radius-sm);
    transition: background var(--transition), color var(--transition);
    white-space: nowrap;
}

.main-navigation .nav-menu > li > a:hover,
.main-navigation .nav-menu > li.current-menu-item > a,
.main-navigation .nav-menu > li.current-page-ancestor > a {
    background: var(--clr-brand-light);
    color: var(--clr-brand-dark);
    text-decoration: none;
}

.main-navigation .nav-menu > li.current-menu-item > a {
    font-weight: var(--font-weight-semibold);
}

/* ── Header Utility Links ─────────────────────────────────────────────────── */

.site-header__utils {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: var(--space-1);
    margin-left: auto;
}

.ds-util-link {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: var(--radius);
    color: var(--clr-text);
    text-decoration: none;
    transition: background var(--transition), color var(--transition);
    flex-shrink: 0;
}

.ds-util-link:hover {
    background: var(--clr-surface);
    color: var(--clr-brand);
    text-decoration: none;
}

.ds-util-link svg {
    display: block;
    flex-shrink: 0;
}

/* Cart count badge */
.ds-cart-count {
    position: absolute;
    top: 4px;
    right: 4px;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    background: var(--clr-brand);
    color: var(--clr-text-inverse);
    font-size: 10px;
    font-weight: var(--font-weight-bold);
    line-height: 16px;
    border-radius: var(--radius-full);
    text-align: center;
    display: none;   /* hidden when empty */
}

.ds-cart-count.has-items {
    display: block;
}

/* ── Mobile Toggle Button ─────────────────────────────────────────────────── */

.nav-toggle {
    display: none;   /* hidden on desktop */
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    padding: 0;
    background: none;
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    color: var(--clr-text);
    transition: background var(--transition);
}

.nav-toggle:hover {
    background: var(--clr-surface);
}

.nav-toggle__bar {
    display: block;
    width: 20px;
    height: 2px;
    background: currentColor;
    border-radius: 2px;
    transition: transform var(--transition-md), opacity var(--transition-md);
    transform-origin: center;
}

.nav-toggle__icon {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

/* Animated X state */
.site-header.is-nav-open .nav-toggle .nav-toggle__bar:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}
.site-header.is-nav-open .nav-toggle .nav-toggle__bar:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}
.site-header.is-nav-open .nav-toggle .nav-toggle__bar:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}


/* ═══════════════════════════════════════════════════════════════════════════════
   7. SITE FOOTER
   ═══════════════════════════════════════════════════════════════════════════════ */

.site-footer {
    background: var(--footer-bg);
    color: var(--footer-text);
}

/* Top section — brand + columns */
.site-footer__top {
    padding: var(--space-12) 0;
}

.site-footer__cols {
    display: grid;
    grid-template-columns: 2fr 1fr 1.5fr;
    gap: var(--space-10);
    align-items: start;
}

/* Brand column */
.footer-brand-link {
    display: inline-block;
    font-size: var(--font-size-xl);
    font-weight: var(--font-weight-bold);
    letter-spacing: var(--letter-spacing-tight);
    color: #ffffff;
    text-decoration: none;
    margin-bottom: var(--space-3);
}

.footer-brand-link:hover {
    color: var(--clr-brand-light);
    text-decoration: none;
}

.footer-brand-link .brand-ds {
    color: var(--clr-brand);
}

.footer-tagline {
    font-size: var(--font-size-sm);
    color: var(--footer-text-muted);
    line-height: var(--line-height-base);
    margin-bottom: 0;
}

/* Navigation column */
.footer-col-title {
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-semibold);
    color: #ffffff;
    letter-spacing: var(--letter-spacing-wide);
    text-transform: uppercase;
    margin-bottom: var(--space-4);
}

.footer-nav-menu {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}

.footer-nav-menu a {
    font-size: var(--font-size-sm);
    color: var(--footer-link);
    text-decoration: none;
    transition: color var(--transition);
}

.footer-nav-menu a:hover {
    color: var(--footer-link-hover);
    text-decoration: none;
}

/* Advance Supplies handoff column */
.site-footer__advance-col p {
    font-size: var(--font-size-sm);
    color: var(--footer-text-muted);
    line-height: var(--line-height-base);
    margin-bottom: var(--space-3);
}

.site-footer__advance-col a {
    color: var(--clr-brand);
    text-decoration: none;
    transition: color var(--transition);
}

.site-footer__advance-col a:hover {
    color: #6fcf97;
    text-decoration: underline;
}

/* Bottom legal bar */
.site-footer__bottom {
    border-top: 1px solid var(--footer-border);
    padding: var(--space-5) 0;
}

.site-footer__bottom-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: var(--space-3);
}

.site-footer__legal,
.site-footer__copy {
    margin: 0;
    font-size: var(--font-size-xs);
    color: var(--footer-text-muted);
}

.site-footer__legal a {
    color: var(--footer-text-muted);
    text-decoration: none;
    transition: color var(--transition);
}

.site-footer__legal a:hover {
    color: #ffffff;
}


/* ═══════════════════════════════════════════════════════════════════════════════
   8. BUTTONS
   ═══════════════════════════════════════════════════════════════════════════════ */

/* Base button reset + shared traits */
.btn,
.woocommerce a.button,
.woocommerce button.button,
.woocommerce input.button,
.woocommerce #respond input#submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    padding: 0.625rem var(--space-5);
    font-family: var(--font-base);
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-semibold);
    line-height: 1.4;
    border-radius: var(--radius);
    border: 2px solid transparent;
    cursor: pointer;
    text-decoration: none;
    white-space: nowrap;
    transition: background var(--transition), color var(--transition),
                border-color var(--transition), box-shadow var(--transition),
                opacity var(--transition);
    -webkit-appearance: none;
    appearance: none;
}

/* Primary — green fill */
.btn,
.btn--primary,
.woocommerce a.button,
.woocommerce button.button,
.woocommerce input.button,
.woocommerce #respond input#submit {
    background: var(--clr-brand);
    color: var(--clr-text-inverse);
    border-color: var(--clr-brand);
}

.btn:hover,
.btn--primary:hover,
.woocommerce a.button:hover,
.woocommerce button.button:hover,
.woocommerce input.button:hover,
.woocommerce #respond input#submit:hover {
    background: var(--clr-brand-dark);
    border-color: var(--clr-brand-dark);
    color: var(--clr-text-inverse);
    text-decoration: none;
}

.btn:active,
.btn--primary:active {
    opacity: 0.9;
}

/* Secondary — ghost/outlined */
.btn--secondary {
    background: transparent;
    color: var(--clr-brand);
    border-color: var(--clr-brand);
}

.btn--secondary:hover {
    background: var(--clr-brand-light);
    color: var(--clr-brand-dark);
    border-color: var(--clr-brand-dark);
    text-decoration: none;
}

/* Ghost — muted outline */
.btn--ghost {
    background: transparent;
    color: var(--clr-text-muted);
    border-color: var(--clr-border-dark);
}

.btn--ghost:hover {
    background: var(--clr-surface);
    color: var(--clr-text);
    border-color: var(--clr-border-dark);
    text-decoration: none;
}

/* Sizes */
.btn--sm {
    padding: var(--space-1) var(--space-3);
    font-size: var(--font-size-xs);
}

.btn--lg {
    padding: var(--space-4) var(--space-8);
    font-size: var(--font-size-base);
    border-radius: var(--radius-lg);
}

/* Disabled state */
.btn[disabled],
.btn--primary[disabled],
.woocommerce a.button.disabled,
.woocommerce button.button:disabled,
.woocommerce input.button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

/* WooCommerce alt button (outline variant WC uses internally) */
.woocommerce a.button.alt,
.woocommerce button.button.alt,
.woocommerce input.button.alt {
    background: var(--clr-brand);
    color: var(--clr-text-inverse);
    border-color: var(--clr-brand);
}

.woocommerce a.button.alt:hover,
.woocommerce button.button.alt:hover {
    background: var(--clr-brand-dark);
    border-color: var(--clr-brand-dark);
    color: var(--clr-text-inverse);
}

/* Add to cart / checkout specific */
.single_add_to_cart_button,
.checkout-button {
    width: 100%;
}


/* ═══════════════════════════════════════════════════════════════════════════════
   9. FORM ELEMENTS
   ═══════════════════════════════════════════════════════════════════════════════ */

/* Base input styles — intentionally low specificity so WC can override */
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="number"],
input[type="password"],
input[type="search"],
input[type="url"],
select,
textarea {
    display: block;
    width: 100%;
    padding: var(--space-3) var(--space-4);
    font-family: var(--font-base);
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-normal);
    line-height: var(--line-height-base);
    color: var(--clr-text);
    background: var(--clr-bg);
    border: 1px solid var(--clr-border-dark);
    border-radius: var(--radius);
    appearance: none;
    -webkit-appearance: none;
    transition: border-color var(--transition), box-shadow var(--transition);
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="tel"]:focus,
input[type="number"]:focus,
input[type="password"]:focus,
input[type="search"]:focus,
input[type="url"]:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--clr-brand);
    box-shadow: 0 0 0 3px var(--clr-brand-ring);
}

input::placeholder,
textarea::placeholder {
    color: var(--clr-text-light);
}

textarea {
    resize: vertical;
    min-height: 120px;
}

select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%236b7280' d='M6 8L0 0h12z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 12px;
    padding-right: 2.5rem;
    cursor: pointer;
}

/* Label */
label {
    display: block;
    margin-bottom: var(--space-2);
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-medium);
    color: var(--clr-text);
}

/* Form group spacing */
.form-row,
p.form-row,
.woocommerce .form-row {
    margin-bottom: var(--space-5);
}

/* WooCommerce validation states */
.woocommerce-invalid input,
.woocommerce-invalid select,
.woocommerce-invalid textarea {
    border-color: var(--clr-error);
}

.woocommerce-validated input,
.woocommerce-validated select {
    border-color: var(--clr-success);
}

/* Checkbox & Radio */
input[type="checkbox"],
input[type="radio"] {
    width: 16px;
    height: 16px;
    accent-color: var(--clr-brand);
    cursor: pointer;
    flex-shrink: 0;
}


/* ═══════════════════════════════════════════════════════════════════════════════
   10. CARDS & SURFACES
   ═══════════════════════════════════════════════════════════════════════════════ */

/* Base card */
.card {
    background: var(--clr-bg);
    border: 1px solid var(--clr-border);
    border-radius: var(--radius-lg);
    padding: var(--space-6);
    box-shadow: var(--shadow-sm);
    transition: box-shadow var(--transition-md);
}

.card:hover {
    box-shadow: var(--shadow);
}

/* Surface panel — no border, tinted background */
.surface {
    background: var(--clr-surface);
    border-radius: var(--radius);
    padding: var(--space-6);
}

/* Alt surface */
.surface--alt {
    background: var(--clr-surface-alt);
}

/* Brand-tinted surface */
.surface--brand {
    background: var(--clr-brand-light);
    border: 1px solid rgba(26, 134, 72, 0.15);
}

/* Content section with vertical spacing */
.content-block {
    padding: var(--space-8) 0;
    border-bottom: 1px solid var(--clr-border);
}

.content-block:last-child {
    border-bottom: none;
}


/* ═══════════════════════════════════════════════════════════════════════════════
   11. CONTENT TEMPLATES (entries, pagination, archive, search)
   ═══════════════════════════════════════════════════════════════════════════════ */

/* Entry (blog fallback) */
.entry {
    margin-bottom: var(--space-8);
    padding-bottom: var(--space-8);
    border-bottom: 1px solid var(--clr-border);
}

.entry:last-child {
    border-bottom: none;
}

.entry-header {
    margin-bottom: var(--space-4);
}

.entry-title {
    font-size: var(--font-size-2xl);
    margin-bottom: var(--space-2);
}

.entry-title a {
    color: var(--clr-text);
    text-decoration: none;
}

.entry-title a:hover {
    color: var(--clr-brand);
}

.entry-meta {
    font-size: var(--font-size-sm);
    color: var(--clr-text-muted);
    margin-bottom: var(--space-4);
}

.entry-thumbnail {
    margin-bottom: var(--space-5);
    border-radius: var(--radius);
    overflow: hidden;
}

.entry-thumbnail img {
    width: 100%;
    object-fit: cover;
}

/* Archive header */
.archive-header,
.search-header {
    margin-bottom: var(--space-8);
    padding-bottom: var(--space-6);
    border-bottom: 1px solid var(--clr-border);
}

.archive-title,
.search-title {
    font-size: var(--font-size-3xl);
    margin-bottom: var(--space-2);
}

.search-title span {
    color: var(--clr-brand);
}

.archive-description {
    color: var(--clr-text-muted);
    font-size: var(--font-size-md);
}

/* 404 */
.error-404 .page-header {
    margin-bottom: var(--space-6);
}

.error-404 .page-title {
    font-size: var(--font-size-4xl);
}

/* Page links (paginated posts) */
.page-links {
    margin-top: var(--space-6);
    font-size: var(--font-size-sm);
    color: var(--clr-text-muted);
}

/* WordPress pagination */
.navigation.pagination {
    margin-top: var(--space-10);
}

.nav-links {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
}

.nav-links a,
.nav-links span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 var(--space-3);
    border: 1px solid var(--clr-border-dark);
    border-radius: var(--radius);
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-medium);
    text-decoration: none;
    color: var(--clr-text);
    transition: background var(--transition), color var(--transition);
}

.nav-links a:hover {
    background: var(--clr-brand-light);
    color: var(--clr-brand-dark);
    border-color: var(--clr-brand);
    text-decoration: none;
}

.nav-links .current {
    background: var(--clr-brand);
    color: var(--clr-text-inverse);
    border-color: var(--clr-brand);
}


/* ═══════════════════════════════════════════════════════════════════════════════
   12. WOOCOMMERCE BASELINE
   ═══════════════════════════════════════════════════════════════════════════════ */

/*
 * Safe, intentional overrides only.
 * WooCommerce manages its own template structure — do not duplicate it here.
 * Scope with .woocommerce or .woocommerce-page where possible to avoid bleeding
 * into non-WC pages.
 */

/* ── WC Notices ───────────────────────────────────────────────────────────── */

.woocommerce-message,
.woocommerce-info,
.woocommerce-error {
    padding: var(--space-3) var(--space-5);
    margin-bottom: var(--space-5);
    border-radius: var(--radius);
    font-size: var(--font-size-sm);
}

.woocommerce-message {
    border-left: 4px solid var(--clr-success);
    background: var(--clr-success-bg);
    color: #14532d;
}

.woocommerce-info {
    border-left: 4px solid var(--clr-info);
    background: var(--clr-info-bg);
    color: #1e3a8a;
}

.woocommerce-error {
    border-left: 4px solid var(--clr-error);
    background: var(--clr-error-bg);
    color: #7f1d1d;
    list-style: none;
    padding-left: var(--space-5);
}

/* ── WC Breadcrumb ────────────────────────────────────────────────────────── */

.woocommerce-breadcrumb {
    font-size: var(--font-size-sm);
    color: var(--clr-text-muted);
    margin-bottom: var(--space-6);
}

.woocommerce-breadcrumb a {
    color: var(--clr-text-muted);
    text-decoration: none;
}

.woocommerce-breadcrumb a:hover {
    color: var(--clr-brand);
}

/* ── WC Product Archive ───────────────────────────────────────────────────── */

.woocommerce ul.products {
    margin: 0;
    padding: 0;
    list-style: none;
}

.woocommerce ul.products li.product {
    background: var(--clr-bg);
    border: 1px solid var(--clr-border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: box-shadow var(--transition-md), transform var(--transition-md);
}

.woocommerce ul.products li.product:hover {
    box-shadow: var(--shadow);
    transform: translateY(-2px);
}

.woocommerce ul.products li.product a {
    text-decoration: none;
    color: var(--clr-text);
}

.woocommerce ul.products li.product .woocommerce-loop-product__title {
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-semibold);
    color: var(--clr-text);
    padding: var(--space-3) var(--space-4) 0;
}

.woocommerce ul.products li.product .price {
    padding: var(--space-2) var(--space-4);
    font-size: var(--font-size-md);
    font-weight: var(--font-weight-bold);
    color: var(--clr-brand-dark);
}

/* ── WC Product Single ────────────────────────────────────────────────────── */

.woocommerce div.product .product_title {
    font-size: var(--font-size-3xl);
    font-weight: var(--font-weight-bold);
    letter-spacing: var(--letter-spacing-tight);
    margin-bottom: var(--space-3);
}

.woocommerce div.product p.price,
.woocommerce div.product span.price {
    font-size: var(--font-size-2xl);
    font-weight: var(--font-weight-bold);
    color: var(--clr-brand-dark);
    margin-bottom: var(--space-5);
}

.woocommerce div.product .woocommerce-product-details__short-description {
    font-size: var(--font-size-base);
    color: var(--clr-text);
    line-height: var(--line-height-base);
    margin-bottom: var(--space-6);
}

/* ── WC Cart ──────────────────────────────────────────────────────────────── */

.woocommerce table.cart,
.woocommerce-cart .cart_totals {
    font-size: var(--font-size-sm);
}

.woocommerce table.cart td,
.woocommerce table.cart th {
    padding: var(--space-4);
    border-color: var(--clr-border);
}

.woocommerce-cart .cart_totals {
    background: var(--clr-surface);
    border-radius: var(--radius-lg);
    padding: var(--space-6);
}

/* ── WC Checkout — patched Batch 2.1 ─────────────────────────────────────── */

/*
 * Root cause: the previous generic .woocommerce .col2-set { display: grid; grid-template-columns: 1fr 1fr }
 * created a rigid 2-column grid that conflicted with WooCommerce's float-based woocommerce.css
 * (which loads after the theme). Grid always allocates both column tracks even when .col-2 is
 * hidden or has collapsed WooCommerce JS content, causing the billing form to appear displaced.
 *
 * Fix: scoped tightly to #customer_details, using .woocommerce-checkout body class for
 * maximum specificity. Flex is used instead of grid — flex collapses naturally when .col-2
 * is display:none so billing expands to full width with no empty ghost column.
 */

/* Step 1: beat WooCommerce's own float rules definitively */
.woocommerce-checkout #customer_details.col2-set {
    display: block;
    width: 100%;
    overflow: hidden;   /* contain any residual floats */
}

.woocommerce-checkout #customer_details .col-1,
.woocommerce-checkout #customer_details .col-2 {
    float: none !important;   /* override WooCommerce woocommerce.css float rules */
    width: 100%;
    margin-left: 0;
    padding-left: 0;
    box-sizing: border-box;
}

/* Step 2: desktop — flex side-by-side when both billing + shipping are visible.
   When .col-2 is display:none (WooCommerce JS hides shipping),
   .col-1 automatically expands to fill the full row — no empty column left behind. */
@media (min-width: 768px) {
    .woocommerce-checkout #customer_details.col2-set {
        display: flex;
        flex-wrap: wrap;
        gap: var(--space-8);
        align-items: flex-start;
    }

    .woocommerce-checkout #customer_details .col-1 {
        flex: 1 1 340px;
        min-width: 280px;
        width: auto;
    }

    .woocommerce-checkout #customer_details .col-2 {
        flex: 1 1 300px;
        min-width: 260px;
        width: auto;
    }
}

.woocommerce #order_review,
.woocommerce #order_review_heading {
    margin-top: var(--space-8);
}

.woocommerce #payment {
    background: var(--clr-surface);
    border-radius: var(--radius-lg);
    padding: var(--space-6);
}

/* ── WC My Account ────────────────────────────────────────────────────────── */

.woocommerce-account .woocommerce-MyAccount-navigation {
    margin-bottom: var(--space-6);
}

.woocommerce-account .woocommerce-MyAccount-navigation ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
}

.woocommerce-account .woocommerce-MyAccount-navigation ul li a {
    display: inline-block;
    padding: var(--space-2) var(--space-4);
    border: 1px solid var(--clr-border-dark);
    border-radius: var(--radius);
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-medium);
    color: var(--clr-text);
    text-decoration: none;
    transition: background var(--transition), color var(--transition), border-color var(--transition);
}

.woocommerce-account .woocommerce-MyAccount-navigation ul li a:hover,
.woocommerce-account .woocommerce-MyAccount-navigation ul li.is-active a {
    background: var(--clr-brand);
    color: var(--clr-text-inverse);
    border-color: var(--clr-brand);
}

/* ── WC Order Tracking ────────────────────────────────────────────────────── */

.woocommerce .track_order {
    max-width: 560px;
}


/* ═══════════════════════════════════════════════════════════════════════════════
   13. RESPONSIVE
   ═══════════════════════════════════════════════════════════════════════════════ */

/* ── Tablet: ≤ 1024px ─────────────────────────────────────────────────────── */

@media (max-width: 1024px) {
    .site-footer__cols {
        grid-template-columns: 1fr 1fr;
    }

    .site-footer__brand-col {
        grid-column: 1 / -1;
    }
}

/* ── Mobile: ≤ 767px ──────────────────────────────────────────────────────── */

@media (max-width: 767px) {

    /* Typography scale down */
    h1 { font-size: var(--font-size-3xl); }
    h2 { font-size: var(--font-size-2xl); }
    h3 { font-size: var(--font-size-xl); }

    /* Header: show toggle, hide nav by default */
    .site-header {
        position: sticky;
        height: auto;
        min-height: var(--header-height);
        align-items: flex-start;
        flex-direction: column;
    }

    .site-header__inner {
        width: 100%;
        height: var(--header-height);
        flex-wrap: nowrap;
    }

    .main-navigation {
        display: none;
        width: 100%;
        flex: none;
        justify-content: flex-start;
        padding: var(--space-4) 0 var(--space-5);
        border-top: 1px solid var(--clr-border);
        overflow: hidden;
    }

    /* Open state */
    .site-header.is-nav-open .main-navigation {
        display: flex;
    }

    .main-navigation .nav-menu {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--space-1);
        width: 100%;
    }

    .main-navigation .nav-menu > li {
        width: 100%;
    }

    .main-navigation .nav-menu > li > a {
        width: 100%;
        padding: var(--space-3) var(--space-2);
        font-size: var(--font-size-base);
    }

    /* Show mobile toggle */
    .nav-toggle {
        display: inline-flex;
        order: 3;
    }

    /* Shrink utility links on mobile */
    .site-header__utils {
        gap: 0;
    }

    .ds-util-link {
        width: 36px;
        height: 36px;
    }

    /* Footer: single column */
    .site-footer__cols {
        grid-template-columns: 1fr;
        gap: var(--space-8);
    }

    .site-footer__brand-col {
        grid-column: auto;
    }

    .site-footer__bottom-inner {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--space-2);
    }

    /* WC: full-width layout */
    .woocommerce div.product div.images,
    .woocommerce div.product div.summary {
        width: 100%;
        float: none;
    }
}
