@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');
/* Subtle, boutique-style display font for header/nav */
@import url('https://fonts.googleapis.com/css2?family=Marcellus&display=swap');
/* Global icons (Font Awesome) for any page that imports this stylesheet */
@import url('https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.2/css/all.min.css');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root { --header-h: 108px; }

body {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'Noto Sans', 'Liberation Sans', sans-serif;
    background-color: #f0f0f0;
    padding-top: var(--header-h, 72px); /* Espace sous le header (taille dynamique) */
}
/* Empêche le scroll du body quand le menu mobile est ouvert */
body.menu-open { overflow: hidden; }


/* ===== HEADER WRAPPER ===== */
.header {
    position: fixed;
    top: 0; left: 0; right: 0;
  z-index: 1000;
    background: #fff;
  transition: background-color .3s ease, backdrop-filter .3s ease, box-shadow .3s ease;
    height: var(--header-h);
}

/* Effet translucide visible au scroll (comme index5) */
.header.scrolled {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: saturate(120%) blur(6px);
    box-shadow: 0 2px 12px rgba(0,0,0,0.18);
    border-bottom: 1px solid rgba(0,0,0,0.06);
}

/* ===== HEADER CONTAINER ===== */
.header > .container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 1em;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2em;
    height: 100%;
}

/* ===== LOGO ===== */
.logo {
    display: flex;
    align-items: center;
    font-size: 1.7em;
    font-weight: bold;
    letter-spacing: 2px;
    color: #222;
}
/* New composite logo (crown mark + wordmark) */
.logo-link { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; }
/* Explicit heights to ensure identical rendering across pages */
.logo-mark { height: 46px !important; width: auto; display: block; position: relative; top: -9px; }
.logo-type { height: 40px !important; width: auto; display: block; }

/* Hide hamburger by default (desktop). Will be shown on mobile breakpoint below */
.hamburger { display: none; }

/* ===== NAVIGATION ===== */
.nav {
    position: relative;
}
.nav ul {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 2.2em; /* slightly larger default gap */
    margin: 0;
    padding: 0;
}
.nav ul li a {
    color: #000;
    text-decoration: none;
    font-size: 1.3em;
    font-weight: 400; /* Marcellus is regular; keep subtle weight */
    font-family: 'Marcellus', 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    letter-spacing: 0.3px;
    transition: color 0.2s, filter .25s ease, transform .25s ease;
    position: relative;
    padding-bottom: 4px; /* space for the hover underline */
    white-space: nowrap; /* keep labels on one line */
}
.nav ul li a:hover,
.nav ul li a:focus {
    color: #000;
}
/* Premium underline reveal on hover/active (Shopify-like) */
.nav ul li > a::after {
    content: "";
    position: absolute;
    left: 0; right: 0;
    bottom: -4px;
    height: 2px;
    background: linear-gradient(90deg, #fb923c 0%, #f97316 50%, #fdba74 100%);
    transform: scaleX(0);
    transform-origin: left center;
    transition: transform .28s cubic-bezier(.2,.9,.25,1);
    opacity: 1;
    filter: drop-shadow(0 0 6px rgba(249, 115, 22, 0.35));
}
.nav ul li > a:hover::after,
.nav ul li > a:focus-visible::after,
.nav ul li > a.active::after {
    transform: scaleX(1);
}

/* Sophisticated orange hover effect: subtle glow + 3D micro-tilt */
.nav ul li > a::before {
    content: "";
    position: absolute;
    inset: -6px -10px -8px -10px; /* enlarged hit area for glow */
    border-radius: 12px;
    pointer-events: none;
    background: radial-gradient(120% 120% at 50% 50%, rgba(249, 115, 22, 0.18) 0%, rgba(255, 255, 255, 0) 60%);
    opacity: 0;
    transform: translateZ(0);
    transition: opacity .25s ease;
}
.nav ul li > a:hover::before,
.nav ul li > a:focus-visible::before {
    opacity: 1;
}
.nav ul li > a:hover {
    filter: drop-shadow(0 2px 6px rgba(249, 115, 22, 0.22)) saturate(1.03);
    transform: perspective(600px) translateZ(0) rotateX(0.5deg) rotateY(-0.5deg);
}

/* Orange focus ring to match hover accent */
.nav ul li > a:focus-visible {
    outline: 2px solid rgba(249, 115, 22, 0.6);
    outline-offset: 3px;
}

/* Accessible focus ring for keyboard users */
.nav ul li > a:focus-visible {
    outline: 2px solid #e6eaf2;
    outline-offset: 2px;
}
.dropdown {
  position: relative;
}
.dropdown > a {
  display: flex;
  align-items: center;
  gap: 0.4em;
    font-weight: 400;
    font-family: 'Marcellus', 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  position: relative;
}
.dropdown > a i {
  font-size: 0.85em;
  transition: transform 0.3s ease;
  transform-origin: center;
}
.dropdown.open > a i {
  transform: rotate(180deg);
}
.dropdown-menu {
  position: absolute;
  top: 120%;
  left: 0;
  background: white;
  border-radius: 12px;
  padding: 0.8em 0;
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.08);
  min-width: 180px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition: opacity 0.25s ease, transform 0.25s ease;
  z-index: 100;
}
.dropdown.open .dropdown-menu {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}
.dropdown-menu li {
  width: 100%;
}
.dropdown-menu li a {
  display: block;
  width: 100%;
        padding: 0.85em 1.2em; /* a bit more vertical space */
    font-size: 1em;
    color: #222;
    font-family: 'Marcellus', 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  text-decoration: none;
  transition: background 0.2s, color 0.2s;
    white-space: nowrap; /* prevent category names from breaking */
}

    /* Increase spacing further on wider desktops */
    @media (min-width: 1024px) {
        .nav ul {
            gap: 2.8em;
        }
    }
.dropdown-menu li a:hover,
.dropdown-menu li a:focus {
  background-color: #f9f9f9;
  color: #111;
  font-weight: 600;
  cursor: pointer;
}

/* ===== HEADER ACTIONS ===== */
/* ===== MEGA MENU (Shop) ===== */
.mega-menu {
    position: absolute;
    top: 120%;
    left: 0;
    display: grid;
    grid-template-columns: repeat(3, minmax(230px, 1fr));
    align-items: start;
    gap: 18px 26px; /* compact spacing */
    background: #fff;
    border-radius: 14px;
    padding: 16px 20px; /* tighter subheader */
    box-shadow: 0 18px 44px rgba(0, 0, 0, 0.10), 0 1px 0 rgba(255,255,255,0.6) inset;
    min-width: 720px; /* still wide enough, more compact */
    /* no hard min-height: let content define height */
    opacity: 0;
    pointer-events: none;
    transform: translateY(10px);
    transition: opacity .28s cubic-bezier(.2,.9,.25,1), transform .28s cubic-bezier(.2,.9,.25,1);
    z-index: 120;
    border: 1px solid rgba(249, 115, 22, 0.12);
}
.mega-menu .mega-col { display: flex; flex-direction: column; padding: 8px 14px; }
.mega-menu .mega-col + .mega-col { border-left: 1px solid rgba(249, 115, 22, 0.10); }
.mega-menu.open { opacity: 1; pointer-events: auto; transform: translateY(0); }
.mega-menu .mega-col h3 {
    margin: 0 0 8px;
    font-size: 1rem;
    font-weight: 600;
    color: #111;
    position: relative;
    letter-spacing: 0.2px;
}
.mega-menu .mega-col h3::after {
    content: "";
    position: absolute;
    left: 0; bottom: -6px;
    width: 48px; height: 2px;
    background: linear-gradient(90deg, #fb923c, #f97316, #fdba74);
    border-radius: 2px;
    filter: drop-shadow(0 0 6px rgba(249, 115, 22, 0.35));
}
.mega-menu .mega-col ul { list-style: none; margin: 16px 0 0; padding: 0; }
.mega-menu .mega-col ul { display: flex; flex-direction: column; }
.mega-menu .mega-col li + li { margin-top: 10px; }
.mega-menu .mega-col a {
    display: grid;
    grid-template-columns: minmax(3.6ch, auto) 1fr; /* compact number column */
    align-items: start; /* align multi-line labels from top */
    column-gap: 10px;
    width: 100%;
    min-height: 32px; /* compact tap target height */
    line-height: 1.45;
    font-size: 0.98rem;
    color: #222;
    text-decoration: none;
    padding: 6px 8px; /* compact item padding */
    border-radius: 10px;
    transition: color .22s ease, background .22s ease, transform .22s ease, box-shadow .22s ease;
}
.mega-menu .mega-col a .num {
    justify-self: end;
    min-width: 3.6ch; /* fixed baseline width without truncating larger numbers */
    text-align: right;
    font-feature-settings: "tnum";
    font-variant-numeric: tabular-nums;
    color: #f97316;
    font-weight: 600;
}
.mega-menu .mega-col a .label {
    white-space: normal; /* allow wrapping to prevent overlap */
    overflow: visible;
    text-overflow: clip;
}
.mega-menu .mega-col a:hover,
.mega-menu .mega-col a:focus-visible {
    color: #111;
    background: rgba(255, 247, 235, 0.85);
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(249, 115, 22, 0.15);
    outline: none;
}
@media (max-width: 768px) {
    .mega-menu {
        position: static;
        display: grid;
                grid-template-columns: 1fr;
        min-width: unset;
        width: 100%;
        margin-top: 14px;
        padding: 18px 18px; /* more space on mobile too */
        opacity: 1; /* render inline inside mobile panel */
        pointer-events: auto;
        transform: none;
    }
}

/* Responsive stacking: switch to 2 columns on medium screens, 1 column on narrow */
@media (max-width: 1100px) and (hover: hover) {
    .mega-menu {
        grid-template-columns: repeat(2, minmax(260px, 1fr));
        min-width: 640px;
    }
}
@media (max-width: 860px) and (hover: hover) {
    .mega-menu {
        grid-template-columns: 1fr;
        min-width: unset;
    }
}

/* Open mega menu on hover/focus for pointer devices */
@media (hover: hover) {
    .dropdown:hover .mega-menu,
    .dropdown:focus-within .mega-menu {
        opacity: 1;
        pointer-events: auto;
        transform: translateY(0);
    }
    .dropdown:hover > a i,
    .dropdown:focus-within > a i {
        transform: rotate(180deg);
    }
}
.header-actions {
    display: flex;
    align-items: center;
    gap: 1.2em;
}
.search-form {
    display: flex;
    align-items: center;
    background: #f5f5f5;
    border-radius: 24px;
    padding: 2px 8px 2px 14px;
    border: 1px solid #e0e0e0;
    transition: box-shadow 0.18s;
}
.search-form:focus-within {
    box-shadow: 0 0 0 2px #ffc10755;
    border-color: #ffc107;
}
.search-form input[type="search"] {
    border: none;
    background: transparent;
    padding: 0.5em 0.4em 0.5em 0;
    font-size: 1em;
    outline: none;
    min-width: 110px;
    max-width: 150px;
    color: #222;
}
.search-form button {
    background: none;
    border: none;
    padding: 0 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
}
.cart-link {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f5f5f5;
    border-radius: 50%;
    width: 38px;
    height: 38px;
    transition: border-color .15s ease, box-shadow .15s ease;
    border: 1px solid #e0e0e0;
    position: relative;
}
.cart-link:hover,
.cart-link:focus {
    background: #f5f5f5;
    border-color: #ff8a00; /* orange contour on hover */
    box-shadow: 0 6px 18px rgba(255, 138, 0, 0.18);
}
.cart-link svg {
    display: block;
    width: 22px;
    height: 22px;
    color: #191919; /* stroke uses currentColor */
}
.cart-link:hover svg,
.cart-link:focus svg {
    color: #ff8a00; /* tint stroke to orange on hover */
}

/* Account icon styled like the cart (professional look) */
.account-link {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f5f5f5;
    border-radius: 50%;
    width: 38px;
    height: 38px;
    transition: border-color .15s ease, box-shadow .15s ease;
    border: 1px solid #e0e0e0;
}
.account-link svg { width: 22px; height: 22px; color: #191919; display: block; }
.account-link:hover, .account-link:focus {
    background: #f5f5f5;
    border-color: #ff8a00; /* orange contour */
    box-shadow: 0 6px 18px rgba(255, 138, 0, 0.18);
}
.account-link:hover svg, .account-link:focus svg { color: #ff8a00; }

/* Responsive header layout only (no generic content grid rules) */
@media (max-width: 900px) {
    /* Compact single-row layout like index5 */
    .header > .container {
        display: grid;
        grid-template-columns: auto 1fr auto;
        align-items: center;
        gap: 12px;
    }
    /* Smaller logo to reduce header height on tablets/phones */
    .logo-mark { height: 30px !important; }
    .logo-type { height: 28px !important; }
    .header-actions {
        justify-content: flex-end;
        margin-top: 0;
    }

    /* Mobile hamburger button */
    .hamburger {
        appearance: none;
        background: transparent;
        border: 0;
        padding: 10px 12px;
        display: inline-flex; /* visible only on mobile */
        align-items: center;
        justify-content: center;
        cursor: pointer;
        border-radius: 10px;
    }
    .hamburger-box { width: 26px; height: 18px; position: relative; display: inline-block; }
    .hamburger-inner, .hamburger-inner::before, .hamburger-inner::after { position: absolute; left: 0; width: 26px; height: 2px; background: #181818; content: ""; transition: transform .25s ease, opacity .2s ease, top .25s ease; }
    .hamburger-inner { top: 8px; }
    .hamburger-inner::before { top: -8px; }
    .hamburger-inner::after { top: 8px; }
    .hamburger.is-active .hamburger-inner { transform: rotate(45deg); }
    .hamburger.is-active .hamburger-inner::before { transform: rotate(90deg); top: 0; }
    .hamburger.is-active .hamburger-inner::after { transform: rotate(90deg); top: 0; opacity: 0; }

    /* Mobile nav panel */
    #main-nav {
        position: fixed;
        inset: calc(var(--header-h, 72px) + var(--userbar-h, 0px)) 0 0 0; /* sous header + userbar */
        background: rgba(255,255,255,0.98);
        backdrop-filter: blur(8px);
        display: block; /* explicit to prevent overrides */
        transform: translateY(-8px);
        opacity: 0;
        pointer-events: none;
        transition: opacity .22s ease, transform .22s ease;
        box-shadow: 0 10px 30px rgba(0, 0, 0, .10);
        z-index: 1500;
        overflow-y: auto; /* allow scrolling if menu is taller than viewport */
        max-height: calc(100vh - var(--header-h, 72px) - env(safe-area-inset-bottom, 0px));
    }
    #main-nav.open { transform: none; opacity: 1; pointer-events: auto; }
    #main-nav ul { display: grid; gap: 14px; padding: 16px; }
}
@media (max-width: 600px) {
    .header > .container { padding: 0 8px; gap: 10px; }
    .logo-mark { height: 26px !important; }
    .logo-type { height: 22px !important; }
    /* Mobile: show only the crown (hide wordmark) */
    .logo-type { display: none !important; }
    .logo-link { gap: 0; }
    .search-form input[type="search"] { min-width: 90px; max-width: 120px; }
    :root { --header-h: 64px; }
}
@media (min-width: 900px) {
    /* Ensure hamburger stays hidden on desktop/tablet layouts */
    .hamburger { display: none; }
}

/* Adjust underline position in mobile panel to avoid clipping */
@media (max-width: 900px) {
    .nav ul li > a::after { bottom: -2px; }
}

/* ===== Global CTA buttons (orange/blue) ===== */
.btn-hero {
    display: inline-block;
    padding: 0.9rem 1.2rem;
    border-radius: 10px;
    font-weight: 800;
    text-decoration: none;
    color: #fff;
    transition: transform .15s ease, box-shadow .15s ease, filter .2s ease;
}
.btn-hero:hover { transform: translateY(-1px); }
.btn-hero:active { transform: translateY(0); }
.btn-hero:focus-visible { outline: 2px solid #111; outline-offset: 2px; }

.btn-orange {
    background: linear-gradient(135deg, #ff8a00, #ff7a00);
    box-shadow: 0 8px 24px rgba(255, 138, 0, 0.35);
}

.btn-blue {
    background: linear-gradient(135deg, #0b5fff, #3b7cff);
    box-shadow: 0 8px 24px rgba(11, 95, 255, 0.35);
}

/* ===== Global Light Theme for Cart Sidebar (applies everywhere) ===== */
/* These scoped overrides make the side cart very light across all pages. */

.cart-sidebar {
    background: #ffffff !important;
    color: #1a2230 !important;
    border-left: 1px solid #e6eaf2 !important;
}

.cart-head,
.cart-foot {
    background: rgba(255, 255, 255, 0.9) !important;
    backdrop-filter: blur(6px);
    border-color: #e6eaf2 !important;
}

.cart-title i { color: #3454d1 !important; }

.icon-btn {
    border-color: #dfe5f0 !important;
    color: #5b647a !important;
}
.icon-btn:hover {
    color: #1a2230 !important;
    border-color: #cfd8e6 !important;
}

.cart-content { color: #1a2230 !important; }
.empty { color: #7b859a !important; }

.cart-item {
    background: #ffffff !important;
    border: 1px solid #e6eaf2 !important;
}
.cart-item img { border-color: #e6eaf2 !important; background: #f8fafc !important; }
.ci-title { color: #1a2230 !important; }
.ci-meta { color: #6a7288 !important; }
.qtybox button {
    background: #f3f6fb !important;
    border: 1px solid #dfe5f0 !important;
    color: #1a2230 !important;
}
.ci-price { color: #1a2230 !important; }
.remove-btn { color: #c62828 !important; }

.shipping-box {
    background: #f9fbff !important;
    border: 1px solid #e6eaf2 !important;
}
.addr-fields input {
    background: #ffffff !important;
    color: #1a2230 !important;
    border: 1px solid #dfe5f0 !important;
}

.ship-opt {
    border-color: #dfe5f0 !important;
    background: #ffffff !important;
}

.summary-row { color: #6a7288 !important; }
.grand { color: #1a2230 !important; }

/* Buttons inside the cart: light styling */
.cart-sidebar .btn.outline {
    border-color: #dfe5f0 !important;
    background: #ffffff !important;
    color: #1a2230 !important;
}
.cart-sidebar .btn.outline:hover { border-color: #cfd8e6 !important; }

.cart-sidebar .btn.primary {
    background: linear-gradient(135deg, #ff8a00, #ff6a00) !important;
    border: 1px solid #ff7a1a !important;
    color: #ffffff !important;
    box-shadow: 0 6px 18px rgba(255, 106, 0, .25) !important;
}
.cart-sidebar .btn.primary:hover { filter: brightness(1.05) !important; }