:root {
    --cor-primaria: #004c96; /* Azul Escuro */
    --cor-secundaria: #ffdd00; /* Amarelo */
    --cor-texto: #333;
    --cor-fundo: #f5f5f5;
}

body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding-top: 65px; 
    background-color: var(--cor-fundo);
    color: var(--cor-texto);
}


.cabecalho {
    background-color: var(--cor-primaria);
    color: white;
    padding: 23px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;

    position: fixed; 
    top: 0;          
    left: 0;         
    width: 100%;     
    z-index: 1000;   
    box-sizing: border-box; 
}

    

.logo {
    font-size: 20px; /* Ajustado para ser legível */
    font-weight: 900;
    color: white; /* Cor sólida para garantir visibilidade */
    font-family: 'Arial Black', sans-serif; 
    background: linear-gradient(to right, #ff2200f5, rgb(249, 241, 7)); 
    -webkit-background-clip: text;
    background-clip: text; /* Propriedade padrão para compatibilidade */
    -webkit-text-fill-color: transparent;
    white-space: nowrap;
}


.busca {
    position: absolute; 
    left: 50%;         
    transform: translateX(-50%); 
    display: flex;
    width: 100%;
    max-width: 300px;  
    z-index: 10;
    margin-bottom: 8px;
}


.busca input {
    flex: 1; 
    padding: 10px 15px;
    border: none;
    border-radius: 8px 0 0 8px;
    outline: none;
    font-size: 16px;
}


.busca button {
    padding: 10px 10px;
    background-color: #ffdb00; 
    border: none;
    border-radius: 0 8px 8px 0;
    cursor: pointer;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1; 
}



.links-topo {
       display: flex;
    align-items: center;
}
    


.links-topo a {
    color: white;
    text-decoration: none;
    margin-left: 15px;
    font-size: 14px;
}


/* --- MENU DE CATEGORIAS --- */

.categorias {
   background-color: var(--cor-secundaria);
   padding: 18px 30px 15px;
   text-align: center;
   position: fixed;  
    width: 100%;     
   z-index: 1000;
}

.categorias a {
    color: var(--cor-primaria);
    text-decoration: none;
    font-weight: bold;
    margin: 0 30px;
    transition: background-color 0.3s;
    display: inline-flex;  
    align-items: center;   
    gap: 8px;             
}

.categorias a:hover {
    background-color: rgba(255, 255, 255, 0.65);
    border-radius: 4px;
}


.banner-black-friday {
    background: linear-gradient(160deg, #FF4111 0%, #2d73bd 55%);
    color: white;
    text-align: center;
    width: 100%;
}

/* Focando apenas nos textos internos */

.conteudo-banner {
    margin: 0 auto; 
    padding: 80px 20px 60px;  
    text-align: center;
    max-width: 800px;
}

.conteudo-banner h1 {
    font-size: 56px;
    font-weight: 900;    
    margin: 0;           
    line-height: 1.1;   
}

.conteudo-banner p {
    font-size: 20px;
    margin: 15px 0 0 0;  
    padding: 0;
}


/* Container Principal da Vitrine */
.vitrine {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 280px)); 
    gap: 60px; /* Aumentado drasticamente de 40px para 60px */
    padding: 50px; /* Aumentado de 40px para 50px */
    justify-content: center; /* Centraliza os cards quando não preenchem a linha */
}

/* Esconde todas as vitrines por padrão, exceto a primeira ou a que o JS mandar mostrar */

.aba-conteudo {
    display: none; 
}


/* Estilização da mensagem de erro de busca */

#mensagem-erro {
    display: none; 
    text-align: center;
    padding: 30px;
    color: #003366;
    font-weight: bold;
}



.produto-card {
    display: flex;
    flex-direction: column; 
    width: 280px; /* LARGURA FIXA */
    height: 420px; /* ALTURA FIXA */
    justify-content: space-between; 
    background: #fff;
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    /* margin removido para não conflitar com gap do grid */
}


.produto-card:hover {
    transform: translateY(-5px); 
}

/* Área da Imagem */

.produto-imagem {
    width: 100%;
    height: 200px;         
    display: flex;         
    justify-content: center; 
    align-items: center;     
    padding: 15px;         
    background-color: #fff; 
    box-sizing: border-box;
}

.produto-imagem img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

/* Informações do Texto */

.produto-info {
    flex-grow: 1; 
    display: flex;
    flex-direction: column;
}

.produto-info h3 {
    font-size: 16px;
    align-items: center;
    text-align: center;
    margin-bottom: 8px;
    height: 42px;          
    overflow: hidden;      
}

.produto-info p {
   font-size: 12px;
   text-align: center;
   align-items: center;
   color: #666;
   height: 48px;          
   overflow: hidden;
}

/* Preço em destaque */

.preco {
    display: block;
    text-align: center;
    font-size: 20px;
    font-weight: bold;
    color: #e33e18; 
    margin-bottom: 15px;
}


.btn-comprar {
    margin-top: auto; 
    width: 100%;
    height: 45px;
    border: none;
    border-radius: 10px;
    color: white;
    font-weight: bold;
    font-size: 16px;
    cursor: pointer;
    background: linear-gradient(to right, #e3421e, #4676ae); 
    transition: transform 0.2s;
}

.btn-comprar:hover {
    opacity: 0.9;
    transform: scale(1.02); 
}


/* Estilização Geral do Rodapé */

 .rodape {
    background-color: #003366; 
    color: #ffffff;
    padding: 10px 0 10px 0;
    margin-top: 10px;
    font-family: Arial, sans-serif;
}

.rodape-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: center;
    gap: 60px;
    flex-wrap: wrap;
    padding: 0 20px;
    text-align: center;
}

.rodape-coluna {
    min-width: 250px;
    margin-bottom: 10px;
}

.rodape-coluna h3 {
    color: #ffdb00; 
    font-size: 18px;
    margin-bottom: 20px;
    text-transform: uppercase;
}

.rodape-coluna ul {
    list-style: none;
    padding: 0;
}

.rodape-coluna ul li {
    margin-bottom: 10px;
}

.rodape-coluna ul li a {
    color: #ffffff;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s;
}

.rodape-coluna ul li a:hover {
    color: #ffdb00;
}

/* Redes Sociais e Pagamento */

.redes-sociais a, .pagamento-icones i {
    font-size: 24px;
    margin-right: 0;
    color: #ffffff;
    cursor: pointer;
    margin-left: 10px; 
    text-decoration: none;
}

/* Remove o espaço do primeiro ícone para não ficar torto no centro */

.redes-sociais a:first-child, .pagamento-icones i:first-child {
    margin-left: 0;
}

.pagamento-icones {
    margin-top: 10px;
    display: flex;       
    justify-content: center; 
}


.redes-sociais {
    display: flex;       
    justify-content: center; 
}

.pagamento-icones i:hover {
    color: #ffdb00;
}

/* Linha Final */

.rodape-inferior {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
    padding-top: 20px;
    margin-top: 20px;
    font-size: 12px;
} 


.tab-selection {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}


/* Ajuste dos inputs para não quebrarem o layout */


 .form-group {
    margin-bottom: 15px;
} 

.cart-sidebar.active {
    right: 0; /* Desliza para dentro da tela */
}

/* Área onde os produtos aparecem */

.cart-body {
    flex: 1;
    overflow-y: auto;
    padding-right: 5px;
}

/* Estilização do carrinho de agendamento */

.cart-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 10px;
    background: #fff;
    border-radius: 12px;
    margin-bottom: 15px;
    border: 1px solid #eee;
} 


.cart-item img {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 8px;
}

.cart-item-info {
    display: flex;
    flex-direction: column;
}

.cart-item-name {
    font-size: 14px;
    font-weight: bold;
}


.cart-item-price {
    color: var(--cor-alerta);
    font-weight: bold;
}

/* Garante que o pagamento mostre apenas 1 selecionado */

.payment-option input[type="radio"] {
    accent-color: var(--cor-primaria);
    margin-right: 10px;
}


/* Rodapé fixo do carrinho  */


.coupon-container {
    display: flex;
    gap: 10px;
    margin-top: 10px;
    width: 100%;
}


.coupon-container input {
    min-width: 0; 
    flex: 1;
    height: 45px;
    padding: 0 15px;
    border-radius: 8px;
    border: 1px solid #ddd;
    font-size: 14px;
    outline: none;
}

.coupon-container input::placeholder {
    color: #999;
}

.coupon-container button {
    height: 45px;
    padding: 0 20px;
    border-radius: 8px;
    border: none;
    background: #1f2d3d; 
    color: #fff;
    font-weight: 600;
    cursor: pointer;
}

.coupon-container button:hover {
    opacity: 0.9;
}



.cart-footer {
    padding: 20px;
    border-top: 1px solid #eee;
    background: white;
}


.summary-line {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 15px;
    color: #444;
    margin-bottom: 25px;
}


.summary-line.total {
    margin-top: 15px;
    padding-top: 10px;
    border-top: 1px solid #eee;
    font-size: 20px;
    font-weight: bold;
    color: #ff4d2d; 
} 


/* ==========================================
   CARRINHO SIDEBAR (AJUSTADO PARA CAMPOS VERTICAIS)
   ========================================== */

.cart-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.35s ease, visibility 0.35s ease;
    z-index: 2500;
}

.cart-overlay.active {
    opacity: 1;
    visibility: visible;
}

.cart-sidebar {
    position: fixed;
    top: 0;
    right: 0;
    width: 400px;
    max-width: 100%;
    height: 100vh;
    background: #fff;
    z-index: 3000;
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform 0.45s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform;
    box-shadow: -5px 0 20px rgba(0,0,0,0.15);
    overflow-x: hidden;
    
} 

.cart-sidebar * {
    box-sizing: border-box;
}

.cart-sidebar.active {
      transform: translateX(0);
}


.cart-header {
    padding: 20px;
    background: #fff; 
    color: #333;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #eee;
}

.cart-body {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    background: #fdfdfd;
}

/* --- AJUSTE DOS CAMPOS (UM EMBAIXO DO OUTRO) --- */

.form-group {
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
}

.date-time-row {
    display: flex;
    flex-direction: column; 
    gap: 0; 
}

.form-group label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 8px;
    color: #444;
}

.form-group input, 
.form-group textarea, 
.form-group select {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #e2e8f0;
    border-radius: 10px; 
    font-size: 15px;
    background-color: #fff;
    transition: border-color 0.2s;
}

.form-group input:focus {
    border-color: #2d4a6a;
    outline: none;
}

/* --- BOTÕES DE ENTREGA/RETIRADA --- */

.options-toggle {
    display: flex;
    gap: 12px;
    margin-bottom: 25px;
}

.delivery-btn {
    flex: 1;
    padding: 14px;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    background: #fff;
    cursor: pointer;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: 0.3s;
}

.delivery-btn.active {
    background: #2d4a6a; 
    color: white;
    border-color: #2d4a6a;
}

/* --- PAGAMENTO --- */

.payment-options-container h4 {
    margin: 20px 0 15px;
    font-size: 16px;
}

.payment-grid {
    display: flex;
    flex-direction: column;
    gap: 10px;

}

.payment-option {
    display: flex;
    align-items: center;
    padding: 15px;
    border: 1px solid #eee;
    border-radius: 10px;
    cursor: pointer;
}

/* --- RODAPÉ E BOTÃO FINAL --- */

.cart-footer {
    padding: 20px;
    border-top: 1px solid #eee;
    background: white;
}

.finish-order-btn {
    width: 100%;
    padding: 18px;
    background: linear-gradient(90deg, #e67e22, #3498db); 
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.finish-order-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
}




/* --- RESPONSIVIDADE GERAL --- */

/* Esconde elementos mobile no desktop */

/* --- RESPONSIVIDADE TOTAL --- */

/* Esconde botões mobile por padrão no PC */


/* Esconde o botão e elementos mobile por padrão no desktop */

.menu-hamburguer, .menu-close-btn, .menu-overlay {
    display: none;
}


@media (max-width: 1030px) and (min-width: 769px) {
     .vitrine {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(260px, 260px)); 
        justify-content: center;
        padding: 45px; /* Aumentado de 35px para 45px */
        gap: 50px; /* Aumentado de 35px para 50px */
    }
    .categorias {
        padding: 15px 20px; /* Melhorado espaçamento */
        display: flex;
        justify-content: center;
        flex-wrap: wrap; /* Permitir quebra em telas menores */
    }

    .categorias a {
        margin: 5px 10px; /* Reduzido margem para caber mais */
        font-size: 14px; 
        gap: 5px; 
    }

    .categorias i {
        font-size: 14px; 
    }
    
    .cabecalho {
        padding: 15px 20px;
        flex-wrap: wrap;
    }
    
    .logo {
        font-size: 18px;
    }
}


@media (max-width: 800px) {
    .vitrine {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(240px, 240px)); 
        justify-content: center;
        padding: 40px; /* Aumentado de 30px para 40px */
        gap: 45px; /* Aumentado de 30px para 45px */
    }
    
    .cabecalho {
        padding: 12px 15px;
    }
    
    .logo {
        font-size: 16px;
    }
    
    .busca {
        max-width: 250px;
    }
}


@media (max-width: 770px) {
    body { padding-top: 0;

     }
    .cabecalho {
        display: flex;
        flex-wrap: wrap;
        justify-content: space-between;
        padding: 10px 15px;
    }
        .menu-hamburguer {
        display: block !important;
        background: blue;
        border: none;
        color: white;
        font-size: 25px;
        cursor: pointer;
        order: 1;
    }

    .logo {
        order: 3; 
        flex: 1;
        text-align: center;
        margin: auto;
        font-size: 18px;
        -webkit-text-fill-color: white; 
    }

    .links-topo {
        order: 3; 
    }

    /* Ajuste da busca no Mobile */
    .busca {
        display: none; 
    }

    .links-topo a span:not(#cart-count) {
        display: none; 
    }

      /* Busca mobile */

    .busca {
        order: 4;
        position: static;        
        transform: none;         
        width: 40%;             
        max-width: 100%;
        margin: 10px 0 5px 0;
        padding: 0 10px;         
        box-sizing: border-box;
    }

    .busca input {
        width: 40%;
        font-size: 15px;
    }

    .busca button {
        width: 45px;
    }

    /* MENU CATEGORIAS (O MENU LATERAL) */

    .categorias {
        position: fixed;
        top: 0;
        left: -100%; 
        width: 280px;
        height: 100vh;
        background-color: #004c96 !important;
        z-index: 9999;
        display: flex !important; 
        flex-direction: column;
        align-items: flex-start;
        padding: 60px 20px;
        transition: 0.4s ease-in-out;
        box-shadow: 5px 0 15px rgba(0,0,0,0.3);
    }

    .categorias.active {
        left: 0; 
    }

    .categorias a {
        color: #ffffff !important;
        margin: 10px 0;
        width: 100%;
        font-size: 18px;
        border-bottom: 1px solid #eee;
        padding-bottom: 10px;
    }

    /* Botão fechar (X) */

    .menu-close-btn {
        display: block !important;
        position: absolute;
        top: 15px;
        right: 15px;
        font-size: 35px;
        background: none;
        border: none;
        color: #004c96;
        cursor: pointer;
    }

    /* Overlay (Fundo Escuro) */

    .menu-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0,0,0,0.6);
        z-index: 9998;
        display: none;
    }

    .menu-overlay.active {
        display: block;
    }

    

    /* Vitrine Mobile - 2 colunas com cards fixos */

    .vitrine {
        display: grid;
        grid-template-columns: repeat(2, 160px); /* Cards fixos de 160px */
        justify-content: center;
        padding: 35px; /* Aumentado de 30px para 35px */
        gap: 35px; /* Aumentado de 25px para 35px */
    }

    .produto-card {
        width: 160px; /* Cards fixos no mobile */
        height: 380px; /* Altura ajustada para mobile */
        padding: 12px; /* Reduzido padding para mobile */
        /* margin removido para não conflitar com gap do grid */
    }
    
    .produto-info h3 {
        font-size: 14px;
        height: 40px;
    }
    
    .produto-info p {
        font-size: 11px;
        height: 40px;
    }
    
    .preco {
        font-size: 18px;
    }
    
    .btn-comprar {
        height: 40px;
        font-size: 14px;
    }
}

/* Telas muito pequenas (1 coluna com cards centralizados) */
@media (max-width: 400px) {
    .vitrine {
        grid-template-columns: repeat(1, 280px); /* 1 coluna com largura fixa */
        justify-content: center;
        padding: 35px; /* Aumentado de 30px para 35px */
        gap: 40px; /* Aumentado de 30px para 40px */
    }
    
    .produto-card {
        width: 280px;
        height: 400px;
        padding: 15px;
        /* margin removido para não conflitar com gap do grid */
    }
    
    .cabecalho {
        padding: 10px;
    }
    
    .logo {
        font-size: 14px;
    }
    
    .busca {
        max-width: 200px;
    }
    
    .busca input {
        font-size: 14px;
        padding: 8px 12px;
    }
}

/* ==========================================
   ESTILOS PARA CONTROLES DE QUANTIDADE
   ========================================== */

.quantity-controls {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
}

.qty-btn {
    width: 24px;
    height: 24px;
    border: 1px solid #ddd;
    background: #f8f9fa;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.qty-btn:hover {
    background: #e9ecef;
    border-color: #adb5bd;
}

.qty {
    font-size: 14px;
    font-weight: 600;
    min-width: 20px;
    text-align: center;
}

/* ==========================================
   RESPONSIVIDADE DO CARRINHO
   ========================================== */

@media (max-width: 768px) {
    .cart-sidebar {
        width: 100%;
        max-width: 380px;
    }
    
    .cart-header {
        padding: 15px;
    }
    
    .cart-body {
        padding: 15px;
    }
    
    .cart-footer {
        padding: 15px;
    }
    
    .form-group input,
    .form-group select {
        padding: 10px 12px;
        font-size: 14px;
    }
    
    .finish-order-btn {
        padding: 15px;
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .cart-sidebar {
        width: 100%;
        max-width: 100%;
    }
    
    .cart-header h3 {
        font-size: 16px;
    }
    
    .cart-item {
        padding: 8px;
        gap: 10px;
    }
    
    .cart-item img {
        width: 40px;
        height: 40px;
    }
    
    .cart-item-name {
        font-size: 12px;
    }
    
    .cart-item-price {
        font-size: 12px;
    }
    
    .qty-btn {
        width: 20px;
        height: 20px;
        font-size: 12px;
    }
    
    .qty {
        font-size: 12px;
    }
}

/* ==========================================
   MELHORIAS DE RESPONSIVIDADE GERAL
   ========================================== */

@media (max-width: 1200px) {
    .rodape-container {
        gap: 40px;
    }
}

@media (max-width: 900px) {
    .rodape-container {
        gap: 30px;
        flex-direction: column;
        align-items: center;
    }
    
    .rodape-coluna {
        min-width: 200px;
        text-align: center;
    }
}

@media (max-width: 600px) {
    .conteudo-banner h1 {
        font-size: 36px;
    }
    
    .conteudo-banner p {
        font-size: 16px;
    }
    
    .rodape-container {
        gap: 20px;
    }
    
    .rodape-coluna h3 {
        font-size: 16px;
    }
    
    .rodape-coluna ul li a {
        font-size: 13px;
    }
}


