/* 
 * WooCommerce Modern Redesign 
 * Handles Cart, Checkout, My Account, Order Received, and global Woo elements.
 */

:root {
    /* Inherit functionality from main.css but ensure availability */
    --primary-color: #243E8B;
    --primary-hover: #1a2d69;
    --background-light: #FFFFFF;
    --surface-light: #FFFFFF;
    --surface-dark: #1E1E1E;
    --text-main: #111827;
    --text-sub: #6B7280;
    --border-color: #E5E7EB;

    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;

    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);

    /* Form Heights */
    --input-height: 52px;
}

/* =========================================
   Global/Reset Styles for WooCommerce
   ========================================= */
.woocommerce-page {
    background-color: var(--background-light);
}

/* .woocommerce-page .container {
    padding-top: 3rem;
    padding-bottom: 5rem;
} */

/* Headings */
.page-title,
.woocommerce-billing-fields__field-wrapper h3,
.woocommerce-shipping-fields h3,
.woocommerce-order-details__title,
.woocommerce-column__title {
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--text-main);
    margin-bottom: 1.5rem;
}

/* Alerts / Notices */
.woocommerce-message,
.woocommerce-info,
.woocommerce-error {
    border-radius: var(--radius-md);
    border-top: none;
    padding: 1rem 1.5rem;
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.95rem;
    margin-bottom: 2rem !important;
}

.woocommerce-message {
    background-color: #EFF6FF;
    color: #1E40AF;
    border-left: 4px solid #3B82F6;
}

.woocommerce-info {
    background-color: #F3F4F6;
    color: var(--text-main);
    border-left: 4px solid var(--primary-color);
}

.woocommerce-error {
    background-color: #FEF2F2;
    color: #991B1B;
    border-left: 4px solid #EF4444;
}

.woocommerce-message::before,
.woocommerce-info::before,
.woocommerce-error::before {
    display: none;
    /* Hide default hook icons to use flex gap */
}

/* Buttons (Global Woo) */
.woocommerce .button {
    border-radius: var(--radius-md) !important;
    /* Rounded to match inputs */
    padding: 0.85rem 1.75rem !important;
    font-weight: 600 !important;
    transition: all 0.2s ease-in-out !important;
    height: auto !important;
    line-height: inherit !important;
    border: none !important;
    position: relative;
    overflow: hidden;
    z-index: 1;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-family: 'Poppins', sans-serif;
}

/* Alternate (Primary) Button */
.woocommerce .button.alt {
    background: var(--primary-color) !important;
    color: #ffffff !important;
    box-shadow: none !important;
}

.woocommerce .button.alt:hover {
    background: var(--primary-hover) !important;
    transform: translateY(-2px);
    box-shadow: none !important;
}

/* Secondary Buttons (Generic .button) - Soft Tint */
.woocommerce .button:not(.alt) {
    background-color: #F3F4F6;
    /* Soft Gray/Tint */
    color: var(--text-main);
}

.woocommerce .button:not(.alt):hover {
    background-color: #E5E7EB;
    transform: translateY(-2px);
    color: var(--primary-color);
}

/* Inputs */
/* Inputs - Modern Filled Style */
.woocommerce form .form-row input.input-text,
.woocommerce form .form-row textarea {
    padding: 16px 20px;
    /* larger padding */
    border: 2px solid transparent;
    /* Prepare for border transition */
    border-radius: var(--radius-md);
    /* 12px */
    box-shadow: none;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    font-size: 1rem;
    line-height: 1.5;
    background-color: #F3F4F6;
    /* Light gray filled */
    color: var(--text-main);
}

.woocommerce form .form-row input.input-text:hover,
.woocommerce form .form-row textarea:hover {
    background-color: #E5E7EB;
    /* Slightly darker on hover */
}

.woocommerce form .form-row input.input-text:focus,
.woocommerce form .form-row textarea:focus {
    background-color: #FFFFFF;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(36, 62, 139, 0.1);
    outline: none;
    transform: translateY(-2px);
    /* Subtle lift */
}

/* Floating Label Animation Support (if strict HTML structure exists)
   Assuming standard Woo structure, we just enhance the focus experience for now. */

/* Floating Label Animation Support (if strict HTML structure exists)
   Assuming standard Woo structure, we just enhance the focus experience for now. */

/* Select2 overrides if used - Matching Modern Filled Inputs */
.select2-container .select2-selection--single {
    height: 56px !important;
    /* Visual match for inputs with padding */
    background-color: #F3F4F6 !important;
    border: 2px solid transparent !important;
    border-radius: var(--radius-md) !important;
    display: flex !important;
    align-items: center !important;
    transition: all 0.3s ease;
}

.select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 54px !important;
    top: 1px !important;
}

.select2-container .select2-selection--single .select2-selection__rendered {
    padding-left: 20px !important;
    color: var(--text-main) !important;
    font-size: 1rem !important;
    line-height: 56px !important;
}

/* Select2 Focus State */
.select2-container--open .select2-selection--single {
    background-color: #FFF !important;
    border-color: var(--primary-color) !important;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1) !important;
}

/* =========================================
   Custom Checkboxes & Radios
   ========================================= */
/* Hide native (basic approach, might need specific targeting to avoid breaking hidden inputs) */
.woocommerce form .input-checkbox,
.woocommerce form .input-radio {
    /* We don't fully hide to maintain accessibility if not replacing fully,
       but here we style them to look better if browser supports accent-color or appearance */
    accent-color: var(--primary-color);
    width: 20px;
    height: 20px;
    cursor: pointer;
    vertical-align: text-bottom;
}

/* Optional: True Custom Customization could go here, but accent-color is the modern web standard way */


/* =========================================
   Cart Page Styling - Redesigned
   ========================================= */

/* Main Layout Wrapper - Flexbox for Side-by-Side */
.woocommerce-cart .woocommerce {
    display: flex;
    flex-wrap: wrap;
    gap: 3rem;
    /* Space between table and sidebar */
    align-items: flex-start;
    max-width: 1280px;
    margin: 0 auto;
    padding-top: 2rem;
}

@media (max-width: 991px) {
    .woocommerce-cart .woocommerce {
        flex-direction: column;
        gap: 2rem;
    }
}

/* 1. Left Column: Cart Form (Item List) */
.woocommerce-cart .woocommerce-cart-form {
    flex: 1 1 600px;
    /* Takes available space, min 600px desktop */
    margin-bottom: 0;
    width: 100%;
    /* Remove default background/borders if any from generic styles */
    background: transparent;
    box-shadow: none;
    border: none;
}

/* Cart Table - Modernized */
.shop_table.cart {
    border: none;
    border-collapse: separate;
    border-spacing: 0 1rem;
    /* Space between rows */
    margin: 0;
    width: 100%;
}

.shop_table.cart thead {
    /* Optional: Hide headers or style subtly */
}

@media (min-width: 768px) {
    .shop_table.cart thead th {
        background: transparent;
        color: var(--text-sub);
        font-weight: 500;
        text-transform: uppercase;
        font-size: 0.8rem;
        letter-spacing: 0.05em;
        padding-bottom: 0.5rem;
        border-bottom: 1px solid var(--border-color);
        text-align: left;
    }
}

.shop_table.cart tbody tr.cart_item {
    background: var(--surface-light);
    box-shadow: var(--shadow-sm);
    border-radius: var(--radius-md);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.shop_table.cart tbody tr.cart_item:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.shop_table.cart tbody td {
    padding: 1.5rem;
    border: none;
    /* Reset borders */
    vertical-align: middle;
}

/* Apply border radius to first and last cells for row rounding */
.shop_table.cart tbody td:first-child {
    border-top-left-radius: var(--radius-md);
    border-bottom-left-radius: var(--radius-md);
}

.shop_table.cart tbody td:last-child {
    border-top-right-radius: var(--radius-md);
    border-bottom-right-radius: var(--radius-md);
}

/* Remove Icon */
.shop_table.cart .product-remove {
    width: 48px;
    text-align: center;
}

.shop_table.cart .product-remove a.remove {
    color: var(--text-sub) !important;
    font-size: 1.25rem;
    width: 32px;
    height: 32px;
    display: flex;
    /* Centering */
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s;
    background: transparent;
}

.shop_table.cart .product-remove a.remove:hover {
    background: #FEF2F2;
    color: #EF4444 !important;
}

/* Thumbnail */
.shop_table.cart .product-thumbnail {
    width: 100px;
}

.shop_table.cart .product-thumbnail img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-sm);
}

/* Name & Price */
.shop_table.cart .product-name a {
    font-weight: 600;
    color: var(--text-main);
    text-decoration: none;
    font-size: 1.05rem;
    display: block;
    margin-bottom: 0.25rem;
}

.shop_table.cart .product-price {
    color: var(--text-sub);
    font-size: 0.95rem;
}

/* Quantity */
.shop_table.cart .product-quantity .quantity {
    /* Using generic quantity style */
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
    background: #fff;
}

.shop_table.cart .product-quantity input.qty {
    width: 60px;
    /* Slightly wider */
    border: none;
    background: transparent;
    text-align: center;
    font-weight: 600;
}

/* Subtotal */
.shop_table.cart .product-subtotal {
    font-weight: 700;
    color: var(--primary-color);
    font-size: 1.1rem;
    text-align: right;
}

/* Actions Row (Coupon & Update Cart) */
.shop_table.cart tr td.actions {
    background: transparent;
    padding: 2rem 0 !important;
    /* Spacing */
    border-radius: 0;
    /* Reset */
    box-shadow: none;
    /* Reset */
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    border: none !important;
}

/* Coupon Section */
.shop_table.cart td.actions .coupon {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.shop_table.cart td.actions .coupon input.input-text {
    width: auto !important;
    min-width: 200px;
    margin: 0 !important;
    padding: 0.75rem 1rem !important;
    height: 48px;
    /* Match button height */
}

.shop_table.cart td.actions .coupon .button {
    height: 48px !important;
    padding: 0 1.5rem !important;
    background: var(--surface-dark);
    color: #fff;
    border-radius: var(--radius-md);
}

/* Update Cart Button */
.shop_table.cart td.actions>.button {
    background: transparent !important;
    color: var(--text-sub) !important;
    border: 1px solid var(--border-color) !important;
    margin-left: auto;
    /* Push to right */
    height: 48px !important;
    padding: 0 2rem !important;
}

.shop_table.cart td.actions>.button:hover {
    background: #F3F4F6 !important;
    color: var(--text-main) !important;
    border-color: #D1D5DB !important;
}

.shop_table.cart td.actions>.button[disabled] {
    opacity: 0.5;
    cursor: not-allowed;
}

/* 2. Right Column: Cart Totals (Sticky Sidebar) */
.woocommerce-cart .cart-collaterals {
    flex: 1 1 350px;
    /* Sidebar width */
    margin-top: 0;
    max-width: 450px;
    width: 100%;
}

.cart_totals {
    width: 100% !important;
    float: none !important;
    background: var(--surface-light);
    padding: 2rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
    position: sticky;
    top: 2rem;
    /* Sticky header offset */
}

.cart_totals h2 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 1rem;
    color: var(--text-main);
}

.cart_totals table.shop_table {
    border: none;
    margin: 0 0 1.5rem;
    width: 100%;
}

.cart_totals table.shop_table th,
.cart_totals table.shop_table td {
    padding: 1rem 0;
    border-bottom: 1px dashed var(--border-color);
    vertical-align: middle;
}

.cart_totals table.shop_table th {
    font-weight: 500;
    color: var(--text-sub);
    text-align: left;
}

.cart_totals table.shop_table td {
    text-align: right;
    font-weight: 600;
    color: var(--text-main);
}

.cart_totals table.shop_table tr.order-total th,
.cart_totals table.shop_table tr.order-total td {
    border-bottom: none;
    border-top: 1px solid var(--border-color);
    padding-top: 1.5rem;
    font-size: 1.25rem;
    color: var(--primary-color);
}

/* Proceed to Checkout Button */
.wc-proceed-to-checkout {
    padding: 0;
}

.wc-proceed-to-checkout a.checkout-button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 1.25rem 2rem !important;
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 1rem;
    box-shadow: 0 10px 20px -5px rgba(37, 99, 235, 0.4);
    /* Blue shadow */
    background: linear-gradient(135deg, var(--primary-color) 0%, #1E40AF 100%);
    color: #fff;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 50px;
    /* Pill shape */
    text-decoration: none;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    position: relative;
    overflow: hidden;
}

.wc-proceed-to-checkout a.checkout-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: 0.5s;
}

.wc-proceed-to-checkout a.checkout-button:hover::before {
    left: 100%;
}

.wc-proceed-to-checkout a.checkout-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 30px -5px rgba(37, 99, 235, 0.5);
    background: linear-gradient(135deg, #1E40AF 0%, var(--primary-color) 100%);
    color: #fff;
}



/* Mobile Responsiveness for Cart Table */
@media (max-width: 768px) {

    /* Hide Table Headers */
    .shop_table.cart thead {
        display: none;
    }

    /* Display rows as blocks/cards */
    .shop_table.cart tbody tr.cart_item {
        display: grid;
        grid-template-columns: 80px 1fr auto;
        /* Thumb, Details, Price/Remove */
        grid-template-areas:
            "thumb name remove"
            "thumb price remove"
            "thumb qty total";
        gap: 0.75rem;
        padding: 1rem;
        align-items: start;
        position: relative;
    }

    .shop_table.cart tbody td {
        display: block;
        padding: 0;
        text-align: left;
        border: none !important;
    }

    /* Reset radius for td */
    .shop_table.cart tbody td:first-child,
    .shop_table.cart tbody td:last-child {
        border-radius: 0;
    }

    /* Assign Areas */
    .shop_table.cart .product-remove {
        grid-area: remove;
        justify-self: end;
    }

    .shop_table.cart .product-thumbnail {
        grid-area: thumb;
        width: 80px;
    }

    .shop_table.cart .product-name {
        grid-area: name;
        padding-right: 2rem;
        /* Avoid overlap with remove icon */
    }

    .shop_table.cart .product-price {
        grid-area: price;
        font-size: 0.9rem;
        color: var(--text-sub);
    }

    .shop_table.cart .product-quantity {
        grid-area: qty;
        margin-top: 0.5rem;
    }

    .shop_table.cart .product-subtotal {
        grid-area: total;
        justify-self: end;
        align-self: end;
    }

    /* Hide labels if they exist */
    .shop_table.cart td::before {
        content: attr(data-title) ": ";
        display: none;
    }

    /* Actions Column Stacked */
    .shop_table.cart tr td.actions {
        display: flex;
        flex-direction: column;
        padding: 1rem 0 !important;
    }

    .shop_table.cart td.actions .coupon {
        width: 100%;
        margin-bottom: 1rem;
    }

    .shop_table.cart td.actions .coupon input.input-text {
        flex: 1;
        width: auto !important;
    }

    .shop_table.cart td.actions>.button {
        width: 100%;
        margin: 0;
    }
}

/* Cross Sells Section */
.copyme-cross-sells {
    width: 100%;
    margin-top: 4rem;
    border-top: 1px solid var(--border-color);
    padding-top: 3rem;
    flex: 1 1 100%;
}

.copyme-cross-sells h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 2rem;
    color: var(--text-main);
}

/* =========================================
   Checkout Page Styling
   ========================================= */
/* The layout wrapper .checkout-grid is defined in form-checkout.php */

.checkout-grid {
    display: grid;
    grid-template-columns: 1.6fr 1fr;
    gap: 3rem;
    align-items: start;
}

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

/* Left Column - Form */
.col2-set {
    width: 100%;
    float: none;
}

.col-1,
.col-2 {
    width: 100%;
    float: none;
    max-width: none;
    padding: 0;
}

/* Inputs with Floating Label feel (using modern CSS) */
.woocommerce-billing-fields__field-wrapper,
.woocommerce-shipping-fields__field-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.form-row {
    width: 100% !important;
    float: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

.form-row-wide {
    grid-column: span 2;
}

.form-row label {
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: var(--text-main);
    display: block;
}

.form-row .required {
    color: #EF4444;
    text-decoration: none;
}

/* Right Column - Order Review */
#order_review_heading {
    display: none;
    /* We hide the default heading for cleaner look */
}

/* Review Order Box */
.checkout-review-order-wrap {
    background: var(--surface-light);
    padding: 2rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    position: sticky;
    top: 2rem;
    border: 1px solid var(--border-color);
}

.shop_table.woocommerce-checkout-review-order-table {
    border: none;
    margin: 0 0 2rem 0;
}

.shop_table.woocommerce-checkout-review-order-table th,
.shop_table.woocommerce-checkout-review-order-table td {
    border: none;
    border-bottom: 1px dashed var(--border-color);
    padding: 1rem 0;
}

.shop_table.woocommerce-checkout-review-order-table tfoot th {
    color: var(--text-sub);
    font-weight: 500;
}

.shop_table.woocommerce-checkout-review-order-table .order-total th,
.shop_table.woocommerce-checkout-review-order-table .order-total td {
    border-bottom: none;
    font-size: 1.25rem;
    color: var(--text-main);
    padding-top: 1.5rem;
}

/* Payment Methods */
#payment {
    background: transparent;
    border-radius: 0;
    padding: 0;
}

#payment ul.payment_methods {
    border-bottom: none;
    padding: 0;
}

#payment li.payment_method_cod,
#payment li.payment_method_bacs,
#payment li.payment_method_cheque,
#payment li.payment_method_paypal,
#payment li.wc_payment_method {
    background: #F9FAFB;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 1rem;
    margin-bottom: 1rem;
    list-style: none;
}

#payment li.wc_payment_method>label {
    font-weight: 600;
    margin-bottom: 0.5rem;
    display: block;
    cursor: pointer;
}

#payment div.payment_box {
    background-color: transparent;
    color: var(--text-sub);
    font-size: 0.9rem;
    padding: 0.5rem 0 0 0;
    position: relative;
}

#payment div.payment_box::before {
    display: none;
}

#place_order {
    width: 100%;
    padding: 1.25rem;
    font-size: 1.1rem;
    margin-top: 1.5rem;
    font-weight: 700;
    box-shadow: 0 4px 12px rgba(36, 62, 139, 0.2);
    transition: all 0.3s ease;
}

#place_order:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(36, 62, 139, 0.3);
}

/* =========================================
   My Account Page Styling - IMPROVED
   ========================================= */

/* Main Container Layout */
.woocommerce-account .woocommerce {
    display: flex;
    gap: 3rem;
    align-items: flex-start;
    max-width: 1280px;
    margin: 0 auto;
}

@media (max-width: 991px) {
    .woocommerce-account .woocommerce {
        flex-direction: column;
        gap: 2rem;
    }
}

/* Sidebar Navigation */
.woocommerce-account .woocommerce-MyAccount-navigation {
    width: 280px;
    flex-shrink: 0;
    background: var(--surface-light);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    padding: 0;
    /* Let items handle padding */
    overflow: hidden;
    position: sticky;
    top: 100px;
    /* Adjust based on header height, assume ~80px */
    border: 1px solid var(--border-color);
    float: none;
    /* Reset */
    margin-bottom: 0;
}

@media (max-width: 991px) {
    .woocommerce-account .woocommerce-MyAccount-navigation {
        width: 100%;
        position: static;
    }
}

/* Navigation Links */
.woocommerce-MyAccount-navigation ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.woocommerce-MyAccount-navigation li {
    margin: 0;
    border-bottom: 1px solid var(--border-color);
}

.woocommerce-MyAccount-navigation li:last-child {
    border-bottom: none;
}

.woocommerce-MyAccount-navigation li a {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem 1.5rem;
    color: var(--text-sub);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s cubic-bezier(0.25, 1, 0.5, 1);
    position: relative;
    border-left: 4px solid transparent;
}

.woocommerce-MyAccount-navigation li a:hover {
    background-color: #F9FAFB;
    color: var(--primary-color);
    padding-left: 2rem;
    /* Slide effect */
}

.woocommerce-MyAccount-navigation li.is-active a {
    background-color: #EFF6FF;
    /* Ultra light primary */
    color: var(--primary-color);
    border-left-color: var(--primary-color);
    font-weight: 600;
}

/* Icons via Pseudo-element (assuming standard classes) */
.woocommerce-MyAccount-navigation li a::before {
    font-family: 'Material Icons Outlined';
    font-size: 1.5rem;
    line-height: 1;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.woocommerce-MyAccount-navigation li.is-active a::before,
.woocommerce-MyAccount-navigation li a:hover::before {
    opacity: 1;
}

/* Specific Icons */
.woocommerce-MyAccount-navigation-link--dashboard a::before {
    content: 'dashboard';
}

.woocommerce-MyAccount-navigation-link--orders a::before {
    content: 'shopping_bag';
}

.woocommerce-MyAccount-navigation-link--downloads a::before {
    content: 'cloud_download';
}

.woocommerce-MyAccount-navigation-link--edit-address a::before {
    content: 'location_on';
}

.woocommerce-MyAccount-navigation-link--edit-account a::before {
    content: 'person';
}

.woocommerce-MyAccount-navigation-link--customer-logout a::before {
    content: 'logout';
}

.woocommerce-MyAccount-navigation-link--payment-methods a::before {
    content: 'credit_card';
}

/* Content Area */
.woocommerce-account .woocommerce-MyAccount-content {
    flex-grow: 1;
    width: auto;
    /* Reset fixed width */
    float: none;
    /* Reset float */
    background: var(--surface-light);
    padding: 3rem;
    border-radius: var(--radius-lg);
    padding-bottom: 4rem;
    /* Extra space at bottom */
    box-shadow: var(--shadow-md);
    min-width: 0;
    /* Prevent flex overflow */
    border: 1px solid var(--border-color);
}

@media (max-width: 768px) {
    .woocommerce-account .woocommerce-MyAccount-content {
        padding: 1.5rem;
    }
}

/* Welcome Message */
.woocommerce-MyAccount-content p:first-child {
    background-color: #EFF6FF;
    border-radius: var(--radius-md);
    padding: 1.5rem;
    margin-bottom: 2rem;
    color: #1E40AF;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.woocommerce-MyAccount-content p:first-child a {
    text-decoration: underline;
    font-weight: 600;
    color: var(--primary-color);
}

/* Addresses Grid */
.woocommerce-Addresses {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-top: 2rem;
}

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

.woocommerce-Address {
    background: #F9FAFB;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 2rem;
    position: relative;
    transition: all 0.2s;
}

.woocommerce-Address:hover {
    border-color: var(--primary-color);
    box-shadow: var(--shadow-sm);
    background: #fff;
}

.woocommerce-Address-title h3 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.woocommerce-Address-title .edit {
    font-size: 0.85rem;
    text-transform: uppercase;
    font-weight: 700;
    color: var(--primary-color);
    text-decoration: none;
    background: #EFF6FF;
    padding: 0.25rem 0.75rem;
    border-radius: 50px;
}

.woocommerce-Address address {
    font-style: normal;
    color: var(--text-sub);
    line-height: 1.6;
}

/* Orders Table (Refining) */
.woocommerce-orders-table,
.woocommerce-table--order-details {
    width: 100%;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    border-spacing: 0;
    overflow: hidden;
    margin-bottom: 2rem;
}

.woocommerce-orders-table thead th,
.woocommerce-table--order-details thead th {
    background-color: #F9FAFB;
    border-bottom: 1px solid var(--border-color);
    text-transform: uppercase;
    font-size: 0.75rem;
    color: var(--text-sub);
    letter-spacing: 0.05em;
    padding: 1.2rem 1rem;
    font-weight: 600;
    text-align: left;
}

.woocommerce-orders-table tbody td,
.woocommerce-table--order-details tbody td {
    border-bottom: 1px solid var(--border-color);
    padding: 1.2rem 1rem;
    color: var(--text-main);
    font-size: 0.95rem;
    vertical-align: middle;
}

.woocommerce-orders-table tbody tr:last-child td,
.woocommerce-table--order-details tbody tr:last-child td {
    border-bottom: none;
}

.woocommerce-orders-table__cell-order-number a {
    font-weight: 700;
    color: var(--primary-color);
    text-decoration: none;
}

.woocommerce-orders-table__cell-order-status {
    text-transform: capitalize;
}

/* Status Colors via TR class */
.order-status-completed .woocommerce-orders-table__cell-order-status {
    color: #10B981;
    font-weight: 600;
}

.order-status-processing .woocommerce-orders-table__cell-order-status {
    color: #F59E0B;
    font-weight: 600;
}

.order-status-on-hold .woocommerce-orders-table__cell-order-status {
    color: #F59E0B;
    font-weight: 600;
}

.order-status-cancelled .woocommerce-orders-table__cell-order-status,
.order-status-failed .woocommerce-orders-table__cell-order-status {
    color: #EF4444;
    font-weight: 600;
}

.woocommerce-orders-table__cell-order-actions .button {
    background-color: transparent !important;
    border: 1px solid var(--border-color) !important;
    color: var(--text-main) !important;
    padding: 0.4rem 1rem !important;
    border-radius: 50px !important;
    font-size: 0.8rem !important;
}

.woocommerce-orders-table__cell-order-actions .button:hover {
    border-color: var(--primary-color) !important;
    color: var(--primary-color) !important;
    background-color: #F9FAFB !important;
}

/* Login / Register */
#customer_login {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
}

@media (max-width: 768px) {
    #customer_login {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

#customer_login .u-column1,
#customer_login .u-column2 {
    width: 100%;
    float: none;
    background: var(--surface-light);
    padding: 2.5rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
}

#customer_login h2 {
    font-size: 1.75rem;
    margin-bottom: 2rem;
    text-align: center;
}

/* =========================================
   Order Received (Thank You) Styling
   ========================================= */
.woocommerce-order {
    max-width: 800px;
    margin: 0 auto;
    background: var(--surface-light);
    padding: 3rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    text-align: center;
}

.woocommerce-thankyou-order-received {
    font-size: 1.5rem;
    color: #10B981;
    font-weight: 700;
    margin-bottom: 2rem;
}

.woocommerce-order-overview {
    display: flex;
    justify-content: center;
    gap: 3rem;
    list-style: none;
    padding: 0;
    margin-bottom: 3rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 2rem;
}

.woocommerce-order-overview li {
    text-transform: uppercase;
    font-size: 0.85rem;
    color: var(--text-sub);
    letter-spacing: 0.05em;
}

.woocommerce-order-overview li strong {
    display: block;
    font-size: 1.25rem;
    color: var(--text-main);
    margin-top: 0.5rem;
    text-transform: none;
}

@media (max-width: 768px) {
    .woocommerce-order-overview {
        flex-direction: column;
        gap: 1.5rem;
    }
}

.woocommerce-order-details {
    text-align: left;
}

/* =========================================
   Side Drawer / Floating Cart Styling
   ========================================= */

/* Backdrop */
.drawer-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1045;
    opacity: 0;
    transition: opacity 0.3s ease;
    display: none;
    backdrop-filter: blur(2px);
    /* Premium feel */
}

/* Drawer Container */
.side-drawer {
    position: fixed;
    top: 0;
    right: 0;
    height: 100%;
    width: 420px;
    max-width: 90vw;
    background-color: #fff;
    z-index: 1050;
    box-shadow: -4px 0 24px rgba(0, 0, 0, 0.15);
    transform: translateX(100%);
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    /* Modern border radius only on left side */
    border-top-left-radius: 20px;
    border-bottom-left-radius: 20px;
    overflow: hidden;
    /* Ensure content respects radius */
}

/* Open State handled by JS class 'open' */

/* Drawer Content Structure */
.drawer-content {
    display: flex;
    flex-direction: column;
    height: 100%;
    background-color: #fff;
}

/* Header */
.drawer-header {
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    padding: 1.25rem 1.5rem;
    position: sticky;
    top: 0;
    z-index: 10;
}

.drawer-header h5 {
    font-family: 'Outfit', sans-serif;
    /* Assuming font is loaded or falls back */
    font-weight: 700;
    color: #111;
    font-size: 1.25rem;
}

.drawer-header .btn-close {
    opacity: 0.5;
    transition: opacity 0.2s, transform 0.2s;
}

/* =========================================
   Single Product Page Styling
   ========================================= */

/* Breadcrumbs */
.custom-breadcrumb {
    font-size: 0.9rem;
    color: var(--text-sub);
}

.custom-breadcrumb a {
    color: var(--text-sub);
    text-decoration: none !important;
    transition: color 0.2s;
}

.custom-breadcrumb a:hover {
    color: var(--primary-color);
}

.custom-breadcrumb .breadcrumb-item+.breadcrumb-item::before {
    display: none;
    /* We use custom delimiter */
}

/* Reviews Section */
#reviews {
    background: var(--surface-light);
    border-radius: var(--radius-lg);
    border: none !important;
    /* Override default border if any */
}

/* Review Form & Comments */
#reviews .commentlist {
    padding: 0;
    list-style: none;
}

#reviews .commentlist li.review {
    margin-bottom: 2rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 2rem;
    display: flex;
    gap: 1.5rem;
}

#reviews .commentlist li.review:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

#reviews .comment_container {
    width: 100%;
}

#reviews img.avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    background: #f1f1f1;
    padding: 0;
    border: none;
}

#reviews .meta {
    font-size: 0.85rem;
    color: var(--text-sub);
    margin-bottom: 0.5rem;
    display: block;
}

#reviews .meta strong {
    font-size: 1rem;
    color: var(--text-main);
    font-weight: 700;
    margin-right: 0.5rem;
}

#reviews .description {
    line-height: 1.6;
    color: var(--text-main);
}

#reviews .star-rating {
    float: right;
    color: #FBBF24;
    /* Amber-400 */
}

/* Review Form */
#review_form_wrapper {
    background: #F9FAFB;
    padding: 2rem;
    border-radius: var(--radius-lg);
    margin-top: 3rem;
}

#review_form_wrapper h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
}

#review_form_wrapper label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    font-size: 0.9rem;
}

/* Related Products Swiper overrides */
.related-products-swiper {
    padding-bottom: 3rem;
    /* Space for shadow/overflow if needed */
}

/* FAQ Accordion Styling */
#productFaqAccordion .accordion-item {
    border: 1px solid transparent;
    transition: all 0.2s;
}

#productFaqAccordion .accordion-item:hover,
#productFaqAccordion .accordion-item:has(.accordion-button:not(.collapsed)) {
    background-color: #fff !important;
    box-shadow: var(--shadow-sm);
    border-color: var(--border-color);
}

#productFaqAccordion .accordion-button {
    padding: 1.25rem 1.5rem;
    font-size: 1rem;
    color: var(--text-main);
    background-color: transparent;
    box-shadow: none;
}

#productFaqAccordion .accordion-button:not(.collapsed) {
    color: var(--primary-color);
    background-color: transparent;
    /* Keep transparent, item bg handles it */
    box-shadow: none;
}

#productFaqAccordion .accordion-button:focus {
    box-shadow: none;
    border-color: rgba(0, 0, 0, 0.1);
}

#productFaqAccordion .accordion-button::after {
    filter: grayscale(1);
    opacity: 0.5;
    transition: all 0.2s;
}

#productFaqAccordion .accordion-button:not(.collapsed)::after {
    filter: none;
    /* Use primary color if icon allows, or custom svg */
    opacity: 1;
    transform: rotate(180deg);
}

#productFaqAccordion .accordion-body {
    padding: 0 1.5rem 1.5rem 1.5rem;
    line-height: 1.6;
}

/* Body / Cart Items */
.drawer-body {
    flex-grow: 1;
    overflow-y: auto;
    padding: 0;
    /* Let list items control padding */
}

/* WooCommerce Mini Cart Overrides inside Drawer */
.drawer-body .woocommerce-mini-cart {
    padding: 0;
    margin: 0;
}

.drawer-body .woocommerce-mini-cart-item {
    padding: 1.5rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    transition: background-color 0.2s;
    flex-direction: column;
}

.drawer-body .woocommerce-mini-cart-item:hover {
    background-color: #f9f9f9;
}

.drawer-body .woocommerce-mini-cart-item img {
    width: 72px;
    height: 72px;
    object-fit: cover;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    margin: 0 !important;
    /* Override WOo defaults */
}

.drawer-body .woocommerce-mini-cart-item a:not(.remove) {
    font-weight: 600;
    color: #111;
    text-decoration: none;
    font-size: 0.95rem;
    line-height: 1.4;
    display: block;
    margin-bottom: 0.25rem;
}

.drawer-body .woocommerce-mini-cart-item .quantity {
    display: block;
    font-size: 0.85rem;
    color: #666;
    border: none;
    margin: 0;
}

.drawer-body .woocommerce-mini-cart-item .remove {
    position: absolute;
    /* Relative position might be better or flex order */
    /* Let's try simple flex ordering or absolute top-right */
}

/* Better Remove Button Placement */
.drawer-body .woocommerce-mini-cart-item {
    position: relative;
    padding-right: 2.5rem;
    /* Make room for remove icon currently often absolute */
}

.drawer-body .woocommerce-mini-cart-item .remove {
    top: 1.5rem;
    right: 1.5rem;
    background: #f1f1f1 !important;
    color: #999 !important;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    line-height: 1;
    transition: all 0.2s;
}

.drawer-body .woocommerce-mini-cart-item .remove:hover {
    background: #FF4d4f !important;
    color: white !important;
}

/* Empty Cart State */
.woocommerce-mini-cart__empty-message {
    padding: 3rem 1.5rem;
    text-align: center;
    color: #666;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.woocommerce-mini-cart__empty-message::before {
    content: 'shopping_bag';
    /* Material Icon ligature */
    font-family: 'Material Icons Outlined';
    font-size: 4rem;
    opacity: 0.2;
}

/* Footer & Buttons */
.drawer-footer {
    background-color: #fff;
    padding: 1.5rem;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.02);
}

.drawer-footer .total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 0;
    border: none;
}

.drawer-footer .total strong {
    font-weight: 500;
    color: #666;
    font-size: 1rem;
}

.drawer-footer .total .amount {
    font-weight: 700;
    color: #111;
    font-size: 1.25rem;
}

.drawer-footer .woocommerce-mini-cart__buttons {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.75rem;
}

.drawer-footer .button {
    width: 100%;
    text-align: center;
    padding: 1rem !important;
    border-radius: 0 !important;
    /* Soft pills */
    font-size: 1rem !important;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    font-weight: 600 !important;
}

.drawer-footer .button.checkout {
    background-color: #111;
    color: white;
    order: 1;
    /* Checkout first */
}

.drawer-footer .button.checkout:hover {
    background-color: #333;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.drawer-footer .button:not(.checkout) {
    background-color: transparent;
    color: #111;
    border: 1px solid #e5e5e5;
    order: 2;
    /* View cart second */
}

.drawer-footer .button:not(.checkout):hover {
    background-color: #f9f9f9;
    border-color: #d5d5d5;
}

/* =========================================
   Shop / Archive Page Styling
   ========================================= */

/* Sidebar / Widgets */
.shop-sidebar .widget {
    margin-bottom: 2rem;
    border: none;
    padding: 0;
}

.shop-sidebar .widget-title {
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 1.5rem;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.shop-sidebar .widget-title::after {
    content: '';
    flex-grow: 1;
    height: 1px;
    background-color: var(--border-color);
    opacity: 0.5;
}

/* Lists (Categories, et al) */
.shop-sidebar ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.shop-sidebar ul li {
    margin-bottom: 0.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.2s ease;
    border-radius: var(--radius-sm);
}

.shop-sidebar ul li a {
    color: var(--text-sub);
    text-decoration: none;
    transition: all 0.2s;
    font-size: 0.95rem;
    display: block;
    width: 100%;
    padding: 0.5rem 0;
}

.shop-sidebar ul li:hover>a {
    color: var(--primary-color);
    /* padding-left: 0.5rem; */
}

.shop-sidebar ul li .count {
    background: transparent;
    color: var(--text-sub);
    font-size: 0.85rem;
    opacity: 0.7;
    transition: all 0.2s;
}

.shop-sidebar ul li:hover .count {
    opacity: 1;
    color: var(--text-main);
}

/* Product Search */
.woocommerce-product-search {
    position: relative;
}

.woocommerce-product-search input[type="search"] {
    width: 100%;
    padding: 12px 16px;
    padding-right: 48px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    background-color: #F9FAFB;
    transition: all 0.3s ease;
}

.woocommerce-product-search input[type="search"]:focus {
    background-color: #fff;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(24, 90, 204, 0.1);
    outline: none;
}

.woocommerce-product-search button[type="submit"] {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-sub);
    padding: 0;
    cursor: pointer;
    font-size: 0;
    /* Hide default text */
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0;
    transition: background 0.2s;
    background-color: var(--primary-color);
    color: #fff;
    width: 36px;
    height: 36px;
    right: 6px;
    border-radius: 50%;
}

.woocommerce-product-search button[type="submit"]:hover {
    background-color: var(--primary-color);
    color: #fff;
}

.woocommerce-product-search button[type="submit"]::before {
    content: 'search';
    font-family: 'Material Icons Outlined';
    font-size: 1.25rem;
}

/* Price Filter Slider */
.widget_price_filter .price_slider_wrapper .ui-slider-horizontal {
    height: 6px;
    background: #F3F4F6;
    border-radius: 6px;
    border: none;
    margin-bottom: 1.5rem;
}

.widget_price_filter .price_slider_wrapper .ui-slider .ui-slider-range {
    background: var(--primary-color);
    border-radius: 6px;
}

.widget_price_filter .price_slider_wrapper .ui-slider .ui-slider-handle {
    width: 18px;
    height: 18px;
    background: #fff;
    border: 2px solid var(--primary-color);
    border-radius: 50%;
    top: -6px;
    cursor: grab;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s;
}

.widget_price_filter .price_slider_wrapper .ui-slider .ui-slider-handle:active {
    cursor: grabbing;
    transform: scale(1.1);
    background-color: var(--primary-color);
}

.widget_price_filter .price_slider_amount {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap-reverse;
    gap: 1rem;
}

.widget_price_filter .price_label {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-main);
}

.widget_price_filter .button {
    font-size: 0.75rem !important;
    padding: 0.4rem 1rem !important;
    border-radius: 50px !important;
    background-color: var(--text-main) !important;
    color: #fff !important;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600 !important;
}

.widget_price_filter .button:hover {
    background-color: #000 !important;
    transform: translateY(-1px);
}

/* Active Filters */
.widget_layered_nav_filters ul {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.widget_layered_nav_filters ul li {
    background: #EFF6FF;
    border-radius: 50px;
    padding: 0.25rem 0.25rem 0.25rem 0.75rem;
    display: inline-flex;
    align-items: center;
    margin: 0;
    border: 1px solid #DBEAFE;
}

.widget_layered_nav_filters ul li a {
    font-size: 0.85rem;
    color: var(--primary-color);
    background: #fff;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 0.5rem;
    padding: 0;
    opacity: 0.7;
}

.widget_layered_nav_filters ul li a:hover {
    opacity: 1;
    padding: 0;
    background: #EF4444;
    color: #fff;
}

.widget_layered_nav_filters ul li a::before {
    content: 'close';
    font-family: 'Material Icons Outlined';
    font-size: 14px;
}

/* Product Tag Cloud */
.widget_product_tag_cloud .tagcloud,
.widget_tag_cloud .tagcloud {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.widget_product_tag_cloud .tagcloud a,
.widget_tag_cloud .tagcloud a {
    display: inline-block;
    padding: 0.25rem 0.6rem;
    background-color: #F9FAFB;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-sub);
    text-decoration: none;
    font-size: 0.75rem !important;
    /* Override inline styles */
    transition: all 0.2s;
    border-radius: 50px;
}

.widget_product_tag_cloud .tagcloud a:hover,
.widget_tag_cloud .tagcloud a:hover {
    background-color: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
    transform: translateY(-1px);
}

/* Product Grid & Cards */
.product-card {
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(0, 0, 0, 0.05);
}

.product-card .card-img-wrapper img {
    transform: scale(1);
    transition: transform 0.5s ease;
}

.product-card:hover .card-img-wrapper img {
    transform: scale(1.05);
}

.product-card .hover-actions {
    transition: all 0.3s ease;
}

.product-card:hover .hover-actions {
    opacity: 1 !important;
}

.product-card .action-btn {
    opacity: 0;
    transform: translateX(20px);
    transition: all 0.3s ease;
}

.product-card:hover .action-btn {
    opacity: 1;
    transform: translateX(0);
}

.product-card:hover .action-btn:nth-child(2) {
    transition-delay: 0.05s;
}

.product-card:hover .action-btn:nth-child(3) {
    transition-delay: 0.1s;
}

.product-title a {
    background-image: linear-gradient(var(--text-main), var(--text-main));
    background-size: 0% 1px;
    background-repeat: no-repeat;
    background-position: 0 100%;
    transition: background-size 0.3s;
}

.product-card:hover .product-title a {
    background-size: 100% 1px;
}

/* Pagination / Load More */
#load-more-products {
    transition: all 0.3s ease;
    border-width: 2px;
}

#load-more-products:hover {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: #fff;
    box-shadow: 0 4px 12px rgba(24, 90, 204, 0.2);
}

/* Responsive Adjustments */
@media (max-width: 991px) {
    .shop-sidebar {
        margin-bottom: 2rem;
    }
}

/* Category Hero Banner */
.category-hero {
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    /* Fallback gradient if no image */
    background-color: var(--primary-color);
    min-height: 250px;
    display: flex;
    align-items: center;
}

.category-hero-overlay {
    background: linear-gradient(to right, rgba(0, 0, 0, 0.8), rgba(0, 0, 0, 0.4));
    backdrop-filter: blur(2px);
}

.category-hero h1 {
    font-family: inherit;
    font-weight: 800;
    letter-spacing: -0.02em;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.category-hero .lead {
    font-size: 1.1rem;
    font-weight: 400;
    max-width: 600px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

@media (max-width: 768px) {
    .category-hero {
        min-height: 200px;
        padding: 2rem !important;
        /* Override p-5 */
    }

    .category-hero h1 {
        font-size: 2rem;
    }
}

.category-breadcrumb .woocommerce-breadcrumb {
    margin: 0;
    padding: 0;
    font-size: 0.9rem;
}

.category-breadcrumb a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: color 0.2s;
}

.category-breadcrumb a:hover {
    color: #fff;
}

/* =========================================
   Product Categories Widget Styling
   ========================================= */

/* Widget Container */
.widget_product_categories {
    background-color: var(--surface-light);
    border-radius: var(--radius-lg);
    padding: 2rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
}

/* Widget Title */
.widget_product_categories .widget-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-main);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--primary-color);
    display: inline-block;
    width: 100%;
}

/* List Reset */
.widget_product_categories ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.widget_product_categories ul li {
    margin-bottom: 0.75rem;
    position: relative;
    padding: 0;
}

.widget_product_categories ul li:last-child {
    margin-bottom: 0;
}

/* Link Styling */
.widget_product_categories ul li a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    color: var(--text-sub);
    font-weight: 500;
    text-decoration: none;
    border-radius: var(--radius-sm);
    transition: all 0.2s ease-in-out;
    background-color: transparent;
    border: 1px solid transparent;
    /* Prepare for border transition */
}

/* Hover State */
.widget_product_categories ul li a:hover {
    color: var(--primary-color);
    background-color: #F3F4F6;
    /* Light gray hover */
    padding-left: 1.25rem;
    /* Subtle slide effect */
}

/* Active State */
.widget_product_categories ul li.current-cat>a {
    background-color: var(--primary-color);
    color: #ffffff;
    box-shadow: var(--shadow-sm);
    pointer-events: none;
    /* Disable click on active */
}

.widget_product_categories ul li.current-cat>a:hover {
    padding-left: 1rem;
    /* Reset padding shift for active */
}

/* Count Badge */
.widget_product_categories ul li .count {
    background-color: #E5E7EB;
    color: var(--text-sub);
    font-size: 0.75rem;
    padding: 0.2rem 0.6rem;
    border-radius: 999px;
    /* Pill shape */
    font-weight: 600;
    transition: all 0.2s ease;
    margin-left: auto;
    /* Push to right */
}

/* Active Count Badge */
.widget_product_categories ul li.current-cat>a .count {
    background-color: rgba(255, 255, 255, 0.2);
    color: #ffffff;
}

/* Child Categories (Submenus) */
.widget_product_categories ul.children {
    margin-top: 0.75rem;
    margin-left: 1rem;
    padding-left: 1rem;
    border-left: 2px solid var(--border-color);
}

.widget_product_categories ul.children li a {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
}

/* =========================================
   Shop Archive Background
   ========================================= */
body.post-type-archive-product,
body.tax-product_cat,
body.tax-product_tag {
    background-color: var(--background-off-white);
}