/* ==================== CATALOG PAGE STYLES ==================== */

/* Header adjustments for catalog */
.catalog-header {
    position: relative;
    background: var(--header-bg);
}

.catalog-header .header-container {
    position: relative;
}

.back-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--cream-color);
    color: var(--primary-color);
    text-decoration: none;
    transition: all 0.3s ease;
}

.back-btn:hover {
    background: var(--primary-color);
    color: white;
}

.catalog-header-text {
    text-align: center;
    padding: 2rem 1rem 2.5rem;
    background: linear-gradient(to bottom, transparent, var(--cream-color) 80%);
}

.catalog-header-text h1 {
    font-family: var(--font-elegant);
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.catalog-subtitle {
    color: var(--text-light);
    font-size: 1.1rem;
}

/* Main Content */
.catalog-main {
    min-height: calc(100vh - 300px);
    padding-bottom: 3rem;
}

/* Search and Controls */
.catalog-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1400px;
    margin: 0 auto;
    padding: 1.5rem;
    gap: 1rem;
    flex-wrap: wrap;
}

.search-box {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    background: var(--white-surface);
    border: 2px solid var(--cream-color);
    border-radius: 50px;
    padding: 0.8rem 1.5rem;
    flex: 1;
    max-width: 400px;
    transition: all 0.3s ease;
}

.search-box:focus-within {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(32, 141, 154, 0.1);
}

.search-box svg {
    color: var(--text-light);
    flex-shrink: 0;
}

.search-box input {
    border: none;
    background: none;
    font-family: var(--font-primary);
    font-size: 1rem;
    color: var(--text-color);
    width: 100%;
    outline: none;
}

.search-box input::placeholder {
    color: var(--text-light);
}

.results-count {
    color: var(--text-light);
    font-size: 0.95rem;
    white-space: nowrap;
}

.results-count span {
    color: var(--primary-color);
    font-weight: 600;
}

/* Category Navigation */
.catalog-nav {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.6rem;
    padding: 1rem 1.5rem 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

.category-tab {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.7rem 1.3rem;
    background: var(--white-surface);
    border: 2px solid var(--cream-color);
    border-radius: 50px;
    cursor: pointer;
    font-family: var(--font-primary);
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-color);
    transition: all 0.3s ease;
    white-space: nowrap;
}

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

.category-tab.active {
    background: linear-gradient(135deg, var(--primary-color), #2ab0c0);
    color: white;
    border-color: transparent;
    box-shadow: 0 4px 15px rgba(32, 141, 154, 0.3);
}

.category-tab .tab-icon {
    font-size: 1.1rem;
}

.category-tab .tab-count {
    background: rgba(255, 255, 255, 0.25);
    padding: 0.1rem 0.5rem;
    border-radius: 20px;
    font-size: 0.75rem;
    margin-left: 0.2rem;
}

.category-tab:not(.active) .tab-count {
    background: var(--cream-color);
    color: var(--text-light);
}

/* Catalog Grid */
.catalog-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

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

/* Category Section Headers */
.category-section {
    grid-column: 1 / -1;
    margin-top: 2rem;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--cream-color);
    display: flex;
    align-items: center;
    gap: 1rem;
}

.category-section:first-child {
    margin-top: 0;
}

.category-section-icon {
    font-size: 2rem;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--cream-color);
    border-radius: 12px;
}

.category-section-info h2 {
    font-family: var(--font-elegant);
    font-size: 1.5rem;
    color: var(--text-dark);
    font-weight: 600;
    margin-bottom: 0.2rem;
}

.category-section-info p {
    color: var(--text-light);
    font-size: 0.9rem;
}

/* Product Card Adjustments for Catalog */
.catalog-grid .product-card {
    min-width: unset;
    max-width: unset;
    animation: fadeInUp 0.5s ease-out backwards;
}

.catalog-grid .product-card:nth-child(1) { animation-delay: 0.05s; }
.catalog-grid .product-card:nth-child(2) { animation-delay: 0.1s; }
.catalog-grid .product-card:nth-child(3) { animation-delay: 0.15s; }
.catalog-grid .product-card:nth-child(4) { animation-delay: 0.2s; }
.catalog-grid .product-card:nth-child(5) { animation-delay: 0.25s; }
.catalog-grid .product-card:nth-child(6) { animation-delay: 0.3s; }

/* Empty State */
.empty-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 4rem 2rem;
}

.empty-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.empty-state h3 {
    font-family: var(--font-elegant);
    font-size: 1.5rem;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.empty-state p {
    color: var(--text-light);
}

/* Catalog Footer */
.catalog-footer {
    background: var(--cream-color);
    padding: 2rem;
    margin-top: 3rem;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    text-align: center;
}

.footer-logo-link {
    display: block;
}

.footer-logo-small {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.footer-logo-small:hover {
    opacity: 0.9;
}

.footer-content p {
    color: var(--text-light);
    font-size: 0.9rem;
}

.footer-links {
    display: flex;
    gap: 2rem;
}

.footer-links a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: var(--primary-dark);
}

/* ==================== DARK MODE ==================== */
[data-theme="dark"] .catalog-header-text {
    background: linear-gradient(to bottom, transparent, var(--cream-color) 80%);
}

[data-theme="dark"] .back-btn {
    background: var(--beige-color);
}

[data-theme="dark"] .back-btn:hover {
    background: var(--primary-color);
    color: #121212;
}

[data-theme="dark"] .search-box {
    background: var(--card-bg);
    border-color: var(--beige-color);
}

[data-theme="dark"] .search-box:focus-within {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(77, 208, 225, 0.1);
}

[data-theme="dark"] .category-tab {
    background: var(--card-bg);
    border-color: var(--beige-color);
}

[data-theme="dark"] .category-tab:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

[data-theme="dark"] .category-tab.active {
    background: linear-gradient(135deg, var(--primary-color), #26C6DA);
    color: #121212;
}

[data-theme="dark"] .category-section {
    border-color: var(--beige-color);
}

[data-theme="dark"] .category-section-icon {
    background: var(--beige-color);
}

[data-theme="dark"] .catalog-footer {
    background: var(--beige-color);
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 768px) {
    .catalog-header-text h1 {
        font-size: 2rem;
    }

    .catalog-controls {
        flex-direction: column;
        align-items: stretch;
    }

    .search-box {
        max-width: 100%;
    }

    .results-count {
        text-align: center;
    }

    .catalog-nav {
        flex-wrap: nowrap;
        justify-content: flex-start;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        padding: 1rem;
        gap: 0.5rem;
    }

    .catalog-nav::-webkit-scrollbar {
        display: none;
    }

    .category-tab {
        scroll-snap-align: start;
        flex-shrink: 0;
        padding: 0.6rem 1rem;
        font-size: 0.85rem;
    }

    .category-tab .tab-count {
        display: none;
    }

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

    .category-section-icon {
        width: 40px;
        height: 40px;
        font-size: 1.5rem;
    }

    .category-section-info h2 {
        font-size: 1.2rem;
    }

    .footer-links {
        flex-wrap: wrap;
        justify-content: center;
        gap: 1rem 2rem;
    }
}

@media (max-width: 480px) {
    .catalog-header-text {
        padding: 1.5rem 1rem 2rem;
    }

    .catalog-header-text h1 {
        font-size: 1.7rem;
    }

    .catalog-subtitle {
        font-size: 0.95rem;
    }

    .catalog-grid {
        grid-template-columns: 1fr;
    }

    .catalog-container {
        padding: 0 1rem;
    }

    .back-btn {
        width: 36px;
        height: 36px;
    }
}
