/*
Theme Name: Le Krautuvytė
Theme URI: https://krautuvyte.lt
Author: Le Krautuvytė
Author URI: https://krautuvyte.lt
Description: Premium butiko WooCommerce tema amatininkų maisto produktams. PHP 8.3, WCAG AA, zero-compromise.
Version: 2.0.0
Requires at least: 6.4
Tested up to: 6.7
Requires PHP: 8.3
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: krautuvyte
Tags: woocommerce, food, e-commerce, boutique, premium
*/

/* === Local Fonts (variable, self-hosted) === */
@font-face {
    font-family: 'Playfair Display';
    src: url('./assets/fonts/playfair-display-latin.woff2') format('woff2');
    font-weight: 400 700;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Montserrat';
    src: url('./assets/fonts/montserrat-latin.woff2') format('woff2');
    font-weight: 400 600;
    font-style: normal;
    font-display: swap;
}

/* === Design Tokens === */
:root {
    /* Palette — WCAG AA verified */
    --color-cream: #F5F5DC;
    --color-chocolate: #3D2B1F;

    /* Decorative only — 3.63:1 vs white, 3.70:1 vs chocolate. Passes the 3:1 bar
       for focus rings, dots and borders, FAILS the 4.5:1 bar for small text.
       Never put text on it and never make it text on chocolate. */
    --color-cinnamon: #D2691E;

    --color-cinnamon-deep: #A8511A; /* text-safe: 5.44:1 on white, 4.92:1 on cream */
    --color-cinnamon-light: #E08A4A; /* text-safe on chocolate only: 5.05:1 (2.63:1 on cream — do not use there) */
    --color-white: #FFFFFF;
    --color-ivory: #FAFAF0;
    --color-muted: #6B5D52;        /* secondary text — 5.73:1 on cream */
    --color-border: rgba(61, 43, 31, 0.10);

    /* Typography */
    --font-heading: 'Playfair Display', Georgia, 'Times New Roman', serif;
    --font-body: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

    /* Spacing — 8px rhythm */
    --space-2xs: 0.25rem;
    --space-xs: 0.5rem;
    --space-sm: 1rem;
    --space-md: 2rem;
    --space-lg: 4rem;
    --space-xl: 6rem;
    --space-2xl: 10rem;

    /* Layout */
    --max-width: 1200px;
    --radius: 3px;
    --radius-lg: 6px;
    --transition: 220ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 500ms cubic-bezier(0.4, 0, 0.2, 1);

    /* Shadows */
    --shadow-sm: 0 1px 3px rgba(61, 43, 31, 0.04);
    --shadow-md: 0 8px 30px rgba(61, 43, 31, 0.06);
    --shadow-lg: 0 16px 50px rgba(61, 43, 31, 0.08);
}

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

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

body {
    font-family: var(--font-body);
    background: var(--color-cream);
    color: var(--color-chocolate);
    line-height: 1.75;
    font-weight: 400;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

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

a {
    color: var(--color-cinnamon-deep);
    text-decoration: none;
    transition: color var(--transition);
}

a:hover, a:focus-visible { color: var(--color-chocolate); }

a:focus-visible {
    outline: 2px solid var(--color-cinnamon);
    outline-offset: 3px;
    border-radius: 2px;
}

/* === Typography === */
h1, h2, h3, h4, h5 {
    font-family: var(--font-heading);
    font-weight: 400;
    line-height: 1.15;
    color: var(--color-chocolate);
    letter-spacing: -0.01em;
}

h1 { font-size: clamp(2.25rem, 5vw + 0.5rem, 4rem); }
h2 { font-size: clamp(1.75rem, 3.5vw + 0.25rem, 2.75rem); }
h3 { font-size: clamp(1.25rem, 2vw + 0.25rem, 1.75rem); }
h4 { font-size: 1.125rem; }

p + p { margin-top: var(--space-sm); }

/* === Layout === */
.container {
    width: 100%;
    max-width: var(--max-width);
    margin-inline: auto;
    padding-inline: var(--space-sm);
}

@media (min-width: 769px) {
    .container { padding-inline: var(--space-md); }
}

/* === Header === */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(245, 245, 220, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--color-border);
    transition: box-shadow var(--transition);
}

/* Push header below WP admin bar when logged in */
.admin-bar .site-header {
    top: 32px;
}

@media (max-width: 782px) {
    .admin-bar .site-header {
        top: 46px;
    }
}

.site-header.scrolled {
    box-shadow: var(--shadow-md);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 100px;
    padding-block: var(--space-xs);
}

.site-logo {
    font-family: var(--font-heading);
    font-size: 1.625rem;
    color: var(--color-chocolate);
    letter-spacing: -0.02em;
    flex-shrink: 0;
}

.site-logo a,
.site-logo .custom-logo-link {
    color: inherit;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
}

.site-logo-url {
    display: block;
    font-family: var(--font-body);
    font-size: 0.625rem;
    font-weight: 500;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--color-cinnamon-deep);
    margin-top: 2px;
}

/* Force all logo images to fixed height — prevents blowup on WC pages */
.site-logo img,
.site-logo-img,
.custom-logo {
    height: 60px !important;
    width: auto !important;
    max-width: 220px !important;
    max-height: 60px !important;
    object-fit: contain;
}

@media (min-width: 769px) {
    .site-logo img,
    .site-logo-img,
    .custom-logo {
        height: 80px !important;
        max-height: 80px !important;
        max-width: 280px !important;
    }
}

.site-logo-text {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    letter-spacing: -0.02em;
}

/* WordPress custom-logo support */
.custom-logo-link { display: flex; align-items: center; }

.main-nav ul {
    display: flex;
    list-style: none;
    gap: clamp(var(--space-sm), 3vw, var(--space-md));
}

.main-nav a {
    font-size: 0.8125rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--color-chocolate);
    position: relative;
    padding: var(--space-xs) 0;
}

.main-nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 1.5px;
    background: var(--color-cinnamon);
    transition: width var(--transition);
}

.main-nav a:hover::after,
.main-nav a:focus-visible::after,
.main-nav .current-menu-item > a::after { width: 100%; }

.header-actions {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
}

.cart-link,
.account-link {
    position: relative;
    color: var(--color-chocolate);
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 48px;
    min-height: 48px;
    border-radius: var(--radius);
    transition: background var(--transition);
    -webkit-tap-highlight-color: transparent;
}

/* Search toggle */
.header-search-toggle {
    position: relative;
    color: var(--color-chocolate);
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 48px;
    min-height: 48px;
    background: none;
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    transition: background var(--transition);
    -webkit-tap-highlight-color: transparent;
}

.header-search-toggle:hover { background: rgba(61, 43, 31, 0.04); }

/* Header search overlay */
.header-search {
    border-top: 1px solid var(--color-border);
    background: var(--color-cream);
    padding: var(--space-sm) 0;
    animation: searchSlideDown 250ms ease;
}

@keyframes searchSlideDown {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}

.header-search-form {
    display: flex;
    align-items: center;
    gap: 0;
    background: var(--color-white);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: border-color var(--transition);
}

.header-search-form:focus-within {
    border-color: var(--color-cinnamon);
}

/* The form's overflow:hidden clips an outside focus ring on these two flush
   buttons, so pull the outline inside the clip rather than around it. */
.header-search-submit:focus-visible,
.header-search-close:focus-visible {
    outline: 2px solid var(--color-cinnamon);
    outline-offset: -3px;
}

.header-search-input {
    flex: 1;
    padding: 0.75rem var(--space-sm);
    border: none;
    background: none;
    font-family: var(--font-body);
    font-size: 0.9375rem;
    color: var(--color-chocolate);
    outline: none;
    min-height: 48px;
}

.header-search-input::placeholder {
    color: var(--color-muted);
}

.header-search-submit,
.header-search-close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--color-muted);
    transition: color var(--transition);
    flex-shrink: 0;
}

.header-search-submit:hover { color: var(--color-cinnamon); }
.header-search-close:hover { color: var(--color-chocolate); }

.cart-link:hover,
.account-link:hover { background: rgba(61, 43, 31, 0.04); }

.cart-count {
    position: absolute;
    top: 6px;
    right: 2px;
    background: var(--color-cinnamon-deep);
    color: var(--color-white);
    font-size: 0.5625rem;
    font-weight: 600;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

/* Zero-count badge stays in the DOM (AJAX fragment target) but invisible */
.cart-count.is-empty { display: none; }

/* Hamburger — 48x48 thumb target */
.nav-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    min-width: 48px;
    min-height: 48px;
    padding: 12px;
    color: var(--color-chocolate);
    -webkit-tap-highlight-color: transparent;
}

.nav-toggle span {
    display: block;
    width: 22px;
    height: 1.5px;
    background: currentColor;
    transition: transform var(--transition), opacity var(--transition);
}

.nav-toggle span + span { margin-top: 6px; }

.nav-toggle[aria-expanded="true"] span:nth-child(1) {
    transform: translateY(7.5px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }

.nav-toggle[aria-expanded="true"] span:nth-child(3) {
    transform: translateY(-7.5px) rotate(-45deg);
}

/* Drawer chrome exists in the markup for mobile only */
.nav-drawer-head { display: none; }

@media (max-width: 768px) {
    .nav-toggle { display: block; }

    /*
     * Full-screen drawer: covers the whole viewport (header included) with a
     * solid surface, has its own brand row + close button, and locks the page
     * scroll behind it. The previous top:100px panel left the page peeking
     * through above it and scrollable underneath — it read as floating.
     */
    .main-nav {
        position: fixed;
        inset: 0;
        z-index: 150; /* above the sticky header (100) */
        background: var(--color-cream);
        padding: 0 var(--space-sm) var(--space-md);
        display: flex;
        flex-direction: column;
        overflow-y: auto;
        transform: translateX(100%);
        /* visibility keeps the closed menu's links out of the tab order; delaying
           it until the slide-out finishes preserves the animation. */
        visibility: hidden;
        transition: transform 350ms cubic-bezier(0.4, 0, 0.2, 1), visibility 0s linear 350ms;
        will-change: transform;
    }

    .main-nav.open {
        transform: translateX(0);
        visibility: visible;
        transition: transform 350ms cubic-bezier(0.4, 0, 0.2, 1), visibility 0s;
    }

    /* WP admin bar (46px at <=782px) overlays the drawer top — logged-in only */
    .admin-bar .main-nav { padding-top: 46px; }

    /* html.nav-open set by main.js while the drawer is up */
    html.nav-open,
    html.nav-open body { overflow: hidden; }

    /*
     * The header's backdrop-filter makes it the containing block for its fixed
     * descendants, so the drawer's inset:0 anchored to the header box instead of
     * the viewport. Drop the blur while the drawer is open (it covers everything
     * anyway) to restore viewport-anchored positioning.
     */
    html.nav-open .site-header {
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
    }

    .nav-drawer-head {
        display: flex;
        align-items: center;
        justify-content: space-between;
        min-height: 64px;
        margin-bottom: var(--space-sm);
        border-bottom: 1px solid var(--color-border);
    }

    .nav-drawer-brand {
        font-family: var(--font-heading);
        font-size: 1.375rem;
        color: var(--color-chocolate);
    }

    .nav-close {
        display: flex;
        align-items: center;
        justify-content: center;
        min-width: 48px;
        min-height: 48px;
        margin-right: -12px;
        background: none;
        border: none;
        cursor: pointer;
        color: var(--color-chocolate);
        -webkit-tap-highlight-color: transparent;
    }

    .main-nav ul {
        flex-direction: column;
        gap: var(--space-2xs);
    }

    .main-nav a {
        font-size: 1.25rem;
        letter-spacing: 0.08em;
        display: flex;
        align-items: center;
        padding: 0.875rem var(--space-sm);
        min-height: 52px;
        border-radius: var(--radius);
        -webkit-tap-highlight-color: transparent;
    }

    .main-nav a:active { background: rgba(61, 43, 31, 0.04); }
    .main-nav a::after { display: none; }
}

/* === Scroll Reveal Animation === */
.reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

.reveal-delay-1 { transition-delay: 0.15s; }
.reveal-delay-2 { transition-delay: 0.3s; }

/* === Hero Split (asymmetric, image-driven) === */
.hero-split {
    padding: var(--space-xl) 0 var(--space-lg);
    overflow: hidden;
}

.hero-split-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-lg);
    align-items: center;
    min-height: 60vh;
}

.hero-split-content {
    max-width: 520px;
}

.hero-eyebrow {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.25em;
    color: var(--color-cinnamon-deep);
    margin-bottom: var(--space-sm);
    display: block;
}

.hero-split h1 {
    margin-bottom: var(--space-md);
    font-size: clamp(2.5rem, 5vw + 0.5rem, 4.5rem);
    line-height: 1.05;
    letter-spacing: -0.02em;
}

.hero-body {
    font-size: 1.0625rem;
    line-height: 1.85;
    color: var(--color-muted);
    margin-bottom: var(--space-md);
    max-width: 460px;
}

.hero-actions {
    display: flex;
    gap: var(--space-sm);
    flex-wrap: wrap;
}

/* Hero image stack — overlapping cards */
.hero-split-visual {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 400px;
}

.hero-image-stack {
    position: relative;
    width: 100%;
    max-width: 420px;
    aspect-ratio: 3 / 4;
}

.hero-image-card {
    display: block;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    background: var(--color-white);
    position: absolute;
    top: 0;
    left: 0;
    width: 75%;
    transition: all 500ms cubic-bezier(0.16, 1, 0.3, 1);
    cursor: pointer;
}

.hero-image-card img {
    width: 100%;
    aspect-ratio: 4 / 5;
    object-fit: contain;
    padding: var(--space-sm);
    background: var(--color-ivory);
}

/* Front card */
.hero-card-front {
    transform: rotate(-2deg) translateX(0);
    z-index: 3;
    opacity: 1;
}

/* Back card — visible, offset */
.hero-card-back {
    transform: rotate(4deg) translateX(35%) translateY(8%);
    z-index: 2;
    opacity: 0.85;
    width: 65%;
}

.hero-card-back:hover {
    opacity: 1;
    transform: rotate(3deg) translateX(33%) translateY(6%);
}

/* Hidden cards — off-stage */
.hero-card-hidden {
    transform: rotate(0deg) translateX(50%) translateY(15%);
    z-index: 1;
    opacity: 0;
    pointer-events: none;
    /* pointer-events alone still leaves these product links in the tab order —
       a keyboard user would tab through invisible cards. */
    visibility: hidden;
    width: 60%;
}

.hero-image-label {
    display: block;
    padding: var(--space-xs) var(--space-sm);
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--color-chocolate);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Navigation dots */
.hero-stack-dots {
    position: absolute;
    bottom: -40px;
    left: -6px; /* offset the dots' new padding so they stay optically flush left */
    display: flex;
    gap: 0;
    z-index: 10;
}

/*
 * The dot is drawn at 8px via ::before, but the button itself is 24px so it
 * clears WCAG 2.2 SC 2.5.8 (24x24 minimum). It used to be an 8x8 tap target.
 */
.hero-dot {
    width: 24px;
    height: 24px;
    border: none;
    background: none;
    cursor: pointer;
    padding: 0;
    display: grid;
    place-items: center;
}

.hero-dot::before {
    content: '';
    width: 8px;
    height: 8px;
    border-radius: 50%;
    border: 1.5px solid var(--color-chocolate);
    transition: background var(--transition), transform var(--transition);
}

.hero-dot-active::before {
    background: var(--color-chocolate);
    transform: scale(1.2);
}

@media (max-width: 768px) {
    .hero-split-grid {
        grid-template-columns: 1fr;
        min-height: auto;
        gap: var(--space-md);
    }

    .hero-split-content { max-width: none; text-align: center; }
    .hero-actions { justify-content: center; }
    .hero-split-visual { min-height: 300px; }
    .hero-image-stack { max-width: 300px; }
}

/* === Marquee Ticker === */
.marquee {
    padding: var(--space-sm) 0;
    overflow: hidden;
    background: var(--color-chocolate);
    color: var(--color-cream);
}

.marquee-track {
    display: flex;
    gap: var(--space-lg);
    white-space: nowrap;
    animation: marquee-scroll 30s linear infinite;
    width: max-content;
}

.marquee-item {
    display: inline-flex;
    align-items: center;
    gap: var(--space-xs);
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    flex-shrink: 0;
}

.marquee-dot {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--color-cinnamon);
}

@keyframes marquee-scroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-33.33%); }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .marquee-track, .stock-dot, .header-search { animation: none; }
    .reveal { opacity: 1; transform: none; transition: none; }

    /* Catch-all: the theme animates in enough places (hero cards, search panel,
       pulse dot) that enumerating them drifts out of date. The hero slider's
       auto-rotation is stopped in main.js, not here — CSS can't reach setInterval. */
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* === Story Banner === */
.story-banner {
    padding: var(--space-2xl) 0;
    background: var(--color-chocolate);
    color: var(--color-cream);
    text-align: center;
}

.story-banner-inner {
    max-width: 680px;
    margin-inline: auto;
}

.story-banner .section-eyebrow {
    color: var(--color-cinnamon-light); /* 5.05:1 on chocolate; plain cinnamon is 3.70:1 */
}

.story-banner h2 {
    color: var(--color-cream);
    margin-bottom: var(--space-md);
}

.story-text-body {
    font-size: 1.0625rem;
    line-height: 1.9;
    color: rgba(245, 245, 220, 0.7);
    margin-bottom: var(--space-md);
}

/* Value cards inside the story banner — content instead of empty chocolate */
.story-values {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-sm);
    max-width: 960px;
    margin: var(--space-lg) auto 0;
}

.story-value {
    background: rgba(245, 245, 220, 0.06);
    border: 1px solid rgba(245, 245, 220, 0.12);
    border-radius: var(--radius-lg);
    padding: var(--space-md) var(--space-sm);
}

.story-value h3 {
    color: var(--color-cream);
    font-size: 1.125rem;
    margin-bottom: var(--space-2xs);
}

.story-value p {
    color: rgba(245, 245, 220, 0.65);
    font-size: 0.9375rem;
    line-height: 1.7;
}

@media (max-width: 768px) {
    .story-values {
        grid-template-columns: 1fr;
    }
}

/* Blog teaser on the homepage */
.home-articles {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-md);
}

.home-article-card {
    background: var(--color-white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: transform var(--transition), box-shadow var(--transition);
}

.home-article-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.home-article-img img {
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    display: block;
}

.home-article-body {
    padding: var(--space-sm) var(--space-sm) var(--space-md);
}

.home-article-title {
    font-size: 1.1875rem;
    line-height: 1.35;
    margin-bottom: var(--space-2xs);
}

.home-article-excerpt {
    color: var(--color-muted);
    font-size: 0.9375rem;
    line-height: 1.65;
    margin-bottom: var(--space-xs);
}

.home-article-link {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--color-cinnamon-deep);
}

@media (max-width: 768px) {
    .home-articles {
        grid-template-columns: 1fr;
    }
}

.story-banner .btn-outline {
    color: var(--color-cream);
    box-shadow: inset 0 0 0 1.5px rgba(245, 245, 220, 0.4);
}

.story-banner .btn-outline:hover {
    background: var(--color-cream);
    color: var(--color-chocolate);
    box-shadow: none;
}

/* === Buttons === */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 2.25rem;
    min-height: 52px;
    font-family: var(--font-body);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    transition: all var(--transition);
    -webkit-tap-highlight-color: transparent;
}

.btn:focus-visible {
    outline: 2px solid var(--color-cinnamon);
    outline-offset: 3px;
}

.btn-primary {
    background: var(--color-chocolate);
    color: var(--color-cream);
}

.btn-primary:hover {
    background: var(--color-cinnamon-deep);
    color: var(--color-white);
}

.btn-outline {
    background: transparent;
    color: var(--color-chocolate);
    box-shadow: inset 0 0 0 1.5px var(--color-chocolate);
}

.btn-outline:hover {
    background: var(--color-chocolate);
    color: var(--color-cream);
}

/* === Sections === */
.section {
    padding: var(--space-xl) 0;
}

.section-eyebrow {
    font-size: 0.8125rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.25em;
    color: var(--color-cinnamon-deep);
    margin-bottom: var(--space-xs);
}

.section-header {
    text-align: center;
    margin-bottom: var(--space-lg);
}

/* === Product Grid === */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: var(--space-md);
}

/*
 * Mobile: two cards per row, the grocery-shop standard (Barbora, Rimi et al).
 * The auto-fill minmax above collapsed to a single fat column on phones, which
 * wastes scroll and hides the range. Cards get compacted to match.
 */
@media (max-width: 768px) {
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-sm);
    }

    .products-grid .product-card-img img { padding: var(--space-xs); }

    .products-grid .product-card-body {
        padding: var(--space-xs) var(--space-xs) var(--space-sm);
    }

    .products-grid .product-card-cat { font-size: 0.625rem; }

    .products-grid .product-card-title {
        font-size: 0.875rem;
        -webkit-line-clamp: 3;
    }

    .products-grid .product-card-price { font-size: 0.9375rem; }
}

.product-card {
    background: var(--color-white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: transform var(--transition), box-shadow var(--transition);
}

/* Add-to-cart on product cards (shop / category / search grids).
   The whole card body is one <a>, so the button lives outside it. */
.product-card-actions {
    display: flex;
    align-items: center;
    gap: var(--space-2xs);
    flex-wrap: wrap;
    padding: 0 var(--space-sm) var(--space-sm);
}

.product-card-actions .button {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: var(--color-chocolate);
    color: var(--color-cream);
    border-radius: var(--radius);
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    padding: 0.75rem;
    min-height: 44px;
    transition: background var(--transition);
}

.product-card-actions .button:hover {
    background: var(--color-cinnamon-deep);
    color: var(--color-white);
}

/* States set by WC add-to-cart.js */
.product-card-actions .button.loading {
    opacity: 0.6;
    pointer-events: none;
}

.product-card-actions .button.added::after {
    content: " ✓";
}

/* "Peržiūrėti krepšelį" link JS inserts after a successful AJAX add */
.product-card-actions .added_to_cart {
    flex-basis: 100%;
    text-align: center;
    font-size: 0.75rem;
    color: var(--color-cinnamon-deep);
    text-decoration: underline;
}

.product-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.product-card-img {
    position: relative;
    aspect-ratio: 1;
    overflow: hidden;
    background: var(--color-ivory);
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-card-img img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: var(--space-sm);
}

.product-card-body {
    padding: var(--space-sm) var(--space-sm) calc(var(--space-sm) + var(--space-xs));
}

.product-card-cat {
    font-size: 0.6875rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--color-cinnamon-deep);
    margin-bottom: var(--space-2xs);
}

.product-card-title {
    font-family: var(--font-heading);
    font-size: 1rem;
    line-height: 1.35;
    margin-bottom: var(--space-xs);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-card-price {
    font-weight: 600;
    font-size: 1rem;
    color: var(--color-chocolate);
}

.product-card-maker {
    font-size: 0.75rem;
    color: var(--color-muted);
    margin-top: var(--space-2xs);
    font-style: italic;
}

/* Product Badges */
.product-badge {
    position: absolute;
    top: var(--space-sm);
    left: var(--space-sm);
    padding: 0.3125rem 0.75rem;
    font-size: 0.625rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    border-radius: var(--radius);
    z-index: 1;
}

.badge-sale {
    background: var(--color-cinnamon-deep);
    color: var(--color-white);
}

.badge-featured {
    background: var(--color-chocolate);
    color: var(--color-cream);
}

/* Sold out wins over sale/featured — a card must never look buyable when it isn't. */
.badge-soldout {
    background: var(--color-muted);
    color: var(--color-white);
}

/* === Blog Article === */
.article-meta {
    color: var(--color-muted);
    font-size: 0.875rem;
    margin-top: var(--space-xs);
}

.article-featured {
    max-width: 860px;
    margin: 0 auto;
}

/* Banner, not a wall: tall images forced users to scroll before any text */
.article-featured img {
    width: 100%;
    height: auto;
    max-height: 400px;
    object-fit: cover;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
}

@media (max-width: 768px) {
    .article-featured img { max-height: 260px; }
}

/* Tables inside articles — used for nutrition facts, recipe overviews etc. */
.article-body table {
    width: 100%;
    border-collapse: collapse;
    margin: var(--space-sm) 0 var(--space-md);
    font-size: 0.9375rem;
    background: var(--color-white);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    overflow: hidden;
}

.article-body th {
    background: var(--color-chocolate);
    color: var(--color-cream);
    text-align: left;
    padding: 0.625rem 0.875rem;
    font-weight: 600;
    font-size: 0.8125rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.article-body td {
    padding: 0.625rem 0.875rem;
    border-top: 1px solid var(--color-border);
    vertical-align: top;
}

.article-body tr:nth-child(even) td { background: var(--color-ivory); }

/* Wide tables scroll inside their wrapper instead of breaking the layout */
.article-body .table-scroll { overflow-x: auto; }

.article-body {
    max-width: 720px;
    margin: 0 auto;
    font-size: 1.0625rem;
    line-height: 1.85;
    color: var(--color-chocolate);
}

.article-body h2 {
    font-size: 1.75rem;
    margin: var(--space-lg) 0 var(--space-sm);
}

.article-body h3 {
    font-size: 1.25rem;
    margin: var(--space-md) 0 var(--space-xs);
}

.article-body p { margin-bottom: var(--space-sm); }

.article-body ul,
.article-body ol {
    margin: 0 0 var(--space-sm) 1.5rem;
}

.article-body li { margin-bottom: 0.375rem; }

.article-body a {
    color: var(--color-cinnamon-deep);
    text-decoration: underline;
}

.article-body strong { color: var(--color-chocolate); }

.article-footer {
    max-width: 720px;
    margin: var(--space-lg) auto 0;
    padding-top: var(--space-md);
    border-top: 1px solid var(--color-border);
    display: flex;
    gap: var(--space-sm);
    flex-wrap: wrap;
}

/* === Pre-launch (catalog mode) === */
.prelaunch-bar {
    background: var(--color-chocolate);
    color: var(--color-cream);
    font-size: 0.8125rem;
    letter-spacing: 0.03em;
    text-align: center;
    padding: 0.5rem var(--space-sm);
}

.catalog-notice {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    background: var(--color-ivory);
    border: 1px solid var(--color-cinnamon-deep);
    border-radius: var(--radius-lg);
    padding: var(--space-sm) var(--space-md);
    margin: var(--space-sm) 0;
}

.catalog-notice strong {
    color: var(--color-cinnamon-deep);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.875rem;
}

.catalog-notice span {
    color: var(--color-muted);
    font-size: 0.9375rem;
    line-height: 1.6;
}

.sixpack-note {
    background: var(--color-ivory);
    border: 1px dashed var(--color-cinnamon-deep);
    border-radius: var(--radius-lg);
    padding: 0.625rem var(--space-sm);
    margin-bottom: var(--space-sm);
    font-size: 0.875rem;
    color: var(--color-chocolate);
    line-height: 1.5;
}

/* === Free Shipping Progress Bar === */
.free-ship-bar {
    background: var(--color-ivory);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: var(--space-sm) var(--space-md);
    margin-bottom: var(--space-md);
}

.free-ship-bar p {
    font-size: 0.875rem;
    color: var(--color-chocolate);
    margin-bottom: 0.5rem;
    text-align: center;
}

.free-ship-bar p .woocommerce-Price-amount {
    font-weight: 600;
    color: var(--color-cinnamon-deep);
}

.free-ship-track {
    height: 6px;
    background: var(--color-border);
    border-radius: 999px;
    overflow: hidden;
}

.free-ship-track span {
    display: block;
    height: 100%;
    background: var(--color-cinnamon-deep);
    border-radius: 999px;
    transition: width var(--transition);
}

.free-ship-done {
    background: rgba(168, 81, 26, 0.08);
    border-color: var(--color-cinnamon-deep);
}

.free-ship-done p {
    margin-bottom: 0;
    font-weight: 600;
    color: var(--color-cinnamon-deep);
}

/* === Low Stock Badge === */
.stock-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.75rem;
    color: var(--color-muted);
    margin-top: var(--space-xs);
}

.stock-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--color-cinnamon);
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.35; }
}

/* === Trust Bar === */
.trust-bar {
    padding: var(--space-sm) 0;
    border-top: 1px solid var(--color-border);
    border-bottom: 1px solid var(--color-border);
}

.trust-items {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0;
    text-align: center;
}

.trust-item {
    font-size: 0.6875rem;
    font-weight: 500;
    color: var(--color-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    white-space: nowrap;
    padding: var(--space-xs) var(--space-sm);
}

.trust-item + .trust-item {
    border-left: 1px solid var(--color-border);
}

@media (max-width: 768px) {
    .trust-items {
        flex-wrap: wrap;
        gap: 0;
    }

    .trust-item {
        font-size: 0.625rem;
        padding: 0.375rem var(--space-xs);
        letter-spacing: 0.08em;
    }
}

/* === Single Product === */
.single-product-wrap {
    padding: var(--space-md) 0 var(--space-xl);
}

.product-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-lg);
    align-items: start;
}

@media (max-width: 768px) {
    .product-layout { grid-template-columns: 1fr; gap: var(--space-md); }

    /*
     * A full-width portrait pack shot filled the whole phone screen before any
     * price or buy button appeared. Groceries don't need apparel-size imagery —
     * cap the gallery and let the tap-to-zoom lightbox handle close-ups.
     */
    .product-gallery {
        width: 100%;
        max-width: 160px;
        margin-inline: auto;
    }
}

.product-gallery img { border-radius: var(--radius-lg); }

.breadcrumb-trail {
    font-size: 0.8125rem;
    color: var(--color-muted);
    margin-bottom: var(--space-sm);
}

.breadcrumb-trail a { color: var(--color-muted); }
.breadcrumb-trail a:hover { color: var(--color-chocolate); }

/* Brand as eyebrow + a calmer H1 — full names ran to six display-size lines */
.product-brand {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--color-cinnamon-deep);
    margin-bottom: var(--space-2xs);
}

.product-title {
    font-size: clamp(1.75rem, 2.2vw + 0.6rem, 2.5rem);
    margin-bottom: var(--space-xs);
}

/* Quantity-discount teaser under the short description */
.qty-tiers-note {
    display: inline-block;
    background: var(--color-ivory);
    border: 1px dashed var(--color-cinnamon-deep);
    border-radius: var(--radius-lg);
    padding: 0.625rem var(--space-sm);
    margin-top: var(--space-xs);
    font-size: 0.875rem;
    color: var(--color-chocolate);
    line-height: 1.5;
}

.product-price {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--color-chocolate);
    margin-bottom: var(--space-xs);
}

.product-short-desc {
    color: var(--color-muted);
    margin-bottom: var(--space-md);
    line-height: 1.85;
}

/* Ingredients Toggle */
.ingredients-block {
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    margin-bottom: var(--space-md);
    overflow: hidden;
}

.ingredients-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 1rem var(--space-sm);
    min-height: 52px;
    background: none;
    border: none;
    cursor: pointer;
    font-family: var(--font-body);
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--color-chocolate);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    -webkit-tap-highlight-color: transparent;
    transition: background var(--transition);
}

.ingredients-toggle:hover { background: rgba(61, 43, 31, 0.02); }

.ingredients-toggle:focus-visible {
    outline: 2px solid var(--color-cinnamon);
    outline-offset: -2px;
}

.toggle-icon { transition: transform var(--transition); flex-shrink: 0; }
.ingredients-toggle[aria-expanded="true"] .toggle-v { display: none; }

.ingredients-panel {
    padding: 0 var(--space-sm) var(--space-sm);
    font-size: 0.9375rem;
    line-height: 1.85;
    color: var(--color-muted);
}

.allergens {
    margin-top: var(--space-xs);
    font-size: 0.8125rem;
    color: var(--color-cinnamon-deep);
    font-weight: 500;
}

/* Add to Cart — single product */
.product-add-to-cart {
    margin-bottom: var(--space-md);
}

.product-add-to-cart form.cart {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    flex-wrap: wrap;
}

.product-add-to-cart .quantity {
    display: flex;
    align-items: center;
}

.product-add-to-cart .quantity input {
    width: 64px;
    height: 52px;
    padding: 0.75rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    text-align: center;
    font-family: var(--font-body);
    font-size: 1rem;
}

.product-add-to-cart .single_add_to_cart_button {
    flex: 1;
    min-width: 200px;
    height: 52px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* Product Trust Signals */
.product-trust {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-sm) var(--space-md);
    padding-top: var(--space-md);
    border-top: 1px solid var(--color-border);
}

.product-trust li {
    font-size: 0.8125rem;
    color: var(--color-muted);
    display: flex;
    align-items: center;
    gap: 0.375rem;
}

.product-trust li::before {
    content: '';
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--color-cinnamon);
    flex-shrink: 0;
}

/* Meet the Maker */
.product-description {
    max-width: 760px;
    margin-top: var(--space-xl);
    padding-top: var(--space-xl);
    border-top: 1px solid var(--color-border);
}

.product-description-title {
    font-size: 1.5rem;
    margin-bottom: var(--space-md);
}

.product-description-body p {
    color: var(--color-muted);
    line-height: 1.8;
    margin-bottom: var(--space-sm);
}

.maker-block {
    margin-top: var(--space-xl);
    padding-top: var(--space-xl);
    border-top: 1px solid var(--color-border);
}

.maker-grid {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: var(--space-lg);
    align-items: center;
}

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

.maker-photo img {
    border-radius: var(--radius-lg);
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    box-shadow: var(--shadow-md);
}

.maker-name { margin-bottom: var(--space-xs); }

.maker-location {
    font-size: 0.875rem;
    color: var(--color-cinnamon-deep);
    font-weight: 500;
    margin-bottom: var(--space-sm);
}

.maker-story { color: var(--color-muted); line-height: 1.85; }
.maker-story p + p { margin-top: var(--space-sm); }

/* ── Related Products & Up-sells (full WooCommerce override) ── */
.related-products-section {
    margin-top: var(--space-xl);
    padding-top: var(--space-xl);
    border-top: 1px solid var(--color-border);
}

/* Section heading */
.related-products-section .related > h2,
.related-products-section .up-sells > h2 {
    font-family: var(--font-heading);
    font-size: clamp(1.5rem, 3vw, 2.25rem);
    font-weight: 400;
    text-align: center;
    margin-bottom: var(--space-lg);
}

/* Kill ALL WooCommerce default product grid layout */
.related-products-section ul.products,
.woocommerce ul.products {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)) !important;
    gap: var(--space-md) !important;
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
    clear: both !important;
}

/* Kill WooCommerce float/width on individual product items */
.related-products-section ul.products li.product,
.woocommerce ul.products li.product {
    float: none !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    background: var(--color-white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: transform var(--transition), box-shadow var(--transition);
    display: flex;
    flex-direction: column;
}

.related-products-section ul.products li.product:hover,
.woocommerce ul.products li.product:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

/* Product image — contain (no crop/zoom) */
.related-products-section ul.products li.product a img,
.woocommerce ul.products li.product a img {
    width: 100% !important;
    height: auto !important;
    max-height: 280px !important;
    aspect-ratio: 1;
    object-fit: contain !important;
    object-position: center !important;
    padding: var(--space-md) !important;
    background: var(--color-ivory);
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    margin: 0 !important;
}

/* Product title */
.related-products-section ul.products li.product .woocommerce-loop-product__title,
.woocommerce ul.products li.product .woocommerce-loop-product__title {
    font-family: var(--font-heading) !important;
    font-size: 1rem !important;
    font-weight: 400 !important;
    padding: var(--space-sm) var(--space-sm) 0 !important;
    margin: 0 !important;
    line-height: 1.35;
    color: var(--color-chocolate);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Product link */
.related-products-section ul.products li.product a,
.woocommerce ul.products li.product > a {
    color: var(--color-chocolate);
    text-decoration: none;
}

/* Price */
.related-products-section ul.products li.product .price,
.woocommerce ul.products li.product .price {
    padding: var(--space-xs) var(--space-sm) !important;
    margin: 0 !important;
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--color-chocolate) !important;
}

/* Add to Cart button inside product grid */
.related-products-section ul.products li.product .button,
.woocommerce ul.products li.product .button {
    margin: auto var(--space-sm) var(--space-sm) !important;
    width: calc(100% - 2 * var(--space-sm)) !important;
    text-align: center !important;
    display: block !important;
    padding: 0.75rem 1rem !important;
    min-height: 44px !important;
    font-size: 0.6875rem !important;
}

/* Star rating if present */
.related-products-section .star-rating,
.woocommerce ul.products li.product .star-rating {
    margin: var(--space-xs) var(--space-sm) 0 !important;
    font-size: 0.75rem;
}

/* Onsale badge */
.related-products-section ul.products li.product .onsale,
.woocommerce ul.products li.product .onsale {
    position: absolute;
    top: var(--space-sm);
    left: var(--space-sm);
    background: var(--color-cinnamon-deep);
    color: var(--color-white);
    padding: 0.25rem 0.625rem;
    font-size: 0.625rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    border-radius: var(--radius);
    z-index: 1;
    min-height: auto;
    min-width: auto;
    line-height: 1.4;
}

/*
 * The .onsale badge is absolutely positioned, so every product tile that can
 * carry one needs to be its containing block — not just the related-products
 * grid. Without the second selector the badge escapes to the page's top-left
 * on cross-sells, [products] shortcodes and the empty-cart block.
 */
.related-products-section ul.products li.product,
.woocommerce ul.products li.product {
    position: relative;
}

/* Floating ATC (mobile) */
.floating-atc {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 90;
    background: var(--color-white);
    border-top: 1px solid var(--color-border);
    box-shadow: 0 -4px 24px rgba(61, 43, 31, 0.10);
    transform: translateY(100%);
    /* Matches the aria-hidden main.js toggles — without this the buried
       "Į krepšelį" link is announced-hidden but still tabbable. */
    visibility: hidden;
    transition: transform 300ms cubic-bezier(0.4, 0, 0.2, 1), visibility 0s linear 300ms;
    display: none;
}

.floating-atc.visible {
    transform: translateY(0);
    visibility: visible;
    transition: transform 300ms cubic-bezier(0.4, 0, 0.2, 1), visibility 0s;
}

@media (max-width: 768px) { .floating-atc { display: block; } }

.floating-atc-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem var(--space-sm);
    padding-bottom: calc(0.75rem + env(safe-area-inset-bottom, 0px));
    max-width: var(--max-width);
    margin-inline: auto;
}

.floating-atc-info { display: flex; flex-direction: column; min-width: 0; }

.floating-atc-title {
    font-family: var(--font-heading);
    font-size: 0.9375rem;
    color: var(--color-chocolate);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.floating-atc-price {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--color-chocolate);
}

.floating-atc-btn {
    flex-shrink: 0;
    margin-left: var(--space-sm);
    padding: 0.75rem 1.5rem;
    min-height: 48px;
}

/* === Shop Archive === */
.shop-archive { padding: var(--space-lg) 0 var(--space-xl); }

.shop-header {
    text-align: center;
    margin-bottom: var(--space-lg);
}

.shop-desc {
    max-width: 580px;
    margin: var(--space-sm) auto 0;
    color: var(--color-muted);
    font-size: 1.0625rem;
}

/* Category Pills */
.category-pills {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--space-xs);
    margin-bottom: var(--space-lg);
}

.pill {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.5rem 1.125rem;
    min-height: 40px;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--color-chocolate);
    border: 1px solid var(--color-border);
    border-radius: 100px;
    transition: all var(--transition);
    -webkit-tap-highlight-color: transparent;
}

.pill:hover { border-color: var(--color-chocolate); }

.pill-active {
    background: var(--color-chocolate);
    color: var(--color-cream);
    border-color: var(--color-chocolate);
}

.pill-active:hover { color: var(--color-cream); }

/* Carries the category count, so it's text — 0.55 was 3.24:1 on .pill. */
.pill-count { font-size: 0.625rem; opacity: 0.75; }

/* Shop Toolbar */
.shop-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-md);
    font-size: 0.8125rem;
    color: var(--color-muted);
}

.shop-sort select {
    background: var(--color-white);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 0.5rem 0.75rem;
    font-family: var(--font-body);
    font-size: 0.8125rem;
    color: var(--color-chocolate);
    min-height: 40px;
}

/* Pagination */
.shop-pagination,
.navigation.pagination { margin-top: var(--space-lg); text-align: center; }

/* search.php and index.php call the_posts_pagination(), which emits
   nav.navigation.pagination — without the second selector their pagination
   rendered as bare unstyled links with sub-24px targets. */
.shop-pagination .page-numbers,
.navigation.pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    min-height: 42px;
    padding: 0.5rem;
    margin: 0 0.125rem;
    font-size: 0.875rem;
    color: var(--color-chocolate);
    border-radius: var(--radius);
    transition: all var(--transition);
}

.shop-pagination .page-numbers:hover,
.navigation.pagination .page-numbers:hover { background: rgba(61, 43, 31, 0.05); }
.shop-pagination .page-numbers.current,
.navigation.pagination .page-numbers.current { background: var(--color-chocolate); color: var(--color-cream); }

.shop-empty { text-align: center; padding: var(--space-xl) 0; }
.shop-empty p { color: var(--color-muted); margin: var(--space-sm) 0 var(--space-md); }

/* === Footer === */
.site-footer {
    background: var(--color-chocolate);
    color: rgba(245, 245, 220, 0.65);
    padding: var(--space-xl) 0 var(--space-md);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: var(--space-lg);
    margin-bottom: var(--space-lg);
}

.footer-brand {
    font-family: var(--font-heading);
    font-size: 1.375rem;
    color: var(--color-cream);
    margin-bottom: var(--space-sm);
    letter-spacing: -0.01em;
}

.footer-tagline {
    font-size: 0.875rem;
    line-height: 1.7;
    max-width: 280px;
}

.site-footer h4 {
    font-family: var(--font-body);
    color: var(--color-cream);
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    margin-bottom: var(--space-sm);
}

.site-footer ul { list-style: none; }

.site-footer a {
    color: rgba(245, 245, 220, 0.65);
    font-size: 0.875rem;
    line-height: 2.1;
    transition: color var(--transition);
}

.site-footer a:hover { color: var(--color-cream); }

.footer-bottom {
    border-top: 1px solid rgba(245, 245, 220, 0.08);
    padding-top: var(--space-md);
    font-size: 0.75rem;
    text-align: center;
    letter-spacing: 0.04em;
}

@media (max-width: 768px) {
    .footer-grid { grid-template-columns: 1fr 1fr; gap: var(--space-md); }
}

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

/* === Kontaktai page === */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: var(--space-lg);
    align-items: start;
}

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

.contact-list {
    list-style: none;
    padding: 0;
    margin: var(--space-sm) 0;
}

.contact-list li {
    margin-bottom: var(--space-xs);
}

.contact-list-label {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--color-muted);
}

.contact-form label {
    display: block;
    font-size: 0.8125rem;
    font-weight: 500;
    margin-bottom: var(--space-2xs);
    color: var(--color-chocolate);
}

.contact-form input[type="text"],
.contact-form input[type="email"],
.contact-form textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    font-family: var(--font-body);
    font-size: 0.9375rem;
    color: var(--color-chocolate);
    background: var(--color-white);
    transition: border-color var(--transition);
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: 2px solid var(--color-cinnamon);
    outline-offset: -1px;
    border-color: transparent;
}

.contact-form p { margin-bottom: var(--space-sm); }

/* Honeypot — visually gone, still in the DOM for bots to trip on */
.contact-hp {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.contact-notice {
    padding: var(--space-sm);
    border-radius: var(--radius);
    margin-bottom: var(--space-sm);
}

.contact-notice-ok {
    background: #e8f2e4;
    border: 1px solid #b7d3ac;
    color: #2f5223;
}

.contact-notice-err {
    background: #f9e9e5;
    border: 1px solid #e3b7ab;
    color: #7a2e18;
}

/* === Floating contact widget (native <details>) === */
.contact-fab {
    position: fixed;
    right: 1rem;
    bottom: 1rem;
    z-index: 190; /* under the cookie banner (200), above everything else */
}

/* The Paysera quality sign (fixed 83x85 bottom-right, injected on cart +
   checkout) claims the corner — stack the contact bubble above it there */
.woocommerce-cart .contact-fab,
.woocommerce-checkout .contact-fab {
    bottom: calc(1rem + 88px);
}

/* Same corner clash with the mobile floating add-to-cart bar */
@media (max-width: 768px) {
    .single-product .contact-fab { bottom: calc(1rem + 76px); }
}

.contact-fab summary {
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: var(--color-chocolate);
    color: var(--color-cream);
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(61, 43, 31, 0.35);
    transition: background var(--transition);
    margin-left: auto;
}

.contact-fab summary::-webkit-details-marker { display: none; }
.contact-fab summary:hover { background: var(--color-cinnamon-deep); }

.contact-fab-panel {
    position: absolute;
    right: 0;
    bottom: 64px;
    width: max-content;
    min-width: 220px;
    background: var(--color-white);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    box-shadow: 0 8px 28px rgba(61, 43, 31, 0.2);
    padding: var(--space-sm);
}

.contact-fab-title {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--color-chocolate);
    margin-bottom: var(--space-xs);
}

.contact-fab-panel a {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.25rem;
    font-size: 0.875rem;
    color: var(--color-chocolate);
}

.contact-fab-panel a:hover { color: var(--color-cinnamon-deep); }

.contact-fab-panel a.contact-fab-form-link {
    margin-top: var(--space-2xs);
    border-top: 1px solid var(--color-border);
    padding-top: var(--space-xs);
    font-weight: 500;
    color: var(--color-cinnamon-deep);
}

/* === WooCommerce Overrides === */
.woocommerce .price { color: var(--color-chocolate) !important; font-weight: 600; }

.woocommerce a.button,
.woocommerce button.button,
.woocommerce input.button {
    background: var(--color-chocolate) !important;
    color: var(--color-cream) !important;
    border-radius: var(--radius) !important;
    font-family: var(--font-body) !important;
    font-size: 0.75rem !important;
    font-weight: 600 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.12em !important;
    padding: 1rem 2rem !important;
    min-height: 48px !important;
    transition: background var(--transition) !important;
}

.woocommerce a.button:hover,
.woocommerce button.button:hover {
    background: var(--color-cinnamon-deep) !important;
    color: var(--color-white) !important;
}

/* === WooCommerce Notices === */
.woocommerce-notices-wrapper {
    max-width: var(--max-width);
    margin: 0 auto var(--space-md);
    padding-inline: var(--space-sm);
}

.woocommerce-message,
.woocommerce-info,
.woocommerce-error {
    padding: 1rem var(--space-sm);
    border-radius: var(--radius-lg);
    font-size: 0.875rem;
    line-height: 1.6;
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: var(--space-xs);
}

.woocommerce-message {
    background: rgba(210, 105, 30, 0.08);
    border: 1px solid rgba(210, 105, 30, 0.2);
    color: var(--color-chocolate);
}

.woocommerce-message .button,
.woocommerce-message a.button {
    font-size: 0.6875rem !important;
    padding: 0.5rem 1rem !important;
    min-height: 36px !important;
    order: -1;
    margin-right: var(--space-xs);
}

.woocommerce-info {
    background: rgba(61, 43, 31, 0.04);
    border: 1px solid var(--color-border);
    color: var(--color-chocolate);
}

.woocommerce-error {
    background: rgba(180, 40, 30, 0.06);
    border: 1px solid rgba(180, 40, 30, 0.15);
    color: #8B2020;
}

.woocommerce-error li { list-style: none; }

/* "View cart" link after add-to-cart on product pages */
.added_to_cart {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.625rem 1.25rem;
    margin-top: var(--space-xs);
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--color-chocolate);
    border: 1.5px solid var(--color-border);
    border-radius: var(--radius);
    transition: all var(--transition);
}

.added_to_cart:hover {
    border-color: var(--color-chocolate);
    background: var(--color-chocolate);
    color: var(--color-cream);
}

/* Alias: .section-label maps to eyebrow style */
.section-label {
    font-size: 0.8125rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.25em;
    color: var(--color-cinnamon-deep);
    margin-bottom: var(--space-xs);
}

/* === Page Hero (404, search, generic pages) === */
.page-hero {
    padding: var(--space-2xl) 0 var(--space-xl);
    text-align: center;
    background: var(--color-chocolate);
    color: var(--color-cream);
}

.page-hero-compact {
    padding: var(--space-md) 0;
}

/*
 * page.php-family templates wrap content in class="container section". The
 * .section padding SHORTHAND (x 0) silently zeroed .container's inline padding
 * on those pages — mobile content sat flush against the screen edge. Restore
 * the gutters and use a tighter vertical rhythm than homepage sections.
 */
.container.section {
    padding: var(--space-md) var(--space-sm) var(--space-lg);
}

@media (min-width: 769px) {
    .container.section { padding-inline: var(--space-md); }
}

.page-hero-inner {
    max-width: 640px;
    margin-inline: auto;
}

.page-hero h1 {
    color: var(--color-cream);
    margin-bottom: var(--space-sm);
}

.page-hero .section-eyebrow {
    color: var(--color-cinnamon-light); /* 5.05:1 on chocolate; plain cinnamon is 3.70:1 */
}

.page-hero-code {
    display: block;
    font-family: var(--font-heading);
    font-size: clamp(5rem, 12vw, 10rem);
    line-height: 1;
    color: rgba(245, 245, 220, 0.1);
    margin-bottom: var(--space-sm);
    letter-spacing: -0.04em;
}

.page-hero-desc {
    font-size: 1.0625rem;
    line-height: 1.8;
    color: rgba(245, 245, 220, 0.65);
    margin-bottom: var(--space-md);
}

.page-hero-actions {
    display: flex;
    justify-content: center;
    gap: var(--space-sm);
    flex-wrap: wrap;
}

.page-hero .btn-primary {
    background: var(--color-cream);
    color: var(--color-chocolate);
}

.page-hero .btn-primary:hover {
    background: var(--color-cinnamon-deep);
    color: var(--color-white);
}

.page-hero .btn-outline {
    color: var(--color-cream);
    box-shadow: inset 0 0 0 1.5px rgba(245, 245, 220, 0.35);
}

.page-hero .btn-outline:hover {
    background: var(--color-cream);
    color: var(--color-chocolate);
    box-shadow: none;
}

/* === Page Content === */
.page-content-body {
    max-width: 760px;
    margin-inline: auto;
    font-size: 1.0625rem;
    line-height: 1.85;
    color: var(--color-muted);
}

.page-content-body h2,
.page-content-body h3 {
    margin-top: var(--space-lg);
    margin-bottom: var(--space-sm);
}

.page-content-body p + p { margin-top: var(--space-sm); }

.page-content-body ul,
.page-content-body ol {
    padding-left: var(--space-md);
    margin: var(--space-sm) 0;
}

.page-content-body li + li { margin-top: var(--space-xs); }

.page-content-body img {
    border-radius: var(--radius-lg);
    margin: var(--space-md) 0;
}

/* === Search === */
.search-form {
    display: flex;
    gap: var(--space-xs);
    max-width: 480px;
    margin-inline: auto;
}

.search-input {
    flex: 1;
    padding: 0.875rem var(--space-sm);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    font-family: var(--font-body);
    font-size: 0.9375rem;
    color: var(--color-chocolate);
    background: var(--color-white);
    min-height: 48px;
}

.search-input:focus {
    outline: 2px solid var(--color-cinnamon);
    outline-offset: -1px;
    border-color: transparent;
}

.search-submit {
    flex-shrink: 0;
}

.search-results-grid {
    display: grid;
    gap: var(--space-md);
}

.search-result-card {
    display: grid;
    grid-template-columns: 120px 1fr;
    gap: var(--space-sm);
    align-items: start;
    padding: var(--space-sm);
    background: var(--color-white);
    border-radius: var(--radius-lg);
    transition: box-shadow var(--transition);
}

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

.search-result-img img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: contain;
    border-radius: var(--radius);
    background: var(--color-ivory);
    padding: var(--space-xs);
}

.search-result-title {
    font-size: 1.125rem;
    margin-bottom: var(--space-2xs);
}

.search-result-title a {
    color: var(--color-chocolate);
}

.search-result-excerpt {
    font-size: 0.875rem;
    color: var(--color-muted);
    line-height: 1.65;
    margin-bottom: var(--space-xs);
}

.search-result-link {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--color-cinnamon-deep);
}

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

/* Empty state (search, no results, etc.) */
.empty-state {
    text-align: center;
    padding: var(--space-xl) 0;
    max-width: 480px;
    margin-inline: auto;
}

.empty-state h2 {
    margin-bottom: var(--space-xs);
}

.empty-state p {
    color: var(--color-muted);
    margin-bottom: var(--space-md);
}

/* === WooCommerce Cart / Checkout / Account === */
/* No own padding — the .container.section wrapper already provides gutters
 * and vertical rhythm; the old extra 4rem stacked on top of the section's. */
.woocommerce-cart .woocommerce,
.woocommerce-checkout .woocommerce,
.woocommerce-account .woocommerce {
    width: 100% !important;
    max-width: var(--max-width) !important;
    margin-inline: auto;
    padding: 0;
}

/* Override any WP content-area width restrictions */
.woocommerce-cart #main-content,
.woocommerce-checkout #main-content,
.woocommerce-account #main-content {
    max-width: none;
}

.woocommerce-cart .entry-content,
.woocommerce-checkout .entry-content,
.woocommerce-account .entry-content,
.woocommerce-cart .page-content-body,
.woocommerce-checkout .page-content-body,
.woocommerce-account .page-content-body {
    max-width: none !important;
}

/* Cart table */
.woocommerce table.shop_table {
    width: 100%;
    border-collapse: collapse;
    border: none;
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: var(--color-white);
    font-size: 0.875rem;
}

.woocommerce table.shop_table th {
    background: var(--color-chocolate);
    color: var(--color-cream);
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    padding: 0.875rem var(--space-sm);
    text-align: left;
    border: none;
}

.woocommerce table.shop_table td {
    padding: var(--space-sm);
    border-bottom: 1px solid var(--color-border);
    vertical-align: middle;
    border-left: none;
    border-right: none;
}

.woocommerce table.shop_table img {
    width: 120px !important;
    height: 120px !important;
    object-fit: contain !important;
    border-radius: var(--radius-lg);
    background: var(--color-ivory);
    padding: 12px;
}

.woocommerce table.shop_table .product-name a {
    color: var(--color-chocolate);
    font-weight: 500;
}

.woocommerce table.shop_table .product-remove a {
    color: var(--color-muted);
    font-size: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    transition: all var(--transition);
}

.woocommerce table.shop_table .product-remove a:hover {
    background: rgba(180, 40, 30, 0.08);
    color: #8B2020;
}

.woocommerce .quantity .qty {
    width: 60px;
    padding: 0.5rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    text-align: center;
    font-family: var(--font-body);
    font-size: 0.875rem;
}

/* Cart totals — compact sticky summary */
.woocommerce .cart_totals {
    float: none !important;
    width: 100% !important;
    max-width: 380px;
    margin-left: auto;
    margin-top: var(--space-md);
    padding: var(--space-sm) var(--space-sm) var(--space-sm);
    background: var(--color-chocolate);
    color: var(--color-cream);
    border-radius: var(--radius-lg);
}

.woocommerce .cart_totals h2 {
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    margin-bottom: var(--space-sm);
    color: rgba(245, 245, 220, 0.55); /* 4.80:1 on chocolate; 0.5 was 4.25:1 */
}

.woocommerce .cart_totals .shop_table {
    margin-bottom: var(--space-xs);
    background: transparent;
}

.woocommerce .cart_totals .shop_table th,
.woocommerce .cart_totals .shop_table td {
    background: transparent;
    color: var(--color-cream);
    border-bottom: 1px solid rgba(245, 245, 220, 0.1);
    padding: var(--space-xs) 0;
    font-size: 0.875rem;
}

.woocommerce .cart_totals .shop_table th {
    font-size: 0.8125rem;
    font-weight: 400;
    text-transform: none;
    letter-spacing: 0;
    color: rgba(245, 245, 220, 0.6);
}

.woocommerce .cart_totals .shop_table .order-total th,
.woocommerce .cart_totals .shop_table .order-total td {
    font-size: 1.125rem;
    font-weight: 600;
    border-bottom: none;
    padding-top: var(--space-xs);
}

.woocommerce .cart_totals .shop_table .amount {
    color: var(--color-cream) !important;
}

.woocommerce .cart_totals .wc-proceed-to-checkout {
    padding-top: var(--space-sm);
}

.woocommerce .cart_totals .wc-proceed-to-checkout a.button {
    width: 100% !important;
    text-align: center !important;
    display: block !important;
    background: var(--color-cream) !important;
    color: var(--color-chocolate) !important;
    font-size: 0.75rem !important;
    padding: 0.875rem !important;
    min-height: 48px !important;
}

.woocommerce .cart_totals .wc-proceed-to-checkout a.button:hover {
    background: var(--color-cinnamon-deep) !important;
    color: var(--color-white) !important;
}

/*
 * The totals panel is chocolate; the global link colors (chocolate, and
 * chocolate again on hover) disappear on it — "Skaičiuoti pristatymą" went
 * invisible on hover. Same for form labels inside the shipping calculator.
 */
.woocommerce .cart_totals a:not(.button) {
    color: var(--color-cream);
    text-decoration: underline;
}

.woocommerce .cart_totals a:not(.button):hover,
.woocommerce .cart_totals a:not(.button):focus-visible {
    color: var(--color-white);
}

.woocommerce .cart_totals .form-row label {
    color: var(--color-cream);
}

@media (max-width: 768px) {
    .woocommerce .cart_totals {
        max-width: none;
        margin-top: var(--space-sm);
    }

    /*
     * Stack the 6-column cart table — it can't shrink below ~600px, and with
     * the theme dropping WC's own stylesheets (incl. its smallscreen rules for
     * .shop_table_responsive) it forced horizontal scroll on phones. Labels
     * come from WC's data-title attributes.
     */
    .woocommerce-cart-form table.shop_table_responsive thead { display: none; }

    .woocommerce-cart-form table.shop_table_responsive tr {
        display: block;
        padding: var(--space-sm) 0;
        border-bottom: 1px solid var(--color-border);
    }

    .woocommerce-cart-form table.shop_table_responsive td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        gap: var(--space-xs);
        border: none;
        padding: 0.3125rem var(--space-xs);
        text-align: right;
    }

    .woocommerce-cart-form table.shop_table_responsive td::before {
        content: attr(data-title);
        font-size: 0.6875rem;
        font-weight: 600;
        text-transform: uppercase;
        letter-spacing: 0.08em;
        color: var(--color-muted);
        text-align: left;
    }

    .woocommerce-cart-form table.shop_table_responsive td.product-remove::before,
    .woocommerce-cart-form table.shop_table_responsive td.product-thumbnail::before,
    .woocommerce-cart-form table.shop_table_responsive td.actions::before {
        content: none;
    }

    .woocommerce-cart-form table.shop_table_responsive td.product-thumbnail {
        justify-content: center;
    }

    .woocommerce-cart-form table.shop_table_responsive td.product-remove {
        justify-content: flex-end;
        padding-block: 0;
    }

    .woocommerce-cart-form table.shop_table_responsive td.actions { display: block; }

    .woocommerce-cart-form td.actions > .button[name="update_cart"] {
        float: none;
        width: 100%;
    }
}

/* One flat LT-wide rate — "options will update at checkout" is just noise */
.woocommerce .cart_totals .woocommerce-shipping-destination { display: none; }

/* Actions row (update cart + coupon) */
.woocommerce table.shop_table td.actions {
    padding: var(--space-md) var(--space-sm);
    border-bottom: none;
}

/* Coupon — input and button joined as one element */
.woocommerce .coupon {
    display: inline-flex;
    align-items: stretch;
    flex-wrap: nowrap;
    height: 48px;
}

.woocommerce .coupon .input-text {
    padding: 0 0.75rem;
    border: 1px solid var(--color-border);
    border-right: none;
    border-radius: var(--radius) 0 0 var(--radius);
    font-family: var(--font-body);
    font-size: 0.875rem;
    height: 48px !important;
    min-height: 48px !important;
    min-width: 160px;
    margin: 0 !important;
}

.woocommerce .coupon .button {
    border-radius: 0 var(--radius) var(--radius) 0 !important;
    height: 48px !important;
    min-height: 48px !important;
    padding: 0 1.25rem !important;
    margin: 0 !important;
    white-space: nowrap;
    line-height: 48px !important;
}

/*
 * The joined input+button needs ~305px (160px min-width input + a nowrap
 * "Pritaikyti"). A 320px phone leaves it ~224px inside td.actions, and
 * body { overflow-x: hidden } swallows the overflow silently — so the Apply
 * button ends up clipped off-screen and unreachable. Let it fill the row.
 */
@media (max-width: 768px) {
    .woocommerce .coupon {
        display: flex;
        width: 100%;
        height: auto;
    }

    .woocommerce .coupon .input-text {
        min-width: 0;
        flex: 1;
    }
}

/* Update cart button — right-aligned */
.woocommerce td.actions > .button[name="update_cart"] {
    float: right;
    margin-top: var(--space-sm) !important;
}

/* Cart empty state (custom template) */
.cart-empty-wrap {
    text-align: center;
    padding: var(--space-2xl) var(--space-sm);
    max-width: 480px;
    margin-inline: auto;
}

.cart-empty-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 120px;
    height: 120px;
    margin: 0 auto var(--space-md);
    border-radius: 50%;
    background: var(--color-ivory);
    color: var(--color-muted);
}

.cart-empty-icon svg {
    opacity: 0.4;
}

.cart-empty-wrap h2 {
    margin-bottom: var(--space-xs);
}

.cart-empty-wrap p {
    color: var(--color-muted);
    line-height: 1.8;
    margin-bottom: var(--space-md);
    font-size: 1.0625rem;
}

/* Default WC empty cart + WC Block empty cart */
.woocommerce .cart-empty,
.woocommerce .wc-empty-cart-message,
.wp-block-woocommerce-empty-cart-block,
.wc-block-cart__empty-cart__title,
.is-large .wc-block-cart {
    text-align: center;
}

.woocommerce .cart-empty,
.woocommerce .wc-empty-cart-message {
    padding: var(--space-xl) 0 var(--space-sm);
    font-size: 1.25rem;
    font-family: var(--font-heading);
    color: var(--color-chocolate);
}

.woocommerce .return-to-shop,
.wp-block-woocommerce-empty-cart-block .wc-block-cart__submit-button {
    text-align: center;
    margin-top: var(--space-md);
}

/* WC Blocks cart styling */
.wc-block-cart .wc-block-components-notices,
.wc-block-checkout .wc-block-components-notices {
    max-width: var(--max-width);
    margin-inline: auto;
}

/* Style the WC Block empty state */
.wp-block-woocommerce-empty-cart-block {
    padding: var(--space-xl) var(--space-sm);
    max-width: 520px;
    margin-inline: auto;
}

.wp-block-woocommerce-empty-cart-block p {
    color: var(--color-muted);
    font-size: 1.0625rem;
    line-height: 1.8;
}

.wp-block-woocommerce-empty-cart-block .wp-block-heading,
.wp-block-woocommerce-empty-cart-block h2 {
    font-family: var(--font-heading);
    font-weight: 400;
    font-size: 1.75rem;
    margin-bottom: var(--space-sm);
}

/* New in store / cross-sell grid inside empty cart */
.wp-block-woocommerce-empty-cart-block .wc-block-grid__products,
.woocommerce .cross-sells .products {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)) !important;
    gap: var(--space-md) !important;
    list-style: none !important;
    padding: var(--space-md) 0 0 !important;
    margin: 0 !important;
}

.wp-block-woocommerce-empty-cart-block .wc-block-grid__product,
.woocommerce .cross-sells .products li {
    background: var(--color-white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    float: none !important;
    width: 100% !important;
    margin: 0 !important;
    transition: transform var(--transition), box-shadow var(--transition);
}

.wp-block-woocommerce-empty-cart-block .wc-block-grid__product:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.wp-block-woocommerce-empty-cart-block .wc-block-grid__product-image img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: contain;
    padding: var(--space-sm);
    background: var(--color-ivory);
}

.wp-block-woocommerce-empty-cart-block .wc-block-grid__product-title {
    font-family: var(--font-heading);
    font-size: 0.9375rem;
    font-weight: 400;
    padding: var(--space-xs) var(--space-sm) 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.wp-block-woocommerce-empty-cart-block .wc-block-grid__product-price {
    padding: var(--space-2xs) var(--space-sm);
    font-weight: 600;
    font-size: 0.875rem;
}

.wp-block-woocommerce-empty-cart-block .wp-block-button .wc-block-components-button,
.wp-block-woocommerce-empty-cart-block .add_to_cart_button {
    margin: 0 var(--space-sm) var(--space-sm) !important;
    width: calc(100% - 2 * var(--space-sm)) !important;
    display: block !important;
    text-align: center !important;
    background: var(--color-chocolate) !important;
    color: var(--color-cream) !important;
    border-radius: var(--radius) !important;
    font-family: var(--font-body) !important;
    font-size: 0.6875rem !important;
    font-weight: 600 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.12em !important;
    padding: 0.75rem !important;
    min-height: 44px !important;
    border: none !important;
    cursor: pointer;
    transition: background var(--transition) !important;
}

.wp-block-woocommerce-empty-cart-block .wp-block-button .wc-block-components-button:hover,
.wp-block-woocommerce-empty-cart-block .add_to_cart_button:hover {
    background: var(--color-cinnamon-deep) !important;
    color: var(--color-white) !important;
}

/* WC Block heading for "New in store" section */
.wp-block-woocommerce-empty-cart-block .wp-block-heading {
    text-align: center;
    margin-top: var(--space-lg);
}

/* === WooCommerce Checkout === */

/*
 * The classic checkout form has three direct children: #customer_details,
 * h3#order_review_heading and #order_review. Without explicit placement,
 * auto-flow drops #order_review into row 2 column 1 — the order table ends
 * up below the billing fields instead of under its own heading.
 */
.woocommerce form.checkout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: var(--space-lg);
    row-gap: var(--space-sm);
    align-items: start;
}

.woocommerce form.checkout #customer_details {
    grid-column: 1;
    grid-row: 1 / span 2;
}

.woocommerce form.checkout #order_review_heading {
    grid-column: 2;
    grid-row: 1;
}

.woocommerce form.checkout #order_review {
    grid-column: 2;
    grid-row: 2;
}

@media (max-width: 768px) {
    .woocommerce form.checkout {
        grid-template-columns: 1fr;
    }

    .woocommerce form.checkout #customer_details,
    .woocommerce form.checkout #order_review_heading,
    .woocommerce form.checkout #order_review {
        grid-column: auto;
        grid-row: auto;
    }
}

.woocommerce form .form-row {
    margin-bottom: var(--space-sm);
}

.woocommerce form .form-row label {
    display: block;
    font-size: 0.8125rem;
    font-weight: 500;
    margin-bottom: var(--space-2xs);
    color: var(--color-chocolate);
}

.woocommerce form .form-row .input-text,
.woocommerce form .form-row select,
.woocommerce form .form-row textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    font-family: var(--font-body);
    font-size: 0.9375rem;
    color: var(--color-chocolate);
    background: var(--color-white);
    min-height: 48px;
    transition: border-color var(--transition);
}

.woocommerce form .form-row .input-text:focus,
.woocommerce form .form-row select:focus,
.woocommerce form .form-row textarea:focus {
    outline: 2px solid var(--color-cinnamon);
    outline-offset: -1px;
    border-color: transparent;
}

.woocommerce #order_review_heading {
    font-size: 1.25rem;
    margin-bottom: var(--space-sm);
}

/* === Paysera payment picker (overrides plugin's paysera-payment.css) ===
 * Plugin markup: #paysera_country select → .payment-group-wrapper →
 * .paysera-payment-method > label.paysera-payment-method-label (flex row:
 * radio+name left, bank logo right). Plugin JS puts .paysera-payment-active
 * on the label; :has(input:checked) covers the initial state too. */
.woocommerce-checkout #paysera_country {
    width: 100%;
    max-width: 320px;
    min-height: 44px;
    padding: 0.5rem 0.75rem;
    margin: var(--space-2xs) 0 var(--space-xs);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    font-family: var(--font-body);
    font-size: 0.9375rem;
    color: var(--color-chocolate);
    background: var(--color-white);
}

.woocommerce-checkout .payment-group-title {
    font-size: 0.8125rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--color-muted);
    margin: var(--space-sm) 0 var(--space-2xs);
}

.woocommerce-checkout div.paysera-payments div.paysera-payment-method {
    margin-bottom: 0.5rem;
}

.woocommerce-checkout .paysera-payment-method-label {
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 0.875rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    background: var(--color-white);
    cursor: pointer;
    transition: border-color var(--transition), box-shadow var(--transition);
}

.woocommerce-checkout .paysera-payment-method-label:hover {
    border-color: var(--color-cinnamon);
}

.woocommerce-checkout .paysera-payment-method-label > div {
    display: flex;
    align-items: center;
}

.woocommerce-checkout .paysera-payment-method-label input[type="radio"] {
    accent-color: var(--color-cinnamon-deep);
    margin: 0 0.625rem 0 0;
}

.woocommerce-checkout .paysera-payment-method-label.paysera-payment-active {
    border-color: var(--color-cinnamon-deep);
    background: var(--color-ivory);
    box-shadow: 0 0 0 1px var(--color-cinnamon-deep);
}

.woocommerce-checkout .paysera-payment-method-label:has(input:checked) {
    border-color: var(--color-cinnamon-deep);
    background: var(--color-ivory);
    box-shadow: 0 0 0 1px var(--color-cinnamon-deep);
}

.woocommerce-checkout .paysera-image img {
    max-height: 30px;
    width: auto;
    display: block;
}

/* === WooCommerce My Account === */
.woocommerce-MyAccount-navigation {
    margin-bottom: var(--space-md);
}

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

.woocommerce-MyAccount-navigation ul li a {
    display: block;
    padding: 0.625rem var(--space-sm);
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--color-chocolate);
    border: 1px solid var(--color-border);
    border-radius: 100px;
    transition: all var(--transition);
}

.woocommerce-MyAccount-navigation ul li a:hover {
    border-color: var(--color-chocolate);
}

.woocommerce-MyAccount-navigation ul li.is-active a {
    background: var(--color-chocolate);
    color: var(--color-cream);
    border-color: var(--color-chocolate);
}

.woocommerce-MyAccount-content {
    background: var(--color-white);
    border-radius: var(--radius-lg);
    padding: var(--space-md);
}

.woocommerce-MyAccount-content p {
    color: var(--color-muted);
    line-height: 1.75;
}

/* Logout pill reads as an action, not just another tab */
.woocommerce-MyAccount-navigation ul li:last-child {
    margin-left: auto;
}

.woocommerce-MyAccount-navigation ul li:last-child a {
    color: var(--color-cinnamon-deep);
    border-color: rgba(168, 81, 26, 0.45);
}

.woocommerce-MyAccount-navigation ul li:last-child a:hover {
    background: var(--color-cinnamon-deep);
    color: var(--color-white);
    border-color: var(--color-cinnamon-deep);
}

/* Kill the browser's default fieldset chrome ("Keisti slaptažodį" box) */
.woocommerce-account fieldset {
    border: none;
    padding: 0;
    margin: var(--space-md) 0 0;
}

.woocommerce-account fieldset legend {
    font-size: 1.0625rem;
    font-weight: 600;
    color: var(--color-chocolate);
    padding: 0;
    margin-bottom: var(--space-sm);
}

/* WC wraps password inputs in span.password-input with a show/hide toggle —
   without these the input loses its width and the eye icon floats astray */
.woocommerce form .form-row .password-input {
    position: relative;
    display: block;
    width: 100%;
}

.woocommerce form .form-row .password-input .input-text {
    width: 100%;
}

.woocommerce form .form-row .show-password-input {
    position: absolute;
    top: 50%;
    right: 0.875rem;
    transform: translateY(-50%);
}

.woocommerce-MyAccount-content .form-row {
    margin: 0 0 var(--space-sm);
}

.woocommerce-MyAccount-content .form-row label {
    display: block;
    margin-bottom: 0.375rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--color-chocolate);
}

/* ── Paysera shipping options: logo as a small inline chip, not a slab ──
   Plugin injects <br><img class="paysera-delivery-checkout-logo"> after each
   rate label (its own CSS only caps max-width:100px, leaving a huge white
   block). Applies to cart totals and checkout on all viewports. */
.woocommerce ul#shipping_method li br {
    display: none;
}

#shipping_method .paysera-delivery-checkout-logo {
    max-width: none !important;
    height: 18px !important;
    width: auto !important;
    display: inline-block !important;
    vertical-align: text-bottom !important;
    margin: 0 0 0 0.5rem !important;
    padding: 0 !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    border-radius: 3px;
}

/* WC responsive cart on mobile */
@media (max-width: 768px) {
    .woocommerce table.shop_table_responsive thead {
        display: none;
    }

    .woocommerce table.shop_table_responsive tbody tr {
        display: grid;
        grid-template-columns: 100px 1fr;
        gap: 0 var(--space-sm);
        padding: var(--space-md) var(--space-sm);
        border-bottom: 1px solid var(--color-border);
        position: relative;
    }

    .woocommerce table.shop_table_responsive td {
        display: flex;
        align-items: center;
        padding: var(--space-2xs) 0;
        border: none;
    }

    /* Image takes left column, spans all rows */
    .woocommerce table.shop_table_responsive td.product-thumbnail {
        grid-row: 1 / 5;
        grid-column: 1;
        padding: 0;
    }

    .woocommerce table.shop_table_responsive td.product-thumbnail img {
        width: 100px !important;
        height: 100px !important;
        border-radius: var(--radius-lg);
    }

    /* Other cells in right column */
    .woocommerce table.shop_table_responsive td.product-name,
    .woocommerce table.shop_table_responsive td.product-price,
    .woocommerce table.shop_table_responsive td.product-quantity,
    .woocommerce table.shop_table_responsive td.product-subtotal {
        grid-column: 2;
    }

    .woocommerce table.shop_table_responsive td.product-name {
        font-weight: 600;
        font-size: 0.9375rem;
    }

    .woocommerce table.shop_table_responsive td.product-remove {
        position: absolute;
        top: var(--space-sm);
        right: var(--space-sm);
        grid-column: auto;
    }

    .woocommerce table.shop_table_responsive td::before {
        content: attr(data-title) ": ";
        font-size: 0.6875rem;
        font-weight: 600;
        text-transform: uppercase;
        letter-spacing: 0.08em;
        color: var(--color-muted);
        margin-right: var(--space-xs);
        white-space: nowrap;
    }

    .woocommerce table.shop_table_responsive td.product-thumbnail::before,
    .woocommerce table.shop_table_responsive td.product-name::before,
    .woocommerce table.shop_table_responsive td.product-remove::before {
        display: none;
    }

    /* Actions row full width */
    .woocommerce table.shop_table_responsive td.actions {
        grid-column: 1 / -1;
        padding-top: var(--space-sm);
    }
}

/* === Utilities === */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* === Cookie Consent Banner === */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 200;
    background: var(--color-chocolate);
    color: var(--color-cream);
    box-shadow: 0 -8px 30px rgba(61, 43, 31, 0.15);
    transform: translateY(100%);
    transition: transform 400ms cubic-bezier(0.16, 1, 0.3, 1);
}

.cookie-banner.visible {
    transform: translateY(0);
}

.cookie-banner-inner {
    max-width: var(--max-width);
    margin-inline: auto;
    padding: var(--space-md) var(--space-sm);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-md);
}

.cookie-banner-text {
    font-size: 0.8125rem;
    line-height: 1.65;
    color: rgba(245, 245, 220, 0.75);
    flex: 1;
}

.cookie-banner-text a {
    color: var(--color-cream);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.cookie-banner-actions {
    display: flex;
    gap: var(--space-xs);
    flex-shrink: 0;
}

.cookie-banner .btn {
    padding: 0.625rem 1.25rem;
    min-height: 40px;
    font-size: 0.6875rem;
}

.cookie-banner .btn-primary {
    background: var(--color-cream);
    color: var(--color-chocolate);
}

.cookie-banner .btn-primary:hover {
    background: var(--color-cinnamon-deep);
    color: var(--color-white);
}

.footer-social-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.footer-social-link svg {
    flex-shrink: 0;
}

.footer-review-invite {
    font-size: 0.8125rem;
    opacity: 0.75;
    max-width: 26ch;
    line-height: 1.5;
    margin-top: 0.25rem;
}

.cookie-banner .btn-ghost {
    background: transparent;
    color: var(--color-cream);
    border: 1px solid rgba(245, 245, 220, 0.5);
}

.cookie-banner .btn-ghost:hover {
    border-color: var(--color-cream);
    background: rgba(245, 245, 220, 0.1);
    color: var(--color-cream);
}

.cookie-banner .btn-outline {
    color: rgba(245, 245, 220, 0.7);
    box-shadow: inset 0 0 0 1px rgba(245, 245, 220, 0.25);
}

.cookie-banner .btn-outline:hover {
    color: var(--color-cream);
    box-shadow: inset 0 0 0 1px rgba(245, 245, 220, 0.5);
}

@media (max-width: 768px) {
    .cookie-banner-inner {
        flex-direction: column;
        text-align: center;
        gap: var(--space-sm);
        padding: var(--space-sm);
    }
}

.text-center { text-align: center; }
.mt-lg { margin-top: var(--space-lg); }
.mb-lg { margin-bottom: var(--space-lg); }
