/* ========================================
   NOVO HEADER - ESTILOS BASE
   APENAS DESKTOP (min-width: 1024px)
   ======================================== */

@media (min-width: 1024px) {
    /* ========================================
       VARIÁVEIS
       ======================================== */
    :root {
        --primary-color: #1083c6;
        --primary-hover: #0d6bb7;
        --secondary-color: #3498DB;
        --text-dark: #2C3E50;
        --text-light: #7F8C8D;
        --border-color: #E0E0E0;
        --shadow-sm: 0 2px 4px rgba(0,0,0,0.1);
        --shadow-md: 0 4px 12px rgba(0,0,0,0.15);
        --shadow-lg: 0 8px 24px rgba(0,0,0,0.2);
        --transition: all 0.3s ease;
    }

    /* ========================================
       NOVO HEADER CONTAINER
       ======================================== */
    .new-header {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        background: white;
        z-index: 1000;
        box-shadow: var(--shadow-md);
    }

    /* ========================================
       HEADER TOP (Logo, Busca, Botões)
       ======================================== */
    .new-header-top {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 15px 20px;
        max-width: 1400px;
        margin: 0 auto;
        gap: 20px;
    }

    /* Logo */
    .new-header-logo {
        flex-shrink: 0;
    }

    .new-header-logo img {
        height: 60px;
        width: auto;
        object-fit: contain;
    }

    /* Busca */
    .new-header-search {
        flex: 1;
        max-width: 600px;
        position: relative;
    }

    .new-header-search input {
        width: 100%;
        padding: 12px 50px 12px 20px;
        border: 2px solid var(--border-color);
        border-radius: 25px;
        font-size: 15px;
        transition: var(--transition);
    }

    .new-header-search input:focus {
        outline: none;
        border-color: var(--primary-color);
        box-shadow: 0 0 0 3px rgba(46, 204, 113, 0.1);
    }

    .new-header-search button {
        position: absolute;
        right: 5px;
        top: 50%;
        transform: translateY(-50%);
        background: var(--primary-color);
        border: none;
        border-radius: 50%;
        width: 40px;
        height: 40px;
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        transition: var(--transition);
    }

    .new-header-search button:hover {
        background: var(--primary-hover);
        transform: translateY(-50%) scale(1.05);
    }

    .new-header-search button svg {
        width: 20px;
        height: 20px;
        fill: white;
    }

    /* Botões do Header */
    .new-header-btn {
        display: flex;
        align-items: center;
        gap: 8px;
        padding: 10px 18px;
        background: white;
        border: 2px solid var(--border-color);
        border-radius: 20px;
        font-size: 14px;
        font-weight: 600;
        color: var(--text-dark);
        cursor: pointer;
        transition: var(--transition);
        white-space: nowrap;
    }

    .new-header-btn svg {
        width: 20px;
        height: 20px;
        fill: var(--text-dark);
        transition: var(--transition);
    }

    .new-header-btn:hover {
        border-color: var(--primary-color);
        color: var(--primary-color);
        background: rgba(46, 204, 113, 0.05);
    }

    .new-header-btn:hover svg {
        fill: var(--primary-color);
    }

    /* ========================================
   BADGE DO CARRINHO NO NOVO HEADER
   ======================================== */
.new-header-cart {
    position: relative;
}

.new-header-cart-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #ff4444;
    color: white;
    border-radius: 50%;
    width: 22px;
    height: 22px;
    font-size: 12px;
    font-weight: bold;
    display: none;
    align-items: center;
    justify-content: center;
    border: 2px solid white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
    z-index: 10;
}

.new-header-cart-badge.show {
    display: flex !important;
}

    /* ========================================
       NAVIGATION MENU
       ======================================== */
    .new-header-nav {
        background: #F8F9FA;
        border-top: 1px solid var(--border-color);
        overflow-x: auto;
        overflow-y: hidden;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }

    .new-header-nav::-webkit-scrollbar {
        display: none;
    }

    .new-header-nav-inner {
        display: flex;
        align-items: center;
        gap: 5px;
        padding: 10px 20px;
        max-width: 1400px;
        margin: 0 auto;
        flex-wrap: nowrap;
    }

    .new-header-nav-item {
        padding: 10px 20px;
        background: white;
        border: 2px solid transparent;
        border-radius: 20px;
        font-size: 14px;
        font-weight: 600;
        color: var(--text-dark);
        cursor: pointer;
        transition: var(--transition);
        white-space: nowrap;
        flex-shrink: 0;
    }

    .new-header-nav-item:hover {
        background: var(--primary-color);
        color: #20219e;
        transform: translateY(-2px);
        box-shadow: var(--shadow-sm);
    }

    .new-header-nav-item.active {
        background: var(--primary-color);
        color: white;
        border-color: var(--primary-color);
    }

    /* ========================================
       AJUSTE DO BODY PARA NÃO SOBREPOR HEADER
       ======================================== */
    body.has-new-header {
        padding-top: 130px !important;
    }

    /* Ajustar banner */
    body.has-new-header .banner-section {
        margin-top: 20px !important;
    }
}

/* ========================================
   MOBILE - OCULTAR NOVO HEADER
   ======================================== */
@media (max-width: 1023px) {
    .new-header {
        display: none !important;
    }
}

/* ========================================
   OCULTAR ELEMENTOS NO DESKTOP
   ======================================== */

/* ========================================
   OCULTAR ELEMENTOS APENAS NO DESKTOP
   ======================================== */

@media (min-width: 1025px) {
    /* Ocultar barra de total/peso no rodapé */
    .footer {
        display: none !important;
    }
    
    /* Ocultar botão flutuante do carrinho */
    .cart-button {
        display: none !important;
    }
}
/* ========================================
   OCULTAR ELEMENTOS APENAS NO DESKTOP
   ======================================== */

@media (min-width: 1025px) {
    /* Ocultar barra de total/peso no rodapé */
    .footer {
        display: none !important;
    }
    
    /* Ocultar botão flutuante do carrinho */
    .cart-button {
        display: none !important;
    }
    
    /* Ocultar botão de scroll to top */
    .scroll-to-top-button {
        display: none !important;
    }
}

/* ========================================
   GARANTIR ELEMENTOS NO MOBILE
   ======================================== */

@media (max-width: 1024px) {
    /* Forçar exibição do carrinho no mobile */
    #cart-popup {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        width: 100% !important;
        height: 100vh !important;
        z-index: 99999 !important;
    }
    
    #cart-popup.show {
        display: flex !important;
        opacity: 1 !important;
    }
    
    /* Forçar botão do carrinho */
    .cart-button {
        display: flex !important;
        position: fixed !important;
        bottom: 20px !important;
        right: 20px !important;
        width: 60px !important;
        height: 60px !important;
        border-radius: 50% !important;
        background: linear-gradient(135deg, #667eea, #764ba2) !important;
        border: none !important;
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3) !important;
        cursor: pointer !important;
        align-items: center !important;
        justify-content: center !important;
        z-index: 9998 !important;
        opacity: 1 !important;
        visibility: visible !important;
        pointer-events: all !important;
    }
    
    .cart-button .cart-icon {
        width: 30px !important;
        height: 30px !important;
        filter: brightness(0) invert(1);
    }
    
    /* Forçar footer */
    .footer {
        display: block !important;
        visibility: visible !important;
    }
}
/* ========================================
   FIX CRÍTICO MOBILE
   ======================================== */

@media (max-width: 1024px) {
    /* Garantir popup do carrinho */
    #cart-popup {
        display: none;
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        width: 100% !important;
        height: 100vh !important;
        background: rgba(0, 0, 0, 0);
        z-index: 99999 !important;
    }
    
    #cart-popup.show {
        display: flex !important;
        background: rgba(0, 0, 0, 0.5) !important;
    }
    
    #cart-popup .popup-content {
        width: 100% !important;
        max-width: 100% !important;
        height: 100vh !important;
        transform: translateX(0) !important;
    }
    
    /* Garantir botão do carrinho */
    button.cart-button,
    .cart-button {
        display: flex !important;
        opacity: 1 !important;
        visibility: visible !important;
        pointer-events: all !important;
		z-index: 999999 !important;
    }
}