/* ==========================================================================
   woocommerce.css — All WooCommerce storefront styling
   ========================================================================== */

/* ==========================================================================
   1. Shop Layout (archive)
   ========================================================================== */

.shop-header {
    padding-block: var(--space-2xl);
    border-bottom: 1px solid var(--color-neutral-light);
    margin-bottom: var(--space-xl);
}

.shop-header__title {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    margin-bottom: 0;
}

/* Toolbar row (ordering + result count) */
.shop-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-lg);
    flex-wrap: wrap;
    gap: var(--space-md);
}

.shop-toolbar__controls {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

/* View switcher (grid | list) — segmented pill beside the sorting select. */
.shop-view-switcher {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    padding: 3px;
    background: var(--color-surface-alt);
    border: 1px solid var(--color-neutral-light);
    border-radius: var(--radius-full);
    box-shadow: var(--shadow-sm);
}

.shop-view-switcher__btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-width: 34px;
    height: 30px;
    padding: 0 12px;
    border: 0;
    border-radius: var(--radius-full);
    background: transparent;
    color: var(--color-neutral-mid);
    font-family: var(--font-heading);
    font-size: 0.8125rem;
    font-weight: 600;
    line-height: 1;
    cursor: pointer;
    transition: background var(--transition-fast), color var(--transition-fast);
}

.shop-view-switcher__btn svg {
    width: 15px;
    height: 15px;
    flex: none;
}

.shop-view-switcher__btn:hover {
    color: var(--color-primary-dark);
    background: rgba(46, 125, 50, 0.08);
}

.shop-view-switcher__btn[aria-pressed="true"] {
    background: var(--color-primary);
    color: #fff;
    box-shadow: var(--shadow-sm);
}

.shop-view-switcher__btn:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
}

/*
 * Icons alone carry the choice on a narrow toolbar, and 30px is too short to
 * tap — the hit area grows to the WCAG 2.5.5 minimum here.
 */
@media (max-width: 639.98px) {
    .shop-toolbar__counts {
        flex: 1 1 auto;
    }

    /* Own line, pinned apart: switcher left, sorting select right. */
    .shop-toolbar__controls {
        flex: 1 1 100%;
        justify-content: space-between;
        gap: var(--space-sm);
    }

    .shop-view-switcher__label {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip-path: inset(50%);
        white-space: nowrap;
    }

    .shop-view-switcher__btn {
        min-height: 44px;
        padding: 0 12px;
    }

    .shop-view-switcher__btn svg {
        width: 17px;
        height: 17px;
    }
}

/* WooCommerce select ordering */
.woocommerce-ordering select {
    padding: 0.5rem 2rem 0.5rem 0.875rem;
    border: 1px solid var(--color-neutral-light);
    border-radius: var(--radius-md);
    font-family: var(--font-body);
    font-size: 0.9375rem;
    color: var(--color-text);
    background: #fff;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%236B7280' stroke-width='1.5' fill='none'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
}

.woocommerce-result-count {
    font-size: 0.9375rem;
    color: var(--color-text-muted);
    margin: 0;
}

/* ==========================================================================
   2. Category Tabs
   ========================================================================== */

.category-tabs {
    display: flex;
    gap: var(--space-sm);
    overflow-x: auto;
    padding-bottom: var(--space-sm);
    margin-bottom: var(--space-xl);
    scrollbar-width: none;
}

.category-tabs::-webkit-scrollbar { display: none; }

.category-tab {
    flex-shrink: 0;
    padding: 0.5rem 1.125rem;
    border-radius: var(--radius-full);
    background: #fff;
    border: 2px solid var(--color-neutral-light);
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--color-text-muted);
    text-decoration: none;
    transition: background-color var(--transition-fast), border-color var(--transition-fast), color var(--transition-fast);
    white-space: nowrap;
}

.category-tab:hover {
    border-color: var(--color-primary-light);
    color: var(--color-primary);
}

.category-tab--active {
    background: var(--color-primary);
    border-color: var(--color-primary);
    color: #fff;
}

.category-tab--active:hover { color: #fff; }

/* ==========================================================================
   3. Shop Two-column Layout (filters + grid)
   ========================================================================== */

.shop-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-xl);
}

@media (min-width: 1024px) {
    .shop-layout { grid-template-columns: 240px 1fr; }
}

.shop-sidebar {
    display: none;
}

@media (min-width: 1024px) {
    .shop-sidebar { display: block; }
}

/* ==========================================================================
   4. Product Grid
   ========================================================================== */

ul.products {
    display: grid;
    grid-template-columns: 1fr;
    gap: clamp(12px, 3vw, var(--space-lg));
    list-style: none;
    margin: 0;
    padding: 0;
    width: 100%;
    max-width: 100%;
}

/*
 * WooCommerce core floats each <li> and sizes it with a percentage that is
 * relative to its own grid cell rather than the row
 * (`.woocommerce ul.products.columns-2 li.product { width: 48% }`, specificity
 * 0,4,2). That collapsed every card to half its column. Matching the
 * specificity lets the grid own the layout without !important.
 */
.woocommerce ul.products li.product,
.woocommerce ul.products[class*="columns-"] li.product,
.woocommerce-page ul.products li.product,
.woocommerce-page ul.products[class*="columns-"] li.product {
    float: none;
    clear: none;
    width: auto;
    max-width: 100%;
    margin: 0;
    padding: 0;
    list-style: none;
}

/*
 * woocommerce-layout.css gives the list a `content:" "; display:table` clearfix
 * at specificity (0,2,1). Under display:grid those pseudo-elements become real
 * grid items and steal the first cell, so row 1 always came up one card short —
 * hence the matching .woocommerce prefix here rather than a bare selector.
 */
.woocommerce ul.products::before,
.woocommerce ul.products::after,
.woocommerce-page ul.products::before,
.woocommerce-page ul.products::after {
    display: none;
}

/* Large phones (400px+) -> 2 columns; below that a single full-width card. */
@media (min-width: 400px) {
    ul.products {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: clamp(10px, 2.5vw, 16px);
    }
}

/* Tablet (768px+) -> 3 columns */
@media (min-width: 768px) {
    ul.products {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: var(--space-lg);
    }
}

/* Desktop (1024px+) -> 4 columns */
@media (min-width: 1024px) {
    ul.products {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: var(--space-lg);
    }
}

/* Narrower columns from 1280px so each card reads smaller on desktop. */
@media (min-width: 1280px) {
    ul.products {
        grid-template-columns: repeat(5, minmax(0, 1fr));
        gap: var(--space-md);
    }
}

@media (min-width: 1600px) {
    ul.products {
        grid-template-columns: repeat(6, minmax(0, 1fr));
    }
}

/* ==========================================================================
   5. Product Card & Produce Visuals
   ========================================================================== */

.product-card {
    background: #ffffff;
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.04), 0 1px 3px rgba(0, 0, 0, 0.02);
    border: 1px solid rgba(15, 23, 42, 0.07);
    transition: transform var(--transition-base), box-shadow var(--transition-base), border-color var(--transition-base);
    display: flex;
    flex-direction: column;
    position: relative;
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
}

.product-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 32px rgba(27, 94, 32, 0.12), 0 4px 12px rgba(0, 0, 0, 0.04);
    border-color: rgba(34, 197, 94, 0.35);
}

/* Image & Media Frame */
.product-card__media {
    position: relative;
    width: 100%;
    aspect-ratio: 1;
    background: #f8fafc;
    overflow: hidden;
    border-bottom: 1px solid rgba(15, 23, 42, 0.05);
}

.product-card__image-wrap {
    position: relative;
    display: block;
    width: 100%;
    height: 100%;
    overflow: hidden;
    text-decoration: none;
}

.product-card__image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow);
}

.product-card:hover .product-card__image {
    transform: scale(1.06);
}

/* ── Produce Visual Vector Artwork Card ── */
.product-card__visual-card {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    transition: transform var(--transition-slow);
}

.visual-card__brand-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.18;
    transition: transform var(--transition-slow), opacity var(--transition-base);
    pointer-events: none;
    z-index: 0;
}

.product-card:hover .visual-card__brand-bg {
    transform: scale(1.08);
    opacity: 0.28;
}

.visual-card__pattern {
    position: absolute;
    inset: 0;
    opacity: 0.06;
    background-image: radial-gradient(#0f172a 1.5px, transparent 1.5px);
    background-size: 14px 14px;
    pointer-events: none;
}

.visual-card__ambient-glow {
    position: absolute;
    inset: 10%;
    border-radius: 50%;
    pointer-events: none;
    transition: transform var(--transition-slow), opacity var(--transition-base);
}

.product-card:hover .visual-card__ambient-glow {
    transform: scale(1.2);
    opacity: 0.8;
}

.visual-card__center {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    position: relative;
    z-index: 1;
    text-align: center;
    padding: var(--space-md);
}

.visual-card__art-wrap {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: clamp(72px, 42%, 110px);
    aspect-ratio: 1;
}

.visual-card__vector {
    width: 100%;
    height: 100%;
    filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.12));
    transition: transform var(--transition-base);
}

.product-card:hover .visual-card__vector {
    transform: scale(1.08) translateY(-2px);
}

.visual-card__icon {
    position: absolute;
    bottom: -4px;
    right: -4px;
    font-size: 1.5rem;
    line-height: 1;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(6px);
    padding: 4px;
    border-radius: var(--radius-full);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform var(--transition-fast);
}

.product-card:hover .visual-card__icon {
    transform: scale(1.15) rotate(6deg);
}

.visual-card__tag {
    font-size: 0.6875rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #1e293b;
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(8px);
    padding: 4px 12px;
    border-radius: var(--radius-full);
    border: 1px solid rgba(255, 255, 255, 0.6);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

/* Media Overlays & Badges */
.product-card__badges {
    position: absolute;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 5px;
    z-index: 2;
    pointer-events: none;
}

.product-card__badges--top {
    top: 10px;
    left: 10px;
    right: auto;
}

.product-card__badges--right {
    top: 10px;
    right: 10px;
    left: auto;
}

.product-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-family: var(--font-heading);
    font-size: 0.6875rem;
    font-weight: 800;
    letter-spacing: 0.03em;
    padding: 3px 9px;
    border-radius: var(--radius-full);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(6px);
}

.product-badge--today     { background: #15803D; color: #fff; }
.product-badge--fresh     { background: #16A34A; color: #fff; }
.product-badge--sale      { background: #DC2626; color: #fff; text-transform: uppercase; }
.product-badge--organic   { background: #047857; color: #fff; }
.product-badge--pesticide { background: #0284C7; color: #fff; }

/* Media bottom chips */
.product-card__media-footer {
    position: absolute;
    bottom: 8px;
    left: 8px;
    right: 8px;
    display: flex;
    gap: 6px;
    align-items: center;
    flex-wrap: wrap;
    z-index: 2;
    pointer-events: none;
}

.product-card__unit-pill {
    flex: 0 0 auto;
    font-size: 0.625rem;
    font-weight: 800;
    color: #334155;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(4px);
    padding: 2px 7px;
    border-radius: var(--radius-full);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

.product-card__farm-pill {
    font-size: 0.625rem;
    font-weight: 700;
    color: #166534;
    background: rgba(240, 253, 244, 0.92);
    backdrop-filter: blur(4px);
    border: 1px solid rgba(34, 197, 94, 0.2);
    padding: 2px 7px;
    border-radius: var(--radius-full);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    /* A fixed 140px cap overflowed narrow cards; the chip now sizes to the card. */
    min-width: 0;
    max-width: 100%;
    flex: 0 1 auto;
}

/*
 * The card body carries the only add-to-cart control. Hover used to reveal a
 * second one over the image, but it covered the photo and never appeared on
 * touch devices, so the overlay markup is no longer rendered at all.
 */
@media (hover: none), (pointer: coarse) {
    .product-card:hover { transform: none; }
}

/* ── Product Card Body ── */
.product-card__body {
    padding: var(--space-md);
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

/* Live Stock Status Indicator */
.product-card__stock-tag {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.6875rem;
    font-weight: 700;
    color: #15803D;
}

.stock-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #22C55E;
    box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7);
    animation: stockPulse 2s infinite;
}

@keyframes stockPulse {
    0%   { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7); }
    70%  { transform: scale(1);    box-shadow: 0 0 0 5px rgba(34, 197, 94, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); }
}

.product-card__title {
    font-size: 0.9375rem;
    font-weight: 700;
    line-height: 1.35;
    margin: 2px 0 0 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.7em;
    word-break: break-word;
    overflow-wrap: break-word;
}

@media (min-width: 640px) {
    .product-card__title { font-size: 1rem; }
}

.product-card__title a {
    color: #0F172A;
    text-decoration: none;
    transition: color var(--transition-fast);
}

.product-card__title a:hover { color: #15803D; }

/* Rating alignment & star styling */
.product-card__rating {
    display: flex;
    align-items: center;
    min-height: 18px;
    margin-top: 1px;
}

.product-card__rating .star-rating,
.star-rating {
    overflow: hidden;
    position: relative;
    height: 1.1em;
    line-height: 1.1;
    font-size: 0.8125rem;
    width: 5.4em;
    font-family: 'star', sans-serif;
    color: #F59E0B;
    letter-spacing: 0.1em;
}

.star-rating::before {
    content: '★★★★★';
    opacity: 0.25;
    float: left;
    top: 0;
    left: 0;
    position: absolute;
    color: #94A3B8;
}

.star-rating span {
    overflow: hidden;
    float: left;
    top: 0;
    left: 0;
    position: absolute;
    padding-top: 1.5em;
}

.star-rating span::before {
    content: '★★★★★';
    top: 0;
    position: absolute;
    left: 0;
    color: #F59E0B;
}

/* Price Styling */
.product-card__price {
    display: flex;
    align-items: baseline;
    gap: 6px;
    margin-top: 2px;
    flex-wrap: wrap;
}

.product-card__price .price {
    font-family: var(--font-heading);
    font-weight: 800;
    color: #15803D;
    font-size: 1.125rem;
    display: flex;
    align-items: baseline;
    gap: 6px;
    margin: 0;
}

.product-card__price .price del {
    font-weight: 500;
    color: #94A3B8;
    font-size: 0.8125rem;
    text-decoration: line-through;
}

.product-card__price .price ins {
    text-decoration: none;
    color: #DC2626;
    font-weight: 800;
}

.product-card__price-unit {
    font-size: 0.75rem;
    font-weight: 600;
    color: #64748B;
}

.product-card__wholesale-nudge {
    font-size: 0.6875rem;
    color: #1E40AF;
    font-weight: 700;
    background: #EFF6FF;
    border: 1px solid rgba(37, 99, 235, 0.15);
    padding: 3px 8px;
    border-radius: var(--radius-sm);
    width: fit-content;
    line-height: 1.3;
}

.product-card__moq-notice {
    font-size: 0.6875rem;
    color: #78350F;
    background: #FEF3C7;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: var(--radius-sm);
    width: fit-content;
    line-height: 1.3;
}

/* Card Action Button — Prominent 44px Touch Target */
.product-card__action {
    margin-top: auto;
    padding-top: var(--space-xs);
    width: 100%;
}

.product-card__action .button,
.product-card__action .ajax_add_to_cart,
.product-card__action .product-card__btn-add {
    display: flex;
    width: 100%;
    min-height: 44px; /* WCAG 2.5.5 Touch Target standard for mobile */
    align-items: center;
    justify-content: center;
    background: #F0FDF4;
    color: #15803D;
    border: 1.5px solid rgba(34, 197, 94, 0.35);
    padding: 10px 14px;
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    font-weight: 800;
    font-family: var(--font-heading);
    text-decoration: none;
    transition: all var(--transition-fast);
    cursor: pointer;
    box-sizing: border-box;
    text-align: center;
}

.product-card__action .button:hover,
.product-card__action .ajax_add_to_cart:hover,
.product-card__action .product-card__btn-add:hover {
    background: #15803D;
    color: #ffffff;
    border-color: #15803D;
    box-shadow: 0 4px 12px rgba(21, 128, 61, 0.25);
}

.product-card__action .button.added,
.product-card__action .product-card__btn-add.added {
    background: #15803D;
    color: #fff;
}

/* Hide default WooCommerce "View Cart" injected text link everywhere */
.woocommerce a.added_to_cart,
.woocommerce .added_to_cart.wc-forward,
.product-card a.added_to_cart,
.product-card__action .added_to_cart {
    display: none !important;
}

/*
 * Compact desktop card. The 44px action height is the mobile touch-target
 * standard, so the squeeze starts at the 768px breakpoint and never applies
 * to phones.
 */
@media (min-width: 768px) {
    .product-card__media {
        aspect-ratio: 4 / 3;
    }

    .product-card__body {
        padding: 12px 12px 14px;
        gap: 4px;
    }

    .product-card__title {
        font-size: 0.875rem;
        min-height: 0;
        -webkit-line-clamp: 1;
    }

    .product-card__price .price {
        font-size: 1rem;
    }

    .product-card__badges--top,
    .product-card__badges--right {
        top: 8px;
    }

    .product-card__badges--top { left: 8px; }
    .product-card__badges--right { right: 8px; }

    .product-badge {
        font-size: 0.625rem;
        padding: 2px 7px;
    }

    .product-card__action {
        padding-top: 0;
    }

    .product-card__action .button,
    .product-card__action .ajax_add_to_cart,
    .product-card__action .product-card__btn-add {
        min-height: 36px;
        padding: 6px 10px;
        font-size: 0.8125rem;
    }

    .tmc-qty-stepper {
        min-height: 36px;
    }

    .tmc-qty-btn {
        width: 28px;
        height: 28px;
        font-size: 1rem;
    }
}

/* Tarkari Mart Stepper Wrapper & Controls */
.tmc-card-action-wrap {
    position: relative;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tmc-qty-stepper {
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    min-height: 44px;
    background: #ffffff;
    border: 2px solid #16a34a;
    border-radius: var(--radius-md);
    padding: 3px 6px;
    box-shadow: 0 4px 12px rgba(22, 163, 74, 0.12);
    box-sizing: border-box;
    transition: all 0.2s ease;
}

.tmc-qty-stepper:hover {
    border-color: #15803d;
    box-shadow: 0 6px 16px rgba(22, 163, 74, 0.2);
}

.tmc-qty-btn {
    width: 36px;
    height: 36px;
    border-radius: 6px;
    background: #f0fdf4;
    color: #15803d;
    border: 1px solid rgba(22, 163, 74, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.15s ease;
    padding: 0;
    font-weight: 800;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.tmc-qty-btn:hover {
    background: #16a34a;
    color: #ffffff;
    border-color: #16a34a;
    transform: scale(1.06);
}

.tmc-qty-btn:active {
    transform: scale(0.92);
}

.tmc-qty-btn--minus:hover {
    background: #fef2f2;
    border-color: #ef4444;
    color: #dc2626;
}

.tmc-qty-input {
    width: 50px;
    text-align: center;
    border: none;
    background: transparent;
    font-size: 1.05rem;
    font-weight: 800;
    color: #111827;
    font-family: var(--font-heading, inherit);
    padding: 0;
    margin: 0;
    -moz-appearance: textfield;
}

.tmc-qty-input::-webkit-outer-spin-button,
.tmc-qty-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.tmc-qty-input:focus {
    outline: none;
    background: #f0fdf4;
    border-radius: 4px;
}


/* ── Single Product Presentation Hero Artwork ── */
.single-product__hero-artwork {
    width: 100%;
    aspect-ratio: 1;
    border-radius: var(--radius-2xl);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.06);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.hero-artwork__pattern {
    position: absolute;
    inset: 0;
    opacity: 0.08;
    background-image: radial-gradient(#000 1.5px, transparent 1.5px);
    background-size: 18px 18px;
    pointer-events: none;
}

.hero-artwork__ambient {
    position: absolute;
    inset: 15%;
    border-radius: 50%;
    pointer-events: none;
}

.hero-artwork__photo-showcase {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
    overflow: hidden;
}

.hero-artwork__photo-link {
    display: block;
    width: 100%;
    height: 100%;
}

.hero-artwork__brand-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.88;
    transition: transform var(--transition-slow), opacity var(--transition-base);
}

.single-product__hero-artwork:hover .hero-artwork__brand-img {
    transform: scale(1.05);
    opacity: 0.98;
}

.hero-artwork__content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    position: relative;
    z-index: 2;
    text-align: center;
    padding: var(--space-xl);
    background: linear-gradient(to top, rgba(15, 23, 42, 0.85) 0%, rgba(15, 23, 42, 0.35) 50%, transparent 100%);
    width: 100%;
    height: 100%;
    justify-content: flex-end;
}

.hero-artwork__art {
    position: relative;
    width: 120px;
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-artwork__art .visual-card__vector {
    width: 100%;
    height: 100%;
    filter: drop-shadow(0 12px 24px rgba(0, 0, 0, 0.15));
}

.hero-artwork__glyph {
    position: absolute;
    bottom: 0;
    right: 0;
    font-size: 2.25rem;
    line-height: 1;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(8px);
    padding: 6px;
    border-radius: var(--radius-full);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.hero-artwork__badges {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
}

.hero-artwork__tag {
    font-size: 0.8125rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #0f172a;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(8px);
    padding: 5px 14px;
    border-radius: var(--radius-full);
    border: 1px solid rgba(255, 255, 255, 0.6);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.hero-artwork__farm {
    font-size: 0.8125rem;
    font-weight: 700;
    color: #166534;
    background: rgba(240, 253, 244, 0.92);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(34, 197, 94, 0.25);
    padding: 5px 14px;
    border-radius: var(--radius-full);
}

.hero-artwork__guarantee {
    font-size: 0.75rem;
    font-weight: 700;
    color: #166534;
    background: #DCFCE7;
    padding: 4px 12px;
    border-radius: var(--radius-full);
}

/* ==========================================================================
   5b. List View — dense product rows

   Re-uses the card markup, re-laid-out as thumbnail | name + price | add.
   The point is products per viewport: ~7 rows visible versus ~1 tall card.

   Layout is driven by <html data-shop-view="list|grid">, which a tiny inline
   head script sets from the shopper's saved choice, falling back to list under
   640px. The toolbar switcher in archive-product.php writes the same
   attribute, so both directions (list on desktop, grid on mobile) work.

   The li selectors carry .product-card plus the columns-* attribute on
   purpose: WooCommerce core sizes loop items with
   `.woocommerce ul.products[class*="columns-"] li.product { width: 48% }`
   (specificity 0,4,2), which only loses to an equal-or-higher anchor.
   ========================================================================== */

/* ── Sheet ───────────────────────────────────────────────────────────────── */

html[data-shop-view="list"] ul.products {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0;
    background: var(--color-surface-alt);
    border: 1px solid var(--color-neutral-light);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

/*
 * Two anchors, not one: shop/category loops carry columns-* (and need the
 * higher specificity to beat WooCommerce core's percentage widths), while the
 * homepage loops are plain `products products--home-grid` with no .woocommerce
 * ancestor — they only match the bare selector.
 */
html[data-shop-view="list"] ul.products li.product.product-card,
html[data-shop-view="list"] ul.products[class*="columns-"] li.product.product-card {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 8px 10px;
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    overflow: visible;
}

html[data-shop-view="list"] ul.products li.product + li.product {
    border-top: 1px solid var(--color-neutral-light);
}

/* A lifted card makes no sense as a list row. */
html[data-shop-view="list"] .product-card:hover {
    transform: none;
    box-shadow: none;
    border-color: transparent;
}

/* ── Thumbnail ───────────────────────────────────────────────────────────── */

html[data-shop-view="list"] .product-card__media {
    flex: 0 0 62px;
    width: 62px;
    height: 62px;
    aspect-ratio: auto;
    border-bottom: 0;
    border-radius: var(--radius-md);
    background: var(--color-surface);
    transition: transform var(--transition-fast);
}

/*
 * Products without a photo render the composed fallback tile (brand
 * watermark, dot pattern, ambient glow, caption). None of that survives a
 * 62px square, so the thumbnail is reduced to the produce art itself.
 *
 * The watermark needs the full ul.products li.product anchor: WooCommerce core
 * hides nothing but sizes loop images with
 * `.woocommerce ul.products li.product a img` (0,3,4), which outranks a
 * bare class chain.
 */
html[data-shop-view="list"] ul.products li.product .visual-card__brand-bg,
html[data-shop-view="list"] .product-card__visual-card .visual-card__pattern,
html[data-shop-view="list"] .product-card__visual-card .visual-card__ambient-glow,
html[data-shop-view="list"] .product-card__visual-card .visual-card__tag {
    display: none;
}

html[data-shop-view="list"] .product-card__visual-card .visual-card__center {
    padding: 0;
    gap: 0;
}

html[data-shop-view="list"] .product-card__visual-card .visual-card__art-wrap {
    width: 44px;
}

html[data-shop-view="list"] .product-card__visual-card .visual-card__icon {
    font-size: 0.8125rem;
    bottom: -3px;
    right: -3px;
    padding: 2px;
}

/* ── Row body: name + price left, add-to-cart right ──────────────────────── */

html[data-shop-view="list"] .product-card__body {
    flex: 1 1 auto;
    min-width: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
        "title  action"
        "price  action";
    align-items: center;
    gap: 1px 10px;
    padding: 0;
}

/*
 * The loop anchor is load-bearing here: WooCommerce core styles the card
 * heading as `.woocommerce ul.products li.product h3 { padding: .5em 0 }`
 * (0,3,2), which a bare `html[attr] .class` chain loses to — the row would
 * carry 8px of phantom padding above and below every title.
 */
html[data-shop-view="list"] ul.products li.product .product-card__title {
    grid-area: title;
    display: block;
    min-height: 0;
    margin: 0;
    padding: 0;
    font-size: 0.875rem;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

html[data-shop-view="list"] .product-card__price {
    grid-area: price;
    margin: 0;
    gap: 4px;
}

html[data-shop-view="list"] ul.products li.product .product-card__price .price {
    font-size: 0.9375rem;
    gap: 4px;
}

html[data-shop-view="list"] .product-card__price-unit {
    font-size: 0.6875rem;
}

html[data-shop-view="list"] .product-card__action {
    grid-area: action;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    margin: 0;
    padding: 0;
    width: auto;
}

html[data-shop-view="list"] .product-card__action .button,
html[data-shop-view="list"] .product-card__action .ajax_add_to_cart,
html[data-shop-view="list"] .product-card__action .product-card__btn-add {
    width: auto;
    min-height: 44px; /* keeps the WCAG 2.5.5 touch target while compact */
    padding: 0 12px;
    font-size: 0.8125rem;
    white-space: nowrap;
    border-radius: var(--radius-full);
}

/* WooCommerce appends a "View cart" link after a successful AJAX add. */
html[data-shop-view="list"] .product-card__action .added_to_cart.wc-forward {
    font-size: 0.625rem;
    font-weight: 700;
    color: var(--color-primary-dark);
    text-align: center;
    text-decoration: none;
}

/* Anything that would cost every row another vertical line. */
html[data-shop-view="list"] .product-card__stock-tag,
html[data-shop-view="list"] .product-card__rating,
html[data-shop-view="list"] .product-card__wholesale-nudge,
html[data-shop-view="list"] .product-card__moq-notice,
html[data-shop-view="list"] .product-card__badges,
html[data-shop-view="list"] .product-card__media-footer {
    display: none;
}

/* Press feedback stands in for hover, which has no meaning on touch. */
html[data-shop-view="list"] ul.products li.product:active {
    background: rgba(46, 125, 50, 0.06);
}

html[data-shop-view="list"] ul.products li.product:active .product-card__media {
    transform: scale(0.94);
}

/* ── Desktop list rows ─────────────────────────────────────────────────────
   A stretched mobile row reads as broken chrome, so give the deliberate
   "compact list" choice on a wide screen real breathing room.
   ------------------------------------------------------------------------- */

@media (min-width: 768px) {

    html[data-shop-view="list"] ul.products li.product.product-card,
    html[data-shop-view="list"] ul.products[class*="columns-"] li.product.product-card {
        gap: var(--space-md);
        padding: var(--space-md) var(--space-lg);
    }

    html[data-shop-view="list"] .product-card__media {
        flex-basis: 96px;
        width: 96px;
        height: 96px;
    }

    html[data-shop-view="list"] .product-card__visual-card .visual-card__art-wrap {
        width: 66px;
    }

    /* Same loop anchor as the base rules — a weaker selector here would lose to
       them on specificity no matter that it sits in a later media query. */
    html[data-shop-view="list"] ul.products li.product .product-card__title {
        font-size: 1.0625rem;
        white-space: normal;
    }

    html[data-shop-view="list"] ul.products li.product .product-card__price .price {
        font-size: 1.125rem;
    }

    html[data-shop-view="list"] .product-card__action .button,
    html[data-shop-view="list"] .product-card__action .product-card__btn-add {
        min-height: 38px;
        padding: 0 18px;
        font-size: 0.875rem;
    }
}

/* ==========================================================================
   6. Single Product
   ========================================================================== */

.single-product-breadcrumb-wrap {
    padding-block: var(--space-md);
    margin-bottom: var(--space-sm);
}

.single-product-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-2xl);
    margin-bottom: var(--space-3xl);
    align-items: start;
}

@media (min-width: 768px) {
    .single-product-layout {
        grid-template-columns: 1fr 1fr;
    }
}

@media (min-width: 1200px) {
    .single-product-layout {
        grid-template-columns: 440px 1fr 310px;
        gap: var(--space-2xl);
    }
}

/* Gallery column — sticky only once it sits beside the summary. */
.single-product__gallery {
    position: static;
}

@media (min-width: 768px) {
    .single-product__gallery {
        position: sticky;
        top: 100px;
    }
}

.single-product__gallery .woocommerce-product-gallery {
    border-radius: var(--radius-2xl);
    overflow: hidden;
    background: #fff;
    box-shadow: 0 4px 20px rgba(0,0,0,0.06);
    border: 1px solid rgba(0,0,0,0.05);
}

.single-product__gallery img {
    width: 100%;
    height: auto;
    object-fit: cover;
    border-radius: var(--radius-xl);
}

/* Summary column */
.single-product__summary {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.single-product__summary .product-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.sourcing-badge {
    background: #EFF6FF;
    color: #1D4ED8;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: var(--radius-full);
    border: 1px solid rgba(29, 78, 216, 0.15);
}

.single-product__summary .product_title {
    font-size: clamp(1.625rem, 3.5vw, 2.25rem);
    font-weight: 800;
    line-height: 1.25;
    margin: 0 0 4px 0;
    color: var(--color-neutral-dark);
}

.single-product__rating-box {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    font-size: 0.875rem;
    margin-bottom: var(--space-xs);
}

.single-product__rating-box .star-rating {
    color: #F59E0B;
}

.single-product__rating-box .woocommerce-review-link {
    color: var(--color-text-muted);
    text-decoration: none;
}

.single-product__rating-box .woocommerce-review-link:hover {
    color: var(--color-primary);
}

/* Price */
.single-product__price-wrap .price {
    font-family: var(--font-heading);
    font-size: 1.875rem;
    font-weight: 800;
    color: var(--color-primary-dark);
    display: flex;
    align-items: baseline;
    gap: var(--space-sm);
    margin: var(--space-xs) 0 var(--space-sm) 0;
}

.single-product__price-wrap .price del {
    font-size: 1.25rem;
    color: var(--color-text-muted);
    font-weight: 400;
}

.single-product__price-wrap .price ins {
    text-decoration: none;
    color: #E53935;
}

.single-product__excerpt {
    font-size: 0.9375rem;
    line-height: 1.65;
    color: #4B5563;
    padding-bottom: var(--space-xs);
}

/* Provenance Card */
.product-provenance-card {
    background: #F8FAF9;
    border: 1px solid rgba(46, 125, 50, 0.15);
    border-radius: var(--radius-lg);
    padding: var(--space-md) var(--space-lg);
    margin-block: var(--space-sm);
}

.provenance-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-md);
}

@media (max-width: 480px) {
    .provenance-grid { grid-template-columns: 1fr; }
}

.provenance-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.provenance-label {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: var(--color-text-muted);
}

.provenance-val {
    font-size: 0.9375rem;
    font-weight: 700;
    color: var(--color-neutral-dark);
}

/* Action Box (Add to Cart) */
.single-product__action-box {
    margin-block: var(--space-sm);
    padding: var(--space-md);
    background: #fff;
    border-radius: var(--radius-xl);
    border: 1px solid rgba(0,0,0,0.06);
    box-shadow: var(--shadow-sm);
}

.single-product__action-box form.cart {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    flex-wrap: wrap;
    margin: 0;
}

.single-product__action-box .quantity {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.single-product__action-box .quantity .qty-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    padding: 0;
    border: 1px solid rgba(22, 163, 74, 0.25);
    border-radius: 6px;
    background: #f0fdf4;
    color: #15803d;
    font-size: 1.25rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.single-product__action-box .quantity .qty-btn:hover {
    border-color: #16a34a;
    background: #16a34a;
    color: #fff;
}

.single-product__action-box .quantity .qty-btn:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
}

.single-product__action-box .quantity .qty-btn:active {
    transform: scale(0.94);
}

.single-product__action-box .quantity input.qty {
    width: 68px;
    height: 48px;
    text-align: center;
    border: 2px solid var(--color-neutral-light);
    border-radius: var(--radius-md);
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.0625rem;
    color: var(--color-neutral-dark);
}

.single-product__action-box .single_add_to_cart_button {
    flex: 1;
    min-width: 200px;
    height: 48px;
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
    color: #fff;
    border: none;
    border-radius: var(--radius-md);
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(46, 125, 50, 0.3);
    transition: all var(--transition-fast);
}

.single-product__action-box .single_add_to_cart_button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(46, 125, 50, 0.4);
    background: linear-gradient(135deg, var(--color-primary-light) 0%, var(--color-primary) 100%);
}

@media (max-width: 480px) {
    .single-product__action-box form.cart {
        flex-direction: column;
        align-items: stretch;
        gap: var(--space-sm);
    }
    .single-product__action-box .quantity {
        width: 100%;
        justify-content: center;
    }
    .single-product__action-box .quantity input.qty {
        width: 100%;
        max-width: 120px;
    }
    .single-product__action-box .single_add_to_cart_button {
        min-width: 0;
        width: 100%;
    }
}

/* Wholesale Tier Table */
.wholesale-tier-card {
    background: #F0F7FF;
    border: 1px solid rgba(37, 99, 235, 0.2);
    border-radius: var(--radius-xl);
    padding: var(--space-md) var(--space-lg);
    margin-block: var(--space-sm);
}

.wholesale-tier-card__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-sm);
    margin-bottom: var(--space-sm);
    flex-wrap: wrap;
}

.wholesale-tier-card__title {
    font-size: 0.9375rem;
    font-weight: 800;
    color: #1E40AF;
    margin: 0;
}

.wholesale-tier-card__badge {
    font-size: 0.6875rem;
    font-weight: 700;
    background: #DBEAFE;
    color: #1E40AF;
    padding: 2px 8px;
    border-radius: var(--radius-full);
}

.wholesale-tier-card__table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

.wholesale-tier-card__table th {
    text-align: left;
    padding: 6px 8px;
    font-size: 0.75rem;
    font-weight: 700;
    color: #4B5563;
    border-bottom: 1px solid rgba(37, 99, 235, 0.15);
    text-transform: uppercase;
}

.wholesale-tier-card__table td {
    padding: 8px 8px;
    border-bottom: 1px solid rgba(37, 99, 235, 0.08);
}

.tier-price-val {
    font-weight: 800;
    color: #1E40AF;
}

.tier-savings-badge {
    background: #DCFCE7;
    color: #15803D;
    font-weight: 700;
    font-size: 0.75rem;
    padding: 2px 8px;
    border-radius: var(--radius-full);
}

/* Wholesale Register Nudge */
.wholesale-nudge-box {
    background: #FEFCE8;
    border: 1px solid #FEF08A;
    border-left: 4px solid #EAB308;
    border-radius: var(--radius-md);
    padding: var(--space-sm) var(--space-md);
    font-size: 0.875rem;
    color: #713F12;
    line-height: 1.5;
}

.wholesale-nudge-box p { margin: 0; }
.wholesale-nudge-box a { color: #854D0E; text-decoration: underline; }
.wholesale-nudge-box a:hover { color: #A16207; }

.single-product__meta-footer {
    font-size: 0.8125rem;
    color: var(--color-text-muted);
    border-top: 1px solid var(--color-neutral-light);
    padding-top: var(--space-sm);
    margin-top: var(--space-sm);
}

.single-product__meta-footer .sku_wrapper,
.single-product__meta-footer .posted_in {
    display: block;
    margin-bottom: 4px;
}

/* ==========================================================================
   Dedicated Single Product Features Sidebar (Desktop & Mobile)
   ========================================================================== */

.single-product__features-sidebar {
    width: 100%;
}

.features-sidebar-card {
    background: #FFFFFF;
    border-radius: var(--radius-2xl);
    border: 1px solid rgba(46, 125, 50, 0.15);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.04);
    padding: var(--space-xl);
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
}

.features-sidebar-card__header {
    border-bottom: 1px solid rgba(0,0,0,0.06);
    padding-bottom: var(--space-md);
}

.features-sidebar-card__title {
    font-size: 1.125rem;
    font-weight: 800;
    color: var(--color-primary-dark);
    margin: 0 0 4px 0;
}

.features-sidebar-card__sub {
    font-size: 0.8125rem;
    color: var(--color-text-muted);
    margin: 0;
}

.feature-rows-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.feature-item {
    display: flex;
    align-items: flex-start;
    gap: var(--space-md);
    padding: 6px 0;
}

.feature-item__icon {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    border-radius: var(--radius-lg);
    background: #F0FDF4;
    border: 1px solid rgba(46, 125, 50, 0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.125rem;
}

.feature-item__text {
    flex: 1;
}

.feature-item__title {
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--color-neutral-dark);
    margin: 0 0 2px 0;
}

.feature-item__desc {
    font-size: 0.75rem;
    color: #6B7280;
    line-height: 1.45;
    margin: 0;
}

.features-sidebar-cta {
    background: #F9FAFB;
    border-radius: var(--radius-lg);
    padding: var(--space-md);
    text-align: center;
    border: 1px dashed rgba(0, 0, 0, 0.12);
}

.features-sidebar-cta__text {
    font-size: 0.8125rem;
    color: #4B5563;
    font-weight: 500;
    margin-bottom: var(--space-sm);
}

/* Product Tabs Section */
.single-product__tabs-section {
    margin-top: var(--space-3xl);
    padding-top: var(--space-2xl);
    border-top: 1px solid var(--color-neutral-light);
}

.woocommerce-tabs ul.tabs {
    display: flex;
    gap: 0;
    border-bottom: 2px solid var(--color-neutral-light);
    list-style: none;
    padding: 0;
    margin: 0 0 var(--space-xl) 0;
}

.woocommerce-tabs ul.tabs li a {
    display: block;
    padding: 0.75rem 1.25rem;
    font-family: var(--font-heading);
    font-weight: 600;
    color: var(--color-text-muted);
    text-decoration: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: color var(--transition-fast), border-color var(--transition-fast);
}

.woocommerce-tabs ul.tabs li.active a {
    color: var(--color-primary);
    border-bottom-color: var(--color-primary);
}

/* ==========================================================================
   7. Cart
   ========================================================================== */

.cart-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-xl);
    width: 100%;
    max-width: 100%;
    align-items: start;
}

@media (min-width: 900px) {
    .cart-layout {
        grid-template-columns: minmax(0, 1fr) 360px;
    }
}

/* ── Cart item cards ─────────────────────────────────────────────────── */

.cart-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.cart-item {
    display: grid;
    grid-template-columns: 84px minmax(0, 1fr);
    gap: var(--space-md);
    margin: 0;
    padding: var(--space-md);
    background: #fff;
    border: 1px solid var(--color-neutral-light);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    transition: box-shadow var(--transition-fast), transform var(--transition-fast);
}

.cart-item:hover {
    box-shadow: var(--shadow-md);
}

@media (min-width: 640px) {
    .cart-item {
        grid-template-columns: 108px minmax(0, 1fr);
        gap: var(--space-lg);
        padding: var(--space-lg);
    }
}

.cart-item__thumb a {
    display: block;
    border-radius: var(--radius-md);
    overflow: hidden;
    aspect-ratio: 1;
}

.cart-item__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.cart-item__top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: var(--space-sm);
}

.cart-item__name {
    margin: 0;
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.3;
}

@media (min-width: 640px) {
    .cart-item__name { font-size: 1.0625rem; }
}

.cart-item__name a {
    color: var(--color-text);
    text-decoration: none;
    transition: color var(--transition-fast);
}

.cart-item__name a:hover { color: var(--color-primary); }

.cart-item__remove { flex: 0 0 auto; }

.cart-item__remove a.remove,
table.cart a.remove {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: rgba(211, 47, 47, 0.08);
    color: var(--color-error);
    border-radius: var(--radius-full);
    font-size: 1.25rem;
    line-height: 1;
    text-decoration: none;
    transition: background-color var(--transition-fast), color var(--transition-fast), transform var(--transition-fast);
}

.cart-item__remove a.remove:hover,
table.cart a.remove:hover {
    background: var(--color-error);
    color: #fff;
    transform: scale(1.05);
}

.cart-item__meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--space-xs) var(--space-sm);
    margin-top: var(--space-xs);
    font-size: 0.8125rem;
    color: var(--color-text-muted);
}

.cart-item__meta dl.variation { margin: 0; }

.cart-item__unit-price {
    flex-basis: 100%;
    margin-top: 2px;
}

.cart-item__unit-price .woocommerce-Price-amount { font-weight: 600; }

.cart-item__bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: var(--space-sm) var(--space-md);
    margin-top: var(--space-md);
}

/* ── Quantity stepper ────────────────────────────────────────────────── */

.qty-stepper {
    display: inline-flex;
    align-items: stretch;
    background: #fff;
    border: 1.5px solid var(--color-neutral-light);
    border-radius: var(--radius-full);
    overflow: hidden;
    transition: border-color var(--transition-fast);
}

.qty-stepper:focus-within { border-color: var(--color-primary); }

.qty-stepper__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    min-height: 42px;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--color-primary-dark);
    font-family: var(--font-heading);
    font-size: 1.25rem;
    line-height: 1;
    cursor: pointer;
    transition: background-color var(--transition-fast);
}

.qty-stepper__btn:hover { background: var(--color-surface); }

.qty-stepper__btn:active { background: rgba(46, 125, 50, 0.1); }

.qty-stepper input.qty {
    width: 46px;
    min-height: 42px;
    padding: 0.25rem 0;
    border: 0;
    background: transparent;
    text-align: center;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 1rem;
    color: var(--color-text);
    -moz-appearance: textfield;
    appearance: textfield;
}

.qty-stepper input.qty:focus { outline: none; }

.qty-stepper input.qty::-webkit-outer-spin-button,
.qty-stepper input.qty::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* ── Item subtotal ───────────────────────────────────────────────────── */

.cart-item__subtotal {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    margin-left: auto;
}

.cart-item__subtotal-label {
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--color-text-muted);
}

.cart-item__subtotal .woocommerce-Price-amount {
    font-family: var(--font-heading);
    font-size: 1.0625rem;
    font-weight: 700;
    color: var(--color-primary-dark);
}

/* ── Toolbar: coupon + update ────────────────────────────────────────── */

.cart-toolbar {
    list-style: none;
    margin: var(--space-md) 0 0;
    padding: var(--space-md);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-sm) var(--space-md);
    background: #fff;
    border: 1px solid var(--color-neutral-light);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

.cart-toolbar__coupon {
    display: flex;
    flex: 1 1 260px;
    gap: var(--space-sm);
    align-items: stretch;
}

.cart-toolbar__coupon-input {
    flex: 1 1 auto;
    min-width: 0;
    min-height: 44px;
    padding: 0.5rem 0.875rem;
    border: 1px solid var(--color-neutral-light);
    border-radius: var(--radius-md);
    font: inherit;
    font-size: 0.9375rem;
}

.cart-toolbar__coupon-input:focus-visible {
    outline: 2px solid var(--color-accent);
    outline-offset: 1px;
}

.cart-toolbar .button {
    min-height: 44px;
}

.cart-toolbar__update {
    background: transparent;
    color: var(--color-primary);
    border: 1.5px solid var(--color-primary);
}

.cart-toolbar__update:hover {
    background: var(--color-primary);
    color: #fff;
}

.cart-toolbar__update:disabled {
    opacity: 0.45;
    cursor: not-allowed;
    transform: none;
}

/* ── Empty cart ──────────────────────────────────────────────────────── */

.woocommerce p.cart-empty {
    padding: var(--space-2xl) var(--space-xl);
    text-align: center;
    background: #fff;
    border: 1px dashed var(--color-neutral-light);
    border-radius: var(--radius-xl);
    font-size: 1.0625rem;
    color: var(--color-text-muted);
}

.woocommerce .return-to-shop {
    text-align: center;
    margin: var(--space-lg) 0 var(--space-2xl);
}

.woocommerce .return-to-shop .button {
    background: var(--color-accent);
    font-size: 1.0625rem;
    padding: 0.875rem 2rem;
    border-radius: var(--radius-full);
}

.woocommerce .return-to-shop .button:hover { background: #E65100; }

/* ── Cart totals card (markup lives in cart-totals.php) ─────────────── */

.cart-totals-card {
    background: #fff;
    border: 1px solid var(--color-neutral-light);
    border-radius: var(--radius-xl);
    padding: var(--space-xl);
    box-shadow: var(--shadow-md);
    position: sticky;
    top: calc(var(--header-height) + 1.5rem);
}

.cart-totals-card__title {
    font-size: 1.25rem;
    margin: 0 0 var(--space-lg);
    padding-bottom: var(--space-md);
    border-bottom: 2px solid var(--color-primary);
    color: var(--color-neutral-dark);
}

.cart-totals-card .shop_table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9375rem;
}

.cart-totals-card .shop_table th,
.cart-totals-card .shop_table td {
    padding: 0.75rem 0;
    text-align: left;
    vertical-align: middle;
    border-bottom: 1px solid var(--color-neutral-light);
}

.cart-totals-card .shop_table th {
    font-weight: 600;
    color: var(--color-text-muted);
}

.cart-totals-card .order-total th,
.cart-totals-card .order-total td {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 1.25rem;
    color: var(--color-primary-dark);
    border-bottom: none;
    padding-top: 1rem;
}

.cart-totals-card .wc-proceed-to-checkout { margin-top: var(--space-lg); }

.cart-totals-card .wc-proceed-to-checkout a.checkout-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    width: 100%;
    text-align: center;
    background: var(--color-accent);
    color: #fff;
    padding: 1rem;
    border-radius: var(--radius-lg);
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.0625rem;
    text-decoration: none;
    transition: background-color var(--transition-fast), transform var(--transition-fast), box-shadow var(--transition-fast);
}

.cart-totals-card .wc-proceed-to-checkout a.checkout-button:hover {
    background: #E65100;
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.cart-payment-logos {
    margin-top: var(--space-md);
    display: flex;
    gap: var(--space-sm);
    justify-content: center;
    flex-wrap: wrap;
}

.payment-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-full);
    font-family: var(--font-heading);
    font-size: 0.75rem;
    font-weight: 700;
    background: var(--color-surface);
    border: 1px solid var(--color-neutral-light);
    color: var(--color-text-muted);
}

.payment-badge--esewa { color: #4CAF50; border-color: rgba(76, 175, 80, 0.4); }
.payment-badge--khalti { color: #7B1FA2; border-color: rgba(123, 31, 162, 0.35); }
.payment-badge--cod { color: var(--color-neutral-dark); }

/* ==========================================================================
   Fixed Bottom Checkout Action Bar (cart page)
   ========================================================================== */

/* Layout offset — prevent content from hiding behind the fixed bar */
.woocommerce-cart .site-main {
    padding-bottom: 100px;
}

.cart-sticky-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 999;
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-top: 1px solid rgba(46, 125, 50, 0.15);
    box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.08);
    padding: 0.75rem 0;
    padding-bottom: max(0.75rem, env(safe-area-inset-bottom));
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease;
    will-change: transform;
    animation: stickyBarSlideUp 0.45s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes stickyBarSlideUp {
    from { transform: translateY(100%); opacity: 0; }
    to   { transform: translateY(0); opacity: 1; }
}

.cart-sticky-bar__container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.cart-sticky-bar__summary {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 0;
    flex: 1;
}

.cart-sticky-bar__icon-wrap {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, #E8F5E9, #C8E6C9);
    border-radius: 12px;
    color: var(--color-primary-dark);
}

.cart-sticky-bar__icon { width: 22px; height: 22px; }

.cart-sticky-bar__badge {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 5px;
    background: var(--color-accent);
    color: #fff;
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 0.6875rem;
    border-radius: 10px;
    line-height: 1;
    box-shadow: 0 2px 6px rgba(255, 143, 0, 0.3);
}

@keyframes stickyBadgeBounce {
    0%   { transform: scale(1); }
    30%  { transform: scale(1.45); }
    60%  { transform: scale(0.9); }
    80%  { transform: scale(1.12); }
    100% { transform: scale(1); }
}

.cart-sticky-bar__badge--bounce {
    animation: stickyBadgeBounce 0.4s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
}

.cart-sticky-bar__info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.cart-sticky-bar__items-label {
    font-size: 0.8125rem;
    color: var(--color-text-muted);
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cart-sticky-bar__items-label strong { color: var(--color-neutral-dark); }

.cart-sticky-bar__amount {
    display: flex;
    align-items: baseline;
    gap: 4px;
    line-height: 1.2;
}

.cart-sticky-bar__amount-label {
    font-size: 0.75rem;
    color: var(--color-text-muted);
    font-weight: 500;
}

.cart-sticky-bar__amount-val {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 1.125rem;
    color: var(--color-primary-dark);
    line-height: 1.2;
}

.cart-sticky-bar__amount-val .woocommerce-Price-amount {
    font-size: inherit;
    font-weight: inherit;
    color: inherit;
}

.cart-sticky-bar__action { flex-shrink: 0; }

.cart-sticky-bar__btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--color-accent);
    color: #fff !important;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.9375rem;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-lg);
    text-decoration: none;
    border: none;
    cursor: pointer;
    min-height: 48px;
    white-space: nowrap;
    box-shadow: 0 4px 14px rgba(255, 143, 0, 0.3);
    transition: background-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.cart-sticky-bar__btn:hover {
    background: #E65100;
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(230, 81, 0, 0.35);
    color: #fff !important;
}

.cart-sticky-bar__btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(230, 81, 0, 0.2);
}

.cart-sticky-bar__btn svg {
    flex-shrink: 0;
    transition: transform 0.2s ease;
}

.cart-sticky-bar__btn:hover svg { transform: translateX(3px); }

@media (max-width: 480px) {
    .cart-sticky-bar__container { gap: 0.625rem; }

    .cart-sticky-bar__btn {
        padding: 0.625rem 1rem;
        font-size: 0.8125rem;
        min-height: 44px;
    }

    .cart-sticky-bar__btn span { display: none; }

    .cart-sticky-bar__btn::before { content: 'Checkout'; }

    .cart-sticky-bar__icon-wrap {
        width: 38px;
        height: 38px;
        border-radius: 10px;
    }

    .cart-sticky-bar__icon { width: 18px; height: 18px; }

    .cart-sticky-bar__amount-val { font-size: 1rem; }
}

@media (min-width: 640px) {
    .cart-sticky-bar__btn {
        padding: 0.75rem 2rem;
        font-size: 1rem;
    }
}

.cart-sticky-bar--hidden {
    transform: translateY(100%);
    opacity: 0;
    pointer-events: none;
}

/* ==========================================================================
   7b. Cart Block (wp-block-woocommerce-cart)
   The WooCommerce Cart block (wc-block-*) restyled to match the classic
   cart design above. Selectors verified against WooCommerce 11.x block
   assets so both cart modes render with the same visual language.
   ========================================================================== */

.wp-block-woocommerce-cart {
    font-family: var(--font-body);
    color: var(--color-text);
    padding-bottom: var(--space-2xl);
}

/* ── Layout: items card + sticky totals card ─────────────────────────── */

.wp-block-woocommerce-cart .wc-block-components-sidebar-layout {
    gap: var(--space-xl);
    align-items: start;
}

.wp-block-woocommerce-cart .wp-block-woocommerce-cart-items-block {
    padding-right: 0;
    background: #fff;
    border: 1px solid var(--color-neutral-light);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    padding-left: var(--space-md);
    padding-top: var(--space-sm);
    padding-bottom: var(--space-md);
}

.wp-block-woocommerce-cart .wp-block-woocommerce-cart-totals-block {
    padding-left: 0;
    background: #fff;
    border: 1px solid var(--color-neutral-light);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-md);
    padding: var(--space-lg) var(--space-xl);
}

@media (min-width: 700px) {
    .wp-block-woocommerce-cart .wp-block-woocommerce-cart-totals-block {
        position: sticky;
        top: calc(var(--header-height) + 1.5rem);
    }
}

@media (max-width: 699px) {
    .wp-block-woocommerce-cart .wp-block-woocommerce-cart-items-block {
        padding-left: var(--space-sm);
        padding-right: var(--space-sm);
    }
}

/* ── Line items ──────────────────────────────────────────────────────── */

.wp-block-woocommerce-cart table.wc-block-cart-items {
    font-size: 0.9375rem;
}

.wp-block-woocommerce-cart table.wc-block-cart-items .wc-block-cart-items__header {
    font-size: 0.75rem;
    letter-spacing: 0.06em;
    color: var(--color-text-muted);
}

.wp-block-woocommerce-cart .wc-block-cart__main .wc-block-cart-items th {
    padding: var(--space-md) 0 var(--space-sm);
}

.wp-block-woocommerce-cart .wc-block-cart__main .wc-block-cart-items td {
    border-top-color: var(--color-neutral-light);
    padding: var(--space-lg) 0;
}

.wp-block-woocommerce-cart table.wc-block-cart-items .wc-block-cart-item__image img {
    border-radius: var(--radius-md);
}

.wp-block-woocommerce-cart table.wc-block-cart-items .wc-block-cart-items__row .wc-block-components-product-name {
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.3;
}

.wp-block-woocommerce-cart table.wc-block-cart-items .wc-block-cart-items__row .wc-block-components-product-name a {
    color: var(--color-text);
    text-decoration: none;
    transition: color var(--transition-fast);
}

.wp-block-woocommerce-cart table.wc-block-cart-items .wc-block-cart-items__row .wc-block-components-product-name a:hover {
    color: var(--color-primary);
}

.wp-block-woocommerce-cart table.wc-block-cart-items .wc-block-cart-items__row .wc-block-cart-item__prices {
    color: var(--color-text-muted);
    font-size: 0.8125rem;
}

.wp-block-woocommerce-cart table.wc-block-cart-items .wc-block-cart-items__row .wc-block-cart-item__total {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.0625rem;
    color: var(--color-primary-dark);
}

/* Remove button → circular error-tinted icon (block hides it < 700px) */
.wp-block-woocommerce-cart table.wc-block-cart-items .wc-block-cart-items__row .wc-block-cart-item__remove-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    color: var(--color-error);
    background: rgba(211, 47, 47, 0.08);
    border-radius: var(--radius-full);
    text-decoration: none;
    transition: background-color var(--transition-fast), color var(--transition-fast);
}

.wp-block-woocommerce-cart table.wc-block-cart-items .wc-block-cart-items__row .wc-block-cart-item__remove-link:hover {
    background: var(--color-error);
    color: #fff;
}

.wp-block-woocommerce-cart table.wc-block-cart-items .wc-block-cart-items__row .wc-block-cart-item__remove-link svg {
    width: 14px;
    height: 14px;
}

.wp-block-woocommerce-cart .wc-block-components-product-badge {
    background: rgba(46, 125, 50, 0.1);
    color: var(--color-primary-dark);
    border-radius: var(--radius-full);
    font-family: var(--font-heading);
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 2px 10px;
}

/* ── Quantity selector → pill stepper ────────────────────────────────── */

.wp-block-woocommerce-cart .wc-block-components-quantity-selector {
    width: 116px;
    background: #fff;
    border: 1.5px solid var(--color-neutral-light);
    border-radius: var(--radius-full);
}

.wp-block-woocommerce-cart .wc-block-components-quantity-selector .wc-block-components-quantity-selector__button {
    color: var(--color-primary-dark);
    opacity: 1;
    min-width: 34px;
    font-size: 1.125rem;
    transition: background-color var(--transition-fast);
}

.wp-block-woocommerce-cart .wc-block-components-quantity-selector .wc-block-components-quantity-selector__button:hover:not(:disabled) {
    background: var(--color-surface);
}

.wp-block-woocommerce-cart .wc-block-components-quantity-selector > .wc-block-components-quantity-selector__button--minus {
    border-radius: var(--radius-full) 0 0 var(--radius-full);
}

.wp-block-woocommerce-cart .wc-block-components-quantity-selector > .wc-block-components-quantity-selector__button--plus {
    border-radius: 0 var(--radius-full) var(--radius-full) 0;
}

.wp-block-woocommerce-cart .wc-block-components-quantity-selector input.wc-block-components-quantity-selector__input {
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 0.9375rem;
    color: var(--color-text);
}

/* ── Totals card ─────────────────────────────────────────────────────── */

.wp-block-woocommerce-cart .wc-block-cart .wc-block-cart__totals-title {
    display: block;
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 700;
    text-transform: none;
    letter-spacing: normal;
    color: var(--color-neutral-dark);
    padding: 0 0 var(--space-md);
    margin-bottom: var(--space-sm);
    border-bottom: 2px solid var(--color-primary);
}

.wp-block-woocommerce-cart .wc-block-components-totals-item {
    padding: 0.75rem 0;
}

.wp-block-woocommerce-cart .wc-block-components-totals-footer-item .wc-block-components-totals-item__label,
.wp-block-woocommerce-cart .wc-block-components-totals-footer-item .wc-block-components-totals-item__value {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 1.25rem;
    color: var(--color-primary-dark);
}

.wp-block-woocommerce-cart .wp-block-woocommerce-cart-order-summary-totals-block {
    border-top-color: rgba(46, 125, 50, 0.15);
}

/* Coupon toggle + field */
.wp-block-woocommerce-cart .wc-block-components-panel__button {
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 0.9375rem;
    color: var(--color-primary);
    padding-left: 0;
    padding-right: 0;
}

.wp-block-woocommerce-cart .wc-block-components-totals-coupon__form {
    gap: var(--space-sm);
    margin-top: var(--space-sm);
}

.wp-block-woocommerce-cart .wc-block-components-totals-coupon__form .wc-block-components-totals-coupon__input {
    flex: 3 1 140px;
}

.wp-block-woocommerce-cart .wc-block-components-totals-coupon__form .wc-block-components-totals-coupon__input input {
    border: 1px solid var(--color-neutral-light);
    border-radius: var(--radius-md);
    min-height: 44px;
    padding: 0.5rem 0.875rem;
    font-size: 0.9375rem;
}

/* ── Buttons ─────────────────────────────────────────────────────────── */

.wp-block-woocommerce-cart .wc-block-components-button:not(.is-link):not(.text):not(.outlined):not(.is-style-outline) {
    background: var(--color-primary);
    color: #fff;
    border-radius: var(--radius-md);
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 0.9375rem;
    min-height: 44px;
    padding: 0.6rem 1.25rem;
    transition: background-color var(--transition-fast), transform var(--transition-fast);
}

.wp-block-woocommerce-cart .wc-block-components-button:not(.is-link):not(.text):not(.outlined):not(.is-style-outline):hover:not(:disabled) {
    background: var(--color-primary-dark);
    transform: translateY(-1px);
}

/* Proceed to checkout → accent CTA */
.wp-block-woocommerce-cart .wc-block-cart__submit {
    margin: 0;
}

.wp-block-woocommerce-cart .wc-block-cart__submit-button {
    background: var(--color-accent);
    color: #fff;
    font-size: 1.0625rem;
    font-weight: 700;
    padding: 1rem;
    border-radius: var(--radius-lg);
    box-shadow: 0 4px 14px rgba(255, 143, 0, 0.3);
    transition: background-color var(--transition-fast), transform var(--transition-fast), box-shadow var(--transition-fast);
}

.wp-block-woocommerce-cart .wc-block-cart__submit-button:hover:not(:disabled) {
    background: #E65100;
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(230, 81, 0, 0.35);
}

/* Accepted payment icons */
.wp-block-woocommerce-cart .wp-block-woocommerce-cart-accepted-payment-methods-block .wc-block-components-payment-method-icons {
    justify-content: center;
    margin: var(--space-md) 0 0;
}

.wp-block-woocommerce-cart .wc-block-components-payment-method-icons .wc-block-components-payment-method-icon {
    opacity: 0.8;
}

/* ── Sticky mobile checkout bar ──────────────────────────────────────── */

@media (max-width: 782px) {
    .wp-block-woocommerce-cart .wc-block-cart__submit-container--sticky {
        background: rgba(255, 255, 255, 0.94);
        backdrop-filter: blur(14px);
        -webkit-backdrop-filter: blur(14px);
        border-top: 1px solid rgba(46, 125, 50, 0.15);
        box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.08);
        padding: 0.75rem var(--space-md);
        padding-bottom: max(0.75rem, env(safe-area-inset-bottom));
    }

    .wp-block-woocommerce-cart .wc-block-cart__submit-container--sticky::before {
        display: none;
    }
}

/* ── Empty cart state ────────────────────────────────────────────────── */

.wp-block-woocommerce-cart .wc-block-cart__empty-cart__title {
    font-family: var(--font-heading);
    font-weight: 700;
    color: var(--color-neutral-dark);
}

.wp-block-woocommerce-cart .wp-block-woocommerce-empty-cart-block .wp-block-button__link {
    background: var(--color-accent);
    color: #fff;
    border-radius: var(--radius-full);
    font-family: var(--font-heading);
    font-weight: 700;
    padding: 0.875rem 2rem;
}

.wp-block-woocommerce-cart .wp-block-woocommerce-empty-cart-block .wp-block-button__link:hover {
    background: #E65100;
}

/* ── Cross-sells heading ─────────────────────────────────────────────── */

.wp-block-woocommerce-cart .wp-block-woocommerce-cart-cross-sells-block .wp-block-heading {
    font-family: var(--font-heading);
    font-size: 1.25rem;
}

/* ── Block notices → theme palette ───────────────────────────────────── */

.wp-block-woocommerce-cart .wc-block-components-notice-banner {
    border-radius: var(--radius-md);
    border-left-width: 4px;
    font-size: 0.9375rem;
}

.wp-block-woocommerce-cart .wc-block-components-notice-banner.is-success {
    background: #E8F5E9;
    border-color: var(--color-success);
    color: #1B5E20;
}

.wp-block-woocommerce-cart .wc-block-components-notice-banner.is-error {
    background: #FFEBEE;
    border-color: var(--color-error);
    color: #B71C1C;
}

.wp-block-woocommerce-cart .wc-block-components-notice-banner.is-warning {
    background: #FFF8E1;
    border-color: var(--color-warning);
    color: #8D6E00;
}

.wp-block-woocommerce-cart .wc-block-components-notice-banner.is-info {
    background: #E3F2FD;
    border-color: #1565C0;
    color: #0D47A1;
}

/* ==========================================================================
   8. Checkout
   ========================================================================== */

.checkout-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-xl);
    padding-bottom: var(--space-3xl);
}

@media (min-width: 1024px) {
    .checkout-layout { grid-template-columns: minmax(0, 1fr) 400px; }

    #customer_details {
        grid-column: 1;
        grid-row: 1 / -1;
        min-width: 0;
    }

    #order_review {
        grid-column: 2;
        grid-row: 1;
        min-width: 0;
        position: sticky;
        top: calc(var(--header-height) + 1rem);
        max-height: calc(100vh - var(--header-height) - 2rem);
        overflow-y: auto;
        overscroll-behavior: contain;
        scrollbar-width: thin;
    }
}

/* The collapsible summary bar supersedes the core "Your order" heading. */
.checkout-layout #order_review_heading { display: none; }

/* WC default CSS floats .col2-set columns; the theme grid wants them stacked
   so the locate-row media queries get the full left-column width. */
.woocommerce-checkout .checkout-layout .col2-set .col-1,
.woocommerce-checkout .checkout-layout .col2-set .col-2 {
    float: none;
    width: 100%;
}

/* ── Order summary (collapsible card) ─────────────────────────────────── */
.tmc-order-summary {
    margin: 0;
    background: #fff;
    border: 1px solid var(--color-neutral-light);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-md);
    overflow: hidden;
}

.tmc-order-summary__toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-md);
    padding: var(--space-lg) var(--space-xl);
    list-style: none;
    cursor: pointer;
    position: relative;
    background: linear-gradient(135deg, #F1F8E9, #E8F5E9);
}

.tmc-order-summary__toggle::-webkit-details-marker { display: none; }

.tmc-order-summary__heading {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.125rem;
    color: var(--color-primary-dark);
}

.tmc-order-summary__meta {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    min-width: 0;
}

.tmc-order-summary__total {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 1.0625rem;
    color: var(--color-primary-dark);
    white-space: nowrap;
}

.tmc-order-summary__chevron {
    width: 0.625rem;
    height: 0.625rem;
    border-right: 2px solid var(--color-primary);
    border-bottom: 2px solid var(--color-primary);
    transform: rotate(45deg);
    transition: transform var(--transition-fast);
    flex-shrink: 0;
}

.tmc-order-summary[open] .tmc-order-summary__chevron { transform: rotate(225deg); }

.tmc-order-summary__toggle:hover { background: linear-gradient(135deg, #E8F5E9, #DCEDC8); }

.tmc-order-summary__body { padding: var(--space-lg) var(--space-xl) var(--space-xl); }

.tmc-order-summary__body > table {
    margin: 0;
}

.woocommerce-checkout-review-order-table {
    width: 100%;
    border-collapse: collapse;
}

.woocommerce-checkout-review-order-table th,
.woocommerce-checkout-review-order-table td {
    padding: 0.625rem 0;
    font-size: 0.9375rem;
    text-align: left;
    vertical-align: top;
    border-bottom: 1px solid var(--color-neutral-light);
}

.woocommerce-checkout-review-order-table td.product-total,
.woocommerce-checkout-review-order-table tfoot td { text-align: right; }

.woocommerce-checkout-review-order-table .product-name .product-quantity {
    color: var(--color-text-muted);
    font-weight: 500;
}

.woocommerce-checkout-review-order-table tfoot .order-total th,
.woocommerce-checkout-review-order-table tfoot .order-total td {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 1.25rem;
    color: var(--color-primary-dark);
    border-bottom: none;
    padding-top: var(--space-md);
}

/* ── Payment methods (selectable cards) ───────────────────────────────── */
.woocommerce-checkout-payment ul.wc_payment_methods {
    list-style: none;
    margin: 0 0 var(--space-lg);
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.woocommerce-checkout-payment li.wc_payment_method {
    margin: 0;
    padding: var(--space-md) var(--space-lg);
    border: 1.5px solid var(--color-neutral-light);
    border-radius: var(--radius-lg);
    background: #fff;
    transition: border-color var(--transition-fast), background-color var(--transition-fast), box-shadow var(--transition-fast);
}

.woocommerce-checkout-payment li.wc_payment_method > label {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 0.9375rem;
    cursor: pointer;
}

.woocommerce-checkout-payment li.wc_payment_method > input[name="payment_method"] {
    margin: 0;
    accent-color: var(--color-primary);
    width: 1rem;
    height: 1rem;
    flex-shrink: 0;
}

.woocommerce-checkout-payment li.wc_payment_method:has(> input[name="payment_method"]:checked) {
    border-color: var(--color-primary);
    background: var(--color-surface);
    box-shadow: 0 0 0 3px rgba(46, 125, 50, 0.1);
}

.woocommerce-checkout-payment li.wc_payment_method .payment_box {
    margin: var(--space-sm) 0 0;
    padding: var(--space-md);
    background: var(--color-surface);
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    color: var(--color-text-muted);
}

/* ── Delivery schedule (plugin-rendered) ──────────────────────────────── */
.tmc-delivery-schedule {
    margin: var(--space-lg) 0 0;
    padding: var(--space-lg);
    background: var(--color-surface);
    border: 1px solid #E0E7DE;
    border-radius: var(--radius-lg);
}

.tmc-delivery-schedule__title {
    margin: 0 0 var(--space-xs);
    font-family: var(--font-heading);
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--color-primary-dark);
    display: flex;
    align-items: center;
    gap: var(--space-xs);
}

.tmc-delivery-schedule__intro {
    font-size: 0.875rem;
    color: var(--color-text-muted);
    margin: 0 0 var(--space-md);
}

.tmc-delivery-schedule .form-row { margin: 0 0 var(--space-md); }
.tmc-delivery-schedule .form-row:last-child { margin-bottom: 0; }

/* ── Reveal animations (driven by wc-experience.js; .js is added by that
   script before these rules may hide anything, so no-JS keeps content
   fully visible) ─────────────────────────────────────────────────────── */
.js [data-reveal] {
    opacity: 0;
    transform: translateY(16px);
    transition:
        opacity 0.5s ease var(--reveal-delay, 0ms),
        transform 0.5s cubic-bezier(0.22, 1, 0.36, 1) var(--reveal-delay, 0ms);
    will-change: opacity, transform;
}

.js [data-reveal].is-revealed {
    opacity: 1;
    transform: none;
}

@media (prefers-reduced-motion: reduce) {
    .js [data-reveal] {
        opacity: 1;
        transform: none;
        transition: none;
    }
}

/* WooCommerce form fields */
.woocommerce-checkout .form-row label,
.woocommerce-account .form-row label {
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--color-neutral-dark);
    display: block;
    margin-bottom: var(--space-xs);
}

.woocommerce-checkout .form-row .input-text,
.woocommerce-checkout .form-row select,
.woocommerce-account .form-row .input-text {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--color-neutral-light);
    border-radius: var(--radius-md);
    font-family: var(--font-body);
    font-size: 1rem;
    color: var(--color-text);
    background: #fff;
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
    outline: none;
}

.woocommerce-checkout .form-row .input-text:focus,
.woocommerce-account .form-row .input-text:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(46, 125, 50, 0.12);
}

/* Billing address card -----------------------------------------------------
   The collapsible <details> that holds the address fields. Kept open by
   default so the required fields are visible without an extra click; the
   summary header doubles as the disclosure control.
   ------------------------------------------------------------------------ */
.tmc-address-card {
    margin: var(--space-lg) 0 0;
    padding: var(--space-md);
    border: 1px solid var(--color-neutral-light);
    border-radius: var(--radius-md);
    background: #fff;
    box-shadow: var(--shadow-sm);
}

.tmc-address-card__summary {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin: calc(var(--space-md) * -1) calc(var(--space-md) * -1) 0;
    padding: var(--space-md) calc(var(--space-md) + 1.5rem) var(--space-md) var(--space-md);
    list-style: none;
    cursor: pointer;
    position: relative;
}

.tmc-address-card__summary::-webkit-details-marker {
    display: none;
}

.tmc-address-card__summary::after {
    content: "";
    position: absolute;
    top: 50%;
    right: var(--space-md);
    width: 0.625rem;
    height: 0.625rem;
    border-right: 2px solid var(--color-primary);
    border-bottom: 2px solid var(--color-primary);
    transform: translateY(-75%) rotate(45deg);
    transition: transform var(--transition-fast);
}

.tmc-address-card[open] .tmc-address-card__summary::after {
    transform: translateY(-25%) rotate(225deg);
}

.tmc-address-card__summary:hover {
    background: var(--color-surface-alt);
}

.tmc-address-card[open] .tmc-address-card__summary {
    border-bottom: 1px solid var(--color-neutral-light);
}

.tmc-address-card__title {
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 1rem;
    color: var(--color-text);
}

.tmc-address-card__hint {
    font-size: 0.8125rem;
    color: var(--color-text-muted);
}

.tmc-address-card__fields {
    margin: 0;
    padding-top: var(--space-md);
}

.tmc-address-card__fields .form-row {
    margin: 0 0 var(--space-md);
}

.tmc-address-card__fields .form-row:last-child {
    margin-bottom: 0;
}

@media (prefers-reduced-motion: reduce) {
    .tmc-address-card__summary::after {
        transition: none;
    }
}

/* WC button overrides */
.woocommerce .button,
.woocommerce button[type="submit"],
.woocommerce input[type="submit"],
.woocommerce #place_order {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    background: var(--color-primary);
    color: #fff;
    border: none;
    border-radius: var(--radius-md);
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color var(--transition-fast), transform var(--transition-fast);
    text-decoration: none;
}

.woocommerce .button:hover,
.woocommerce button[type="submit"]:hover,
.woocommerce #place_order:hover {
    background: var(--color-primary-dark);
    color: #fff;
    transform: translateY(-1px);
}

/* Place order button — accent color */
.woocommerce #place_order {
    width: 100%;
    background: var(--color-accent);
    font-size: 1.125rem;
    font-weight: 700;
    letter-spacing: 0.01em;
    padding: 1.0625rem 1rem;
    border-radius: var(--radius-lg);
    box-shadow: 0 4px 14px rgba(255, 143, 0, 0.3);
}

.woocommerce #place_order:hover {
    background: #E65100;
    box-shadow: 0 6px 20px rgba(230, 81, 0, 0.35);
}

.woocommerce #place_order:disabled {
    opacity: 0.55;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Terms + privacy checkbox row */
.woocommerce-checkout .form-row.place-order {
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.woocommerce-terms-and-conditions-wrapper {
    font-size: 0.8125rem;
    color: var(--color-text-muted);
}

.woocommerce-terms-and-conditions-wrapper a {
    color: var(--color-primary-dark);
    font-weight: 600;
}

/* ==========================================================================
   9. My Account Dashboard
   ========================================================================== */

.myaccount-dashboard { max-width: 800px; }

.myaccount-welcome {
    display: flex;
    gap: var(--space-lg);
    align-items: center;
    padding: var(--space-xl);
    background: linear-gradient(135deg, #E8F5E9, #F1F8E9);
    border-radius: var(--radius-xl);
    margin-bottom: var(--space-xl);
    border: 1px solid rgba(46, 125, 50, 0.15);
}

.myaccount-welcome__img { border-radius: var(--radius-full); border: 3px solid var(--color-primary-light); }

.myaccount-welcome__name { font-size: 1.5rem; margin-bottom: var(--space-sm); }

.account-badge {
    display: inline-flex;
    align-items: center;
    gap: var(--space-xs);
    padding: 4px 12px;
    border-radius: var(--radius-full);
    font-size: 0.8125rem;
    font-weight: 600;
    font-family: var(--font-heading);
    text-decoration: none;
}

.account-badge--wholesale  { background: rgba(46, 125, 50, 0.12); color: var(--color-primary-dark); }
.account-badge--pending    { background: rgba(245, 124, 0, 0.12); color: var(--color-warning); }
.account-badge--upgrade    { background: rgba(21, 101, 192, 0.1); color: var(--color-wholesale); }
.account-badge--upgrade:hover { background: rgba(21, 101, 192, 0.2); color: var(--color-wholesale); }

/* Stats row */
.myaccount-stats {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-md);
    margin-bottom: var(--space-xl);
}

@media (min-width: 480px) {
    .myaccount-stats {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

.myaccount-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-xs);
    padding: var(--space-lg);
    background: #fff;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--color-neutral-light);
}

.myaccount-stat strong {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--color-primary-dark);
}

.myaccount-stat span { font-size: 0.8125rem; color: var(--color-text-muted); text-align: center; }

/* Reorder panel */
.myaccount-reorder__title { font-size: 1.125rem; margin-bottom: var(--space-md); }

.myaccount-reorder__list { display: flex; flex-direction: column; gap: var(--space-sm); }

.reorder-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-lg);
    padding: var(--space-md) var(--space-lg);
    background: #fff;
    border-radius: var(--radius-lg);
    border: 1px solid var(--color-neutral-light);
    box-shadow: var(--shadow-sm);
}

.reorder-card__info { display: flex; gap: var(--space-lg); flex-wrap: wrap; align-items: center; font-size: 0.9375rem; }
.reorder-card__id { font-weight: 700; color: var(--color-neutral-dark); }
.reorder-card__date { color: var(--color-text-muted); }
.reorder-card__total { color: var(--color-primary-dark); font-weight: 600; }

/* ==========================================================================
   10. WooCommerce Notices
   ========================================================================== */

.woocommerce-message,
.woocommerce-info,
.woocommerce-error {
    border-radius: var(--radius-md);
    padding: var(--space-md) var(--space-lg);
    margin-bottom: var(--space-lg);
    display: flex;
    align-items: flex-start;
    gap: var(--space-md);
    font-size: 0.9375rem;
    list-style: none;
}

.woocommerce-message { background: #E8F5E9; border-left: 4px solid var(--color-success); color: #1B5E20; }
.woocommerce-info    { background: #E3F2FD; border-left: 4px solid #1565C0; color: #0D47A1; }
.woocommerce-error   { background: #FFEBEE; border-left: 4px solid var(--color-error); color: #B71C1C; }

/* ==========================================================================
   11. WooCommerce Pagination
   ========================================================================== */

.woocommerce-pagination ul {
    display: flex;
    gap: var(--space-xs);
    justify-content: center;
    list-style: none;
    padding: 0;
    margin-top: var(--space-2xl);
}

.woocommerce-pagination ul li a,
.woocommerce-pagination ul li span {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 0.9375rem;
    color: var(--color-text-muted);
    border: 1px solid var(--color-neutral-light);
    background: #fff;
    text-decoration: none;
    transition: all var(--transition-fast);
}

.woocommerce-pagination ul li a:hover { background: var(--color-primary); color: #fff; border-color: var(--color-primary); }
.woocommerce-pagination ul li span.current { background: var(--color-primary); color: #fff; border-color: var(--color-primary); }
