/* Products Hero */
.products-hero {
    position: relative;
    width: 100%;
    height: 50vh;
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 80px;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover;
}

.products-hero .hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.4);
}

.products-hero .hero-content {
    position: relative;
    z-index: 10;
    text-align: center;
    color: white;
}

.products-hero .hero-title {
    font-size: 2.5rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    letter-spacing: 0.1em;
}

.products-hero .hero-subtitle {
    font-size: 1.125rem;
    max-width: 700px;
    opacity: 0.9;
}

/* Products Section */
.products-section {
    padding: 3rem 1rem;
    background-color: var(--background);
}

.products-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 2rem;
}

.product-count {
    font-size: 0.875rem;
    color: var(--muted-foreground);
}

.filter-toggle {
    background: none;
    border: 1px solid var(--border);
    color: var(--foreground);
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    cursor: pointer;
    font-size: 0.875rem;
    transition: all 0.3s ease;
}

.filter-toggle:hover {
    border-color: var(--primary);
    color: var(--primary);
}

/* Products Layout */
.products-layout {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 2rem;
}

/* Replacing old filter styles with v0-style accordion filters */
.filters-sidebar {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.filter-section {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.filter-section-title {
    font-size: 0.875rem;
    font-weight: 500;
    letter-spacing: 0.05em;
    margin-bottom: 1rem;
    color: var(--foreground);
}

.filter-category-group {
    display: flex;
    flex-direction: column;
}

.filter-category-header {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.filter-expand-btn {
    width: 2rem;
    height: 2rem;
    padding: 0;
    background: transparent;
    border: none;
    border-radius: 0.375rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background-color 0.2s;
}

.filter-expand-btn:hover {
    /* Using v0 exact hover color */
    background-color: oklch(0.95 0.01 85 / 0.1);
}

.chevron-icon {
    transition: transform 0.2s;
    color: var(--muted-foreground);
}

.filter-category-group.expanded .chevron-icon {
    transform: rotate(90deg);
}

.filter-button,
.filter-subbutton {
    width: 100%;
    padding: 0.5rem 1rem;
    background: transparent;
    border: none;
    border-radius: 0.375rem;
    cursor: pointer;
    text-align: left;
    font-size: 0.875rem;
    color: var(--foreground);
    transition: background-color 0.2s;
}

.filter-button {
    flex: 1;
}

.filter-button:hover,
.filter-subbutton:hover {
    /* Using v0 exact hover color */
    background-color: oklch(0.95 0.01 85 / 0.1);
}

.filter-button.active,
.filter-subbutton.active {
    background-color: var(--primary);
    color: var(--primary-foreground);
}

.filter-subcategories {
    display: none;
    flex-direction: column;
    gap: 0.25rem;
    margin-left: 2rem;
    margin-top: 0.25rem;
}

.filter-category-group.expanded .filter-subcategories {
    display: flex;
}

.filter-subbutton {
    font-size: 0.875rem;
    padding: 0.5rem 1rem;
}

/* Products Grid */
.products-grid {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)) !important;
    gap: 1.5rem !important;
}

/* Hide close button by default, only show in mobile */
.filter-close-btn {
    display: none;
}

/* Responsive */
/* Responsive fixes for new filter design */
@media (max-width: 1024px) {
    .products-layout {
        grid-template-columns: 1fr;
    }

    .filters-sidebar {
        display: none;
        position: fixed;
        inset: 0;
        background-color: var(--background);
        z-index: 500;
        /* Updated padding-top to prevent navbar from covering filters */
        padding: 6rem 1rem 1rem 1rem;
        overflow-y: auto;
    }

    .filters-sidebar.active {
        display: flex;
    }
    
    /* Add close button container for mobile */
    .filter-section {
        position: relative;
    }
    
    .filter-close-btn {
        /* Show close button only in mobile when sidebar is active */
        position: fixed;
        top: 5rem;
        right: 1rem;
        background: transparent;
        border: none;
        padding: 0.5rem;
        cursor: pointer;
        color: var(--foreground);
        z-index: 501;
    }
    
    .filters-sidebar.active .filter-close-btn {
        display: block;
    }

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

@media (max-width: 768px) {
    .products-hero .hero-title {
        font-size: 1.875rem;
    }

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

    .products-header {
        flex-direction: row;
    }
}