/* Burger Demo - delivery */
:root {
    --primary: #d62828;
    --primary-dark: #a51d1d;
    --secondary: #1d1d1d;
    --bg: #fafafa;
    --surface: #ffffff;
    --text: #1a1a1a;
    --text-soft: #666;
    --border: #e5e5e5;
    --success: #16a34a;
    --shadow-sm: 0 1px 2px rgba(0,0,0,.06), 0 1px 4px rgba(0,0,0,.04);
    --shadow-md: 0 4px 12px rgba(0,0,0,.08), 0 2px 4px rgba(0,0,0,.06);
    --shadow-lg: 0 24px 60px rgba(0,0,0,.12), 0 8px 24px rgba(0,0,0,.08);
    --radius: 14px;
    --radius-sm: 8px;
}

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

html { scroll-behavior: smooth; }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    padding-bottom: 100px;
}

button, input, select, textarea {
    font-family: inherit;
    font-size: inherit;
}

button { cursor: pointer; border: none; background: none; color: inherit; }

a { color: inherit; text-decoration: none; }

img { display: block; max-width: 100%; }

/* HEADER */
.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: var(--secondary);
    color: #fff;
    box-shadow: var(--shadow-md);
}

.header-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 14px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.brand-logo {
    width: 44px; height: 44px;
    border-radius: 50%;
    background: var(--primary);
    display: grid; place-items: center;
    font-weight: 800; font-size: 20px;
    flex-shrink: 0;
}

.brand h1 {
    font-size: 18px;
    font-weight: 800;
    letter-spacing: -.01em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.brand p {
    font-size: 12px;
    color: #ccc;
    margin-top: 2px;
}

.shop-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 99px;
    font-size: 11px;
    font-weight: 600;
    background: rgba(255,255,255,.1);
    margin-top: 4px;
}

.shop-status.open { background: rgba(22,163,74,.2); color: #4ade80; }
.shop-status.closed { background: rgba(220,38,38,.2); color: #fca5a5; }

.shop-status::before {
    content: '';
    width: 6px; height: 6px;
    border-radius: 50%;
    background: currentColor;
}

.cart-button {
    position: relative;
    background: var(--primary);
    color: #fff;
    padding: 10px 18px;
    border-radius: 99px;
    font-weight: 700;
    font-size: 14px;
    display: inline-flex; align-items: center; gap: 8px;
    transition: transform .15s, background .2s;
}

.cart-button:hover { background: var(--primary-dark); transform: translateY(-1px); }

.cart-button .badge {
    position: absolute;
    top: -6px; right: -6px;
    background: #fff;
    color: var(--primary);
    width: 22px; height: 22px;
    border-radius: 50%;
    font-size: 11px;
    font-weight: 800;
    display: grid; place-items: center;
    box-shadow: var(--shadow-sm);
}

/* HERO */
.hero {
    background: linear-gradient(135deg, var(--primary) 0%, #8b0000 100%);
    color: #fff;
    padding: 40px 20px 30px;
    text-align: center;
}

.hero h2 {
    font-size: clamp(28px, 5vw, 44px);
    font-weight: 800;
    letter-spacing: -.02em;
    line-height: 1.1;
    margin-bottom: 12px;
}

.hero p {
    font-size: 16px;
    opacity: .92;
    max-width: 600px;
    margin: 0 auto;
}

.hero-info {
    display: flex;
    justify-content: center;
    gap: 24px;
    flex-wrap: wrap;
    margin-top: 20px;
    font-size: 13px;
    opacity: .9;
}

.hero-info span { display: inline-flex; gap: 6px; align-items: center; }

/* CATEGORIAS (filtro horizontal) */
.cat-filter {
    position: sticky;
    top: 70px;
    z-index: 40;
    background: var(--bg);
    padding: 14px 0 10px;
    border-bottom: 1px solid var(--border);
}

.cat-filter-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    gap: 8px;
    overflow-x: auto;
    scrollbar-width: none;
}

.cat-filter-inner::-webkit-scrollbar { display: none; }

.cat-chip {
    padding: 8px 16px;
    border-radius: 99px;
    background: var(--surface);
    border: 1px solid var(--border);
    font-weight: 600;
    font-size: 14px;
    white-space: nowrap;
    transition: all .15s;
    color: var(--text-soft);
}

.cat-chip:hover { border-color: var(--primary); color: var(--primary); }
.cat-chip.active { background: var(--secondary); color: #fff; border-color: var(--secondary); }

/* CARDÁPIO */
.menu {
    max-width: 1200px;
    margin: 0 auto;
    padding: 24px 20px 60px;
}

.cat-section {
    margin-bottom: 40px;
    scroll-margin-top: 130px;
}

.cat-title {
    font-size: 22px;
    font-weight: 800;
    margin-bottom: 16px;
    letter-spacing: -.01em;
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.cat-title::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border);
    margin-left: 4px;
}

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

.product-card {
    background: var(--surface);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: transform .15s, box-shadow .2s;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    border: 1px solid transparent;
}

.product-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: var(--border);
}

.product-img {
    aspect-ratio: 16/10;
    background: #f0f0f0 center/cover no-repeat;
    position: relative;
}

.product-badge {
    position: absolute;
    top: 10px; left: 10px;
    background: var(--primary);
    color: #fff;
    padding: 4px 10px;
    border-radius: 99px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .03em;
}

.product-body {
    padding: 16px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.product-name {
    font-weight: 700;
    font-size: 16px;
    margin-bottom: 6px;
    letter-spacing: -.01em;
}

.product-desc {
    color: var(--text-soft);
    font-size: 13px;
    line-height: 1.45;
    margin-bottom: 12px;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: auto;
}

.product-price {
    font-weight: 800;
    font-size: 18px;
    color: var(--text);
}

.btn-add {
    background: var(--secondary);
    color: #fff;
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 13px;
    transition: background .15s;
}

.btn-add:hover { background: var(--primary); }

/* DRAWER CARRINHO */
.cart-drawer {
    position: fixed;
    top: 0; right: 0;
    width: min(420px, 100%);
    height: 100%;
    background: var(--surface);
    box-shadow: var(--shadow-lg);
    z-index: 100;
    transform: translateX(100%);
    transition: transform .3s ease;
    display: flex;
    flex-direction: column;
}

.cart-drawer.open { transform: translateX(0); }

.cart-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.5);
    z-index: 99;
    opacity: 0;
    pointer-events: none;
    transition: opacity .3s;
}

.cart-overlay.open { opacity: 1; pointer-events: auto; }

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

.cart-header h3 { font-size: 18px; font-weight: 700; }

.cart-close {
    width: 36px; height: 36px;
    border-radius: 50%;
    background: #f3f3f3;
    display: grid; place-items: center;
    font-size: 20px;
}

.cart-items {
    flex: 1;
    overflow-y: auto;
    padding: 16px 20px;
}

.cart-empty {
    text-align: center;
    color: var(--text-soft);
    padding: 60px 20px;
}

.cart-empty-icon { font-size: 48px; margin-bottom: 12px; opacity: .4; }

.cart-item {
    display: flex;
    gap: 12px;
    padding: 14px 0;
    border-bottom: 1px solid var(--border);
}

.cart-item-img {
    width: 64px; height: 64px;
    border-radius: var(--radius-sm);
    background: #f0f0f0 center/cover;
    flex-shrink: 0;
}

.cart-item-body { flex: 1; min-width: 0; }
.cart-item-name { font-weight: 600; font-size: 14px; }
.cart-item-extras { font-size: 12px; color: var(--text-soft); margin-top: 2px; }
.cart-item-obs { font-size: 12px; color: var(--text-soft); font-style: italic; margin-top: 2px; }

.cart-item-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 8px;
}

.qty-controls {
    display: flex;
    align-items: center;
    gap: 4px;
    background: #f3f3f3;
    border-radius: 99px;
    padding: 2px;
}

.qty-btn {
    width: 28px; height: 28px;
    border-radius: 50%;
    background: #fff;
    font-weight: 700;
    display: grid; place-items: center;
    font-size: 14px;
}

.qty-val { min-width: 28px; text-align: center; font-weight: 600; font-size: 14px; }

.cart-item-price { font-weight: 700; font-size: 14px; }

.cart-remove {
    color: var(--text-soft);
    font-size: 11px;
    margin-top: 4px;
    background: none;
}

.cart-remove:hover { color: var(--primary); }

.cart-footer {
    padding: 16px 20px 20px;
    border-top: 1px solid var(--border);
    background: var(--surface);
}

.cart-total {
    display: flex;
    justify-content: space-between;
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 12px;
}

.btn-primary {
    width: 100%;
    background: var(--primary);
    color: #fff;
    padding: 14px;
    border-radius: var(--radius-sm);
    font-weight: 700;
    font-size: 15px;
    transition: background .15s;
}

.btn-primary:hover { background: var(--primary-dark); }
.btn-primary:disabled { opacity: .5; cursor: not-allowed; }

.btn-secondary {
    background: #f3f3f3;
    color: var(--text);
    padding: 14px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 14px;
}

.btn-secondary:hover { background: #e7e7e7; }

/* MODAL PRODUTO */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.6);
    z-index: 200;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.modal-overlay.open { display: flex; }

.modal {
    background: var(--surface);
    border-radius: var(--radius);
    max-width: 480px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
}

.modal-img {
    aspect-ratio: 16/10;
    background: #f0f0f0 center/cover;
    border-radius: var(--radius) var(--radius) 0 0;
    position: relative;
}

.modal-close {
    position: absolute;
    top: 12px; right: 12px;
    width: 36px; height: 36px;
    border-radius: 50%;
    background: rgba(0,0,0,.6);
    color: #fff;
    display: grid; place-items: center;
    font-size: 18px;
    backdrop-filter: blur(4px);
}

.modal-body { padding: 20px; }

.modal-body h3 {
    font-size: 22px;
    font-weight: 800;
    margin-bottom: 6px;
    letter-spacing: -.01em;
}

.modal-desc { color: var(--text-soft); margin-bottom: 16px; font-size: 14px; line-height: 1.5; }
.modal-price { font-size: 22px; font-weight: 800; color: var(--primary); margin-bottom: 16px; }

.adicionais-group { margin-bottom: 16px; }
.adicionais-group h4 { font-size: 14px; font-weight: 700; margin-bottom: 8px; }

.adicional-row {
    display: flex;
    align-items: center;
    padding: 10px 12px;
    background: #f8f8f8;
    border-radius: var(--radius-sm);
    margin-bottom: 6px;
    cursor: pointer;
    transition: background .15s;
}

.adicional-row:hover { background: #f0f0f0; }
.adicional-row input { margin-right: 10px; }
.adicional-row span { flex: 1; font-size: 14px; }
.adicional-row .preco { font-weight: 600; font-size: 13px; color: var(--text-soft); }

.obs-input {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    margin-bottom: 16px;
    font-size: 14px;
    resize: vertical;
    min-height: 60px;
}

.obs-input:focus { outline: none; border-color: var(--primary); }

.modal-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.modal-actions .qty-controls { background: #f3f3f3; }
.modal-actions .qty-btn { background: #fff; }

.btn-add-modal {
    flex: 1;
    background: var(--primary);
    color: #fff;
    padding: 14px;
    border-radius: var(--radius-sm);
    font-weight: 700;
    transition: background .15s;
}

.btn-add-modal:hover { background: var(--primary-dark); }

/* MOBILE FIXED CART BAR */
.mobile-cart-bar {
    display: none;
    position: fixed;
    bottom: 14px;
    left: 14px; right: 14px;
    background: var(--primary);
    color: #fff;
    padding: 14px 18px;
    border-radius: 99px;
    box-shadow: var(--shadow-lg);
    z-index: 30;
    align-items: center;
    justify-content: space-between;
    font-weight: 700;
    cursor: pointer;
}

.mobile-cart-bar.show { display: flex; animation: slideUp .25s ease; }

@keyframes slideUp {
    from { transform: translateY(100px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

/* CHECKOUT */
.checkout {
    max-width: 720px;
    margin: 30px auto;
    padding: 0 20px;
}

.checkout-step {
    background: var(--surface);
    border-radius: var(--radius);
    padding: 24px;
    margin-bottom: 16px;
    box-shadow: var(--shadow-sm);
}

.checkout-step h2 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.step-num {
    width: 28px; height: 28px;
    border-radius: 50%;
    background: var(--primary);
    color: #fff;
    display: grid; place-items: center;
    font-size: 14px;
    font-weight: 800;
}

.form-row { margin-bottom: 14px; }
.form-row.two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-row label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; color: var(--text); }

.form-row input,
.form-row select,
.form-row textarea {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 14px;
    background: var(--surface);
    transition: border-color .15s;
}

.form-row input:focus,
.form-row select:focus,
.form-row textarea:focus { outline: none; border-color: var(--primary); }

.tipo-toggle, .pagamento-toggle {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-bottom: 16px;
}

.toggle-opt {
    padding: 14px;
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    text-align: center;
    cursor: pointer;
    transition: all .15s;
    background: var(--surface);
    font-weight: 600;
    font-size: 14px;
}

.toggle-opt:hover { border-color: var(--primary); }
.toggle-opt.active { border-color: var(--primary); background: rgba(214,40,40,.05); color: var(--primary); }

.pagamento-toggle { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }

.resumo-pedido {
    background: var(--surface);
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow-sm);
    margin-bottom: 16px;
}

.resumo-pedido h3 { font-size: 15px; font-weight: 700; margin-bottom: 12px; }

.resumo-item {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    padding: 6px 0;
    color: var(--text-soft);
}

.resumo-item.total {
    font-size: 16px;
    font-weight: 700;
    color: var(--text);
    border-top: 1px dashed var(--border);
    padding-top: 10px;
    margin-top: 8px;
}

/* ACOMPANHAMENTO */
.tracking {
    max-width: 600px;
    margin: 30px auto;
    padding: 0 20px;
}

.tracking-card {
    background: var(--surface);
    border-radius: var(--radius);
    padding: 28px;
    box-shadow: var(--shadow-sm);
    text-align: center;
}

.tracking-num {
    font-size: 13px;
    color: var(--text-soft);
    margin-bottom: 8px;
}

.tracking-status-big {
    font-size: 28px;
    font-weight: 800;
    margin-bottom: 20px;
    letter-spacing: -.01em;
}

.timeline {
    position: relative;
    padding-left: 32px;
    text-align: left;
    margin: 24px 0;
}

.timeline::before {
    content: '';
    position: absolute;
    top: 0; bottom: 0;
    left: 11px;
    width: 2px;
    background: var(--border);
}

.timeline-step {
    position: relative;
    padding: 10px 0;
}

.timeline-step::before {
    content: '';
    position: absolute;
    left: -28px;
    top: 14px;
    width: 22px; height: 22px;
    border-radius: 50%;
    background: #f3f3f3;
    border: 2px solid var(--border);
    box-shadow: 0 0 0 4px var(--surface);
}

.timeline-step.done::before {
    background: var(--success);
    border-color: var(--success);
}

.timeline-step.current::before {
    background: var(--primary);
    border-color: var(--primary);
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0%, 100% { box-shadow: 0 0 0 4px var(--surface), 0 0 0 0 rgba(214,40,40,.4); }
    50% { box-shadow: 0 0 0 4px var(--surface), 0 0 0 8px rgba(214,40,40,0); }
}

.timeline-step .label { font-weight: 600; font-size: 14px; }
.timeline-step .time { font-size: 12px; color: var(--text-soft); margin-top: 2px; }

.pix-area {
    background: #f8f8f8;
    border-radius: var(--radius);
    padding: 24px;
    text-align: center;
    margin: 16px 0;
}

.pix-area img { max-width: 240px; margin: 0 auto 16px; }
.pix-copia-cola {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 10px;
    font-family: ui-monospace, monospace;
    font-size: 11px;
    word-break: break-all;
    margin-bottom: 12px;
    max-height: 80px;
    overflow-y: auto;
}

@media (max-width: 640px) {
    .header-inner { padding: 12px 16px; }
    .brand h1 { font-size: 15px; }
    .brand p { display: none; }
    .cart-button span:not(.badge) { display: none; }
    .cart-button { padding: 10px 14px; }
    .cat-filter { top: 64px; }
    .hero { padding: 30px 16px 24px; }
    .menu { padding: 20px 16px 60px; }
    .product-grid { grid-template-columns: 1fr; }
    .checkout { padding: 0 16px; margin: 16px auto; }
    .checkout-step { padding: 18px; }
    .form-row.two { grid-template-columns: 1fr; }
}

/* TOAST */
.toast {
    position: fixed;
    bottom: 90px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: var(--secondary);
    color: #fff;
    padding: 12px 20px;
    border-radius: 99px;
    font-size: 14px;
    font-weight: 600;
    z-index: 300;
    opacity: 0;
    pointer-events: none;
    transition: all .3s;
    box-shadow: var(--shadow-lg);
}

.toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}
