/**
 * Header CSS - Dandra
 */

.topbar {
    background: #0A0A0A;
    color: #FFFFFF;
    font-size: 0.82rem;
}

.topbar .container {
    min-height: 36px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 18px;
}

.topbar strong {
    color: #FFE0A0;
}

.toplinks {
    display: flex;
    gap: 18px;
    color: #F4E6C3;
}

.toplinks a:hover {
    color: #fff;
    text-decoration: underline;
}

.header {
    position: sticky;
    top: 0;
    z-index: 20;
    color: #FFFFFF;
    background: rgba(18, 18, 18, 0.97);
    backdrop-filter: blur(14px);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.2);
}

.admin-bar .header {
    top: 32px;
}

.header-row {
    min-height: 78px;
    display: grid;
    grid-template-columns: 220px 1fr auto;
    align-items: center;
    gap: 30px;
}

/* Logo / Brand */
.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 900;
    letter-spacing: -0.04em;
    font-size: 1.4rem;
    color: #fff;
}

.brand-mark {
    width: 35px;
    height: 35px;
    border-radius: 11px;
    display: grid;
    place-items: center;
    color: var(--primary);
    background: #fff;
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.25);
    flex: 0 0 auto;
}

.brand-mark svg {
    width: 21px;
}

.brand em {
    color: #D4AF37;
    font-style: normal;
}

.custom-logo-link img {
    max-height: 50px;
    width: auto;
}

/* Ações do header */
.header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.action {
    position: relative;
    display: inline-grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border: 1px solid rgba(255, 255, 255, 0.45);
    border-radius: 12px;
    color: #fff;
    background: rgba(255, 255, 255, 0.10);
    transition: 0.2s;
}

.action:hover {
    border-color: #fff;
    color: var(--primary);
    background: #fff;
    transform: translateY(-1px);
}

.action svg {
    width: 20px;
    height: 20px;
}

.badge {
    position: absolute;
    top: -6px;
    right: -6px;
    min-width: 19px;
    height: 19px;
    padding: 0 5px;
    display: grid;
    place-items: center;
    border-radius: 50px;
    background: var(--accent);
    color: #121212;
    font-size: 0.7rem;
    font-weight: 900;
}

.menu-toggle {
    display: none;
    cursor: pointer;
}

/* Navegação principal */
.nav {
    color: #fff;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    background: var(--primary);
}

.nav-row {
    min-height: 49px;
    display: flex;
    align-items: center;
    gap: 25px;
    font-size: 0.92rem;
    font-weight: 700;
}

.nav-row a {
    color: #F4E6C3;
    padding: 14px 0;
    display: inline-block;
}

.nav-row a:hover,
.nav-row .sale {
    color: #D4AF37;
}

.nav-row .sale {
    font-weight: 900;
}

/* Sub-menu dropdown (nível 2) */
.nav-row li {
    position: relative;
    list-style: none;
}

.nav-row .sub-menu {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 200px;
    background: var(--primary-dark);
    border-radius: 0 0 var(--radius-sm) var(--radius-sm);
    box-shadow: var(--shadow);
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: var(--transition);
    z-index: 30;
    padding: 8px 0;
}

.nav-row li:hover > .sub-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.nav-row .sub-menu a {
    display: block;
    padding: 10px 18px;
    font-weight: 500;
    font-size: 0.85rem;
}

.nav-row .sub-menu .sub-menu {
    top: 0;
    left: 100%;
    border-radius: var(--radius-sm);
}
/* ========================================
   SUBMENUS — Menu principal
   ======================================== */

.nav-row .nav-item {
    position: relative;
}

.nav-row .nav-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.nav-row .nav-arrow {
    transition: transform .2s ease;
}

/* Painel do submenu (desktop) */
.nav-row .submenu {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 230px;
    padding-top: 6px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: opacity .2s ease, transform .2s ease, visibility .2s;
    z-index: 999;
}

.nav-row .nav-item:hover > .submenu,
.nav-row .nav-item:focus-within > .submenu,
.nav-row .submenu.is-open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.nav-row .nav-item:hover > .nav-link .nav-arrow,
.nav-row .nav-link[aria-expanded="true"] .nav-arrow {
    transform: rotate(180deg);
}

.nav-row .submenu-inner {
    background: #fff;
    border: 1px solid rgba(0, 0, 0, .07);
    border-radius: 10px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, .14);
    padding: 8px;
    display: flex;
    flex-direction: column;
}

.nav-row .submenu-link {
    display: block;
    padding: 9px 14px;
    border-radius: 7px;
    font-size: .92rem;
    color: #1A1A1A;
    text-decoration: none;
    white-space: nowrap;
    transition: background .15s ease, color .15s ease;
}

.nav-row .submenu-link:hover,
.nav-row .submenu-link:focus {
    background: var(--accent, #C5A059);
    color: #fff;
    outline: none;
}

/* Mobile / touch: submenus abrem por clique */
@media (max-width: 991px) {
    .nav-row .submenu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        display: none;
        padding-top: 0;
    }

    .nav-row .submenu.is-open {
        display: block;
    }

    .nav-row .submenu-inner {
        box-shadow: none;
        border: 0;
        border-left: 2px solid var(--accent, #C5A059);
        border-radius: 0;
        margin: 2px 0 8px 8px;
        padding: 2px 0 2px 6px;
        background: transparent;
    }
}
