/* =========================================================
   HEADER GLOBAL VERINADERM
   Objectif : un seul header identique sur toutes les pages.
   Ce fichier est chargé après les CSS de page dans layouts/app.blade.php
   afin d'éviter que verinaderm-home/shop/product/cart écrasent le header.
   ========================================================= */

:root {
    --cream: #fbf7f1;
    --paper: #fffaf4;
    --dark: #1f261d;
    --gold: #b28a57;
    --text: #43382f;
    --muted: #8c8175;
    --border: #e8ded2;
}

.topbar,
.site-header,
.site-header *,
.topbar * {
    box-sizing: border-box;
}

html {
    max-width: 100%;
    overflow-x: hidden;
}

body {
    max-width: 100%;
    overflow-x: hidden;
}

.topbar {
    width: 100%;
    background: var(--dark);
    color: #efe7dc;
    font-size: 12px;
    line-height: 1.4;
    padding: 8px 40px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

.site-header {
    position: relative;
    z-index: 50;
    width: 100%;
    height: 110px;
    min-height: 110px;
    padding: 0 55px;
    overflow: visible;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    align-items: center;
    gap: 18px;
    background: var(--paper);
    border-bottom: 1px solid rgba(232, 222, 210, .78);
}

.mobile-menu-check,
.mobile-menu-btn {
    display: none;
}

.nav-left,
.header-icons {
    display: flex;
    align-items: center;
    gap: 28px;
    min-width: 0;
}

.nav-left {
    justify-content: flex-start;
}

.header-icons {
    justify-content: flex-end;
}

.site-header a {
    color: var(--text);
    text-decoration: none;
    font-size: 13px;
}

.site-header .active {
    color: var(--gold);
    font-weight: 600;
}

.brand,
.brand-logo {
    height: 110px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
}

.site-logo {
    height: 190px;
    max-height: none;
    width: auto;
    max-width: 280px;
    object-fit: contain;
    display: block;
    transition: transform .28s ease, filter .28s ease;
}

.site-logo:hover {
    transform: scale(1.04);
    filter: drop-shadow(0 14px 28px rgba(0, 0, 0, 0.14));
}

.cart {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    min-height: 34px;
}

.cart span,
.cart b {
    position: absolute;
    top: -10px;
    right: -12px;
    min-width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--gold);
    color: #fff;
    font-size: 10px;
    display: grid;
    place-items: center;
    font-weight: 600;
}

/* Amélioration responsive globale sans modifier les fonctionnalités */
img,
video,
canvas,
svg {
    max-width: 100%;
}

main,
section,
.shop-page,
.cart-page,
.checkout-page,
.product-section,
.details-tabs,
.recommended,
.footer-content {
    max-width: 100%;
}

.product-card,
.category-card,
.cart-item,
.summary-card,
.checkout-form-card,
.confirmation-card {
    min-width: 0;
}

@media (max-width: 900px) {
    .topbar {
        display: none;
    }

    .site-header {
        position: sticky;
        top: 0;
        height: 84px;
        min-height: 84px;
        padding: 0 16px;
        grid-template-columns: 46px minmax(0, 1fr) 46px;
        gap: 8px;
        box-shadow: 0 16px 36px rgba(31, 38, 29, .08);
        backdrop-filter: blur(12px);
    }

    .mobile-menu-btn {
        display: inline-flex;
        width: 42px;
        height: 42px;
        border: 1px solid rgba(178, 138, 87, .38);
        border-radius: 999px;
        align-items: center;
        justify-content: center;
        flex-direction: column;
        gap: 5px;
        background: linear-gradient(145deg, rgba(255,255,255,.82), rgba(251,247,241,.94));
        box-shadow: 0 12px 26px rgba(31, 38, 29, .10);
        cursor: pointer;
        justify-self: start;
        -webkit-tap-highlight-color: transparent;
    }

    .mobile-menu-btn span {
        width: 18px;
        height: 2px;
        border-radius: 999px;
        background: var(--dark);
        transition: transform .25s ease, opacity .25s ease;
    }

    .mobile-menu-check:checked + .mobile-menu-btn span:nth-child(1) {
        transform: translateY(7px) rotate(45deg);
    }

    .mobile-menu-check:checked + .mobile-menu-btn span:nth-child(2) {
        opacity: 0;
    }

    .mobile-menu-check:checked + .mobile-menu-btn span:nth-child(3) {
        transform: translateY(-7px) rotate(-45deg);
    }

    .brand,
    .brand-logo,
    .header-icons {
        height: 84px;
    }

    .brand,
    .brand-logo {
        justify-self: center;
    }

    .site-logo {
        height: 102px;
        max-width: min(52vw, 205px);
    }

    .header-icons {
        justify-self: end;
        justify-content: flex-end;
        gap: 0;
    }

    .cart {
        min-width: 42px;
        min-height: 42px;
        border-radius: 999px;
        background: rgba(255, 250, 244, .72);
        border: 1px solid rgba(178, 138, 87, .24);
        box-shadow: 0 10px 24px rgba(31, 38, 29, .08);
    }

    .cart span,
    .cart b {
        top: -4px;
        right: -4px;
    }

    .nav-left {
        position: absolute;
        top: calc(100% + 10px);
        left: 14px;
        right: 14px;
        height: auto !important;
        display: grid;
        grid-template-columns: 1fr;
        gap: 10px;
        padding: 14px;
        background: rgba(255, 250, 244, .98);
        border: 1px solid rgba(232, 222, 210, .95);
        border-radius: 22px;
        box-shadow: 0 22px 58px rgba(31, 38, 29, .16);
        transform: translateY(-10px) scale(.98);
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transition: opacity .24s ease, transform .24s ease, visibility .24s ease;
    }

    .mobile-menu-check:checked ~ .nav-left {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
        transform: translateY(0) scale(1);
    }

    .nav-left a {
        display: flex;
        align-items: center;
        justify-content: space-between;
        min-height: 48px;
        padding: 0 16px;
        border-radius: 16px;
        background: linear-gradient(135deg, rgba(251,247,241,.88), rgba(255,255,255,.96));
        border: 1px solid rgba(232, 222, 210, .75);
        font-size: 13px;
        letter-spacing: .8px;
        text-transform: uppercase;
    }

    .nav-left a::after {
        content: "→";
        color: var(--gold);
        font-size: 15px;
    }

    .nav-left a.active {
        background: linear-gradient(135deg, rgba(178,138,87,.14), rgba(255,255,255,.95));
    }

    .hero,
    .product-grid,
    .shop-layout,
    .cart-layout,
    .checkout-layout,
    .details-grid,
    .recommended .cards,
    .footer-content,
    .footer-links {
        min-width: 0;
    }
}

@media (max-width: 520px) {
    .site-header {
        height: 78px;
        min-height: 78px;
        padding: 0 12px;
        grid-template-columns: 44px minmax(0, 1fr) 44px;
    }

    .brand,
    .brand-logo,
    .header-icons {
        height: 78px;
    }

    .site-logo {
        height: 92px;
        max-width: min(58vw, 168px);
    }

    .mobile-menu-btn,
    .cart {
        width: 40px;
        height: 40px;
        min-width: 40px;
        min-height: 40px;
    }

    .nav-left {
        left: 10px;
        right: 10px;
        border-radius: 20px;
    }

    .nav-left a {
        min-height: 46px;
        padding: 0 14px;
        font-size: 12px;
    }

    .hero-content h1,
    .shop-title h1,
    .product-info h1,
    .cart-page h1,
    .checkout-title h1 {
        overflow-wrap: anywhere;
    }
}

.site-header .header-icons a.cart{
    position: relative !important;

    width: 44px !important;
    height: 44px !important;
    min-width: 44px !important;

    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;

    font-size: 24px !important;
    line-height: 1 !important;
    text-decoration: none !important;

    border-radius: 50% !important;

    background: #fffaf4 !important;
    border: 1px solid #e8ded2 !important;

    box-shadow: 0 6px 16px rgba(31, 38, 29, .08) !important;
}

.site-header .header-icons a.cart span,
.site-header .header-icons a.cart b{
    position: absolute !important;

    top: -4px !important;
    right: -4px !important;

    min-width: 18px !important;
    height: 18px !important;

    padding: 0 5px !important;

    border-radius: 999px !important;

    background: #1f261d !important;
    color: #fff !important;

    display: flex !important;
    align-items: center !important;
    justify-content: center !important;

    font-size: 9px !important;
    font-weight: 700 !important;

    line-height: 1 !important;
    z-index: 5 !important;
}

@media (max-width: 768px){

    .site-header .header-icons a.cart{
        width: 34px !important;
        height: 34px !important;
        min-width: 34px !important;

        font-size: 18px !important;

        box-shadow: 0 4px 12px rgba(31, 38, 29, .06) !important;
    }

    .site-header .header-icons a.cart span,
    .site-header .header-icons a.cart b{
        min-width: 15px !important;
        height: 15px !important;

        font-size: 8px !important;

        top: -3px !important;
        right: -3px !important;
    }
}