/* ===================================
       1. CSS VARIABLES / ROOT STYLES
    =================================== */
    :root {
        --primary-color: #E63E30;
        --secondary-color: #F68B24;
        --dark-color: #333333;
        --light-color: #F8F9FA;
        --text-color: #333333;
        --text-muted: #6c757d;
        --border-color: #E1E1E1;
        --shadow-sm: 0 2px 8px rgba(0,0,0,0.08);
        --shadow-md: 0 5px 15px rgba(0,0,0,0.1);
        --shadow-lg: 0 8px 16px rgba(0,0,0,0.15);
    }

    /* ===================================
       2. LAYOUT COMPONENTS
    =================================== */
    
    /* Banner Section */
    .product-banner {
        position: relative;
        background-size: cover;
        background-position: center;
        padding: 4rem 0;
        margin-bottom: 2rem;
    }
    
    /* CTA Section */
    /* .cta-section {
        background: linear-gradient(rgba(0,0,0,0.8), rgba(0,0,0,0.8)), url('{{ asset('assets/website/images/cta-bg.jpg') }}') center/cover;
        color: white;
        padding: 4rem 0;
        margin-top: 3rem;
    } */
    
    .cta-section h2 {
        font-weight: 700;
        margin-bottom: 1.5rem;
    }
    
    .cta-section .lead {
        margin-bottom: 2rem;
    }

    /* ===================================
       3. FILTER PANEL
    =================================== */
    .filter-panel {
        background-color: #fff;
        border-radius: 8px;
        box-shadow: var(--shadow-sm);
        margin-bottom: 20px;
    }
    
    .filter-heading {
        font-size: 20px;
        font-weight: 600;
        padding: 15px 20px;
        border-bottom: 1px solid #eee;
    }
    
    .filter-section {
        padding: 15px 20px;
        border-bottom: 1px solid #eee;
    }
    
    .filter-section:last-child {
        border-bottom: none;
    }
    
    .filter-title {
        position: relative;
        font-size: 16px;
        font-weight: 600;
        color: var(--dark-color);
        margin-bottom: 15px;
        padding-bottom: 8px;
    }
    
    .filter-title::after {
        content: '';
        position: absolute;
        bottom: 0;
        left: 0;
        width: 30px;
        height: 2px;
        background-color: var(--primary-color);
    }
    
    .form-check-input:checked {
        background-color: var(--primary-color);
        border-color: var(--primary-color);
    }
    
    .filter-toggle {
        background: none;
        border: none;
        color: var(--primary-color);
        cursor: pointer;
        font-size: 14px;
    }

    /* Mobile Filter */
    .mobile-filter-container {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: white;
        z-index: 1000;
        overflow-y: auto;
        padding: 20px;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }
    
    .mobile-filter-container.active {
        transform: translateX(0);
    }
    
    .mobile-filter-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding-bottom: 15px;
        margin-bottom: 20px;
        border-bottom: 1px solid #eee;
    }
    
    .close-filter-btn {
        background: none;
        border: none;
        font-size: 24px;
        cursor: pointer;
    }
    
    .filter-btn {
        background-color: white;
        border: 1px solid #ddd;
        border-radius: 4px;
        padding: 10px 15px;
        font-weight: 500;
        color: #333;
        display: flex;
        align-items: center;
        gap: 8px;
    }

    /* ===================================
       4. PRODUCT CARDS
    =================================== */
    .product-card {
        background-color: white;
        border-radius: 8px;
        overflow: hidden;
        box-shadow: var(--shadow-sm);
        transition: transform 0.3s ease, box-shadow 0.3s ease;
        height: 100%;
        border: none;
        margin-bottom: 20px;
        display: flex;
        flex-direction: column;
    }
    
    .product-card:hover {
        transform: translateY(-5px);
        box-shadow: var(--shadow-md);
    }
    
    .product-img-wrapper {
        position: relative;
        overflow: hidden;
        padding-top: 100%; /* 1:1 Aspect Ratio */
    }
    
    .product-img {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        object-fit: cover;
        transition: transform 0.5s ease;
    }
    
    .product-card:hover .product-img {
        transform: scale(1.05);
    }
    
    .product-info {
        padding: 15px;
        display: flex;
        flex-direction: column;
        flex-grow: 1;
    }
    
    .product-category {
        font-size: 12px;
        color: var(--text-muted);
        margin-bottom: 5px;
    }
    
    .product-title {
        font-size: 16px;
        font-weight: 600;
        margin: 0 0 10px 0;
        line-height: 1.3;
        min-height: 42px;
    }
    
    .product-title a {
        color: var(--dark-color);
        text-decoration: none;
    }
    
    .product-title a:hover {
        color: var(--primary-color);
    }
    
    .product-rating {
        color: #FFB800;
        font-size: 14px;
        margin-bottom: 8px;
    }
    
    .rating-count {
        color: var(--text-muted);
        font-size: 13px;
    }
    
    .product-price {
        font-size: 18px;
        font-weight: 700;
        color: var(--primary-color);
        margin-bottom: 15px;
        display: flex;
        align-items: baseline;
    }
    
    .original-price {
        text-decoration: line-through;
        color: var(--text-muted);
        font-size: 14px;
        margin-left: 8px;
        font-weight: 400;
    }

    /* ===================================
       5. BADGES & ACTION BUTTONS
    =================================== */
    .product-badge {
        position: absolute;
        top: 10px;
        left: 10px;
        background-color: var(--primary-color);
        color: white;
        font-size: 14px;
        font-weight: 600;
        padding: 5px 15px;
        border-radius: 20px;
        z-index: 5;
    }
    
    .product-actions {
        position: absolute;
        top: 10px;
        right: 10px;
        display: flex;
        gap: 5px;
    }
    
    .action-btn {
        width: 36px;
        height: 36px;
        display: flex;
        align-items: center;
        justify-content: center;
        background-color: white;
        border-radius: 50%;
        color: #333;
        text-decoration: none;
        box-shadow: 0 2px 5px rgba(0,0,0,0.1);
        transition: all 0.2s;
    }
    
    .action-btn:hover {
        background-color: var(--primary-color);
        color: white;
    }
    
    .btn-add-to-cart {
        width: 100%;
        padding: 10px;
        background-color: #E63E30;
        color: white;
        border: none;
        border-radius: 4px;
        font-weight: 600;
        text-transform: uppercase;
        transition: all 0.3s;
        font-size: 14px;
        text-align: center;
        text-decoration: none;
        margin-top: auto;
    }
    
    .btn-add-to-cart:hover {
        background-color: #d63226;
        color: white;
    }
    
    .btn-pressed {
        transform: scale(0.95);
    }

    /* ===================================
       6. STOCK INDICATORS
    =================================== */
    .out-of-stock-badge {
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        background-color: rgba(0, 0, 0, 0.8);
        color: white;
        padding: 10px 20px;
        border-radius: 25px;
        font-weight: 600;
        font-size: 14px;
        z-index: 10;
        text-transform: uppercase;
        letter-spacing: 1px;
    }

    .product-card.out-of-stock .product-img-wrapper::after {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: rgba(255, 255, 255, 0.7);
        z-index: 5;
    }

    .btn-secondary:disabled {
        background-color: #6c757d !important;
        border-color: #6c757d !important;
        cursor: not-allowed;
        opacity: 0.8;
    }

    .low-stock-warning {
        color: #ff6b6b;
        font-size: 12px;
        font-weight: 600;
        margin-top: 5px;
    }

    .stock-badge {
        position: absolute;
        bottom: 10px;
        right: 10px;
        background-color: #ff6b6b;
        color: white;
        padding: 5px 10px;
        border-radius: 15px;
        font-size: 12px;
        font-weight: 600;
        z-index: 5;
    }

    /* ===================================
       7. SORT DROPDOWN
    =================================== */
    .sort-dropdown {
        min-width: 180px;
    }
    
    .sort-btn {
        width: 100%;
        text-align: left;
        border: 1px solid #ddd;
        background-color: white;
        color: #333;
        font-weight: 500;
        padding: 10px 15px;
        border-radius: 4px;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }
    
    .sort-dropdown .dropdown-menu {
        width: 100%;
        padding: 0;
        border-radius: 4px;
        margin-top: 5px;
        box-shadow: var(--shadow-md);
        border: 1px solid #eee;
    }
    
    .sort-dropdown .dropdown-item {
        padding: 10px 15px;
        font-size: 14px;
    }
    
    .sort-dropdown .dropdown-item:hover {
        background-color: #f8f9fa;
        color: var(--primary-color);
    }
    
    .sort-dropdown .dropdown-item.active {
        background-color: transparent;
        color: var(--primary-color);
        font-weight: 600;
    }

    /* ===================================
       8. FEATURED PRODUCTS WIDGET
    =================================== */
    .featured-product-item {
        display: flex;
        margin-bottom: 15px;
        transition: transform 0.3s ease;
    }
    
    .featured-product-item:hover {
        transform: translateY(-3px);
    }
    
    .featured-product-img {
        width: 70px;
        height: 70px;
        object-fit: cover;
        border-radius: 5px;
        transition: transform 0.3s ease;
    }
    
    .featured-product-item:hover .featured-product-img {
        transform: scale(1.05);
    }

    /* ===================================
       9. CATEGORY CARDS
    =================================== */
    .category-card {
        position: relative;
        height: 220px;
        overflow: hidden;
        border-radius: 8px;
        box-shadow: var(--shadow-sm);
        transition: transform 0.3s ease;
        margin-bottom: 20px;
    }
    
    .category-card:hover {
        transform: translateY(-5px);
    }
    
    .category-img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        transition: transform 0.5s ease;
    }
    
    .category-card:hover .category-img {
        transform: scale(1.05);
    }
    
    .category-overlay {
        position: absolute;
        bottom: 0;
        left: 0;
        width: 100%;
        padding: 15px;
        background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
        color: white;
    }
    
    .category-title {
        font-weight: 600;
        margin-bottom: 5px;
        color: #fff;
    }
    
    .category-count {
        font-size: 0.875rem;
        opacity: 0.9;
        color: #fff;
    }

    /* ===================================
       10. NOTIFICATIONS & TOASTS
    =================================== */
    .toast-notification {
        position: fixed;
        bottom: 20px;
        right: 20px;
        background-color: white;
        box-shadow: var(--shadow-lg);
        border-radius: 8px;
        padding: 15px 20px;
        display: flex;
        align-items: center;
        justify-content: space-between;
        z-index: 9999;
        max-width: 300px;
        transition: all 0.3s ease;
        transform: translateY(100px);
        opacity: 0;
    }
    
    .toast-content {
        display: flex;
        align-items: center;
    }
    
    .toast-content i {
        font-size: 18px;
        margin-right: 10px;
    }
    
    .toast-close {
        background: none;
        border: none;
        padding: 0;
        margin-left: 10px;
        font-size: 16px;
        cursor: pointer;
    }

    /* ===================================
       11. LAYOUT & GRID
    =================================== */
    .products-grid-mobile {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
        margin-bottom: 1.5rem;
    }

    /* ===================================
       12. PAGINATION
    =================================== */
    .pagination {
        display: flex;
        justify-content: center;
        gap: 5px;
    }
    
    .page-item:first-child .page-link,
    .page-item:last-child .page-link {
        border-radius: 4px;
    }
    
    .page-link {
        border: 1px solid #dee2e6;
        padding: 0.5rem 0.75rem;
        color: var(--dark-color);
        background-color: #fff;
        border-radius: 4px;
    }
    
    .page-item.active .page-link {
        background-color: var(--primary-color);
        border-color: var(--primary-color);
    }
    
    .page-link:hover {
        color: var(--primary-color);
        background-color: #f8f9fa;
    }

    /* ===================================
       13. RESPONSIVE STYLES
    =================================== */
    @media (max-width: 991px) {
        .product-title {
            font-size: 15px;
            min-height: 38px;
        }
        
        .product-price {
            font-size: 16px;
            margin-bottom: 10px;
        }
        
        .btn-add-to-cart {
            padding: 8px;
            font-size: 13px;
        }
        
        .product-badge {
            font-size: 12px;
            padding: 3px 10px;
        }
        
        .product-info {
            padding: 12px;
        }
    }
    
    @media (max-width: 767px) {
        .products-grid-mobile {
            gap: 8px;
        }
        
        .product-title {
            font-size: 14px;
            min-height: 36px;
            margin-bottom: 5px;
        }
        
        .action-btn {
            width: 32px;
            height: 32px;
        }
    }
    /* Fix for product out of stock display */
    .product-img-wrapper {
        position: relative;
    }
    
    .out-of-stock-badge {
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        background-color: rgba(0, 0, 0, 0.7);
        color: white;
        padding: 8px 15px;
        border-radius: 5px;
        font-weight: bold;
        z-index: 2;
        text-align: center;
    }
    
    /* Product card adjustments for mobile */
    @media (max-width: 767px) {
        .product-badge {
            position: absolute;
            top: 10px;
            left: 10px;
            background-color: #C33427;
            color: white;
            padding: 5px 10px;
            border-radius: 3px;
            font-size: 12px;
            font-weight: bold;
            z-index: 2;
        }
        
        .product-actions {
            position: absolute;
            top: 10px;
            right: 10px;
            display: flex;
            flex-direction: column;
            gap: 5px;
            z-index: 2;
        }
        
        .action-btn {
            display: flex;
            align-items: center;
            justify-content: center;
            width: 35px;
            height: 35px;
            background-color: white;
            border-radius: 50%;
            color: #333;
            box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
            text-decoration: none;
            transition: all 0.3s ease;
        }
        
        .action-btn:hover {
            background-color: #C33427;
            color: white;
        }
        
        .product-price {
            display: flex;
            align-items: baseline;
            justify-content: center;
            margin-bottom: 10px;
            font-weight: bold;
            font-size: 18px;
            color: #C33427;
        }
        
        .original-price {
            text-decoration: line-through;
            color: #6c757d;
            font-size: 14px;
            margin-left: 5px;
        }
    }
    
    /* Ensure proper button styling for out of stock products */
    .btn-out-of-stock {
        background-color: #6c757d;
        color: white;
        border: none;
        padding: 10px 15px;
        text-align: center;
        width: 100%;
        border-radius: 4px;
        cursor: not-allowed;
        font-weight: 500;
        transition: all 0.3s ease;
    }