/* ============================================== */
/* ========= RESET E CONFIGURAÇÕES GERAIS ========= */
/* ============================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Montserrat', sans-serif;
    background-color: #FDF0D5;
    color: #1A1A1A;
    min-height: 100vh;
    padding: 80px 0 150px 0;
    position: relative;
}

.container {
    padding: 0 15px;
}

/* ============================================== */
/* ========= FUNDO TEXTURIZADO ==================== */
/* ============================================== */
.bg-fornalha {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('imagens/fundo-fornalha.jpg');
    background-size: cover;
    background-position: center;
    opacity: 0.05;
    pointer-events: none;
    z-index: -1;
}

/* ============================================== */
/* ========= WHATSAPP FLUTUANTE =================== */
/* ============================================== */
.whatsapp-float {
    position: fixed;
    bottom: 100px;
    left: 20px;
    width: 55px;
    height: 55px;
    background: #25D366;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    text-decoration: none;
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.6);
    z-index: 1000;
    transition: 0.3s;
}

.whatsapp-float:hover {
    transform: scale(1.1);
}

/* ============================================== */
/* ========= HEADER FIXO (LOGO + SELO) ============ */
/* ============================================== */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 80px;
    background: #1A1A1A;
    z-index: 100;
    border-bottom: 3px solid #E63946;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.logo {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover; /* ALTERADO PARA COVER (OCUPA TUDO) */
    object-position: center;
    display: block;
    border-radius: 0;
}

/* ========= SELO DE HORÁRIO (MENOR E BRANCO) ========= */
.horario-header {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(60, 60, 70, 0.9);
    backdrop-filter: blur(4px);
    padding: 4px 4px;
    border-radius: 6px;
    width: 55px;
    height: 55px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1px;
    color: #FFFFFF;
    border: 1px solid #E63946;
    z-index: 10;
    line-height: 1;
    text-align: center;
    box-sizing: border-box;
}

.horario-header i {
    color: #FFFFFF;
    font-size: 1rem;
    margin-bottom: 1px;
}

.horario-header .status-text {
    display: block;
    font-size: 0.55rem;
    font-weight: 800;
    color: #FFFFFF;
    text-transform: uppercase;
}

.horario-header .horario-text {
    display: block;
    font-size: 0.45rem;
    font-weight: 600;
    color: #EEEEEE;
    white-space: nowrap;
}

/* ============================================== */
/* ========= CARDS PRINCIPAIS ===================== */
/* ============================================== */
.cards-grid {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin: 20px 0;
}

.main-card {
    background: #FFFFFF;
    border-radius: 20px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s;
    border-bottom: 4px solid #E63946;
    overflow: hidden;
    padding-bottom: 10px;
    max-width: 100%;
}

.main-card:active {
    transform: scale(0.98);
}

.main-card img {
    width: 100%;
    height: 120px;
    object-fit: cover;
    display: block;
    margin-bottom: 8px;
}

.main-card h3 {
    color: #E63946;
    margin-bottom: 3px;
    font-size: 1.2rem;
    padding: 0 10px;
}

.main-card p {
    font-size: 0.8rem;
    color: #666;
    padding: 0 10px;
}

/* ============================================== */
/* ========= MODAL LISTA DE SABORES =============== */
/* ============================================== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    z-index: 200;
    display: none;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: #FDF0D5;
    width: 95%;
    max-width: 780px;
    max-height: 85vh;
    border-radius: 20px;
    padding: 20px;
    overflow-y: auto;
    border-top: 5px solid #E63946;
}

.modal-lista h3 {
    color: #E63946;
    text-align: center;
    margin-bottom: 15px;
    font-size: 1.4rem;
}

.modal-items {
    max-height: 450px;
    overflow-y: auto;
}

/* ========= ITEM SABOR (LAYOUT CLÁSSICO COM GRID) ========= */
.item-sabor {
    display: grid;
    grid-template-columns: 70px 1fr auto;
    align-items: start;
    gap: 12px;
    padding: 15px 12px;
    border-bottom: 1px solid #ddd;
    background: white;
    border-radius: 10px;
    margin-bottom: 10px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.item-sabor img {
    width: 70px;
    height: 70px;
    border-radius: 8px;
    object-fit: cover;
    background: #E63946;
    border: 2px solid #E63946;
    grid-row: span 2;
}

.item-info {
    text-align: left;
}

.item-info h4 {
    margin-bottom: 5px;
    color: #1A1A1A;
    font-size: 1rem;
    font-weight: 700;
    white-space: normal;
    word-break: break-word;
    line-height: 1.2;
}

.item-info p {
    font-size: 0.75rem;
    color: #666;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* BLOCO DA DIREITA (PREÇO + BOTÃO) */
.item-sabor .direita {
    display: flex;
    align-items: center;
    gap: 5px;
    flex-shrink: 0;
}

.item-preco {
    font-weight: 800;
    color: #E63946;
    font-size: 1rem;
    white-space: nowrap;
    min-width: 60px;
    text-align: right;
}

.btn-escolher {
    background: #E63946;
    color: white;
    border: none;
    width: 55px;
    height: 36px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 700;
    font-size: 0.7rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    transition: 0.1s;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    padding: 0;
    line-height: 1;
    text-align: center;
}

.btn-escolher:active {
    transform: translateY(2px);
    box-shadow: none;
}

.close-modal {
    background: #1A1A1A;
    color: white;
    border: none;
    padding: 14px;
    border-radius: 10px;
    width: 100%;
    margin-top: 20px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
}

/* ============================================== */
/* ========= CARRINHO ============================= */
/* ============================================== */
.cart-sidebar {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: #1A1A1A;
    color: white;
    border-radius: 20px 20px 0 0;
    z-index: 99;
    border-top: 3px solid #E63946;
    box-shadow: 0 -5px 15px rgba(0, 0, 0, 0.2);
}

.cart-header {
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 700;
    cursor: pointer;
    background: #1A1A1A;
    border-radius: 20px 20px 0 0;
}

.cart-count {
    background: #E63946;
    color: white;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
}

.cart-content {
    padding: 0 15px 15px;
    display: block;
}

.cart-items {
    max-height: 200px;
    overflow-y: auto;
    margin-bottom: 10px;
}

.cart-item {
    display: grid;
    grid-template-columns: 1fr auto auto;
    align-items: center;
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px solid #333;
}

.cart-item span:first-child {
    text-align: left;
    font-size: 0.9rem;
}

.cart-item span:nth-child(2) {
    text-align: right;
    font-weight: 700;
    color: #ffffff;
    min-width: 70px;
}

.cart-item i {
    color: #E63946;
    cursor: pointer;
    padding: 5px;
    text-align: center;
    width: 24px;
}

.cart-empty {
    text-align: center;
    color: #aaa;
    padding: 20px;
}

.cart-total {
    font-size: 1.3rem;
    font-weight: 800;
    padding: 10px 0;
    color: #E63946;
    text-align: right;
}

.btn-finalizar {
    background: #25D366;
    color: white;
    border: none;
    padding: 15px;
    border-radius: 30px;
    font-weight: 800;
    width: 100%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    box-shadow: 0 4px 0 #128C7E;
    transition: 0.1s;
}

.btn-finalizar:active {
    transform: translateY(4px);
    box-shadow: none;
}

.cart-sidebar.minimized .cart-content {
    display: none;
}

/* ============================================== */
/* ========= MODAL CHECKOUT ======================= */
/* ============================================== */
#checkoutModal .modal-content {
    background: white;
}

#checkoutModal input,
#checkoutModal select,
#checkoutModal textarea {
    width: 100%;
    padding: 12px;
    margin: 8px 0;
    border: 1px solid #ddd;
    border-radius: 10px;
    font-family: 'Montserrat', sans-serif;
}

#checkoutModal small {
    color: #666;
    display: block;
    margin-bottom: 10px;
}

.modal-buttons {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.btn-confirm {
    background: #25D366;
    color: white;
    border: none;
    padding: 12px;
    border-radius: 10px;
    flex: 1;
    font-weight: 700;
    box-shadow: 0 4px 0 #128C7E;
}

.btn-cancel {
    background: #ccc;
    color: #1A1A1A;
    border: none;
    padding: 12px;
    border-radius: 10px;
    flex: 1;
    font-weight: 700;
}

/* ============================================== */
/* ========= RESPONSIVO (TELAS MAIORES) =========== */
/* ============================================== */
@media (min-width: 768px) {
    .container {
        max-width: 650px;
        margin: 0 auto;
    }

    .cards-grid {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
    }

    .main-card img {
        height: 100px;
    }
}

/* ============================================== */
/* ========= DESKTOP (TELAS GRANDES) ============== */
/* ============================================== */
@media (min-width: 1024px) {
    body {
        display: flex;
        flex-direction: column;
        align-items: center;
        padding-top: 100px;
    }

    .container {
        max-width: 1100px;
        width: 100%;
    }

    header {
        max-width: 1100px;
        left: 50%;
        transform: translateX(-50%);
        border-radius: 0 0 20px 20px;
    }

    .cards-grid {
        display: grid;
        grid-template-columns: repeat(4, 1fr) !important;
        gap: 25px;
        margin: 40px 0;
    }

    .main-card {
        max-width: 100%;
    }

    .main-card img {
        height: 150px;
    }

    .modal-content {
        max-width: 900px !important;
    }

    .modal-items {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
        max-height: 600px;
    }

    .item-sabor {
        grid-template-columns: 80px 1fr auto;
        padding: 20px 15px;
    }

    .item-sabor img {
        width: 80px;
        height: 80px;
    }

    .item-info h4 {
        font-size: 1.1rem;
    }

    .item-info p {
        font-size: 0.85rem;
        -webkit-line-clamp: 4;
    }

    .item-preco {
        font-size: 1.2rem;
        min-width: 70px;
    }

    .btn-escolher {
        width: 65px;
        height: 40px;
        font-size: 0.8rem;
    }

    .cart-sidebar {
        left: auto;
        right: 20px;
        bottom: 20px;
        width: 380px;
        border-radius: 20px;
        border: 3px solid #E63946;
    }

    .cart-sidebar.minimized {
        width: auto;
        right: 20px;
        bottom: 20px;
    }

    .whatsapp-float {
        bottom: 30px;
        left: 30px;
        width: 60px;
        height: 60px;
        font-size: 2rem;
    }
}