/*
Theme Name: Hexa-Peptides-Theme
Theme URI: https://hexapeptides.com
Author: Hexa Peptides
Author URI: https://hexapeptides.com
Description: Custom theme for the Hexa Peptides website.
Version: 3.14.0
Requires at least: 6.0
Tested up to: 6.9
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: hexa-peptides-theme
Tags: custom
*/

/* =============================================
   TABLE OF CONTENTS
   -----------------
   1.  Design Tokens (CSS Custom Properties)
   2.  Reset & Base
   3.  Typography
   4.  Layout
   5.  Buttons
   6.  Header / Navigation
   7.  Mobile Navigation
   8.  Footer
   9.  Homepage — Hero
   10. Homepage — RUO Bar
   11. Homepage — Three Pillars
   12. Homepage — About
   13. Homepage — CTA Band
   14. Interior Pages
   15. Responsive — Tablet (≤ 900px)
   16. Responsive — Mobile  (≤ 640px)
   21. WooCommerce — Global / Notices
   22. WooCommerce — Cart Page
   23. WooCommerce — Checkout Page
   24. WooCommerce — Thank You Page
   25. WooCommerce — Responsive
   26. COAs Page
   27. Contact Page
   ============================================= */


/* =============================================
   1. DESIGN TOKENS
   ============================================= */

:root {
    --color-bg:           #ffffff;
    --color-accent:       #4a90d9;
    --color-accent-dark:  #3478c0;
    --color-surface:      #f0f7ff;
    --color-border:       #ddeaf7;
    --color-text:         #0a0a0a;
    --color-text-muted:   #52606d;
    --color-dark:         #0a0f1a;
    --color-dark-border:  rgba(255,255,255,0.1);

    --font-heading: 'Playfair Display', Georgia, 'Times New Roman', serif;
    --font-body:    'Inter', system-ui, -apple-system, sans-serif;

    --container-width:   1120px;
    --container-padding: 2rem;
    --header-height:     64px;

    --radius-sm:  4px;
    --radius-md:  8px;

    --transition: 0.18s ease;
}


/* =============================================
   2. RESET & BASE
   ============================================= */

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

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

body {
    font-family: var(--font-body);
    font-size: 1rem;
    line-height: 1.65;
    color: var(--color-text);
    background: var(--color-bg);
    -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }

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

ul, ol { list-style: none; }

address { font-style: normal; }

button { cursor: pointer; background: none; border: none; font: inherit; color: inherit; }

/* Accessibility */
.visually-hidden {
    position: absolute;
    width: 1px; height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

*:focus-visible {
    outline: 2px solid var(--color-accent);
    outline-offset: 3px;
    border-radius: var(--radius-sm);
}


/* =============================================
   3. TYPOGRAPHY
   ============================================= */

h1, h2, h3, h4 {
    font-family: var(--font-heading);
    font-weight: 600;
    line-height: 1.2;
    color: var(--color-text);
}

h1 { font-size: clamp(1.75rem, 4vw, 2.75rem); }
h2 { font-size: clamp(1.35rem, 2.5vw, 1.9rem); }
h3 { font-size: 1.1rem; }

p { color: var(--color-text-muted); line-height: 1.7; }

strong { font-weight: 600; color: var(--color-text); }


/* =============================================
   4. LAYOUT
   ============================================= */

.site {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.site-main { flex: 1; }

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 var(--container-padding);
}


/* =============================================
   5. BUTTONS
   ============================================= */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.65rem 1.6rem;
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-weight: 500;
    border-radius: var(--radius-sm);
    text-decoration: none;
    transition: background-color var(--transition), color var(--transition), border-color var(--transition);
    white-space: nowrap;
    cursor: pointer;
    border: 1px solid transparent;
}

.btn-primary {
    background-color: var(--color-accent);
    color: #fff;
    border-color: var(--color-accent);
}
.btn-primary:hover {
    background-color: var(--color-accent-dark);
    border-color: var(--color-accent-dark);
    color: #fff;
    text-decoration: none;
}

.btn-outline-light {
    background: transparent;
    color: #fff;
    border-color: rgba(255,255,255,0.45);
}
.btn-outline-light:hover {
    background: rgba(255,255,255,0.1);
    border-color: rgba(255,255,255,0.7);
    color: #fff;
    text-decoration: none;
}

/* Ghost button for light/white backgrounds */
.btn-outline {
    background: transparent;
    color: var(--color-accent);
    border-color: var(--color-accent);
}
.btn-outline:hover {
    background: var(--color-surface);
    color: var(--color-accent-dark);
    border-color: var(--color-accent-dark);
    text-decoration: none;
}


/* =============================================
   6. HEADER / NAVIGATION
   ============================================= */

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--color-bg);
    border-bottom: 1px solid var(--color-border);
    padding: 0;
}

.site-header.is-scrolled {
    box-shadow: 0 1px 6px rgba(0,0,0,0.06);
}

.nav-wrap {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 var(--container-padding);
    height: var(--header-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
}

/* Logo */
.nav-logo {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    text-decoration: none;
    flex-shrink: 0;
}
.nav-logo:hover { text-decoration: none; }

.nav-logo-wordmark {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--color-text);
    letter-spacing: -0.01em;
}

/* Nav links */
.nav-links {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    list-style: none;
}

.nav-links a {
    display: block;
    padding: 0.4rem 0.75rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--color-text-muted);
    border-radius: var(--radius-sm);
    transition: color var(--transition), background-color var(--transition);
}
.nav-links a:hover {
    color: var(--color-text);
    background-color: var(--color-surface);
    text-decoration: none;
}
.nav-links .current-menu-item > a,
.nav-links a[aria-current="page"] {
    color: var(--color-accent);
}

/* Shop link — subtle accent */
.nav-links .nav-shop > a {
    color: var(--color-accent);
    background-color: var(--color-surface);
    border: 1px solid var(--color-border);
}
.nav-links .nav-shop > a:hover {
    background-color: var(--color-accent);
    border-color: var(--color-accent);
    color: #fff;
}

/* Hamburger */
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 38px; height: 38px;
    gap: 5px;
    border-radius: var(--radius-sm);
    transition: background-color var(--transition);
}
.hamburger:hover { background-color: var(--color-surface); }
.hamburger span {
    display: block;
    width: 20px; height: 1.5px;
    background: var(--color-text);
    border-radius: 2px;
    transition: transform 0.22s ease, opacity 0.22s ease;
    transform-origin: center;
}
.hamburger.is-active span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.hamburger.is-active span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.hamburger.is-active span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }


/* =============================================
   7. MOBILE NAVIGATION
   ============================================= */

@media (max-width: 640px) {

    .hamburger { display: flex; }

    .site-nav {
        display: none;
        position: absolute;
        top: var(--header-height);
        left: 0; right: 0;
        background: var(--color-bg);
        border-bottom: 1px solid var(--color-border);
        padding: 0.75rem var(--container-padding) 1rem;
        z-index: 99;
    }
    .site-nav.nav-open { display: block; }

    .nav-links { flex-direction: column; align-items: flex-start; gap: 0; }
    .nav-links li { width: 100%; }
    .nav-links a {
        padding: 0.65rem 0.5rem;
        border-radius: 0;
        border-bottom: 1px solid var(--color-border);
        width: 100%;
        font-size: 0.95rem;
    }
    .nav-links li:last-child a { border-bottom: none; }
    .nav-links .nav-shop > a {
        background: none;
        border: none;
        border-bottom: 1px solid var(--color-border);
    }
}


/* =============================================
   8. FOOTER
   ============================================= */

.site-footer {
    background: var(--color-dark);
    color: rgba(255,255,255,0.65);
    font-size: 0.875rem;
}

.footer-inner {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 var(--container-padding);
}

.footer-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 3rem;
    padding: 2.5rem 0 2rem;
    border-bottom: 1px solid var(--color-dark-border);
    flex-wrap: wrap;
}

/* Footer logo */
.footer-logo-wrap {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    text-decoration: none;
}
.footer-logo-wrap:hover { text-decoration: none; }
.footer-wordmark {
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 700;
    color: #fff;
}

/* Footer nav */
.footer-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem 1.5rem;
    list-style: none;
    align-items: center;
}
.footer-nav a {
    color: rgba(255,255,255,0.55);
    font-size: 0.825rem;
    transition: color var(--transition);
}
.footer-nav a:hover { color: #fff; text-decoration: none; }

/* Footer bottom */
.footer-bottom {
    padding: 1.25rem 0 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.footer-ruo {
    font-size: 0.78rem;
    color: rgba(255,255,255,0.38);
    line-height: 1.5;
}

.footer-copy {
    font-size: 0.78rem;
    color: rgba(255,255,255,0.3);
}


/* =============================================
   9. HOMEPAGE — HERO
   ============================================= */

.hp-hero {
    padding: 7rem 0 6rem;
    text-align: center;
}

.hp-hero-inner {
    max-width: 680px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.hp-hero h1 {
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 700;
    color: var(--color-text);
    letter-spacing: -0.02em;
    line-height: 1.15;
}

.hp-hero-sub {
    font-size: 1.05rem;
    color: var(--color-text-muted);
    max-width: 520px;
    line-height: 1.65;
}

.hp-hero-cta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin-top: 0.5rem;
}


/* =============================================
   10. HOMEPAGE — RUO BAR
   ============================================= */

.hp-ruo {
    background: var(--color-surface);
    border-top: 1px solid var(--color-border);
    border-bottom: 1px solid var(--color-border);
    padding: 0.75rem var(--container-padding);
    text-align: center;
}

.hp-ruo p {
    font-size: 0.78rem;
    color: var(--color-text-muted);
    line-height: 1.5;
    max-width: var(--container-width);
    margin: 0 auto;
}


/* =============================================
   11. HOMEPAGE — THREE PILLARS
   ============================================= */

.hp-pillars {
    padding: 5rem 0;
}

.hp-pillars-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.pillar-card {
    padding: 2rem 1.75rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    background: var(--color-bg);
    transition: border-color var(--transition);
}
.pillar-card:hover { border-color: var(--color-accent); }

.pillar-title {
    font-family: var(--font-body);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--color-accent);
    margin-bottom: 0.65rem;
}

.pillar-card h3 {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--color-text);
    margin-bottom: 0.6rem;
    line-height: 1.3;
}

.pillar-card p {
    font-size: 0.9rem;
    color: var(--color-text-muted);
    line-height: 1.65;
}


/* =============================================
   12. HOMEPAGE — ABOUT
   ============================================= */

.hp-about {
    padding: 4.5rem 0 5rem;
    border-top: 1px solid var(--color-border);
}

.hp-about-inner {
    max-width: 660px;
}

.hp-about-label {
    display: block;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--color-accent);
    margin-bottom: 1.25rem;
}

.hp-about h2 {
    font-size: clamp(1.3rem, 2.5vw, 1.7rem);
    color: var(--color-text);
    margin-bottom: 1.25rem;
    font-weight: 600;
}

.hp-about p {
    font-size: 0.97rem;
    color: var(--color-text-muted);
    line-height: 1.75;
    margin-bottom: 1rem;
}
.hp-about p:last-child { margin-bottom: 0; }


/* =============================================
   13. HOMEPAGE — CTA BAND
   ============================================= */

.hp-cta-band {
    background: var(--color-dark);
    padding: 5rem 0;
    text-align: center;
}

.hp-cta-band-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.hp-cta-band h2 {
    font-family: var(--font-heading);
    font-size: clamp(1.5rem, 3vw, 2.1rem);
    font-weight: 600;
    color: #fff;
}

.hp-cta-band p {
    font-size: 0.95rem;
    color: rgba(255,255,255,0.55);
    max-width: 420px;
}


/* =============================================
   14. HOMEPAGE — DIFFERENTIATOR BLOCK
   ============================================= */

.hp-diff {
    background: var(--color-dark);
    padding: 4.5rem 0;
}
.hp-diff-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}
.hp-diff-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 1rem;
    padding: 1rem;
}
.hp-diff-icon {
    width: 64px;
    height: 64px;
    background: rgba(74, 144, 217, 0.15);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-accent);
    flex-shrink: 0;
}
.hp-diff-item h3 {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 600;
    color: #ffffff;
    margin: 0;
}
.hp-diff-item > p {
    font-size: 0.88rem;
    color: rgba(255, 255, 255, 0.6);
    margin: 0;
    line-height: 1.55;
}


/* =============================================
   15. HOMEPAGE — JANOSHIK PROOF BAR
   ============================================= */

.hp-proof-bar {
    background: #eff6ff;
    border-top: 1px solid #bfdbfe;
    border-bottom: 1px solid #bfdbfe;
    padding: 1rem 0;
    text-align: center;
}
.hp-proof-bar p {
    font-size: 0.88rem;
    color: #374151;
    margin: 0;
    line-height: 1.55;
}
.hp-proof-bar a {
    color: var(--color-accent);
    font-weight: 600;
    text-decoration: none;
}
.hp-proof-bar a:hover { text-decoration: underline; }


/* =============================================
   16. HOMEPAGE — WHY HEXA PEPTIDES
   ============================================= */

.hp-why {
    padding: 5rem 0;
    background: var(--color-bg);
    border-top: 1px solid var(--color-border);
}
.hp-why-heading {
    text-align: center;
    font-size: clamp(1.3rem, 2.5vw, 1.85rem);
    color: var(--color-text);
    margin-bottom: 3rem;
    font-weight: 600;
}
.hp-why-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
    max-width: 860px;
    margin: 0 auto;
}
.hp-why-item {
    display: flex;
    align-items: flex-start;
    gap: 0.85rem;
    padding: 1.25rem;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 12px;
}
.hp-why-icon {
    flex-shrink: 0;
    font-size: 1.2rem;
    font-weight: 700;
    line-height: 1;
    color: #4a90d9;
    margin-top: 2px;
    display: inline-block;
}
.hp-why-item p {
    font-size: 0.9rem;
    color: var(--color-text-muted);
    margin: 0;
    line-height: 1.6;
}


/* =============================================
   17. HOMEPAGE — FEATURED PRODUCTS
   ============================================= */

.hp-products {
    padding: 5rem 0;
    background: var(--color-surface);
    border-top: 1px solid var(--color-border);
}
.hp-products-header {
    text-align: center;
    margin-bottom: 3rem;
}
.hp-products-header h2 {
    font-size: clamp(1.4rem, 2.5vw, 2rem);
    color: var(--color-text);
    margin-bottom: 0.5rem;
}
.hp-products-header p {
    font-size: 0.88rem;
    color: var(--color-text-muted);
    max-width: 500px;
    margin: 0 auto;
    line-height: 1.6;
}
.hp-products-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}
.hp-product-card {
    background: #ffffff;
    border: 1px solid var(--color-border);
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: box-shadow 0.22s ease, transform 0.22s ease;
}
.hp-product-card:hover {
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.09);
    transform: translateY(-2px);
}
.hp-product-card-img {
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: #f4f6f9;
}
.hp-product-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}
.hp-product-card:hover .hp-product-card-img img { transform: scale(1.04); }
.hp-product-card-body {
    padding: 1.1rem 1.2rem 1.3rem;
    display: flex;
    flex-direction: column;
    flex: 1;
    gap: 0.4rem;
}
.hp-product-card-name {
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 600;
    color: var(--color-text);
    text-decoration: none;
    line-height: 1.3;
    display: block;
}
.hp-product-card-name:hover { color: var(--color-accent); text-decoration: none; }
.hp-product-card-price {
    font-size: 1rem;
    font-weight: 700;
    color: var(--color-text);
}
.hp-product-card-price .woocommerce-Price-amount { font-size: inherit; font-weight: inherit; }
.hp-product-card-atc {
    margin-top: auto;
    padding-top: 0.9rem;
}
.hp-product-card-atc a.button,
.hp-product-card-atc a.add_to_cart_button {
    display: block !important;
    width: 100% !important;
    text-align: center !important;
    padding: 0.65rem 1rem !important;
    background-color: var(--color-accent) !important;
    color: #fff !important;
    border: none !important;
    border-radius: 8px !important;
    font-family: var(--font-body) !important;
    font-size: 0.88rem !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    text-decoration: none !important;
    transition: background-color 0.18s ease !important;
    box-sizing: border-box !important;
}
.hp-product-card-atc a.button:hover,
.hp-product-card-atc a.add_to_cart_button:hover {
    background-color: var(--color-accent-dark) !important;
    color: #fff !important;
    text-decoration: none !important;
}
.hp-products-view-all {
    text-align: center;
    margin-top: 2.25rem;
}


/* =============================================
   18. INTERIOR PAGES
   ============================================= */

.page-content {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 4rem var(--container-padding) 5rem;
}

.page-content h1 {
    font-size: clamp(1.5rem, 3vw, 2.25rem);
    margin-bottom: 2rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid var(--color-border);
}

.page-content .entry-content {
    max-width: 720px;
}
/* Cart page: override the 720px prose column so the two-column layout
 * (product table + totals sidebar) has the full container width to work with. */
.woocommerce-cart .page-content .entry-content {
    max-width: none;
}
.page-content .entry-content > * + * { margin-top: 1.1rem; }
.page-content .entry-content h2 { font-size: 1.35rem; margin-top: 2rem; }
.page-content .entry-content h3 { font-size: 1.1rem; margin-top: 1.5rem; }
.page-content .entry-content p  { color: var(--color-text-muted); font-size: 0.97rem; line-height: 1.75; }
.page-content .entry-content a  { color: var(--color-accent); text-decoration: underline; }
.page-content .entry-content a:hover { color: var(--color-accent-dark); }
.page-content .entry-content ul,
.page-content .entry-content ol { padding-left: 1.25rem; color: var(--color-text-muted); font-size: 0.97rem; line-height: 1.75; }
.page-content .entry-content ul { list-style: disc; }
.page-content .entry-content ol { list-style: decimal; }


/* =============================================
   15. CART ICON — NAV
   ============================================= */

.cart-toggle {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    color: var(--color-text-muted);
    transition: color var(--transition), background-color var(--transition);
    flex-shrink: 0;
}
.cart-toggle:hover { color: var(--color-text); background: var(--color-surface); }

.cart-badge {
    position: absolute;
    top: 0; right: 0;
    transform: translate(35%, -35%);
    display: none;
    align-items: center;
    justify-content: center;
    min-width: 17px;
    height: 17px;
    padding: 0 4px;
    background: var(--color-accent);
    color: #fff;
    font-size: 0.65rem;
    font-weight: 600;
    border-radius: 99px;
    line-height: 1;
    font-family: var(--font-body);
    pointer-events: none;
}
.cart-badge.visible { display: flex; }

/* Nav right cluster (cart + hamburger) */
.nav-actions {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}


/* =============================================
   16. SHOP PAGE — HEADER AREA
   ============================================= */

.shop-page-header {
    padding: 3.5rem 0 2rem;
    border-bottom: 1px solid var(--color-border);
}

.shop-page-header h1 {
    font-size: clamp(1.5rem, 3vw, 2rem);
    margin-bottom: 0.5rem;
}

.shop-ruo {
    font-size: 0.8rem;
    color: var(--color-text-muted);
    margin-bottom: 1.5rem;
}

.shop-filter {
    display: flex;
    align-items: center;
    max-width: 340px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    background: var(--color-bg);
    overflow: hidden;
    transition: border-color var(--transition);
}
.shop-filter:focus-within { border-color: var(--color-accent); }

.shop-filter svg { flex-shrink: 0; margin-left: 0.75rem; color: var(--color-text-muted); }

.shop-search {
    flex: 1;
    border: none;
    padding: 0.6rem 0.75rem;
    font-family: var(--font-body);
    font-size: 0.875rem;
    color: var(--color-text);
    background: transparent;
    outline: none;
}
.shop-search::placeholder { color: var(--color-text-muted); opacity: 0.7; }


/* =============================================
   17. SHOP PAGE — PRODUCT GRID
   ============================================= */

.shop-grid-section { padding: 2.5rem 0 5rem; }

.product-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.product-card {
    display: flex;
    flex-direction: column;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    background: var(--color-bg);
    overflow: hidden;
    transition: border-color var(--transition), box-shadow var(--transition);
}
.product-card:hover {
    border-color: var(--color-accent);
    box-shadow: 0 2px 12px rgba(74,144,217,0.1);
}

/* Product image */
.product-img-wrap {
    aspect-ratio: 1;
    background: var(--color-surface);
    border-bottom: 1px solid var(--color-border);
    overflow: hidden;
}
.product-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 1.25rem;
    display: block;
}
/* Legacy placeholder (kept for fallback) */
.product-img-placeholder {
    aspect-ratio: 1;
    background: var(--color-surface);
    border-bottom: 1px solid var(--color-border);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    padding: 1.5rem;
}
.product-img-placeholder svg { color: var(--color-border); }
.product-img-filename {
    font-family: 'Courier New', monospace;
    font-size: 0.68rem;
    color: var(--color-text-muted);
    opacity: 0.6;
    text-align: center;
    word-break: break-all;
}

/* Card body */
.product-card-body {
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: 1.25rem;
    gap: 0.3rem;
}

.product-name {
    font-family: var(--font-heading);
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--color-text);
    line-height: 1.3;
}

.product-dosage {
    font-size: 0.8rem;
    color: var(--color-text-muted);
    font-family: var(--font-body);
}

.product-price {
    font-size: 1rem;
    font-weight: 600;
    color: var(--color-text);
    margin-top: 0.4rem;
    font-family: var(--font-body);
}

.product-actions {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: auto;
    padding-top: 1rem;
}

/* Small button variant */
.btn-sm {
    padding: 0.5rem 1.1rem;
    font-size: 0.825rem;
}

/* Text-only link button */
.btn-link {
    background: none;
    border: none;
    padding: 0.25rem 0;
    font-size: 0.8rem;
    font-family: var(--font-body);
    color: var(--color-text-muted);
    text-decoration: underline;
    text-align: center;
    cursor: pointer;
    transition: color var(--transition);
}
.btn-link:hover { color: var(--color-accent); text-decoration: underline; }

/* Full-width button */
.btn-full { width: 100%; text-align: center; }

/* No-results message */
.shop-no-results {
    grid-column: 1 / -1;
    padding: 3rem;
    text-align: center;
    color: var(--color-text-muted);
    font-size: 0.95rem;
}


/* =============================================
   18. DRAWERS (shared)
   ============================================= */

body.drawer-open { overflow: hidden; }

.drawer {
    position: fixed;
    inset: 0;
    z-index: 400;
    visibility: hidden;
}
.drawer.is-open { visibility: visible; }

.drawer-overlay {
    position: absolute;
    inset: 0;
    background: rgba(10,15,26,0.5);
    opacity: 0;
    transition: opacity 0.25s ease;
}
.drawer.is-open .drawer-overlay { opacity: 1; }

.drawer-panel {
    position: absolute;
    top: 0; right: 0;
    height: 100%;
    width: 440px;
    max-width: 92vw;
    background: var(--color-bg);
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}
.drawer.is-open .drawer-panel { transform: translateX(0); }

.drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.1rem 1.5rem;
    border-bottom: 1px solid var(--color-border);
    flex-shrink: 0;
}
.drawer-title {
    font-family: var(--font-heading);
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--color-text);
}
.drawer-close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px; height: 30px;
    border-radius: var(--radius-sm);
    color: var(--color-text-muted);
    font-size: 1.1rem;
    transition: background-color var(--transition), color var(--transition);
    line-height: 1;
}
.drawer-close:hover { background: var(--color-surface); color: var(--color-text); }

.drawer-body {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
    -webkit-overflow-scrolling: touch;
}


/* =============================================
   19. PRODUCT DETAIL DRAWER
   ============================================= */

.pd-img-wrap { margin-bottom: 1.25rem; }
.pd-img-wrap .product-img-wrap {
    border-radius: var(--radius-md);
    border: 1px solid var(--color-border);
    aspect-ratio: 4 / 3;
}
.pd-img-wrap .product-img { padding: 1.5rem; }

.pd-info { display: flex; flex-direction: column; gap: 0.75rem; }

.pd-name {
    font-family: var(--font-heading);
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--color-text);
    line-height: 1.25;
}

.pd-dosage {
    font-size: 0.825rem;
    color: var(--color-text-muted);
    font-family: var(--font-body);
}

.pd-desc {
    font-size: 0.9rem;
    line-height: 1.7;
    color: var(--color-text-muted);
    padding: 0.75rem 0;
    border-top: 1px solid var(--color-border);
    border-bottom: 1px solid var(--color-border);
}

.pd-price {
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--color-text);
    font-family: var(--font-body);
}

/* Quantity control */
.pd-qty { display: flex; flex-direction: column; gap: 0.4rem; }
.pd-qty-label {
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--color-text-muted);
}

.qty-control {
    display: inline-flex;
    align-items: center;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    overflow: hidden;
    width: fit-content;
}
.qty-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px; height: 36px;
    background: var(--color-surface);
    border: none;
    font-size: 1rem;
    color: var(--color-text-muted);
    cursor: pointer;
    transition: background-color var(--transition), color var(--transition);
    user-select: none;
}
.qty-btn:hover { background: var(--color-border); color: var(--color-text); }

.qty-input {
    width: 50px;
    height: 36px;
    border: none;
    border-left: 1px solid var(--color-border);
    border-right: 1px solid var(--color-border);
    text-align: center;
    font-family: var(--font-body);
    font-size: 0.9rem;
    color: var(--color-text);
    outline: none;
    -moz-appearance: textfield;
}
.qty-input::-webkit-inner-spin-button,
.qty-input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }

.pd-coa {
    font-size: 0.8rem;
    color: var(--color-text-muted);
    line-height: 1.5;
}
.pd-coa a { color: var(--color-accent); text-decoration: underline; }
.pd-coa a:hover { color: var(--color-accent-dark); }

.pd-ruo {
    font-size: 0.75rem;
    color: var(--color-text-muted);
    opacity: 0.65;
    line-height: 1.5;
}

.pd-add-cart { margin-top: 0.25rem; }


/* =============================================
   20. CART DRAWER
   ============================================= */

.cart-panel { width: 380px; }

.cart-body { flex: 1; overflow-y: auto; padding: 1rem 1.5rem; }

.cart-empty {
    text-align: center;
    color: var(--color-text-muted);
    font-size: 0.9rem;
    padding: 2rem 0;
}

.cart-item {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.9rem 0;
    border-bottom: 1px solid var(--color-border);
}
.cart-item:first-child { border-top: 1px solid var(--color-border); }

.cart-item-info { flex: 1; }
.cart-item-name {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--color-text);
    font-family: var(--font-heading);
}
.cart-item-meta {
    font-size: 0.78rem;
    color: var(--color-text-muted);
    margin-top: 0.15rem;
}

.cart-item-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.4rem;
    flex-shrink: 0;
}
.cart-item-price { font-size: 0.9rem; font-weight: 600; color: var(--color-text); }

/* Quantity controls inside the cart drawer */
.cart-qty-control {
    display: flex;
    align-items: center;
    gap: 0;
    margin-top: 0.45rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    overflow: hidden;
    width: fit-content;
}
.cart-qty-control .qty-btn {
    width: 28px;
    height: 28px;
    font-size: 1rem;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-surface);
    color: var(--color-text);
    border: none;
    border-radius: 0;
    padding: 0;
    cursor: pointer;
    transition: background-color 0.15s ease;
}
.cart-qty-control .qty-btn:hover { background: var(--color-border); }
.cart-qty-control .qty-input {
    width: 36px;
    height: 28px;
    border: none;
    border-left: 1px solid var(--color-border);
    border-right: 1px solid var(--color-border);
    border-radius: 0;
    text-align: center;
    font-family: var(--font-body);
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--color-text);
    background: var(--color-bg);
    -moz-appearance: textfield;
    padding: 0;
    outline: none;
}
.cart-qty-control .qty-input::-webkit-inner-spin-button,
.cart-qty-control .qty-input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }

.cart-remove {
    font-size: 0.75rem;
    color: var(--color-text-muted);
    opacity: 0.5;
    transition: opacity var(--transition), color var(--transition);
    padding: 0;
    line-height: 1;
}
.cart-remove:hover { opacity: 1; color: #c53030; }

.cart-footer {
    padding: 1rem 1.5rem 1.25rem;
    border-top: 1px solid var(--color-border);
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    flex-shrink: 0;
}

.cart-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--color-text);
}

.cart-ruo {
    font-size: 0.7rem;
    color: var(--color-text-muted);
    opacity: 0.6;
    line-height: 1.5;
    text-align: center;
}


/* =============================================
   RESPONSIVE — TABLET (≤ 900px)
   ============================================= */

@media (max-width: 900px) {

    .hp-pillars-grid { grid-template-columns: 1fr 1fr; }

    /* New homepage sections — tablet */
    .hp-diff-grid     { grid-template-columns: 1fr; gap: 1.5rem; }
    .hp-diff          { padding: 3.5rem 0; }
    .hp-why-grid      { grid-template-columns: 1fr; }
    .hp-why           { padding: 3.5rem 0; }
    .hp-products-grid { grid-template-columns: repeat(2, 1fr); }
    .hp-products      { padding: 3.5rem 0; }

    .footer-top { flex-direction: column; gap: 1.5rem; }
    .footer-nav { gap: 0.25rem 1rem; }

    .product-grid { grid-template-columns: repeat(2, 1fr); }
}


/* =============================================
   16. STEPPER — DoorDash-style quantity control
   ============================================= */

/*
 * .hexa-stepper-wrap — invisible layout container; block + full-width so it
 * occupies exactly the same space as the button it replaces.
 */
.hexa-stepper-wrap { display: block; width: 100%; }

/*
 * The [−] qty [+] row.
 * Background, radius, and overflow: hidden give it the pill appearance.
 * min-height: 44px ensures WCAG 2.5.5 touch-target compliance on mobile.
 */
.hexa-stepper {
    display: flex;
    align-items: center;
    width: 100%;
    background: #4a90d9;
    border-radius: 8px;
    overflow: hidden;
    min-height: 44px;
    box-sizing: border-box;
    user-select: none;
}

/* − / + buttons */
.hexa-stepper-btn {
    flex-shrink: 0;
    min-width: 44px;   /* WCAG touch target */
    min-height: 44px;
    background: transparent;
    border: none;
    color: #ffffff;
    font-size: 1.25rem;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.15s ease;
    padding: 0;
    font-family: 'Inter', system-ui, sans-serif;
}
.hexa-stepper-btn:hover:not(:disabled) { background: rgba(255,255,255,0.18); }
.hexa-stepper-btn:active:not(:disabled) { background: rgba(255,255,255,0.28); }
.hexa-stepper-btn:disabled { opacity: 0.5; cursor: wait; }

/* Mobile tap fix: eliminate 300ms delay and suppress grey tap flash */
.hexa-stepper-btn,
.hexa-stepper-atc {
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

/* Qty number */
.hexa-stepper-qty {
    flex: 1;
    text-align: center;
    color: #ffffff;
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 1rem;
    font-weight: 600;
    pointer-events: none;
}

/*
 * Homepage featured cards (.hp-product-card-atc) use !important overrides
 * for a.button and a.add_to_cart_button. Match those rules for .hexa-stepper-atc
 * so the button looks identical in that context.
 */
.hp-product-card-atc .hexa-stepper-wrap { display: block; width: 100%; }
.hp-product-card-atc .hexa-stepper-atc {
    display: block; /* no !important — allows jQuery .hide() to set display:none */
    width: 100% !important;
    text-align: center !important;
    padding: 0.65rem 1rem !important;
    background-color: #4a90d9 !important;
    color: #ffffff !important;
    border: none !important;
    border-radius: 8px !important;
    font-family: 'Inter', system-ui, sans-serif !important;
    font-size: 0.88rem !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    text-decoration: none !important;
    transition: background-color 0.18s ease !important;
    box-sizing: border-box !important;
    min-height: 44px;
    line-height: 1.4;
}
.hp-product-card-atc .hexa-stepper-atc:hover:not(:disabled) {
    background-color: #2d6ab0 !important;
}
.hp-product-card-atc .hexa-stepper-atc:disabled {
    opacity: 0.65 !important;
    cursor: wait !important;
}

/*
 * Shop grid — the .product-actions container is display:flex flex-direction:column
 * so .hexa-stepper-wrap naturally fills the column width.
 */
.product-actions .hexa-stepper-wrap { width: 100%; }

/* =============================================
   17. RESPONSIVE — MOBILE (≤ 640px)
   ============================================= */

@media (max-width: 640px) {

    :root { --container-padding: 1.25rem; }

    .hp-hero  { padding: 4.5rem 0 4rem; }
    .hp-pillars { padding: 3.5rem 0; }
    .hp-about   { padding: 3rem 0 3.5rem; }
    .hp-cta-band { padding: 3.5rem 0; }

    .hp-pillars-grid { grid-template-columns: 1fr; gap: 1rem; }

    /* New homepage sections — mobile */
    .hp-hero-cta      { flex-direction: column; align-items: stretch; }
    .hp-hero-cta .btn { width: 100%; text-align: center; }
    .hp-diff-grid     { grid-template-columns: 1fr; gap: 1.25rem; }
    .hp-diff          { padding: 3rem 0; }
    .hp-why-grid      { grid-template-columns: 1fr; }
    .hp-why           { padding: 3rem 0; }
    .hp-why-heading   { font-size: 1.2rem; margin-bottom: 1.5rem; }
    .hp-products-grid { grid-template-columns: 1fr; }
    .hp-products      { padding: 3rem 0; }
    .hp-products-header h2 { font-size: 1.35rem; }

    .footer-nav { flex-direction: column; gap: 0; }
    .footer-nav a { padding: 0.35rem 0; display: block; }

    .product-grid { grid-template-columns: 1fr; }

    .shop-filter { max-width: 100%; }

    .drawer-panel { width: 100%; max-width: 100%; }
}


/* =============================================
   21. WOOCOMMERCE — GLOBAL / NOTICES
   ============================================= */

/* Notices — collapse wrapper when empty so it adds no blank space */
.woocommerce-notices-wrapper { margin-bottom: 1.5rem; }
.woocommerce-notices-wrapper:empty { display: none; margin: 0; }

.woocommerce-message,
.woocommerce-info,
.woocommerce-error {
    font-family: var(--font-body);
    font-size: 0.875rem;
    padding: 0.85rem 1.25rem;
    border-radius: var(--radius-sm);
    margin-bottom: 0.75rem;
}
.woocommerce-message { background: #f2fbf2; border-left: 3px solid #3a8a3a; color: #1e4d1e; }
.woocommerce-info    { background: var(--color-surface); border-left: 3px solid var(--color-accent); color: var(--color-text); }
.woocommerce-error   { background: #fff5f5; border-left: 3px solid #c53030; color: #9b1c1c; }
.woocommerce-error li { list-style: none; }

/* Inherited button base for WooCommerce-generated buttons */
.woocommerce a.button,
.woocommerce button.button,
.woocommerce input.button {
    font-family: var(--font-body);
    font-size: 0.875rem;
    font-weight: 500;
    letter-spacing: 0.02em;
    cursor: pointer;
    border: none;
    border-radius: var(--radius-sm);
    text-decoration: none;
    transition: background-color var(--transition), color var(--transition);
}
.woocommerce a.button.alt,
.woocommerce button.button.alt,
.woocommerce #respond input#submit.alt {
    background: var(--color-accent);
    color: #fff;
    padding: 0.75rem 1.5rem;
}
.woocommerce a.button.alt:hover,
.woocommerce button.button.alt:hover { background: var(--color-accent-dark); color: #fff; }


/* =============================================
   22. WOOCOMMERCE — CART PAGE
   ============================================= */

/* WooCommerce page outer wrapper (woocommerce.php template) */
.wc-main {
    padding-bottom: 2rem;
}
.wc-page-title-bar {
    padding-top: 2.5rem;
    padding-bottom: 0;
}
.wc-page-title {
    font-family: var(--font-heading);
    font-size: clamp(1.5rem, 3vw, 2.25rem);
    font-weight: 400;
    color: var(--color-text);
    margin-bottom: 0;
}

/* Cart page two-column layout.
 * Targets the standard WooCommerce class names used in the default cart
 * template — no invented classes. The .woocommerce div is our outer wrapper;
 * .woocommerce-cart-form is the product table; .cart-collaterals is the totals
 * sidebar. WooCommerce's own stylesheet is dequeued so we handle this here.
 * Using padding-top/bottom (not padding shorthand) so .container's horizontal
 * padding (0 2rem) is not accidentally overridden. */
.woocommerce-cart .woocommerce {
    display: flex !important;
    gap: 2.5rem;
    align-items: flex-start;
    padding-top: 0.5rem;
    padding-bottom: 5rem;
}
.woocommerce-cart .woocommerce-cart-form { flex: 1 1 auto !important; min-width: 0; }
.woocommerce-cart .cart-collaterals {
    flex: 0 0 340px !important;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    position: sticky;
    top: calc(var(--header-height) + 1.5rem);
    min-width: 0;
}

/* Cart table */
.wc-cart-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}
.wc-cart-table thead th {
    text-align: left;
    padding: 0 0.75rem 0.85rem;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: var(--color-text-muted);
    border-bottom: 2px solid var(--color-border);
}
.wc-cart-table thead .product-price,
.wc-cart-table thead .product-quantity,
.wc-cart-table thead .product-subtotal { text-align: right; }
/* remove column is now the last column — narrow, right-aligned */
.wc-cart-table thead .product-remove    { width: 90px; text-align: right; }
.wc-cart-table thead .product-thumbnail { width: 80px; }

.wc-cart-table tbody td {
    padding: 0.9rem 0.75rem;
    border-bottom: 1px solid var(--color-border);
    vertical-align: middle;
    color: var(--color-text);
}
.wc-cart-table tbody .product-price,
.wc-cart-table tbody .product-subtotal { text-align: right; font-weight: 600; }
.wc-cart-table tbody .product-quantity { text-align: right; }
/* remove button cell — right-aligned in its last column */
.wc-cart-table tbody .product-remove   { text-align: right; }

/* Remove link (legacy class kept for compat) */
.wc-remove-item {
    font-size: 0.75rem;
    color: var(--color-text-muted);
    text-decoration: underline;
    transition: color var(--transition);
}
.wc-remove-item:hover { color: #c53030; }

/* ── Styled remove pill button (replaces plain × link) ── */
.hexa-remove-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.3rem 0.7rem;
    border: 1px solid #fca5a5;
    border-radius: 100px;
    background: #fff8f8;
    color: #dc2626;
    font-size: 0.72rem;
    font-weight: 500;
    font-family: var(--font-body);
    line-height: 1;
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
    transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
    min-height: 30px;
    vertical-align: middle;
}
.hexa-remove-btn svg { flex-shrink: 0; }
.hexa-remove-btn:hover {
    background: #fee2e2;
    border-color: #f87171;
    color: #b91c1c;
    text-decoration: none;
}

/* Product thumbnail in cart — hard-sized so AJAX fragment refreshes can't
 * collapse the cell to a sliver. Targets both our custom class and WC's own
 * class so the rule applies whether rendered by our template or WC default. */
.wc-cart-table .product-thumbnail,
.woocommerce-cart-form__contents td.product-thumbnail,
body.woocommerce-cart table.shop_table td.product-thumbnail {
    width: 90px !important;
    min-width: 90px !important;
    padding-right: 0.25rem;
}
.wc-cart-table .product-thumbnail a,
.woocommerce-cart-form__contents td.product-thumbnail a,
body.woocommerce-cart table.shop_table td.product-thumbnail a {
    display: block !important;
    width: 80px !important;
    height: 80px !important;
    flex-shrink: 0;
}
.wc-cart-table .product-thumbnail img,
.woocommerce-cart-form__contents td.product-thumbnail img,
body.woocommerce-cart table.shop_table td.product-thumbnail img {
    width: 80px !important;
    height: 80px !important;
    min-width: 80px !important;
    min-height: 80px !important;
    object-fit: cover !important;
    object-position: center !important;
    border-radius: var(--radius-sm);
    display: block !important;
}

/* Product name column — min-width prevents it collapsing when other columns
   have fixed or long content. overflow:visible ensures nothing gets clipped. */
.wc-cart-table td.product-name {
    min-width: 140px;
    overflow: visible;
}

/* Product name in cart */
.wc-product-name {
    font-family: var(--font-heading);
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--color-text);
}
.wc-product-name:hover { color: var(--color-accent); }

/* Variation / dosage displayed below name */
.woocommerce-cart-form dl.variation,
.wc-cart-table dl.variation { margin-top: 0.2rem; }
.woocommerce-cart-form dl.variation dt,
.wc-cart-table dl.variation dt { display: inline; font-size: 0.78rem; color: var(--color-text-muted); font-weight: 600; }
.woocommerce-cart-form dl.variation dd,
.wc-cart-table dl.variation dd { display: inline; font-size: 0.78rem; color: var(--color-text-muted); margin: 0 0.5rem 0 0.2rem; }

/* ── Stepper inside cart quantity cell ── */
.cart-qty-stepper.hexa-stepper-wrap {
    display: inline-block;
    width: auto;          /* override the global width: 100% on .hexa-stepper-wrap */
}
.cart-qty-stepper .hexa-stepper {
    width: 136px;
    min-height: 40px;
    border-radius: 6px;
}
.cart-qty-stepper .hexa-stepper-btn {
    min-width: 40px;
    min-height: 40px;
    font-size: 1.15rem;
}
.cart-qty-stepper .hexa-stepper-qty { font-size: 0.95rem; }

/* WooCommerce qty input in cart table */
.wc-cart-table .quantity { display: inline-flex; justify-content: flex-end; }
.wc-cart-table .qty {
    width: 60px;
    padding: 0.4rem 0.5rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    font-family: var(--font-body);
    font-size: 0.875rem;
    text-align: center;
    color: var(--color-text);
    background: var(--color-bg);
    outline: none;
    -moz-appearance: textfield;
    transition: border-color var(--transition);
}
.wc-cart-table .qty:focus { border-color: var(--color-accent); }
.wc-cart-table .qty::-webkit-inner-spin-button,
.wc-cart-table .qty::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }

/* Actions row */
.wc-cart-table .actions {
    padding: 12px 0 !important;
    border-top: none;
    border-bottom: none;
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    flex-wrap: wrap;
}
.actions .coupon { display: flex; align-items: center; gap: 0.5rem; flex: 1; }

.wc-coupon-input,
#coupon_code {
    flex: 1;
    min-width: 160px !important; /* prevent collapsing in narrow layouts */
    max-width: 240px;
    padding: 0.45rem 0.75rem;
    border: 1px solid #d1d5db !important;
    border-radius: var(--radius-sm);
    font-family: var(--font-body);
    font-size: 0.825rem;
    color: #111827 !important;
    background-color: #ffffff !important; /* explicit — never inherits dark surface */
    outline: none;
    transition: border-color var(--transition);
}
.wc-coupon-input:focus,
#coupon_code:focus { border-color: var(--color-accent) !important; }
.wc-coupon-input::placeholder,
#coupon_code::placeholder { color: var(--color-text-muted); opacity: 0.7; }

.wc-apply-coupon,
.woocommerce-cart .button[name="apply_coupon"] {
    background-color: #4a90d9 !important;
    border: 1px solid #4a90d9 !important;
    color: #ffffff !important;
    padding: 0.45rem 0.9rem;
    font-size: 0.8rem;
    border-radius: var(--radius-sm);
    font-family: var(--font-body);
    cursor: pointer;
    transition: background-color var(--transition);
}
.wc-apply-coupon:hover,
.woocommerce-cart .button[name="apply_coupon"]:hover { background-color: #3a7bc8 !important; border-color: #3a7bc8 !important; }

.wc-update-cart,
.woocommerce-cart .button[name="update_cart"] {
    background-color: transparent;
    border: 1px solid var(--color-border);
    color: var(--color-text-muted);
    padding: 0.45rem 1rem;
    font-size: 0.8rem;
    font-family: var(--font-body);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: border-color var(--transition), color var(--transition);
}
.wc-update-cart:hover,
.woocommerce-cart .button[name="update_cart"]:hover { border-color: var(--color-accent); color: var(--color-text); }

/* Cart totals (rendered by WooCommerce cart-totals.php) */
.cart_totals {
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    overflow: hidden;
}
.cart_totals h2 {
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 600;
    padding: 0.6rem 1.25rem;
    border-bottom: 1px solid var(--color-border);
    color: var(--color-text);
}
.cart_totals .shop_table { width: 100%; border-collapse: collapse; }
.cart_totals .shop_table th,
.cart_totals .shop_table td {
    padding: 0.75rem 1.25rem;
    font-size: 0.875rem;
    color: var(--color-text);
    border-bottom: 1px solid var(--color-border);
    vertical-align: middle;
}
.cart_totals .shop_table th { font-weight: 500; color: var(--color-text-muted); text-align: left; }
.cart_totals .shop_table td { text-align: right; }
.cart_totals .order-total th,
.cart_totals .order-total td { font-weight: 700; font-size: 1rem; border-bottom: none; }
.cart_totals .woocommerce-shipping-destination { display: none; }
.cart_totals .wc-proceed-to-checkout { padding: 1.25rem; }
/* Proceed to Checkout button — brand blue.
 * WooCommerce adds classes: checkout-button button alt wc-forward
 * We target both .alt (the exact WC class) and the specific wrapper
 * selectors to beat WooCommerce's own woocommerce.css at any specificity. */
.cart_totals .checkout-button,
a.checkout-button,
.wc-proceed-to-checkout a,
.wc-proceed-to-checkout a.checkout-button,
.woocommerce a.button.alt,
.woocommerce button.button.alt,
.woocommerce-page a.button.alt,
body .woocommerce .wc-proceed-to-checkout a {
    display: block;
    width: 100%;
    text-align: center;
    padding: 0.75rem 1.5rem;
    background-color: #4a90d9 !important;
    background: #4a90d9 !important;
    color: #ffffff !important;
    border-radius: var(--radius-sm);
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    transition: background-color var(--transition);
    text-decoration: none;
    border: none !important;
}
.cart_totals .checkout-button:hover,
a.checkout-button:hover,
.wc-proceed-to-checkout a:hover,
.woocommerce a.button.alt:hover,
.woocommerce button.button.alt:hover,
.woocommerce-page a.button.alt:hover,
body .woocommerce .wc-proceed-to-checkout a:hover {
    background-color: #3a7bc8 !important;
    background: #3a7bc8 !important;
    color: #ffffff !important;
    text-decoration: none;
}

/* ── Shipping row ────────────────────────────────────────────────────────── */
table.shop_table .woocommerce-shipping-totals th {
    vertical-align: middle !important;
    font-weight: 500 !important;
    color: var(--color-text-muted) !important;
}
table.shop_table .woocommerce-shipping-totals td {
    vertical-align: middle !important;
    padding: 0.75rem 1.25rem !important;
    font-size: 0.9rem !important;
    text-align: right !important; /* match Subtotal/Total rows */
}
/* shipping_method list — single rate, rendered inline with the td text */
.woocommerce-shipping-totals ul#shipping_method {
    margin: 0 !important;
    padding: 0 !important;
    list-style: none !important;
}
.woocommerce-shipping-totals ul#shipping_method li {
    margin: 0 !important;
}
/* Hide radio input when only one shipping method */
.woocommerce-shipping-totals ul#shipping_method li input[type="radio"] { display: none !important; }
.woocommerce-shipping-totals ul#shipping_method li label { font-size: 0.9rem !important; margin: 0 !important; }
.cart_totals .woocommerce-shipping-destination { display: none !important; }
.cart_totals .shipping-calculator-button { display: none !important; }

/* Prevent shipping row from wrapping onto two lines */
.woocommerce-shipping-totals th,
.woocommerce-shipping-totals td { white-space: nowrap; }
.woocommerce-shipping-totals ul#shipping_method li label { white-space: nowrap !important; }

/* ── Coupon row inside cart totals table ────────────────────────────────── */
/* Override the right-aligned td default from .cart_totals .shop_table td  */
.woocommerce-cart .coupon-row td,
tr.coupon-row td {
    padding: 8px 1.25rem 12px !important; /* match horizontal padding of other rows */
    text-align: left !important;
}
tr.coupon-row .coupon-inner {
    display: flex !important;
    gap: 6px !important;
    align-items: center !important;
    justify-content: flex-start !important;
    max-width: 260px !important; /* keeps the row compact inside the 320px sidebar */
}
tr.coupon-row input[name="coupon_code"] {
    flex: 1 1 auto !important;
    min-width: 0 !important;
    max-width: 160px !important;
    padding: 6px 10px !important;
    font-size: 13px !important;
    border: 1px solid #d1d5db !important;
    border-radius: 6px !important;
    background: #fff !important;
    color: #111 !important;
    box-sizing: border-box !important;
}
tr.coupon-row button[name="apply_coupon"] {
    flex: 0 0 auto !important;
    padding: 6px 14px !important;
    font-size: 13px !important;
    white-space: nowrap !important;
    background: #4a90d9 !important;
    color: #fff !important;
    border: none !important;
    border-radius: 6px !important;
    cursor: pointer !important;
}

/* ── Brand blue on all cart buttons ─────────────────────────────────────── */
.woocommerce-cart .button,
.woocommerce-cart a.button,
.woocommerce-cart input.button,
.woocommerce-cart button.button,
button[name="apply_coupon"],
button[name="update_cart"],
.wc-proceed-to-checkout a {
    background-color: #4a90d9 !important;
    color: #ffffff !important;
    border: none !important;
    border-radius: 6px !important;
}
.woocommerce-cart .button:hover,
.woocommerce-cart a.button:hover,
.woocommerce-cart input.button:hover,
.woocommerce-cart button.button:hover,
button[name="apply_coupon"]:hover,
button[name="update_cart"]:hover,
.wc-proceed-to-checkout a:hover {
    background-color: #3a7bc8 !important;
    color: #ffffff !important;
}

/* ── Shipping nudge — brand blue palette ────────────────────────────────── */
#hexa-shipping-nudge {
    color: #4a90d9 !important;
    border-color: #bfdbfe !important;
    background: #eff6ff !important;
}

/* ── Coupon field — always visible ────────────────────────────────────────
 * Traditional cart template: the .coupon div is already display:flex above.
 * Belt-and-suspenders !important in case WooCommerce JS forces display:none.
 * Block cart: hide the "Add coupon code" toggle button and permanently reveal
 * the input panel so there is zero friction to enter a code.
 * ──────────────────────────────────────────────────────────────────────── */

/* Traditional cart */
.actions .coupon { display: flex !important; }

/* WooCommerce block cart (Gutenberg) */
.wc-block-components-totals-coupon__content {
    display: block !important;
}
/* Hide the expand toggle — the input is already open */
.wc-block-components-totals-coupon > button.wc-block-components-totals-coupon__button {
    display: none !important;
}

/* ── Free-shipping nudge (rendered via woocommerce_proceed_to_checkout hook) */
.hx-shipping-nudge {
    font-family: var(--font-body);
    font-size: 0.85rem;
    line-height: 1.55;
    border-radius: var(--radius-sm);
    padding: 0.65rem 1rem;
    margin: 0 1.25rem 0.75rem;
}
.hx-shipping-nudge--pending {
    color: #1d4ed8;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
}
.hx-shipping-nudge--met {
    color: #15803d;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
}

/* ── Trust badges (shared with single-product page) ─────────────────────── */
.sp-trust-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1.25rem;
    margin: 0.9rem 0 0.25rem;
}
.sp-badge {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.75rem;
    font-weight: 500;
    color: #52525a;
    font-family: var(--font-body);
    line-height: 1;
}
.sp-badge svg { color: #4a90d9; flex-shrink: 0; }

/* ── Cart trust block (below cart_totals) ─────────────────────────────── */
.cart-trust-block {
    padding: 0.9rem 1.25rem 0.85rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    background: var(--color-surface);
}
.cart-trust-block .sp-trust-badges.cart-trust-badges {
    justify-content: center;
    margin: 0 0 0.65rem;
    gap: 0.4rem 1.25rem;
}

/* ── Payment method pills ─────────────────────────────────────────────── */
.wc-payment-methods {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.35rem;
}
.wc-payment-label {
    font-size: 0.72rem;
    color: var(--color-text-muted);
    font-family: var(--font-body);
}
.wc-payment-pill {
    display: inline-block;
    padding: 0.12rem 0.55rem;
    border: 1px solid var(--color-border);
    border-radius: 100px;
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--color-text-muted);
    background: #ffffff;
    font-family: var(--font-body);
    line-height: 1.6;
    white-space: nowrap;
}

/* Cart sidebar extras */
.wc-continue-shopping {
    display: block;
    text-align: center;
    font-family: var(--font-body);
    font-size: 0.82rem;
    color: var(--color-text-muted);
    text-decoration: underline;
    cursor: pointer;
    transition: color var(--transition);
}
.wc-continue-shopping:hover { color: var(--color-accent); }

.wc-ruo-notice {
    font-size: 0.72rem;
    color: var(--color-text-muted);
    opacity: 0.65;
    line-height: 1.5;
    text-align: center;
}


/* =============================================
   23. WOOCOMMERCE — CHECKOUT PAGE
   ============================================= */

.wc-checkout-layout {
    display: flex;
    gap: 3rem;
    align-items: flex-start;
    padding: 3rem 0 5rem;
}
.wc-checkout-details { flex: 1 1 55%; min-width: 0; }
.wc-checkout-summary {
    flex: 0 0 380px;
    position: sticky;
    top: calc(var(--header-height) + 1.5rem);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    overflow: hidden;
}

/* Section headings */
.woocommerce-billing-fields > h3,
.woocommerce-additional-fields > h3 {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--color-text);
    margin-bottom: 1.25rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--color-border);
}
.woocommerce-additional-fields > h3 { margin-top: 2rem; }

/* #order_review_heading is replaced by our .wc-summary-heading */
#order_review_heading { display: none; }

.wc-summary-heading {
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 600;
    color: var(--color-text);
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--color-border);
    margin: 0;
}

/* Form rows */
.woocommerce-checkout .form-row { margin-bottom: 1rem; }

.woocommerce-checkout .form-row label {
    display: block;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--color-text-muted);
    margin-bottom: 0.4rem;
}
.woocommerce-checkout .form-row .required { color: var(--color-accent); margin-left: 0.1em; }

.woocommerce-checkout .form-row input[type="text"],
.woocommerce-checkout .form-row input[type="email"],
.woocommerce-checkout .form-row input[type="tel"],
.woocommerce-checkout .form-row input[type="number"],
.woocommerce-checkout .form-row input[type="password"],
.woocommerce-checkout .form-row select,
.woocommerce-checkout .form-row textarea {
    display: block;
    width: 100%;
    padding: 0.6rem 0.875rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    font-family: var(--font-body);
    font-size: 0.9rem;
    color: var(--color-text);
    background: var(--color-bg);
    outline: none;
    transition: border-color var(--transition);
    -webkit-appearance: none;
    appearance: none;
}
.woocommerce-checkout .form-row input:focus,
.woocommerce-checkout .form-row select:focus,
.woocommerce-checkout .form-row textarea:focus { border-color: var(--color-accent); }

.woocommerce-checkout .form-row textarea { resize: vertical; min-height: 80px; line-height: 1.55; }

/* Inline validation */
.woocommerce-checkout .form-row.woocommerce-invalid input,
.woocommerce-checkout .form-row.woocommerce-invalid select,
.woocommerce-checkout .form-row.woocommerce-invalid textarea { border-color: #c53030; }

/* Side-by-side first / last name */
.woocommerce-checkout .form-row-first,
.woocommerce-checkout .form-row-last {
    float: left;
    width: calc(50% - 0.5rem);
}
.woocommerce-checkout .form-row-first { margin-right: 1rem; }
.woocommerce-checkout .form-row-wide  { clear: both; width: 100%; }
.woocommerce-billing-fields__field-wrapper::after,
#customer_details::after { content: ''; display: table; clear: both; }

/* Order review table inside right column */
.woocommerce-checkout-review-order-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}
.woocommerce-checkout-review-order-table thead th {
    padding: 0.75rem 1.25rem;
    background: var(--color-surface);
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--color-text-muted);
    border-bottom: 1px solid var(--color-border);
    text-align: left;
}
.woocommerce-checkout-review-order-table thead .product-total { text-align: right; }
.woocommerce-checkout-review-order-table tbody td,
.woocommerce-checkout-review-order-table tfoot th,
.woocommerce-checkout-review-order-table tfoot td {
    padding: 0.7rem 1.25rem;
    border-bottom: 1px solid var(--color-border);
    color: var(--color-text);
    vertical-align: middle;
}
.woocommerce-checkout-review-order-table .product-total { text-align: right; font-weight: 600; }
.woocommerce-checkout-review-order-table .cart-subtotal th,
.woocommerce-checkout-review-order-table .shipping th,
.woocommerce-checkout-review-order-table .order-total th { color: var(--color-text-muted); font-weight: 500; }
.woocommerce-checkout-review-order-table .cart-subtotal td,
.woocommerce-checkout-review-order-table .shipping td,
.woocommerce-checkout-review-order-table .order-total td { text-align: right; }
.woocommerce-checkout-review-order-table .order-total th,
.woocommerce-checkout-review-order-table .order-total td { font-weight: 700; font-size: 0.95rem; border-bottom: none; }
.woocommerce-checkout-review-order-table .product-quantity { color: var(--color-text-muted); font-size: 0.8rem; }

/* Payment section */
#payment {
    background: var(--color-surface);
    border-top: 1px solid var(--color-border);
    padding: 1.25rem;
}
#payment ul.payment_methods { margin: 0 0 1.25rem; list-style: none; }
#payment ul.payment_methods li {
    padding: 0.7rem 0;
    border-bottom: 1px solid var(--color-border);
}
#payment ul.payment_methods li:last-child { border-bottom: none; }
#payment ul.payment_methods li label {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--color-text);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-transform: none;
    letter-spacing: 0;
}
#payment ul.payment_methods li input[type="radio"] { accent-color: var(--color-accent); }
#payment .payment_box {
    margin-top: 0.75rem;
    padding: 0.75rem;
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    font-size: 0.83rem;
    color: var(--color-text-muted);
    line-height: 1.55;
}

/* RUO checkbox before Place Order */
.woocommerce-checkout .ruo_confirmation_field {
    margin: 0 0 1.25rem;
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
}
.woocommerce-checkout .ruo_confirmation_field label {
    font-size: 0.8rem;
    color: var(--color-text);
    font-weight: 400;
    text-transform: none;
    letter-spacing: 0;
    line-height: 1.5;
    cursor: pointer;
}
.woocommerce-checkout .ruo_confirmation_field input[type="checkbox"] {
    margin-top: 0.2rem;
    flex-shrink: 0;
    accent-color: var(--color-accent);
    width: 15px;
    height: 15px;
}

/* Place Order button */
#place_order {
    display: block;
    width: 100%;
    padding: 0.9rem 1.5rem;
    background: var(--color-accent);
    color: #fff;
    border: none;
    border-radius: var(--radius-sm);
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 500;
    letter-spacing: 0.02em;
    cursor: pointer;
    transition: background-color var(--transition);
    text-align: center;
}
#place_order:hover { background: var(--color-accent-dark); }

.woocommerce-privacy-policy-text {
    font-size: 0.72rem;
    color: var(--color-text-muted);
    margin-top: 0.75rem;
    text-align: center;
    line-height: 1.5;
}
.woocommerce-privacy-policy-text a { color: var(--color-accent); text-decoration: underline; }


/* =============================================
   24. WOOCOMMERCE — THANK YOU PAGE
   ============================================= */

.wc-thankyou {
    max-width: 720px;
    margin: 0 auto;
    padding: 4rem 0 6rem;
}

.wc-thankyou-header {
    text-align: center;
    padding-bottom: 2.5rem;
    border-bottom: 1px solid var(--color-border);
    margin-bottom: 2rem;
}
.wc-thankyou-heading {
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 700;
    color: var(--color-text);
    margin-bottom: 0.75rem;
}
.wc-thankyou-message {
    font-size: 1rem;
    color: var(--color-text-muted);
    line-height: 1.65;
    max-width: 520px;
    margin: 0 auto;
}

/* Order meta strip */
.woocommerce-thankyou-order-details {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem 2.5rem;
    padding: 1.25rem 1.5rem;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    margin-bottom: 2rem;
    list-style: none;
}
.woocommerce-thankyou-order-details li {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    font-size: 0.875rem;
    color: var(--color-text);
}
.woocommerce-thankyou-order-details .wc-meta-label {
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--color-text-muted);
}
.woocommerce-thankyou-order-details li strong { font-weight: 600; }

/* Order items table on thank you page */
.woocommerce-table--order-details {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
    margin-bottom: 2rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    overflow: hidden;
}
.woocommerce-table--order-details thead th {
    padding: 0.75rem 1rem;
    background: var(--color-surface);
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--color-text-muted);
    border-bottom: 1px solid var(--color-border);
    text-align: left;
}
.woocommerce-table--order-details tbody td,
.woocommerce-table--order-details tfoot th,
.woocommerce-table--order-details tfoot td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--color-border);
    color: var(--color-text);
    vertical-align: middle;
}
.woocommerce-table--order-details tfoot tr:last-child td,
.woocommerce-table--order-details tfoot tr:last-child th { border-bottom: none; font-weight: 700; }
.woocommerce-table--order-details .product-total { text-align: right; font-weight: 600; }

/* Customer / billing address block */
.woocommerce-customer-details { margin-bottom: 2rem; }
.woocommerce-customer-details h2 {
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 600;
    color: var(--color-text);
    margin-bottom: 0.75rem;
}
.woocommerce-customer-details address {
    font-size: 0.9rem;
    color: var(--color-text);
    line-height: 1.7;
    padding: 1.25rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
}

.wc-thankyou-coa {
    font-size: 0.875rem;
    color: var(--color-text-muted);
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--color-border);
    text-align: center;
    line-height: 1.55;
}
.wc-thankyou-coa a { color: var(--color-accent); text-decoration: underline; }
.wc-thankyou-coa a:hover { color: var(--color-accent-dark); }

.wc-thankyou-ruo {
    font-size: 0.75rem;
    color: var(--color-text-muted);
    opacity: 0.6;
    line-height: 1.5;
    text-align: center;
    margin-top: 0.75rem;
}


/* =============================================
   25. WOOCOMMERCE — RESPONSIVE
   ============================================= */

@media (max-width: 900px) {
    .woocommerce-cart .woocommerce {
        flex-direction: column !important;
        align-items: stretch !important; /* children fill full width when stacked */
    }
    .woocommerce-cart .woocommerce-cart-form { width: 100%; }
    .woocommerce-cart .cart-collaterals {
        flex: none !important;
        width: 100% !important;
        position: static !important;
    }

    .wc-checkout-layout {
        flex-direction: column;
    }
    .wc-checkout-summary {
        flex: none;
        width: 100%;
        position: static;
    }
}

@media (max-width: 640px) {
    /* Tighten gap between "Cart" heading and cart items */
    .woocommerce-cart .woocommerce {
        padding-top: 0.25rem;
        padding-bottom: 3rem;
    }

    /* ── Mobile cart: card-based layout ─────────────────────────────────── */
    /* Convert <table> structure to block so CSS Grid controls each row.
     * Each row becomes a 3-column card:
     *   Col 1 — product image (88 px fixed)
     *   Col 2 — compound name / unit price / quantity stepper (1fr)
     *   Col 3 — remove icon button (40 px touch target)
     * Grid areas explicitly position every cell regardless of DOM order. */
    .wc-cart-table { display: block; }
    .wc-cart-table thead { display: none !important; }
    .wc-cart-table tbody { display: block; }

    .wc-cart-table tbody tr.woocommerce-cart-form__cart-item {
        display: grid;
        grid-template-columns: 88px 1fr 40px;
        grid-template-areas:
            "thumb name   remove"
            "thumb price  ."
            "thumb qty    .";
        column-gap: 12px;
        row-gap: 0;
        padding: 16px 0;
        border-top: none;
        border-bottom: 1px solid var(--color-border);
        position: relative;
    }

    /* All tds: reset to block, strip table-cell padding & pseudo-labels */
    .wc-cart-table tbody td {
        display: block;
        padding: 0;
        border: none;
        text-align: left;
    }
    .wc-cart-table tbody td::before { display: none !important; content: none !important; }

    /* ── Thumbnail — left column, all rows ─── */
    .wc-cart-table tbody td.product-thumbnail {
        grid-area: thumb;
        align-self: start;
    }
    /* override desktop fixed-width rules so image fills the thumb column */
    .wc-cart-table tbody td.product-thumbnail,
    .woocommerce-cart-form__contents td.product-thumbnail,
    body.woocommerce-cart table.shop_table td.product-thumbnail {
        width: 88px !important;
        min-width: 88px !important;
        padding-right: 0 !important;
    }
    .wc-cart-table tbody td.product-thumbnail a,
    .woocommerce-cart-form__contents td.product-thumbnail a,
    body.woocommerce-cart table.shop_table td.product-thumbnail a {
        display: block !important;
        width: 80px !important;
        height: 80px !important;
    }
    .wc-cart-table tbody td.product-thumbnail img,
    .woocommerce-cart-form__contents td.product-thumbnail img,
    body.woocommerce-cart table.shop_table td.product-thumbnail img {
        width: 80px !important;
        height: 80px !important;
        min-width: 80px !important;
        min-height: 80px !important;
        border-radius: 8px;
    }

    /* ── Compound name — middle col, row 1 ─── */
    .wc-cart-table tbody td.product-name {
        grid-area: name;
        font-size: 0.875rem;
        font-weight: 500;
        align-self: end;          /* pin to bottom of row 1 so it sits near the price */
        padding-bottom: 3px;
        min-width: 0;
        overflow: visible;
    }
    .wc-cart-table tbody td.product-name a {
        color: var(--color-text, #111827);
        text-decoration: none;
        font-weight: 500;
        font-size: 0.875rem;
        font-family: var(--font-body, inherit);
    }

    /* ── Unit price — middle col, row 2 ─── */
    .wc-cart-table tbody td.product-price {
        grid-area: price;
        color: #6b7280;
        font-size: 0.82rem;
        font-weight: 400;
        text-align: left;
        align-self: start;
        padding-top: 2px;
    }

    /* ── Quantity stepper — middle col, row 3 ─── */
    .wc-cart-table tbody td.product-quantity {
        grid-area: qty;
        padding-top: 8px;
    }

    /* ── Subtotal — hidden on mobile (unit price is enough) ─── */
    .wc-cart-table tbody td.product-subtotal { display: none !important; }

    /* ── Remove — right col, row 1 ─── */
    .wc-cart-table tbody td.product-remove {
        grid-area: remove;
        align-self: start;
        justify-self: center;
        padding: 0;
    }

    /* Remove button: icon-only ghost on mobile (44 × 40 touch area) */
    .wc-cart-table tbody td.product-remove .hexa-remove-btn {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        width: 40px !important;
        height: 40px !important;
        min-height: 40px !important;
        padding: 0 !important;
        border: none !important;
        background: transparent !important;
        color: #9ca3af !important;
        font-size: 0 !important;    /* hide "Remove" text on mobile */
        gap: 0 !important;
    }
    .wc-cart-table tbody td.product-remove .hexa-remove-btn svg {
        width: 16px !important;
        height: 16px !important;
        flex-shrink: 0 !important;
    }
    .wc-cart-table tbody td.product-remove .hexa-remove-btn:hover {
        background: transparent !important;
        border: none !important;
        color: #dc2626 !important;
    }

    /* "Remove" text label — visible on desktop, hidden on mobile */
    .remove-label { display: none; }

    /* Cart stepper: constrained to content column width */
    .cart-qty-stepper.hexa-stepper-wrap { display: block; width: auto; }
    .cart-qty-stepper .hexa-stepper { width: 128px; min-height: 40px; }
    .cart-qty-stepper .hexa-stepper-btn { min-width: 40px; min-height: 40px; }

    /* Checkout fields: single column */
    .woocommerce-checkout .form-row-first,
    .woocommerce-checkout .form-row-last { float: none; width: 100%; margin-right: 0; }

    .wc-thankyou { padding: 2.5rem 0 4rem; }
    .wc-thankyou-heading { font-size: 1.6rem; }
}


/* =============================================
   26. COAs PAGE
   ============================================= */

/* Page header */
.coa-page-header {
    padding: 4rem 0 2.5rem;
    border-bottom: 1px solid var(--color-border);
}
.coa-page-header h1 {
    font-family: var(--font-heading);
    font-size: 2.25rem;
    font-weight: 700;
    color: var(--color-text);
    margin-bottom: 0.75rem;
    line-height: 1.2;
}
.coa-subtitle {
    font-size: 1rem;
    color: var(--color-text-muted);
    max-width: 560px;
    line-height: 1.65;
}

/* RUO bar — matches homepage style */
.coa-ruo-bar {
    background: var(--color-dark);
    padding: 0.7rem 0;
    text-align: center;
}
.coa-ruo-bar p {
    font-size: 0.8rem;
    color: rgba(255,255,255,0.65);
    letter-spacing: 0.02em;
}

/* WordPress editor content area (visible only if editor content exists) */
.coa-editor-content { padding: 2rem 0 0; }

/* COA sections wrapper */
.coa-sections { padding: 4rem 0 5rem; }

/* Individual compound section */
.coa-section {
    padding-bottom: 3.5rem;
    margin-bottom: 3.5rem;
    border-bottom: 1px solid var(--color-border);
}
.coa-section:last-of-type { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }

.coa-section-heading {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--color-text);
    margin-bottom: 1.25rem;
    display: flex;
    align-items: baseline;
    gap: 0.6rem;
    line-height: 1.3;
}
.coa-dosage {
    font-family: var(--font-body);
    font-size: 0.85rem;
    font-weight: 400;
    color: var(--color-text-muted);
}

/* Table */
.coa-table-wrap {
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    overflow: hidden;
}
.coa-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}
.coa-table thead th {
    padding: 0.7rem 1.25rem;
    background: var(--color-surface);
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: var(--color-text-muted);
    border-bottom: 1px solid var(--color-border);
    text-align: left;
}
.coa-table tbody tr:nth-child(odd)  { background: var(--color-bg); }
.coa-table tbody tr:nth-child(even) { background: var(--color-surface); }
.coa-table tbody td {
    padding: 0.9rem 1.25rem;
    border-bottom: 1px solid var(--color-border);
    color: var(--color-text);
    vertical-align: middle;
}
.coa-table tbody tr:last-child td { border-bottom: none; }

/* Download button */
.coa-download {
    display: inline-block;
    padding: 0.4rem 1rem;
    border: 1px solid var(--color-accent);
    border-radius: var(--radius-sm);
    color: var(--color-accent);
    background: transparent;
    font-family: var(--font-body);
    font-size: 0.825rem;
    font-weight: 500;
    text-decoration: none;
    transition: background-color 0.2s ease, color 0.2s ease;
}
.coa-download:hover {
    background: var(--color-accent);
    color: #fff;
}

/* Pending fallback text */
.coa-pending {
    font-size: 0.825rem;
    color: var(--color-text-muted);
    font-style: italic;
    line-height: 1.5;
}
.coa-pending a { color: var(--color-accent); text-decoration: underline; }
.coa-pending a:hover { color: var(--color-accent-dark); }

/* Footer note */
.coa-footer-note { padding-top: 3.5rem; }
.coa-divider {
    border: none;
    border-top: 1px solid var(--color-border);
    margin-bottom: 1.5rem;
}
.coa-disclaimer {
    font-size: 0.8rem;
    color: var(--color-text-muted);
    line-height: 1.65;
    margin-bottom: 1.25rem;
    max-width: 640px;
}
.coa-disclaimer a { color: var(--color-accent); text-decoration: underline; }
.coa-disclaimer a:hover { color: var(--color-accent-dark); }
.coa-back-link {
    display: inline-block;
    font-family: var(--font-body);
    font-size: 0.875rem;
    color: var(--color-text-muted);
    text-decoration: underline;
    transition: color var(--transition);
}
.coa-back-link:hover { color: var(--color-accent); }

/* ── COAs responsive ── */
@media (max-width: 900px) {
    .coa-page-header { padding: 3rem 0 2rem; }
    .coa-page-header h1 { font-size: 1.85rem; }
    .coa-sections { padding: 3rem 0 4rem; }
    .coa-section { padding-bottom: 2.5rem; margin-bottom: 2.5rem; }
}

@media (max-width: 640px) {
    .coa-page-header h1 { font-size: 1.6rem; }

    /* Allow horizontal scroll on very narrow screens */
    .coa-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }

    /* Stack table cells vertically on mobile */
    .coa-table thead { display: none; }
    .coa-table tbody tr {
        display: block;
        padding: 0.75rem 0;
        border-bottom: 1px solid var(--color-border);
        background: transparent !important;
    }
    .coa-table tbody tr:last-child { border-bottom: none; }
    .coa-table tbody td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 0.35rem 1rem;
        border-bottom: none;
        text-align: right;
    }
    .coa-table tbody td::before {
        content: attr(data-label);
        font-size: 0.68rem;
        font-weight: 600;
        letter-spacing: 0.06em;
        text-transform: uppercase;
        color: var(--color-text-muted);
        text-align: left;
        flex-shrink: 0;
        margin-right: 1rem;
    }
}


/* =============================================
   27. CONTACT PAGE
   ============================================= */

/* Page header */
.contact-page-header {
    padding: 4rem 0 2.5rem;
    border-bottom: 1px solid var(--color-border);
}
.contact-page-header h1 {
    font-family: var(--font-heading);
    font-size: 2.25rem;
    font-weight: 700;
    color: var(--color-text);
    margin-bottom: 0.75rem;
    line-height: 1.2;
}
.contact-subtitle {
    font-size: 1rem;
    color: var(--color-text-muted);
    max-width: 560px;
    line-height: 1.65;
}

/* WordPress editor content (renders only if editor content exists) */
.contact-editor-content { padding: 2rem 0 0; }

/* Section wrapper */
.contact-section { padding: 4rem 0 6rem; }

/* Two-column layout */
.contact-layout {
    display: flex;
    gap: 4rem;
    align-items: flex-start;
}
.contact-info-col { flex: 0 0 260px; }
.contact-form-col { flex: 1 1 auto; min-width: 0; }

/* ── Contact details (left column) ── */
.contact-details {
    display: flex;
    flex-direction: column;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    overflow: hidden;
    margin-bottom: 1.5rem;
}
.contact-detail-row {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    padding: 0.85rem 1.1rem;
    border-bottom: 1px solid var(--color-border);
}
.contact-detail-row:last-child { border-bottom: none; }

.contact-detail-row dt {
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: var(--color-text-muted);
}
.contact-detail-row dd {
    font-size: 0.9rem;
    color: var(--color-text);
    line-height: 1.5;
}
.contact-detail-row dd a { color: var(--color-accent); text-decoration: underline; }
.contact-detail-row dd a:hover { color: var(--color-accent-dark); }

.contact-note {
    font-size: 0.8rem;
    color: var(--color-text-muted);
    line-height: 1.65;
}

/* ── Error banner ── */
.contact-error-banner {
    padding: 0.85rem 1.1rem;
    background: #fff5f5;
    border-left: 3px solid #c53030;
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    color: #9b1c1c;
    line-height: 1.55;
    margin-bottom: 1.5rem;
}
.contact-error-banner a { color: #c53030; text-decoration: underline; }
.contact-error-banner a:hover { color: #9b1c1c; }

/* ── Contact form ── */
.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

/* Side-by-side first/last name row */
.cf-row-2col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
}

/* Field wrapper */
.cf-field {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

/* Label */
.cf-field label {
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--color-text-muted);
}
.cf-required { color: var(--color-accent); margin-left: 0.1em; }

/* All inputs, select, textarea */
.cf-field input,
.cf-field select,
.cf-field textarea {
    display: block;
    width: 100%;
    padding: 0.65rem 0.875rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    font-family: var(--font-body);
    font-size: 0.9rem;
    color: var(--color-text);
    background: var(--color-bg);
    outline: none;
    transition: border-color 0.2s ease;
    -webkit-appearance: none;
    appearance: none;
}
.cf-field input:focus,
.cf-field select:focus,
.cf-field textarea:focus { border-color: var(--color-accent); }

.cf-field textarea {
    resize: vertical;
    min-height: 150px;
    line-height: 1.6;
}

/* Custom select chevron */
.cf-select-wrap { position: relative; }
.cf-select-wrap::after {
    content: '';
    position: absolute;
    right: 0.875rem;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 5px solid var(--color-text-muted);
    pointer-events: none;
}
.cf-select-wrap select { padding-right: 2.25rem; cursor: pointer; }

/* Field-level error state */
.cf-field--error input,
.cf-field--error select,
.cf-field--error textarea { border-color: #c53030; }

.cf-field-error {
    font-size: 0.775rem;
    color: #c53030;
    line-height: 1.4;
}

/* ── Success state ── */
.contact-success {
    padding: 2.5rem;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}
.contact-success h2 {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--color-text);
}
.contact-success p {
    font-size: 0.95rem;
    color: var(--color-text-muted);
    line-height: 1.65;
}
.contact-back-link {
    display: inline-block;
    font-size: 0.875rem;
    color: var(--color-text-muted);
    text-decoration: underline;
    margin-top: 0.5rem;
    transition: color var(--transition);
}
.contact-back-link:hover { color: var(--color-accent); }

/* ── Contact responsive ── */
@media (max-width: 900px) {
    .contact-layout { flex-direction: column; gap: 2.5rem; }
    .contact-info-col { flex: none; width: 100%; }
}

@media (max-width: 640px) {
    .contact-page-header { padding: 3rem 0 2rem; }
    .contact-page-header h1 { font-size: 1.75rem; }
    .contact-section { padding: 3rem 0 4.5rem; }
    .cf-row-2col { grid-template-columns: 1fr; }
    .contact-success { padding: 1.75rem; }
}


/* =============================================
   28. SHOP PROMO / DISCOUNT BANNER
   ============================================= */

.shop-promo-bar {
    background: var(--color-dark);
    padding: 0.85rem 0;
}

.promo-list {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2.25rem;
    list-style: none;
    margin: 0;
    padding: 0;
    flex-wrap: wrap;
}

.promo-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font-body);
    font-size: 0.8rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.82);
    letter-spacing: 0.02em;
    white-space: nowrap;
}

.promo-item svg {
    flex-shrink: 0;
    opacity: 0.65;
    color: var(--color-accent);
}

.promo-item strong {
    color: #ffffff;
    font-weight: 700;
    letter-spacing: 0.05em;
}

@media (max-width: 768px) {
    .promo-list {
        flex-direction: column;
        gap: 0.6rem;
        align-items: flex-start;
    }
    .promo-item { white-space: normal; }
}


/* =============================================
   29. HEADER — WOOCOMMERCE CART BUTTON
   ============================================= */

.cart-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem 0.65rem;
    font-size: 0.875rem;
    font-weight: 500;
    font-family: var(--font-body);
    color: var(--color-text-muted);
    border-radius: var(--radius-sm);
    text-decoration: none;
    transition: color var(--transition), background-color var(--transition);
    flex-shrink: 0;
    white-space: nowrap;
}
.cart-btn:hover {
    color: var(--color-text);
    background: var(--color-surface);
    text-decoration: none;
}

.cart-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    padding: 0 4px;
    background: var(--color-accent);
    color: #fff;
    font-size: 0.65rem;
    font-weight: 600;
    border-radius: 99px;
    line-height: 1;
    font-family: var(--font-body);
    transition: background-color var(--transition);
}
.cart-count:empty { display: none; }


/* =============================================
   30. SHOP — PRODUCT CARD LINKS
   ============================================= */

.product-name a {
    color: var(--color-text);
    text-decoration: none;
    transition: color var(--transition);
}
.product-name a:hover { color: var(--color-accent); }

.product-img-wrap {
    display: block;
    text-decoration: none;
}

.product-short-desc {
    font-size: 0.82rem;
    color: var(--color-text-muted);
    line-height: 1.6;
    margin-top: 0.15rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}


/* =============================================
   31. SINGLE PRODUCT PAGE
   ============================================= */

.sp-page {
    background: #ffffff;
}

.sp-inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 8rem 4rem 5rem;
}

/* WC notices */
.sp-inner .woocommerce-notices-wrapper { margin-bottom: 1.5rem; }

/* Back link */
.sp-breadcrumb { margin-bottom: 2.5rem; }

.sp-back {
    font-size: 0.82rem;
    color: #52525a;
    text-decoration: none;
    transition: color var(--transition);
}
.sp-back:hover { color: #0a0a0a; text-decoration: none; }

/* Two-column grid — 55% image / 45% details */
.sp-layout {
    display: grid;
    grid-template-columns: 55fr 45fr;
    gap: 4rem;
    align-items: flex-start;
}

/* Left column — image */
.sp-img-wrap {
    aspect-ratio: 4 / 3;
    background: #efefef;
    border: 1px solid #e2e2e6;
    border-radius: 4px;
    overflow: hidden;
}
.sp-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Right column — details */
.sp-details {
    display: flex;
    flex-direction: column;
}

.sp-name {
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 400;
    color: #0a0a0a;
    margin: 0 0 0.5rem;
    line-height: 1.25;
}

.sp-price {
    font-size: 1.5rem;
    font-weight: 700;
    color: #0a0a0a;
    margin-bottom: 1.5rem;
    font-family: var(--font-body);
}
.sp-price .woocommerce-Price-amount,
.sp-price .woocommerce-Price-currencySymbol { font-size: inherit; font-weight: inherit; color: inherit; }

.sp-divider {
    border: none;
    border-top: 1px solid #e2e2e6;
    margin: 0 0 1.5rem;
}

/* Short description */
.sp-desc {
    font-size: 0.92rem;
    color: #52525a;
    line-height: 1.85;
    font-weight: 300;
    margin-bottom: 1.5rem;
}
.sp-desc p {
    color: #52525a;
    font-size: 0.92rem;
    line-height: 1.85;
    font-weight: 300;
    margin: 0;
}

/* Product tags */
.sp-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-bottom: 1.5rem;
}
.sp-tag {
    font-size: 0.68rem;
    padding: 0.2rem 0.6rem;
    border: 1px solid #e2e2e6;
    color: #52525a;
    border-radius: 4px;
    font-family: var(--font-body);
    line-height: 1.5;
}

/* Add to cart form — qty + button on same row */
.sp-details form.cart {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 1.5rem 0 0;
    flex-wrap: nowrap;
}

.sp-details .quantity { flex-shrink: 0; }

.sp-details .qty {
    width: 60px;
    padding: 0.5rem;
    border: 1px solid #e2e2e6;
    border-radius: 6px;
    font-size: 0.9rem;
    text-align: center;
    font-family: var(--font-body);
    color: #0a0a0a;
    background: #ffffff;
    outline: none;
    -moz-appearance: textfield;
    height: auto;
}
.sp-details .qty:focus { border-color: #4a90d9; }
.sp-details .qty::-webkit-inner-spin-button,
.sp-details .qty::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }

.sp-details .single_add_to_cart_button {
    flex: 1;
    background: #4a90d9;
    color: #ffffff;
    font-size: 0.88rem;
    font-weight: 600;
    padding: 0.85rem 2rem;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    font-family: var(--font-body);
    transition: background-color var(--transition);
    text-align: center;
    white-space: nowrap;
    display: inline-block;
}
.sp-details .single_add_to_cart_button:hover { background: #2d6ab0; }

/* WC loading state */
.sp-details .single_add_to_cart_button.loading { opacity: 0.7; cursor: wait; }

/* Below-form details */
.sp-ruo {
    font-size: 0.75rem;
    color: #a0a0aa;
    margin-top: 1rem;
    line-height: 1.5;
}

.sp-coa {
    display: block;
    font-size: 0.8rem;
    color: #4a90d9;
    text-decoration: none;
    margin-top: 0.75rem;
    transition: text-decoration var(--transition);
}
.sp-coa:hover { text-decoration: underline; color: #4a90d9; }

.sp-sku {
    font-size: 0.75rem;
    color: #a0a0aa;
    margin-top: 1rem;
}

.sp-availability {
    font-size: 0.75rem;
    margin-top: 0.25rem;
}
.sp-in-stock  { color: #0dab76; }
.sp-out-of-stock { color: #e84545; }

/* Responsive — tablet */
@media (max-width: 900px) {
    .sp-inner { padding: 6rem 2rem 4rem; }
    .sp-layout {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    .sp-img-wrap { max-width: 480px; }
}

/* Responsive — mobile */
@media (max-width: 640px) {
    .sp-inner { padding: 5rem 1.25rem 3rem; }
    .sp-details form.cart { flex-wrap: wrap; }
    .sp-details .single_add_to_cart_button { flex: none; width: 100%; }
}


/* =============================================
   32. WOOCOMMERCE — CHECKOUT ITEM DESCRIPTION
   ============================================= */

/* Hide variation/description text in the checkout order review — but NOT
 * the product name itself.  The broad "p { display:none }" rule was removed
 * because WooCommerce wraps item name text in <p> on some versions, which
 * caused the product name to vanish from the sidebar order summary.          */
.woocommerce-checkout .cart_item .product-name .variation,
.woocommerce-checkout .cart_item .product-name dl.variation {
    display: none !important;
}

/* Product name injected by woocommerce_checkout_cart_item_quantity filter */
.hx-checkout-item-name {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--color-text);
    margin-bottom: 2px;
}

/* ── Suppress "Item removed. Undo?" cart notice ─────────────────────────── */
.woocommerce-message:has(a.restore-item) {
    display: none !important;
}

/* ── Fee/discount rows — truncate long labels with ellipsis ─────────────── */
.cart_totals .shop_table { table-layout: fixed; }
.cart_totals .shop_table colgroup,
.cart_totals .shop_table th { width: 38% !important; }
.cart_totals .shop_table td { width: 62% !important; }
.cart_totals .shop_table tr.fee th,
.cart_totals .shop_table tr.cart-discount th {
    overflow: hidden !important;
    white-space: nowrap !important;
    text-overflow: ellipsis !important;
    font-size: 0.8rem !important;
}

/* ── WooCommerce Blocks checkout — order summary item name ───────────────── */
/* Strategy: JS (functions.php) overwrites __name textContent with the short
 * canonical name every 300 ms, AND injects a flex-positioned .hx-order-item-name
 * span between the image and the description column.
 *
 * To avoid the name appearing twice we hide the original __name element once
 * our span is present (using :has()). Before JS fires, __name is visible as a
 * fallback — the ":has" rule has higher specificity so it wins over the base rule.
 */
.wc-block-components-order-summary-item {
    align-items: center !important;
}
.wc-block-components-order-summary-item__description {
    flex: 1 1 0% !important;
    min-width: 0 !important;
}
/* Base: show __name (fallback before JS fires) */
.wc-block-components-order-summary-item__name {
    display: block !important;
    font-size: 0.82rem !important;
    font-weight: 600 !important;
    color: #111827 !important;
    line-height: 1.4 !important;
}
/* Once our short-name span is injected, hide the React-managed __name so
 * the product name does not appear twice. Higher specificity beats base rule. */
.wc-block-components-order-summary-item:has(.hx-order-item-name)
    .wc-block-components-order-summary-item__name {
    display: none !important;
}
/* JS-injected short-name span (flex sibling after image div) */
.hx-order-item-name {
    display: block !important;
    font-size: 0.82rem !important;
    font-weight: 600 !important;
    color: #111827 !important;
    line-height: 1.4 !important;
    word-break: break-word !important;
}
