/* ===================================
   ENHANCED PRODUCTS PAGE STYLES
   Premium Design & Visual Excellence
   =================================== */

:root {
    /* Enhanced Color Palette */
    --primary-color: #2563eb;
    --primary-light: #3b82f6;
    --primary-dark: #1d4ed8;
    --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --secondary-color: #f59e0b;
    --accent-color: #8b5cf6;
    
    /* Grayscale */
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
    --white: #ffffff;
    
    /* Success & Error Colors */
    --success-color: #10b981;
    --error-color: #ef4444;
    --warning-color: #f59e0b;
    --info-color: #06b6d4;
    
    /* Typography */
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-display: 'Playfair Display', serif;
    
    /* Shadows & Effects */
    --shadow-xs: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    
    /* Glass Effect */
    --glass-bg: rgba(255, 255, 255, 0.25);
    --glass-border: rgba(255, 255, 255, 0.18);
    --glass-backdrop: blur(16px);
    
    /* Transitions */
    --transition-base: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-fast: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    
    /* Border Radius */
    --radius-sm: 6px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --radius-2xl: 24px;
    --radius-full: 9999px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-primary);
    font-size: 16px;
    line-height: 1.6;
    color: var(--gray-800);
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
}

/* ===================================
   LOADING STATE
   =================================== */

.products-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}

.loader-content {
    text-align: center;
    background: var(--glass-bg);
    backdrop-filter: var(--glass-backdrop);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-2xl);
    padding: 3rem;
    box-shadow: var(--shadow-2xl);
}

.loader-ring {
    width: 60px;
    height: 60px;
    border: 4px solid rgba(255, 255, 255, 0.2);
    border-top: 4px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1.5rem;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loader-text {
    color: white;
    font-weight: 500;
    font-size: 1.1rem;
}

/* ===================================
   ERROR BANNER
   =================================== */

.error-banner {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
    padding: 1rem;
    text-align: center;
    z-index: 9999;
    transform: translateY(-100%);
    transition: var(--transition-base);
    box-shadow: var(--shadow-lg);
}

.error-banner.show {
    transform: translateY(0);
}

/* ===================================
   MAIN LAYOUT
   =================================== */

.products-page {
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

/* ===================================
   HEADER
   =================================== */

.products-header {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-backdrop);
    border-bottom: 1px solid var(--glass-border);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-sm);
}

.header-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 1.5rem 2rem;
    display: flex;
    align-items: center;
    gap: 2rem;
}

.back-to-shop-btn {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1.5rem;
    background: var(--glass-bg);
    backdrop-filter: var(--glass-backdrop);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-full);
    text-decoration: none;
    color: white;
    font-weight: 600;
    font-size: 0.9375rem;
    transition: var(--transition-base);
    box-shadow: var(--shadow-sm);
}

.back-to-shop-btn:hover {
    transform: translateX(-4px) translateY(-2px);
    box-shadow: var(--shadow-lg);
    background: rgba(255, 255, 255, 0.35);
}

.back-to-shop-btn i {
    font-size: 1rem;
}

.shop-info-bar {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.shop-logo-small {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-lg);
    object-fit: cover;
    border: 2px solid rgba(255, 255, 255, 0.3);
    box-shadow: var(--shadow-md);
}

.shop-name-small {
    font-size: 1.25rem;
    font-weight: 700;
    color: white;
    font-family: var(--font-display);
}

.header-search {
    flex: 1;
    max-width: 500px;
    position: relative;
}

.header-search i {
    position: absolute;
    left: 1.25rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray-400);
    font-size: 1rem;
}

.search-input {
    width: 100%;
    padding: 1rem 1.25rem 1rem 3rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-full);
    font-size: 0.9375rem;
    background: var(--glass-bg);
    backdrop-filter: var(--glass-backdrop);
    color: white;
    transition: var(--transition-base);
    box-shadow: var(--shadow-sm);
}

.search-input::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

.search-input:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.5);
    box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.35);
}

/* ===================================
   MAIN CONTENT
   =================================== */

.products-main {
    padding: 2rem 0;
}

.products-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 2rem;
}

/* ===================================
   SIDEBAR
   =================================== */

.products-sidebar {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-backdrop);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-2xl);
    padding: 2rem;
    box-shadow: var(--shadow-xl);
    height: fit-content;
    position: sticky;
    top: 120px;
}

.filter-section {
    margin-bottom: 2.5rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}

.filter-section:last-of-type {
    border-bottom: none;
    margin-bottom: 0;
}

.filter-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.125rem;
    font-weight: 700;
    color: white;
    margin-bottom: 1.5rem;
    font-family: var(--font-display);
    line-height: 1.3;
    position: relative;
    z-index: 1;
}

.filter-title i {
    color: var(--secondary-color);
    font-size: 1rem;
}

/* Categories */
.categories-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.category-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: var(--transition-base);
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.category-item:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.category-item.active {
    background: linear-gradient(135deg, var(--secondary-color), #f97316);
    color: white;
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

.category-item input {
    display: none;
}

.category-name {
    font-size: 0.9375rem;
    font-weight: 600;
    color: white;
}

.category-count {
    font-size: 0.8125rem;
    padding: 0.375rem 0.75rem;
    background: rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-full);
    color: white;
    font-weight: 600;
}

.category-item.active .category-count {
    background: rgba(255, 255, 255, 0.3);
}

/* Price Filter */
.price-inputs {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.price-input {
    flex: 1;
    padding: 0.875rem 1rem;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: var(--radius-md);
    font-size: 0.9375rem;
    background: rgba(255, 255, 255, 0.15);
    color: white;
    transition: var(--transition-base);
    font-weight: 500;
}

.price-input::placeholder {
    color: rgba(255, 255, 255, 0.7);
    font-weight: 500;
}

.price-input:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.6);
    background: rgba(255, 255, 255, 0.25);
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.1);
}

.price-separator {
    color: white;
    font-weight: 700;
    font-size: 1rem;
    padding: 0 0.25rem;
}

.apply-price-btn {
    width: 100%;
    padding: 0.875rem 1rem;
    background: linear-gradient(135deg, var(--success-color), #059669);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-base);
    box-shadow: var(--shadow-sm);
}

.apply-price-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

/* Checkbox Items */
.checkbox-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    padding: 0.75rem;
    border-radius: var(--radius-md);
    transition: var(--transition-base);
    color: white;
}

.checkbox-item:hover {
    background: rgba(255, 255, 255, 0.1);
}

.checkbox-item input {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: var(--secondary-color);
}

/* Clear Filters */
.clear-filters-btn {
    width: 100%;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-lg);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-base);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin-top: 2rem;
}

.clear-filters-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* ===================================
   PRODUCTS AREA
   =================================== */

.products-area {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-backdrop);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-2xl);
    padding: 2rem;
    box-shadow: var(--shadow-xl);
}

.products-header-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}

.results-info {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.results-text {
    color: white;
    font-size: 1rem;
    font-weight: 500;
}

.active-category {
    font-size: 0.875rem;
    color: var(--secondary-color);
    font-weight: 600;
}

.products-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.sort-select {
    padding: 0.75rem 2.5rem 0.75rem 1rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-md);
    font-size: 0.9375rem;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    cursor: pointer;
    transition: var(--transition-base);
}

.sort-select:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.4);
    background: rgba(255, 255, 255, 0.15);
}

.view-toggle {
    display: flex;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.1);
    padding: 0.375rem;
    border-radius: var(--radius-md);
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.view-btn {
    width: 40px;
    height: 40px;
    border: none;
    background: transparent;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition-base);
    color: rgba(255, 255, 255, 0.7);
}

.view-btn.active {
    background: white;
    color: var(--primary-color);
    box-shadow: var(--shadow-sm);
}

.view-btn:hover:not(.active) {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

/* ===================================
   PRODUCTS GRID
   =================================== */

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
}

/* Product Card */
.product-card {
    background: white;
    border-radius: var(--radius-xl);
    overflow: hidden;
    transition: var(--transition-base);
    cursor: pointer;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--gray-200);
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-2xl);
}

.product-image {
    position: relative;
    height: 240px;
    overflow: hidden;
    background: var(--gray-100);
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition-slow);
}

.product-card:hover .product-image img {
    transform: scale(1.1);
}

.product-badges {
    position: absolute;
    top: 1rem;
    left: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    z-index: 3;
    max-width: calc(100% - 2rem);
}

.badge {
    padding: 0.375rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 700;
    border-radius: var(--radius-full);
    text-transform: uppercase;
    letter-spacing: 0.025em;
    box-shadow: var(--shadow-sm);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.badge.featured {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
}

.badge.new {
    background: linear-gradient(135deg, var(--success-color), #059669);
    color: white;
}

.badge.bestseller {
    background: linear-gradient(135deg, var(--secondary-color), #f97316);
    color: white;
}

.badge.discount {
    background: linear-gradient(135deg, var(--error-color), #dc2626);
    color: white;
}

.badge.limited {
    background: linear-gradient(135deg, var(--accent-color), #7c3aed);
    color: white;
}

.badge.out-of-stock {
    background: linear-gradient(135deg, var(--gray-600), var(--gray-700));
    color: white;
}

.product-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(0,0,0,0.7), rgba(0,0,0,0.5));
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition-base);
    visibility: hidden; 
}

.product-card:hover .product-overlay,
.product-card.mobile-active .product-overlay {
    opacity: 1;
    visibility: visible;
}

.product-actions {
    display: flex;
    gap: 1rem;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s ease;
}

.product-card:hover .product-actions,
.product-card.mobile-active .product-actions {
    opacity: 1;
    transform: translateY(0);
}

.product-actions .action-btn {
    width: 44px;
    height: 44px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gray-800);
    box-shadow: var(--shadow-md);
    transition: all 0.2s ease;
    border: none;
    cursor: pointer;
}

.product-actions .action-btn:hover {
    background: var(--primary-color);
    color: white;
    transform: scale(1.1);
}

.product-info {
    padding: 1.5rem;
}

.product-brand {
    font-size: 0.875rem;
    color: var(--gray-500);
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.product-name {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 0.75rem;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-price {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.current-price {
    font-size: 1.375rem;
    font-weight: 800;
    color: var(--gray-900);
    font-family: var(--font-display);
}

.original-price {
    font-size: 1rem;
    color: var(--gray-500);
    text-decoration: line-through;
}

.product-actions {
    display: flex;
    gap: 0.75rem;
}

.add-to-cart-btn {
    flex: 1;
    padding: 0.875rem 1rem;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-base);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    box-shadow: var(--shadow-sm);
}

.add-to-cart-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.add-to-cart-btn:disabled {
    background: var(--gray-300);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.contact-btn {
    width: 48px;
    height: 48px;
    background: var(--gray-100);
    color: var(--gray-700);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition-base);
}

.contact-btn:hover {
    background: var(--gray-200);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* ===================================
   LIST VIEW
   =================================== */

.products-grid.list-view {
    grid-template-columns: 1fr;
}

.products-grid.list-view .product-card {
    display: flex;
    align-items: center;
    height: 200px;
}

.products-grid.list-view .product-image {
    width: 250px;
    height: 100%;
    flex-shrink: 0;
}

.products-grid.list-view .product-info {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
    padding: 2rem;
}

.products-grid.list-view .product-details {
    flex: 1;
}

.products-grid.list-view .product-actions {
    flex-direction: column;
    margin-left: 2rem;
    width: 200px;
}

/* ===================================
   NO PRODUCTS
   =================================== */

.no-products {
    text-align: center;
    padding: 4rem;
    color: white;
}

.no-products i {
    font-size: 4rem;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 1.5rem;
}

.no-products h3 {
    font-size: 1.5rem;
    color: white;
    margin-bottom: 0.75rem;
    font-family: var(--font-display);
}

.no-products p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 1.125rem;
}

/* ===================================
   PAGINATION
   =================================== */

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.75rem;
    margin-top: 3rem;
}

.page-btn {
    min-width: 44px;
    height: 44px;
    padding: 0 0.75rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-md);
    font-size: 0.9375rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-base);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
}

.page-btn:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.page-btn.active {
    background: linear-gradient(135deg, var(--secondary-color), #f97316);
    border-color: var(--secondary-color);
    color: white;
    box-shadow: var(--shadow-lg);
}

.page-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.page-dots {
    color: rgba(255, 255, 255, 0.6);
    font-weight: 600;
}

/* ===================================
   NOTIFICATIONS
   =================================== */

.notification {
    position: fixed;
    top: 20px;
    right: -400px;
    max-width: 380px;
    background: white;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-2xl);
    padding: 1.5rem 2rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: transform 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    z-index: 9999;
    border-left: 4px solid transparent;
}

.notification.show {
    transform: translateX(-420px);
}

.notification.success {
    border-left-color: var(--success-color);
}

.notification.success i {
    color: var(--success-color);
    font-size: 1.25rem;
}

.notification.error {
    border-left-color: var(--error-color);
}

.notification.error i {
    color: var(--error-color);
    font-size: 1.25rem;
}

.notification span {
    font-weight: 500;
    color: var(--gray-800);
}

/* ===================================
   RESPONSIVE DESIGN
   =================================== */

@media (max-width: 1200px) {
    .products-container {
        grid-template-columns: 280px 1fr;
    }
}

@media (max-width: 1024px) {
    .products-container {
        grid-template-columns: 260px 1fr;
        gap: 1.5rem;
    }
    
    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 1.5rem;
    }
}

@media (max-width: 768px) {
    .header-container {
        padding: 1rem;
        flex-wrap: wrap;
        gap: 1rem;
    }
    
    .header-search {
        order: 3;
        flex-basis: 100%;
        max-width: none;
    }
    
    .products-container {
        grid-template-columns: 1fr;
        padding: 0 1rem;
        gap: 1.5rem;
    }
    
    .products-sidebar {
        position: static;
        margin-bottom: 0;
    }
    
    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
        gap: 1.25rem;
    }
    
    .quick-view-content {
        grid-template-columns: 1fr;
    }
    
    .quick-view-image {
        height: 350px;
    }
    
    .quick-view-info {
        padding: 2rem;
    }
    
    .quick-view-title {
        font-size: 1.5rem;
    }
    
    .quick-view-price .current-price {
        font-size: 1.75rem;
    }
}

@media (max-width: 640px) {
    .products-header-bar {
        flex-direction: column;
        align-items: flex-start;
        gap: 1.5rem;
    }
    
    .products-controls {
        width: 100%;
        justify-content: space-between;
        flex-wrap: wrap;
        gap: 1rem;
    }
    
    .sort-select {
        flex: 1;
        min-width: 140px;
    }
    
    .view-toggle {
        flex-shrink: 0;
    }
    
    .products-grid {
        grid-template-columns: 1fr;
    }
    
    .products-grid.list-view .product-card {
        flex-direction: column;
        height: auto;
    }
    
    .products-grid.list-view .product-image {
        width: 100%;
        height: 200px;
    }
    
    .products-grid.list-view .product-info {
        flex-direction: column;
        align-items: flex-start;
        padding: 1.5rem;
    }
    
    .products-grid.list-view .product-actions {
        margin-left: 0;
        margin-top: 1rem;
        width: 100%;
        flex-direction: row;
    }
    
    .filter-section {
        margin-bottom: 1.5rem;
        padding-bottom: 1.5rem;
    }
    
    .products-sidebar {
        padding: 1.5rem;
    }
    
    .products-area {
        padding: 1.5rem;
    }
    
    .price-inputs {
        gap: 0.5rem;
    }
    
    .price-input {
        padding: 0.75rem;
        font-size: 0.875rem;
    }
    
    .results-text {
        font-size: 0.9375rem;
    }
}

@media (max-width: 480px) {
    .shop-info-bar {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .shop-logo-small {
        width: 40px;
        height: 40px;
    }
    
    .shop-name-small {
        font-size: 1.125rem;
    }
    
    .quick-view-info {
        padding: 1.5rem;
    }
    
    .quick-view-actions {
        flex-direction: column;
    }
    
    .pagination {
        gap: 0.5rem;
    }
    
    .page-btn {
        min-width: 36px;
        height: 36px;
        font-size: 0.875rem;
    }
}

/* ===================================
   UTILITY CLASSES
   =================================== */

.text-center {
    text-align: center;
}

.hidden {
    display: none !important;
}

.visible {
    display: block !important;
}

/* ===================================
   ANIMATIONS
   =================================== */

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.animate-fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

.animate-pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* ===================================
   PRINT STYLES
   =================================== */

@media print {
    .products-header,
    .products-sidebar,
    .pagination,
    .quick-view-modal {
        display: none !important;
    }
    
    .products-container {
        grid-template-columns: 1fr;
        max-width: none;
        padding: 0;
    }
    
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    
    .product-card {
        box-shadow: none;
        border: 1px solid var(--gray-300);
    }
}

/* ===================================
   ACCESSIBILITY
   =================================== */

@media (prefers-reduced-motion: reduce) {
    *,
    ::before,
    ::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* Focus styles for better accessibility */
button:focus-visible,
input:focus-visible,
select:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    :root {
        --primary-color: #0066cc;
        --gray-100: #f0f0f0;
        --gray-800: #1a1a1a;
    }
}

/* ===================================
   MOBILE RESPONSIVE STYLES
   Clean & Elegant Mobile Experience
   =================================== */

/* Tablet Styles (768px - 1024px) */
@media (max-width: 1024px) {
    .products-container {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        padding: 0 1.5rem;
    }
    
    .products-sidebar {
        position: static;
        display: flex;
        flex-wrap: wrap;
        gap: 1rem;
        padding: 1.5rem;
    }
    
    .filter-section {
        flex: 1;
        min-width: 250px;
        margin-bottom: 0;
        padding-bottom: 0;
        border-bottom: none;
        border-right: 1px solid rgba(255, 255, 255, 0.15);
        padding-right: 1rem;
    }
    
    .filter-section:last-child {
        border-right: none;
    }
    
    .clear-filters-btn {
        width: auto;
        padding: 0.875rem 1.5rem;
        margin-top: 0;
    }
    
    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    }
}

/* Mobile Styles (320px - 768px) */
@media (max-width: 768px) {
    /* Header Simplification */
    .header-container {
        padding: 1rem;
        flex-direction: column;
        gap: 1rem;
    }
    
    .back-to-shop-btn {
        width: 100%;
        justify-content: center;
        padding: 1rem;
        font-size: 1rem;
    }
    
    .shop-info-bar {
        width: 100%;
        justify-content: center;
        padding: 0.75rem 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    }
    
    .header-search {
        width: 100%;
        max-width: none;
    }
    
    .search-input {
        padding: 0.875rem 1rem 0.875rem 2.75rem;
        font-size: 1rem;
    }
    
    /* Main Container */
    .products-main {
        padding: 1rem 0;
    }
    
    .products-container {
        padding: 0 1rem;
    }
    
    /* Mobile Filter Container */
    .products-sidebar {
        display: flex;
        flex-direction: column;
        gap: 1.5rem;
        padding: 1.5rem;
        margin-bottom: 1rem;
        max-height: none;
        position: static;
    }
    
    /* Collapsible Filter Sections on Mobile */
    .filter-section {
        background: rgba(255, 255, 255, 0.15);
        border-radius: var(--radius-lg);
        padding: 1rem;
        border: 1px solid rgba(255, 255, 255, 0.2);
    }
    
    .filter-title {
        font-size: 1rem;
        margin-bottom: 1rem;
        display: flex;
        justify-content: space-between;
        align-items: center;
        cursor: pointer;
        user-select: none;
    }
    
    .filter-title::after {
        content: '\f107';
        font-family: 'Font Awesome 5 Free';
        font-weight: 900;
        transition: transform 0.3s ease;
    }
    
    .filter-section.collapsed .filter-title::after {
        transform: rotate(-90deg);
    }
    
    /* Categories as Scrollable Horizontal Pills */
    .categories-list {
        display: flex;
        gap: 0.5rem;
        overflow-x: auto;
        overflow-y: hidden;
        padding-bottom: 0.5rem;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: thin;
        scrollbar-color: rgba(255, 255, 255, 0.3) transparent;
    }
    
    .categories-list::-webkit-scrollbar {
        height: 4px;
    }
    
    .categories-list::-webkit-scrollbar-track {
        background: rgba(255, 255, 255, 0.1);
        border-radius: 2px;
    }
    
    .categories-list::-webkit-scrollbar-thumb {
        background: rgba(255, 255, 255, 0.4);
        border-radius: 2px;
    }
    
    .category-item {
        flex: 0 0 auto;
        padding: 0.625rem 1rem;
        white-space: nowrap;
        font-size: 0.875rem;
        min-width: fit-content;
    }
    
    .category-name {
        font-size: 0.875rem;
    }
    
    .category-count {
        font-size: 0.75rem;
        padding: 0.125rem 0.375rem;
        margin-left: 0.5rem;
    }
    
    /* Price Filter Compact */
    .price-filter {
        display: flex;
        align-items: center;
        gap: 0.75rem;
    }
    
    .price-inputs {
        margin-bottom: 0;
    }
    
    .price-input {
        width: 80px;
        padding: 0.75rem 0.5rem;
        font-size: 0.875rem;
    }
    
    .apply-price-btn {
        width: auto;
        padding: 0.75rem 1rem;
        font-size: 0.875rem;
    }
    
    /* Clear Filters Mobile */
    .clear-filters-btn {
        flex: 0 0 auto;
        align-self: center;
    }
    
    /* Products Area */
    .products-area {
        padding: 1.5rem;
    }
    
    /* Products Header Bar Mobile */
    .products-header-bar {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
        padding-bottom: 1rem;
    }
    
    .results-info {
        text-align: center;
    }
    
    .products-controls {
        width: 100%;
        justify-content: space-between;
    }
    
    .sort-select {
        flex: 1;
        max-width: calc(100% - 100px);
        padding: 0.75rem 2rem 0.75rem 1rem;
    }
    
    .view-toggle {
        display: none; /* Hide view toggle on mobile */
    }
    
    /* Products Grid Mobile */
    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 1rem;
    }
    
    /* Product Card Mobile Optimization */
    .product-card {
        border-radius: var(--radius-lg);
    }
    
    .product-image {
        height: 180px;
    }
    
    .product-badges {
        top: 0.5rem;
        left: 0.5rem;
        gap: 0.25rem;
    }
    
    .badge {
        padding: 0.25rem 0.5rem;
        font-size: 0.625rem;
    }
    
    .product-info {
        padding: 1rem;
    }
    
    .product-brand {
        font-size: 0.75rem;
        margin-bottom: 0.25rem;
    }
    
    .product-name {
        font-size: 0.875rem;
        margin-bottom: 0.5rem;
        -webkit-line-clamp: 2;
    }
    
    .product-price {
        margin-bottom: 0.75rem;
    }
    
    .current-price {
        font-size: 1.125rem;
    }
    
    .original-price {
        font-size: 0.875rem;
    }
    
    .product-actions {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .add-to-cart-btn {
        padding: 0.75rem;
        font-size: 0.8125rem;
    }
    
    .contact-btn {
        width: 100%;
        height: 40px;
    }
    
    /* Quick View Modal Mobile */
    .modal-content {
        width: 95%;
        max-height: 95vh;
        margin: auto;
    }
    
    .quick-view-content {
        grid-template-columns: 1fr;
        max-height: 95vh;
        overflow-y: auto;
    }
    
    .quick-view-image {
        height: 300px;
    }
    
    .quick-view-info {
        padding: 1.5rem;
    }
    
    .quick-view-title {
        font-size: 1.5rem;
        margin-bottom: 0.75rem;
    }
    
    .quick-view-description {
        font-size: 1rem;
        margin-bottom: 1.5rem;
    }
    
    .quick-view-price .current-price {
        font-size: 1.75rem;
    }
    
    .quick-view-price .original-price {
        font-size: 1.125rem;
    }
    
    .quick-view-actions {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .quick-view-actions button {
        padding: 1rem;
        font-size: 0.9375rem;
    }
    
    /* Pagination Mobile */
    .pagination {
        gap: 0.5rem;
        margin-top: 2rem;
        padding: 0 1rem;
    }
    
    .page-btn {
        min-width: 36px;
        height: 36px;
        padding: 0 0.5rem;
        font-size: 0.875rem;
    }
    
    /* Hide less important pagination buttons on mobile */
    .page-btn:not(.active):not(:first-child):not(:last-child):nth-child(n+5) {
        display: none;
    }
}

/* Small Mobile (320px - 480px) */
@media (max-width: 480px) {
    /* Ultra compact header */
    .shop-info-bar {
        gap: 0.75rem;
    }
    
    .shop-logo-small {
        width: 36px;
        height: 36px;
    }
    
    .shop-name-small {
        font-size: 1.125rem;
    }
    
    /* Single column product grid */
    .products-grid {
        grid-template-columns: 1fr;
    }
    
    /* Larger product cards for single column */
    .product-image {
        height: 220px;
    }
    
    .product-info {
        padding: 1.25rem;
    }
    
    .product-name {
        font-size: 1rem;
        -webkit-line-clamp: 3;
    }
    
    .current-price {
        font-size: 1.25rem;
    }
    
    .product-actions {
        flex-direction: row;
    }
    
    .contact-btn {
        width: 48px;
    }
    
    /* Mobile Categories Filter - Improved */
    .products-sidebar {
        flex-direction: column;
        overflow-x: visible;
        gap: 1rem;
        background: rgba(255, 255, 255, 0.05);
        border-radius: var(--radius-xl);
        padding: 1rem;
        margin-bottom: 1rem;
    }
    
    .filter-section {
        width: 100%;
        background: transparent;
        padding: 0;
        margin-bottom: 1rem;
    }
    
    .filter-section:last-of-type {
        margin-bottom: 0;
    }
    
    /* Category Filter - Mobile Optimized */
    .filter-section:first-child .filter-title {
        font-size: 0.9375rem;
        margin-bottom: 0.75rem;
        color: white;
    }
    
    .categories-list {
        display: flex;
        gap: 0.5rem;
        overflow-x: auto;
        overflow-y: hidden;
        padding: 0.25rem 0 0.75rem;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: thin;
        scrollbar-color: rgba(255, 255, 255, 0.3) transparent;
    }
    
    .categories-list::-webkit-scrollbar {
        height: 3px;
    }
    
    .categories-list::-webkit-scrollbar-track {
        background: rgba(255, 255, 255, 0.1);
        border-radius: 1.5px;
    }
    
    .categories-list::-webkit-scrollbar-thumb {
        background: rgba(255, 255, 255, 0.5);
        border-radius: 1.5px;
    }
    
    .category-item {
        flex: 0 0 auto;
        padding: 0.5rem 0.875rem;
        font-size: 0.8125rem;
        white-space: nowrap;
        min-width: fit-content;
        border-radius: var(--radius-full);
        background: rgba(255, 255, 255, 0.08);
        border: 1px solid rgba(255, 255, 255, 0.12);
    }
    
    .category-item.active {
        background: var(--secondary-color);
        border-color: var(--secondary-color);
        box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
    }
    
    .category-name {
        font-size: 0.8125rem;
        font-weight: 500;
    }
    
    .category-count {
        font-size: 0.6875rem;
        padding: 0.125rem 0.25rem;
        margin-left: 0.375rem;
        background: rgba(255, 255, 255, 0.15);
    }
    
    .category-item.active .category-count {
        background: rgba(255, 255, 255, 0.25);
    }
    
    /* Compact Price Filter */
    .price-filter {
        display: flex;
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .price-inputs {
        width: 100%;
        gap: 0.5rem;
    }
    
    .price-input {
        flex: 1;
        padding: 0.625rem 0.75rem;
        font-size: 0.875rem;
    }
    
    .apply-price-btn {
        width: 100%;
        padding: 0.625rem;
        font-size: 0.875rem;
    }
    
    /* Availability Filter */
    .checkbox-item {
        padding: 0.5rem;
        font-size: 0.875rem;
    }
    
    .checkbox-item input {
        width: 18px;
        height: 18px;
    }
    
    /* Full width clear button */
    .clear-filters-btn {
        width: 100%;
        margin-top: 0;
        padding: 0.75rem;
        font-size: 0.875rem;
    }
    
    /* Active Category Display */
    .active-category {
        display: block;
        margin-top: 0.25rem;
        font-size: 0.8125rem;
        color: rgba(255, 255, 255, 0.9);
    }
    
    /* Results Info */
    .results-info {
        text-align: left;
    }
    
    .results-text {
        font-size: 0.875rem;
    }
    
    /* Notification adjustments */
    .notification {
        right: -350px;
        max-width: calc(100vw - 2rem);
        padding: 1rem;
    }
    
    .notification.show {
        transform: translateX(-360px);
    }
}

/* Extra Small Mobile (below 375px) */
@media (max-width: 375px) {
    /* Further size reductions */
    .header-container {
        padding: 0.75rem;
    }
    
    .back-to-shop-btn {
        padding: 0.875rem;
        font-size: 0.9375rem;
    }
    
    .products-main {
        padding: 0.75rem 0;
    }
    
    .products-container {
        padding: 0 0.75rem;
    }
    
    .products-area {
        padding: 1.25rem;
    }
    
    .product-info {
        padding: 1rem;
    }
    
    .product-name {
        font-size: 0.9375rem;
    }
    
    .current-price {
        font-size: 1.125rem;
    }
    
    .add-to-cart-btn {
        font-size: 0.75rem;
        padding: 0.625rem;
    }
    
    /* Ultra-compact category filter */
    .categories-list {
        gap: 0.375rem;
    }
    
    .category-item {
        padding: 0.375rem 0.625rem;
        font-size: 0.75rem;
    }
    
    .category-name {
        font-size: 0.75rem;
    }
    
    .category-count {
        font-size: 0.625rem;
        padding: 0 0.25rem;
    }
}

/* Mobile touch interaction */
.product-card.mobile-active .product-overlay {
    opacity: 1;
}



/* Special Category Filter Enhancements for Mobile */
@media (max-width: 768px) {
    /* Make categories more prominent on mobile */
    .filter-section:has(.categories-list) {
        background: linear-gradient(135deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.05));
        border: 1px solid rgba(255, 255, 255, 0.15);
        border-radius: var(--radius-lg);
        padding: 1rem;
        margin-bottom: 1.5rem;
    }
    
    /* Category filter header */
    .filter-section:has(.categories-list) .filter-title {
        color: white;
        font-weight: 600;
        margin-bottom: 0.75rem;
        position: relative;
        padding-left: 1.5rem;
    }
    
    .filter-section:has(.categories-list) .filter-title i {
        position: absolute;
        left: 0;
        top: 50%;
        transform: translateY(-50%);
    }
    
    /* Show "swipe to see more" hint */
    .categories-list::after {
        content: '→';
        position: absolute;
        right: 0.5rem;
        top: 50%;
        transform: translateY(-50%);
        font-size: 1.25rem;
        color: rgba(255, 255, 255, 0.4);
        animation: swipeHint 2s ease-in-out infinite;
        pointer-events: none;
    }
    
    @keyframes swipeHint {
        0%, 100% { transform: translateY(-50%) translateX(0); }
        50% { transform: translateY(-50%) translateX(5px); }
    }
    
    /* Hide hint when scrolled */
    .categories-list.scrolled::after {
        display: none;
    }
    
    /* Enhanced active category state */
    .category-item.active {
        animation: categoryActivate 0.3s ease;
        position: relative;
    }
    
    @keyframes categoryActivate {
        0% { transform: scale(0.95); }
        50% { transform: scale(1.05); }
        100% { transform: scale(1); }
    }
    
    /* Loading state for categories */
    .categories-list.loading {
        opacity: 0.5;
        pointer-events: none;
    }
    
    .categories-list.loading::before {
        content: 'Loading categories...';
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        color: rgba(255, 255, 255, 0.7);
        font-size: 0.875rem;
    }
}

/* Touch-friendly adjustments */
@media (hover: none) and (pointer: coarse) {
    /* Increase touch targets */
    button, 
    .category-item,
    .checkbox-item input,
    .page-btn {
        min-height: 44px;
    }
    
    /* Improve category item touch targets */
    .category-item {
        min-height: 40px;
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 0.75rem 1rem;
        cursor: pointer;
        -webkit-tap-highlight-color: rgba(255, 255, 255, 0.1);
    }
    
    /* Visual feedback for touch */
    .category-item:active {
        transform: scale(0.95);
        background: rgba(255, 255, 255, 0.25);
    }
    
    .category-item.active:active {
        transform: scale(0.98);
    }
    
    /* Remove hover effects on touch devices */
    .product-card:hover {
        transform: none;
        box-shadow: var(--shadow-sm);
    }
    
    .product-card:hover .product-image img {
        transform: none;
    }
    
    
    /* Add active states for better feedback */
    button:active,
    .page-btn:active {
        transform: scale(0.98);
        opacity: 0.9;
    }
    
    /* Smooth scrolling for categories */
    .categories-list {
        scroll-behavior: smooth;
        -webkit-overflow-scrolling: touch;
    }
}

/* Landscape orientation adjustments */
@media (max-width: 768px) and (orientation: landscape) {
    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }
    
    .product-image {
        height: 150px;
    }
    
    .quick-view-image {
        height: 200px;
    }
    
    /* Compact filters in landscape */
    .products-sidebar {
        max-height: 200px;
        overflow-y: auto;
    }
    
    .categories-list {
        max-height: 60px;
    }
}

/* Category Filter JavaScript Helpers */
@media (max-width: 768px) {
    /* Visual states for filtered products */
    .products-grid[data-filtered="true"] .product-card {
        display: none;
        opacity: 0;
        transform: scale(0.9);
        transition: all 0.3s ease;
    }
    
    .products-grid[data-filtered="true"] .product-card[data-visible="true"] {
        display: block;
        opacity: 1;
        transform: scale(1);
    }
    
    /* Loading state while filtering */
    .products-area.filtering {
        position: relative;
        pointer-events: none;
    }
    
    .products-area.filtering::after {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.3);
        backdrop-filter: blur(2px);
        display: flex;
        align-items: center;
        justify-content: center;
        z-index: 10;
    }
    
    /* Category counter badge animation */
    .category-count {
        transition: all 0.3s ease;
    }
    
    .category-item.active .category-count {
        animation: pulse 0.5s ease;
    }
    
    @keyframes pulse {
        0%, 100% { transform: scale(1); }
        50% { transform: scale(1.1); }
    }
    
    /* Mobile-specific "no products" message */
    #no-products {
        padding: 3rem 1.5rem;
        text-align: center;
    }
    
    #no-products i {
        font-size: 3rem;
        color: rgba(255, 255, 255, 0.5);
        margin-bottom: 1rem;
    }
    
    #no-products h3 {
        font-size: 1.25rem;
        margin-bottom: 0.5rem;
    }
    
    #no-products p {
        font-size: 0.9375rem;
        color: rgba(255, 255, 255, 0.7);
    }
}