 :root {
     --primary-color: #000000;
     --secondary-color: #666666;
     --accent-color: #2563eb;
     --dark-color: #0a0a0a;
     --light-color: #ffffff;
     --gray-100: #f5f5f5;
     --gray-200: #e5e5e5;
     --gray-300: #d4d4d4;
 }

 body {
     font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
     background-color: var(--light-color);
     color: var(--dark-color);
 }

 /* Navbar */
 .navbar {
     background: rgba(255, 255, 255, 0.95);
     backdrop-filter: blur(10px);
     border-bottom: 1px solid rgba(0, 0, 0, 0.1);
     box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
 }

 .navbar-brand {
     font-size: 1.8rem;
     font-weight: 700;
     color: var(--primary-color) !important;
 }

 /* Search Section */
 .search-section {
     background: var(--gray-100);
     padding: 2rem 0;
 }

 .search-container {
     position: relative;
     max-width: 700px;
     margin: 0 auto;
 }

 .search-input {
     width: 100%;
     padding: 1.1rem 3.5rem 1.1rem 1.5rem;
     border: 1px solid var(--gray-300);
     border-radius: 50px;
     font-size: 0.95rem;
     transition: all 0.3s ease;
     background: white;
 }

 .search-input:focus {
     outline: none;
     border-color: var(--primary-color);
     box-shadow: 0 0 0 4px rgba(0, 0, 0, 0.05);
 }

 .search-btn {
     position: absolute;
     right: 6px;
     top: 50%;
     transform: translateY(-50%);
     background: var(--primary-color);
     border: none;
     border-radius: 50%;
     width: 42px;
     height: 42px;
     color: white;
     cursor: pointer;
     transition: all 0.3s ease;
     display: flex;
     align-items: center;
     justify-content: center;
 }

 .search-btn:hover {
     background: #1a1a1a;
     transform: translateY(-50%) scale(1.05);
 }

 .clear-search {
     position: absolute;
     right: 55px;
     top: 50%;
     transform: translateY(-50%);
     background: var(--gray-300);
     border: none;
     border-radius: 50%;
     width: 32px;
     height: 32px;
     color: var(--dark-color);
     cursor: pointer;
     font-size: 0.8rem;
     display: none;
     transition: all 0.3s ease;
 }

 .clear-search:hover {
     background: #dc3545;
     color: white;
 }

 /* Filters and Sort Section - MODERNIZED */
 .filters-section {
     background: white;
     padding: 1.75rem 0;
     margin-bottom: 2rem;
     box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
 }

 .sort-controls {
     display: flex;
     gap: 2rem;
     align-items: center;
     flex-wrap: wrap;
     justify-content: space-between;
 }

 .sort-dropdown {
     position: relative;
 }

 .sort-dropdown::before {
     content: 'Sort by:';
     position: absolute;
     left: 1.25rem;
     top: 50%;
     transform: translateY(-50%);
     font-size: 0.875rem;
     font-weight: 600;
     color: var(--secondary-color);
     pointer-events: none;
     z-index: 1;
 }

 .sort-dropdown select {
     padding: 0.875rem 1.5rem 0.875rem 5.5rem;
     border: 2px solid var(--gray-300);
     border-radius: 12px;
     background: white;
     cursor: pointer;
     min-width: 280px;
     font-size: 0.9375rem;
     font-weight: 600;
     color: var(--dark-color);
     transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
     appearance: none;
     background-image: url("data:image/svg+xml;utf8,<svg fill='%23000000' height='20' viewBox='0 0 24 24' width='20' xmlns='http://www.w3.org/2000/svg'><path d='M7 10l5 5 5-5z'/></svg>");
     background-repeat: no-repeat;
     background-position: right 14px center;
     background-size: 18px;
     box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
 }

 .sort-dropdown select:hover {
     border-color: var(--primary-color);
     background-color: #fafafa;
     transform: translateY(-1px);
     box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
 }

 .sort-dropdown select:focus {
     outline: none;
     border-color: var(--primary-color);
     box-shadow: 0 0 0 4px rgba(0, 0, 0, 0.08);
     background-color: white;
 }

 .results-info {
     color: var(--secondary-color);
     font-size: 1rem;
     font-weight: 600;
     display: flex;
     align-items: center;
     gap: 0.5rem;
 }

 .results-info::before {
     content: '';
     width: 4px;
     height: 20px;
     background: var(--primary-color);
     border-radius: 2px;
 }

 /* Sidebar - MODERNIZED */
 .sidebar {
     background: white;
     border-radius: 16px;
     padding: 0;
     border: 1px solid var(--gray-200);
     height: fit-content;
     position: sticky;
     top: 100px;
     overflow: hidden;
     box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
 }

 .filter-section {
     padding: 1.75rem 1.5rem;
     border-bottom: 1px solid var(--gray-200);
     transition: all 0.3s ease;
 }

 .filter-section:hover {
     background: rgba(0, 0, 0, 0.01);
 }

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

 .filter-title {
     font-size: 1.5rem;
     font-weight: 800;
     padding: 2rem 1.5rem;
     margin: 0;
     color: var(--primary-color);
     background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
     border-bottom: 2px solid var(--primary-color);
     letter-spacing: -0.5px;
 }

 .filter-section h5 {
     font-size: 1rem;
     font-weight: 700;
     margin-bottom: 1.25rem;
     color: var(--dark-color);
     text-transform: uppercase;
     letter-spacing: 0.5px;
     display: flex;
     align-items: center;
     gap: 0.5rem;
 }

 .filter-section h5::before {
     content: '';
     width: 4px;
     height: 18px;
     background: var(--primary-color);
     border-radius: 2px;
 }

 .filter-option {
     margin-bottom: 0.875rem;
     transition: all 0.2s ease;
 }

 .filter-option:hover {
     transform: translateX(4px);
 }

 .filter-option input[type="checkbox"] {
     margin-right: 0.875rem;
     accent-color: var(--primary-color);
     width: 20px;
     height: 20px;
     cursor: pointer;
     border-radius: 4px;
 }

 .filter-option label {
     cursor: pointer;
     font-size: 0.9375rem;
     color: var(--dark-color);
     font-weight: 500;
     transition: color 0.2s ease;
 }

 .filter-option:hover label {
     color: var(--primary-color);
 }

 /* Custom Select - MODERNIZED */
 .custom-select {
     width: 100%;
     padding: 0.875rem 1rem;
     font-size: 0.9375rem;
     font-weight: 500;
     border: 2px solid var(--gray-300);
     border-radius: 12px;
     background-color: #fff;
     appearance: none;
     -webkit-appearance: none;
     -moz-appearance: none;
     background-image: url("data:image/svg+xml;utf8,<svg fill='%23000000' height='20' viewBox='0 0 24 24' width='20' xmlns='http://www.w3.org/2000/svg'><path d='M7 10l5 5 5-5z'/></svg>");
     background-repeat: no-repeat;
     background-position: right 14px center;
     background-size: 18px;
     cursor: pointer;
     transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
     color: var(--dark-color);
 }

 .custom-select:hover {
     border-color: var(--primary-color);
     background-color: #fafafa;
 }

 .custom-select:focus {
     border-color: var(--primary-color);
     outline: none;
     box-shadow: 0 0 0 4px rgba(0, 0, 0, 0.08);
     background-color: white;
 }

 .custom-select option {
     padding: 0.75rem;
     font-weight: 500;
 }

 /* Price Range Inputs - MODERNIZED */
 .price-range-inputs {
     display: grid;
     grid-template-columns: 1fr 1fr;
     gap: 0.875rem;
 }

 .price-range-inputs input {
     width: 100%;
     padding: 0.875rem 1rem;
     border: 2px solid var(--gray-300);
     border-radius: 12px;
     font-size: 0.9375rem;
     font-weight: 500;
     transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
     color: var(--dark-color);
 }

 .price-range-inputs input::placeholder {
     color: #999;
     font-weight: 400;
 }

 .price-range-inputs input:hover {
     border-color: var(--primary-color);
     background-color: #fafafa;
 }

 .price-range-inputs input:focus {
     outline: none;
     border-color: var(--primary-color);
     box-shadow: 0 0 0 4px rgba(0, 0, 0, 0.08);
     background-color: white;
 }

 /* Filter Buttons - MODERNIZED */
 .apply-filters-btn {
     background: linear-gradient(135deg, var(--primary-color) 0%, #1a1a1a 100%);
     color: white;
     border: none;
     padding: 1rem;
     border-radius: 12px;
     width: calc(100% - 3rem);
     margin: 1.75rem 1.5rem 0.75rem 1.5rem;
     cursor: pointer;
     font-weight: 700;
     font-size: 0.9375rem;
     text-transform: uppercase;
     letter-spacing: 0.5px;
     transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
     box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
     position: relative;
     overflow: hidden;
 }

 .apply-filters-btn::before {
     content: '';
     position: absolute;
     top: 0;
     left: -100%;
     width: 100%;
     height: 100%;
     background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
     transition: left 0.5s;
 }

 .apply-filters-btn:hover::before {
     left: 100%;
 }

 .apply-filters-btn:hover {
     transform: translateY(-2px);
     box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
 }

 .apply-filters-btn:active {
     transform: translateY(0);
 }

 .clear-filters-btn {
     background: transparent;
     color: var(--secondary-color);
     border: 2px solid var(--gray-300);
     padding: 0.875rem;
     border-radius: 12px;
     width: calc(100% - 3rem);
     margin: 0.5rem 1.5rem 1.5rem 1.5rem;
     cursor: pointer;
     font-size: 0.9375rem;
     font-weight: 600;
     transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
 }

 .clear-filters-btn:hover {
     background: #f8f9fa;
     border-color: var(--primary-color);
     color: var(--primary-color);
     transform: translateY(-1px);
 }

 /* Product Grid */
 .products-grid {
     display: grid;
     grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
     gap: 2rem;
     margin-bottom: 3rem;
 }

 .product-card {
     background: white;
     border-radius: 12px;
     overflow: hidden;
     box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
     transition: all 0.3s ease;
     cursor: pointer;
     position: relative;
 }

 .product-card:hover {
     transform: translateY(-5px);
     box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
 }

 .product-image {
     width: 100%;
     height: 250px;
     overflow: hidden;
     position: relative;
 }

 .product-image img {
     width: 100%;
     height: 100%;
     object-fit: cover;
     transition: transform 0.3s ease;
 }

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

 .product-badge {
     position: absolute;
     top: 1rem;
     right: 1rem;
     background: var(--accent-color);
     color: white;
     padding: 0.3rem 0.8rem;
     border-radius: 20px;
     font-size: 0.8rem;
     font-weight: 600;
 }

 .out-of-stock-badge {
     background: #dc3545 !important;
     color: white !important;
 }

 .product-info {
     padding: 1.5rem;
 }

 .product-title {
     font-size: 1.1rem;
     font-weight: 600;
     margin-bottom: 0.5rem;
     color: var(--dark-color);
     text-decoration: none;
     display: -webkit-box;
     -webkit-line-clamp: 2;
     line-clamp: 2;
     -webkit-box-orient: vertical;
     overflow: hidden;
 }

 .product-title:hover {
     color: var(--primary-color);
 }

 .product-description {
     color: var(--secondary-color);
     font-size: 0.9rem;
     margin-bottom: 1rem;
     display: -webkit-box;
     -webkit-line-clamp: 2;
     line-clamp: 2;
     -webkit-box-orient: vertical;
     overflow: hidden;
 }

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

 .current-price {
     font-size: 1.3rem;
     font-weight: 700;
     color: var(--primary-color);
 }

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

 .discount-badge {
     background: #dc3545;
     color: white;
     padding: 0.2rem 0.5rem;
     border-radius: 4px;
     font-size: 0.8rem;
     font-weight: 600;
 }

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

 .stars {
     color: #ffc107;
 }

 .rating-text {
     color: var(--secondary-color);
     font-size: 0.9rem;
 }

 .add-to-cart-btn {
     width: 100%;
     padding: 0.75rem;
     background: var(--primary-color);
     color: white;
     border: none;
     border-radius: 8px;
     font-weight: 600;
     cursor: pointer;
     transition: all 0.3s ease;
 }

 .add-to-cart-btn:hover {
     background: #1d4ed8;
     transform: translateY(-1px);
 }

 .add-to-cart-btn:disabled {
     background: #6c757d;
     cursor: not-allowed;
     transform: none;
 }

 /* Pagination */
 .pagination-container {
     display: flex;
     justify-content: center;
     margin: 3rem 0;
 }

 .pagination {
     display: flex;
     gap: 0.5rem;
     align-items: center;
 }

 .pagination .page-link {
     padding: 0.7rem 1rem;
     border: 1px solid #dee2e6;
     background: white;
     color: var(--primary-color);
     text-decoration: none;
     border-radius: 6px;
     transition: all 0.3s ease;
 }

 .pagination .page-link:hover {
     background: var(--primary-color);
     color: white;
     border-color: var(--primary-color);
 }

 .pagination .page-link.active {
     background: var(--primary-color);
     color: white;
     border-color: var(--primary-color);
 }

 .pagination .page-link.disabled {
     color: #6c757d;
     cursor: not-allowed;
     background: #f8f9fa;
 }

 /* No Products Found */
 .no-products {
     text-align: center;
     padding: 3rem;
     color: var(--secondary-color);
 }

 .no-products i {
     font-size: 4rem;
     margin-bottom: 1rem;
     color: #dee2e6;
 }

 /* Loading Spinner */
 .loading {
     display: none;
     text-align: center;
     padding: 3rem;
 }

 .spinner {
     border: 4px solid #f3f3f3;
     border-top: 4px solid var(--primary-color);
     border-radius: 50%;
     width: 50px;
     height: 50px;
     animation: spin 1s linear infinite;
     margin: 0 auto 1rem;
 }

 @keyframes spin {
     0% {
         transform: rotate(0deg);
     }

     100% {
         transform: rotate(360deg);
     }
 }

 /* Mobile Responsive */
 @media (max-width: 768px) {
     .sort-controls {
         flex-direction: column;
         align-items: stretch;
     }

     .sort-dropdown select {
         min-width: auto;
         width: 100%;
     }

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

     .sidebar {
         position: static;
         margin-bottom: 2rem;
     }
 }

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

     .search-container {
         margin: 0 1rem;
     }
 }

 /* Wishlist Button Styles */
.wishlist-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: white;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    z-index: 10;
}

.wishlist-btn i {
    font-size: 1.2rem;
    color: #666;
    transition: all 0.3s ease;
}

.wishlist-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.wishlist-btn:hover i {
    color: #dc3545;
}

/* Wishlist button when product is in wishlist */
.wishlist-btn.in-wishlist {
    background: #dc3545;
}

.wishlist-btn.in-wishlist i {
    color: white;
}

.wishlist-btn.in-wishlist:hover {
    background: #c82333;
}

/* Out of Stock Badge */
.out-of-stock-badge {
    background: #dc3545 !important;
    color: white !important;
}

/* Low Stock Warning */
.low-stock-warning {
    background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%);
    color: #856404;
    padding: 0.5rem 0.75rem;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    border: 1px solid #ffc107;
    animation: pulse-warning 2s ease-in-out infinite;
}

.low-stock-warning i {
    font-size: 0.9rem;
    animation: shake 0.5s ease-in-out infinite;
}

@keyframes pulse-warning {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(255, 193, 7, 0.4);
    }
    50% {
        box-shadow: 0 0 0 4px rgba(255, 193, 7, 0.1);
    }
}

@keyframes shake {
    0%, 100% {
        transform: translateX(0);
    }
    25% {
        transform: translateX(-2px);
    }
    75% {
        transform: translateX(2px);
    }
}
