/* Products Page Styles */

.products-page {
    background: var(--secondary);
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Hero + breadcrumbs */
.products-hero-section .container {
    text-align: center;
}

.products-breadcrumb {
    margin-bottom: 1.5rem;
}

.products-breadcrumb-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.35rem 0.5rem;
    font-size: 0.875rem;
}

.products-breadcrumb-item {
    display: inline-flex;
    align-items: center;
}

.products-breadcrumb-sep {
    color: var(--muted-foreground);
    user-select: none;
}

.products-breadcrumb-link {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

.products-breadcrumb-link:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

.products-breadcrumb-current {
    color: var(--muted-foreground);
    font-weight: 600;
}

.products-hero-header {
    max-width: 48rem;
    margin: 0 auto;
}

.products-hero-title {
    font-size: 1.875rem;
    font-weight: 700;
    margin: 0;
    line-height: 1.2;
    color: var(--foreground);
}

@media (min-width: 640px) {
    .products-hero-title {
        font-size: 2.25rem;
    }
}

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

.products-hero-lead {
    margin: 1rem 0 0;
    font-size: 1rem;
    line-height: 1.65;
    color: var(--muted-foreground);
}

@media (min-width: 640px) {
    .products-hero-lead {
        font-size: 1.125rem;
    }
}

.products-hero-meta {
    margin: 1.25rem 0 0;
    font-size: 0.875rem;
    color: var(--muted-foreground);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.35rem 0.5rem;
}

.products-hero-meta-sep {
    color: var(--border);
}

.products-hero-count {
    font-weight: 600;
    color: var(--foreground);
}

/* Category chips */
.products-chips-section {
    padding-top: var(--space-md, 1.5rem);
    padding-bottom: var(--space-md, 1.5rem);
}

.products-chips-heading {
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0 0 1rem;
    text-align: center;
    color: var(--foreground);
}

@media (min-width: 768px) {
    .products-chips-heading {
        font-size: 1.5rem;
        margin-bottom: 1.25rem;
    }
}

.products-category-chips {
    display: flex;
    flex-wrap: nowrap;
    gap: 0.5rem;
    overflow-x: auto;
    padding-bottom: 0.5rem;
    margin: 0 -0.25rem;
    scroll-snap-type: x proximity;
    -webkit-overflow-scrolling: touch;
}

.products-category-chips::-webkit-scrollbar {
    height: 6px;
}

.products-category-chips::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 3px;
}

.products-category-chip {
    flex: 0 0 auto;
    scroll-snap-align: start;
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 1rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 600;
    text-decoration: none;
    color: var(--foreground);
    background: var(--background);
    border: 1px solid var(--border);
    transition: background 0.2s, border-color 0.2s, color 0.2s;
    white-space: nowrap;
}

.products-category-chip:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.products-category-chip.is-active {
    background: var(--primary);
    border-color: var(--primary);
    color: var(--primary-foreground);
}

.products-category-chip.is-active:hover {
    color: var(--primary-foreground);
    border-color: var(--primary-dark);
    background: var(--primary-dark);
}

.products-category-chip-count {
    font-weight: 500;
    opacity: 0.9;
}

.products-results-stack {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

@media (min-width: 640px) {
    .products-results-stack {
        gap: 3rem;
    }
}

.products-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

@media (min-width: 1024px) {
    .products-layout {
        grid-template-columns: repeat(4, 1fr);
        gap: 1.5rem;
    }
}

.products-main {
    order: 2;
}

@media (min-width: 1024px) {
    .products-main {
        grid-column: span 3;
        order: 1;
    }
}

.products-sidebar {
    order: 1;
    display: none;
}

@media (min-width: 1024px) {
    .products-sidebar {
        display: block;
        grid-column: span 1;
        order: 2;
    }
}

.search-filter-bar {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.search-input-wrapper {
    flex: 1;
    position: relative;
}

.search-input {
    width: 100%;
    padding: 0.625rem 0.875rem;
    padding-left: 2.5rem;
    border: 1px solid var(--border);
    border-radius: calc(var(--radius) - 2px);
    font-size: 0.875rem;
    background: var(--background);
    color: var(--foreground);
    transition: border-color 0.2s, box-shadow 0.2s;
}

.search-input:focus {
    outline: none;
    border-color: var(--ring);
    box-shadow: 0 0 0 3px hsl(var(--ring) / 0.1);
}

.search-icon {
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    width: 1rem;
    height: 1rem;
    color: var(--muted-foreground);
    pointer-events: none;
}

.filter-button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    border: 1px solid var(--border);
    border-radius: calc(var(--radius) - 2px);
    background: var(--background);
    color: var(--foreground);
    cursor: pointer;
    transition: all 0.2s;
}

.filter-button:hover {
    background: var(--accent);
}

@media (min-width: 1024px) {
    .filter-button {
        display: none;
    }
}

.filter-icon {
    width: 1rem;
    height: 1rem;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

@media (min-width: 640px) {
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
}

@media (min-width: 1280px) {
    .products-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.search-results-info {
    font-size: 0.875rem;
    color: var(--muted-foreground);
    margin-bottom: 1rem;
}

.empty-state {
    text-align: center;
    padding: 3rem 0;
}

.empty-state p {
    font-size: 1.125rem;
    color: var(--muted-foreground);
}

/* Mobile Sheet/Drawer */
.mobile-categories-sheet {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    max-width: 300px;
    height: 100vh;
    background: var(--background);
    box-shadow: 2px 0 8px rgba(0, 0, 0, 0.1);
    z-index: 50;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    overflow-y: auto;
    padding: 1.5rem;
    padding-top: 3.5rem;
}

@media (min-width: 640px) {
    .mobile-categories-sheet {
        max-width: 400px;
    }
}

.mobile-categories-sheet.open {
    transform: translateX(0);
}

.sheet-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 40;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.sheet-overlay.open {
    opacity: 1;
    pointer-events: all;
}

.sheet-header {
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border);
}

.sheet-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0;
}

.sheet-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 2rem;
    height: 2rem;
    border: none;
    background: transparent;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--foreground);
}

/* Category sidebar styles */
.category-group {
    margin-bottom: 0.25rem;
}

.text-muted-foreground {
    color: var(--muted-foreground);
}

.bg-accent {
    background: var(--accent);
}

.hover\:bg-accent:hover {
    background: var(--accent);
}
