/* Catalog - minimal layout, no overflow */
.catalog-page {
    padding-top: 6rem;
    padding-bottom: 3rem;
    background: #fff;
}

.catalog-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
    box-sizing: border-box;
}

.breadcrumb {
    font-size: 0.875rem;
    color: #666;
    margin-bottom: 1.5rem;
}

.breadcrumb a {
    color: #666;
    text-decoration: none;
}

.breadcrumb a:hover {
    color: #D4735E;
}

.breadcrumb .sep {
    margin: 0 0.5rem;
}

.catalog-title {
    font-size: 2rem;
    font-weight: 700;
    color: #2C2C2C;
    margin: 0 0 1.5rem 0;
}

.catalog-toolbar {
    margin-bottom: 1.5rem;
}

.categories-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.categories-nav a {
    display: inline-block;
    padding: 0.5rem 1rem;
    border-radius: 2rem;
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
    white-space: nowrap;
    border: 2px solid #E5E5E5;
    color: #2C2C2C;
    background: #fff;
}

.categories-nav a:hover {
    border-color: #D4735E;
}

.categories-nav a.active {
    background: #D4735E;
    border-color: #D4735E;
    color: #fff;
}

.catalog-main {
    display: flex;
    gap: 1.5rem;
}

.filters-row {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.filters-toggle {
    display: none;
    padding: 0.5rem 1rem;
    border: 2px solid #E5E5E5;
    border-radius: 2rem;
    background: #fff;
    cursor: pointer;
    font-size: 0.875rem;
}

.filters-panel {
    flex-shrink: 0;
    width: 220px;
}

@media (min-width: 769px) {
    .filters-panel {
        display: block;
    }
    .filters-toggle {
        display: none;
    }
}

.filters-inner {
    background: #fff;
    border: 2px solid #E5E5E5;
    border-radius: 1rem;
    padding: 1.25rem;
}

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

.filters-header h3 {
    font-size: 1.125rem;
    font-weight: 700;
    margin: 0;
    color: #2C2C2C;
}

.filters-reset {
    font-size: 0.75rem;
    color: #D4735E;
    background: none;
    border: none;
    cursor: pointer;
    text-decoration: underline;
}

.filter-group {
    margin-bottom: 1rem;
}

.filter-group label {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    color: #2C2C2C;
    margin-bottom: 0.25rem;
}

.filter-group select,
.filter-group input {
    width: 100%;
    padding: 0.5rem;
    border: 2px solid #E5E5E5;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    box-sizing: border-box;
}

.filter-group input {
    margin-bottom: 0.5rem;
}

.filter-group input:last-of-type {
    margin-bottom: 0.5rem;
}

.btn-apply {
    width: 100%;
    padding: 0.5rem 1rem;
    background: #D4735E;
    color: #fff;
    border: none;
    border-radius: 2rem;
    font-weight: 600;
    font-size: 0.875rem;
    cursor: pointer;
}

.btn-apply:hover {
    background: #C06550;
}

#activeFilters {
    margin-top: 0.5rem;
    font-size: 0.75rem;
}

.products-section {
    flex: 1;
    min-width: 0;
    overflow: hidden;
}

.loading,
.pagination-info {
    text-align: center;
    color: #666;
    padding: 1rem 0;
}

.error-msg {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
    padding: 1rem;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
}

.catalog-page .hidden {
    display: none !important;
}

.products-empty {
    text-align: center;
    color: #666;
    padding: 2rem;
}

.product-placeholder {
    width: 100%;
    height: 100%;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    background: #F5F1E8;
    display: flex;
}

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

.products-grid .product-card {
    background: #fff;
    border-radius: 1rem;
    overflow: hidden;
    border: 2px solid #E5E5E5;
    transition: box-shadow 0.2s, border-color 0.2s;
    display: flex;
    flex-direction: column;
    height: 100%;
    gap: 1rem;
}

.products-grid .product-card:hover {
    border-color: #D4735E;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.products-grid .product-card > a:not(.btn-variant) {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
}

.products-grid .product-image {
    height: 240px;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.products-grid .product-image img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.products-grid .product-body {
    padding: 1rem;
    background: #FDFCFB;
    flex: 1;
}

.products-grid .product-name {
    font-size: 0.9375rem;
    font-weight: 500;
    color: #2C2C2C;
    margin: 0 0 0.25rem 0;
    line-height: 1.3;
}

.products-grid .product-meta {
    font-size: 0.75rem;
    color: #999;
    margin-bottom: 0.5rem;
}

.products-grid .product-price {
    font-size: 1.25rem;
    font-weight: 700;
    color: #2C2C2C;
    margin-bottom: 0.75rem;
}

.products-grid .btn-cart,
.products-grid .btn-variant {
    flex: 0 0 auto;
    height: 40px;
    min-height: 40px;
    max-height: 40px;
    margin: 0 1rem 1rem 1rem;
    margin-top: auto;
    padding: 0 0.875rem;
    background: #2C2C2C;
    color: #fff;
    border: none;
    border-radius: 2rem;
    font-weight: 500;
    font-size: 0.8125rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    text-decoration: none;
    box-sizing: border-box;
}

.products-grid .btn-cart:hover,
.products-grid .btn-variant:hover {
    background: #D4735E;
}

.pagination {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1.5rem;
    flex-wrap: wrap;
}

.pagination button {
    padding: 0.5rem 1rem;
    border: 2px solid #E5E5E5;
    background: #fff;
    border-radius: 0.5rem;
    cursor: pointer;
    font-size: 0.875rem;
}

.pagination button:hover {
    border-color: #D4735E;
    background: #F5F1E8;
}

.pagination button.active {
    background: #D4735E;
    border-color: #D4735E;
    color: #fff;
}

@media (max-width: 768px) {
    .filters-toggle {
        display: inline-flex;
        align-items: center;
        gap: 0.5rem;
    }

    .catalog-main {
        flex-direction: column;
    }

    .filters-panel {
        display: none;
        order: -1;
    }

    .filters-panel.open {
        display: block;
    }

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

    .products-grid .product-image {
        height: 200px;
    }
}
