/* ===== PAGE HEADER ===== */
.page-header {
    background: linear-gradient(rgba(27, 48, 34, 0.8), rgba(27, 48, 34, 0.9)), 
                url('https://images.unsplash.com/photo-1513475382585-d06e58bcb0e0?ixlib=rb-4.0.3&auto=format&fit=crop&w=2070&q=80');
    background-size: cover;
    background-position: center;
    color: var(--cream);
    padding: 80px 0;
    text-align: center;
}

.page-header h1 {
    font-size: 42px;
    color: var(--cream);
    margin-bottom: 15px;
}

.page-header p {
    font-size: 18px;
    max-width: 600px;
    margin: 0 auto;
    opacity: 0.9;
}

/* ===== PRODUCTS LAYOUT ===== */
.products-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 40px;
    position: relative;
}

/* ===== FILTERS SIDEBAR ===== */
.filters-sidebar {
    background-color: var(--cream);
    border-radius: 8px;
    padding: 25px;
    box-shadow: var(--shadow);
    height: fit-content;
    position: sticky;
    top: 120px;
}

.filters-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(197, 160, 89, 0.2);
}

.filters-header h3 {
    font-size: 22px;
}

.close-filters {
    display: none;
    background: none;
    border: none;
    font-size: 20px;
    color: var(--forest-green);
    cursor: pointer;
}

.filter-group {
    margin-bottom: 30px;
}

.filter-group h4 {
    margin-bottom: 15px;
    font-size: 16px;
    color: var(--light-green);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Search Filter */
.search-filter {
    display: flex;
    position: relative;
}

.search-filter input {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid rgba(197, 160, 89, 0.3);
    border-radius: 4px;
    font-family: 'Montserrat', sans-serif;
    background-color: transparent;
}

.search-filter button {
    position: absolute;
    right: 0;
    top: 0;
    height: 100%;
    background: none;
    border: none;
    padding: 0 15px;
    color: var(--forest-green);
    cursor: pointer;
}

/* Price Filter */
.price-inputs {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
}

.price-inputs input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid rgba(197, 160, 89, 0.3);
    border-radius: 4px;
    font-family: 'Montserrat', sans-serif;
    background-color: transparent;
}

.price-inputs span {
    color: var(--deep-gold);
    font-weight: 600;
}

.price-slider {
    margin-top: 10px;
}

.price-slider input[type="range"] {
    width: 100%;
    height: 4px;
    -webkit-appearance: none;
    background: rgba(197, 160, 89, 0.3);
    border-radius: 2px;
    outline: none;
}

.price-slider input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--deep-gold);
    cursor: pointer;
}

.price-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 5px;
    font-size: 12px;
    color: var(--light-green);
}

/* Category Filter */
.category-filter {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.category-item {
    display: flex;
    align-items: center;
    cursor: pointer;
    position: relative;
    padding-left: 30px;
}

.category-item input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.checkmark {
    position: absolute;
    left: 0;
    top: 2px;
    height: 18px;
    width: 18px;
    border: 2px solid rgba(197, 160, 89, 0.5);
    border-radius: 3px;
    transition: var(--transition);
}

.category-item:hover .checkmark {
    border-color: var(--deep-gold);
}

.category-item input:checked ~ .checkmark {
    background-color: var(--deep-gold);
    border-color: var(--deep-gold);
}

.checkmark:after {
    content: "";
    position: absolute;
    display: none;
}

.category-item input:checked ~ .checkmark:after {
    display: block;
}

.category-item .checkmark:after {
    left: 5px;
    top: 1px;
    width: 5px;
    height: 10px;
    border: solid var(--forest-green);
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

/* Sort Options */
.sort-options select {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid rgba(197, 160, 89, 0.3);
    border-radius: 4px;
    font-family: 'Montserrat', sans-serif;
    background-color: transparent;
    color: var(--forest-green);
    cursor: pointer;
}

.clear-filters {
    width: 100%;
    margin-top: 10px;
}

/* ===== MOBILE FILTERS ===== */
.mobile-filters-btn {
    display: none;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.mobile-filters-btn .btn {
    display: flex;
    align-items: center;
    gap: 8px;
}

.sort-mobile select {
    padding: 10px 15px;
    border: 1px solid rgba(197, 160, 89, 0.3);
    border-radius: 4px;
    font-family: 'Montserrat', sans-serif;
    background-color: transparent;
    color: var(--forest-green);
    cursor: pointer;
}

/* ===== PRODUCTS GRID CONTAINER ===== */
.products-grid-container {
    flex: 1;
}

.products-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(197, 160, 89, 0.2);
}

#products-count {
    color: var(--light-green);
    font-weight: 500;
}

.view-options {
    display: flex;
    gap: 10px;
}

.view-btn {
    width: 40px;
    height: 40px;
    border: 1px solid rgba(197, 160, 89, 0.3);
    background: transparent;
    border-radius: 4px;
    color: var(--forest-green);
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.view-btn.active, .view-btn:hover {
    background-color: var(--deep-gold);
    border-color: var(--deep-gold);
    color: var(--forest-green);
}

/* ===== PRODUCTS GRID ===== */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
    transition: var(--transition);
}

.products-grid[data-view="list"] {
    grid-template-columns: 1fr;
}

.products-grid[data-view="list"] .product-card {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 25px;
    align-items: center;
}

.products-grid[data-view="list"] .product-img {
    height: 180px;
}

.products-grid[data-view="list"] .product-info h3 {
    height: auto;
    margin-bottom: 10px;
}

.products-grid[data-view="list"] .product-description {
    display: block;
    margin-bottom: 15px;
    color: var(--light-green);
    line-height: 1.6;
}

.products-grid[data-view="list"] .product-actions {
    display: flex;
    gap: 10px;
}

.product-card {
    background-color: var(--cream);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

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

.product-img {
    height: 200px;
    overflow: hidden;
}

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

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

.product-info {
    padding: 20px;
}

.product-info h3 {
    font-size: 18px;
    margin-bottom: 10px;
    height: 50px;
    overflow: hidden;
}

.product-description {
    display: none;
}

.product-category {
    display: inline-block;
    padding: 4px 10px;
    background-color: rgba(197, 160, 89, 0.1);
    color: var(--deep-gold);
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    margin-bottom: 10px;
}

.product-price {
    color: var(--deep-gold);
    font-weight: 600;
    font-size: 20px;
    margin-bottom: 15px;
}

.product-rating {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-bottom: 15px;
    color: var(--deep-gold);
}

.product-actions {
    display: flex;
    gap: 10px;
}

.add-to-cart, .view-details {
    flex: 1;
    padding: 10px;
    border: none;
    border-radius: 4px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
}

.add-to-cart {
    background-color: var(--forest-green);
    color: var(--cream);
}

.add-to-cart:hover {
    background-color: var(--light-green);
}

.view-details {
    background-color: transparent;
    color: var(--forest-green);
    border: 1px solid rgba(197, 160, 89, 0.5);
}

.view-details:hover {
    background-color: rgba(197, 160, 89, 0.1);
}

/* ===== PAGINATION ===== */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    margin-top: 50px;
}

.page-btn {
    padding: 10px 20px;
    background-color: transparent;
    border: 1px solid rgba(197, 160, 89, 0.3);
    border-radius: 4px;
    color: var(--forest-green);
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
}

.page-btn:hover:not(:disabled) {
    background-color: var(--deep-gold);
    border-color: var(--deep-gold);
    color: var(--forest-green);
}

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

.page-numbers {
    display: flex;
    gap: 5px;
}

.page-number {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    cursor: pointer;
    transition: var(--transition);
    font-weight: 500;
}

.page-number:hover, .page-number.active {
    background-color: var(--deep-gold);
    color: var(--forest-green);
}

.dots {
    display: flex;
    align-items: flex-end;
    padding: 0 5px;
}

/* ===== CATEGORIES SECTION ===== */
.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.category-card {
    background-color: var(--cream);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.category-card:hover {
    transform: translateY(-10px);
    text-decoration: none;
}

.category-img {
    height: 200px;
    overflow: hidden;
}

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

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

.category-content {
    padding: 25px;
}

.category-content h3 {
    margin-bottom: 10px;
    font-size: 22px;
}

.category-content p {
    color: var(--light-green);
}

/* ===== RESPONSIVE STYLES ===== */
@media (max-width: 1024px) {
    .products-layout {
        grid-template-columns: 1fr;
    }
    
    .filters-sidebar {
        position: fixed;
        top: 0;
        left: -100%;
        width: 90%;
        max-width: 350px;
        height: 100%;
        z-index: 1100;
        border-radius: 0;
        padding-top: 70px;
        overflow-y: auto;
        transition: left 0.4s ease;
    }
    
    .filters-sidebar.active {
        left: 0;
    }
    
    .close-filters {
        display: block;
    }
    
    .mobile-filters-btn {
        display: flex;
    }
}

@media (max-width: 768px) {
    .page-header {
        padding: 60px 0;
    }
    
    .page-header h1 {
        font-size: 32px;
    }
    
    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }
    
    .products-grid[data-view="list"] .product-card {
        grid-template-columns: 1fr;
    }
    
    .products-grid[data-view="list"] .product-img {
        height: 200px;
    }
    
    .pagination {
        flex-wrap: wrap;
    }
}

@media (max-width: 576px) {
    .products-grid {
        grid-template-columns: 1fr;
    }
    
    .products-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .categories-grid {
        grid-template-columns: 1fr;
    }
}