/*
 * ESTILO INSPIRADO NO BRASLOJAS.COM.BR
 * Banner 800px, menu sobreposto, scroll vermelho
 * PRIORIDADE: Sobrescreve todos os outros estilos de header
 */

/* ==================== RESET COMPLETO DO HEADER ==================== */

/* Remover TODOS os estilos anteriores do header */
.header {
    background: none !important;
    background-color: transparent !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    border: none !important;
    border-bottom: none !important;
    box-shadow: none !important;
}

/* Remover estilos de hover do reserva-menu-effect */
.header:hover {
    background: none !important;
    background-color: transparent !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}

/* ==================== RESET DO MAIN CONTENT ==================== */

.main-content {
    margin-top: 0 !important; /* Remove margem para banner começar embaixo do menu */
    padding-top: 0 !important;
}

/* ==================== BANNER RESPONSIVO - OTIMIZADO PARA 1920x800 ==================== */

.hero-slider {
    width: 100vw !important; /* Largura total da viewport */
    height: 41.67vw !important; /* Altura proporcional: 800/1920 = 0.4167 = 41.67% */
    max-height: 800px !important; /* Altura máxima para telas grandes */
    min-height: 300px !important; /* Altura mínima para telas pequenas */
    margin-top: 0 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    position: relative !important;
    z-index: 1 !important; /* Abaixo do menu */
    overflow: hidden !important;
    left: 0 !important;
    right: 0 !important;
}

.hero-slider .swiper {
    height: 100% !important; /* Herda altura do container */
    width: 100vw !important; /* Largura total da viewport */
}

.hero-slider .swiper-slide {
    height: 100% !important; /* Herda altura do container */
    width: 100vw !important; /* Largura total da viewport */
}

.hero-slide {
    height: 100% !important; /* Herda altura do container */
    width: 100vw !important; /* Largura total da viewport */
    background-size: contain !important; /* Mostra a imagem completa */
    background-position: center !important;
    background-repeat: no-repeat !important;
    background-color: #f8f9fa !important; /* Cor de fundo para áreas vazias */
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-width: 100vw !important; /* Garantir largura mínima */
    /* Otimizado para imagens 1920x800 */
    background-attachment: scroll !important;
    image-rendering: -webkit-optimize-contrast !important;
}

/* Conteúdo do hero centralizado */
.hero-content {
    height: 100% !important;
    width: 100% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
    position: relative !important;
    z-index: 2 !important;
}

/* Container do hero ocupando toda a largura */
.hero-content .container {
    width: 100% !important;
    max-width: 100% !important;
    padding: 0 2rem !important;
}

/* ==================== OTIMIZAÇÃO RESPONSIVA PARA IMAGENS 1920x800 ==================== */

/* Configurações específicas para manter proporção 1920x800 */
.hero-slide[style*="background-image"] {
    background-size: contain !important;
    background-position: center center !important;
    background-repeat: no-repeat !important;
    /* Aspect ratio 1920:800 = 2.4:1 */
}

/* Para telas muito largas - limitar altura máxima */
@media (min-width: 1920px) {
    .hero-slider {
        height: 800px !important; /* Altura fixa para telas 1920px+ */
        max-height: 800px !important;
    }
    
    .hero-slide {
        background-size: contain !important; /* Manter imagem completa visível */
        background-position: center center !important;
    }
}

/* Para telas médias - manter proporção responsiva */
@media (min-width: 768px) and (max-width: 1919px) {
    .hero-slider {
        height: 41.67vw !important; /* Proporção 1920:800 */
        max-height: 800px !important;
        min-height: 320px !important;
    }
}

/* Para telas pequenas - altura mínima */
@media (max-width: 767px) {
    .hero-slider {
        height: 41.67vw !important; /* Manter proporção */
        min-height: 300px !important;
        max-height: 500px !important; /* Limitar em mobile */
    }
    
    .hero-slide {
        background-size: contain !important; /* Sempre mostrar imagem completa */
    }
}

.hero-text {
    max-width: 600px !important;
    padding: 2rem !important;
    background: rgba(0, 0, 0, 0.3) !important;
    border-radius: 10px !important;
    backdrop-filter: blur(5px) !important;
}

.hero-title {
    font-size: 3.5rem !important;
    font-weight: 700 !important;
    color: #ffffff !important;
    margin-bottom: 1rem !important;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5) !important;
}

.hero-subtitle {
    font-size: 1.25rem !important;
    color: #ffffff !important;
    margin-bottom: 2rem !important;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5) !important;
}

.hero-btn {
    display: inline-block !important;
    padding: 1rem 2rem !important;
    background-color: var(--accent-color) !important;
    color: #ffffff !important;
    text-decoration: none !important;
    border-radius: 5px !important;
    font-weight: 600 !important;
    font-size: 1.1rem !important;
    text-transform: uppercase !important;
    letter-spacing: 1px !important;
    transition: all 0.3s ease !important;
    box-shadow: 0 4px 15px rgba(228, 0, 43, 0.3) !important;
}

.hero-btn:hover {
    background-color: #c8002a !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 20px rgba(228, 0, 43, 0.4) !important;
}

/* ==================== MENU SOBREPOSTO ==================== */

/* Header sobreposto ao banner */
.header {
    position: fixed !important;
    top: 40px !important; /* Altura do top-banner */
    left: 0 !important;
    right: 0 !important;
    z-index: 1000 !important; /* Acima do banner */
    background-color: transparent !important; /* SEMPRE transparente inicialmente */
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    border-bottom: none !important;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1) !important;
    box-shadow: none !important;
}

/* ==================== ESTADO INICIAL - SEMPRE TRANSPARENTE ==================== */

/* FORÇAR estado inicial transparente com letras brancas */
.header:not(.scrolled) {
    background-color: transparent !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    border-bottom: none !important;
    box-shadow: none !important;
}

/* Texto BRANCO no estado inicial */
.header:not(.scrolled) .nav-link,
.header:not(.scrolled) .action-link,
.header:not(.scrolled) .search-btn {
    color: #ffffff !important;
    transition: all 0.4s ease !important;
}

/* Logo TEXTO BRANCO no estado inicial */
.header:not(.scrolled) .logo-text {
    color: #ffffff !important; /* Texto branco */
    transition: all 0.4s ease !important;
}

/* Campo de busca transparente no estado inicial */
.header:not(.scrolled) .search-input {
    background-color: transparent !important;
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
    color: #ffffff !important;
    transition: all 0.4s ease !important;
}

.header:not(.scrolled) .search-input::placeholder {
    color: rgba(255, 255, 255, 0.7) !important;
}

/* Contador do carrinho branco */
.header:not(.scrolled) .cart-count {
    background-color: var(--accent-color) !important;
    color: #ffffff !important;
}

/* ==================== ESTILO DA LOGO TEXTO ==================== */

.logo-text {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
    font-size: 1.5rem !important;
    font-weight: 700 !important;
    letter-spacing: 0.1em !important;
    text-decoration: none !important;
    text-transform: uppercase !important;
    transition: all 0.4s ease !important;
    color: #ffffff !important; /* Branco por padrão */
}

.logo-text:hover {
    text-decoration: none !important;
    opacity: 0.8 !important;
}

/* ==================== MENU VERMELHO NO SCROLL ==================== */

/* Estado scrolled - fundo vermelho */
.header.scrolled {
    background-color: var(--accent-color) !important; /* Vermelho */
    backdrop-filter: blur(10px) !important;
    -webkit-backdrop-filter: blur(10px) !important;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.2) !important;
}

/* Texto branco quando scrolled */
.header.scrolled .nav-link,
.header.scrolled .action-link,
.header.scrolled .search-btn {
    color: #ffffff !important;
}

/* Logo texto branco quando scrolled */
.header.scrolled .logo-text {
    color: #ffffff !important;
}

/* Campo de busca quando scrolled */
.header.scrolled .search-input {
    background-color: rgba(255, 255, 255, 0.1) !important;
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
    color: #ffffff !important;
}

.header.scrolled .search-input::placeholder {
    color: rgba(255, 255, 255, 0.7) !important;
}

/* Hover nos links quando scrolled */
.header.scrolled .nav-link:hover {
    background-color: rgba(255, 255, 255, 0.1) !important;
    border-radius: 5px !important;
}

/* ==================== TOP BANNER AJUSTADO ==================== */

.top-banner {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    z-index: 1001 !important; /* Acima do header */
    background-color: var(--background-dark) !important;
    color: var(--secondary-color) !important;
    padding: 0.5rem 0 !important;
    font-size: 0.875rem !important;
    text-align: center !important;
}

/* ==================== NAVEGAÇÃO E CONTROLES ==================== */

/* Navegação do swiper sobre o banner */
.hero-slider .swiper-button-next,
.hero-slider .swiper-button-prev {
    color: #ffffff !important;
    background: rgba(0, 0, 0, 0.3) !important;
    border-radius: 50% !important;
    width: 50px !important;
    height: 50px !important;
    margin-top: -25px !important;
    backdrop-filter: blur(5px) !important;
    transition: all 0.3s ease !important;
}

.hero-slider .swiper-button-next:hover,
.hero-slider .swiper-button-prev:hover {
    background: rgba(0, 0, 0, 0.5) !important;
    transform: scale(1.1) !important;
}

/* Paginação do swiper */
.hero-slider .swiper-pagination {
    bottom: 30px !important;
}

.hero-slider .swiper-pagination-bullet {
    background: rgba(255, 255, 255, 0.5) !important;
    opacity: 1 !important;
    width: 12px !important;
    height: 12px !important;
    margin: 0 8px !important;
    transition: all 0.3s ease !important;
}

.hero-slider .swiper-pagination-bullet-active {
    background: #ffffff !important;
    transform: scale(1.2) !important;
}

/* ==================== RESPONSIVIDADE ==================== */

/* ==================== RESPONSIVIDADE PARA TEXTO E ELEMENTOS ==================== */

@media (max-width: 768px) {
    /* Logo texto menor em mobile */
    .logo-text {
        font-size: 1.2rem !important;
        letter-spacing: 0.05em !important;
    }
    
    /* Texto do hero mobile */
    .hero-title {
        font-size: 2.5rem !important;
    }
    
    .hero-subtitle {
        font-size: 1rem !important;
    }
    
    .hero-btn {
        padding: 0.8rem 1.5rem !important;
        font-size: 1rem !important;
    }
    
    /* Header mobile */
    .header {
        top: 32px !important; /* Top-banner mobile menor */
    }
    
    /* Navegação mobile sempre visível */
    .hero-slider .swiper-button-next,
    .hero-slider .swiper-button-prev {
        width: 40px !important;
        height: 40px !important;
        margin-top: -20px !important;
    }
}

@media (max-width: 480px) {
    /* Logo ainda menor para celulares pequenos */
    .logo-text {
        font-size: 1rem !important;
        letter-spacing: 0.05em !important;
    }
    
    /* Texto ainda menor para celulares pequenos */
    .hero-title {
        font-size: 2rem !important;
    }
    
    .hero-text {
        padding: 1rem !important;
    }
}

/* ==================== SEÇÕES APÓS O BANNER ==================== */

/* Ajustar espaçamento das seções após o banner */
.categories-section,
.featured-products,
.promotional-banners {
    margin-top: 0 !important;
    padding-top: 3rem !important;
}

/* Primeira seção após o banner */
.hero-slider + section,
.hero-slider + .categories-section {
    margin-top: 0 !important;
    padding-top: 4rem !important;
}

/* ==================== MELHORIAS VISUAIS ==================== */

/* Gradiente overlay no banner para melhor legibilidade */
.hero-slide::before {
    content: '' !important;
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.3) 0%, rgba(0, 0, 0, 0.1) 100%) !important;
    z-index: 1 !important;
}

.hero-content {
    z-index: 2 !important;
    position: relative !important;
}

/* ==================== ANIMAÇÕES ==================== */

/* Animação de entrada do hero */
.hero-text {
    animation: heroFadeIn 1s ease-out !important;
}

@keyframes heroFadeIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Animação do menu no scroll */
.header {
    will-change: background-color, backdrop-filter !important;
}

/* ==================== COMPATIBILIDADE ==================== */

/* Fallback para navegadores sem backdrop-filter */
@supports not (backdrop-filter: blur(10px)) {
    .header.scrolled {
        background-color: #e4002b !important; /* Vermelho sólido */
    }
    
    .hero-text {
        background: rgba(0, 0, 0, 0.6) !important;
    }
}

/* ==================== DEBUG ==================== */

/* Remover em produção */
/*
.hero-slider {
    border: 2px solid red !important;
}

.header {
    border: 2px solid blue !important;
}
*/
