/* /var/www/web.nikkidepot.com/public/favorite/assets/css/favorite-home-frame-v2.css
 * NIKKI_FAVORITE_FRAME_V2
 * Harmonise uniquement le cadre de la page Favoris avec l'accueil V4.
 * Les cartes produits, leur grille et la position des cœurs restent strictement inchangées.
 */

:root {
    --nikki-favorite-shell: 1280px;
    --nikki-favorite-gutter: clamp(16px, 2.2vw, 28px);
}

/* Header et footer : même axe de lecture que l'accueil. */
.nikki-site-header-shell {
    max-width: var(--nikki-favorite-shell) !important;
    padding-inline: var(--nikki-favorite-gutter) !important;
}

.nikki-site-footer {
    margin-top: 0 !important;
}

.nikki-site-footer-shell {
    max-width: var(--nikki-favorite-shell) !important;
    padding: 42px var(--nikki-favorite-gutter) 26px !important;
}

.nikki-site-footer-grid {
    gap: clamp(24px, 2.5vw, 32px) !important;
}

.nikki-site-footer-brand img {
    height: 22px;
}

.nikki-site-footer-description {
    margin-top: 16px !important;
    max-width: 34ch !important;
    line-height: 1.65 !important;
}

.nikki-site-footer-social {
    margin-top: 18px !important;
}

.nikki-site-footer-newsletter {
    border-radius: 18px !important;
    padding: 18px !important;
    box-shadow: 0 12px 30px rgba(75, 56, 39, 0.05) !important;
}

.nikki-site-footer-newsletter-form {
    margin-top: 16px !important;
}

.nikki-site-footer-newsletter-form input,
.nikki-site-footer-newsletter-form button {
    height: 42px !important;
    border-radius: 11px !important;
}

.nikki-site-footer-legal {
    margin-top: 34px !important;
    padding-top: 20px !important;
}

/* Cadre de page uniquement. Aucune règle ne cible data-favorite-grid,
 * data-favorite-card ou favorite-remove-btn. */
.favorite-page {
    min-height: calc(100svh - 154px);
    padding-bottom: clamp(42px, 5vw, 68px) !important;
}

.favorite-page > section {
    width: 100%;
    max-width: var(--nikki-favorite-shell) !important;
    padding: clamp(26px, 2.6vw, 34px) var(--nikki-favorite-gutter) 0 !important;
}

/* En-tête de page plus fin, cohérent avec l'accueil V4. */
.favorite-page > section > header {
    margin-bottom: clamp(24px, 2.5vw, 32px) !important;
    padding-bottom: 18px !important;
    gap: 16px !important;
}

.favorite-page > section > header > div:first-child > p {
    font-size: 8px !important;
    font-weight: 650 !important;
    letter-spacing: 0.185em !important;
    line-height: 1.2 !important;
}

.favorite-page > section > header h1 {
    margin-top: 0.38rem !important;
    font-family: inherit !important;
    font-size: clamp(1.55rem, 1.85vw, 1.9rem) !important;
    font-weight: 600 !important;
    letter-spacing: -0.028em !important;
    line-height: 1.1 !important;
    color: #201c18 !important;
    text-wrap: balance;
}

.favorite-page > section > header > div:last-child {
    gap: 7px !important;
    padding: 7px 12px !important;
    border-radius: 999px !important;
    font-size: 11px !important;
    font-weight: 600 !important;
    box-shadow: 0 3px 9px rgba(65, 47, 33, 0.035) !important;
}

.favorite-page > section > header > div:last-child > span {
    width: 5px !important;
    height: 5px !important;
}

@media (min-width: 1024px) {
    .nikki-site-footer-grid {
        grid-template-columns: minmax(230px, 1.08fr) minmax(130px, 0.64fr) minmax(130px, 0.64fr) minmax(300px, 350px) !important;
        align-items: start;
    }
}

@media (min-width: 1280px) {
    .nikki-site-footer-shell {
        padding-top: 46px !important;
        padding-bottom: 28px !important;
    }
}

@media (max-width: 639px) {
    .favorite-page {
        padding-bottom: calc(84px + env(safe-area-inset-bottom, 0px)) !important;
    }

    .favorite-page > section {
        padding-top: 22px !important;
    }

    .favorite-page > section > header h1 {
        font-size: 24px !important;
    }
}

/* NIKKI_FAVORITE_CARDS_V27_START */
/*
 * Favoris V27
 * - 5 colonnes uniquement sur les grands écrans (>= 1360 px) ;
 * - 4 colonnes sur les desktops intermédiaires ;
 * - bloc blanc inférieur plus compact et mieux aligné ;
 * - cœur conservé à droite du titre avec une zone cliquable de 32 px ;
 * - images carrées, promotions et logique métier inchangées.
 */
[data-favorite-grid] {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    column-gap: 12px !important;
    row-gap: 22px !important;
    justify-content: start !important;
    align-items: stretch !important;
}

[data-favorite-card] {
    overflow: hidden;
    min-width: 0;
    height: 100%;
    border: 1px solid rgba(6, 11, 45, 0.075);
    border-radius: 18px;
    background: #ffffff;
    box-shadow: 0 7px 22px rgba(6, 11, 45, 0.042);
    transition:
        transform 180ms ease,
        border-color 180ms ease,
        box-shadow 180ms ease;
}

[data-favorite-card]:hover {
    transform: translateY(-2px);
    border-color: rgba(6, 11, 45, 0.14);
    box-shadow: 0 14px 34px rgba(6, 11, 45, 0.078);
}

[data-favorite-card] > a:first-child {
    aspect-ratio: 1 / 1 !important;
    border-radius: 0 !important;
    background: #f1ede7 !important;
}

[data-favorite-card] > a:first-child img {
    will-change: transform;
}

/* Zone texte plus fine, avec une ligne basse stable pour prix et livraison. */
[data-favorite-card] > div:last-child {
    box-sizing: border-box;
    min-height: 106px;
    margin-top: 0 !important;
    padding: 10px 12px 11px;
    grid-template-rows: minmax(38px, auto) 32px !important;
    row-gap: 5px !important;
    align-content: space-between !important;
    background: #ffffff;
}

/* Le cœur reste dans la ligne du titre, légèrement mieux calé à droite. */
[data-favorite-card] .favorite-remove-btn {
    align-self: flex-start;
    margin-top: -4px !important;
    margin-right: -7px !important;
    width: 32px !important;
    height: 32px !important;
    color: #e25562;
}

[data-favorite-card] h2 {
    color: #171a2f !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    line-height: 1.35 !important;
}

[data-favorite-card] .nikki-product-sale-price {
    font-size: 16px;
}

@media (min-width: 640px) {
    [data-favorite-grid] {
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
        column-gap: 16px !important;
        row-gap: 26px !important;
    }
}

@media (min-width: 900px) {
    [data-favorite-grid] {
        grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
        column-gap: 18px !important;
        row-gap: 30px !important;
    }
}

@media (min-width: 1360px) {
    [data-favorite-grid] {
        grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
        column-gap: 18px !important;
    }

    [data-favorite-card] > div:last-child {
        min-height: 103px;
        padding: 9px 11px 10px;
        grid-template-rows: 38px 31px !important;
        row-gap: 4px !important;
    }

    [data-favorite-card] h2 {
        font-size: 13.5px !important;
    }
}

@media (max-width: 639px) {
    [data-favorite-card] {
        border-radius: 15px;
        box-shadow: 0 5px 16px rgba(6, 11, 45, 0.04);
    }

    [data-favorite-card] > div:last-child {
        min-height: 110px;
        padding: 10px 10px 12px;
        grid-template-rows: minmax(40px, auto) 32px !important;
    }

    [data-favorite-card] h2 {
        font-size: 13px !important;
    }
}

@media (prefers-reduced-motion: reduce) {
    [data-favorite-card] {
        transition: none;
    }

    [data-favorite-card]:hover {
        transform: none;
    }
}
/* NIKKI_FAVORITE_CARDS_V27_END */
