﻿/* Shop Page Container */
.shop-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 40px 20px;
}

/* Page Header */
.page-header {
    text-align: center;
    margin-bottom: 40px;
}

    .page-header h1 {
        font-size: 2.5rem;
        color: var(--primary);
        margin-bottom: 10px;
    }

    .page-header p {
        font-size: 1.1rem;
        color: var(--text-light);
    }

/* Shop Layout Grid */
.shop-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 30px;
    margin-top: 30px;
}

/* Shop Sidebar */
.shop-sidebar {
    background: white;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    height: fit-content;
    position: sticky;
    top: 100px;
}

/* Filters (Alternative name for sidebar) */
.shop-filters {
    background: white;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    height: fit-content;
    position: sticky;
    top: 100px;
}

    .shop-sidebar h3,
    .shop-filters h3 {
        font-size: 1.3rem;
        margin-bottom: 20px;
        color: var(--primary);
        border-bottom: 2px solid var(--primary);
        padding-bottom: 10px;
    }

/* Filter Groups */
.filter-group {
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}

    .filter-group:last-child {
        border-bottom: none;
        margin-bottom: 0;
        padding-bottom: 0;
    }

    .filter-group h4 {
        font-size: 1rem;
        margin-bottom: 15px;
        color: var(--text-dark);
        font-weight: 600;
        display: flex;
        align-items: center;
        gap: 8px;
    }

        .filter-group h4 i {
            color: var(--primary);
            font-size: 0.9rem;
        }

/* Filter Options */
.filter-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.filter-option {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    padding: 5px 0;
    transition: all 0.3s ease;
    border-radius: 6px;
}

    .filter-option:hover {
        color: var(--primary);
        background: rgba(102, 126, 234, 0.05);
        padding-left: 10px;
    }

    .filter-option input[type="checkbox"],
    .filter-option input[type="radio"] {
        cursor: pointer;
        width: 18px;
        height: 18px;
        accent-color: var(--primary);
        margin: 0;
    }

    .filter-option label {
        cursor: pointer;
        flex: 1;
        font-size: 0.95rem;
        user-select: none;
    }

    .filter-option .count {
        font-size: 0.85rem;
        color: var(--text-light);
        background: #f5f5f5;
        padding: 2px 8px;
        border-radius: 10px;
    }

/* Price Range Slider */
.price-range {
    margin-top: 15px;
}

.price-inputs {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

    .price-inputs input {
        width: 100%;
        padding: 10px 12px;
        border: 1px solid #ddd;
        border-radius: 8px;
        font-size: 0.9rem;
        font-family: inherit;
        transition: border-color 0.3s ease;
    }

        .price-inputs input:focus {
            outline: none;
            border-color: var(--primary);
        }

.price-slider {
    width: 100%;
    height: 6px;
    background: linear-gradient(to right, var(--primary) 0%, var(--primary) 50%, #ddd 50%, #ddd 100%);
    border-radius: 3px;
    outline: none;
    -webkit-appearance: none;
    cursor: pointer;
}

    .price-slider::-webkit-slider-thumb {
        -webkit-appearance: none;
        appearance: none;
        width: 20px;
        height: 20px;
        background: var(--primary);
        cursor: pointer;
        border-radius: 50%;
        border: 3px solid white;
        box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
        transition: transform 0.2s ease;
    }

        .price-slider::-webkit-slider-thumb:hover {
            transform: scale(1.15);
        }

    .price-slider::-moz-range-thumb {
        width: 20px;
        height: 20px;
        background: var(--primary);
        cursor: pointer;
        border-radius: 50%;
        border: 3px solid white;
        box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
        transition: transform 0.2s ease;
    }

        .price-slider::-moz-range-thumb:hover {
            transform: scale(1.15);
        }

.price-display {
    display: flex;
    justify-content: space-between;
    margin-top: 10px;
    font-size: 0.9rem;
    color: var(--text-light);
}

/* Color Swatches */
.color-swatches {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
}

.color-swatch {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    border: 2px solid #ddd;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

    .color-swatch:hover {
        transform: scale(1.15);
        border-color: var(--primary);
    }

    .color-swatch.selected {
        border-color: var(--primary);
        border-width: 3px;
        box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.2);
    }

    .color-swatch::after {
        content: '✓';
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        color: white;
        font-size: 1rem;
        opacity: 0;
        transition: opacity 0.3s ease;
    }

    .color-swatch.selected::after {
        opacity: 1;
    }

/* Rating Filter */
.rating-options {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.rating-option {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 5px 0;
    cursor: pointer;
    transition: color 0.3s ease;
}

    .rating-option:hover {
        color: var(--primary);
    }

.stars {
    color: #ffc107;
    font-size: 0.9rem;
}

    .stars .empty {
        color: #ddd;
    }

/* Filter Buttons */
.filter-actions {
    display: flex;
    gap: 10px;
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

    .filter-actions .btn {
        flex: 1;
        padding: 12px;
        font-size: 0.95rem;
        font-weight: 600;
        border: none;
        border-radius: 8px;
        cursor: pointer;
        transition: all 0.3s ease;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
    }

.btn-apply {
    background: var(--primary);
    color: white;
}

    .btn-apply:hover {
        background: var(--primary-dark);
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
    }

.btn-reset {
    background: #f5f5f5;
    color: var(--text-dark);
}

    .btn-reset:hover {
        background: #e0e0e0;
    }

/* Active Filters Display */
.active-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

.active-filter-tag {
    background: var(--primary);
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

    .active-filter-tag i {
        cursor: pointer;
        opacity: 0.8;
        transition: opacity 0.3s ease;
    }

        .active-filter-tag i:hover {
            opacity: 1;
        }

/* Products Area */
.shop-products {
    min-height: 500px;
}

/* Products Header */
.products-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding: 20px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.products-count {
    font-size: 1rem;
    color: var(--text-light);
}

    .products-count span {
        font-weight: 600;
        color: var(--primary);
        font-size: 1.1rem;
    }

.products-sort {
    display: flex;
    align-items: center;
    gap: 10px;
}

    .products-sort label {
        font-size: 0.95rem;
        color: var(--text-dark);
        font-weight: 500;
    }

    .products-sort select {
        padding: 10px 15px;
        border: 1px solid #ddd;
        border-radius: 8px;
        font-size: 0.95rem;
        cursor: pointer;
        background: white;
        font-family: inherit;
        transition: border-color 0.3s ease;
    }

        .products-sort select:focus {
            outline: none;
            border-color: var(--primary);
        }

/* Products Grid */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
}

/* View Toggle Buttons */
.view-toggle {
    display: flex;
    gap: 5px;
    background: #f5f5f5;
    padding: 5px;
    border-radius: 8px;
}

.view-btn {
    padding: 8px 12px;
    border: none;
    background: transparent;
    cursor: pointer;
    border-radius: 6px;
    color: var(--text-light);
    transition: all 0.3s ease;
}

    .view-btn.active {
        background: white;
        color: var(--primary);
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    }

    .view-btn:hover:not(.active) {
        color: var(--primary);
    }

/* Mobile Filter Toggle */
.filter-toggle {
    display: none;
    width: 100%;
    padding: 15px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    margin-bottom: 20px;
    transition: all 0.3s ease;
}

    .filter-toggle:hover {
        background: var(--primary-dark);
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
    }

    .filter-toggle i {
        margin-left: 8px;
    }

/* Loading State */
#productsLoading {
    text-align: center;
    padding: 60px 20px;
}

    #productsLoading i {
        font-size: 3rem;
        color: var(--primary);
        animation: spin 1s linear infinite;
    }

@keyframes spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

/* Empty State */
#productsEmpty {
    text-align: center;
    padding: 80px 20px;
}

    #productsEmpty i {
        font-size: 5rem;
        color: #ddd;
        margin-bottom: 20px;
    }

    #productsEmpty h3 {
        font-size: 1.5rem;
        color: var(--text-dark);
        margin-bottom: 10px;
    }

    #productsEmpty p {
        color: var(--text-light);
    }

/* Responsive Design */
@media (max-width: 1024px) {
    .shop-layout {
        grid-template-columns: 250px 1fr;
        gap: 20px;
    }

    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    }
}

@media (max-width: 768px) {
    .shop-layout {
        grid-template-columns: 1fr;
    }

    .shop-sidebar,
    .shop-filters {
        position: static;
        margin-bottom: 20px;
    }

    .filter-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .shop-sidebar.hidden,
    .shop-filters.hidden {
        display: none;
    }

    .products-header {
        flex-direction: column;
        gap: 15px;
        align-items: stretch;
    }

    .products-sort {
        flex-direction: column;
        align-items: stretch;
    }

        .products-sort select {
            width: 100%;
        }

    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 15px;
    }

    .page-header h1 {
        font-size: 2rem;
    }
}

@media (max-width: 480px) {
    .shop-container {
        padding: 20px 15px;
    }

    .products-grid {
        grid-template-columns: 1fr;
    }

    .filter-actions {
        flex-direction: column;
    }

    .page-header h1 {
        font-size: 1.75rem;
    }

    .page-header p {
        font-size: 1rem;
    }
}
