/* TRAVA DE RESPONSIVIDADE E LAYOUT */
html, body {
    overflow-x: hidden;
    width: 100%;
    position: relative;
    font-family: 'Montserrat', sans-serif;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* ANIMAÇÕES OTIMIZADAS COM WILL-CHANGE */
@keyframes navReveal {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.animate-nav {
    animation: navReveal 0.4s ease-out forwards;
    will-change: opacity, transform;
}

@media (prefers-reduced-motion: reduce) {
    .animate-nav, .toast-item, #cookie-banner, .nav-link::after {
        animation: none !important;
        transition: none !important;
    }
}

/* HOVER STATES */
.nav-link {
    position: relative;
    transition: color 0.3s ease;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1.5px;
    background-color: #18181b;
    transition: width 0.3s ease;
}

@media (min-width: 1024px) {
    .nav-link:hover::after { width: 100%; }
}

/* ELEMENTOS DINÂMICOS E ACESSIBILIDADE */
#cart-count-badge:empty { display: none !important; }

.toast-item {
    transition: transform 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55), opacity 0.3s ease;
    will-change: transform, opacity;
}

.brand-logo {
    text-transform: uppercase;
    font-weight: 400;
    letter-spacing: 0.1em;
    font-style: normal;
}

/* SCROLLBAR INVISÍVEL PARA ELEMENTOS INTERNOS */
.hide-scroll::-webkit-scrollbar { display: none; }
.hide-scroll { -ms-overflow-style: none; scrollbar-width: none; }

/* BLOQUEIO DE TELA COM COMPENSAÇÃO DE SCROLL (Anti-CLS) */
body.modal-open {
    overflow: hidden;
    padding-right: var(--scrollbar-compensation, 0px);
}

/* CORREÇÕES WAGTAIL USERBAR */
.wagtail-userbar svg, .wagtail-userbar-reset svg {
    display: inline-block !important;
    width: auto !important;
    height: auto !important;
    max-width: none !important;
    max-height: none !important;
}

.wagtail-userbar * {
    box-sizing: content-box;
},

/* Animação Marquee Otimizada para Consumo de GPU */
@keyframes marquee {
    0% { transform: translate3d(0, 0, 0); }
    100% { transform: translate3d(-100%, 0, 0); }
}

.animate-marquee {
    animation: marquee 30s linear infinite;
    will-change: transform;
}

@media (hover: hover) and (pointer: fine) {
    .group-hover\:pause:hover {
        animation-play-state: paused;
    }
}

/* Modificadores de Estado */
body.menu-open {
    overflow: hidden;
    padding-right: var(--scrollbar-compensation, 0px);
}

.standard-header {
    box-sizing: border-box;
}

.standard-header * {
    box-sizing: inherit;
}