﻿/* ========== Banner de categoría ========== */
.categories-banner {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 6.833rem;
    background-color: rgb(31, 78, 150);
    margin-bottom: 2rem;
}

    .categories-banner #category-heading {
        text-align: center;
        font-size: 2rem;
        color: var(--colorNeutralForegroundInverted) !important;
        margin: 0;
    }
    .categories-banner p {
        text-align: center;
        font-size: 1rem;
        color: var(--colorNeutralForegroundInverted);
        margin: 0;
    }

/* ========== Contenedor principal ========== */
.content-wrapper {
    width: 100%;
}

.products-container {
    display: flex;
    margin-top: 2rem;
    position: relative;
    justify-content: center;
    gap: 2rem;
}

.content-main {
    flex: 1;
    min-width: 0;
    padding: 0 1.5rem;
}

/* ========== Vista raíz de categorías ========== */
.categories-container {
    max-width: 1200px;
    margin: 0 auto;
    margin-bottom: 5rem;
    padding: 3rem;
    background-color: #fff;
}

.categories-title {
    font-size: 2rem;
    font-weight: 400;
    margin-bottom: 0.5rem;
    color: #333;
}

.categories-description {
    font-size: 1rem;
    font-weight: 400;
    color: #666;
    margin-bottom: 0;
}

.categories-grid {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.category-section {
    border-bottom: 1px solid #eee;
    padding-bottom: 1rem;
}

.category-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.category-name {
    font-size: 1.5rem;
    font-weight: bold;
    margin: 0;
    color: var(--colorNeutralForeground1);
}

.category-link {
    color: var(--colorNeutralForeground1);
    text-decoration: none;
    font-weight: 600;
    font-size: 1.5rem;
}

    .category-link:hover {
        color: #3483fa;
    }

.view-all-link {
    font-size: 1rem;
    color: #3483fa;
    text-decoration: none;
    font-weight: normal;
}

    .view-all-link:hover {
        color: #2968c8;
    }

.subcategories-list {
    list-style: none;
    padding: 0;
    margin: 0;
    width: 100%;
}
    .subcategories-list ul {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
        gap: 0.15rem 0.4rem;
        row-gap: 0.15rem;
        margin: 0;
        padding: 0;
        list-style: none;
    }
.subcategory-item {
    font-size: 1rem;
}

.subcategory-link {
    color: rgba(0,0,0,.45);
    text-decoration: none;
    font-size: 1.166rem;
    display: block;
    font-weight: 400;
    padding: 0.5rem 0;
}

    .subcategory-link:hover {
        color: #3483fa;
    }


/* ========== Subcategorías relacionadas (sidebar) ========== */
.related-categories-sidebar {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.related-categories-title {
    font-size: 1.3333rem;
    line-height: 1.2;
    font-weight: 600;
    margin-bottom: 1rem;
    color: #333;
}

.related-categories-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.related-category-item {
    display: inline-block;
}

.related-category-link {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 20px;
    color: #495057;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

    .related-category-link:hover {
        background: #3483fa;
        color: white;
        border-color: #3483fa;
    }

/* ========== Breadcrumb ========== */
.breadcrumb {
    font-size: 0.95rem;
    padding: 0 1rem;
    background: transparent;
}

/* ========== Botón flotante de filtros (móvil) ========== */
.mobile-filter-floating-btn {
    display: none;
    position: fixed;
    bottom: 130px;
    right: 15px;
    width: 50px;
    height: 50px;
    background: #3483fa;
    color: white;
    border: none;
    border-radius: 50%;
    box-shadow: 0 4px 12px rgba(52, 131, 250, 0.4);
    cursor: pointer;
    z-index: 997;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    transition: all 0.3s ease;
}

    .mobile-filter-floating-btn:hover {
        background: #2968c8;
        transform: scale(1.05);
    }

    .mobile-filter-floating-btn:active {
        transform: scale(0.95);
    }

    .mobile-filter-floating-btn .mobile-filter-count {
        position: absolute;
        top: -5px;
        right: -5px;
        background: #ff4444;
        color: white;
        font-size: 12px;
        font-weight: 600;
        padding: 4px 8px;
        border-radius: 12px;
        min-width: 24px;
        text-align: center;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    }

/* ========== Headers de productos ========== */
.products-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 24px;
    padding: 0 1rem;
    gap: 16px;
}

.products-title {
    font-size: 28px;
    font-weight: 600;
    color: var(--neutral-foreground-rest);
    margin: 0;
}

.results-info {
    color: var(--color-text-muted);
    font-size: 14px;
    margin: 8px 0 0 0;
}

/* ========== Estado vacío ========== */
.empty-state {
    text-align: center;
    padding: 64px 16px;
    color: #666;
}

.empty-state-icon {
    font-size: 64px;
    margin-bottom: 16px;
    opacity: 0.5;
}

.empty-state-title {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 8px;
    color: #333;
}

.empty-state-text {
    font-size: 16px;
}

/* ========== Responsive ========== */
@media (max-width: 1024px) {
    .subcategories-list ul {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    }
    /* Mostrar botón flotante en móvil */
    .mobile-filter-floating-btn {
        display: flex;
    }

    /* Ocultar sidebar en desktop en móvil */
    .products-sidebar {
        width: 100vw;
        max-width: unset;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        height: 100vh;
        z-index: 999;
        display: none;
        transform: translateY(-100%);
        transition: transform 0.3s ease;
        overflow-y: auto;
        padding: 20px;
        border-radius: 0;
        box-shadow: none;
        background: white;
    }

        .products-sidebar.mobile-active {
            transform: translateY(0);
        }

    .content-main {
        width: 100%;
        padding: 0;
    }

    .products-container {
        flex-direction: column;
    }

    .related-categories-sidebar {
        padding: 1rem;
    }

    .related-categories-title {
        font-size: 1.1rem;
    }
    .related-category-link {
        font-size: 0.85rem;
        padding: 0.4rem 0.8rem;
    }
}

@media (max-width: 768px) {

        .subcategories-list ul {
            grid-template-columns: repeat(2, 1fr);
        }
    .categories-banner h1 {
        font-size: 1.5rem;
    }
}

@media (max-width: 576px) {
        .subcategories-list ul {
            grid-template-columns: 1fr;
        }
    .mobile-filter-floating-btn {
        font-size: 20px;
    }
}

@media (max-width: 480px) {

}
