:root {
    --primary-color: #ffbf00;
    --bg-color: #121212;
    --card-bg: #1e1e1e;
    --text-color: #e0e0e0;
    --price-color: #ffbf00;
    --border-color: #2e2e2e;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
}

/* ============================================================
   HEADER
   ============================================================ */
header {
    background-color: #000;
    padding: 40px 20px;
    text-align: center;
    border-bottom: 3px solid var(--primary-color);
}

.logo-placeholder {
    width: 120px;
    height: 120px;
    background-color: var(--primary-color);
    color: #000;
    font-size: 3.5rem;
    font-weight: 900;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    margin-bottom: 15px;
    border: 4px solid #fff;
    box-shadow: 0 4px 15px rgba(255, 191, 0, 0.4);
}

h1 {
    color: var(--primary-color);
    font-size: 2.5rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 10px;
}

/* ============================================================
   BADGE DE STATUS (ABERTO / FECHADO)
   ============================================================ */
.status-badge {
    display: inline-block;
    padding: 5px 16px;
    border-radius: 20px;
    font-size: 0.82rem;
    font-weight: bold;
    margin-top: 12px;
    letter-spacing: 0.3px;
}

.status-open {
    background-color: rgba(34, 197, 94, 0.12);
    color: #22c55e;
    border: 1px solid rgba(34, 197, 94, 0.35);
}

.status-closed {
    background-color: rgba(239, 68, 68, 0.12);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.35);
}

/* ============================================================
   CONTAINER
   ============================================================ */
.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px;
}

/* ============================================================
   BARRA DE BUSCA
   ============================================================ */
.search-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

.search-icon {
    position: absolute;
    left: 14px;
    color: #666;
    font-size: 0.9rem;
    pointer-events: none;
}

.search-input {
    width: 100%;
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    color: var(--text-color);
    padding: 12px 40px 12px 40px;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.2s;
    outline: none;
}

.search-input:focus {
    border-color: var(--primary-color);
}

.search-input::placeholder {
    color: #555;
}

.search-clear {
    position: absolute;
    right: 10px;
    background: none;
    border: none;
    color: #666;
    font-size: 1.4rem;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    transition: background 0.2s, color 0.2s;
    line-height: 1;
}

.search-clear:hover {
    background: #333;
    color: #fff;
}

/* Sem resultados */
.no-results {
    text-align: center;
    padding: 60px 20px;
    color: #555;
}

.no-results i {
    font-size: 2.5rem;
    margin-bottom: 15px;
    display: block;
}

.no-results p {
    font-size: 1.1rem;
}

/* ============================================================
   NAVEGAÇÃO STICKY
   ============================================================ */
.sticky-nav {
    position: sticky;
    top: 0;
    background-color: var(--bg-color);
    padding: 12px 0;
    z-index: 100;
    display: flex;
    gap: 8px;
    overflow-x: auto;
    white-space: nowrap;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 20px;
}

.sticky-nav::-webkit-scrollbar { display: none; }

.nav-btn {
    background: #2a2a2a;
    color: #ccc;
    border: 1px solid transparent;
    padding: 7px 16px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.88rem;
    transition: all 0.2s;
    flex-shrink: 0;
}

.nav-btn:hover {
    background-color: #333;
    color: #fff;
}

.nav-btn.active {
    background-color: var(--primary-color);
    color: #000;
    font-weight: bold;
    border-color: var(--primary-color);
}

/* ============================================================
   GRADE E CARDS DO MENU
   ============================================================ */
.category-section {
    margin-bottom: 50px;
    scroll-margin-top: 60px;
}

.category-title {
    font-size: 1.8rem;
    border-left: 5px solid var(--primary-color);
    padding-left: 15px;
    margin-bottom: 20px;
    color: #fff;
    text-transform: uppercase;
}

.menu-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.menu-item {
    background-color: var(--card-bg);
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.3);
    transition: transform 0.2s, border-color 0.2s;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    border: 1px solid transparent;
    position: relative;
}

.menu-item:hover {
    transform: translateY(-4px);
    border-color: var(--primary-color);
}

.item-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 10px;
}

.item-name {
    font-size: 1.1rem;
    font-weight: bold;
    color: #fff;
}

.item-price {
    color: var(--price-color);
    font-weight: bold;
    font-size: 1.05rem;
    white-space: nowrap;
    margin-left: 10px;
}

.item-desc {
    font-size: 0.88rem;
    color: #999;
    font-style: italic;
    margin-bottom: 12px;
    flex-grow: 1;
}

/* Badge de destaque */
.featured-badge {
    display: inline-block;
    background: linear-gradient(135deg, var(--primary-color), #ff8c00);
    color: #000;
    font-size: 0.72rem;
    font-weight: bold;
    padding: 3px 10px;
    border-radius: 20px;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Botão Adicionar ao Carrinho */
.add-to-cart-btn {
    background-color: var(--primary-color);
    color: #000;
    border: none;
    padding: 10px;
    width: 100%;
    border-radius: 6px;
    font-weight: bold;
    cursor: pointer;
    margin-top: 14px;
    transition: background-color 0.2s, transform 0.1s;
    font-size: 0.95rem;
}

.add-to-cart-btn:hover {
    background-color: #e6ac00;
}

.add-to-cart-btn:active {
    transform: scale(0.98);
}

.add-to-cart-btn.added {
    background-color: #22c55e;
    color: #fff;
}

/* ============================================================
   FOOTER
   ============================================================ */
footer {
    text-align: center;
    padding: 40px;
    background-color: #000;
    color: #666;
    margin-top: 40px;
    font-size: 0.9rem;
}

footer p {
    margin-bottom: 10px;
}

.social-media {
    margin-bottom: 30px;
}

.social-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888);
    color: #fff;
    padding: 12px 25px;
    border-radius: 30px;
    text-decoration: none;
    font-weight: bold;
    font-size: 1rem;
    transition: transform 0.3s;
    margin-top: 5px;
}

.social-btn:hover {
    transform: scale(1.05);
    color: #fff;
}

.highlight-hours {
    background-color: #1a1a1a;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid var(--primary-color);
    display: inline-block;
    margin-bottom: 20px;
    min-width: 280px;
}

.highlight-hours p {
    color: #fff;
    margin: 0;
}

.hours-text {
    font-size: 1.3rem;
    font-weight: bold;
    color: var(--primary-color);
    margin-top: 5px !important;
    line-height: 1.3;
}

.admin-link {
    display: inline-block;
    margin-top: 20px;
    color: #333;
    font-size: 0.8rem;
    text-decoration: none;
    transition: color 0.2s;
}

.admin-link:hover {
    color: #555;
}

/* ============================================================
   BARRA DE CARRINHO FLUTUANTE
   ============================================================ */
.cart-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: #d32f2f;
    color: white;
    padding: 14px 20px;
    display: none;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.4);
}

.cart-bar-info {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: bold;
}

.cart-bar button {
    background-color: white;
    color: #d32f2f;
    border: none;
    padding: 8px 18px;
    border-radius: 4px;
    font-weight: bold;
    cursor: pointer;
    font-size: 0.9rem;
    transition: opacity 0.2s;
}

.cart-bar button:hover {
    opacity: 0.9;
}

@keyframes cartPulse {
    0%   { transform: scale(1); }
    30%  { transform: scale(1.02); }
    60%  { transform: scale(0.99); }
    100% { transform: scale(1); }
}

.cart-bar.pulse {
    animation: cartPulse 0.35s ease;
}

/* ============================================================
   MODAL DO CARRINHO
   ============================================================ */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    padding: 20px;
}

.modal-content {
    background-color: var(--card-bg);
    width: 100%;
    max-width: 500px;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    max-height: 90vh;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
    padding: 18px 20px;
    flex-shrink: 0;
}

.modal-header h2 {
    font-size: 1.2rem;
    color: #fff;
}

.close-modal-btn {
    background: none;
    border: none;
    color: #aaa;
    font-size: 1.8rem;
    cursor: pointer;
    line-height: 1;
    transition: color 0.2s;
}

.close-modal-btn:hover {
    color: #fff;
}

.modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 15px 20px;
}

/* Item no carrinho */
.cart-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-color);
}

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

.cart-item-info strong {
    color: #fff;
    font-size: 0.95rem;
}

.cart-item-price {
    color: var(--primary-color);
    font-size: 0.9rem;
    font-weight: bold;
}

/* Controles de quantidade */
.qty-controls {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.qty-btn {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 1px solid #444;
    background: #2a2a2a;
    color: #fff;
    font-size: 1.1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, border-color 0.2s;
    line-height: 1;
}

.qty-btn:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: #000;
}

.qty-display {
    font-weight: bold;
    font-size: 1rem;
    color: #fff;
    min-width: 20px;
    text-align: center;
}

.cart-empty {
    text-align: center;
    color: #555;
    padding: 30px 0;
    font-size: 0.95rem;
}

/* Tipo de pedido (entrega / retirada) */
.order-type-wrapper {
    padding: 12px 20px;
    border-top: 1px solid var(--border-color);
    flex-shrink: 0;
}

.order-type-label {
    display: block;
    font-size: 0.85rem;
    color: #999;
    margin-bottom: 10px;
}

.order-type-options {
    display: flex;
    gap: 10px;
}

.order-type-option {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    background: #2a2a2a;
    border: 1px solid #444;
    padding: 9px 16px;
    border-radius: 8px;
    font-size: 0.88rem;
    color: #ccc;
    transition: all 0.2s;
    flex: 1;
    user-select: none;
}

.order-type-option:has(input:checked) {
    background: rgba(255, 191, 0, 0.1);
    border-color: var(--primary-color);
    color: var(--primary-color);
    font-weight: bold;
}

.order-type-option input[type="radio"] {
    display: none;
}

/* Observações do pedido */
.order-notes-wrapper {
    padding: 12px 20px;
    border-top: 1px solid var(--border-color);
    flex-shrink: 0;
}

.order-notes-wrapper label {
    display: block;
    font-size: 0.85rem;
    color: #999;
    margin-bottom: 8px;
}

#order-notes {
    width: 100%;
    background: #161616;
    border: 1px solid var(--border-color);
    color: var(--text-color);
    border-radius: 6px;
    padding: 10px;
    font-size: 0.9rem;
    resize: none;
    outline: none;
    transition: border-color 0.2s;
    font-family: inherit;
}

#order-notes:focus {
    border-color: var(--primary-color);
}

#order-notes::placeholder {
    color: #444;
}

.modal-footer {
    padding: 15px 20px;
    border-top: 1px solid var(--border-color);
    flex-shrink: 0;
}

.modal-total {
    font-size: 1rem;
    color: #ccc;
    margin-bottom: 12px;
    text-align: right;
}

.modal-total span {
    color: var(--primary-color);
    font-weight: bold;
    font-size: 1.2rem;
}

.finalize-btn {
    background-color: #25d366;
    color: white;
    border: none;
    padding: 14px;
    width: 100%;
    border-radius: 8px;
    font-weight: bold;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.2s, transform 0.1s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.finalize-btn:hover {
    background-color: #1ebe5b;
}

.finalize-btn:active {
    transform: scale(0.99);
}

/* ============================================================
   BOTÃO FLUTUANTE WHATSAPP
   ============================================================ */
.whatsapp-btn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: #25d366;
    color: white;
    padding: 13px 22px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: bold;
    box-shadow: 0 4px 12px rgba(0,0,0,0.5);
    z-index: 1001;
    transition: transform 0.3s, bottom 0.3s;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.95rem;
}

.whatsapp-btn:hover {
    transform: scale(1.05);
    color: #fff;
}

body.cart-active .whatsapp-btn {
    bottom: 72px;
}

/* ============================================================
   MAPA
   ============================================================ */
.map-section {
    margin-top: 20px;
}

.map-section iframe {
    border-radius: 10px;
    display: block;
}

/* ============================================================
   RESPONSIVO
   ============================================================ */
@media (max-width: 600px) {
    h1 { font-size: 1.8rem; }
    .menu-grid { grid-template-columns: 1fr; }
    .modal-content { max-height: 95vh; }
}

/* ============================================================
   IMPRESSÃO (CUPOM TÉRMICO)
   ============================================================ */
@media print {
    body > * { display: none !important; }

    #printable-receipt {
        display: block !important;
        width: 100%;
        max-width: 80mm;
        font-family: 'Courier New', Courier, monospace;
        color: #000;
        background: #fff;
        padding: 0;
        margin: 0;
    }

    #printable-receipt .receipt-header,
    #printable-receipt .receipt-footer { text-align: center; }

    @page { margin: 0; size: auto; }
}
