/* ==========================================================================
   ESTILOS DE LA GRILLA DE CATEGORÍAS INTERACTIVAS (ALIMAR)
   ========================================================================== */

/* BANNER HERO */
.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;
}

/* GRILLA SECCIÓN PRINCIPAL */
.alimar-categories-grid-section {
    width: 100%;
    background-color: #f8fafc;
    padding: 60px 20px 90px 20px;
    box-sizing: border-box;
}

.categories-inner-container {
    max-width: 1250px;
    margin: 0 auto;
    width: 100%;
}

.categories-cards-wrapper {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 35px;
}

/* TARJETA INDIVIDUAL DE CATEGORÍA */
.cat-card-item {
    background-color: var(--blanco);
    border: 2px solid #e2e8f0;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.cat-card-item:hover {
    transform: translateY(-6px);
    border-color: var(--verde-alimar);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
}

.cat-card-link-wrapper {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    height: 100%;
}

/* VISOR DE FOTOS CON TRANSICIÓN FADE EN HOVER */
.cat-card-img-viewport {
    position: relative;
    width: 100%;
    height: 250px;
    background-color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
    overflow: hidden;
    border-bottom: 1px solid #f1f5f9;
}

.cat-hover-img {
    position: absolute;
    max-width: 85%;
    max-height: 85%;
    object-fit: contain;
    opacity: 0;
    transition: opacity 0.4s ease-in-out;
}

.cat-hover-img.is-active {
    opacity: 1;
}

/* INFORMACIÓN INFERIOR DE LA TARJETA */
.cat-card-info {
    padding: 25px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    box-sizing: border-box;
    background-color: #ffffff;
}

.cat-card-title {
    font-family: var(--fuente-titulos) !important;
    font-size: 24px;
    font-style: italic;
    color: var(--azul-oscuro) !important;
    text-transform: uppercase;
    margin: 0 0 6px 0;
    line-height: 1.2;
}

.cat-card-count {
    font-family: 'Montserrat', sans-serif;
    font-size: 13px;
    font-weight: 600;
    color: #64748b;
    margin-bottom: 18px;
}

.btn-cat-explore {
    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: 9px 22px;
    border-radius: 6px;
    text-transform: uppercase;
    transition: background-color 0.25s ease;
}

.cat-card-item:hover .btn-cat-explore {
    background-color: #337d1c;
}

/* ADAPTACIÓN MÓVIL */
@media (max-width: 991px) {
    .categories-cards-wrapper {
        grid-template-columns: repeat(2, 1fr);
        gap: 25px;
    }
    
    .category-hero-banner {
        height: 200px;
        margin-top: 60px;
    }

    .category-dynamic-main-title {
        font-size: 32px;
    }
}

@media (max-width: 600px) {
    .categories-cards-wrapper {
        grid-template-columns: 1fr;
    }
}