/* ============================================
   HEADER APRIMORADO - DESIGN MODERNO E COMPLETO
   Header com logo, navegação, busca e ações do usuário
   ============================================ */

.header-enhanced {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    border-bottom: 1px solid rgba(186, 25, 44, 0.1);
    padding: 0;
}

.header-enhanced.scrolled {
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.12);
}

.header-enhanced-wrapper {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0.35rem 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

/* Logo */
.header-logo-enhanced {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    transition: transform 0.3s ease;
}

.header-logo-enhanced:hover {
    transform: scale(1.05);
}

.header-logo-enhanced img {
    height: 32px;
    width: auto;
    object-fit: contain;
}

.header-logo-text {
    display: none;
    flex-direction: column;
    line-height: 1.2;
}

.header-logo-text .logo-title {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--color-primary);
    margin: 0;
}

.header-logo-text .logo-subtitle {
    font-size: 0.75rem;
    color: var(--color-gray-600);
    margin: 0;
}

/* Navegação Principal */
.header-nav-enhanced {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex: 1;
    justify-content: center;
}

.header-nav-enhanced a {
    position: relative;
    padding: 0.35rem 0.75rem;
    font-weight: 600;
    font-size: 0.8rem;
    color: var(--color-gray-800);
    text-decoration: none;
    border-radius: var(--radius-md);
    transition: all 0.3s ease;
    white-space: nowrap;
}

.header-nav-enhanced a::before {
    content: '';
    position: absolute;
    bottom: 0.5rem;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background: var(--gradient-primary);
    transition: width 0.3s ease;
}

.header-nav-enhanced a:hover {
    color: var(--color-primary);
    background: rgba(186, 25, 44, 0.05);
}

.header-nav-enhanced a:hover::before {
    width: 70%;
}

.header-nav-enhanced a.active {
    color: var(--color-primary);
    background: rgba(186, 25, 44, 0.1);
}

.header-nav-enhanced a.active::before {
    width: 70%;
}

/* Indicador de evento especial */
.event-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    margin-left: 0.5rem;
}

.event-badge-dot {
    width: 8px;
    height: 8px;
    background: #f97316;
    border-radius: 50%;
    animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.7;
        transform: scale(1.2);
    }
}

/* Ações do Header */
.header-actions-enhanced {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.header-action-btn {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    color: var(--color-gray-800);
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

.header-action-btn:hover {
    background: rgba(186, 25, 44, 0.1);
    color: var(--color-primary);
    transform: scale(1.1);
}

.header-action-btn svg {
    width: 18px;
    height: 18px;
}

/* Badge de contador (carrinho) */
.header-badge {
    position: absolute;
    top: -2px;
    right: -2px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    background: var(--gradient-primary);
    color: var(--color-white);
    font-size: 0.7rem;
    font-weight: 700;
    border-radius: var(--radius-full);
    border: 2px solid var(--color-white);
}

/* Menu Mobile */
.header-mobile-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    color: var(--color-gray-800);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.3s ease;
}

.header-mobile-toggle:hover {
    background: rgba(186, 25, 44, 0.1);
    color: var(--color-primary);
}

.header-mobile-toggle svg {
    width: 20px;
    height: 20px;
}

/* Menu Mobile Overlay */
.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9998;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.mobile-menu-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.mobile-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 85%;
    max-width: 400px;
    height: 100vh;
    background: var(--color-white);
    box-shadow: -4px 0 30px rgba(0, 0, 0, 0.15);
    z-index: 9999;
    overflow-y: auto;
    transition: right 0.3s ease;
    padding: 1.5rem;
}

.mobile-menu.active {
    right: 0;
}

.mobile-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--color-gray-200);
}

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

.mobile-menu-close {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: transparent;
    color: var(--color-gray-800);
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: all 0.3s ease;
}

.mobile-menu-close:hover {
    background: rgba(186, 25, 44, 0.1);
    color: var(--color-primary);
}

.mobile-menu-nav {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.mobile-menu-nav a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    font-weight: 600;
    color: var(--color-gray-800);
    text-decoration: none;
    border-radius: var(--radius-md);
    transition: all 0.3s ease;
}

.mobile-menu-nav a:hover,
.mobile-menu-nav a.active {
    background: rgba(186, 25, 44, 0.1);
    color: var(--color-primary);
}

.mobile-menu-nav a svg {
    width: 20px;
    height: 20px;
    opacity: 0.5;
}

/* Responsividade */
@media (min-width: 1024px) {
    .header-logo-text {
        display: flex;
    }
}

@media (max-width: 1023px) {
    .header-nav-enhanced {
        display: none;
    }
    
    .header-mobile-toggle {
        display: flex;
    }
    
    .header-enhanced-wrapper {
        padding: 0.5rem 1rem;
    }
}

@media (max-width: 640px) {
    .header-enhanced-wrapper {
        padding: 0.3rem 0.75rem;
        gap: 0.5rem;
    }
    
    .header-logo-enhanced img {
        height: 28px;
    }
    
    .header-action-btn {
        width: 30px;
        height: 30px;
    }
    
    .header-action-btn svg {
        width: 16px;
        height: 16px;
    }
    
    .header-nav-enhanced a {
        padding: 0.3rem 0.5rem;
        font-size: 0.75rem;
    }
    
    .mobile-menu {
        width: 100%;
        max-width: none;
    }
}

/* Animações */
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.header-enhanced {
    animation: slideDown 0.3s ease;
}

/* Melhorias de acessibilidade */
.header-action-btn:focus-visible,
.header-mobile-toggle:focus-visible,
.mobile-menu-close:focus-visible {
    outline: 3px solid var(--color-primary);
    outline-offset: 3px;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* Compensar header fixo no body/main */
body {
    padding-top: 50px !important;
}

main {
    padding-top: 0;
}

@media (max-width: 640px) {
    body {
        padding-top: 45px !important;
    }
    
    .header-enhanced-wrapper {
        padding: 0.3rem 0.75rem !important;
        gap: 0.5rem !important;
    }
    
    .header-logo-enhanced img {
        height: 28px !important;
    }
    
    .header-action-btn {
        width: 30px !important;
        height: 30px !important;
    }
    
    .header-action-btn svg {
        width: 16px !important;
        height: 16px !important;
    }
    
    .header-nav-enhanced a {
        padding: 0.3rem 0.5rem !important;
        font-size: 0.75rem !important;
    }
}

