/* css/style.css - Versão final para hospedagem */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
body {
    font-family: 'Segoe UI', Arial, sans-serif;
    background-color: #f8f9fa;
    color: #333;
    padding-bottom: 80px;
}

/* Cabeçalho */
header {
    background-color: #530208; /* fallback se a imagem não carregar */
    background-image: url('../images/background-header.png');
    background-size: cover;        /* cobre todo o header */
    background-position: center;   /* centraliza a imagem */
    background-repeat: no-repeat;  /* não repete */
    color: white;
    text-align: center;
    padding: 20px;
    min-height: 200px; /* ajuste a altura mínima se quiser mais espaço (opcional) */
}
header img {
    width: 200px;
    height: 95px;
    object-fit: contain;
}
header h1 {
    margin: 10px 0 5px;
    font-size: 28px;
}
#status {
    font-size: 18px;
    font-weight: bold;
}
#status small {
    font-size: 16px;
    opacity: 0.9;
    display: block;
    margin-top: 5px;
}

/* Busca e categorias */
.search-container {
    padding: 15px;
    background-color: white;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}
#searchInput {
    width: 100%;
    padding: 12px;
    font-size: 16px;
    border: 1px solid #ccc;
    border-radius: 8px;
}
.categories {
    display: flex;
    overflow-x: auto;
    padding: 15px;
    gap: 10px;
    background-color: white;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    white-space: nowrap;
    scrollbar-width: none;
}
.categories::-webkit-scrollbar { display: none; }
.category-btn {
    padding: 10px 20px;
    background-color: #e9ecef;
    border: none;
    border-radius: 30px;
    font-size: 16px;
    cursor: pointer;
    flex-shrink: 0;
}
.category-btn.active {
    background-color: #28a745;
    color: white;
}

/* Produtos */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 15px;
}
.category-section {
    display: none;
}
.category-section.active {
    display: block;
}
.products-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    margin-top: 20px;
}
@media (min-width: 768px) { .products-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .products-grid { grid-template-columns: repeat(3, 1fr); } }
.product-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    transition: transform 0.3s;
}
.product-card:hover { transform: translateY(-5px); }
.product-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    background: #f0f0f0;
}
.product-info {
    padding: 15px;
}
.product-info h3 {
    font-size: 18px;
    margin-bottom: 8px;
}
.product-info p {
    font-size: 14px;
    color: #666;
    margin-bottom: 10px;
    line-height: 1.4;
}
.price {
    font-size: 20px;
    font-weight: bold;
    color: #28a745;
    margin: 10px 0;
}
.add-btn {
    width: 100%;
    padding: 12px;
    background-color: #28a745;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    cursor: pointer;
}
.add-btn:hover { background-color: #218838; }

/* Ícone carrinho */
#cartIcon {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: #28a745;
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    cursor: pointer;
    z-index: 1000;
}
#cartBadgeIcon {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #dc3545;
    color: white;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Modal carrinho */
#cartModal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.6);
    z-index: 2000;
    align-items: flex-end;
}
#cartModal.open {
    display: flex;
}
.modal-content {
    background: white;
    width: 100%;
    max-height: 75vh;
    border-radius: 20px 20px 0 0;
    padding: 20px;
    overflow-y: auto;
}
.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}
.close-modal {
    font-size: 30px;
    cursor: pointer;
    color: #999;
}

/* Itens do carrinho */
.cart-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    border-bottom: 1px solid #eee;
    font-size: 16px;
}
.cart-item .item-name {
    flex: 1;
    margin-right: 15px;
}
.cart-item .qty-controls {
    display: flex;
    align-items: center;
    gap: 12px;
}
.cart-item .qty-controls button {
    width: 40px;
    height: 40px;
    background: white;
    border: 2px solid #28a745;
    color: #28a745;
    font-size: 20px;
    font-weight: bold;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s;
}
.cart-item .qty-controls button:hover {
    background: #28a745;
    color: white;
}
.cart-item .qty {
    min-width: 50px;
    text-align: center;
    font-weight: bold;
    font-size: 18px;
}
.cart-item .item-price {
    font-weight: bold;
    min-width: 90px;
    text-align: right;
}

/* Total */
.cart-total {
    text-align: center;
    font-size: 1.8rem;
    font-weight: bold;
    color: #28a745;
    background: #e8f5e9;
    padding: 20px;
    border-radius: 15px;
    margin: 25px 0 20px 0;
}

/* Formulário cliente */
.client-data-form {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 15px;
}
.client-data-form h3 {
    text-align: center;
    margin-bottom: 25px;
    color: #333;
    font-size: 1.4rem;
}
.input-group {
    margin-bottom: 18px;
}
.input-group label {
    display: block;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
}
.input-group input, .input-group textarea, .input-group select {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid #ddd;
    border-radius: 12px;
    font-size: 16px;
    background: white;
}
.input-group input:focus, .input-group textarea:focus, .input-group select:focus {
    outline: none;
    border-color: #28a745;
    box-shadow: 0 0 0 4px rgba(40,167,69,0.15);
}
.input-group textarea {
    resize: vertical;
    min-height: 100px;
}
.send-btn {
    width: 100%;
    padding: 18px;
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
    border: none;
    border-radius: 15px;
    font-size: 1.4rem;
    font-weight: bold;
    cursor: pointer;
    margin-top: 15px;
    box-shadow: 0 6px 20px rgba(40,167,69,0.3);
}
.send-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(40,167,69,0.4);
}

/* Modais de pizza */
#choiceModal, #secondFlavorModal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.7);
    z-index: 3000;
    justify-content: center;
    align-items: center;
}
#choiceModal.open, #secondFlavorModal.open { display: flex; }
.choice-content, .flavor-content {
    background: white;
    width: 90%;
    max-width: 500px;
    border-radius: 15px;
    padding: 20px;
    text-align: center;
}
.choice-btn {
    width: 100%;
    padding: 15px;
    margin: 10px 0;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    cursor: pointer;
}
.inteira-btn { background-color: #28a745; color: white; }
.meio-btn { background-color: #ffc107; color: black; }
.flavor-option {
    padding: 15px;
    border: 2px solid #eee;
    border-radius: 10px;
    margin: 10px 0;
    cursor: pointer;
}
.flavor-option.selected {
    border-color: #28a745;
    background-color: #f0fff4;
}
#confirmSecondFlavor {
    width: 100%;
    padding: 15px;
    background-color: #28a745;
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 18px;
    margin-top: 20px;
    cursor: pointer;
}

/* ===== MODAL MEIA PIZZA ===== */
#secondFlavorModal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

#secondFlavorModal.open {
    display: flex;
}

.flavor-content {
    background: #fff;
    width: 90%;
    max-width: 420px;
    max-height: 80vh;
    border-radius: 12px;
    padding: 16px;
    display: flex;
    flex-direction: column;
}

.search-flavor {
    width: 100%;
    padding: 10px;
    margin: 10px 0;
    border-radius: 6px;
    border: 1px solid #ccc;
}

.flavor-list {
    overflow-y: auto;
    flex: 1;
    border: 1px solid #eee;
    border-radius: 6px;
    padding: 8px;
}

.flavor-item {
    padding: 8px;
    border-bottom: 1px solid #eee;
    cursor: pointer;
}

.flavor-item:hover {
    background: #f5f5f5;
}

.flavor-item.selected {
    background: #d62828;
    color: #fff;
}

/* =========================
   FOOTER
========================= */

.site-footer {
    background: #111;
    color: #ccc;
    padding: 40px 20px;
    margin-top: 60px;
}

.footer-container {
    max-width: 1200px;
    margin: auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 30px;
}

.footer-box h4 {
    color: #fff;
    margin-bottom: 15px;
    font-size: 18px;
}

.footer-box p {
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 10px;
}

.footer-box a {
    color: #ccc;
    text-decoration: none;
}

.footer-box a:hover {
    color: #25d366;
}

.footer-box i {
    margin-right: 8px;
    color: #dc3545;
}

.social-icons {
    display: flex;
    gap: 15px;
    margin-top: 10px;
}

.social-icons a {
    font-size: 22px;
    color: #ccc;
    transition: 0.3s;
}

.social-icons a:hover {
    color: #dc3545;
}

.footer-small {
    font-size: 12px;
    color: #777;
    margin-top: 10px;
}

/* Mobile */
@media (max-width: 600px) {
    .site-footer {
        text-align: center;
    }
    .social-icons {
        justify-content: center;
    }
}
