/* Products page styles */

/* Page Header */
.page-header {
    background: linear-gradient(135deg, #8b5cf6 0%, #06b6d4 100%);
    color: white;
    padding: 4rem 0 2rem;
    text-align: center;
}

.page-header h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.page-header p {
    font-size: 1.2rem;
    opacity: 0.9;
}

/* Product Filters */
.product-filters {
    background: #f8fafc;
    padding: 2rem 0;
    border-bottom: 1px solid #e5e7eb;
}

.filter-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.category-filters {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 0.75rem 1.5rem;
    border: 2px solid #e5e7eb;
    background: white;
    color: #6b7280;
    border-radius: 25px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-btn:hover,
.filter-btn.active {
    border-color: #8b5cf6;
    background: #8b5cf6;
    color: white;
    transform: translateY(-2px);
}

.sort-options select {
    padding: 0.75rem 1rem;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    background: white;
    font-weight: 500;
    cursor: pointer;
    transition: border-color 0.3s ease;
}

.sort-options select:focus {
    outline: none;
    border-color: #8b5cf6;
}

/* Price Filter */
.price-filter {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.price-filter label {
    font-weight: 500;
    color: #374151;
}

.price-range {
    display: flex;
    align-items: center;
    gap: 1rem;
    position: relative;
}

.price-range input[type="range"] {
    width: 150px;
    height: 6px;
    background: #e5e7eb;
    border-radius: 3px;
    outline: none;
    cursor: pointer;
}

.price-range input[type="range"]::-webkit-slider-thumb {
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #8b5cf6;
    cursor: pointer;
    border: 2px solid white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.price-range input[type="range"]::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #8b5cf6;
    cursor: pointer;
    border: 2px solid white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.price-values {
    display: flex;
    gap: 1rem;
    font-size: 0.9rem;
    color: #6b7280;
    font-weight: 500;
}

/* Featured Products */
.featured-products {
    padding: 3rem 0;
}

.featured-grid {
    display: grid;
    grid-template-columns: 1fr;
    max-width: 800px;
    margin: 0 auto;
}

/* Products Grid */
.products-grid-section {
    padding: 3rem 0;
    background: #f8fafc;
}

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

/* Product Items */
.product-item {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    cursor: pointer;
    display: flex;
    flex-direction: column;
}

.product-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 40px rgba(0,0,0,0.15);
}

.product-item.featured {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    max-height: none;
}

.product-image {
    position: relative;
    overflow: hidden;
}

.product-item:not(.featured) .product-image {
    height: 250px;
}

.product-item.featured .product-image {
    height: 400px;
}

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

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

/* Product Badges */
.product-badge {
    position: absolute;
    top: 1rem;
    left: 1rem;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    z-index: 2;
}

.product-badge.editor-choice {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
}

.product-badge.best-seller {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: white;
}

.product-badge.new {
    background: linear-gradient(135deg, #8b5cf6, #2563eb);
    color: white;
}

.product-badge.value {
    background: linear-gradient(135deg, #8b5cf6, #7c3aed);
    color: white;
}

.product-badge.premium {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
}

/* Product Rating */
.product-rating {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(0,0,0,0.8);
    color: white;
    padding: 0.5rem;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.9rem;
    font-weight: 600;
    z-index: 2;
}

.product-rating i {
    color: #fbbf24;
    font-size: 0.8rem;
}

/* Product Overlay */
.product-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.product-item:hover .product-overlay {
    opacity: 1;
}

.view-product-btn {
    background: #8b5cf6;
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    transform: translateY(10px);
}

.product-item:hover .view-product-btn {
    transform: translateY(0);
}

.view-product-btn:hover {
    background: #2563eb;
}

/* Product Info */
.product-info {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.product-item.featured .product-info {
    padding: 2rem;
    justify-content: center;
}

.product-category {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #8b5cf6;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.product-info h3 {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 1rem;
    line-height: 1.3;
}

.product-item.featured .product-info h3 {
    font-size: 1.8rem;
}

.product-info h3 a {
    color: #1f2937;
    text-decoration: none;
    transition: color 0.3s ease;
}

.product-info h3 a:hover {
    color: #8b5cf6;
}

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

.current-price {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1f2937;
}

.product-item.featured .current-price {
    font-size: 2rem;
}

.original-price {
    font-size: 1.1rem;
    color: #9ca3af;
    text-decoration: line-through;
}

.product-highlights {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.highlight {
    background: #f3f4f6;
    color: #374151;
    padding: 0.3rem 0.6rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
}

.product-description {
    color: #6b7280;
    line-height: 1.6;
    margin-bottom: auto;
    padding-bottom: 1rem;
}

.product-item.featured .product-description {
    font-size: 1.1rem;
}

.product-actions {
    display: flex;
    gap: 1rem;
    margin-top: auto;
}

.product-actions .btn {
    flex: 1;
    text-align: center;
    padding: 0.75rem 1rem;
    font-size: 0.9rem;
}

/* Comparison Banner */
.comparison-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #1f2937;
    color: white;
    padding: 1rem 0;
    z-index: 50;
    transform: translateY(100%);
    transition: transform 0.3s ease;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.1);
}

.comparison-banner.active {
    transform: translateY(0);
}

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

.comparison-text h3 {
    font-size: 1.2rem;
    margin-bottom: 0.3rem;
}

.comparison-text p {
    font-size: 0.9rem;
    opacity: 0.8;
    margin: 0;
}

.comparison-counter {
    background: #8b5cf6;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: 600;
}

/* Load More */
.load-more-container {
    text-align: center;
    margin-top: 2rem;
}

/* No Results */
.no-results {
    text-align: center;
    padding: 4rem 0;
    color: #6b7280;
}

.no-results h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: #374151;
}

.no-results p {
    font-size: 1.1rem;
    margin-bottom: 2rem;
}

/* Animation for filtered products */
.product-item.fade-out {
    opacity: 0;
    transform: scale(0.95);
}

.product-item.fade-in {
    opacity: 1;
    transform: scale(1);
}

/* Responsive Design */
@media (max-width: 1024px) {
    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    }
    
    .product-item.featured {
        grid-template-columns: 1fr;
    }
    
    .product-item.featured .product-image {
        height: 300px;
    }
}

@media (max-width: 768px) {
    .page-header h1 {
        font-size: 2.5rem;
    }
    
    .filter-wrapper {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
    }
    
    .category-filters {
        justify-content: center;
    }
    
    .price-filter {
        justify-content: center;
    }
    
    .products-grid {
        grid-template-columns: 1fr;
    }
    
    .product-actions {
        flex-direction: column;
    }
    
    .comparison-content {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
    
    .comparison-text {
        order: 1;
    }
    
    .comparison-counter {
        order: 2;
    }
    
    #compareBtn {
        order: 3;
    }
}

@media (max-width: 480px) {
    .page-header {
        padding: 3rem 0 1.5rem;
    }
    
    .page-header h1 {
        font-size: 2rem;
    }
    
    .product-filters {
        padding: 1.5rem 0;
    }
    
    .category-filters {
        gap: 0.5rem;
    }
    
    .filter-btn {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }
    
    .product-info {
        padding: 1rem;
    }
    
    .product-item.featured .product-info {
        padding: 1.5rem;
    }
    
    .current-price {
        font-size: 1.3rem;
    }
    
    .product-item.featured .current-price {
        font-size: 1.6rem;
    }
    
    .product-info h3 {
        font-size: 1.1rem;
    }
    
    .product-item.featured .product-info h3 {
        font-size: 1.4rem;
    }
    
    .price-range input[type="range"] {
        width: 100px;
    }
    
    .price-filter {
        flex-wrap: wrap;
        gap: 0.5rem;
    }
}

/* High DPI displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 2dppx) {
    .product-image img {
        image-rendering: -webkit-optimize-contrast;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .product-filters {
        background: #111827;
    }
    
    .filter-btn {
        background: #374151;
        color: #f9fafb;
        border-color: #4b5563;
    }
    
    .filter-btn:hover,
    .filter-btn.active {
        background: #8b5cf6;
        border-color: #8b5cf6;
    }
    
    .products-grid-section {
        background: #111827;
    }
    
    .product-item {
        background: #1f2937;
    }
    
    .product-info h3 a {
        color: #f9fafb;
    }
    
    .current-price {
        color: #f9fafb;
    }
    
    .product-description {
        color: #d1d5db;
    }
}