/* ================= PRODUCTS PAGE RESPONSIVE CSS ================= */
/* Enhanced responsive design for the products page */

/* ================= CSS VARIABLES ================= */
:root {
    /* Primary Colors */
    --primary-blue: #3b82f6;
    --primary-cyan: #06b6d4;
    --primary-gradient: linear-gradient(135deg, #3b82f6, #06b6d4);
    
    /* Background Colors */
    --bg-dark: #0f172a;
    --bg-darker: #1e293b;
    --bg-medium: #334155;
    --bg-light: #f8fafc;
    --bg-white: #ffffff;
    
    /* Text Colors */
    --text-primary: #f8fafc;
    --text-secondary: #e2e8f0;
    --text-muted: #94a3b8;
    --text-dark: #1e293b;
    --text-gray: #64748b;
    
    /* Border & Shadow */
    --border-light: rgba(226, 232, 240, 0.8);
    --border-medium: rgba(226, 232, 240, 0.6);
    --shadow-light: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-medium: 0 10px 25px rgba(0, 0, 0, 0.15);
    --shadow-heavy: 0 20px 40px rgba(0, 0, 0, 0.25);
    
    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
    
    /* Border Radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 15px;
    --radius-xl: 20px;
    
    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2rem;
    --spacing-xl: 3rem;
}

/* ================= GLOBAL RESPONSIVE FIXES ================= */
.products-page {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    /* min-height: 100vh;
    padding: 100px 0 40px;
    position: relative; */
}

/* Fix for mobile viewport */
@media (max-width: 768px) {
    .products-page {
        padding: 80px 0 20px;
    }
}

/* ================= PAGE HEADER RESPONSIVE ================= */
.page-header {
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
    color: white;
    padding: 80px 0;
    margin-bottom: 40px;
    position: relative;
    overflow: hidden;
}

.page-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="rgba(255,255,255,0.1)"/><circle cx="75" cy="75" r="1" fill="rgba(255,255,255,0.1)"/><circle cx="50" cy="10" r="0.5" fill="rgba(255,255,255,0.05)"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    opacity: 0.3;
}

.page-header h1 {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 15px;
    text-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    position: relative;
    z-index: 1;
}

.page-header p {
    font-size: 1.2rem;
    opacity: 0.9;
    position: relative;
    z-index: 1;
}

/* Mobile header adjustments */
@media (max-width: 768px) {
    .page-header {
        padding: 60px 0;
        margin-bottom: 30px;
    }
    
    .page-header h1 {
        font-size: 2.2rem;
        margin-bottom: 10px;
    }
    
    .page-header p {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .page-header h1 {
        font-size: 1.8rem;
    }
    
    .page-header p {
        font-size: 0.9rem;
    }
}

/* ================= FILTERS SECTION RESPONSIVE ================= */
.filters-section {
    background: white;
    border-radius: 20px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    border: 1px solid var(--border-light);
    position: sticky;
    top: 100px;
    max-height: calc(100vh - 120px);
    overflow-y: auto;
}

.filter-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 2px solid #f1f5f9;
}

.filter-header h5 {
    margin: 0;
    color: #1e293b;
    font-weight: 700;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.filter-toggle {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    color: #64748b;
    cursor: pointer;
    font-size: 1rem;
    padding: 8px 12px;
    border-radius: 8px;
    transition: all 0.3s ease;
    display: none;
}

.filter-toggle:hover {
    background: #e2e8f0;
    color: #475569;
}

/* Mobile filter toggle */
@media (max-width: 991px) {
    .filters-section {
        position: relative;
        top: auto;
        max-height: none;
        margin-bottom: 20px;
        border-radius: 12px;
        overflow: hidden;
    }
    
    .filter-toggle {
        display: block;
        min-height: 44px;
        min-width: 44px;
        padding: 12px 16px;
        font-size: 1rem;
        border-radius: 8px;
        transition: all 0.3s ease;
        box-shadow: 0 2px 8px rgba(59, 130, 246, 0.2);
    }
    
    .filter-toggle:hover {
        transform: translateY(-1px);
        box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
    }
    
    .filter-form {
        display: none;
        opacity: 0;
        transform: translateY(-10px);
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    }
    
    .filter-form.show {
        display: block;
        opacity: 1;
        transform: translateY(0);
    }
    
    .filter-toggle i {
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        font-size: 1.1rem;
    }
    
    .filter-toggle.active {
        background: linear-gradient(135deg, #1d4ed8, #3b82f6);
        transform: translateY(-1px);
        box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
    }
    
    .filter-toggle.active i {
        transform: rotate(180deg);
    }
    
    /* Enhanced touch targets */
    .btn-product {
        min-height: 44px;
        min-width: 44px;
        padding: 12px 16px;
        font-size: 0.9rem;
        border-radius: 8px;
    }
    
    .filter-group select,
    .filter-group input {
        min-height: 44px;
        padding: 12px 16px;
        font-size: 1rem;
        border-radius: 8px;
    }
    
    .filter-group label {
        font-size: 1rem;
        margin-bottom: 12px;
    }
    
    .filter-option,
    .rating-option {
        min-height: 44px;
        padding: 12px 0;
    }
    
    .filter-option input[type="radio"],
    .rating-option input[type="radio"] {
        width: 20px;
        height: 20px;
        margin-right: 12px;
    }
    
    .filter-option span,
    .rating-option span {
        font-size: 1rem;
    }
}

/* Filter groups responsive */
.filter-group {
    margin-bottom: 25px;
}

.filter-group label {
    display: block;
    font-weight: 600;
    color: #374151;
    margin-bottom: 10px;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.filter-group label i {
    color: #3b82f6;
    width: 16px;
}

/* Form controls responsive */
.filter-group select,
.filter-group input[type="number"],
.filter-group input[type="text"] {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    background: #f8fafc;
}

.filter-group select:focus,
.filter-group input[type="number"]:focus,
.filter-group input[type="text"]:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
    background: white;
}

/* Price range responsive */
.price-range-container {
    background: #f8fafc;
    border-radius: 12px;
    padding: 20px;
    border: 1px solid #e2e8f0;
}

.price-inputs {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-bottom: 15px;
}

.price-inputs input {
    flex: 1;
    background: white;
}

.price-separator {
    color: #64748b;
    font-weight: 600;
    font-size: 1.1rem;
}

/* Mobile price inputs */
@media (max-width: 576px) {
    .price-inputs {
        flex-direction: column;
        gap: 8px;
    }
    
    .price-separator {
        display: none;
    }
}

/* Filter options responsive */
.filter-options {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.filter-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.filter-option:hover {
    background: #f1f5f9;
    border-color: #e2e8f0;
}

.filter-option input[type="radio"] {
    width: 18px;
    height: 18px;
    margin: 0;
    accent-color: #3b82f6;
}

.filter-option span {
    font-size: 0.9rem;
    color: #374151;
    font-weight: 500;
}

/* Rating filter responsive */
.rating-filter {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.rating-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.rating-option:hover {
    background: #f1f5f9;
    border-color: #e2e8f0;
}

.rating-option input[type="radio"] {
    width: 18px;
    height: 18px;
    margin: 0;
    accent-color: #3b82f6;
}

.rating-option .stars {
    display: flex;
    gap: 2px;
    color: #fbbf24;
}

.rating-option span {
    font-size: 0.9rem;
    color: #374151;
    font-weight: 500;
}

/* Filter actions responsive */
.filter-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 25px;
    padding-top: 20px;
    border-top: 2px solid #f1f5f9;
}

.filter-actions button,
.filter-actions a {
    padding: 12px 20px;
    border: none;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 0.95rem;
}

.btn-apply-filter {
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    color: white;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.btn-apply-filter:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.4);
    color: white;
}

.btn-clear-filter {
    background: #f8fafc;
    color: #64748b;
    border: 2px solid #e2e8f0;
}

.btn-clear-filter:hover {
    background: #f1f5f9;
    color: #475569;
    border-color: #cbd5e1;
    text-decoration: none;
}

/* ================= PRODUCTS HEADER RESPONSIVE ================= */
.products-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 20px;
    background: white;
    padding: 20px 25px;
    border-radius: 15px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid var(--border-light);
}

.results-info {
    color: #64748b;
    font-size: 1rem;
    font-weight: 500;
}

.results-info strong {
    color: #1e293b;
    font-weight: 700;
    font-size: 1.1rem;
}

.sort-section {
    display: flex;
    align-items: center;
    gap: 12px;
}

.sort-section label {
    color: #374151;
    font-weight: 600;
    font-size: 0.95rem;
    margin: 0;
}

.sort-section select {
    padding: 10px 15px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    font-size: 0.95rem;
    cursor: pointer;
    background: #f8fafc;
    transition: all 0.3s ease;
    min-width: 180px;
}

.sort-section select:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
    background: white;
}

/* Mobile products header */
@media (max-width: 768px) {
    .products-header {
        flex-direction: column;
        align-items: stretch;
        padding: 15px 20px;
    }
    
    .sort-section {
        width: 100%;
    }
    
    .sort-section select {
        width: 100%;
        min-width: auto;
    }
}

/* ================= NEW DROPDOWN FILTERS & LIST LAYOUT ================= */

/* Filters Toolbar */
.filters-toolbar {
    background: white;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    position: relative;
    overflow: visible;
}

.filters-dropdown-container {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    flex: 1;
    position: relative;
    overflow: visible;
}

.filter-dropdown {
    position: relative;
    min-width: 150px;
    max-width: 100%;
}

.filter-dropdown-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px;
    background: #f8fafc;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    color: #334155;
    transition: all 0.2s ease;
    width: 100%;
}

.filter-dropdown-toggle:hover {
    background: #f1f5f9;
    border-color: #3b82f6;
}

.filter-dropdown.active .filter-dropdown-toggle {
    border-color: #3b82f6;
    background: #eff6ff;
    color: #1d4ed8;
}

.filter-dropdown-content {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    min-width: 280px;
    max-width: 350px;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
    z-index: 1000;
    padding: 16px;
    max-height: 400px;
    overflow-y: auto;
    overflow-x: hidden;
}

.filter-dropdown.active .filter-dropdown-content {
    display: block;
    animation: slideDown 0.2s ease;
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.filter-options, .rating-options {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.filter-option, .rating-option {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 0;
    cursor: pointer;
}

.filter-option input[type="radio"], .rating-option input[type="radio"] {
    width: 16px;
    height: 16px;
    margin: 0;
}

.filter-option label, .rating-option label {
    font-size: 0.9rem;
    color: #475569;
    cursor: pointer;
    margin: 0;
    flex: 1;
}

.filter-option:hover label, .rating-option:hover label {
    color: #1e293b;
}

.price-range-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.price-inputs {
    display: flex;
    align-items: center;
    gap: 8px;
}

.price-inputs input {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 0.9rem;
}

.price-separator {
    color: #6b7280;
    font-weight: 500;
}

.price-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: #6b7280;
}

.filter-actions-top {
    display: flex;
    gap: 10px;
}

.btn-clear-all-filters {
    padding: 10px 16px;
    background: #fee2e2;
    color: #dc2626;
    border: 1px solid #fecaca;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.btn-clear-all-filters:hover {
    background: #fecaca;
    color: #991b1b;
}

/* Active Filters Bar */
.active-filters-bar {
    background: #eff6ff;
    padding: 12px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.active-filters-label {
    font-weight: 600;
    color: #1d4ed8;
    font-size: 0.9rem;
}

.active-filters-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.filter-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: white;
    border: 1px solid #bfdbfe;
    border-radius: 20px;
    font-size: 0.85rem;
    color: #1e40af;
    cursor: pointer;
    transition: all 0.2s ease;
}

.filter-chip:hover {
    background: #fee2e2;
    border-color: #fecaca;
    color: #991b1b;
}

.filter-chip i {
    font-size: 0.75rem;
}

/* Enhanced Products Header */
.products-header-enhanced {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.06);
    margin-bottom: 20px;
}

.header-controls {
    display: flex;
    align-items: center;
    gap: 15px;
}

.view-toggle {
    display: flex;
    gap: 4px;
    background: #f8fafc;
    padding: 4px;
    border-radius: 8px;
}

.view-btn {
    padding: 8px 12px;
    background: transparent;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    color: #64748b;
    transition: all 0.2s ease;
}

.view-btn:hover {
    color: #334155;
}

.view-btn.active {
    background: white;
    color: #3b82f6;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.sort-select {
    padding: 8px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    background: white;
    font-size: 0.9rem;
    color: #374151;
    cursor: pointer;
}

/* List-Style Product Cards */
.products-list-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.product-list-item {
    display: flex;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    border: 1px solid #e5e7eb;
    transition: all 0.3s ease;
    padding: 20px;
    gap: 24px;
}

.product-list-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.12);
    border-color: #3b82f6;
}

.product-list-image {
    flex: 0 0 280px;
    height: 280px;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.product-list-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 15px;
    transition: transform 0.3s ease;
}

.product-list-item:hover .product-list-image img {
    transform: scale(1.05);
}

.wishlist-quick-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: white;
    border: none;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    cursor: pointer;
    color: #64748b;
    font-size: 1.1rem;
    transition: all 0.2s ease;
}

.wishlist-quick-btn:hover {
    color: #ef4444;
    transform: scale(1.1);
}

.wishlist-quick-btn.active {
    color: #ef4444;
}

.wishlist-quick-btn.active i::before {
    content: "\f004";
}

.product-list-details {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.product-list-header .product-brand {
    display: inline-block;
    color: #3b82f6;
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
}

.product-list-header .product-title {
    font-size: 1.3rem;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 8px;
    line-height: 1.4;
}

.product-list-header .product-title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s ease;
}

.product-list-header .product-title a:hover {
    color: #3b82f6;
}

.product-rating {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #fbbf24;
    font-size: 0.95rem;
}

.rating-text {
    color: #64748b;
    font-size: 0.9rem;
    font-weight: 500;
}

.product-list-specs {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.spec-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: linear-gradient(135deg, #f1f5f9, #e2e8f0);
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 500;
    color: #475569;
}

.spec-item i {
    color: #3b82f6;
}

.product-list-description {
    color: #64748b;
    font-size: 0.9rem;
    line-height: 1.6;
}

.product-list-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
    padding-top: 15px;
    border-top: 1px solid #f1f5f9;
}

.product-price-section {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.product-price {
    font-size: 2rem;
    font-weight: 800;
    color: #16a34a;
}

/* Product Listing Discount Pricing Styles */
.pricing-container {
    margin-bottom: 5px;
}

.price-row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 5px;
}

.current-price {
    font-size: 1.8rem;
    font-weight: 800;
    color: #16a34a;
    margin: 0;
}

.original-price {
    font-size: 1.4rem;
    font-weight: 600;
    color: #6b7280;
    text-decoration: line-through;
    margin: 0;
}

.discount-badge {
    background: linear-gradient(135deg, #dc2626, #b91c1c);
    color: white;
    padding: 4px 10px;
    border-radius: 15px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 4px rgba(220, 38, 38, 0.3);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.stock-warning {
    color: #dc2626;
    font-size: 0.85rem;
    font-weight: 600;
}

.product-actions {
    display: flex;
    gap: 10px;
}

.btn-view-details,
.btn-add-to-cart {
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-view-details {
    background: #f8fafc;
    color: #3b82f6;
    border: 2px solid #3b82f6;
}

.btn-view-details:hover {
    background: #3b82f6;
    color: white;
}

.btn-add-to-cart {
    background: linear-gradient(135deg, #22c55e, #16a34a);
    color: white;
    border: none;
}

.btn-add-to-cart:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(34, 197, 94, 0.4);
}

/* Grid View Styles (when toggled) */
.products-grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
}

.products-grid-container .product-list-item {
    flex-direction: column;
    gap: 15px;
}

.products-grid-container .product-list-image {
    flex: none;
    width: 100%;
    height: 280px;
}

.products-grid-container .product-list-footer {
    flex-direction: column;
    gap: 12px;
    align-items: stretch;
}

.products-grid-container .product-actions {
    flex-direction: column;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .filters-toolbar {
        flex-direction: column;
        align-items: stretch;
    }
    
    .filters-dropdown-container {
        flex-direction: column;
    }
    
    .filter-dropdown {
        min-width: 100%;
    }
    
    .product-list-item {
        flex-direction: column;
        gap: 15px;
    }
    
    .product-list-image {
        flex: none;
        width: 100%;
        height: 250px;
    }
    
    .product-list-footer {
        flex-direction: column;
        gap: 12px;
        align-items: stretch;
    }
    
    .product-actions {
        flex-direction: column;
    }
    
    .view-toggle {
        display: none;
    }
    
    .products-header-enhanced {
        flex-direction: column;
        gap: 15px;
        align-items: stretch;
    }
    
    .header-controls {
        justify-content: space-between;
    }
}

@media (max-width: 480px) {
    .filters-toolbar {
        padding: 15px;
    }
    
    .filter-dropdown-content {
        min-width: 100%;
        left: 0;
        right: 0;
    }
    
    .product-list-item {
        padding: 15px;
    }
    
    .product-list-image {
        height: 200px;
    }
    
    .product-price {
        font-size: 1.5rem;
    }
    
    .btn-view-details,
    .btn-add-to-cart {
        padding: 10px 20px;
        font-size: 0.85rem;
    }
}
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}

.product-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.product-image-wrapper {
    position: relative;
    height: 220px;
    background: #f8f9fa;
    overflow: hidden;
}

.product-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 15px;
    transition: transform 0.3s ease;
}

.product-card:hover .product-image {
    transform: scale(1.05);
}

.product-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    color: white;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

.stock-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    color: white;
}

.stock-badge.in-stock {
    background: linear-gradient(135deg, #22c55e, #16a34a);
}

.stock-badge.low-stock {
    background: linear-gradient(135deg, #eab308, #ca8a04);
}

.stock-badge.out-of-stock {
    background: linear-gradient(135deg, #ef4444, #dc2626);
}

.product-body {
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.product-brand {
    color: #3b82f6;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 5px;
}

.product-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 10px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-specs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 15px;
}

.spec-badge {
    background: #f1f5f9;
    color: #475569;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    gap: 5px;
}

.spec-badge i {
    color: #3b82f6;
}

.product-rating {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-bottom: 15px;
    color: #fbbf24;
}

.product-price-section {
    margin-top: auto;
    padding-top: 15px;
    border-top: 1px solid #e2e8f0;
}

.product-price {
    font-size: 1.8rem;
    font-weight: 700;
    color: #3b82f6;
    margin-bottom: 15px;
}

.product-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.btn-product {
    flex: 1;
    min-width: 120px;
    padding: 10px 15px;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    text-align: center;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-quick-view {
    background: linear-gradient(135deg, #6b7280, #4b5563);
    color: white;
    flex: 1;
}

.btn-quick-view:hover {
    background: linear-gradient(135deg, #4b5563, #374151);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(107, 114, 128, 0.4);
    text-decoration: none;
}

.btn-wishlist {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
    flex: 0 0 auto;
    min-width: 45px;
}

.btn-wishlist:hover {
    background: linear-gradient(135deg, #dc2626, #b91c1c);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.4);
    text-decoration: none;
}

.btn-wishlist.active {
    background: linear-gradient(135deg, #ef4444, #dc2626);
}

.btn-wishlist.active i {
    font-weight: 900;
}

.btn-wishlist i {
    transition: all 0.3s ease;
}

.btn-view-details {
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    color: white;
    flex: 1.5;
}

.btn-view-details:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
    color: white;
    text-decoration: none;
}

.btn-add-cart-quick {
    background: linear-gradient(135deg, #22c55e, #16a34a);
    color: white;
    border: 2px solid transparent;
}

.btn-add-cart-quick:hover {
    background: linear-gradient(135deg, #16a34a, #15803d);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(34, 197, 94, 0.4);
    text-decoration: none;
}

.btn-add-cart-quick:disabled {
    background: #94a3b8;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.btn-add-cart-quick.loading {
    opacity: 0.7;
    cursor: wait;
}

.btn-add-cart-quick i.fa-spinner {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* ================= RESPONSIVE BREAKPOINTS ================= */

/* Large screens (1200px and up) */
@media (min-width: 1200px) {
    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
        gap: 30px;
    }
    
    .product-card {
        border-radius: 20px;
    }
    
    .product-image-wrapper {
        height: 250px;
    }
}

/* Medium screens (992px to 1199px) */
@media (max-width: 1199px) and (min-width: 992px) {
    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 25px;
    }
}

/* Small screens (768px to 991px) */
@media (max-width: 991px) {
    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 20px;
    }
    
    .product-image-wrapper {
        height: 200px;
    }
    
    .product-body {
        padding: 15px;
    }
    
    .product-title {
        font-size: 1rem;
    }
    
    .product-price {
        font-size: 1.6rem;
    }
    
    .product-actions {
        flex-direction: column;
        gap: 8px;
    }

    .product-actions .btn-product {
        min-width: 100%;
    }

    .btn-wishlist {
        min-width: 100%;
    }
}

/* Extra small screens (576px to 767px) */
@media (max-width: 767px) {
    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
        gap: 15px;
    }
    
    .product-image-wrapper {
        height: 180px;
    }
    
    .product-body {
        padding: 12px;
    }
    
    .product-title {
        font-size: 0.95rem;
    }
    
    .product-price {
        font-size: 1.4rem;
    }
    
    .spec-badge {
        font-size: 0.75rem;
        padding: 3px 8px;
    }
}

/* Mobile screens (up to 575px) */
@media (max-width: 575px) {
    .products-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .product-image-wrapper {
        height: 200px;
    }
    
    .product-body {
        padding: 15px;
    }
    
    .product-title {
        font-size: 1rem;
    }
    
    .product-price {
        font-size: 1.5rem;
    }
    
    .btn-product {
        padding: 12px 15px;
        font-size: 0.85rem;
    }
}

/* ================= PAGINATION RESPONSIVE ================= */
.pagination-wrapper {
    display: flex;
    justify-content: center;
    margin-top: 40px;
}

.pagination {
    display: flex;
    gap: 8px;
    list-style: none;
    padding: 0;
    margin: 0;
    flex-wrap: wrap;
    justify-content: center;
}

.pagination li {
    margin: 0;
}

.pagination a {
    padding: 10px 16px;
    background: white;
    color: #3b82f6;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    display: block;
    min-width: 44px;
    text-align: center;
}

.pagination a:hover {
    background: #3b82f6;
    color: white;
    border-color: #3b82f6;
}

.pagination .active a {
    background: #3b82f6;
    color: white;
    border-color: #3b82f6;
}

.pagination .disabled a {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

/* Mobile pagination */
@media (max-width: 576px) {
    .pagination {
        gap: 4px;
    }
    
    .pagination a {
        padding: 8px 12px;
        font-size: 0.9rem;
        min-width: 40px;
    }
}

/* ================= EMPTY STATE RESPONSIVE ================= */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    background: white;
    border-radius: 15px;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.08);
}

.empty-state i {
    font-size: 4rem;
    color: #cbd5e1;
    margin-bottom: 20px;
}

.empty-state h3 {
    color: #1e293b;
    margin-bottom: 10px;
}

.empty-state p {
    color: #64748b;
    margin-bottom: 20px;
}

/* Mobile empty state */
@media (max-width: 576px) {
    .empty-state {
        padding: 40px 15px;
    }
    
    .empty-state i {
        font-size: 3rem;
    }
    
    .empty-state h3 {
        font-size: 1.5rem;
    }
}

/* ================= ACTIVE FILTERS RESPONSIVE ================= */
.active-filters {
    background: #f1f5f9;
    padding: 15px 20px;
    border-radius: 10px;
    margin-bottom: 20px;
}

.active-filters h6 {
    margin: 0 0 10px 0;
    color: #334155;
    font-weight: 600;
}

.filter-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.filter-tag {
    background: white;
    color: #475569;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 8px;
    border: 1px solid #cbd5e1;
}

.filter-tag i {
    color: #ef4444;
    cursor: pointer;
}

/* Mobile active filters */
@media (max-width: 576px) {
    .active-filters {
        padding: 12px 15px;
    }
    
    .filter-tag {
        font-size: 0.8rem;
        padding: 5px 10px;
    }
}

/* ================= QUICK VIEW MODAL RESPONSIVE ================= */
.quick-view-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
    animation: fadeIn 0.3s ease;
}

.quick-view-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
}

.modal-content {
    background: white;
    border-radius: 15px;
    max-width: 900px;
    max-height: 90vh;
    width: 90%;
    position: relative;
    animation: slideIn 0.3s ease;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    overflow: hidden;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-50px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    border-bottom: 1px solid #e9ecef;
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
}

.modal-header h3 {
    margin: 0;
    color: #1e293b;
    font-weight: 600;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #64748b;
    cursor: pointer;
    padding: 5px;
    border-radius: 50%;
    transition: all 0.3s ease;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    background: #e2e8f0;
    color: #1e293b;
}

.modal-body {
    padding: 25px;
    max-height: calc(90vh - 80px);
    overflow-y: auto;
}

.quick-view-product {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

.quick-view-image {
    text-align: center;
}

.quick-view-image img {
    max-width: 100%;
    height: 300px;
    object-fit: contain;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.quick-view-info h2 {
    color: #1e293b;
    margin-bottom: 10px;
    font-size: 1.8rem;
    font-weight: 600;
}

.quick-view-brand {
    color: #3b82f6;
    font-weight: 600;
    margin-bottom: 15px;
    font-size: 1.1rem;
}

.quick-view-price {
    font-size: 2rem;
    font-weight: 700;
    color: #22c55e;
    margin-bottom: 20px;
}

.quick-view-specs {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 25px;
}

.spec-item {
    background: #f8f9fa;
    padding: 12px 15px;
    border-radius: 8px;
    border-left: 4px solid #3b82f6;
}

.spec-label {
    font-weight: 600;
    color: #475569;
    font-size: 0.9rem;
    margin-bottom: 5px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.spec-value {
    color: #1e293b;
    font-weight: 500;
}

.quick-view-actions {
    display: flex;
    gap: 15px;
    margin-top: 25px;
}

.btn-modal {
    padding: 12px 25px;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-view-full {
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    color: white;
    flex: 1;
}

.btn-view-full:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.4);
    color: white;
    text-decoration: none;
}

.btn-add-to-cart-modal {
    background: linear-gradient(135deg, #22c55e, #16a34a);
    color: white;
    flex: 1;
}

.btn-add-to-cart-modal:hover {
    background: linear-gradient(135deg, #16a34a, #15803d);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(34, 197, 94, 0.4);
    color: white;
    text-decoration: none;
}

.quick-view-loading {
    text-align: center;
    padding: 60px 20px;
}

.quick-view-loading i {
    font-size: 3rem;
    color: #3b82f6;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
}

.quick-view-loading p {
    color: #64748b;
    font-size: 1.1rem;
}

/* Mobile modal responsive */
@media (max-width: 768px) {
    .modal-content {
        width: 95%;
        margin: 10px;
        max-height: 95vh;
        border-radius: 12px;
    }

    .quick-view-product {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .quick-view-image img {
        height: 250px;
        border-radius: 8px;
    }

    .quick-view-actions {
        flex-direction: column;
        gap: 12px;
    }
    
    .quick-view-actions .btn-modal {
        min-height: 48px;
        font-size: 1rem;
        border-radius: 8px;
    }
    
    .modal-header {
        padding: 15px 20px;
        border-radius: 12px 12px 0 0;
    }
    
    .modal-header h3 {
        font-size: 1.2rem;
    }
    
    .modal-close {
        width: 44px;
        height: 44px;
        font-size: 1.2rem;
    }
    
    .modal-body {
        padding: 20px;
        max-height: calc(95vh - 80px);
        overflow-y: auto;
    }
    
    .quick-view-info h2 {
        font-size: 1.5rem;
        margin-bottom: 8px;
    }
    
    .quick-view-brand {
        font-size: 1rem;
        margin-bottom: 12px;
    }
    
    .quick-view-price {
        font-size: 1.8rem;
        margin-bottom: 16px;
    }
    
    .quick-view-specs {
        grid-template-columns: 1fr;
        gap: 12px;
        margin-bottom: 20px;
    }
    
    .spec-item {
        padding: 10px 12px;
        border-radius: 6px;
    }
    
    .spec-label {
        font-size: 0.85rem;
        margin-bottom: 4px;
    }
    
    .spec-value {
        font-size: 0.95rem;
    }
    
    /* Swipe to close hint */
    .modal-overlay::after {
        content: 'Swipe down or tap outside to close';
        position: absolute;
        bottom: 20px;
        left: 50%;
        transform: translateX(-50%);
        background: rgba(0, 0, 0, 0.7);
        color: white;
        padding: 8px 16px;
        border-radius: 20px;
        font-size: 0.8rem;
        opacity: 0.8;
        pointer-events: none;
    }
}

/* ================= LOADING STATES ================= */
.skeleton {
    animation: skeleton-loading 1.5s ease-in-out infinite;
}

@keyframes skeleton-loading {
    0% { background-color: #f0f0f0; }
    50% { background-color: #e0e0e0; }
    100% { background-color: #f0f0f0; }
}

.products-loading {
    opacity: 0.6;
    pointer-events: none;
}

.skeleton-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}

.skeleton-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    height: 400px;
    padding: 20px;
}

.skeleton-image {
    height: 220px;
    border-radius: 8px;
    margin-bottom: 15px;
}

.skeleton-title {
    height: 20px;
    border-radius: 4px;
    margin-bottom: 10px;
}

.skeleton-specs {
    display: flex;
    gap: 8px;
    margin-bottom: 15px;
}

.skeleton-spec {
    height: 16px;
    width: 60px;
    border-radius: 6px;
}

.skeleton-price {
    height: 30px;
    width: 120px;
    border-radius: 6px;
    margin-bottom: 15px;
}

.skeleton-button {
    height: 40px;
    border-radius: 8px;
}

.filter-loading {
    opacity: 0.7;
}

.filter-loading .filter-group select,
.filter-loading .filter-group input,
.filter-loading button {
    cursor: wait;
}

/* ================= UTILITY CLASSES ================= */
.text-gradient {
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.glass-effect {
    background: rgba(30, 41, 59, 0.4);
    backdrop-filter: blur(15px);
    border: 1px solid var(--border-light);
}

.shadow-custom {
    box-shadow: var(--shadow-medium);
}

.animate-fade-in {
    animation: fadeIn 0.6s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ================= ACCESSIBILITY ================= */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Focus styles for better accessibility */
.btn:focus,
.nav-link:focus,
.form-control:focus {
    outline: 2px solid var(--primary-blue);
    outline-offset: 2px;
}

/* ================= PRINT STYLES ================= */
@media print {
    .filters-section,
    .products-header,
    .pagination-wrapper,
    .quick-view-modal {
        display: none !important;
    }
    
    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 15px;
    }
    
    .product-card {
        background: white !important;
        border: 1px solid #ccc !important;
        box-shadow: none !important;
        page-break-inside: avoid;
    }
}
