/* Catalog Specific Styles */

.breadcrumb {
    background: #f8f9fa;
    padding: 1rem 0;
    border-bottom: 1px solid #e9ecef;
}

.breadcrumb nav {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
}

.breadcrumb a {
    color: #666;
    text-decoration: none;
    transition: color 0.3s ease;
}

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

.breadcrumb span {
    color: #999;
}

/* Category Hero */
.category-hero {
    background: linear-gradient(135deg, #1C2A4B 0%, #2d4a7c 100%);
    color: #fff;
    padding: 3rem 0;
    text-align: center;
}

.category-hero h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.category-hero p {
    font-size: 1.125rem;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto;
}

/* Category Navigation */
.category-nav-section {
    background: #fff;
    padding: 2rem 0;
    border-bottom: 1px solid #e9ecef;
}

.category-nav-section .container {
    max-width: none;
    width: 100%;
    padding-left: 2.5rem;
    padding-right: 2.5rem;
}

.category-nav {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    width: 100%;
    justify-content: center;
    padding-bottom: 0.5rem;
    padding-top: 0.25rem;
    gap: 1rem;
}

.category-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1.5rem 1rem;
    background: #f8f9fa;
    border-radius: 8px;
    text-decoration: none;
    color: #333;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    min-width: 200px;
    flex: 0 0 200px;
}

.category-nav-item:hover {
    background: #fff;
    border-color: #FF8C42;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.category-nav-item.active {
    background: #fff;
    border-color: #FF8C42;
    transform: none;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.category-nav-item img {
    width: 96px;
    height: 88px;
    padding-top: 8px;
    box-sizing: border-box;
    object-fit: contain;
    object-position: top center;
    background: #fff;
    border-radius: 0;
    margin-bottom: 0.75rem;
}

@media (max-width: 768px) {
    .category-nav-section .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .category-nav {
        justify-content: flex-start;
    }
}

.category-nav-item h3 {
    font-size: 1rem;
    font-weight: 600;
    text-align: center;
    color: #1C2A4B;
}

.category-nav-item.active h3 {
    color: #FF8C42;
}

/* Products Section */
.products-section {
    padding: 3rem 0;
    background: #f8f9fa;
}

.products-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 1.25rem;
    align-items: start;
}

/* Filters Sidebar */
.filters-sidebar {
    background: #fff;
    border-radius: 8px;
    padding: 1.5rem;
    position: sticky;
    top: 100px;
}

.filters-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #e9ecef;
}

.filters-header-left {
    display: flex;
    align-items: center;
    gap: 8px;
}

.filters-chevron {
    display: none;
    color: #1C2A4B;
    transition: transform 0.25s ease;
    flex-shrink: 0;
}

.filters-header h3 {
    font-size: 1.25rem;
    color: #1C2A4B;
    font-weight: 700;
}

.btn-reset-filters {
    background: transparent;
    border: none;
    color: #FF8C42;
    font-size: 0.875rem;
    cursor: pointer;
    font-weight: 600;
    padding: 0.25rem 0.5rem;
}

.btn-reset-filters:hover {
    text-decoration: underline;
}

.mobile-filter-toggle {
    display: none;
}

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

.filter-group-title {
    font-weight: 600;
    color: #1C2A4B;
    margin-bottom: 0.75rem;
    font-size: 0.95rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    user-select: none;
}

.filter-group-title::after {
    content: '−';
    font-size: 1.5rem;
    color: #999;
    transition: transform 0.3s ease;
}

.filter-group.collapsed .filter-group-title::after {
    content: '+';
}

.filter-options {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

.filter-group.collapsed .filter-options {
    display: none;
}

.filter-option {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

.filter-option input[type="checkbox"],
.filter-option input[type="radio"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #FF8C42;
}

.filter-option label {
    cursor: pointer;
    font-size: 0.875rem;
    color: #555;
    flex: 1;
    display: flex;
    justify-content: space-between;
}

.filter-option-count {
    color: #999;
    font-size: 0.75rem;
}

.filter-range {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

.filter-range input {
    width: 100px;
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.875rem;
}

/* Products Main */
.products-main {
    min-height: 600px;
}

.products-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    background: #fff;
    padding: 1rem 1.5rem;
    border-radius: 8px;
}

.products-count {
    font-weight: 600;
    color: #1C2A4B;
}

.products-count span {
    color: #FF8C42;
    font-size: 1.125rem;
}

.products-sort {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.products-sort label {
    font-size: 0.875rem;
    color: #666;
}

.products-sort select {
    padding: 0.5rem 2rem 0.5rem 0.75rem;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 0.875rem;
    cursor: pointer;
    background: #fff;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23333' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.5rem center;
}

/* Active Filters */
.active-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.active-filter-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    background: #fff;
    border: 1px solid #FF8C42;
    border-radius: 20px;
    font-size: 0.875rem;
    color: #FF8C42;
}

.active-filter-tag button {
    background: transparent;
    border: none;
    color: #FF8C42;
    cursor: pointer;
    font-size: 1.125rem;
    line-height: 1;
    padding: 0;
    margin-left: 0.25rem;
}

.active-filter-tag button:hover {
    color: #e67a35;
}

/* Products Grid */
.products-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
}

.catalog-product-card {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
}

.catalog-product-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.12);
}

.catalog-product-image {
    width: 100%;
    height: 240px;
    background: #ffffff;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.catalog-product-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    display: block;
}

.product-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: #FF8C42;
    color: #fff;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

.catalog-product-content {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.catalog-product-content h3 {
    font-size: 1.125rem;
    color: #1C2A4B;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.product-category {
    font-size: 0.75rem;
    color: #999;
    margin-bottom: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.catalog-product-content p {
    font-size: 0.875rem;
    color: #666;
    line-height: 1.6;
    margin-bottom: 1rem;
    flex: 1;
}

.product-specs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.spec-tag {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
    background: #f8f9fa;
    border-radius: 4px;
    color: #666;
}

.product-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1rem;
    border-top: 1px solid #f0f0f0;
}

.product-price {
    font-size: 1.5rem;
    font-weight: 700;
    color: #FF8C42;
}

.product-price small {
    font-size: 0.875rem;
    font-weight: 400;
    color: #666;
}

.btn-view-product {
    padding: 0.5rem 1rem;
    background: #1C2A4B;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-view-product:hover {
    background: #FF8C42;
    transform: scale(1.05);
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin-top: 3rem;
}

.pagination button {
    padding: 0.75rem 1rem;
    border: 1px solid #ddd;
    background: #fff;
    color: #333;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

.pagination button:hover:not(:disabled) {
    background: #FF8C42;
    color: #fff;
    border-color: #FF8C42;
}

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

.pagination button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.pagination .page-info {
    padding: 0.75rem 1rem;
    color: #666;
}

/* Loading & Empty States */
.loading-state,
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: #999;
    grid-column: 1 / -1;
}

.loading-state svg,
.empty-state svg {
    width: 80px;
    height: 80px;
    opacity: 0.3;
    margin-bottom: 1rem;
}

.empty-state h3 {
    color: #666;
    margin-bottom: 0.5rem;
}

.empty-state p {
    color: #999;
}

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

@media (max-width: 768px) {
    .category-hero h1 {
        font-size: 2rem;
    }
    
    .category-hero p {
        font-size: 1rem;
    }
    
    .products-layout {
        grid-template-columns: 1fr;
    }
    
    .filters-sidebar {
        position: relative;
        top: 0;
        max-height: none;
        padding: 1rem;
    }

    .filters-chevron {
        display: block;
    }

    .filters-header {
        margin-bottom: 0;
        padding-bottom: 0;
        border-bottom: none;
        cursor: pointer;
        user-select: none;
        -webkit-tap-highlight-color: transparent;
    }

    .filters-sidebar.filters-open .filters-header {
        margin-bottom: 1.25rem;
        padding-bottom: 1rem;
        border-bottom: 2px solid #e9ecef;
    }

    .filters-sidebar.filters-open .filters-chevron {
        transform: rotate(180deg);
    }

    .filters-container {
        display: none;
    }

    .filters-sidebar.filters-open .filters-container {
        display: block;
    }
    
    .products-header {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }
    
    .products-sort {
        justify-content: space-between;
    }
    
    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 1.5rem;
    }
    
    .category-nav {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
        overflow-x: unset;
        justify-content: unset;
    }

    .category-nav-item {
        min-width: unset;
        flex: unset;
        width: 100%;
        padding: 1rem 0.5rem;
    }

    .category-nav-item img {
        width: 80px;
        height: 80px;
    }

    .category-nav-item h3 {
        font-size: 0.875rem;
    }

    .product-card h3 {
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }
}

@media (max-width: 480px) {
    .products-grid {
        grid-template-columns: 1fr;
    }
}
