:root {
    --primary-color: #e63946;
    --dark-color: #1a1a1a;
    --darker-color: #111;
    --gray-color: #2b2b2b;
    --light-gray: #444;
    --text-color: #f8f9fa;
    --text-secondary: #adb5bd;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--darker-color);
    color: var(--text-color);
    line-height: 1.6;
}

/* Banner de Promoção Animado */
.promo-banner {
    background: linear-gradient(90deg, #e63946, #ff6b6b, #e63946);
    background-size: 200% auto;
    color: white;
    text-align: center;
    padding: 12px 0;
    font-weight: 600;
    font-size: 0.95rem;
    position: relative;
    overflow: hidden;
    animation: gradient 3s linear infinite, pulse 2s infinite alternate;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    margin-bottom: 5px;
}

.promo-banner p {
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.promo-banner::before {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    animation: shine 3s infinite;
}

@keyframes gradient {
    0% {
        background-position: 0% center;
    }
    100% {
        background-position: 200% center;
    }
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }
    100% {
        transform: scale(1.02);
    }
}

@keyframes shine {
    0% {
        left: -100%;
    }
    20%, 100% {
        left: 100%;
    }
}

.main-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--dark-color);
    padding: 1rem;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.logo h1 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin: 0;
}

.slogan {
    font-size: 0.7rem;
    color: var(--text-secondary);
    text-align: center;
    margin-top: -5px;
}

.menu-btn, .cart-icon {
    background: none;
    border: none;
    color: var(--text-color);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0.5rem;
    transition: all 0.3s ease;
}

.menu-btn:hover, .cart-icon:hover {
    color: var(--primary-color);
}

.cart-icon {
    position: relative;
}

.cart-count {
    position: absolute;
    top: -5px;
    right: -5px;
    background: var(--primary-color);
    color: white;
    font-size: 0.7rem;
    font-weight: bold;
    padding: 0.2rem 0.4rem;
    border-radius: 50%;
}

.search-section {
    padding: 1rem;
    background: var(--dark-color);
}

.search-container {
    position: relative;
    width: 100%;
}

.search-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
}

#search {
    width: 100%;
    padding: 0.8rem 1rem 0.8rem 2.5rem;
    border: none;
    border-radius: 30px;
    background: var(--gray-color);
    color: var(--text-color);
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

#search:focus {
    outline: none;
    box-shadow: 0 0 0 2px var(--primary-color);
}

.menu-container {
    padding: 1rem;
    max-width: 1200px;
    margin: 0 auto;
}

.category {
    margin-bottom: 2rem;
    background: var(--dark-color);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.category-header {
    padding: 1rem;
    background: var(--gray-color);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.category-header h2 {
    font-size: 1.2rem;
    margin: 0;
    color: var(--primary-color);
}

.category-icon {
    color: var(--primary-color);
}

.category-items {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1rem;
    padding: 1rem;
}

.item {
    background: var(--gray-color);
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    position: relative;
}

.item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 15px rgba(0, 0, 0, 0.2);
}

.item-image {
    width: 100%;
    height: 180px;
    overflow: hidden;
    position: relative;
}

.item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.item:hover .item-image img {
    transform: scale(1.05);
}

.customizable-icon {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.7);
    color: var(--primary-color);
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    z-index: 10;
}

.item-info {
    padding: 1rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.item-info h3 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    color: var(--text-color);
}

.item-description {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
    flex-grow: 1;
}

.item-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.price {
    font-weight: 700;
    color: var(--primary-color);
    font-size: 1.1rem;
}

.add-btn {
    background: var(--primary-color);
    color: white;
    border: none;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.add-btn:hover {
    background: #c1121f;
    transform: scale(1.1);
}

/* Modal Carrinho */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 2000;
    overflow-y: auto;
}

.modal-content {
    background: var(--dark-color);
    margin: 2rem auto;
    max-width: 500px;
    width: 95%;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: var(--gray-color);
    border-bottom: 1px solid var(--light-gray);
}

.modal-header h2 {
    font-size: 1.3rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--primary-color);
}

.close-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.close-btn:hover {
    color: var(--primary-color);
    transform: rotate(90deg);
}

.modal-body {
    padding: 1rem;
}

.cart-items {
    max-height: 400px;
    overflow-y: auto;
    margin-bottom: 1rem;
}

.cart-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.8rem 0;
    border-bottom: 1px solid var(--light-gray);
}

.cart-item:last-child {
    border-bottom: none;
}

.cart-item-info {
    flex-grow: 1;
}

.cart-item-name {
    font-weight: 500;
    margin-bottom: 0.2rem;
}

.cart-item-price {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.cart-item-controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.cart-item-qty {
    min-width: 30px;
    text-align: center;
}

.cart-item-btn {
    background: var(--light-gray);
    color: var(--text-color);
    border: none;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.cart-item-btn:hover {
    background: var(--primary-color);
}

.cart-item-remove {
    background: var(--light-gray);
    color: var(--text-color);
    border: none;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    margin-left: 0.5rem;
    transition: all 0.3s ease;
}

.cart-item-remove:hover {
    background: var(--primary-color);
}

/* Seção de informações do cliente */
.customer-info {
    background: var(--gray-color);
    padding: 1rem;
    border-radius: 8px;
    margin: 1rem 0;
}

.customer-info h3 {
    font-size: 1rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.8rem;
    border: none;
    border-radius: 4px;
    background: var(--light-gray);
    color: var(--text-color);
    font-family: 'Poppins', sans-serif;
}

.form-group textarea {
    min-height: 80px;
    resize: vertical;
}

.form-group select {
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 0.7rem center;
    background-size: 1rem;
}

/* Estilo para grupos de opções no select */
optgroup {
    font-weight: bold;
    color: var(--primary-color);
}

/* Estilo para mensagem de entrega grátis */
#free-delivery-message {
    font-weight: bold;
    margin-top: 5px;
}

/* Estilo para exibição da taxa */
#delivery-fee-display {
    background: var(--light-gray);
    padding: 10px;
    border-radius: 5px;
    margin: 10px 0;
}

#delivery-fee {
    font-weight: bold;
    color: var(--primary-color);
}

/* Estilos para as opções de entrega/retirada */
.delivery-options {
    display: flex;
    gap: 1rem;
    margin-top: 0.5rem;
}

.delivery-option {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

.delivery-option input {
    margin: 0;
}

.cart-summary {
    padding: 1rem 0;
    border-top: 1px solid var(--light-gray);
    margin-top: 1rem;
}

#subtotal, #delivery-total {
    font-size: 0.9rem;
    text-align: right;
    margin-bottom: 0.3rem;
    color: var(--text-secondary);
}

.cart-total {
    font-size: 1.2rem;
    font-weight: 700;
    text-align: right;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.checkout-btn {
    width: 100%;
    padding: 1rem;
    background: #25D366;
    color: white;
    border: none;
    border-radius: 5px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
}

.checkout-btn:hover {
    background: #128C7E;
    transform: translateY(-2px);
    box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
}

/* Notificação */
.notification {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background-color: #e63946;
    color: white;
    padding: 15px 25px;
    border-radius: 5px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 10000;
    display: flex;
    align-items: center;
    gap: 10px;
    opacity: 0;
    transition: all 0.3s ease;
}

.notification.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.notification i {
    font-size: 1.2rem;
}

.notification.success {
    background-color: #2a9d8f;
}

.notification.warning {
    background-color: #e9c46a;
    color: #333;
}

.notification.error {
    background-color: #e63946;
}

/* Responsividade */
@media (max-width: 768px) {
    .category-items {
        grid-template-columns: 1fr;
    }
    
    .logo h1 {
        font-size: 1.2rem;
    }
    
    .modal-content {
        margin: 1rem auto;
        width: 98%;
    }
    
    .promo-banner {
        font-size: 0.85rem;
        padding: 10px 5px;
    }
    
    .promo-banner p {
        flex-direction: column;
        gap: 4px;
    }
}

/* Animações */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal {
    animation: fadeIn 0.3s ease;
}

/* Efeito de loading para imagens */
.item-image {
    position: relative;
    background: var(--light-gray);
}

.item-image::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.item-image.loaded::before {
    display: none;
}

/* Estilos para o modal de ingredientes */
.ingredients-list {
    max-height: 300px;
    overflow-y: auto;
    margin-bottom: 15px;
}

.ingredient-item {
    padding: 10px;
    background: var(--light-gray);
    margin-bottom: 8px;
    border-radius: 5px;
    transition: all 0.3s ease;
}

.ingredient-item:hover {
    background: var(--gray-color);
}

.ingredient-item label {
    display: flex;
    align-items: center;
    cursor: pointer;
    gap: 10px;
}

.ingredient-item input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--primary-color);
}

/* Estilo para itens com ingredientes removidos */
.cart-item small {
    display: block;
    font-size: 0.8rem;
    color: #ff6b6b;
    margin-top: 3px;
}

.error-message {
    color: #ff6b6b;
    text-align: center;
    padding: 2rem;
    font-weight: 500;
}

/* Estilos para mensagem de estabelecimento fechado */
#closed-modal .modal-content {
    background: var(--dark-color);
    border: 2px solid var(--primary-color);
}

#closed-modal .modal-header {
    background: var(--primary-color);
    text-align: center;
}

#closed-modal .modal-body {
    padding: 2rem;
    text-align: center;
}

#closed-modal .modal-body p {
    margin-bottom: 0.8rem;
    font-size: 1.1rem;
}

#closed-modal .modal-body strong {
    color: var(--primary-color);
}

/* Mensagem de troco */
#change-message {
    color: #2a9d8f;
    font-weight: bold;
    margin-top: 10px;
    font-size: 0.9rem;
}

/* Desabilitar interação quando fechado */
body.closed .add-btn,
body.closed #search,
body.closed .cart-icon {
    pointer-events: none;
    opacity: 0.5;
}

body.closed::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 999;
    pointer-events: none;
}

/* Estilos para o modal de adicionar ingredientes */
#add-ingredients-modal .modal-content {
    background: var(--dark-color);
    border: 1px solid var(--primary-color);
}

#add-ingredients-modal .modal-header {
    background: var(--primary-color);
}

#add-ingredients-modal .modal-body {
    padding: 1.5rem;
}

#add-ingredients-modal h3 {
    font-size: 1.2rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
    text-align: center;
}

/* Botões de ação */
.form-actions {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 1.5rem;
}

.cancel-btn {
    background: var(--light-gray);
    color: var(--text-color);
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
    flex: 1;
}

.cancel-btn:hover {
    background: var(--gray-color);
}

#confirm-add-btn {
    flex: 1;
    background: #25D366;
}

#confirm-add-btn:hover {
    background: #128C7E;
}

/* Checkbox personalizado */
.ingredient-item input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin-right: 10px;
    accent-color: var(--primary-color);
}

.ingredient-item label {
    display: flex;
    align-items: center;
    cursor: pointer;
    padding: 10px;
    border-radius: 5px;
    transition: all 0.3s ease;
}

.ingredient-item label:hover {
    background: var(--light-gray);
}

/* Footer Styles */
.main-footer {
    background: var(--dark-color);
    padding: 2rem 1rem 1rem;
    margin-top: 2rem;
    border-top: 1px solid var(--light-gray);
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.footer-section h3 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    font-size: 1.5rem;
}

.footer-section h4 {
    color: var(--text-color);
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.footer-section p {
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: var(--gray-color);
    color: var(--text-color);
    border-radius: 50%;
    transition: all 0.3s ease;
}

.social-links a:hover {
    background: var(--primary-color);
    transform: translateY(-3px);
}

.footer-bottom {
    text-align: center;
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid var(--light-gray);
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Responsividade do Footer */
@media (max-width: 768px) {
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .footer-section p {
        justify-content: center;
    }
    
    .social-links {
        justify-content: center;
    }
}