/* ========================================
   SHOP PAGE LAYOUT
======================================== */
.shop-container {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 50px;
    padding: 60px 40px;
    max-width: 1400px;
    margin: 0 auto;
}

.shop-sidebar {
    align-self: start;
}

.shop-main {
    min-width: 0;
}

@media (max-width: 992px) {
    .shop-container {
        grid-template-columns: 1fr;
        gap: 30px;
        padding: 40px 20px;
    }

    .shop-sidebar {
        position: static;
        max-height: none;
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }

    .shop-sidebar .widget {
        margin-bottom: 0;
    }
}

/* Mobile Filter UI */
@media (max-width: 768px) {
    /* Hide sidebar completely on mobile */
    .shop-sidebar {
        display: none !important;
    }

    /* Product grid full width */
    .shop-container {
        grid-template-columns: 1fr;
    }

    /* Floating Filter Button */
    .mobile-filter-btn {
        position: fixed;
        bottom: 20px;
        right: 20px;
        z-index: 100;
        display: flex;
        align-items: center;
        gap: 8px;
        padding: 12px 20px;
        background: var(--brand-red);
        color: white;
        border: none;
        border-radius: 50px;
        font-weight: 600;
        font-size: 0.9rem;
        box-shadow: 0 4px 12px rgba(0,0,0,0.15);
        cursor: pointer;
        transition: transform 0.2s ease;
    }

    .mobile-filter-btn:active {
        transform: scale(0.95);
    }

    /* Mobile Filter Modal */
    .mobile-filter-modal {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        z-index: 1000;
    }

    .mobile-filter-modal.active {
        display: block;
    }

    .mobile-filter-overlay {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0,0,0,0.5);
    }

    .mobile-filter-content {
        position: absolute;
        bottom: 0;
        left: 0;
        width: 100%;
        max-height: 85vh;
        background: white;
        border-radius: 20px 20px 0 0;
        display: flex;
        flex-direction: column;
        animation: slideUp 0.3s ease;
    }

    @keyframes slideUp {
        from { transform: translateY(100%); }
        to { transform: translateY(0); }
    }

    .mobile-filter-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 20px;
        border-bottom: 1px solid var(--border);
        flex-shrink: 0;
    }

    .mobile-filter-header h3 {
        margin: 0;
        font-size: 1.1rem;
        font-weight: 600;
    }

    .mobile-filter-close {
        background: none;
        border: none;
        font-size: 2rem;
        cursor: pointer;
        padding: 0;
        width: 32px;
        height: 32px;
        color: var(--black);
        line-height: 1;
    }

    .mobile-filter-body {
        flex: 1;
        overflow-y: auto;
        padding: 20px;
    }

    .mobile-filter-section {
        margin-bottom: 24px;
        padding-bottom: 24px;
        border-bottom: 1px solid var(--border);
    }

    .mobile-filter-section:last-child {
        border-bottom: none;
    }

    .mobile-filter-section h4 {
        margin: 0 0 12px 0;
        font-size: 0.8rem;
        text-transform: uppercase;
        letter-spacing: 0.1em;
        font-weight: 600;
        color: var(--black);
    }

    /* Mobile filter search styling */
    .mobile-filter-section .woocommerce-product-search {
        display: flex;
        gap: 8px;
    }

    .mobile-filter-section .woocommerce-product-search input[type="search"] {
        flex: 1;
        padding: 12px;
        border: 1px solid var(--border);
        border-radius: 4px;
        font-size: 0.9rem;
        background: white;
    }

    .mobile-filter-section .woocommerce-product-search button {
        padding: 12px 20px;
        background: var(--brand-red);
        color: white;
        border: none;
        border-radius: 4px;
        font-weight: 600;
        cursor: pointer;
        white-space: nowrap;
        transition: background 0.2s ease;
    }

    .mobile-filter-section .woocommerce-product-search button:active {
        background: var(--brand-red-dark);
    }

    .mobile-cat-list {
        list-style: none;
        padding: 0;
        margin: 0;
    }

    .mobile-cat-list li {
        margin-bottom: 8px;
    }

    .mobile-cat-link {
        display: block;
        padding: 10px 12px;
        color: var(--black);
        text-decoration: none;
        border: 1px solid var(--border);
        border-radius: 4px;
        transition: all 0.2s ease;
    }

    .mobile-cat-link.active {
        background: var(--brand-red);
        color: white;
        border-color: var(--brand-red);
    }

    .mobile-sort-form select,
    .mobile-filter-section select {
        width: 100%;
        padding: 12px;
        border: 1px solid var(--border);
        border-radius: 4px;
        font-size: 0.9rem;
        background: white;
    }

    .mobile-allergen-checkboxes {
        display: flex;
        flex-direction: column;
        gap: 10px;
        margin-bottom: 12px;
    }

    .mobile-allergen-checkbox {
        display: flex;
        align-items: center;
        gap: 10px;
        cursor: pointer;
    }

    .mobile-allergen-btn {
        width: 100%;
        padding: 12px;
        background: var(--brand-red);
        color: white;
        border: none;
        border-radius: 4px;
        font-weight: 600;
        cursor: pointer;
    }

    .mobile-filter-footer {
        display: flex;
        gap: 12px;
        padding: 16px 20px;
        border-top: 1px solid var(--border);
        background: white;
        flex-shrink: 0;
    }

    .btn-clear-filters,
    .btn-apply-filters {
        flex: 1;
        padding: 12px;
        border: 1px solid var(--border);
        background: white;
        font-weight: 600;
        cursor: pointer;
        border-radius: 4px;
        transition: all 0.2s ease;
    }

    .btn-apply-filters {
        background: var(--brand-red);
        color: white;
        border-color: var(--brand-red);
    }

    .btn-clear-filters:active,
    .btn-apply-filters:active {
        transform: scale(0.98);
    }

    /* Active Filter Chips */
    .active-filters-chips {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
        margin-bottom: 20px;
        align-items: center;
    }

    .filter-chip {
        display: inline-flex;
        align-items: center;
        gap: 6px;
        padding: 6px 12px;
        background: var(--surface);
        border: 1px solid var(--border);
        border-radius: 20px;
        font-size: 0.85rem;
    }

    .chip-remove {
        color: var(--black);
        font-size: 1.2rem;
        line-height: 1;
        text-decoration: none;
        font-weight: normal;
    }

    .clear-all-filters {
        color: var(--brand-red);
        font-size: 0.85rem;
        text-decoration: none;
        font-weight: 600;
    }
}

/* Hide mobile elements on desktop */
@media (min-width: 769px) {
    .mobile-filter-btn,
    .mobile-filter-modal,
    .active-filters-chips {
        display: none !important;
    }
}

/* Mobile shop grid improvements */
@media (max-width: 576px) {
    .shop-container {
        padding: 30px 15px;
    }

    .shop-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

/* ========================================
   SHOP SIDEBAR & WIDGETS
======================================== */
.shop-sidebar .woocommerce-product-search {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
}

.shop-sidebar .woocommerce-product-search input[type="search"] {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: 0;
    font-size: 0.9rem;
    background: transparent;
    transition: border-color 0.2s ease;
}

.shop-sidebar .woocommerce-product-search input[type="search"]:focus {
    outline: none;
    border-color: var(--black);
}

.shop-sidebar .woocommerce-product-search button {
    width: 100%;
    padding: 12px 15px;
    background: var(--brand-red);
    color: #fff;
    border: 1px solid var(--brand-red);
    border-radius: 0;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    cursor: pointer;
    transition: all 0.2s ease;
}

.shop-sidebar .woocommerce-product-search button:hover {
    background: var(--brand-red-dark);
    border-color: var(--brand-red-dark);
}

.widget {
    margin-bottom: 30px;
    padding-bottom: 25px;
    border-bottom: 1px solid var(--border);
}

.widget:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.widget-title {
    font-family: var(--font-heading);
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    border-bottom: none;
    padding-bottom: 0;
    margin-bottom: 15px;
    color: var(--black);
}

/* Search Box */
.search-box {
    position: relative;
    display: flex;
}

.search-box input {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: 0;
    font-family: var(--font-body);
    background: transparent;
}

.search-box input:focus {
    outline: none;
    border-color: var(--black);
}

.search-box button {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #666;
    cursor: pointer;
}

/* Categories */
.cat-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.cat-list li {
    border-bottom: 1px solid var(--border);
}

.cat-list li:last-child {
    border-bottom: none;
}

.cat-link {
    display: block;
    padding: 12px 0;
    color: #666;
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.2s ease;
}

.cat-link:hover {
    color: var(--black);
}

.cat-link.active {
    color: var(--brand-red);
    font-weight: 600;
}

/* Sort Widget */
.sort-widget select {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: 0;
    font-family: var(--font-body);
    font-size: 0.9rem;
    color: #333;
    background: transparent;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23666' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    transition: border-color 0.2s ease;
}

.sort-widget select:focus {
    outline: none;
    border-color: var(--black);
}

/* Mini Cart Widget */
.cart-widget .mini-cart-content {
    font-size: 0.9rem;
}

.cart-widget .woocommerce-mini-cart {
    list-style: none;
    padding: 0;
}

.cart-widget .woocommerce-mini-cart-item {
    padding: 15px 0;
    border-bottom: 1px solid var(--border);
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    position: relative;
    padding-right: 30px;
}

/* X button - absolute right */
.cart-widget .woocommerce-mini-cart-item a.remove {
    position: absolute;
    right: 0;
    top: 20%;
    transform: translateY(-50%);
    font-size: 1.2rem;
    color: #ccc;
    text-decoration: none;
}

.cart-widget .woocommerce-mini-cart-item a.remove:hover {
    color: var(--brand-red);
}

/* Product link - contains image + product name */
.cart-widget .woocommerce-mini-cart-item>a:not(.remove) {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    text-decoration: none;
    color: #333;
    font-size: 0.9rem;
    font-weight: 500;
    line-height: 1.4;
}

.cart-widget .woocommerce-mini-cart-item img {
    width: 50px;
    height: 50px;
    object-fit: cover;
    flex-shrink: 0;
    border-radius: 0;
}

/* Quantity - sibling to product link, needs to align under text */
.cart-widget .woocommerce-mini-cart-item .quantity {
    width: 100%;
    padding-left: 0px;
    font-size: 0.8rem;
    color: #888;
    margin-top: 0px;

}

/* Mini Cart Buttons */
.cart-widget .woocommerce-mini-cart__buttons,
.woocommerce-mini-cart__buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 15px;
}

.cart-widget .woocommerce-mini-cart__buttons a,
.woocommerce-mini-cart__buttons a {
    display: block;
    text-align: center;
    padding: 12px 15px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-radius: 0;
    text-decoration: none;
    transition: all 0.2s ease;
}

.cart-widget .woocommerce-mini-cart__buttons .wc-forward:first-child,
.woocommerce-mini-cart__buttons .wc-forward:first-child {
    background: transparent;
    color: #333;
    border: 1px solid var(--border);
}

.cart-widget .woocommerce-mini-cart__buttons .wc-forward:first-child:hover,
.woocommerce-mini-cart__buttons .wc-forward:first-child:hover {
    border-color: var(--black);
    color: var(--black);
}

.cart-widget .woocommerce-mini-cart__buttons .checkout,
.woocommerce-mini-cart__buttons .checkout {
    background: var(--brand-red);
    color: #fff;
    border: 1px solid var(--brand-red);
}

.cart-widget .woocommerce-mini-cart__buttons .checkout:hover,
.woocommerce-mini-cart__buttons .checkout:hover {
    background: var(--brand-red-dark);
    border-color: var(--brand-red-dark);
}

/* ========================================
   SHOP MAIN AREA
======================================== */
.shop-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 30px;
}

/* ========================================
   WOOCOMMERCE MESSAGES
======================================== */
.woocommerce-message,
.woocommerce-info {
    border-top-color: var(--brand-red) !important;
}

.woocommerce-message::before {
    color: var(--brand-red) !important;
}

/* ========================================
   SINGLE PRODUCT PAGE - Premium Design
======================================== */
.woocommerce div.product {
    display: grid !important;
    grid-template-columns: 1fr 1fr;
    column-gap: 60px;
    row-gap: 0;
    padding: 120px 60px 60px;
    float: none !important;
    max-width: 1200px;
    margin: 0 auto;
    background: var(--off-white);
}

.woocommerce div.product div.images {
    width: 100% !important;
    float: none !important;
}

.woocommerce div.product div.images img.wp-post-image {
    width: 100%;
    height: auto;
    border-radius: 0;
    box-shadow: none;
    background: #fff;
}

.woocommerce div.product div.images .thumbnails,
.woocommerce div.product div.images .flex-control-thumbs {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.woocommerce div.product div.images .thumbnails img,
.woocommerce div.product div.images .flex-control-thumbs img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.3s;
}

.woocommerce div.product div.images .thumbnails img:hover,
.woocommerce div.product div.images .flex-control-thumbs li.active img {
    opacity: 1;
}

.woocommerce div.product div.summary {
    width: 100% !important;
    float: none !important;
    padding: 20px 0;
}

.woocommerce div.product .product_title {
    font-family: var(--font-heading);
    font-size: 2.25rem;
    font-weight: 400;
    color: var(--black);
    margin: 0 0 5px 0;
    letter-spacing: 0;
}

/* Short description - full display */
.woocommerce div.product .woocommerce-product-details__short-description {
    color: var(--grey-dark);
    font-size: 0.95rem;
    font-style: normal;
    line-height: 1.7;
    margin-bottom: 20px;
    font-family: var(--font-body);
}

.woocommerce div.product .woocommerce-product-details__short-description p {
    font-style: normal;
    color: var(--grey-dark);
    margin: 0;
    font-family: var(--font-body);
    display: block;
    overflow: visible;
    text-overflow: unset;
    -webkit-line-clamp: unset;
}

.woocommerce div.product p.price {
    font-size: 1.5rem;
    color: var(--brand-red);
    font-weight: 600;
    margin: 20px 0;
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.woocommerce div.product p.price::after {
    content: 'z DDV';
    font-size: 0.85rem;
    color: #999;
    font-weight: 400;
}

/* Quantity Selector - Minimal Square Style */
.woocommerce div.product form.cart {
    display: flex;
    align-items: center;
    gap: 15px;
    margin: 25px 0;
}

.woocommerce div.product .quantity {
    display: flex;
    align-items: center;
    border: none;
    background: transparent;
}

.woocommerce div.product .quantity .qty-btn {
    width: 44px;
    height: 44px;
    border: 1px solid var(--border);
    background: transparent;
    cursor: pointer;
    font-size: 1.25rem;
    font-weight: 300;
    color: var(--black);
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.woocommerce div.product .quantity .qty-btn:hover {
    border-color: var(--black);
}

.woocommerce div.product .quantity .qty-minus {
    border-right: none;
}

.woocommerce div.product .quantity .qty-plus {
    border-left: none;
}

.woocommerce div.product .quantity .qty {
    width: 50px;
    height: 44px;
    padding: 0;
    border: 1px solid var(--border);
    border-left: none;
    border-right: none;
    background: transparent;
    text-align: center;
    font-size: 1rem;
    font-weight: 500;
    appearance: textfield;
    -moz-appearance: textfield;
}

.woocommerce div.product .quantity .qty::-webkit-outer-spin-button,
.woocommerce div.product .quantity .qty::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.woocommerce div.product button.single_add_to_cart_button {
    background: var(--brand-red) !important;
    color: #fff !important;
    border: 1px solid var(--brand-red) !important;
    height: 44px;
    padding: 0 28px !important;
    font-size: 0.8rem !important;
    text-transform: uppercase;
    font-weight: 500;
    letter-spacing: 0.1em;
    border-radius: 0 !important;
    transition: all 0.2s ease;
}

.woocommerce div.product button.single_add_to_cart_button:hover {
    background: var(--brand-red-dark) !important;
    color: #fff !important;
    border-color: var(--brand-red-dark) !important;
}

/* Product Meta */
.woocommerce div.product .product_meta {
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
    font-size: 0.85rem;
    color: var(--grey-muted);
    line-height: 1.8;
}

.woocommerce div.product .product_meta > span {
    display: block;
    margin-bottom: 8px;
}

.woocommerce div.product .product_meta > span:last-child {
    margin-bottom: 0;
}

.woocommerce div.product .product_meta .sku_wrapper,
.woocommerce div.product .product_meta .posted_in,
.woocommerce div.product .product_meta .tagged_as {
    color: var(--grey-muted);
}

.woocommerce div.product .product_meta a {
    color: var(--black);
    text-decoration: none;
    font-weight: 500;
}

.woocommerce div.product .product_meta a:hover {
    color: var(--brand-red);
}

/* Product Tabs - Accordion Style */
.woocommerce div.product .woocommerce-tabs {
    grid-column: 1 / -1;
    clear: both;
    margin-top: 40px;
    padding: 0;
    border-top: 1px solid #d0d0d0;
    background: transparent;
}

.woocommerce div.product .woocommerce-tabs ul.tabs {
    display: none;
}

.woocommerce div.product .woocommerce-tabs .panel {
    border-bottom: 1px solid #d0d0d0;
    padding: 20px 0;
}

.woocommerce div.product .woocommerce-tabs .panel h2 {
    font-family: var(--font-body);
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--grey-dark);
    margin-bottom: 15px;
    cursor: pointer;
}

.woocommerce div.product .woocommerce-tabs .panel p {
    color: #555;
    line-height: 1.8;
}

/* Related Products - Simple carousel like screenshot */
.woocommerce div.product .related.products {
    grid-column: 1 / -1;
    margin-top: 40px;
    padding: 50px 0;
    background: #fafafa;
    margin-left: -60px;
    margin-right: -60px;
    padding-left: 60px;
    padding-right: 60px;
    overflow: hidden;
    border-top: 1px solid var(--border);
}

.woocommerce div.product .related.products > h2 {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 400;
    text-align: left;
    margin-bottom: 30px;
    color: var(--black);
}

/* Related products carousel */
.related-grid {
    display: flex;
    gap: 20px;
    width: max-content;
    overflow-x: visible;
    padding-bottom: 20px;
    animation: autoScroll 50s linear infinite;
}

.related-grid:hover {
    animation-play-state: paused;
}

/* Simple related product card */
.related-card {
    flex: 0 0 200px;
    background: #fff;
    border: 1px solid #ddd;
    text-decoration: none;
    transition: border-color 0.2s ease;
    display: block;
}

.related-card:hover {
    border-color: #111;
}

.related-card-image {
    width: 100%;
    height: 180px;
    overflow: hidden;
    border-bottom: 1px solid #ddd;
}

.related-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.related-card-title {
    font-size: 0.95rem;
    font-weight: 500;
    color: #111;
    margin: 0;
    padding: 15px 15px 8px;
    line-height: 1.3;
}

.related-card-price {
    font-size: 1rem;
    color: #c41e1e;
    font-weight: 600;
    margin: 0;
    padding: 0 15px 15px;
}

@keyframes autoScroll {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

@media (max-width: 900px) {
    .woocommerce div.product {
        grid-template-columns: 1fr;
        padding: 100px 20px 40px;
    }

    .woocommerce div.product .related.products {
        margin-left: -20px;
        margin-right: -20px;
        padding-left: 20px;
        padding-right: 20px;
        padding-top: 30px;
        margin-top: 30px;
    }

    .woocommerce div.product .related.products > h2 {
        font-size: 1.2rem;
        margin-bottom: 20px;
    }

    .related-card {
        flex: 0 0 160px;
    }

    .related-card-image {
        height: 140px;
    }

    .related-card-title {
        font-size: 0.85rem;
        padding: 12px 12px 6px;
    }

    .related-card-price {
        font-size: 0.9rem;
        padding: 0 12px 12px;
    }
}

/* ========================================
   CART & CHECKOUT
======================================== */
/* Body-level padding to clear the fixed header */
body.woocommerce-cart,
body.woocommerce-checkout {
    padding-top: 90px;
}

.woocommerce-cart .woocommerce,
.woocommerce-checkout .woocommerce {
    padding: 30px 40px 60px;
    max-width: 1300px;
    margin: 0 auto;
    width: 100%;
}

/* Kill redundant padding from .container in the content area on cart/checkout.
   index.php uses inline style="padding: 60px 20px" which stacks with
   .woocommerce padding — !important overrides inline styles.
   Scoped to .site-content so header/footer .container is untouched. */
.woocommerce-cart .site-content > .container,
.woocommerce-checkout .site-content > .container {
    padding-left: 0 !important;
    padding-right: 0 !important;
}

@media (max-width: 768px) {
    .woocommerce-cart .site-content > .container,
    .woocommerce-checkout .site-content > .container {
        padding: 20px 20px 0 !important;
    }

    /* Move horizontal padding from .woocommerce to .container so
       WC Blocks pages (which lack a .woocommerce wrapper) also get padding */
    .woocommerce-cart .woocommerce,
    .woocommerce-checkout .woocommerce {
        padding: 20px 0 40px;
    }
}

@media (max-width: 480px) {
    .woocommerce-cart .site-content > .container,
    .woocommerce-checkout .site-content > .container {
        padding: 12px 16px 0 !important;
    }

    .woocommerce-cart .woocommerce,
    .woocommerce-checkout .woocommerce {
        padding: 12px 0 32px;
    }
}

/* WC Blocks — prevent horizontal overflow on mobile */
.woocommerce-cart .entry-content,
.woocommerce-checkout .entry-content {
    overflow-x: hidden;
    max-width: 100%;
}

/* WC Blocks inner elements must not exceed container */
.wc-block-cart,
.wc-block-checkout,
.wp-block-woocommerce-cart,
.wp-block-woocommerce-checkout {
    max-width: 100%;
    box-sizing: border-box;
}

@media (max-width: 768px) {
    /* Ensure WC Blocks form inputs stay within bounds */
    .wc-block-components-text-input input,
    .wc-block-components-text-input textarea,
    .wc-block-components-select .wc-block-components-select-container select,
    .wc-block-components-combobox .wc-block-components-combobox-control input {
        max-width: 100%;
        box-sizing: border-box;
    }

    /* WC Blocks cart item layout — prevent image + text overflow */
    .wc-block-cart-items .wc-block-cart-items__row {
        gap: 12px;
    }

    .wc-block-cart-item__image img {
        max-width: 70px;
        height: auto;
    }

    /* Page title on cart/checkout — scale down on mobile */
    .woocommerce-cart .section-title,
    .woocommerce-checkout .section-title {
        font-size: 2rem !important;
        margin-bottom: 18px !important;
    }
}

@media (max-width: 480px) {
    .wc-block-cart-item__image img {
        max-width: 60px;
    }

    .woocommerce-cart .section-title,
    .woocommerce-checkout .section-title {
        font-size: 1.75rem !important;
        margin-bottom: 14px !important;
    }
}

/* Cart Table */
.woocommerce table.shop_table {
    border: none;
    border-collapse: collapse;
}

.woocommerce table.shop_table th {
    background: #f5f5f5;
    padding: 15px;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.05em;
}

.woocommerce table.shop_table td {
    padding: 20px 15px;
    border-bottom: 1px solid #eee;
}

/* Classic Cart Checkout Button */
.woocommerce .wc-proceed-to-checkout a.checkout-button {
    background: #c41e1e !important;
    color: #fff !important;
    padding: 16px 30px !important;
    text-transform: uppercase;
    font-weight: 600;
    font-size: 0.85rem;
    letter-spacing: 0.05em;
    display: block;
    text-align: center;
    border-radius: 0 !important;
    border: 1px solid #c41e1e !important;
    transition: all 0.2s ease;
}

.woocommerce .wc-proceed-to-checkout a.checkout-button:hover {
    background: #a31818 !important;
    border-color: #a31818 !important;
}

/* WooCommerce Blocks Cart - Proceed to Checkout Button */
.wc-block-cart__submit-button,
.wc-block-components-checkout-place-order-button,
.wc-block-cart__submit-container .wc-block-components-button,
.wp-block-woocommerce-proceed-to-checkout-block a,
.wc-block-cart .wc-block-components-button {
    background: #c41e1e !important;
    color: #fff !important;
    padding: 16px 30px !important;
    text-transform: uppercase !important;
    font-weight: 600 !important;
    font-size: 0.85rem !important;
    letter-spacing: 0.05em !important;
    border-radius: 0 !important;
    border: 1px solid #c41e1e !important;
    transition: all 0.2s ease !important;
    text-decoration: none !important;
}

.wc-block-cart__submit-button:hover,
.wc-block-components-checkout-place-order-button:hover,
.wc-block-cart__submit-container .wc-block-components-button:hover,
.wp-block-woocommerce-proceed-to-checkout-block a:hover,
.wc-block-cart .wc-block-components-button:hover {
    background: #a31818 !important;
    border-color: #a31818 !important;
    color: #fff !important;
}

/* Style the text link version too */
.wc-block-cart__submit-container a:not(.wc-block-components-button) {
    background: #c41e1e !important;
    color: #fff !important;
    padding: 16px 30px !important;
    text-transform: uppercase !important;
    font-weight: 600 !important;
    font-size: 0.85rem !important;
    letter-spacing: 0.05em !important;
    border-radius: 0 !important;
    border: 1px solid #c41e1e !important;
    display: block !important;
    text-align: center !important;
    text-decoration: none !important;
    transition: all 0.2s ease !important;
}

.wc-block-cart__submit-container a:not(.wc-block-components-button):hover {
    background: #a31818 !important;
    border-color: #a31818 !important;
}

/* Checkout Form */
.woocommerce form.checkout_coupon,
.woocommerce form.login,
.woocommerce form.register {
    border: 1px solid #eee;
    padding: 20px;
    margin-bottom: 30px;
}

.woocommerce-billing-fields h3,
.woocommerce-shipping-fields h3,
#order_review_heading {
    font-family: var(--font-heading);
    font-size: 1.6rem;
    margin-bottom: 20px;
    color: #333;
}

.woocommerce form .form-row input.input-text,
.woocommerce form .form-row textarea,
.woocommerce form .form-row select {
    border: 1px solid #ddd;
    padding: 12px;
    width: 100%;
    font-family: var(--font-body);
}

.woocommerce form .form-row input.input-text:focus,
.woocommerce form .form-row textarea:focus {
    border-color: var(--brand-red);
    outline: none;
}

.woocommerce #payment {
    background: #f9f9f9;
    padding: 30px;
    border-radius: 4px;
}

.woocommerce #payment #place_order {
    background: var(--brand-red) !important;
    color: #fff !important;
    border: none;
    padding: 18px 40px;
    font-size: 1rem;
    text-transform: uppercase;
    font-weight: 600;
    width: 100%;
    cursor: pointer;
}

.woocommerce #payment #place_order:hover {
    background: var(--brand-red-dark) !important;
}

/* ========================================
   MISSING WOOCOMMERCE LAYOUTS (Fix for Checkout)
======================================== */
.woocommerce .col2-set {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    margin-bottom: 30px;
}

.woocommerce .col2-set .col-1,
.woocommerce .col2-set .col-2 {
    flex: 1 1 45%;
    max-width: 100%;
}

@media (max-width: 768px) {
    .woocommerce .col2-set {
        flex-direction: column;
    }

    .woocommerce .col2-set .col-1,
    .woocommerce .col2-set .col-2 {
        flex: 1 1 100%;
    }
}

/* Fix Checkout Review Order Table */
.woocommerce-checkout-review-order-table {
    border: 1px solid #eee;
    margin-bottom: 30px;
}

.woocommerce-checkout-review-order-table th,
.woocommerce-checkout-review-order-table td {
    padding: 15px;
    border-bottom: 1px solid #eee;
}

/* Payment Box Fix */
#payment {
    background: #fdfdfd;
    border: 1px solid #eee;
}

.wc_payment_methods {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 0 20px 0 !important;
}

.wc_payment_methods li {
    padding: 10px;
    border-bottom: 1px solid #f0f0f0;
}

/* Order Button Container */
.form-row.place-order {
    padding: 20px;
    background: #f9f9f9;
    margin-top: 20px;
    text-align: center;
}

/* General Input Fixes */
.woocommerce-input-wrapper {
    width: 100%;
}

/* Floats fix for older Woo templates just in case */
.woocommerce::after {
    content: "";
    display: table;
    clear: both;
}

/* ========================================
   STICKY CART WIDGET
======================================== */
.sticky-cart {
    position: sticky;
    top: 100px;
}

@media (max-width: 992px) {
    .sticky-cart {
        position: static;
    }
}

/* ========================================
   FREE SHIPPING PROGRESS BAR - Minimal
======================================== */
.free-shipping-progress {
    margin-bottom: 15px;
    padding: 15px;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 0;
}

.progress-bar-container {
    width: 100%;
    height: 4px;
    background: var(--border);
    border-radius: 0;
    overflow: hidden;
    margin-bottom: 10px;
}

.progress-bar-fill {
    height: 100%;
    background: var(--success);
    border-radius: 0;
    transition: width 0.5s ease;
}

.progress-text {
    margin: 0;
    font-size: 0.8rem;
    color: var(--grey-dark);
    text-align: center;
}

.progress-text strong {
    color: var(--brand-red);
}

.progress-complete {
    color: var(--success) !important;
    font-weight: 600;
}

/* ========================================
   ALLERGEN FILTER WIDGET - Minimal
======================================== */
.allergen-filter-widget {
    background: transparent;
    padding: 0;
    border-radius: 0;
    margin-bottom: 0;
}

.allergen-checkboxes {
    display: flex;
    flex-direction: column;
    gap: 0;
    margin-bottom: 15px;
}

.allergen-checkbox {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    font-size: 0.9rem;
    color: #555;
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
    transition: color 0.2s ease;
}

.allergen-checkbox:last-child {
    border-bottom: none;
}

.allergen-checkbox input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--brand-red);
    cursor: pointer;
    border: 1px solid var(--border);
    border-radius: 0;
}

.allergen-checkbox:hover .allergen-name {
    color: var(--black);
}

.allergen-filter-btn {
    width: 100%;
    padding: 12px 15px;
    background: var(--brand-red);
    color: #fff;
    border: 1px solid var(--brand-red);
    border-radius: 0;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.2s ease;
}

.allergen-filter-btn:hover {
    background: var(--brand-red-dark);
    border-color: var(--brand-red-dark);
}

/* ========================================
   EMPTY STATE - Clean
======================================== */
.empty-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    background: transparent;
    border-radius: 0;
    border: 1px solid var(--border);
}

.empty-state-icon {
    margin-bottom: 15px;
    color: var(--grey-light);
    display: flex;
    justify-content: center;
}

.empty-state-icon svg {
    width: 48px;
    height: 48px;
}

.empty-state h3 {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    color: #333;
    margin-bottom: 10px;
}

.empty-state p {
    color: #666;
    margin-bottom: 25px;
}

.empty-state-actions {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

.btn-reset-filters,
.btn-view-all {
    padding: 12px 24px;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    text-decoration: none;
    border-radius: 0;
    transition: all 0.2s ease;
}

.btn-reset-filters {
    background: transparent;
    color: #333;
    border: 1px solid var(--border);
}

.btn-reset-filters:hover {
    background: transparent;
    border-color: var(--black);
    color: var(--black);
}

.btn-view-all {
    background: var(--brand-red);
    color: #fff;
    border: 1px solid var(--brand-red);
}

.btn-view-all:hover {
    background: var(--brand-red-dark);
    border-color: var(--brand-red-dark);
}

/* ========================================
   PAGINATION - Professional Numbered
======================================== */
.shop-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 50px;
    padding-top: 30px;
    border-top: 1px solid var(--border);
}

/* Arrow Buttons */
.pagination-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 0;
    color: var(--black);
    text-decoration: none;
    transition: all 0.2s ease;
}

.pagination-arrow:hover:not(.disabled) {
    background: var(--brand-red);
    border-color: var(--brand-red);
    color: var(--white);
}

.pagination-arrow.disabled {
    opacity: 0.4;
    cursor: not-allowed;
    pointer-events: none;
}

.pagination-arrow svg {
    width: 18px;
    height: 18px;
}

/* Page Numbers Container */
.pagination-numbers {
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Individual Page Numbers */
.pagination-num {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 0;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--black);
    text-decoration: none;
    transition: all 0.2s ease;
}

.pagination-num:hover:not(.current) {
    background: transparent;
    border-color: var(--black);
}

.pagination-num.current {
    background: var(--brand-red);
    border-color: var(--brand-red);
    color: var(--white);
    font-weight: 600;
}

/* Ellipsis */
.pagination-ellipsis {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 40px;
    color: var(--grey-muted);
    font-size: 0.9rem;
    letter-spacing: 1px;
}

/* Tablet */
@media (max-width: 768px) {
    .shop-pagination {
        gap: 6px;
    }

    .pagination-arrow,
    .pagination-num {
        min-width: 36px;
        height: 36px;
        padding: 0 10px;
        font-size: 0.85rem;
    }

    .pagination-ellipsis {
        width: 24px;
        height: 36px;
    }
}

/* Mobile */
@media (max-width: 480px) {
    .shop-pagination {
        gap: 4px;
    }

    .pagination-arrow {
        width: 44px;
        height: 44px;
    }

    .pagination-num {
        min-width: 40px;
        height: 40px;
        padding: 0 8px;
        font-size: 0.9rem;
    }

    .pagination-ellipsis {
        width: 20px;
        height: 40px;
        font-size: 0.8rem;
    }

    /* Hide some page numbers on very small screens */
    .pagination-numbers .pagination-num:not(.current):not(:first-child):not(:last-child) {
        display: none;
    }

    /* But show neighbors of current */
    .pagination-numbers .pagination-num.current + .pagination-num,
    .pagination-numbers .pagination-num:has(+ .current) {
        display: flex;
    }
}

/* ========================================
   CROSS-SELL SECTION - Minimal Sharp Design
======================================== */
.cross-sell-section {
    padding: 50px 0;
    background: var(--off-white);
    margin-top: 0;
    border-top: 1px solid var(--border);
}

.cross-sell-section .section-title {
    text-align: left;
    font-family: var(--font-heading);
    font-size: 1.4rem;
    font-weight: 400;
    color: #111;
    margin-bottom: 30px;
}

.cross-sell-carousel {
    display: flex;
    gap: 20px;
    overflow: hidden;
    padding-bottom: 20px;
    width: max-content;
    animation: autoScroll 30s linear infinite;
}

.cross-sell-carousel:hover {
    animation-play-state: paused;
}

.cross-sell-card {
    flex: 0 0 200px;
    background: #fff;
    border-radius: 0;
    overflow: hidden;
    border: 1px solid #ddd;
    box-shadow: none;
    transition: border-color 0.2s ease;
}

.cross-sell-card:hover {
    transform: none;
    box-shadow: none;
    border-color: #111;
}

.cross-sell-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.cross-sell-image {
    width: 100%;
    height: 150px;
    overflow: hidden;
    background: #fff;
    border-bottom: 1px solid #ddd;
}

.cross-sell-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: none;
}

.cross-sell-card:hover .cross-sell-image img {
    transform: none;
}

.cross-sell-info {
    padding: 12px;
}

.cross-sell-title {
    font-family: var(--font-heading);
    font-size: 0.9rem;
    font-weight: 400;
    color: #111;
    margin: 0 0 5px;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.cross-sell-price {
    font-size: 0.9rem;
    font-weight: 600;
    color: #c41e1e;
}

@media (max-width: 768px) {
    .cross-sell-section {
        padding: 40px 0;
    }

    .cross-sell-section .section-title {
        font-size: 1.2rem;
    }

    .cross-sell-card {
        flex: 0 0 160px;
    }

    .cross-sell-image {
        height: 120px;
    }
}

/* ========================================
   ENHANCED THANK YOU PAGE
======================================== */
.thankyou-enhanced {
    max-width: 900px;
    margin: 0 auto;
    padding: 40px 20px 80px;
    width: 100%;
}

.thankyou-header {
    text-align: center;
    margin-bottom: 40px;
}

.thankyou-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    margin-bottom: 20px;
}

.thankyou-icon.success {
    background: #d1fae5;
    color: var(--success);
}

.thankyou-icon.error {
    background: var(--brand-red-light);
    color: var(--brand-red);
}

.thankyou-header h1 {
    font-family: var(--font-heading);
    font-size: 2rem;
    margin-bottom: 10px;
    font-weight: 400;
}

.thankyou-subtitle {
    color: var(--grey-muted);
    font-size: 1.1rem;
    margin: 0;
}

.thankyou-failed {
    text-align: center;
    padding: 60px 20px;
}

.thankyou-failed h2 {
    font-family: var(--font-heading);
    margin-bottom: 15px;
}

.thankyou-failed p {
    color: var(--grey-muted);
    margin-bottom: 25px;
}

.thankyou-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 25px;
    margin-bottom: 40px;
}

.thankyou-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 25px;
    min-width: 0;
}

.thankyou-card h3 {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 400;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border);
}

.thankyou-details {
    display: flex;
    flex-direction: column;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    font-size: 0.95rem;
    border-bottom: 1px solid #f5f5f5;
}

.detail-row:last-child {
    border-bottom: none;
}

.detail-row .label {
    color: var(--grey-muted);
    flex-shrink: 0;
}

.detail-row .value {
    font-weight: 500;
    color: var(--black);
    text-align: right;
    min-width: 0;
    word-break: break-word;
}

.detail-row.total {
    margin-top: 10px;
    padding-top: 15px;
    border-top: 1px solid var(--border);
    border-bottom: none;
}

.detail-row.total .value {
    color: var(--brand-red);
    font-size: 1.1rem;
    font-weight: 600;
}

.thankyou-items {
    display: flex;
    flex-direction: column;
}

.thankyou-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 12px 0;
    border-bottom: 1px solid #f0f0f0;
}

.thankyou-item:last-child {
    border-bottom: none;
}

.item-image,
.item-image-placeholder {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 4px;
    flex-shrink: 0;
}

.item-image-placeholder {
    background: var(--surface);
}

.item-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.item-name {
    font-weight: 500;
    color: var(--black);
    word-break: break-word;
}

.item-qty {
    font-size: 0.85rem;
    color: var(--grey-muted);
}

.item-price {
    font-weight: 600;
    color: var(--brand-red);
    flex-shrink: 0;
}

.thankyou-next-steps {
    background: var(--surface);
    border-radius: 8px;
    padding: 30px;
    margin-bottom: 30px;
}

.thankyou-next-steps h3 {
    font-family: var(--font-heading);
    font-weight: 400;
    text-align: center;
    margin-bottom: 25px;
}

.steps-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.step {
    text-align: center;
    padding: 15px;
}

.step svg {
    margin-bottom: 10px;
    color: var(--brand-red);
}

.step span {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--black);
}

.step p {
    font-size: 0.85rem;
    color: var(--grey-muted);
    margin: 0;
    line-height: 1.5;
}

.thankyou-addresses {
    margin-bottom: 30px;
}

.address-card address {
    font-style: normal;
    line-height: 1.6;
    color: var(--grey-dark);
}

.thankyou-actions {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
    padding-top: 20px;
}

/* ── Thank You Page: Mobile ── */
@media (max-width: 768px) {
    .thankyou-enhanced {
        padding: 20px 0 40px;
    }

    .thankyou-header {
        margin-bottom: 24px;
    }

    .thankyou-header h1 {
        font-size: 1.5rem;
    }

    .thankyou-subtitle {
        font-size: 0.95rem;
    }

    .thankyou-icon {
        width: 64px;
        height: 64px;
        margin-bottom: 16px;
    }

    .thankyou-icon svg {
        width: 32px;
        height: 32px;
    }

    /* Single column cards */
    .thankyou-grid {
        grid-template-columns: 1fr;
        gap: 16px;
        margin-bottom: 24px;
    }

    .thankyou-card {
        padding: 16px;
        border-radius: 6px;
    }

    .thankyou-card h3 {
        font-size: 1.05rem;
        margin-bottom: 14px;
        padding-bottom: 10px;
    }

    /* ── Order details: stack label above value ── */
    .detail-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 2px;
        padding: 8px 0;
        font-size: 0.9rem;
    }

    .detail-row .label {
        font-size: 0.78rem;
        text-transform: uppercase;
        letter-spacing: 0.03em;
    }

    .detail-row .value {
        text-align: left;
        font-size: 0.95rem;
    }

    /* Total row stays horizontal — it's short enough */
    .detail-row.total {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }

    .detail-row.total .value {
        text-align: right;
        font-size: 1rem;
    }

    /* ── Item rows: image + stacked name/qty/price ── */
    .thankyou-item {
        flex-wrap: wrap;
        gap: 8px;
        padding: 10px 0;
    }

    .item-image,
    .item-image-placeholder {
        width: 40px;
        height: 40px;
    }

    .item-info {
        flex: 1 1 0%;
        min-width: 0;
    }

    .item-name {
        font-size: 0.88rem;
        word-break: break-word;
    }

    .item-qty {
        font-size: 0.8rem;
    }

    .item-price {
        font-size: 0.88rem;
    }

    .steps-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .step {
        padding: 10px;
    }

    .address-card {
        margin-bottom: 20px !important;
        border-radius: 6px;
    }

    .address-card address {
        font-size: 0.9rem;
    }

    .thankyou-next-steps {
        padding: 16px;
        border-radius: 6px;
    }
}

@media (max-width: 480px) {
    .thankyou-enhanced {
        padding: 16px 0 32px;
    }

    .thankyou-header h1 {
        font-size: 1.25rem;
    }

    .thankyou-subtitle {
        font-size: 0.88rem;
    }

    .thankyou-card {
        padding: 12px;
    }

    .thankyou-card h3 {
        font-size: 1rem;
        margin-bottom: 12px;
        padding-bottom: 10px;
    }

    .detail-row .label {
        font-size: 0.75rem;
    }

    .detail-row .value {
        font-size: 0.9rem;
    }

    .thankyou-next-steps {
        padding: 12px;
    }

    .thankyou-item {
        gap: 6px;
    }

    .item-image,
    .item-image-placeholder {
        width: 36px;
        height: 36px;
    }

    .item-name {
        font-size: 0.85rem;
    }

    .item-price {
        font-size: 0.85rem;
    }

    .thankyou-actions {
        flex-direction: column;
    }

    .thankyou-actions .btn-primary,
    .thankyou-actions .btn-secondary {
        width: 100%;
        text-align: center;
    }
}

/* ========================================
   PRODUCT ACCORDION
======================================== */
.product-accordion {
    grid-column: 1 / -1;
    width: 100%;
    margin: 16px 0 0;
    padding: 0;
    box-sizing: border-box;
}

.product-accordion .accordion-item {
    border-top: 1px solid var(--border);
}

.product-accordion .accordion-item:last-child {
    border-bottom: 1px solid var(--border);
}

.accordion-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: 20px 0;
    background: transparent;
    border: none;
    cursor: pointer;
    font-family: var(--font-body);
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--black);
    text-align: left;
    letter-spacing: 0.1em;
    transition: color 0.2s ease;
}

.accordion-header:hover {
    color: var(--brand-red);
}

.accordion-icon {
    transition: transform 0.3s ease;
    color: var(--grey-muted);
    flex-shrink: 0;
}

.accordion-header[aria-expanded="true"] .accordion-icon {
    transform: rotate(90deg);
}

.accordion-content {
    display: none;
    padding: 0 0 24px;
    font-size: 0.95rem;
    line-height: 1.8;
    color: var(--grey-dark);
}

.accordion-content p {
    margin: 0 0 12px 0;
}

.accordion-content p:last-child {
    margin-bottom: 0;
}

.accordion-content strong {
    color: var(--black);
}

/* Remove default WooCommerce tabs */
.woocommerce-tabs,
.wc-tabs-wrapper {
    display: none !important;
}

/* ========================================
   PRODUCT REVIEWS
======================================== */
.review-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--brand-red);
    color: #fff;
    font-size: 0.7rem;
    font-weight: 600;
    min-width: 20px;
    height: 20px;
    border-radius: 10px;
    padding: 0 6px;
    margin-left: 8px;
    vertical-align: middle;
    letter-spacing: 0;
}

.reviews-summary {
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border);
}

.reviews-average {
    display: flex;
    align-items: center;
    gap: 12px;
}

.reviews-average-number {
    font-size: 2.5rem;
    font-weight: 600;
    color: var(--black);
    line-height: 1;
}

.reviews-average-stars .star {
    font-size: 1.2rem;
}

.reviews-average-stars .star-full {
    color: #f5a623;
}

.reviews-average-stars .star-half {
    color: #f5a623;
}

.reviews-average-stars .star-empty {
    color: #d4d4d4;
}

.reviews-total {
    font-size: 0.85rem;
    color: var(--grey-muted);
}

.review-item {
    padding: 20px 0;
    border-bottom: 1px solid var(--border);
}

.review-item:last-child {
    border-bottom: none;
}

.review-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}

.review-author {
    font-size: 0.95rem;
    color: var(--black);
}

.review-date {
    font-size: 0.8rem;
    color: var(--grey-muted);
}

.review-stars {
    margin-bottom: 8px;
}

.review-stars .star {
    font-size: 0.95rem;
}

.review-stars .star-full {
    color: #f5a623;
}

.review-stars .star-empty {
    color: #d4d4d4;
}

.review-text p {
    font-size: 0.9rem;
    color: var(--grey-dark);
    margin: 0;
    line-height: 1.6;
}

.no-reviews {
    color: var(--grey-muted);
    font-size: 0.9rem;
    font-style: italic;
    padding: 10px 0;
}

/* Review Form */
.review-form-wrap {
    margin-top: 28px;
    padding-top: 24px;
    border-top: 1px solid var(--border);
}

.review-form-wrap h4 {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0 0 20px;
    color: var(--black);
}

.review-form-rating {
    margin-bottom: 16px;
}

.review-form-rating label {
    display: block;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--grey-dark);
    margin-bottom: 6px;
}

.review-form-rating .required {
    color: var(--brand-red);
}

.star-rating-input {
    display: flex;
    gap: 4px;
}

.star-select {
    font-size: 1.6rem;
    cursor: pointer;
    color: #d4d4d4;
    transition: color 0.15s;
    user-select: none;
}

.star-select.active,
.star-select.selected {
    color: #f5a623;
}

.review-form-fields {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 16px;
}

.review-form-row {
    margin-bottom: 16px;
}

.review-form-fields .review-form-row {
    margin-bottom: 0;
}

.review-form-row label {
    display: block;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--grey-dark);
    margin-bottom: 6px;
}

.review-form-row .required {
    color: var(--brand-red);
}

.review-form-row input,
.review-form-row textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 0.9rem;
    font-family: inherit;
    color: var(--black);
    transition: border-color 0.2s;
    background: var(--white);
}

.review-form-row input:focus,
.review-form-row textarea:focus {
    outline: none;
    border-color: var(--brand-red);
}

.review-form-row textarea {
    resize: vertical;
    min-height: 100px;
}

.review-submit {
    padding: 12px 32px;
    font-size: 0.9rem;
}

@media (max-width: 576px) {
    .review-form-fields {
        grid-template-columns: 1fr;
        gap: 0;
    }
    .review-form-fields .review-form-row {
        margin-bottom: 16px;
    }
    .reviews-average {
        flex-wrap: wrap;
        gap: 8px;
    }
    .reviews-average-number {
        font-size: 2rem;
    }
}

/* Responsive */
@media (max-width: 768px) {
    .accordion-header {
        padding: 18px 0;
        font-size: 0.8rem;
    }

    .accordion-content {
        padding: 0 0 20px;
        font-size: 0.9rem;
    }
}

/* ========================================
   WOOCOMMERCE BLOCKS — CART REMOVE BUTTON
======================================== */
.wc-block-cart-item__remove-link,
.wc-block-cart-item__remove-link:visited {
    display: inline-flex !important;
    align-items: center;
    gap: 4px;
    margin-top: 8px !important;
    padding: 4px 0 !important;
    font-size: 0.75rem !important;
    font-family: var(--font-body) !important;
    color: var(--grey-muted) !important;
    text-decoration: none !important;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    border: none !important;
    background: none !important;
    cursor: pointer;
    transition: color 0.2s ease;
}

/* X icon via ::before */
.wc-block-cart-item__remove-link::before {
    content: '';
    display: inline-block;
    width: 14px;
    height: 14px;
    flex-shrink: 0;
    background-color: currentColor;
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cline x1='18' y1='6' x2='6' y2='18'/%3E%3Cline x1='6' y1='6' x2='18' y2='18'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cline x1='18' y1='6' x2='6' y2='18'/%3E%3Cline x1='6' y1='6' x2='18' y2='18'/%3E%3C/svg%3E");
    -webkit-mask-size: contain;
    mask-size: contain;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-position: center;
    mask-position: center;
}

.wc-block-cart-item__remove-link:hover,
.wc-block-cart-item__remove-link:focus {
    color: var(--brand-red) !important;
    text-decoration: none !important;
    background: none !important;
}

/* Guest-only: hide ALL account creation and login UI (belt-and-suspenders) */
.wc-block-checkout__login-prompt,
.wc-block-must-login-prompt,
.woocommerce-form-login,
.woocommerce-form-register,
.wc-block-order-confirmation-create-account,
.woocommerce-account .register {
    display: none !important;
}

/* ── Checkout: Shipping/Payment conditional visibility ─────────────────────
 *
 * Logic:
 *   Stripe (card)   → delivery OR pickup  ✓
 *   Bank transfer   → pickup ONLY          ✗ delivery
 *   Cash (COD)      → pickup ONLY          ✗ delivery
 *
 * Body classes toggled by JS:
 *   .wc-shipping-delivery  → flat_rate selected
 *   .wc-shipping-pickup    → local_pickup selected
 *   .wc-shipping-none      → nothing selected yet → show only card by default
 * ─────────────────────────────────────────────────────────────────────── */

/* ── Payment section is hidden until a shipping method is chosen ──
 * PHP adds .wc-shipping-none to <body> on page load.
 * JS removes it and adds .wc-shipping-pickup or .wc-shipping-delivery
 * once the user selects a shipping method.                           */
.wc-shipping-none .wc-block-checkout__payment-method,
.wc-shipping-none .wc-block-checkout__actions,
.wc-shipping-none #payment {
    display: none !important;
}

/* ── When delivery is selected → hide pickup-only payment options ── */

/* WC Blocks */
.wc-shipping-delivery .wc-block-components-radio-control-accordion-option:has(input[value="bacs"]),
.wc-shipping-delivery .wc-block-components-radio-control-accordion-option:has(input[value="cod"]) {
    display: none !important;
}

/* Classic checkout fallback */
.wc-shipping-delivery .payment_method_bacs,
.wc-shipping-delivery .payment_method_cod {
    display: none !important;
}

@media (max-width: 480px) {
    .product-accordion {
        margin-top: 40px;
    }

    .accordion-header {
        padding: 16px 0;
    }

    .accordion-content {
        padding: 0 0 16px;
    }
}

/* =====================================================
   BACS Checkout Info Box (before order placement)
   ===================================================== */
.bacs-checkout-block {
    margin-top: 16px;
    border: 1px solid #e5e7eb;
    border-radius: 4px;
    overflow: hidden;
    font-family: 'DM Sans', -apple-system, sans-serif;
    font-size: 0.9rem;
}

.bacs-checkout-header {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #c41e1e;
    color: #fff;
    padding: 10px 16px;
    font-family: 'DM Serif Display', Georgia, serif;
    font-size: 0.95rem;
    letter-spacing: 0.01em;
}

.bacs-checkout-body {
    display: flex;
    flex-wrap: wrap;
    gap: 0;
    background: #fff;
}

.bacs-checkout-details {
    flex: 1;
    min-width: 200px;
    padding: 16px 20px;
}

.bacs-dl {
    margin: 0 0 14px;
}

.bacs-dl-row {
    display: grid;
    grid-template-columns: 100px 1fr;
    gap: 4px 12px;
    padding: 5px 0;
    border-bottom: 1px solid #f3f4f6;
    align-items: baseline;
}

.bacs-dl-row:last-child {
    border-bottom: none;
}

.bacs-dl-row dt {
    color: #6b7280;
    font-weight: 400;
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.bacs-dl-row dd {
    color: #1a1a1a;
    font-weight: 500;
    margin: 0;
}

.bacs-dl-row dd code {
    font-family: 'DM Mono', 'Courier New', monospace;
    font-size: 0.88rem;
    background: #f3f4f6;
    padding: 2px 6px;
    border-radius: 3px;
    color: #1a1a1a;
    font-weight: 600;
}

.bacs-ref-note {
    font-size: 0.78rem;
    color: #9ca3af;
    font-weight: 400;
}

/* Email row — highlighted */
.bacs-email-row {
    background: #f9fafb;
    margin: 0 -20px;
    padding: 6px 20px !important;
    border-bottom: none !important;
}

.bacs-email-placeholder {
    color: #9ca3af;
    font-weight: 400;
    font-style: italic;
}

.bacs-email-filled {
    color: #1a1a1a;
    font-weight: 500;
    font-style: normal;
}

.bacs-id-notice {
    display: flex;
    align-items: flex-start;
    gap: 6px;
    font-size: 0.8rem;
    color: #6b7280;
    background: #fef9e7;
    border: 1px solid #fde68a;
    border-radius: 4px;
    padding: 8px 10px;
    margin-top: 4px;
    line-height: 1.4;
}

.bacs-id-notice svg {
    flex-shrink: 0;
    margin-top: 1px;
    color: #d97706;
}

.bacs-id-notice strong {
    color: #374151;
}

/* QR column */
.bacs-checkout-qr {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 16px 20px;
    border-left: 1px solid #e5e7eb;
    background: #f9fafb;
    min-width: 150px;
    text-align: center;
}

.bacs-checkout-qr img {
    max-width: 200px;
    height: auto;
    display: block;
}

.bacs-checkout-qr p {
    font-size: 0.78rem;
    color: #6b7280;
    margin: 8px 0 0;
}

.bacs-qr-sub {
    font-size: 0.72rem !important;
    color: #9ca3af !important;
}

/* =====================================================
   BACS Thank-You Page — Payment details + EPC QR box
   ===================================================== */
.slascicarstvo-bacs-thankyou {
    border: 1px solid #e5e7eb;
    border-radius: 4px;
    overflow: hidden;
    margin: 20px 0 24px;
    font-family: 'DM Sans', -apple-system, sans-serif;
}

.slascicarstvo-bacs-thankyou h4 {
    font-family: 'DM Serif Display', Georgia, serif;
    color: #fff;
    background: #c41e1e;
    margin: 0;
    padding: 12px 20px;
    font-size: 1rem;
    font-weight: 400;
}

.bacs-thankyou-inner {
    display: flex;
    flex-wrap: wrap;
    background: #fff;
}

.bacs-thankyou-details {
    flex: 1;
    min-width: 220px;
    padding: 16px 20px;
}

.bacs-thankyou-details p {
    margin: 6px 0;
    font-size: 0.92rem;
    color: #374151;
}

.bacs-thankyou-details code {
    font-family: 'DM Mono', 'Courier New', monospace;
    background: #f3f4f6;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 0.88rem;
    color: #1a1a1a;
}

.bacs-amount {
    font-size: 1.1rem !important;
    font-weight: 700 !important;
    color: #c41e1e !important;
    margin-top: 12px !important;
    padding-top: 10px !important;
    border-top: 1px solid #e5e7eb !important;
}

.bacs-thankyou-qr {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 16px 20px;
    border-left: 1px solid #e5e7eb;
    background: #f9fafb;
    min-width: 160px;
    text-align: center;
}

.bacs-thankyou-qr img {
    max-width: 240px;
    height: auto;
    display: block;
}

.bacs-thankyou-qr .qr-caption {
    font-size: 0.78rem;
    color: #6b7280;
    margin: 8px 0 0;
}

.bacs-notice {
    margin: 0;
    padding: 12px 20px;
    font-size: 0.85rem;
    color: #6b7280;
    background: #f9fafb;
    border-top: 1px solid #e5e7eb;
}

@media (max-width: 600px) {
    .bacs-checkout-body,
    .bacs-thankyou-inner {
        flex-direction: column;
    }

    .bacs-checkout-qr,
    .bacs-thankyou-qr {
        border-left: none;
        border-top: 1px solid #e5e7eb;
        width: 100%;
    }

    .bacs-email-row {
        grid-column: 1 / -1;
    }
}