/* ==========================================================================
   Nafinox Mega Menu — Styles
   Charte : #752657 (prune), #FAF7F3 (crème), #E3DDD6 (bordure),
            #1A1714 (texte), #48443F (texte secondaire)
   Police : Plus Jakarta Sans (déjà chargée par le thème)
   ========================================================================== */

.nfx-mm {
    font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
    background: #fff;
    border: 1px solid #E3DDD6;
    border-radius: 12px;
    overflow: hidden;
    color: #1A1714;
    box-shadow: 0 4px 20px rgba(26, 23, 20, 0.06);
    max-width: 1200px;
    margin: 0 auto;
}

/* ----- Header ----- */
.nfx-mm-header {
    padding: 14px 28px;
    background: #FAF7F3;
    border-bottom: 1px solid #E3DDD6;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
}

.nfx-mm .nfx-eyebrow {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #752657;
}

.nfx-mm .nfx-count {
    font-size: 12px;
    color: #48443F;
    letter-spacing: 0.02em;
}

/* ----- Body : layout 2 zones ----- */
.nfx-mm-body {
    display: grid;
    gap: 0;
}

.nfx-mm-body.has-feature {
    grid-template-columns: 1.4fr 1fr;
}

.nfx-mm-body.full-width {
    grid-template-columns: 1fr;
}

/* ----- Colonne catégories ----- */
.nfx-cats {
    padding: 24px 28px;
}

.nfx-mm-body.has-feature .nfx-cats {
    border-right: 1px solid #E3DDD6;
}

.nfx-cats-title {
    font-size: 22px;
    font-weight: 500;
    margin: 0 0 4px;
    font-family: 'Plus Jakarta Sans', sans-serif;
    line-height: 1.2;
    color: #1A1714;
}

.nfx-cats-title em {
    color: #752657;
    font-style: italic;
    font-weight: 300;
}

.nfx-cats-sub {
    font-size: 13px;
    color: #48443F;
    margin: 0 0 18px;
    line-height: 1.5;
}

/* ----- Grille des sous-catégories ----- */
.nfx-cats-grid {
    display: grid;
    gap: 6px 14px;
    margin-bottom: 18px;
}

.nfx-cats-grid.nfx-cols-2 { grid-template-columns: repeat(2, 1fr); }
.nfx-cats-grid.nfx-cols-3 { grid-template-columns: repeat(3, 1fr); }
.nfx-cats-grid.nfx-cols-4 { grid-template-columns: repeat(4, 1fr); }

.nfx-cat-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 6px;
    text-decoration: none !important;
    color: #1A1714;
    font-size: 13.5px;
    transition: background 0.2s, border-color 0.2s;
    cursor: pointer;
    border: 1px solid transparent;
}

.nfx-cat-link:hover {
    background: #FAF7F3;
    border-color: #E3DDD6;
    color: #1A1714;
}

.nfx-cat-link:hover .nfx-cat-icon {
    background: #752657;
    color: #fff;
}

.nfx-cat-link:hover .nfx-cat-name {
    color: #752657;
}

.nfx-cat-icon {
    width: 30px;
    height: 30px;
    border-radius: 6px;
    background: #F1ECE5;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background 0.2s, color 0.2s;
    color: #752657;
    overflow: hidden;
}

.nfx-cat-icon img {
    width: 100%;
    height: 100%;
    border-radius: 4px;
    object-fit: cover;
    display: block;
}

.nfx-cat-icon svg {
    width: 16px;
    height: 16px;
}

.nfx-cat-name {
    flex: 1;
    line-height: 1.2;
    transition: color 0.2s;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.nfx-cat-count {
    font-size: 11px;
    color: #A09FAA;
    font-variant-numeric: tabular-nums;
    flex-shrink: 0;
}

/* ----- CTA footer ----- */
.nfx-cta-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 14px;
    border-top: 1px solid #E3DDD6;
    flex-wrap: wrap;
    gap: 10px;
}

.nfx-cta-link {
    color: #752657 !important;
    font-size: 13px;
    font-weight: 500;
    text-decoration: none !important;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: gap 0.2s;
}

.nfx-cta-link:hover {
    gap: 10px;
    color: #5a1d44 !important;
}

.nfx-mini-badge {
    background: #FFF3E8;
    color: #C4783A;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.1em;
    padding: 4px 10px;
    border-radius: 20px;
    text-transform: uppercase;
    white-space: nowrap;
}

/* ----- Colonne featured produits ----- */
.nfx-feature {
    padding: 24px;
    background: #FAF7F3;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.nfx-feature-empty {
    color: #48443F;
    font-size: 13px;
    font-style: italic;
    margin: 0;
}

.nfx-feature-card {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #E3DDD6;
    display: flex;
    gap: 0;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    text-decoration: none !important;
    color: inherit;
}

.nfx-feature-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(26, 23, 20, 0.08);
}

.nfx-feature-img {
    width: 110px;
    height: 110px;
    flex-shrink: 0;
    background: #F1ECE5;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

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

.nfx-feature-content {
    padding: 12px 14px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    flex: 1;
    min-width: 0;
}

.nfx-feature-eyebrow {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-bottom: 4px;
}

.nfx-feature-eyebrow.eyebrow-new { color: #752657; }
.nfx-feature-eyebrow.eyebrow-best { color: #C4783A; }
.nfx-feature-eyebrow.eyebrow-sale { color: #FF3B30; }

.nfx-feature-title {
    font-size: 14px;
    font-weight: 500;
    margin: 0 0 4px;
    line-height: 1.3;
    color: #1A1714;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.nfx-feature-meta {
    font-size: 12px;
    color: #48443F;
}

.nfx-feature-meta .woocommerce-Price-amount {
    color: #752657;
    font-weight: 500;
}

.nfx-feature-arrow {
    padding: 0 14px;
    display: flex;
    align-items: center;
    color: #752657;
    font-size: 18px;
    flex-shrink: 0;
}

/* ==========================================================================
   Responsive
   ========================================================================== */

/* Tablette */
@media (max-width: 1024px) {
    .nfx-mm-body.has-feature {
        grid-template-columns: 1fr;
    }

    .nfx-mm-body.has-feature .nfx-cats {
        border-right: none;
        border-bottom: 1px solid #E3DDD6;
    }

    .nfx-feature {
        flex-direction: row;
        flex-wrap: wrap;
    }

    .nfx-feature-card {
        flex: 1 1 calc(50% - 7px);
        min-width: 240px;
    }
}

/* Mobile */
@media (max-width: 640px) {
    .nfx-mm-header,
    .nfx-cats,
    .nfx-feature {
        padding: 18px;
    }

    .nfx-cats-grid.nfx-cols-3,
    .nfx-cats-grid.nfx-cols-4 {
        grid-template-columns: repeat(2, 1fr);
    }

    .nfx-cats-title {
        font-size: 18px;
    }

    .nfx-cta-row {
        flex-direction: column;
        align-items: flex-start;
    }

    .nfx-feature {
        flex-direction: column;
    }

    .nfx-feature-card {
        flex: 1 1 100%;
    }
}
