/* ============================================
   NUTRAGILE - Blocs Catégories Accueil
   Section 3 : via AN Theme Block
   À ajouter dans custom-header.css ou homepage-products.css
   ============================================ */

.nt-homecat {
    padding: 48px 0;
    background-color: var(--nutragile-white);
    width: 100vw;
    margin-left: calc(-50vw + 50%);
}

.nt-homecat__wrapper {
    display: flex;
    align-items: stretch;
    gap: 32px;
    max-width: 1568px;
    margin: 0 auto;
    padding: 0 0 0 32px;
}

/* ---- Partie gauche ---- */
.nt-homecat__content {
    flex: 1;
    min-width: 0;
}

.nt-homecat__title {
    font-family: var(--nutragile-font);
    font-weight: 400;
    font-size: 26px;
    color: var(--nutragile-link-dark);
    margin: 0 0 9.6px;
    line-height: 1.3;
}

.nt-homecat__subtitle {
    font-family: var(--nutragile-font-link);
    font-weight: 300;
    font-size: 14px;
    color: var(--nutragile-text-dark);
    line-height: 1.6;
    margin: 0 0 24px;
    max-width: 1536px;
}

/* ---- Grille 2×2 ---- */
.nt-homecat__grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

/* ---- Carte ---- */
.nt-homecat__card {
    background: var(--nutragile-light-cream);
    border-radius: 8px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    transition: box-shadow 0.2s ease;
}

.nt-homecat__card:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
}

.nt-homecat__card-title {
    font-family: var(--nutragile-font-link);
    font-weight: 600;
    font-size: 16px;
    color: var(--nutragile-text-dark);
    margin: 0 0 8px;
    line-height: 1.3;
}

.nt-homecat__card-desc {
    font-family: var(--nutragile-font-link);
    font-weight: 300;
    font-size: 14px;
    color: var(--nutragile-text-dark);
    line-height: 22px;
    margin: 0 0 14.4px;
    flex: 1;
}

/* ---- Boutons CTA — réutilise .nutragile-btn-medium / .nutragile-btn-light ---- */
.nt-homecat__card-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: auto;
}

.nt-homecat__card-links .nutragile-btn-medium,
.nt-homecat__card-links .nutragile-btn-light {
    display: inline-flex;
    align-items: center;
    gap: 4.8px;
    font-family: var(--nutragile-font);
    padding: 8px 16px;
    border-radius: 6px;
    white-space: nowrap;
}

.nt-homecat__btn-arrow {
    font-size: 11px;
    transition: transform 0.2s ease;
}

.nt-homecat__card-links a:hover .nt-homecat__btn-arrow {
    transform: translateX(2.4px);
}

/* ---- Image droite : pleine hauteur, pas de radius ---- */
.nt-homecat__image {
    flex-shrink: 0;
    width: 312px;
    border-radius: 0;
    overflow: hidden;
    margin: -48px 0;
    align-self: stretch;
}

.nt-homecat__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* ---- RESPONSIVE ---- */
@media (max-width: 1200px) {
    .nt-homecat__image {
        width: 208px;
    }
}

@media (max-width: 992px) {
    .nt-homecat__wrapper {
        flex-direction: column;
        padding: 0 16px;
    }

    .nt-homecat__image {
        width: 100%;
        max-height: 280px;
        order: -1;
        margin: -48px 0 0;
    }
}

@media (max-width: 600px) {
    .nt-homecat {
        padding: 32px 0;
    }

    .nt-homecat__title {
        font-size: 18px;
    }

    .nt-homecat__grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .nt-homecat__card {
        padding: 16px;
    }

    .nt-homecat__card-links {
        flex-direction: column;
    }

    .nt-homecat__card-links .nutragile-btn-medium,
    .nt-homecat__card-links .nutragile-btn-light {
        justify-content: center;
    }
}
