/* ==========================================================================
   ESTILOS DEDICADOS PARA CATEGORÍAS Y ARCHIVO DE PRODUCTOS (ALIMAR)
   ========================================================================== */

/* BANNER SUPERIOR DE CATEGORÍA */
.category-hero-banner {
    width: 100%;
    height: 260px;
    margin-top: 70px;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    box-sizing: border-box;
    padding: 0 20px;
}

.category-banner-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.category-fixed-tag {
    font-family: 'Montserrat', sans-serif;
    color: var(--verde-alimar);
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.category-dynamic-main-title {
    font-family: var(--fuente-titulos) !important;
    color: var(--blanco) !important;
    font-size: 48px;
    font-style: italic;
    font-weight: 400;
    text-transform: uppercase;
    margin: 0;
    line-height: 1.1;
}

/* CONTENEDOR PRINCIPAL SPLIT (SIDEBAR + GRILLA) */
.alimar-archive-catalog-section {
    width: 100%;
    background-color: #f8fafc;
    padding: 50px 20px 80px 20px;
    box-sizing: border-box;
}

.catalog-split-wrapper {
    max-width: 1300px;
    margin: 0 auto;
    display: flex;
    gap: 40px;
    align-items: flex-start;
}

/* SIDEBAR IZQUIERDA */
.catalog-left-sidebar {
    width: 280px;
    flex-shrink: 0;
    background-color: var(--blanco);
    border-radius: 16px;
    padding: 25px 20px;
    box-sizing: border-box;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.05);
}

.sidebar-main-title {
    font-family: var(--fuente-titulos) !important;
    font-size: 24px;
    font-style: italic;
    font-weight: 400;
    color: var(--azul-oscuro);
    margin: 0 0 20px 0;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--verde-alimar);
}

.sidebar-categories-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.sidebar-categories-list a {
    display: block;
    width: 100%;
    text-decoration: none;
    padding: 10px 14px;
    border-radius: 8px;
    font-family: 'Montserrat', sans-serif;
    font-size: 13.5px;
    font-weight: 700;
    color: var(--azul-oscuro);
    box-sizing: border-box;
    transition: all 0.25s ease;
}

.sidebar-categories-list a:hover,
.sidebar-categories-list a.active {
    background-color: var(--azul-oscuro);
    color: var(--blanco);
}

/* COLUMNA DERECHA: GRILLA DE TARJETAS */
.catalog-right-content-grid {
    flex-grow: 1;
    width: 100%;
    min-width: 0;
}

.alimar-products-cards-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

/* Tarjeta de Producto Enmarcada */
.product-card-item {
    background-color: var(--blanco);
    border: 2px solid #e2e8f0;
    border-radius: 20px;
    padding: 25px 22px 22px 22px;
    box-sizing: border-box;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.product-card-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
}

.product-card-inner {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    height: 100%;
}

.product-card-img-box {
    width: 100%;
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}

.product-card-img-box a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.product-card-img-box img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.product-card-title {
    font-family: var(--fuente-titulos) !important;
    font-size: 20px;
    font-style: italic;
    margin: 0 0 10px 0;
    line-height: 1.25;
}

.product-card-title a {
    color: var(--azul-oscuro) !important;
    text-decoration: none;
    transition: color 0.2s ease;
}

.product-card-title a:hover {
    color: var(--verde-alimar) !important;
}

.product-card-excerpt {
    font-family: 'Montserrat', sans-serif;
    font-size: 13px;
    line-height: 1.5;
    color: #64748b;
    margin: 0 0 20px 0;
    flex-grow: 1;
}

/* Botón Verde DETALLES › */
.btn-product-card-details {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: var(--verde-alimar);
    color: var(--blanco) !important;
    font-family: 'Montserrat', sans-serif;
    font-size: 12.5px;
    font-weight: 700;
    padding: 8px 22px;
    border-radius: 6px;
    text-decoration: none;
    text-transform: uppercase;
    transition: background-color 0.2s ease;
}

.btn-product-card-details:hover {
    background-color: #337d1c;
}

/* PAGINACIÓN */
.alimar-archive-pagination {
    margin-top: 40px;
    display: flex;
    justify-content: center;
}

.alimar-archive-pagination ul.page-numbers {
    display: flex;
    gap: 8px;
    list-style: none;
    padding: 0;
    margin: 0;
}

.alimar-archive-pagination ul.page-numbers li a,
.alimar-archive-pagination ul.page-numbers li span {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    height: 38px;
    padding: 0 10px;
    border-radius: 8px;
    background-color: var(--blanco);
    border: 1px solid #e2e8f0;
    color: var(--azul-oscuro);
    font-family: 'Montserrat', sans-serif;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
}

.alimar-archive-pagination ul.page-numbers li span.current {
    background-color: var(--verde-alimar);
    color: var(--blanco);
    border-color: var(--verde-alimar);
}

/* ADAPTACIÓN RESPONSIVA */
@media (max-width: 991px) {
    .category-hero-banner {
        height: 200px;
        margin-top: 60px;
    }

    .category-dynamic-main-title {
        font-size: 32px;
    }

    .catalog-split-wrapper {
        flex-direction: column;
    }

    .catalog-left-sidebar {
        width: 100%;
    }

    .sidebar-categories-list {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 6px;
    }

    .sidebar-categories-list a {
        text-align: center;
    }

    .alimar-products-cards-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
}

@media (max-width: 600px) {
    .alimar-products-cards-grid {
        grid-template-columns: 1fr;
    }
}