/* Configurações Globais e Reset */
:root {
    --primary-color: #FF4500;
    --secondary-color: #4A2E2A;
    --background-color: #FDF8F0;
    --card-background: #FFFFFF;
    --font-family: 'Poppins', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-family);
    background-color: var(--background-color);
    color: var(--secondary-color);
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Estilo do Cabeçalho (Header) */
.header {
    background-color: var(--primary-color);
    color: white;
    padding: 40px 0;
    text-align: center;
    background-image: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url('https://via.placeholder.com/1200x400.png?text=Nossas+Batatas');
    background-size: cover;
    background-position: center;
    position: relative;
}
.header h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.7);
}
.header p {
    font-size: 1.2rem;
    font-weight: 400;
}

/* Ícone do Instagram */
.social-media {
    position: absolute;
    top: 25px;
    right: 30px;
}
.social-media a {
    text-decoration: none;
    font-size: 2.2rem;
    transition: opacity 0.3s ease;
}
.social-media a:hover { opacity: 0.8; }
.social-media .fa-instagram {
    background: radial-gradient(circle at 30% 107%, #fdf497 0%, #fdf497 5%, #fd5949 45%, #d6249f 60%, #285AEB 90%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

/* Título da Seção do Cardápio */
.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin: 40px 0;
    position: relative;
    padding-bottom: 10px;
}
.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background-color: var(--primary-color);
    border-radius: 2px;
}

/* Grid e Itens do Cardápio */
.menu-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}
.menu-item {
    background-color: var(--card-background);
    border-radius: 15px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.menu-item:hover {
    transform: translateY(-10px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.2);
}
.menu-item-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
}
.menu-item-content {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}
.menu-item-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 10px;
}
.menu-item-description {
    font-size: 0.95rem;
    margin-bottom: 15px;
    flex-grow: 1;
}
.menu-item-price {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 20px;
}

/* Botão de Compra */
.btn-buy {
    display: inline-block;
    background-color: var(--primary-color);
    color: white;
    padding: 12px 25px;
    text-align: center;
    text-decoration: none;
    font-weight: 600;
    border-radius: 8px;
    transition: background-color 0.3s ease, transform 0.2s ease;
    cursor: pointer;
    border: none;
    font-family: var(--font-family);
    font-size: 1rem; /* Garante tamanho da fonte */
}
.btn-buy i { margin-right: 8px; }
.btn-buy:hover {
    background-color: #e63e00;
    transform: scale(1.05);
}

/* Rodapé */
.footer {
    background-color: var(--secondary-color);
    color: #f0f0f0;
    text-align: center;
    padding: 20px 0;
    margin-top: 50px;
}

/* --- ESTILO PARA BOTÃO FLUTUANTE E MODAIS --- */
#promo-fab {
    position: fixed;
    bottom: 25px;
    right: 25px;
    width: auto;
    padding: 12px 20px;
    height: auto;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 30px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    z-index: 1000;
    transition: transform 0.3s ease, background-color 0.3s ease;
    animation: pulse-animation 2s ease-in-out infinite; /* Animação adicionada */
}
#promo-fab:hover {
    transform: scale(1.05); /* Mantém o hover */
    background-color: #e63e00;
    animation-play-state: paused; /* Pausa a animação no hover */
}

.modal {
    display: none;
    position: fixed;
    z-index: 1001;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto; /* Permite rolar o modal se for MUITO alto */
    background-color: rgba(0, 0, 0, 0.8);
    align-items: center;
    justify-content: center;
    padding: 20px 0; /* Espaço para não colar no topo/fundo */
}

.modal-content {
    padding: 0;
    border-radius: 15px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.4);
    position: relative;
    overflow: hidden; /* Mantém o overflow hidden para o arredondamento */
    background-color: #fefefe; /* Fundo necessário aqui */
}

/* Modal de Promoção (Swiper) */
.swiper-slide { background-color: #fefefe; }
.modal-image,
#promo-modal .modal-text { background-color: #fefefe; } /* Aplicar fundo aqui também */
.modal-image {
    width: 100%;
    height: 220px;
    object-fit: cover;
    display: block;
}
#promo-modal .modal-text { padding: 20px 30px 40px 30px; } /* Padding específico para promo */

.modal-promo-title {
    font-size: 1.6rem; /* Levemente menor */
    color: var(--primary-color);
    text-align: center;
    margin-bottom: 15px;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.1);
}
.close-button {
    color: white;
    background-color: rgba(0,0,0,0.5);
    border-radius: 50%;
    position: absolute;
    top: 15px;
    right: 15px;
    font-size: 28px;
    font-weight: bold;
    width: 35px;
    height: 35px;
    line-height: 35px;
    text-align: center;
    cursor: pointer;
    transition: background-color 0.2s ease;
}
.close-button:hover { background-color: rgba(0,0,0,0.8); }
#promo-modal .close-button { z-index: 10; }
#order-modal .close-button { z-index: 1002; }
#payment-modal .close-button { z-index: 1002; } /* Adicionado para garantir */

.price-container { margin-top: auto; margin-bottom: 20px; }
.old-price {
    display: block;
    text-decoration: line-through;
    color: #888;
    font-size: 1rem;
}
.swiper-button-next, .swiper-button-prev { color: var(--primary-color) !important; }
.swiper-pagination-bullet-active { background-color: var(--primary-color) !important; }

/* --- ESTILOS DO MODAL DE PEDIDO --- */
#order-modal .modal-text {
    padding: 15px 20px 20px 20px;
}
.order-item-selected {
    padding: 10px;
    margin-bottom: 15px;
    background: #f9f9f9;
    border-radius: 8px;
    border-left: 5px solid var(--primary-color);
}
.order-item-selected h3 { font-size: 1.2rem; margin: 0; color: var(--secondary-color);}
.order-item-selected p { font-size: 1.1rem; margin: 5px 0 0 0;}

.extras-list-wrapper { margin-bottom: 15px; }
.extras-list-wrapper h4 {
    font-size: 1.1rem;
    margin-bottom: 8px;
    color: var(--secondary-color);
}
.extras-list {
    list-style: none;
    padding: 0;
    margin: 0;
    max-height: 180px;
    overflow-y: auto;
}
/* Estilo original para li (mantido para espaçamento) */
.extras-list li {
    margin-bottom: 5px;
}
/* Estilo original para label (estiliza a linha do acréscimo) */
.extras-list label {
    padding: 8px 10px;
    font-size: 0.9rem;
    display: flex; /* Necessário para alinhar */
    justify-content: space-between; /* Espaça texto e seletor */
    align-items: center; /* Alinha verticalmente */
    width: 100%;
    background: #fdfdfd;
    border: 1px solid #eee;
    border-radius: 8px;
    transition: background-color 0.2s;
}
.extras-list label:hover {
     background-color: #f7f7f7; /* Efeito hover */
}
/* Estilo original para span (preço unitário) */
.extras-list span {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-left: 10px; /* Espaço antes do span */
    white-space: nowrap; /* Impede que "+ R$ X,XX" quebre linha */
}
/* Esconde o checkbox original (ele não é mais usado) */
.extras-list input[type="checkbox"] { display: none; }

.address-section {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px dashed #eee;
}
.address-section h4 {
    font-size: 1.1rem;
    margin-bottom: 10px;
    color: var(--secondary-color);
}
.address-fields {
    display: grid;
    grid-template-columns: 1fr;
    gap: 6px;
}
.address-fields input {
    width: 100%;
    padding: 6px 8px;
    font-size: 0.85rem;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-family: var(--font-family);
}
@media (min-width: 576px) {
    .address-fields { grid-template-columns: repeat(2, 1fr); }
    #address-name, /* Adicionado para ocupar linha inteira */
    #address-street, #address-neighborhood, #address-city, #address-reference {
        grid-column: span 2;
    }
     #address-number { grid-column: 1 / 2; } /* Fica ao lado do CEP */
     #address-cep { grid-column: 2 / 3; }
}

.modal-total-section {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 2px solid #f0f0f0;
    flex-direction: column;
    gap: 15px;
    display: flex;
    align-items: center;
}
.total-price-text {
    font-size: 1.3rem;
    width: 100%;
    text-align: center;
    font-weight: 700;
    color: var(--secondary-color);
}
.total-price-text span {
    color: var(--primary-color);
}
.modal-total-section .btn-buy {
    width: 100%;
    padding: 10px;
}

/* --- ESTILOS PARA O MODAL DE PAGAMENTO PIX --- */
#payment-modal .modal-text {
    padding: 20px 30px 30px 30px;
    text-align: center;
}
.payment-instructions {
    font-size: 1rem;
    margin-bottom: 15px;
}
.payment-instructions strong {
    font-size: 1.3rem;
    margin: 8px 0;
    color: var(--primary-color);
    display: block;
}
.pix-qrcode-image {
    width: 180px;
    height: 180px;
    margin: 10px auto;
    display: block;
    border: 5px solid white;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}
.pix-copy-wrapper {
    margin-top: 10px;
    display: inline-flex;
    max-width: 100%;
}
.pix-copy-wrapper input[type="text"] {
    padding: 8px 10px;
    font-size: 0.8rem;
    flex-grow: 1;
    border: 1px solid #ddd;
    border-radius: 8px 0 0 8px;
    background-color: #f4f4f4;
    color: #555;
    outline: none;
    min-width: 150px;
}
.btn-buy-secondary {
    padding: 8px 12px;
    font-size: 0.9rem;
    border: none;
    background-color: var(--secondary-color);
    color: white;
    border-radius: 0 8px 8px 0;
    cursor: pointer;
    font-weight: 600;
    transition: background-color 0.2s;
    font-family: var(--font-family);
}
.btn-buy-secondary i { margin-right: 5px; }
.btn-buy-secondary:hover { background-color: #3a221f; }
.delivery-fee-notice {
    padding: 10px;
    margin: 15px 0;
    background-color: #fff3cd;
    color: #856404;
    border: 1px solid #ffeeba;
    border-radius: 8px;
    text-align: center;
}
.delivery-fee-notice p {
    font-size: 0.9rem;
    margin: 5px 0;
    font-weight: 500;
}
.delivery-fee-notice i { margin-right: 8px; }
.payment-instructions.final-step {
    margin-top: 20px;
    font-weight: 600;
}

/* --- AJUSTES FINAIS PARA CELULARES --- */
@media (max-width: 768px) {
    .header h1 { font-size: 2.2rem; }
    .header p { font-size: 1rem; }
    .section-title { font-size: 2rem; }
    .social-media { top: 10px; right: 5px; }

    #promo-fab {
        bottom: 15px;
        right: 15px;
        padding: 10px 15px;
        font-size: 0.9rem;
    }
    .modal-content { width: 95%; }
    .modal-promo-title { font-size: 1.5rem; }

    /* Garante uma coluna para endereço no mobile e Nome ocupa linha inteira */
    .address-fields { grid-template-columns: 1fr !important; }
    #address-name,
    #address-street, #address-number, #address-neighborhood, #address-cep, #address-city, #address-reference {
        grid-column: 1 / -1 !important;
    }
    .address-fields input { font-size: 0.9rem; }

    .pix-copy-wrapper { display: flex; width: 100%; }

    /* Ajustes para o modal PIX no celular */
     #payment-modal .modal-text { padding: 15px 20px 20px 20px; }
     .payment-instructions { font-size: 0.9rem; margin-bottom: 10px;}
     .payment-instructions strong { font-size: 1.2rem; }
     .pix-qrcode-image { width: 150px; height: 150px; margin: 5px auto 10px auto;}
     .delivery-fee-notice { padding: 8px; margin: 10px 0;}
     .delivery-fee-notice p { font-size: 0.85rem;}
     .payment-instructions.final-step { margin-top: 15px; }
}

/* Animação Pulsante */
@keyframes pulse-animation {
    0% { transform: scale(1); box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3); }
    50% { transform: scale(1.05); box-shadow: 0 8px 25px rgba(255, 69, 0, 0.6); }
    100% { transform: scale(1); box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3); }
}

/* ==================================================================== */
/* === BLOCO ADICIONADO PARA SELETOR DE QUANTIDADE (v3 - Minimalista) === */
/* ==================================================================== */
/* Wrapper para o seletor, colocado dentro do label */
.quantity-selector-wrapper {
    display: flex;
    align-items: center;
    margin-left: auto; /* Empurra para a direita */
    padding-left: 10px; /* Espaço antes do seletor */
    flex-shrink: 0; /* Impede que encolha demais */
}
/* Botões de Mais e Menos (usando novas classes) */
.quantity-btn-new {
    width: 26px;
    height: 26px;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 1.1rem;
    line-height: 24px;
    text-align: center;
    cursor: pointer;
    transition: background-color 0.2s;
    padding: 0;
    flex-shrink: 0;
}
.quantity-btn-new:hover { background-color: #e63e00; }
/* Input numérico (usando nova classe) */
.quantity-input-new {
    width: 35px;
    height: 26px;
    text-align: center;
    border: 1px solid #ccc;
    border-radius: 4px;
    margin: 0 5px;
    font-size: 0.9rem;
    font-weight: 600;
    -moz-appearance: textfield;
    appearance: textfield;
    flex-shrink: 0;
}
.quantity-input-new::-webkit-outer-spin-button,
.quantity-input-new::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
/* ========================================================== */
/* ========= FIM DO BLOCO ADICIONADO ========= */
/* ========================================================== */