/* --- FONTS & RESETS BÁSICOS DO MENU --- */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;600&family=Montserrat:wght@300;400;500;600&display=swap');

:root {
    --header-height: 80px;
    --header-height-scrolled: 70px;
    --color-text-initial: #ffffff;
    --color-text-scrolled: #000000;
    --bg-scrolled: #ffffff;
    --transition: 0.3s ease-in-out;
}

/* Garante que o menu funcione bem independente do CSS global */
.novra-header-wrapper * { box-sizing: border-box; margin: 0; padding: 0; }

/* --- HEADER PRINCIPAL (Padrão para TODAS as páginas: Fixo e Compacto) --- */
#main-header {
    position: fixed;
    top: 0; left: 0; width: 100%; 
    height: var(--header-height-scrolled); /* Altura compacta por defeito */
    display: flex; align-items: center; justify-content: center;
    padding: 0 20px; z-index: 1000;
    
    /* Cores padrão: Fundo Branco e Texto Preto */
    background-color: var(--bg-scrolled);
    color: var(--color-text-scrolled);
    box-shadow: 0 1px 0 rgba(0,0,0,0.05);
    
    transition: background-color var(--transition), color var(--transition), height var(--transition);
    font-family: 'Montserrat', sans-serif;
}

/* --- LOGOTIPO (Padrão para TODAS as páginas: Pequeno e no Topo) --- */
.logo {
    font-family: 'Playfair Display', serif;
    font-weight: 400; text-transform: uppercase; text-decoration: none;
    position: fixed;
    top: 0; 
    left: 50%; 
    transform: translate(-50%, 0);
    font-size: 2rem; 
    letter-spacing: 2px;
    line-height: var(--header-height-scrolled);
    color: var(--color-text-scrolled);
    
    z-index: 1000; 
    pointer-events: auto;
    transition: all 0.6s cubic-bezier(0.25, 1, 0.5, 1);
}

/* =========================================
   A EXCEÇÃO: APENAS NA HOME E SEM SCROLL
   ========================================= */

/* Header Transparente na Home (antes de rolar) */
body.is-home:not(.scrolled) #main-header {
    background-color: transparent;
    color: var(--color-text-initial); /* Texto Branco */
    height: var(--header-height);     /* Mais alto */
    box-shadow: none;
}

/* Logo Gigante na Home (antes de rolar) */
body.is-home:not(.scrolled) .logo {
    top: 35%; 
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 14vw; 
    letter-spacing: -2px; 
    color: white;
    pointer-events: none; /* Permite clicar no fundo */
}

/* --- AJUSTES RESPONSIVOS (MOBILE) --- */
@media (max-width: 768px) {
    /* Padrão Mobile (Todas as páginas): Logo à esquerda */
    .logo {
        left: 20px; 
        transform: translate(0, 0);
        text-align: left; 
        font-size: 1.5rem;
    }

    /* Exceção Mobile (Apenas Home sem scroll): Logo Gigante no Centro */
    body.is-home:not(.scrolled) .logo {
        left: 50%;
        transform: translate(-50%, -50%);
        top: 16vh; 
        font-size: 16vw; 
        letter-spacing: -1px;
        text-align: center;
    }
}

/* --- ESTADO SCROLLED (HEADER) --- */
body.scrolled #main-header {
    background-color: var(--bg-scrolled);
    color: var(--color-text-scrolled);
    height: var(--header-height-scrolled);
    box-shadow: 0 1px 0 rgba(0,0,0,0.05);
}

/* --- ÍCONES --- */
.header-icons {
    position: absolute; right: 20px;
    display: flex; align-items: center; gap: 15px;
    z-index: 2; transition: opacity 0.3s;
}

.icon-btn {
    background: none; border: none; cursor: pointer;
    color: inherit; padding: 5px;
    display: flex; align-items: center; justify-content: center;
    text-decoration: none;
}

.icon-btn svg {
    width: 22px; height: 22px; fill: none;
    stroke: currentColor; stroke-width: 1.5px;
    transition: stroke 0.3s;
}

/* --- MENU DROPDOWN (USER) --- */
.user-dropdown-wrapper { position: relative; }

.user-menu {
    position: absolute; top: 50px; right: 0;
    background-color: #ffffff; width: 300px;
    padding: 30px 0; display: flex; flex-direction: column; gap: 25px;
    opacity: 0; visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s cubic-bezier(0.25, 1, 0.5, 1);
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
    z-index: 1100;
}

.user-menu.active {
    opacity: 1; visibility: visible; transform: translateY(0);
}

.user-menu a {
    text-decoration: none; color: #000000;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.95rem; font-weight: 600;
    letter-spacing: 1px; text-transform: uppercase;
    padding: 0 40px; transition: color 0.2s;
    text-align: left; display: block;
}

@media (max-width: 768px) {
    .user-menu {
        position: fixed; top: var(--header-height); left: 0;
        width: 100vw; height: auto; max-height: calc(100vh - var(--header-height));
        overflow-y: auto; padding: 40px 0; gap: 30px;
        transform: translateY(0); right: auto;
    }
    body.scrolled .user-menu { top: var(--header-height-scrolled) !important; }
}

/* --- SEARCH OVERLAY --- */
.search-overlay {
    position: fixed; background-color: #ffffff;
    z-index: 2000; opacity: 0; visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease, top 0.3s ease;
    display: flex; flex-direction: column; padding: 20px;
}
.search-overlay.open { opacity: 1; visibility: visible; }

@media (max-width: 768px) {
    .search-overlay { top: 0; left: 0; width: 100%; height: 100%; }
    .search-container { margin-top: 60px; }
}
@media (min-width: 769px) {
    .search-overlay {
        top: var(--header-height); right: 20px;
        width: 550px; min-height: 200px;
        box-shadow: 0 10px 40px rgba(0,0,0,0.1);
        padding: 40px 50px;
    }
    body.scrolled .search-overlay { top: var(--header-height-scrolled) !important; }
    .search-container { margin-top: 0; }
}

.search-container { width: 100%; max-width: 1200px; margin: 0 auto; }
.search-form { display: flex; align-items: flex-end; gap: 20px; width: 100%; }

/* --- INPUT & LABEL ANIMATION (GUCCI STYLE) --- */
.input-wrapper {
    position: relative;
    flex-grow: 1;
    height: 50px;
    display: flex;
    align-items: flex-end;
}

.search-input {
    width: 100%;
    height: 40px; /* Ajustado para deixar espaço em cima */
    border: none;
    border-bottom: 1px solid #e5e5e5;
    font-family: 'Montserrat', sans-serif;
    font-size: 1rem;
    color: #000;
    background: transparent;
    padding: 0 0 5px 0;
    outline: none;
    border-radius: 0;
    z-index: 1; /* Garante clique */
}

.search-label {
    position: absolute;
    top: 22px; /* Centro visual inicial */
    left: 0;
    font-family: 'Montserrat', sans-serif;
    font-size: 1rem;
    color: #666;
    pointer-events: none; /* Deixa o clique passar para o input */
    transition: 0.3s cubic-bezier(0.25, 1, 0.5, 1);
    transform-origin: left top;
}

/* Animação: Foca OU Campo preenchido (não mostra placeholder) */
.search-input:focus ~ .search-label,
.search-input:not(:placeholder-shown) ~ .search-label {
    top: -10px;
    font-size: 0.75rem;
    color: #999;
}

.cancel-btn {
    background: none; border: none; font-family: 'Montserrat', sans-serif;
    font-size: 0.9rem; color: #000; text-decoration: underline;
    cursor: pointer; padding-bottom: 10px; flex-shrink: 0;
}

/* --- SUPER MENU --- */
.super-menu-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background-color: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(4px);
    z-index: 2900; opacity: 0; visibility: hidden;
    transition: all 0.4s cubic-bezier(0.25, 1, 0.5, 1);
}
.super-menu-overlay.active { opacity: 1; visibility: visible; }

.super-menu {
    position: fixed; top: 0; right: 0;
    width: 450px; max-width: 100%; height: 100vh;
    background-color: #ffffff;
    z-index: 3000; transform: translateX(100%);
    transition: transform 0.5s cubic-bezier(0.25, 1, 0.5, 1);
    display: flex; flex-direction: column;
    box-shadow: -10px 0 30px rgba(0,0,0,0.1);
}
.super-menu.active { transform: translateX(0); }

.super-menu-header {
    display: flex; justify-content: flex-end; padding: 0 20px;
    height: var(--header-height); align-items: center; flex-shrink: 0;
}
.close-menu-btn {
    background: none; border: none; cursor: pointer; padding: 10px;
    display: flex; align-items: center; justify-content: center;
    color: #000; transition: transform 0.4s ease;
}
.close-menu-btn svg { width: 28px; height: 28px; }
.close-menu-btn:hover { transform: rotate(90deg); }

.super-menu-content { padding: 20px 50px; overflow-y: auto; flex-grow: 1; }
.super-menu-content ul { list-style: none; display: flex; flex-direction: column; gap: 25px; }
.super-menu-content a {
    text-decoration: none; font-family: 'Montserrat', sans-serif;
    font-size: 1.1rem; color: #000; font-weight: 500;
    letter-spacing: 0.5px; text-transform: uppercase;
    transition: color 0.2s, padding-left 0.2s; display: block;
}
.super-menu-content a:hover { color: #666; padding-left: 5px; }

@media (max-width: 768px) {
    .super-menu { width: 100%; }
    .super-menu-content { padding: 20px 30px; }
}