/*
Theme Name: Barkat Store
Theme URI: https://example.com/barkat-store
Author: Antigravity
Author URI: https://google.com
Description: A simple, clean e-commerce theme inspired by major retailers but using a generic, Safe-for-Work color palette. No banners, purely product focused.
Version: 1.8.1
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: flipkart-lite
*/

:root {
    /* Core Palette */
    --primary-color: #024731;
    /* Deep Forest Green */
    --secondary-color: #c59d5f;
    /* Gold */
    --success-color: #10b981;
    --danger-color: #ef4444;

    /* Light Theme (Default) */
    --bg-body: #f3f4f6;
    --bg-card: #ffffff;
    --bg-input: #f9fafb;
    --text-main: #1f2937;
    --text-muted: #4b5563;
    --border-color: #e5e7eb;
    --border-focus: rgba(37, 99, 235, 0.1);
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);

    /* Spacing */
    --container-width: 1200px;
    --header-height: 64px;

    /* Fallbacks */
    --white: #ffffff;
    --black: #000000;
}


/* --- GLOBAL HERO SLIDER --- */
.hero-slider-section {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 2rem;
}

.hero-slider-container {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    -ms-overflow-style: none;
    scroll-behavior: smooth;
}

.hero-slider-container::-webkit-scrollbar {
    display: none;
}

.hero-slide {
    min-width: 100%;
    scroll-snap-align: start;
    position: relative;
    overflow: hidden;
}

.hero-slide img {
    width: 100%;
    display: block;
    height: 550px;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.hero-btn {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    bottom: 30px;
    padding: 12px 30px;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    z-index: 10;
    transition: all 0.3s ease;
    border-radius: 4px;
}

.hero-btn:hover {
    transform: translateX(-50%) translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
    background-color: #1d4ed8;
}

.hero-slider-section .slider-arrow {
    opacity: 0;
    transition: opacity 0.3s ease, background 0.2s, transform 0.2s;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 45px;
    height: 45px;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 20;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.hero-slider-section:hover .slider-arrow {
    opacity: 1;
}

.slider-arrow.prev-hero {
    left: 20px;
}

.slider-arrow.next-hero {
    right: 20px;
}

.slider-arrow:hover {
    background: #fff;
    transform: translateY(-50%) scale(1.1);
}


body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg-body);
    color: var(--text-main);
    line-height: 1.5;
}

.container-xl-custom {
    max-width: 96%;
    margin: 0 auto;
    padding-left: 10px;
    padding-right: 10px;
}

a {
    text-decoration: none;
    color: inherit;
}

/* Utilities (Bootstrap overrides or additions) */
/* .container and .btn are handled by Bootstrap now */

/* Custom Button Enhancement */
.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-primary:hover {
    background-color: #1d4ed8;
    border-color: #1d4ed8;
}


.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
}

.site-logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--white);
    font-style: italic;
}

.site-logo span {
    color: var(--secondary-color);
    font-style: normal;
}

.header-search {
    flex: 1;
    margin: 0 2rem;
    max-width: 600px;
    display: flex;
}

.header-search input {
    width: 100%;
    padding: 0.6rem 1rem;
    border: none;
    border-radius: 2px 0 0 2px;
    font-size: 0.95rem;
}

.header-search button {
    background-color: var(--white);
    /* Or a highlight color */
    border: none;
    padding: 0 1rem;
    border-radius: 0 2px 2px 0;
    cursor: pointer;
    color: var(--primary-color);
}

.header-nav ul {
    display: flex;
    list-style: none;
    gap: 2rem;
    align-items: center;
}

.header-nav a {
    color: var(--white);
    font-weight: 500;
}

/* Product Grid (Flipkart-lite) */
/* Product Grid (Flipkart-lite) - Enforce Grid over Flex */
.woocommerce ul.products.product-grid,
.product-grid {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)) !important;
    gap: 1.5rem !important;
    padding: 1rem 0;
    margin: 0 !important;
}

.woocommerce ul.products.product-grid li.product,
.product-grid li.product {
    width: auto !important;
    /* Reset WC width */
    margin: 0 !important;
    /* Reset WC margins */
    /* Reset floats */
}

/* Fix: Remove WC clearfix pseudo-elements from Grid Layout */
.woocommerce ul.products.product-grid::before,
.woocommerce ul.products.product-grid::after,
.product-grid::before,
.product-grid::after {
    content: none !important;
    display: none !important;
}

/* WooCommerce Overrides (Minimal) */
.woocommerce ul.products li.product {
    background: var(--white);
    padding: 1rem;
    border-radius: 4px;
    transition: box-shadow 0.2s;
    text-align: center;
}

.woocommerce ul.products li.product:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.woocommerce ul.products li.product img {
    margin-bottom: 1rem;
    height: 200px !important;
    /* Fixed height for alignment */
    width: 100%;
    /* Full width */
    object-fit: contain;
    /* Prevent stretching */
}

/* Fix: Flex Layout for Product Card to align buttons - Global apply */
ul.products li.product .product-inner,
.woocommerce ul.products li.product .product-inner {
    display: flex !important;
    flex-direction: column;
    height: 100%;
}

ul.products li.product .woocommerce-loop-product__title,
.woocommerce ul.products li.product .woocommerce-loop-product__title {
    font-size: 1rem;
    font-weight: 500;
    margin-top: 1rem !important;
    /* Added spacing between image and title */
    margin-bottom: 0.5rem;
    color: var(--text-main);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    height: 3em !important;
    /* Slightly increased to prevent clipping */
    line-height: 1.4 !important;
    text-overflow: ellipsis;
}

ul.products li.product .price,
.woocommerce ul.products li.product .price {
    color: var(--text-main);
    font-weight: 700;
    font-size: 1.1rem;
    display: flex !important;
    flex-wrap: nowrap !important;
    /* Force single line */
    align-items: center;
    justify-content: center;
    gap: 8px;
    /* Proper gap */
    margin-bottom: 0.5rem;
    line-height: 1.2;
    min-height: 1.5em;
}

ul.products li.product .price del,
.woocommerce ul.products li.product .price del {
    font-weight: 400;
    opacity: 0.6;
    font-size: 0.9em;
    display: inline-block !important;
    /* Force display */
    width: auto !important;
    /* Prevent full width */
    text-decoration: line-through;
    color: #6b7280 !important;
    /* Visible gray */
    margin: 0 !important;
    /* Reset margins */
    visibility: visible !important;
    /* Extra force */
}

ul.products li.product .price ins,
.woocommerce ul.products li.product .price ins {
    background: none;
    text-decoration: none;
    display: inline-block !important;
    width: auto !important;
    /* Prevent full width */
    color: var(--text-main);
    font-weight: 700;
    margin: 0 !important;
    /* Reset margins */
}

/* Push Add to Cart button to bottom */
/* Push Add to Cart button to bottom - Hide Standard Buttons ONLY */
ul.products li.product .button:not(.hover-cart-btn),
ul.products li.product .added_to_cart:not(.hover-cart-btn),
.woocommerce ul.products li.product .button:not(.hover-cart-btn),
.woocommerce ul.products li.product .added_to_cart:not(.hover-cart-btn) {
    margin-top: auto !important;
    width: 100%;
    /* Ensure full width button */
    display: none !important;
    /* Force hide standard buttons */
}

/* --- Animations --- */
@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-up {
    animation: fadeUp 0.6s ease-out forwards;
}

@keyframes bounce {

    0%,
    20%,
    50%,
    80%,
    100% {
        transform: translateY(0);
    }

    40% {
        transform: translateY(-8px);
    }

    60% {
        transform: translateY(-4px);
    }
}

.animate-bounce {
    animation: bounce 2s infinite;
    display: inline-block;
}

/* Promo Banner Details */
.promo-item {
    position: relative;
}

.promo-btn {
    position: absolute;
    bottom: 15px;
    /* Position at bottom left */
    left: 15px;
    padding: 8px 16px;
    font-size: 0.85rem;
    opacity: 0.9;
    transition: all 0.3s;
    z-index: 5;
}

.promo-item:hover .promo-btn {
    opacity: 1;
    transform: translateY(-2px);
}

/* Mobile Responsiveness - Header & Grid */
@media (max-width: 768px) {
    /* Header Styles are now consolidated in the bottom media query block for cleaner management */

    /* Grid Adjustments */
    .product-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem;
    }

    .woocommerce ul.products li.product {
        padding: 0.5rem;
    }

    .category-slider-section {
        margin-top: -1px;
    }

    /* Scrollable Menu */
    .primary-menu-ul {
        display: flex;
        overflow-x: auto;
        padding-bottom: 5px;
        width: 100%;
    }
}

/* Hero slider duplicate properties removed */

/* Professional Product Slider */
.product-slider-wrapper {
    overflow-x: auto;
    padding: 10px 5px 20px 5px;
    /* Padding for shadow breathing room */
    scrollbar-width: thin;
    scrollbar-color: var(--primary-color) #f0f0f0;
    -webkit-overflow-scrolling: touch;
}

ul.products.product-slider {
    display: flex !important;
    gap: 16px;
    margin: 0 !important;
    padding: 0 !important;
}

ul.products.product-slider li.product {
    min-width: 240px;
    /* Widened to match typical grid card better */
    max-width: 240px;

    /* Inherit Visuals from global .woocommerce ul.products li.product */
    /* background, border, radius handled globally now */

    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    position: relative;
    /* No overflow hidden here to allow shadow/lift effect to show */
    margin-right: 15px;
    /* Spacing between slides */
    padding: 0 !important;
}

/* Ensure images fit well in the slider card */
ul.products.product-slider li.product img {
    height: 200px;
    /* Fixed height for alignment */
    width: 100%;
    object-fit: contain;
    margin-bottom: 1rem;
}

/* --- Global Product Card Styling & Animation --- */
ul.products li.product,
.product-slider li.product,
#wishlist-container ul.products li.product {
    padding: 0 !important;
    /* Reset outer padding, use .product-inner for spacing */
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    position: relative;
    list-style: none !important;
}

/* The actual "Card" wrapper */
ul.products li.product .product-inner,
.product-inner {
    background: #ffffff !important;
    border: 1px solid #f0f0f0 !important;
    border-radius: 8px !important;
    padding: 1rem !important;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04) !important;
    overflow: hidden;
}

/* Consistent Hover Effect for ALL products */
.woocommerce ul.products li.product:hover .product-inner,
li.product:hover .product-inner {
    transform: translateY(-5px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.08) !important;
    border-color: #e5e7eb !important;
    z-index: 5;
}

/* Image Zoom (Global) */
ul.products li.product .product-image-wrapper img,
.product-image-wrapper img {
    transition: transform 0.5s ease;
}

.woocommerce ul.products li.product:hover .product-image-wrapper img,
li.product:hover .product-image-wrapper img {
    transform: scale(1.08);
}

/* --- Add to Cart Bar Style (Global - Normal Flow) --- */
.hover-cart-btn {
    width: 100% !important;
    height: 48px !important;
    border-radius: 4px !important;
    /* Slight radius for better look outside image */
    background-color: var(--primary-color) !important;
    position: relative !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin: 10px 0 !important;
    /* Space between image and title */
    z-index: 5 !important;
    opacity: 1 !important;
    visibility: visible !important;
    transition: all 0.3s ease;
}

.hover-cart-btn:hover {
    background-color: #013323 !important;
}

.hover-cart-btn svg {
    width: 24px !important;
    height: 24px !important;
    stroke: #ffffff !important;
    fill: none !important;
}


/* --- Arrow Visibility Fix --- */
.slider-arrow {
    background: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    /* Stronger shadow */
    z-index: 50;
    /* Ensure visible */
    opacity: 0.9;
}

.cat-slider-wrapper {
    position: relative;
    /* Context for arrows */
}

/* Promo Banner Hover */
.hover-scale {
    overflow: hidden;
    border-radius: 8px;
    /* Ensure rounded corners */
}

.hover-scale img {
    transition: transform 0.3s ease;
    height: 180px;
    /* Reduced fixed height for professional look */
    width: 100%;
    object-fit: cover;
    /* Crop to fit */
}

.hover-scale:hover img {
    transform: scale(1.03);
    /* Subtle zoom effect */
}

/* Title Styling */
ul.products.product-slider li.product .woocommerce-loop-product__title {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-main);
    line-height: 1.4;
    margin-bottom: 8px;

    /* Line Clamp 2 lines */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    height: 2.8em;
    /* Force height for alignment */
    text-overflow: ellipsis;
}

/* Price Styling */
ul.products.product-slider li.product .price {
    font-size: 1.1rem;
    font-weight: 700;
    color: #111;
    margin-top: auto;
    /* Push to bottom */
}

ul.products.product-slider li.product .price del {
    color: #9ca3af;
    font-weight: 400;
    font-size: 0.85rem;
    margin-right: 5px;
}

/* Button/Add to Cart Styling (If visible) */
ul.products.product-slider li.product .button {
    margin-top: 10px;
    background: var(--primary-color);
    color: #fff;
    font-size: 0.85rem;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    width: 100%;
    transition: background 0.2s;
}

ul.products.product-slider li.product .button:hover {
    background: #1d4ed8;
}

/* Mobile Adjustments */
@media (max-width: 991px) {

    /* Tablet Layout Adjustments */
    :root {
        --container-width: 100%;
        --header-height: auto;
    }

    .site-header .container {
        padding: 0.5rem 1rem;
    }

    .hero-slide img {
        height: 350px !important;
        /* Intermediate height for tablets */
    }
}

@media (max-width: 768px) {

    /* 1. Header & Layout */
    .site-header {
        height: auto;
        padding: 0.5rem 0;
    }

    .header-inner {
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .site-logo {
        font-size: 1.25rem;
        /* Smaller logo on mobile */
    }

    /* Search bar takes full width on new line */
    .header-search {
        width: 100%;
        margin: 0.5rem 0;
        order: 3;
        flex-basis: 100%;
    }

    /* User actions (Cart, Login) align to right */
    .header-nav {
        order: 2;
        margin-left: auto;
    }

    /* 2. Slider Cards Mobile */
    ul.products.product-slider li.product {
        min-width: 150px;
        max-width: 150px;
        width: 45vw;
        /* Responsive half-screen approx */
        padding: 8px !important;
    }

    ul.products.product-slider li.product img {
        height: 140px;
    }

    ul.products.product-slider li.product .woocommerce-loop-product__title {
        font-size: 0.85rem;
        height: 2.4em;
        /* compressed height */
    }

    ul.products.product-slider li.product .price {
        font-size: 0.95rem;
    }

    /* Hero Slider Mobile Height */
    .hero-slide img {
        height: 200px !important;
        /* Smaller height for mobile */
    }

    .hero-btn {
        padding: 8px 16px;
        font-size: 0.8rem;
        bottom: 15px;
    }

    /* 3. Slider Arrows on Mobile */
    .slider-arrow {
        display: flex !important;
        /* Force Show */
        width: 30px;
        height: 30px;
        font-size: 1rem;
        opacity: 0.8;
    }

    .slider-arrow.prev {
        left: -5px;
    }

    .slider-arrow.next {
        right: -5px;
    }

    /* Category specific arrows mobile placement */
    .slider-arrow.prev-cat {
        left: -5px;
    }

    .slider-arrow.next-cat {
        right: -5px;
    }

    /* 4. General Spacing */
    .container-xl-custom {
        padding-left: 5px !important;
        padding-right: 5px !important;
    }
}

/* --- Professional Trust Section --- */
.trust-section {
    background: #fff;
    border-top: 1px solid #e5e7eb;
    border-bottom: 1px solid #e5e7eb;
}

.trust-item {
    padding: 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    color: #374151;
}

.trust-icon {
    width: 48px;
    height: 48px;
    margin-bottom: 0.5rem;
    color: var(--primary-color);
    background: #eff6ff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.trust-title {
    font-weight: 600;
    margin-bottom: 0.25rem;
    font-size: 0.95rem;
}

.trust-desc {
    font-size: 0.8rem;
    color: #6b7280;
}

/* --- Slider Arrows --- */
.slider-container-relative {
    position: relative;
}

.slider-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #fff;
    border: 1px solid #e5e7eb;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 20;
    transition: all 0.2s;
    font-size: 1.2rem;
    line-height: 1;
    color: #374151;
}

.slider-arrow:hover {
    background: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
}

.slider-arrow.prev {
    left: -15px;
}

.slider-arrow.next {
    right: -15px;
}

.slider-arrow.prev-cat {
    left: -10px;
}

.slider-arrow.next-cat {
    right: -10px;
}

/* Hide scrollbar but allow scroll */
.product-slider-wrapper {
    scrollbar-width: none !important;
}

.product-slider-wrapper::-webkit-scrollbar {
    display: none !important;
}

/* --- Category Slider Native Scrolling --- */
.category-slider-wrapper {
    width: 100% !important;
    overflow: visible !important;
    /* Allow the inner scroll to handle everything */
}

.category-slider-container {
    display: flex !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    -webkit-overflow-scrolling: touch !important;
    /* Vital for iOS */
    touch-action: pan-x !important;
    /* Essential for touch devices */
    gap: 15px !important;
    padding: 12px 10px !important;
    width: 100% !important;
    scrollbar-width: none !important;
    -ms-overflow-style: none !important;
}

.category-slider-container::-webkit-scrollbar {
    display: none !important;
}

.cat-item-wrapper {
    flex: 0 0 auto !important;
    min-width: 80px !important;
    /* Force overflow */
    max-width: 110px !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
}


/* --- Professional My Account / Dashboard Styles --- */

/* 1. Dashboard Grid Layout (Horizontal Tabs Refactor) */
.woocommerce-account .woocommerce {
    display: flex;
    flex-direction: column;
    /* Stack vertically: Nav on top, Content below */
    gap: 1.5rem;
}

/* Navigation Container */
.woocommerce-account .woocommerce-MyAccount-navigation {
    flex: 0 0 auto;
    width: 100%;
    max-width: 100%;
}

@media (min-width: 992px) {
    .woocommerce-account .woocommerce-MyAccount-navigation {
        flex: 0 0 auto;
        max-width: 100%;
        margin-bottom: 1rem;
    }

    .woocommerce-account .woocommerce-MyAccount-content {
        flex: 1;
        width: 100%;
    }
}

/* Nav Item Styling (Horizontal Bar) */
.woocommerce-MyAccount-navigation ul {
    list-style: none;
    padding: 0;
    margin: 0;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    display: flex;
    /* Horizontal alignment */
    overflow-x: auto;
    /* Scrollable if too many items */
    white-space: nowrap;
    border: 1px solid #f3f4f6;
}

.woocommerce-MyAccount-navigation ul li {
    border-bottom: none;
    border-right: 1px solid #f3f4f6;
    /* Separators */
    flex: 1;
    /* Distribute space */
    text-align: center;
}

.woocommerce-MyAccount-navigation ul li:last-child {
    border-right: none;
}

.woocommerce-MyAccount-navigation ul li a {
    display: block;
    padding: 1rem 1.5rem;
    color: #4b5563;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s;
    border-bottom: 3px solid transparent;
    /* Bottom active indicator */
}

.woocommerce-MyAccount-navigation ul li a:hover {
    background: #f9fafb;
    color: var(--primary-color);
    padding-left: 1.5rem;
    /* Reset padding shift from previous Sidebar style */
}

/* Active State Highlighting */
.woocommerce-MyAccount-navigation ul li.is-active a {
    background: #eff6ff;
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}


/* Content Area Styling */
.woocommerce-account .woocommerce-MyAccount-content {
    background: #fff;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

/* Headings */
.woocommerce-account h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: #111;
}

/* Forms (Address, etc) */
.woocommerce-EditAccountForm fieldset,
.woocommerce-address-fields__field-wrapper {
    background: #f9fafb;
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
}

/* Orders Table Professionalism */
.woocommerce-orders-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.woocommerce-orders-table th {
    background: #f3f4f6;
    padding: 1rem;
    font-weight: 600;
    text-align: left;
}

.woocommerce-orders-table td {
    border-bottom: 1px solid #f3f4f6;
    padding: 1rem;
    vertical-align: middle;
}

.woocommerce-orders-table__cell-order-actions .button {
    padding: 0.4rem 0.8rem;
    font-size: 0.85rem;
    background: #fff;
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
    border-radius: 4px;
}


/* --- FINAL FIXES V1.4.4 --- */

/* 1. Category Slider Arrow Positioning */
.slider-arrow.prev-cat {
    left: -10px;
    /* Slight overlap */
    top: 50%;
    transform: translateY(-50%);
}

.slider-arrow.next-cat {
    right: -10px;
    top: 50%;
    transform: translateY(-50%);
}

/* 2. FORCE Sale Badge to Top Left relative to Card */
/* Ensure the card is relative positioning context */
ul.products li.product,
.woocommerce ul.products li.product,
ul.products.product-slider li.product {
    position: relative !important;
    overflow: visible !important;
    /* Allow badge to sit on edge if needed */
}

/* The Badge Itself */
span.onsale,
.woocommerce span.onsale,
ul.products.product-slider li.product .onsale {
    top: 0 !important;
    left: 0 !important;
    right: auto !important;
    bottom: auto !important;
    margin: 0 !important;
    position: absolute !important;

    /* Design */
    background: #26a541 !important;
    /* Green */
    color: #fff !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    padding: 4px 8px !important;
    border-radius: 4px 0 8px 0 !important;
    z-index: 99 !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1) !important;
    line-height: 1 !important;
    min-height: auto !important;
    width: auto !important;
    display: block !important;
}


/* --- PROFESSIONAL CART & CHECKOUT STYLES (V1.4.7) --- */

/* --- 1. Cart Page Styling --- */
/* Increase Width for Cart Page */
.woocommerce-cart .container {
    max-width: 95% !important;
}

.woocommerce-cart .woocommerce {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
}

/* Cart Table Container */
.woocommerce-cart .woocommerce-cart-form {
    flex: 1 1 65%;
    /* Take up 65% width */
    background: #fff;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.02);
    border: 1px solid #e5e7eb;
}

/* Cart Tabular Data */
.shop_table.cart {
    border: none !important;
    border-collapse: separate;
    border-spacing: 0 1rem;
    /* Spacing between rows */
}

.shop_table.cart thead {
    background: #f9fafb;
    border-bottom: 2px solid #e5e7eb;
}

.shop_table.cart th {
    padding: 1rem !important;
    font-weight: 600;
    color: #4b5563;
    text-transform: uppercase;
    font-size: 0.85rem;
    border: none;
}

.shop_table.cart tbody tr {
    /* Row styling usually tricky in tables, but we can style cells */
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
    background: #fff;
}

.shop_table.cart td {
    border-top: 1px solid #f3f4f6;
    border-bottom: 1px solid #f3f4f6;
    padding: 1.5rem 1rem !important;
    vertical-align: middle;
}

.shop_table.cart td:first-child {
    border-left: 1px solid #f3f4f6;
    border-top-left-radius: 8px;
    border-bottom-left-radius: 8px;
}

.shop_table.cart td:last-child {
    border-right: 1px solid #f3f4f6;
    border-top-right-radius: 8px;
    border-bottom-right-radius: 8px;
}

/* Product Thumb in Cart */
.shop_table.cart img {
    width: 64px !important;
    height: 64px !important;
    border-radius: 6px;
    object-fit: cover;
}

/* Coupon & Update Cart */
.actions {
    padding: 1.5rem 0 !important;
    background: transparent !important;
    border: none !important;
}

.coupon {
    display: flex;
    gap: 10px;
}

.coupon input {
    border: 1px solid #d1d5db;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    min-width: 200px;
}

/* Cart Totals (Sidebar) */
.cart-collaterals {
    flex: 1 1 30%;
    /* 30% width */
    width: 100%;
}

.cart_totals {
    background: #fff;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    border-top: 4px solid var(--primary-color);
    width: 100% !important;
    float: none !important;
}

.cart_totals h2 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.cart_totals table {
    width: 100%;
    margin-bottom: 1.5rem;
    border: none !important;
}

.cart_totals th,
.cart_totals td {
    padding: 1rem 0;
    border-bottom: 1px solid #e5e7eb;
}

/* Checkout Button - Theme Aware */
.wc-proceed-to-checkout a.checkout-button {
    background-color: var(--primary-color) !important;
    color: #ffffff !important;
    font-weight: 700 !important;
    padding: 1rem 2rem !important;
    /* Larger touch target */
    border: none !important;
    border-radius: 4px !important;
    width: 100%;
    display: block;
    text-align: center;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.wc-proceed-to-checkout a.checkout-button:hover {
    background-color: #1d4ed8 !important;
    /* Slightly darker blue */
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

/* Dark Mode Specific Adjustments for Button */
.dark-mode .wc-proceed-to-checkout a.checkout-button {
    box-shadow: 0 4px 6px rgba(255, 255, 255, 0.05);
    /* Softer shadow in dark */
}

.dark-mode .wc-proceed-to-checkout a.checkout-button:hover {
    box-shadow: 0 6px 12px rgba(255, 255, 255, 0.1);
}

/* --- WooCommerce BLOCKS Cart Button (User Request) --- */
.wc-block-components-button.wc-block-cart__submit-button {
    background-color: #000000 !important;
    /* Black in Light Mode */
    color: #ffffff !important;
    font-weight: 700 !important;
    text-transform: uppercase;
    border-radius: 4px !important;
    transition: all 0.2s ease;
}

.wc-block-components-button.wc-block-cart__submit-button:hover {
    background-color: #333333 !important;
    /* Dark Gray Hover */
    opacity: 1 !important;
}

/* Dark Mode Override for Blocks Button */
.dark-mode .wc-block-components-button.wc-block-cart__submit-button {
    background-color: var(--primary-color) !important;
    /* Blue in Dark Mode */
    color: #ffffff !important;
}

.dark-mode .wc-block-components-button.wc-block-cart__submit-button:hover {
    background-color: #1d4ed8 !important;
    /* Darker Blue Hover */
}

/* My Account - Container Width Increase */
@media (min-width: 992px) {
    .woocommerce-account .container {
        max-width: 90% !important;
    }
}


/* My Account - Mobile Menu (Hamburger Style) */
.account-mobile-menu-toggle {
    display: none;
    /* Hidden on desktop */
    width: 100%;
    background: #fff;
    border: 1px solid #e5e7eb;
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    color: var(--primary-color);
    border-radius: 8px;
    margin-bottom: 0.5rem;
    cursor: pointer;
    align-items: center;
    justify-content: space-between;
}

.account-mobile-menu-toggle:after {
    content: '\2630';
    /* Hamburger Icon */
    font-size: 1.2rem;
}

@media (max-width: 992px) {

    /* Show Toggle Button */
    .account-mobile-menu-toggle {
        display: flex;
    }

    /* Hide Navigation List by Default on Mobile */
    .woocommerce-MyAccount-navigation ul {
        display: none;
        /* Hidden initially */
        flex-direction: column;
        /* Vertical Stack when open */
    }

    /* When Active (Toggled via JS) */
    .woocommerce-MyAccount-navigation ul.active {
        display: flex;
        /* Show vertically */
    }

    .woocommerce-MyAccount-navigation ul li {
        border-right: none;
        border-bottom: 1px solid #f3f4f6;
        text-align: left;
    }
}


/* --- 2. Checkout Page Styling --- */
.woocommerce-checkout .woocommerce {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

/* Left Column: Billing & Shipping */
#customer_details {
    flex: 1 1 60%;
    background: #fff;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

#customer_details h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e5e7eb;
}

/* Form Fields */
.woocommerce-input-wrapper {
    display: block;
}

.woocommerce form .form-row input.input-text,
.woocommerce form .form-row textarea {
    padding: 0.8rem 1rem;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    background: #f9fafb;
    transition: all 0.2s;
}

.woocommerce form .form-row input.input-text:focus,
.woocommerce form .form-row textarea:focus {
    background: #fff;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
    outline: none;
}

.woocommerce form .form-row {
    margin-bottom: 1.5rem;
}

/* Right Column: Order Review */
#order_review_heading {
    display: none;
    /* Hide default heading, we wrap it in box */
}

#order_review {
    flex: 1 1 35%;
    background: #fff;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    /* Stronger shadow */
    border: 1px solid #e5e7eb;
    height: fit-content;
    position: sticky;
    top: 100px;
    /* Sticky sidebar */
}

#order_review table.shop_table {
    border: none;
    margin-bottom: 2rem;
}

#order_review th,
#order_review td {
    border-bottom: 1px solid #e5e7eb;
    padding: 1rem 0;
}

#order_review tfoot th {
    color: #4b5563;
}

#order_review .order-total th,
#order_review .order-total td {
    border-top: 2px solid #e5e7eb;
    font-size: 1.25rem;
    font-weight: 700;
    color: #111;
}

/* Payment Methods */
#payment {
    background: #f9fafb !important;
    border-radius: 4px;
    padding: 1rem;
}

#payment ul.payment_methods {
    border-bottom: 1px solid #e5e7eb;
    padding-bottom: 1rem;
}

#payment div.payment_box {
    background: #fff !important;
    font-size: 0.9rem;
    padding: 1rem !important;
    color: #4b5563;
    border: 1px solid #e5e7eb;
    border-radius: 4px;
    margin-top: 10px;
}

#place_order {
    background: var(--primary-color) !important;
    color: #fff !important;
    font-size: 1.1rem !important;
    font-weight: 700 !important;
    padding: 1.2rem !important;
    width: 100%;
    border-radius: 4px !important;
    margin-top: 1rem;
    transition: background 0.2s;
}

#place_order:hover {
    background: #1d4ed8 !important;
}

/* Mobile Adjustments for Checkout */
@media (max-width: 992px) {

    .woocommerce-cart .woocommerce-cart-form,
    .cart-collaterals,
    #customer_details,
    #order_review {
        flex: 1 1 100%;
        max-width: 100%;
        position: static;
        /* No sticky on mobile */
    }

    .shop_table.cart {
        display: block;
        overflow-x: auto;
    }
}


/* --- Address Book Buttons (Add/Edit) --- */
.woocommerce-Address-title .edit,
header.title .edit,
.woocommerce-address-fields .button {
    background-color: var(--primary-color) !important;
    color: #fff !important;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    display: inline-block;
    border: none !important;
}

.woocommerce-Address-title .edit:hover,
header.title .edit:hover,
.woocommerce-address-fields .button:hover {
    background-color: #013323 !important;
    /* Darker Green shade manually or via opacity */
    opacity: 0.9;
    color: #fff !important;
    text-decoration: none;
}

/* --- Side Panel Mini Cart Styling --- */
.side-cart-body .widget_shopping_cart_content {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.side-cart-body .woocommerce-mini-cart {
    flex-grow: 1;
    overflow-y: auto;
    margin: 0;
    padding: 0;
    list-style: none;
}

.side-cart-body .woocommerce-mini-cart-item {
    display: flex;
    gap: 1rem;
    padding: 1rem 0;
    border-bottom: 1px solid #f3f4f6;
    position: relative;
    align-items: flex-start;
}

/* Remove Item Icon */
.side-cart-body .woocommerce-mini-cart-item a.remove {
    position: absolute;
    top: 10px;
    right: 0;
    background: #fee2e2;
    color: #ef4444 !important;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-size: 1.2rem;
    line-height: 1;
    font-weight: 700;
    z-index: 10;
}

.side-cart-body .woocommerce-mini-cart-item a.remove:hover {
    background: #ef4444;
    color: #fff !important;
}

/* Image */
.side-cart-body .woocommerce-mini-cart-item img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 4px;
    border: 1px solid #e5e7eb;
    margin: 0 !important;
    flex-shrink: 0;
}

/* Title & Meta */
/* Title & Meta */
.side-cart-body .woocommerce-mini-cart-item a:not(.remove) {
    font-weight: 600;
    color: #111;
    text-decoration: none;
    display: flex !important;
    /* Align Image and Text side-by-side */
    align-items: center;
    gap: 12px;
    margin-bottom: 0.25rem;
    line-height: 1.3;
    padding-right: 20px;
    /* Space for remove icon */
    font-size: 0.95rem;
    width: 100%;
}

.side-cart-body .woocommerce-mini-cart-item .quantity {
    display: block;
    font-size: 0.85rem;
    color: #6b7280;
    margin-top: 5px;
}

/* Footer Section (Total + Buttons) */
.side-cart-body .woocommerce-mini-cart__total {
    margin-top: auto;
    padding-top: 1rem;
    border-top: 2px solid #e5e7eb;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 700;
    font-size: 1.1rem;
    margin-bottom: 1rem;
}

.side-cart-body .woocommerce-mini-cart__buttons {
    display: grid;
    gap: 10px;
    margin: 0;
}

.side-cart-body .woocommerce-mini-cart__buttons .button {
    width: 100%;
    text-align: center;
    margin: 0;
    padding: 0.8rem;
    border-radius: 4px;
    font-weight: 600;
    display: block;
}

.side-cart-body .woocommerce-mini-cart__buttons .button.checkout {
    background-color: var(--primary-color) !important;
    color: #fff !important;
}

.side-cart-body .woocommerce-mini-cart__buttons .button.checkout:hover {
    background-color: #013323 !important;
}

.side-cart-body .woocommerce-mini-cart__buttons .button:not(.checkout) {
    background-color: #f3f4f6 !important;
    color: #111 !important;
}

.side-cart-body .woocommerce-mini-cart__buttons .button:not(.checkout):hover {
    background-color: #e5e7eb !important;
}

/* --- Global Product Card Styling & Animation --- */

/* Link covering image */
.woocommerce-LoopProduct-link {
    display: block;
    width: 100%;
    height: 100%;
}

/* --- Mobile & Tablet Optimizations (Touch Devices) --- */
@media (max-width: 1024px) {


    /* MOBILE IMAGE FIX: Flex Centered Square with Safe Zone */
    .woocommerce ul.products li.product img,
    ul.products.product-slider li.product img,
    .product-slider li.product img,
    .recent-drops ul.products li.product img {
        width: auto !important;
        height: auto !important;
        max-width: 90% !important;
        /* Safe zone */
        max-height: 90% !important;
        /* Safe zone */
        object-fit: contain !important;
        margin: 0 auto !important;
        display: block !important;
        min-height: 0 !important;
        aspect-ratio: auto !important;
        /* Let wrapper handle ratio */
    }

    /* Apply Square Aspect Ratio to Wrapper, not Image */
    ul.products li.product .product-image-wrapper,
    .product_slider li.product .product-image-wrapper,
    .product-image-wrapper {
        width: 100% !important;
        aspect-ratio: 1/1 !important;

        /* Force Square Box */
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        margin: 0 !important;
        overflow: hidden !important;
        position: relative !important;
    }

    /* Generic Grid Item Constraint on Mobile */
    /* HARD CLIP: Product Inner Constraint */
    ul.products li.product .product-inner,
    .product-inner {
        overflow: hidden !important;
        width: 100% !important;
        max-width: 100% !important;
        padding: 0.75rem !important;
        box-sizing: border-box !important;
        height: auto !important;
        /* Allow natural height, don't stretch */
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: flex-start !important;
    }

    .woocommerce-loop-product__title {
        font-size: 0.85rem !important;
        line-height: 1.2 !important;
        height: 2.4em !important;
        /* Force 2 lines max height for alignment */
        overflow: hidden !important;
        margin-bottom: 0.5rem !important;
    }

    .price {
        font-size: 0.9rem !important;
        margin-top: 0 !important;
    }

    /* Ensure inner wrapper doesn't push out */
    .woocommerce ul.products li.product .product-image-wrapper,
    .product-image-wrapper {
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
        overflow: hidden !important;
    }

    /* Fix Slider Overflow on Mobile */
    ul.products.product-slider li.product,
    .product-slider li.product {
        width: 160px !important;
        /* Force narrower width on mobile */
        min-width: 160px !important;
        /* Override desktop 240px min-width */
        max-width: 160px !important;
        margin-right: 10px !important;
        padding: 0.25rem !important;
        overflow: hidden !important;
        /* Force Clip */
        box-sizing: border-box !important;
    }

    /* Constrain Wrapper */
    ul.products.product-slider li.product .product-image-wrapper,
    .product-slider li.product .product-image-wrapper {
        width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
        overflow: hidden !important;
    }
}


/* Prevent Price Overflow on Mobile/Tablet */
ul.products li.product .price,
.woocommerce ul.products li.product .price {
    flex-wrap: wrap !important;
    font-size: 0.9rem !important;
    gap: 4px !important;
    white-space: normal !important;
    justify-content: center !important;
    margin-bottom: 0.5rem !important;
    min-height: auto !important;
    /* Allow it to adjust height */
}

/* Tooltip Styling (Title Link) */
.woocommerce-loop-product__title a {
    text-decoration: none !important;
    color: inherit;
    transition: color 0.2s;
}

.woocommerce-loop-product__title a:hover {
    color: var(--primary-color);
}

/* Ensure Checkmark shows on success if standard WC script runs */
.woocommerce ul.products li.product .button.added::before {
    -webkit-mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="black" stroke-width="3" stroke-linecap="round" stroke-linejoin="round"><polyline points="20 6 9 17 4 12"></polyline></svg>') no-repeat center;
    mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="black" stroke-width="3" stroke-linecap="round" stroke-linejoin="round"><polyline points="20 6 9 17 4 12"></polyline></svg>') no-repeat center;
}

.search-result-item:hover {
    background-color: #f9fafb !important;
}

/* --- WISHLIST BUTTON STYLING --- */
.wishlist-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 30px;
    height: 30px;
    background: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 110;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    transition: all 0.2s ease;
}

.wishlist-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.wishlist-btn svg {
    width: 18px;
    height: 18px;
    transition: fill 0.2s, stroke 0.2s;
}

.wishlist-btn.active svg {
    fill: #ef4444 !important;
    stroke: #ef4444 !important;
}


/* 2. Force Buttons to Primary Color */
.single_add_to_cart_button,
.woocommerce ul.products li.product .button:not(.buy-now-btn),
ul.products.product-slider li.product .button:not(.buy-now-btn),
ul.products li.product .add_to_cart_button,
a.button.add_to_cart_button {
    background-color: var(--primary-color) !important;
    color: #ffffff !important;
    border: none !important;
}

.single_add_to_cart_button:hover,
.woocommerce ul.products li.product .button:not(.buy-now-btn):hover,
ul.products.product-slider li.product .button:not(.buy-now-btn):hover,
ul.products li.product .add_to_cart_button:hover,
a.button.add_to_cart_button:hover {
    background-color: #013323 !important;
    /* Darker Green */
    color: #ffffff !important;
}

/* --- MOBILE HEADER & MENU TOGGLE --- */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    color: #fff;
    padding: 0.5rem;
    font-size: 1.5rem;
    line-height: 1;
}

@media (max-width: 991px) {
    .mobile-menu-toggle {
        display: block;
        order: 1;
    }

    .site-logo {
        order: 2;
        margin-right: 0 !important;
        flex-grow: 1 !important;
        justify-content: center;
        text-align: center;
        max-width: 60%;
        /* Prevent logo from pushing icons out */
    }

    /* Header Icon Logic for Mobile/Tablet */
    .header-nav {
        display: block !important;
        visibility: visible !important;
        margin-left: 0 !important;
        flex: 0 0 auto !important;
        order: 3;
    }

    .user-actions-ul {
        display: flex !important;
        align-items: center !important;
        justify-content: flex-end !important;
        list-style: none !important;
        padding: 0 !important;
        margin: 0 !important;
    }

    /* SPECIFICALLY show SHOP icon in mobile header */
    .user-actions-ul li:first-child {
        display: block !important;
        visibility: visible !important;
    }

    .user-actions-ul li:first-child a {
        color: var(--primary-color) !important;
        display: flex !important;
        align-items: center !important;
    }

    .user-actions-ul li:first-child svg {
        width: 24px !important;
        height: 24px !important;
        stroke: var(--primary-color) !important;
        display: block !important;
    }

    /* Hide others in top header */
    .user-actions-ul li:not(:first-child) {
        display: none !important;
    }

    /* PRODUCT IMAGE FIXES FOR MOBILE */
    ul.products li.product .product-image-wrapper,
    .product-slider li.product .product-image-wrapper {
        aspect-ratio: 1/1 !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        background: #fff !important;
        margin-bottom: 0.5rem !important;
        width: 100% !important;
        position: relative;
        overflow: hidden;
    }

    ul.products li.product .product-image-wrapper img,
    .product-slider li.product .product-image-wrapper img {
        max-height: 85% !important;
        max-width: 85% !important;
        object-fit: contain !important;
        width: auto !important;
        height: auto !important;
        display: block !important;
    }



    /* Mobile Side Menu (Overlay) */
    .mobile-side-menu {
        position: fixed;
        top: 0;
        left: -280px;
        width: 280px;
        height: 100%;
        background: #fff;
        z-index: 10000;
        transition: left 0.3s ease;
        box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
        display: flex;
        flex-direction: column;
    }

    .mobile-side-menu.active {
        left: 0;
    }

    .mobile-side-menu-header {
        background: var(--primary-color);
        padding: 1.5rem 1rem;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    .mobile-side-menu-body {
        padding: 1rem;
        flex-grow: 1;
        overflow-y: auto;
    }

    .mobile-side-menu-body ul {
        list-style: none;
        padding: 0;
        margin: 0;
    }

    .mobile-side-menu-body ul li {
        border-bottom: 1px solid #f3f4f6;
    }

    .mobile-side-menu-body ul li a {
        display: block;
        padding: 1rem 0;
        color: #374151;
        font-weight: 500;
        text-decoration: none;
    }

    .mobile-menu-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.5);
        z-index: 9999;
        display: none;
    }

    .mobile-menu-overlay.active {
        display: block;
    }
}

/* 3. Header Styling: WHITE Background for Dark Logo */

.site-header {
    background-color: #ffffff !important;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.05);
    /* Subtle shadow */
    border-bottom: 1px solid #e5e7eb;
}

/* --- SHOP SIDEBAR OPTIMIZATIONS --- */
@media (max-width: 991px) {
    .shop-sidebar {
        display: flex;
        flex-wrap: wrap;
        gap: 1rem;
        margin-bottom: 2rem;
        background: #f8f9fa;
        padding: 1.5rem 1rem;
        border-radius: 12px;
        border: 1px solid #eee;
    }

    .shop-sidebar::before {
        content: "Filters & Sort";
        width: 100%;
        display: block;
        font-weight: 700;
        font-size: 1.1rem;
        margin-bottom: 0.5rem;
        color: var(--primary-color);
    }

    .shop-sidebar .widget {
        flex: 1 1 200px;
        /* Allow widgets to sit side-by-side if room */
        margin-bottom: 0 !important;
        background: #fff !important;
        box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05) !important;
    }
}

@media (min-width: 992px) {
    .shop-sidebar .widget {
        margin-bottom: 1.5rem;
    }
}

/* Category Hidden */
.product_meta .posted_in {
    display: none !important;
}

/* Tags Hidden */
.product_meta .tagged_as {
    display: none !important;
}

/* Ratings Hidden on Cards */
.woocommerce ul.products li.product .star-rating,
ul.products.product-slider li.product .star-rating {
    display: none !important;
}

/* Product Gallery: Grid Layout (Force Thumbs Left) */
.woocommerce div.product div.images.woocommerce-product-gallery {
    display: grid !important;
    grid-template-columns: 18% 80% !important;
    gap: 2% !important;
    align-items: start !important;
    /* Reset any flex interference */
    flex-wrap: nowrap !important;
}

/* Thumbs (Source Order 2) -> Grid Column 1 (Left) */
.woocommerce div.product div.images.woocommerce-product-gallery .flex-control-thumbs {
    grid-column: 1 !important;
    grid-row: 1 !important;
    width: 100% !important;
    display: flex !important;
    flex-direction: column !important;
    margin: 0 !important;
    padding: 0 !important;
    height: auto !important;
    max-height: 600px !important;
    overflow-y: auto !important;
    /* Scroll if too many */
    overflow-x: hidden !important;
}

/* Main Image (Source Order 1) -> Grid Column 2 (Right) */
/* Target wrapper AND the JS-injected viewport */
.woocommerce div.product div.images.woocommerce-product-gallery .woocommerce-product-gallery__wrapper,
.woocommerce div.product div.images.woocommerce-product-gallery .flex-viewport {
    grid-column: 2 !important;
    grid-row: 1 !important;
    width: 100% !important;
    margin: 0 !important;
}

/* FIXED: Force Active Image Visibility (Disable Slider Translate) */
.woocommerce div.product div.images.woocommerce-product-gallery .flex-viewport .woocommerce-product-gallery__wrapper {
    grid-column: auto !important;
    width: 100% !important;
    transform: none !important;
    /* STOP SLIDING OFF SCREEN */
    display: block !important;
    position: relative !important;
    height: auto !important;
}

/* Hide all slides - Restored Logic */
.woocommerce-product-gallery__image {
    display: none !important;
}

/* Show ONLY the active slide */
.woocommerce-product-gallery__image.flex-active-slide {
    display: block !important;
    width: 100% !important;
    opacity: 1 !important;
    animation: fadeIn 0.3s;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}


.woocommerce div.product div.images.woocommerce-product-gallery .flex-control-thumbs li {
    width: 100% !important;
    margin-bottom: 10px !important;
    float: none !important;
    border: 1px solid #e5e7eb;
    border-radius: 4px;
    overflow: hidden;
    cursor: pointer;
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
    min-height: 50px;
}

/* Ensure Image inside thumb is visible */
.woocommerce div.product div.images.woocommerce-product-gallery .flex-control-thumbs li img {
    opacity: 1 !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
}

/* Custom Magnifying Glass Icon Overlay (Visual Cue for Click-to-Zoom) */
.woocommerce div.product div.images.woocommerce-product-gallery .woocommerce-product-gallery__wrapper {
    position: relative !important;
}

.woocommerce div.product div.images.woocommerce-product-gallery .woocommerce-product-gallery__wrapper::after {
    content: '' !important;
    position: absolute !important;
    top: 15px !important;
    right: 15px !important;
    width: 40px !important;
    height: 40px !important;
    background-color: rgba(255, 255, 255, 0.9) !important;
    /* Simple Search/Zoom SVG */
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="%23333" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="11" cy="11" r="8"></circle><line x1="21" y1="21" x2="16.65" y2="16.65"></line><line x1="11" y1="8" x2="11" y2="14"></line><line x1="8" y1="11" x2="14" y2="11"></line></svg>') !important;
    background-repeat: no-repeat !important;
    background-position: center !important;
    border-radius: 50% !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15) !important;
    z-index: 100 !important;
    pointer-events: none !important;
    /* Allow click to pass through to image */
    opacity: 1 !important;
    transition: transform 0.2s ease, opacity 0.2s;
}

.woocommerce div.product div.images.woocommerce-product-gallery .woocommerce-product-gallery__wrapper:hover::after {
    transform: scale(1.1);
    background-color: #fff !important;
}

/* Text & Links -> Primary Green */
.site-header a,
.site-header .site-logo,
.header-nav a,
.user-actions-ul li a,
.site-logo span {
    color: var(--primary-color) !important;
}

/* Keep "store" text Gold if desired, or let it inherit primary. */
.site-logo .text-warning {
    color: var(--secondary-color) !important;
}

/* Search Bar: Light Input, Green Button */
.header-search input {
    background-color: #f3f4f6 !important;
    border: 1px solid #e5e7eb !important;
    color: #111 !important;
}

.header-search input::placeholder {
    color: #9ca3af;
}

.header-search button {
    background-color: var(--primary-color) !important;
    color: #ffffff !important;
}

/* Icons Hover Effect */
.user-actions-ul li a:hover {
    color: var(--secondary-color) !important;
    transform: translateY(-2px);
}

/* Mobile Menu Toggle Color */
.entry-content .account-mobile-menu-toggle {
    color: var(--primary-color);
    border-color: var(--primary-color);
}

/* --- Mobile/Tablet Responsive Gallery --- */
@media (max-width: 991px) {
    .woocommerce div.product div.images.woocommerce-product-gallery {
        display: flex !important;
        flex-direction: column !important;
        grid-template-columns: none !important;
        gap: 10px !important;
    }

    /* 1. Main Image on TOP */
    .woocommerce div.product div.images.woocommerce-product-gallery .woocommerce-product-gallery__wrapper,
    .woocommerce div.product div.images.woocommerce-product-gallery .flex-viewport {
        order: 1 !important;
        width: 100% !important;
    }

    /* 2. Thumbs on BOTTOM (Horizontal Scroll) */
    .woocommerce div.product div.images.woocommerce-product-gallery .flex-control-thumbs {
        order: 2 !important;
        grid-column: auto !important;
        grid-row: auto !important;
        width: 100% !important;
        max-height: none !important;

        display: flex !important;
        flex-direction: row !important;
        overflow-x: auto !important;
        overflow-y: hidden !important;
        gap: 10px !important;
        padding-bottom: 5px !important;
        /* Scrollbar space */
        white-space: nowrap !important;
    }

    .woocommerce div.product div.images.woocommerce-product-gallery .flex-control-thumbs li {
        width: 60px !important;
        /* Fixed modest width */
        min-width: 60px !important;
        height: 60px !important;
        margin-bottom: 0 !important;
        flex-shrink: 0 !important;
    }
}

/* --- Auth Pages (Login/Signup) --- */
.auth-page-container {
    background: #f3f4f6;
    min-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.auth-card {
    background: #ffffff;
    padding: 2.5rem;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    width: 100%;
    max-width: 450px;
}

.auth-card h2 {
    text-align: center;
    margin-bottom: 2rem;
    color: var(--primary-color);
    font-weight: 700;
}

.auth-card .form-group {
    margin-bottom: 1.5rem;
}

.auth-card label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-main);
}

.auth-card input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background: var(--bg-input);
    transition: border-color 0.2s;
}

.auth-card input:focus {
    border-color: var(--primary-color);
    outline: none;
}

.auth-card .error-msg {
    background: #fee2e2;
    color: #b91c1c;
    padding: 1rem;
    border-radius: 4px;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
}

.auth-card .btn {
    width: 100%;
    padding: 0.8rem;
    font-size: 1rem;
}

.container-xl-custom {
    max-width: 96%;
    margin: 0 auto;
    padding-left: 10px;
    padding-right: 10px;
}

/* --- AJAX Search Results --- */
#barkat-search-results {
    top: 100%;
    left: 0;
    z-index: 1000;
    max-height: 400px;
    overflow-y: auto;
    border: 1px solid var(--border-color);
    border-top: none;
}

/* --- Logo Styling --- */
.site-logo-img {
    height: 32px;
    width: auto;
    object-fit: contain;
}

/* --- Buy Now Button --- */
.buy-now-btn {
    background-color: var(--secondary-color) !important;
    color: #fff !important;
    font-weight: bold;
    padding: 0.7rem 1.5rem;
    text-decoration: none;
    border-radius: 4px;
    display: inline-block;
    min-width: 200px;
    text-align: center;
    border: none;
    transition: transform 0.2s, opacity 0.2s;
}

.buy-now-btn:hover {
    opacity: 0.9;
    transform: translateY(-2px);
    color: #fff !important;
}

/* --- Mobile Sticky Footer --- */
.mobile-sticky-footer .small.fw-bold {
    font-size: 10px !important;
}

.mobile-sticky-footer .badge {
    font-size: 9px !important;
    padding: 2px 4px !important;
}

.mobile-sticky-footer a {
    color: var(--text-muted);
}

.mobile-sticky-footer a.active {
    color: var(--primary-color);
}

/* --- HEADER FIXES (FORCED) --- */
.site-header {
    background-color: #ffffff !important;
    border-bottom: 1px solid #e5e7eb !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05) !important;
}

.site-logo,
.site-logo span,
.site-logo a {
    color: var(--primary-color) !important;
    font-style: normal !important;
}

.site-logo-img {
    height: 48px !important;
    width: auto !important;
    object-fit: contain !important;
    display: inline-block !important;
}

.header-search input {
    background-color: #f1f3f6 !important;
    border: 1px solid #e5e7eb !important;
    border-radius: 4px 0 0 4px !important;
}

.header-search button {
    background-color: var(--primary-color) !important;
    color: #ffffff !important;
    border-radius: 0 4px 4px 0 !important;
}

.header-nav a,
.user-actions-ul li a {
    color: var(--primary-color) !important;
    font-weight: 600 !important;
}

.btn-primary.text-white {
    color: #ffffff !important;
}

/* Ensure Login button looks correct */
.site-header .btn-primary {
    background-color: var(--primary-color) !important;
    color: #ffffff !important;
    border: none !important;
    padding: 8px 20px !important;
    font-weight: 700 !important;
    line-height: 1 !important;
}

/* FINAL HEADER POLISH */
.site-header {
    background: #fff !important;
    padding: 0.75rem 0 !important;
    border-bottom: 1px solid #eee !important;
}

.site-logo-img {
    height: 38px !important;
    width: auto !important;
    margin-right: -5px !important;
}

.site-logo {
    color: var(--primary-color) !important;
    font-size: 1.25rem !important;
    letter-spacing: -0.02em;
}

.header-search input {
    background: #f1f3f6 !important;
    border-radius: 4px 0 0 4px !important;
    padding: 0.6rem 1.25rem !important;
    font-size: 0.9rem !important;
}

.header-search button {
    background: var(--primary-color) !important;
    color: #fff !important;
    padding: 0 1.25rem !important;
}

/* Fix for the truncated/bad looking Login button in header */
.site-header .btn-primary {
    background-color: var(--primary-color) !important;
    color: #ffffff !important;
    border-radius: 4px !important;
    padding: 6px 16px !important;
    font-size: 0.9rem !important;
    font-weight: 600 !important;
    border: none !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-height: 36px !important;
}

.user-actions-ul a {
    color: var(--primary-color) !important;
    font-size: 0.9rem !important;
    font-weight: 500 !important;
}

.user-actions-ul svg {
    stroke: var(--primary-color) !important;
}

/* Standardize Header Actions */
.user-actions-ul li {
    display: flex;
    align-items: center;
}

.user-actions-ul .btn-primary {
    min-width: 80px !important;
    white-space: nowrap !important;
}

/* Ensure the text is visible */
.site-header .text-white {
    color: #ffffff !important;
}

/* Mobile Adjustments for Header */
@media (max-width: 768px) {
    .site-logo-img {
        height: 32px !important;
    }

    .site-logo {
        font-size: 1.1rem !important;
    }

    .header-inner {
        min-height: 60px !important;
    }
}

/* FINAL FINAL HEADER POLISH */
#barkat-search-input:focus {
    box-shadow: none !important;
    outline: none !important;
    border-color: #e5e7eb !important;
}

.site-logo {
    font-size: 1.35rem !important;
    white-space: nowrap !important;
}

.site-logo-img {
    height: 42px !important;
    margin-right: 4px !important;
}

.site-header .container {
    max-width: 98% !important;
}

/* --- Cart Page Enhancements --- */
.cart-empty-title {
    color: var(--primary-color) !important;
}

.cart-empty-icon {
    stroke: var(--primary-color) !important;
}

.section-label {
    background-color: var(--primary-color) !important;
    color: #ffffff !important;
    padding: 0.5rem 1.5rem !important;
    border-radius: 4px !important;
    display: inline-block !important;
    font-weight: 700 !important;
}

/* --- Global WooCommerce Theme Overrides --- */
.woocommerce a.button,
.woocommerce button.button,
.woocommerce input.button,
.woocommerce #respond input#submit,
.woocommerce .cart-empty .btn-primary,
.woocommerce-page a.button,
.woocommerce-page button.button,
.woocommerce-page input.button,
.woocommerce-page #respond input#submit,
.woocommerce .return-to-shop a.button {
    background-color: var(--primary-color) !important;
    color: #ffffff !important;
    border: none !important;
    border-radius: 4px !important;
    padding: 10px 25px !important;
    font-weight: 700 !important;
    transition: all 0.3s ease;
    text-decoration: none !important;
}

.woocommerce a.button:hover,
.woocommerce-page a.button:hover {
    background-color: #013323 !important;
    color: #ffffff !important;
}

/* Target the specific products in the empty cart section */
.woocommerce ul.products li.product .button,
.woocommerce-page ul.products li.product .button {
    background-color: var(--primary-color) !important;
    color: #ffffff !important;
    border-radius: 30px !important;
    padding: 8px 20px !important;
    font-size: 0.85rem !important;
    margin-top: 10px !important;
}

/* Force the section label on empty cart page */
h2.section-label {
    background-color: var(--primary-color) !important;
    color: #ffffff !important;
    padding: 10px 30px !important;
    border-radius: 4px !important;
    display: inline-block !important;
    font-size: 1.1rem !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    margin-bottom: 30px !important;
}

.cart-empty-title {
    color: var(--primary-color) !important;
    font-size: 2.5rem !important;
}

.cart-empty-icon {
    color: var(--primary-color) !important;
    stroke: var(--primary-color) !important;
}

/* --- FORCE THEME COLORS ON CART PAGE --- */
.woocommerce-cart .cart-empty h1,
.woocommerce-cart .cart-empty h2,
.woocommerce-cart .cart-empty .section-label {
    color: var(--primary-color) !important;
}

/* Ensure the label has the background as requested */
.woocommerce-cart .section-label {
    background-color: var(--primary-color) !important;
    color: #ffffff !important;
    padding: 12px 30px !important;
    border-radius: 6px !important;
    display: inline-block !important;
    font-size: 1.2rem !important;
    font-weight: 800 !important;
    margin-bottom: 2rem !important;
    box-shadow: 0 4px 10px rgba(2, 71, 49, 0.2) !important;
}

/* Fix product buttons in the 'New in store' section */
.woocommerce-cart .products .product .button,
.woocommerce-cart .products .product .add_to_cart_button {
    background-color: var(--primary-color) !important;
    color: #ffffff !important;
    border: none !important;
    border-radius: 4px !important;
    padding: 10px 20px !important;
    font-weight: 600 !important;
    text-transform: uppercase !important;
    display: inline-block !important;
    width: auto !important;
    min-width: 150px !important;
}

.woocommerce-cart .products .product .button:hover {
    background-color: #013323 !important;
    color: #ffffff !important;
}

/* SVG icons on cart page */
.woocommerce-cart .cart-empty svg {
    stroke: var(--primary-color) !important;
}

/* --- Wishlist Button Styling --- */
.product-image-wrapper {
    position: relative;
    width: 100%;
    overflow: hidden;
    display: block;
}

.aspect-ratio-box {
    aspect-ratio: 1 / 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    border-radius: 4px;
    margin-bottom: 10px;
}