/* ============================================================
   NAV.CSS — MV Moda Femenina
   Header + Mobile Menu — from MV Maison design
   ============================================================ */

/* ── Header ── */

.mv-header {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 50;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    padding: 14px 20px;
    transition: all 0.35s cubic-bezier(.2,.6,.2,1);
    color: var(--cream);
    max-width: 100%;
}

/* Inner header content limited on ultra-wide screens */
@media (min-width: 1440px) {
    .mv-header {
        padding-left: calc((100vw - 1440px) / 2 + 48px);
        padding-right: calc((100vw - 1440px) / 2 + 48px);
    }
}

/* Mobile: left = burger, right = icons */
.hdr-left {
    display: flex;
    align-items: center;
}

.hdr-right {
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

.mv-header::before {
    content: '';
    position: absolute; inset: 0;
    background: linear-gradient(to bottom, rgba(0,0,0,0.4), rgba(0,0,0,0.02) 70%, transparent);
    pointer-events: none;
    transition: opacity 0.35s;
}

.mv-header.solid,
.mv-header.scrolled {
    background: var(--cream);
    color: var(--ink);
    border-bottom: 1px solid var(--border);
    padding: 10px 20px;
}

.mv-header.solid::before,
.mv-header.scrolled::before { opacity: 0; }

/* ── Burger (mobile only) ── */

.hdr-menu {
    display: flex;
    flex-direction: column;
    gap: 5px;
    width: 22px;
    padding: 6px 0;
    color: inherit;
}

.hdr-menu span {
    display: block;
    height: 1px;
    background: currentColor;
    transition: 0.3s;
}

.hdr-menu span:nth-child(1) { width: 22px; }
.hdr-menu span:nth-child(2) { width: 14px; }

/* ── Desktop nav left / right (hidden mobile) ── */

.hdr-nav-left,
.hdr-nav-right { display: none; gap: 28px; }

/* ── Cart icon wrapper ── */
.cart-btn {
    position: relative;
}

.cart-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: var(--gold);
    color: var(--ink);
    font-size: 9px;
    font-weight: 600;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    font-feature-settings: 'tnum';
    opacity: 0;
    transition: opacity 0.2s;
}

.cart-badge.visible { opacity: 1; }

.hdr-link {
    font-size: 13px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    font-weight: 400;
    opacity: 0.85;
    transition: opacity 0.2s;
    position: relative;
    padding: 6px 0;
    color: inherit;
    background: none;
    border: none;
    cursor: pointer;
    font-family: var(--f-body);
}

.hdr-link:hover,
.hdr-link.active { opacity: 1; }

.hdr-link.active::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 1px;
    background: currentColor;
}

/* ── Logo — centered in its grid column ── */

.hdr-logo {
    justify-self: center;
    color: inherit;
    text-decoration: none;
    background: none;
    border: none;
    cursor: pointer;
    font-family: inherit;
    display: flex;
    align-items: center;
}

.hdr-logo-img {
    height: 40px;
    width: auto;
}

/* ── Icons (search + cart) ── */

.hdr-icons {
    display: flex;
    align-items: center;
    gap: 14px;
    justify-self: end;
}

.hdr-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    transition: opacity 0.2s;
    padding: 4px;
    color: inherit;
    background: none;
    border: none;
    cursor: pointer;
    font-family: var(--f-body);
}

.hdr-btn:hover { opacity: 0.6; }

.cart-btn {
    font-size: 13px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

/* Mobile: show icon, hide text */
.cart-label,
.cart-num { display: none; }
.cart-icon { display: block; }

/* Mobile: left search on, right search off */
.hdr-search-mobile { display: flex; margin-left: 10px; }
#searchBtn         { display: none; }

/* ── Wishlist badge on header button ── */
.hdr-wish-btn {
    position: relative;
}

/* Ensure heart icon is visible on both transparent and solid header */
.hdr-wish-btn svg {
    stroke: var(--cream);
    transition: stroke 0.4s ease;
}

.mv-header.solid .hdr-wish-btn svg,
.mv-header.scrolled .hdr-wish-btn svg {
    stroke: var(--ink);
}

.hdr-wish-badge {
    position: absolute;
    top: -4px;
    right: -6px;
    background: var(--gold);
    color: var(--ink);
    font-size: 9px;
    font-weight: 700;
    min-width: 15px;
    height: 15px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 3px;
    line-height: 1;
}

/* ── Wishlist overlay (slides from right) ── */
.wl-overlay {
    position: fixed;
    inset: 0;
    z-index: 200;
    pointer-events: none;
    background: var(--cream);
    display: flex;
    flex-direction: column;
    transform: translateY(100%);
    transition: transform 0.4s cubic-bezier(.2,.7,.2,1);
}

.wl-overlay.open {
    pointer-events: auto;
    transform: translateY(0);
}

.wl-panel { display: contents; }

.wl-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
}

.wl-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: var(--f-body);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--ink);
}

.wl-close {
    background: none;
    border: none;
    font-size: 18px;
    color: var(--warm-gray);
    cursor: pointer;
    padding: 6px;
    transition: color 0.2s;
    line-height: 1;
}

.wl-close:hover { color: var(--ink); }

.wl-body {
    flex: 1;
    overflow-y: auto;
    padding: 8px 0;
    -webkit-overflow-scrolling: touch;
}

/* Wishlist product row */
.wl-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 24px;
    border-bottom: 1px solid var(--border-light);
    text-decoration: none;
    color: inherit;
    transition: background 0.15s;
}

.wl-item:hover { background: var(--cream-2); }

.wl-item-img {
    width: 56px;
    height: 70px;
    object-fit: cover;
    object-position: center top;
    background: var(--cream-3);
    flex-shrink: 0;
}

.wl-item-info { flex: 1; min-width: 0; }

.wl-item-name {
    font-family: var(--f-body);
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--ink);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 3px;
}

.wl-item-cat {
    font-family: var(--f-italic);
    font-style: italic;
    font-size: 11px;
    color: var(--warm-gray);
    margin-bottom: 4px;
}

.wl-item-price {
    font-family: var(--f-display);
    font-size: 14px;
    color: var(--gold-dark);
}

.wl-item-remove {
    background: none;
    border: none;
    color: var(--warm-gray-2);
    cursor: pointer;
    padding: 6px;
    font-size: 16px;
    flex-shrink: 0;
    line-height: 1;
    transition: color 0.2s;
}

.wl-item-remove:hover { color: var(--bordeaux); }

/* Empty state */
.wl-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 32px;
    text-align: center;
    gap: 12px;
}

.wl-empty-icon { font-size: 40px; }

.wl-empty-text {
    font-family: var(--f-display);
    font-size: 20px;
    font-weight: 400;
    color: var(--ink);
}

.wl-empty-sub {
    font-size: 13px;
    color: var(--warm-gray);
    line-height: 1.6;
}

/* ── Mobile Menu — fullscreen, links at bottom ── */

.mobile-menu {
    position: fixed;
    inset: 0;
    z-index: 100;
    background: var(--cream);
    display: flex;
    flex-direction: column;
    padding: 0 28px 40px;
    transform: translateX(100%);
    transition: transform 0.4s cubic-bezier(.2,.7,.2,1);
    pointer-events: none;
}

.mobile-menu.open {
    transform: translateX(0);
    pointer-events: auto;
}

/* backdrop not needed for fullscreen — kept as no-op */
.mm-backdrop { display: none; }
.mm-panel    { display: contents; }

.mm-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
}

.mm-logo-img {
    height: 36px;
    width: auto;
    filter: invert(1) sepia(1) saturate(0.3) brightness(0.35);
}

.mm-close {
    display: flex;
    padding: 8px;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--warm-gray);
    min-width: 44px;
    min-height: 44px;
    align-items: center;
    justify-content: flex-end;
    transition: color 0.2s;
}

/* Slogan in the upper area */
.mm-slogan {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 0 16px;
    background: radial-gradient(ellipse 70% 55% at 50% 50%, rgba(184,153,104,0.07) 0%, transparent 100%);
}

.mm-slogan p {
    font-family: var(--f-italic);
    font-style: italic;
    font-size: 26px;
    font-weight: 300;
    line-height: 1.65;
    color: var(--warm-gray);
    letter-spacing: 0.3px;
}

.mm-slogan-line {
    width: 36px;
    height: 1px;
    background: linear-gradient(to right, transparent, var(--gold), transparent);
    opacity: 0.55;
    margin: 18px 0;
}

/* Nav pushes to bottom */
.mm-nav {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 0;
    overflow: visible;
}

.mm-link {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 16px 0;
    border-top: 1px solid var(--border-light);
    gap: 4px 12px;
    flex-wrap: wrap;
    background: none;
    border-left: none;
    border-right: none;
    border-bottom: none;
    cursor: pointer;
    color: var(--ink);
    font-family: var(--f-body);
    text-decoration: none;
    -webkit-tap-highlight-color: transparent;
}

.mm-link:last-child { border-bottom: 1px solid var(--border-light); }

.mm-link-label {
    font-family: var(--f-display);
    font-size: 26px;
    font-weight: 400;
    letter-spacing: 0.3px;
    flex: 1;
}

.mm-link.active .mm-link-label { font-style: italic; color: var(--gold); }

.mm-link-sub {
    font-size: 10px;
    color: var(--warm-gray);
    letter-spacing: 0.15em;
    text-transform: uppercase;
    width: 100%;
    order: 2;
}

.mm-link-arrow {
    color: var(--warm-gray);
    font-size: 14px;
}

.mm-foot {
    padding-top: 24px;
    padding-bottom: 16px;
    border-top: 1px solid var(--border);
    margin-top: 24px;
    flex-shrink: 0;
    transition: padding-bottom 0.3s ease;
}

/* Push mm-foot up when cart bar is visible */
body.has-cart-bar .mm-foot {
    padding-bottom: 84px;
}

.mm-foot-title {
    font-family: var(--f-display);
    font-size: 12px;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    margin-bottom: 6px;
    color: var(--warm-gray);
}

.mm-foot-text {
    font-size: 12px;
    color: var(--warm-gray);
    margin-bottom: 12px;
    line-height: 1.6;
}

.mm-foot-link {
    display: inline-block;
    margin-right: 20px;
    padding: 6px 0;
    font-size: 11px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--ink);
    text-decoration: none;
    border-bottom: 1px solid var(--border);
    transition: color 0.2s, border-color 0.2s;
}

.mm-foot-link:hover { color: var(--gold); border-color: var(--gold); }

/* ── Desktop nav (≥ 768px) ── */

@media (min-width: 1024px) {
    .mv-header {
        grid-template-columns: 1fr 1fr 1fr;
        padding: 18px 48px;
    }

    .mv-header.scrolled { padding: 12px 48px; }

    .hdr-menu { display: none; }

    /* Left: nav links pushed toward center (inward) */
    .hdr-left {
        justify-content: flex-end;
        padding-right: 36px;
    }

    .hdr-nav-left {
        display: flex;
        gap: 28px;
    }

    /* Logo: centered in its 1fr column */
    .hdr-logo { justify-self: center; }

    .hdr-logo-img { height: 48px; }

    /* Right: nav close to logo, icons pushed to far right edge */
    .hdr-right {
        padding-left: 36px;
        justify-content: flex-start;
    }

    .hdr-nav-right {
        display: flex;
        gap: 28px;
    }

    .hdr-icons { margin-left: auto; }

    /* Desktop: text label, no icon/badge */
    .cart-label { display: inline; }
    .cart-num   { display: inline; font-feature-settings: 'tnum'; }
    .cart-icon  { display: none; }
    .cart-badge { display: none !important; }

    #searchBtn          { display: flex; }
    .hdr-search-mobile  { display: none; }
}
