/**
 * WWB Header — styles
 * D'après maquettes Pencil (wiwilbild.pen)
 */

:root {
    --wwb-hd-primary: #362C49;
    --wwb-hd-primary-dark: #241C34;
    --wwb-hd-secondary: #7B74D0;
    --wwb-hd-pink: #FF99DA;
    --wwb-hd-muted: #5A5670;
    --wwb-hd-muted-2: #9490A6;
    --wwb-hd-border: #ECEAF0;
    --wwb-hd-surface: #F8F7FC;
    --wwb-hd-surface-2: #F4F1F9;
    --wwb-hd-bg: #FFFFFF;
    --wwb-hd-top-text: #B0ADBF;
}

/* Neutraliser le header FSE par défaut pour laisser place au custom */
body .wwb-header,
body .wwb-header * {
    box-sizing: border-box;
}

/* ============ TOP UTILITY BAR ============ */
.wwb-header__top {
    background: var(--wwb-hd-primary);
    color: var(--wwb-hd-top-text);
    font-family: 'Inter', sans-serif;
    font-size: 11px;
    font-weight: 400;
}
.wwb-header__top-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 48px;
    max-width: 100%;
}
.wwb-header__top-right {
    color: var(--wwb-hd-top-text);
    text-decoration: none;
    font-weight: 500;
}
.wwb-header__top-right:hover { color: #fff; }

/* ============ MAIN NAV ============ */
.wwb-header__nav {
    background: var(--wwb-hd-bg);
    border-bottom: 1px solid var(--wwb-hd-border);
    font-family: 'Inter', sans-serif;
    position: relative;
    z-index: 100;
}
.wwb-header__nav-inner {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 48px;
    gap: 32px;
}
/* Les liens sont absolument centrés sur la largeur de la page,
   indépendamment des largeurs logo/actions. */
.wwb-header__nav-inner > .wwb-header__links {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    flex: 0 0 auto;
}

/* Logo */
.wwb-header__logo {
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
}
.wwb-header__logo img {
    height: 44px;
    width: auto;
    display: block;
}

/* Links */
.wwb-header__links {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    gap: 24px;
    flex: 1;
    justify-content: center;
}
.wwb-header__link-item {
    position: relative;
}
/* Desktop : les items a mega restent statiques pour que le panneau s'ancre sur
   .wwb-header__nav-inner (relative) et se centre dans l'ecran — centre sur le li,
   il deborde du viewport sur les ecrans 13-14" (le mobile re-passe le li en relative). */
.wwb-header__link-item--has-mega {
    position: static;
}
.wwb-header__link {
    position: relative; /* ancre l'underline .is-active malgre le li statique */
    color: var(--wwb-hd-muted);
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    padding: 6px 0;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: color .15s ease;
}
.wwb-header__link:hover { color: var(--wwb-hd-primary); }
.wwb-header__link-item.is-active .wwb-header__link {
    color: var(--wwb-hd-primary);
    font-weight: 600;
}
.wwb-header__link-item.is-active .wwb-header__link::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -2px;
    width: 70px;
    max-width: 100%;
    height: 2px;
    border-radius: 2px;
    background: var(--wwb-hd-secondary);
}
.wwb-header__chevron {
    transition: transform .2s ease;
}
.wwb-header__link-item--has-mega:hover .wwb-header__chevron {
    transform: rotate(180deg);
}

/* Actions */
.wwb-header__actions {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-shrink: 0;
}
.wwb-header__icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: 0;
    padding: 0;
    width: 20px;
    height: 20px;
    color: var(--wwb-hd-primary);
    cursor: pointer;
    text-decoration: none;
}
.wwb-header__icon-btn:hover { color: var(--wwb-hd-secondary); }

/* Avatar (quand utilisateur connecté) — même gradient que wwb-account__avatar */
.wwb-header__avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--wwb-hd-pink, #FF99DA), #C084FC);
    color: #fff;
    font-family: 'Inter', sans-serif;
    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
    flex-shrink: 0;
    transition: transform .15s ease, box-shadow .15s ease;
}
.wwb-header__avatar:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255, 153, 218, 0.35);
    color: #fff;
}
.wwb-header__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
    transition: filter .15s ease, transform .15s ease;
    white-space: nowrap;
}
.wwb-header__btn:hover { filter: brightness(.95); }
.wwb-header__btn--pro {
    background: var(--wwb-hd-secondary);
    color: #fff;
}
.wwb-header__btn--cart {
    background: var(--wwb-hd-pink);
    color: var(--wwb-hd-primary);
}

/* Burger (mobile) */
.wwb-header__burger {
    display: none;
    background: transparent;
    border: 0;
    width: 32px;
    height: 32px;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    padding: 0;
}
.wwb-header__burger span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--wwb-hd-primary);
    border-radius: 2px;
}

/* ============ MEGA MENU ============ */
.wwb-header__mega {
    position: absolute;
    top: calc(100% + 14px);
    left: 50%;
    transform: translateX(-50%) translateY(-8px);
    width: min(1056px, calc(100vw - 64px));
    opacity: 0;
    visibility: hidden;
    transition: opacity .2s ease, transform .2s ease, visibility 0s linear .2s;
    z-index: 200;
}
.wwb-header__link-item--has-mega:hover .wwb-header__mega,
.wwb-header__link-item--has-mega:focus-within .wwb-header__mega {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
    transition: opacity .2s ease, transform .2s ease, visibility 0s;
}
/* Hover bridge pour éviter le flicker — couvre l'écart lien→mega (14px mesurés),
   PAS plus : plus haut, il recouvrirait la rangée de liens sur toute la largeur
   du panneau et bloquerait le survol des entrées voisines */
.wwb-header__mega::before {
    content: "";
    position: absolute;
    top: -14px;
    left: 0;
    right: 0;
    height: 14px;
}

.wwb-mega {
    display: flex;
    flex-direction: row-reverse;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 12px 40px rgba(54, 44, 73, 0.22);
    min-height: 420px;
}
.wwb-mega__left {
    width: 380px;
    flex-shrink: 0;
    background: linear-gradient(135deg, #362C49 0%, #7B74D0 100%);
    color: #fff;
    padding: 32px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 24px;
}
.wwb-mega__tag {
    display: block;
    color: var(--wwb-hd-pink);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 2px;
    margin-bottom: 12px;
}
.wwb-mega__title {
    font-family: 'Playfair Display', serif;
    font-size: 32px;
    font-weight: 700;
    color: #fff;
    line-height: 1.1;
    margin: 0 0 12px;
}
.wwb-mega__desc {
    color: #D4D0DE;
    font-size: 13px;
    line-height: 1.5;
    margin: 0;
}
.wwb-mega__cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: var(--wwb-hd-pink);
    color: #fff !important;
    padding: 14px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    transition: filter .15s ease;
}
.wwb-mega__cta:hover { filter: brightness(.95); }

.wwb-mega__right {
    flex: 1;
    padding: 32px 40px 32px 32px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}
.wwb-mega__right-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.wwb-mega__right-title {
    font-family: 'Playfair Display', serif;
    font-size: 20px;
    font-weight: 700;
    color: var(--wwb-hd-primary);
    margin: 0;
}
.wwb-mega__right-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: var(--wwb-hd-secondary);
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
}
.wwb-mega__right-link:hover { gap: 8px; }

.wwb-mega__grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    flex: 1;
    align-content: start;
}
.wwb-mega__card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px;
    border-radius: 10px;
    border: 1px solid var(--wwb-hd-border);
    background: #fff;
    text-decoration: none;
    transition: border-color .15s ease, background .15s ease, transform .15s ease;
}
.wwb-mega__card:hover {
    background: var(--wwb-hd-surface-2);
    border-color: var(--wwb-hd-secondary);
    box-shadow: inset 0 0 0 1px var(--wwb-hd-secondary);
    transform: translateY(-1px);
}
.wwb-mega__card-icon {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    background: var(--wwb-hd-surface);
    color: var(--wwb-hd-secondary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background .15s ease, color .15s ease;
}
.wwb-mega__card:hover .wwb-mega__card-icon {
    background: var(--wwb-hd-secondary);
    color: #fff;
}
.wwb-mega__card-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}
.wwb-mega__card-title {
    color: var(--wwb-hd-primary);
    font-size: 14px;
    font-weight: 600;
}
.wwb-mega__card-sub {
    color: var(--wwb-hd-muted-2);
    font-size: 11px;
    font-weight: 400;
}

.wwb-mega__note {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--wwb-hd-muted-2);
    font-size: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--wwb-hd-border);
}
.wwb-mega__note svg { flex-shrink: 0; }

/* ─── Variant carrelage : panneau seul, 3 colonnes ─── */
.wwb-mega--carrelage {
    flex-direction: row;
    min-height: 0;
}
.wwb-mega__right--full {
    flex: 1;
    width: 100%;
    padding: 32px 40px;
}
.wwb-mega__grid--cols-3 {
    grid-template-columns: repeat(3, 1fr);
}
.wwb-mega__grid--cols-4 {
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
}
.wwb-mega__right-head--row2 {
    margin-top: 28px;
    padding-top: 20px;
    border-top: 1px solid var(--wwb-hd-border, #e5e5e5);
}

/* Mobile : pile les cols-4 en 1 colonne (cohérent avec cols-3) */
@media (max-width: 920px) {
    .wwb-mega__grid--cols-4 { grid-template-columns: 1fr; gap: 0; }
    .wwb-mega__right-head--row2 { margin-top: 16px; padding-top: 12px; }
}

/* Bouton chevron sub-toggle (visible mobile only) */
.wwb-header__sub-toggle {
    display: none;
    background: transparent;
    border: 0;
    color: var(--wwb-hd-muted);
    cursor: pointer;
    padding: 12px;
    align-items: center;
    justify-content: center;
}
.wwb-header__sub-toggle svg { transition: transform .2s ease; }

/* Backdrop nav mobile */
.wwb-header__backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(36, 28, 52, 0.55);
    z-index: 800;
    opacity: 0;
    transition: opacity .25s ease;
}

/* ============ RESPONSIVE ============ */
@media (max-width: 1024px) {
    .wwb-header__nav-inner { padding: 12px 24px; gap: 16px; }
    .wwb-header__top-inner { padding: 8px 24px; }
    .wwb-header__links { gap: 18px; }
    .wwb-header__btn--pro { display: none; }
}

@media (max-width: 768px) {
    .wwb-header__btn--pro,
    .wwb-header__icon-btn[href*="mon-compte"] { display: none; }
    .wwb-header__burger {
        display: inline-flex;
        position: relative;
        z-index: 1001;
        transition: transform .2s ease;
    }
    .wwb-header__burger span {
        transition: transform .25s ease, opacity .2s ease;
    }
    /* Quand le drawer est ouvert, le burger se positionne au-dessus du panel et se transforme en X */
    body.wwb-nav-open .wwb-header__burger {
        position: fixed;
        top: 18px;
        right: 16px;
    }
    body.wwb-nav-open .wwb-header__burger span:nth-child(1) {
        transform: translateY(6px) rotate(45deg);
    }
    body.wwb-nav-open .wwb-header__burger span:nth-child(2) {
        opacity: 0;
    }
    body.wwb-nav-open .wwb-header__burger span:nth-child(3) {
        transform: translateY(-6px) rotate(-45deg);
    }
    .wwb-header__top-left { font-size: 10px; }
    .wwb-header__nav-inner { padding: 10px 16px; }
    .wwb-header__top-inner { padding: 6px 16px; }
    .wwb-header__logo img { height: 36px; }
    .wwb-header__btn--cart { padding: 6px 12px; font-size: 11px; }

    /* Transformation du <ul> en panneau drawer (override de la règle desktop > .wwb-header__links absolute centered) */
    .wwb-header__nav-inner > .wwb-header__links {
        position: fixed;
        top: 0;
        right: 0;
        bottom: 0;
        left: auto;
        width: min(360px, 92vw);
        margin: 0;
        padding: 72px 0 calc(16px + env(safe-area-inset-bottom));
        background: var(--wwb-hd-bg, #fff);
        background-color: #fff;
        box-shadow: -12px 0 40px rgba(36, 28, 52, .18);
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        z-index: 900;
        transform: translateX(100%);
        transition: transform .28s cubic-bezier(.22, .61, .36, 1);
        list-style: none;
        flex: none;
        justify-content: flex-start;
    }
    body.wwb-nav-open .wwb-header__nav-inner > .wwb-header__links { transform: translateX(0) !important; }
    /* La nav (z-index 100) crée un stacking context qui emprisonne le drawer (z 900 local) :
       sans ceci le backdrop (z 800, frère de la nav) se dessine PAR-DESSUS le drawer et
       intercepte tous les taps (chaque tap fermait le menu). Nav ouverte => au-dessus du voile. */
    body.wwb-nav-open .wwb-header__nav { z-index: 900; }
    body.wwb-nav-open .wwb-header__backdrop {
        display: block;
        opacity: 1;
    }
    body.wwb-nav-open { overflow: hidden; }

    .wwb-header__link-item {
        border-bottom: 1px solid var(--wwb-hd-border);
        position: relative;
    }
    .wwb-header__link-item:first-child { border-top: 1px solid var(--wwb-hd-border); }

    /* Lien principal (ex-desktop) → ligne nav mobile */
    .wwb-header__link {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 16px 56px 16px 20px;
        font-size: 16px;
        font-weight: 600;
        color: var(--wwb-hd-primary);
        white-space: normal;
    }
    .wwb-header__link::after { display: none; } /* underline desktop hover off */
    .wwb-header__chevron { display: none; } /* le SVG inline du <a> est masqué en mobile */

    /* Bouton chevron toggle (mobile uniquement, à droite du li has-mega) */
    .wwb-header__link-item--has-mega .wwb-header__sub-toggle {
        display: inline-flex;
        position: absolute;
        top: 4px;
        right: 8px;
        width: 44px;
        height: 44px;
        z-index: 2;
    }
    .wwb-header__link-item--has-mega .wwb-header__sub-toggle[aria-expanded="true"] svg {
        transform: rotate(180deg);
    }

    /* Mega menu transformé en accordéon vertical */
    .wwb-header__mega {
        position: static;
        transform: none !important;
        opacity: 1;
        visibility: visible;
        width: auto;
        max-height: 0;
        overflow: hidden;
        transition: max-height .25s ease;
        z-index: auto;
    }
    .wwb-header__mega::before { display: none; }
    /* Désactive l'ouverture hover desktop sur mobile */
    .wwb-header__link-item--has-mega:hover .wwb-header__mega,
    .wwb-header__link-item--has-mega:focus-within .wwb-header__mega {
        opacity: 1;
        visibility: visible;
        max-height: 0;
        transform: none !important;
    }
    /* Expand via classe ajoutée par le JS */
    .wwb-header__link-item.is-mobile-expanded > .wwb-header__mega {
        max-height: 1500px !important;
    }
    .wwb-header__link-item.is-mobile-expanded > .wwb-header__sub-toggle svg {
        transform: rotate(180deg);
    }

    .wwb-mega {
        flex-direction: column;
        background: var(--wwb-hd-surface);
        border-radius: 0;
        box-shadow: none;
        min-height: 0;
    }
    /* Cache le visuel CTA gauche du mega menu (gradient) en mobile pour éviter le doublon */
    .wwb-mega__left { display: none; }
    .wwb-mega__right {
        width: auto;
        padding: 8px 0 12px;
    }
    .wwb-mega__right-head {
        padding: 4px 20px 8px;
    }
    .wwb-mega__right-title { font-size: 13px; text-transform: uppercase; letter-spacing: .5px; color: var(--wwb-hd-muted); font-weight: 700; }
    .wwb-mega__grid,
    .wwb-mega__grid--cols-3 {
        grid-template-columns: 1fr;
        gap: 0;
        padding: 0;
    }
    .wwb-mega__card {
        padding: 12px 20px 12px 36px;
        border-radius: 0;
        background: transparent;
    }
    .wwb-mega__card:hover { background: rgba(255,255,255,.6); }
    .wwb-mega__card-icon { width: 28px; height: 28px; }
    .wwb-mega__card-title { font-size: 15px; }
    .wwb-mega__card-sub { font-size: 12px; }
}

@media (max-width: 480px) {
    .wwb-header__top { display: none; }
}

/* ============ SIZE SWITCHER (fiche produit menuiserie) ============ */
.wwb-size-switcher {
    margin: 0 0 24px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--wwb-hd-border);
}
.wwb-size-switcher__head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}
.wwb-size-switcher__label {
    font-family: 'Inter', sans-serif;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1px;
    color: var(--wwb-hd-primary);
}
.wwb-size-switcher__badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}
.wwb-size-switcher__badge-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--wwb-hd-secondary);
    color: #fff;
    font-family: 'Inter', sans-serif;
    font-size: 11px;
    font-weight: 700;
}
.wwb-size-switcher__sep {
    display: inline-block;
    margin: 0 4px;
    color: var(--wwb-hd-border);
    font-weight: 400;
}
.wwb-size-switcher__desc {
    font-family: 'Inter', sans-serif;
    font-size: 12px;
    line-height: 1.5;
    color: var(--wwb-hd-muted);
    margin: 0 0 14px;
}
.wwb-size-switcher__hint {
    font-family: 'Inter', sans-serif;
    font-size: 12px;
    color: var(--wwb-hd-muted);
}

/* ============ CUSTOM LINK (hors dimension standard) ============ */
.wwb-single__custom-link {
    margin: 0 0 16px;
}
.wwb-single__custom-link-label {
    display: none;
}
.wwb-single__custom-link-cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 0;
    border: none;
    color: var(--wwb-hd-secondary);
    text-decoration: underline;
    text-underline-offset: 3px;
    transition: color .15s ease;
    width: fit-content;
}
.wwb-single__custom-link-cta:hover {
    color: var(--wwb-hd-primary-dark, #362C49);
}
.wwb-single__custom-link-cta > svg:first-child {
    display: none;
}
.wwb-single__custom-link-inner {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: 'Inter', sans-serif;
    font-size: 12px;
    font-weight: 500;
}
.wwb-single__custom-link-inner svg {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}
.wwb-single__custom-link-arrow {
    width: 12px;
    height: 12px;
    transition: transform .15s ease;
}
.wwb-single__custom-link-cta:hover .wwb-single__custom-link-arrow {
    transform: translateX(2px);
}
.wwb-size-switcher__grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
}
.wwb-size-switcher__btn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px 12px;
    border-radius: 8px;
    border: 1px solid var(--wwb-hd-border);
    background: #fff;
    color: var(--wwb-hd-primary);
    font-family: 'Inter', sans-serif;
    font-size: 12px;
    font-weight: 500;
    text-decoration: none;
    text-align: center;
    cursor: pointer;
    transition: border-color .15s ease, background .15s ease, color .15s ease, transform .15s ease;
}
.wwb-size-switcher__btn:hover {
    border-color: var(--wwb-hd-secondary);
    background: var(--wwb-hd-surface-2);
    transform: translateY(-1px);
}
.wwb-size-switcher__btn.is-current {
    background: var(--wwb-hd-primary);
    border-color: var(--wwb-hd-primary);
    color: #fff;
    font-weight: 700;
    cursor: default;
}
.wwb-size-switcher__btn.is-current:hover {
    transform: none;
    background: var(--wwb-hd-primary);
}
@media (max-width: 768px) {
    .wwb-size-switcher__grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}
@media (max-width: 480px) {
    .wwb-size-switcher__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* ============ MINI CART HOVER ============ */
.wwb-header__cart-wrap {
    position: relative;
    display: inline-block;
}

.wwb-header__mini-cart {
    position: absolute;
    top: calc(100% + 12px);
    right: 0;
    width: 380px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 12px 40px rgba(54, 44, 73, 0.18);
    padding: 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity .18s ease, transform .18s ease, visibility .18s;
    z-index: 1000;
    pointer-events: none;
}

.wwb-header__mini-cart::before {
    content: '';
    position: absolute;
    top: -12px;
    left: 0;
    right: 0;
    height: 12px;
    background: transparent;
}

.wwb-header__cart-wrap:hover .wwb-header__mini-cart,
.wwb-header__cart-wrap:focus-within .wwb-header__mini-cart,
.wwb-header__mini-cart:hover {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
}

.wwb-mini-cart {
    font-family: 'Inter', sans-serif;
}

.wwb-mini-cart__empty {
    padding: 32px 24px;
    text-align: center;
    color: var(--wwb-hd-muted, #9490A6);
}

.wwb-mini-cart__empty svg {
    color: var(--wwb-hd-muted, #9490A6);
    margin-bottom: 8px;
}

.wwb-mini-cart__empty p {
    margin: 0 0 12px;
    font-size: 13px;
    color: var(--wwb-hd-foreground, #362C49);
}

.wwb-mini-cart__shop-btn {
    display: inline-block;
    padding: 8px 16px;
    background: var(--wwb-hd-secondary, #7B74D0);
    color: #fff;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
    transition: background .15s;
}
.wwb-mini-cart__shop-btn:hover {
    background: var(--wwb-hd-primary-dark, #362C49);
    color: #fff;
}

.wwb-mini-cart__list {
    max-height: 320px;
    overflow-y: auto;
    padding: 12px;
}

.wwb-mini-cart__item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 10px;
    border-radius: 8px;
    transition: background .15s;
}

.wwb-mini-cart__item + .wwb-mini-cart__item {
    margin-top: 4px;
}

.wwb-mini-cart__item:hover {
    background: var(--wwb-hd-surface, #F8F7FC);
}

.wwb-mini-cart__item-img {
    flex-shrink: 0;
    width: 56px;
    height: 56px;
    border-radius: 6px;
    overflow: hidden;
    background: var(--wwb-hd-surface, #F8F7FC);
}

.wwb-mini-cart__item-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.wwb-mini-cart__item-body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.wwb-mini-cart__item-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--wwb-hd-foreground, #362C49);
    text-decoration: none;
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.wwb-mini-cart__item-meta {
    font-size: 11px;
    color: var(--wwb-hd-muted, #9490A6);
}

.wwb-mini-cart__item-price {
    font-size: 12px;
    font-weight: 600;
    color: var(--wwb-hd-secondary, #7B74D0);
    margin-top: 2px;
}

.wwb-mini-cart__item-remove {
    flex-shrink: 0;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: transparent;
    color: var(--wwb-hd-muted, #9490A6);
    font-size: 16px;
    line-height: 20px;
    text-align: center;
    text-decoration: none;
    transition: background .15s, color .15s;
}
.wwb-mini-cart__item-remove:hover {
    background: #fee;
    color: #c00;
}

.wwb-mini-cart__footer {
    border-top: 1px solid var(--wwb-hd-border, #ECEAF0);
    padding: 14px 16px 16px;
}

.wwb-mini-cart__total {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 13px;
    color: var(--wwb-hd-foreground, #362C49);
    margin-bottom: 10px;
}

.wwb-mini-cart__total strong {
    font-size: 15px;
    font-weight: 700;
}

.wwb-mini-cart__ctas {
    display: flex;
    gap: 8px;
}

.wwb-mini-cart__btn {
    flex: 1;
    padding: 10px 12px;
    border-radius: 8px;
    text-align: center;
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
    transition: background .15s, color .15s, border-color .15s;
}

.wwb-mini-cart__btn--secondary {
    background: transparent;
    color: var(--wwb-hd-foreground, #362C49);
    border: 1.5px solid var(--wwb-hd-border, #ECEAF0);
}
.wwb-mini-cart__btn--secondary:hover {
    border-color: var(--wwb-hd-secondary, #7B74D0);
    color: var(--wwb-hd-secondary, #7B74D0);
}

.wwb-mini-cart__btn--primary {
    background: var(--wwb-hd-primary, #FF99DA);
    color: #fff;
}
.wwb-mini-cart__btn--primary:hover {
    background: var(--wwb-hd-primary-dark, #362C49);
    color: #fff;
}

@media (max-width: 768px) {
    .wwb-header__mini-cart {
        width: calc(100vw - 32px);
        max-width: 380px;
        right: -16px;
    }
}

/* ──────────────────────────────────────────
 * Search overlay (toggled via [data-wwb-search-toggle])
 * ────────────────────────────────────────── */
.wwb-header__search-toggle { /* hérite de .wwb-header__icon-btn */ }

body.wwb-search-open { overflow: hidden; }

.wwb-search-overlay {
    position: fixed;
    inset: 0;
    z-index: 1200;
    display: flex;
    flex-direction: column;
    align-items: stretch;
}
.wwb-search-overlay[hidden] { display: none; }

.wwb-search-overlay__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, .4);
    opacity: 0;
    animation: wwb-search-fade-in .15s ease forwards;
    cursor: pointer;
}

.wwb-search-overlay__panel {
    position: relative;
    width: 100%;
    max-width: 760px;
    margin: 14vh auto 0;
    padding: 0 16px;
    transform: translateY(-12px);
    opacity: 0;
    animation: wwb-search-slide-down .2s ease forwards;
}

@keyframes wwb-search-fade-in {
    to { opacity: 1; }
}
@keyframes wwb-search-slide-down {
    to { transform: translateY(0); opacity: 1; }
}

.wwb-header__search {
    position: relative;
    display: flex;
    align-items: center;
    background: #fff;
    border: 1px solid #e6e6e6;
    border-radius: 12px;
    padding: 4px 8px 4px 16px;
    box-shadow: 0 18px 48px rgba(0, 0, 0, .14);
}
.wwb-header__search:focus-within {
    border-color: #d0d0d0;
}
.wwb-header__search-icon {
    display: inline-flex;
    align-items: center;
    color: #6b6b6b;
    margin-right: 10px;
    pointer-events: none;
}
.wwb-header__search-input {
    flex: 1 1 auto;
    border: 0;
    background: transparent;
    padding: 14px 0;
    font-size: 16px;
    color: #1f1f1f;
    outline: none;
    min-width: 0;
}
.wwb-header__search-input::placeholder { color: #8a8a8a; }
.wwb-header__search-input::-webkit-search-decoration,
.wwb-header__search-input::-webkit-search-cancel-button { display: none; }

.wwb-header__search-clear {
    appearance: none;
    background: transparent;
    border: 0;
    color: #6b6b6b;
    font-size: 20px;
    line-height: 1;
    padding: 6px 8px;
    cursor: pointer;
    border-radius: 6px;
}
.wwb-header__search-clear:hover { background: #ececec; color: #1f1f1f; }

.wwb-search-overlay__close {
    appearance: none;
    background: #f4f4f4;
    border: 0;
    color: #1f1f1f;
    width: 32px;
    height: 32px;
    margin-left: 6px;
    border-radius: 8px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.wwb-search-overlay__close:hover { background: #e6e6e6; }

.wwb-header__search-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid #e6e6e6;
    border-radius: 12px;
    box-shadow: 0 18px 48px rgba(0, 0, 0, .14);
    max-height: 60vh;
    overflow-y: auto;
    z-index: 1;
}
.wwb-header__search-dropdown[hidden] { display: none; }

.wwb-search-section {
    padding: 6px 0;
    border-bottom: 1px solid #f0f0f0;
}
.wwb-search-section:last-child { border-bottom: 0; }
.wwb-search-section__label {
    display: block;
    padding: 6px 14px;
    font-size: 11px;
    font-weight: 600;
    color: #8a8a8a;
    text-transform: uppercase;
    letter-spacing: .5px;
}

.wwb-search-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 14px;
    text-decoration: none;
    color: #1f1f1f;
    transition: background-color .1s ease;
}
.wwb-search-item:hover,
.wwb-search-item:focus,
.wwb-search-item.is-active {
    background: #f7f7f7;
    color: #1f1f1f;
}
.wwb-search-item__img {
    width: 44px;
    height: 44px;
    flex-shrink: 0;
    background: #f4f4f4;
    border-radius: 6px;
    overflow: hidden;
}
.wwb-search-item__img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.wwb-search-item__body {
    flex: 1 1 auto;
    min-width: 0;
}
.wwb-search-item__title {
    display: block;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.wwb-search-item__meta {
    display: block;
    font-size: 12px;
    color: #6b6b6b;
    line-height: 1.4;
    margin-top: 2px;
}
.wwb-search-item__price {
    flex-shrink: 0;
    font-size: 13px;
    font-weight: 600;
    color: #1f1f1f;
    white-space: nowrap;
}
.wwb-search-item__price del { color: #9a9a9a; font-weight: 400; margin-right: 4px; }

.wwb-search-item--cat {
    padding: 8px 14px;
    color: #1f1f1f;
}
.wwb-search-item--cat .wwb-search-item__title { font-weight: 500; }
.wwb-search-item--cat .wwb-search-item__count {
    font-size: 12px;
    color: #6b6b6b;
}

.wwb-search-empty,
.wwb-search-loading,
.wwb-search-error {
    padding: 18px 14px;
    color: #6b6b6b;
    font-size: 14px;
    text-align: center;
}
.wwb-search-loading { color: #8a8a8a; }
.wwb-search-error { color: #b00020; }

.wwb-search-footer {
    padding: 10px 14px;
    border-top: 1px solid #f0f0f0;
    background: #fafafa;
    border-radius: 0 0 10px 10px;
    text-align: center;
}
.wwb-search-footer button {
    appearance: none;
    background: transparent;
    border: 0;
    color: #1f1f1f;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    padding: 4px 8px;
    text-decoration: underline;
}
.wwb-search-footer button:hover { color: #000; }

@media (max-width: 768px) {
    .wwb-search-overlay__panel {
        margin-top: 8vh;
        padding: 0 12px;
    }
    .wwb-header__search-input { font-size: 15px; padding: 12px 0; }
}
