/* ==========================================================
   EntregaAí - Portal do cliente (mobile first)
   A cor principal de cada empresa vem de --primary-color
   ========================================================== */
:root {
    --primary-color: #e63946;
    --primary-soft: color-mix(in srgb, var(--primary-color) 10%, #fff);
    --primary-dark: color-mix(in srgb, var(--primary-color) 78%, #000);
    --primary-glow: color-mix(in srgb, var(--primary-color) 35%, transparent);
    --bg: #f5f6f8;
    --surface: #ffffff;
    --text: #1c1c1e;
    --muted: #6b7280;
    --border: #eceef1;
    --radius: 18px;
    --radius-sm: 12px;
    --shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 4px 14px rgba(16, 24, 40, .06);
    --header-h: 64px;
    --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* { -webkit-tap-highlight-color: transparent; }

html { scroll-behavior: smooth; }

body {
    background: var(--bg);
    color: var(--text);
    font-family: 'Poppins', 'Segoe UI', system-ui, sans-serif;
    padding-bottom: calc(150px + var(--safe-bottom));
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

body.no-nav { padding-bottom: 40px; }

button { touch-action: manipulation; }

.min-w-0 { min-width: 0; }

.container { max-width: 1140px; }

/* ---------- Header ---------- */
.app-header {
    position: sticky;
    top: 0;
    z-index: 1020;
    height: var(--header-h);
    background: rgba(255, 255, 255, .92);
    backdrop-filter: saturate(180%) blur(12px);
    -webkit-backdrop-filter: saturate(180%) blur(12px);
    border-bottom: 1px solid var(--border);
}

.app-header .container {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    text-decoration: none;
    color: var(--text);
}

.brand img {
    width: 42px;
    height: 42px;
    object-fit: contain;
    border-radius: 12px;
    background: var(--primary-soft);
    padding: 4px;
    flex-shrink: 0;
}

.brand-text { min-width: 0; }

.brand-name {
    display: block;
    font-weight: 700;
    font-size: 1.05rem;
    letter-spacing: -.3px;
    color: var(--primary-color);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.15;
}

.brand-sub {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: .72rem;
    color: var(--muted);
}

.dot-online {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #22c55e;
    box-shadow: 0 0 0 3px rgba(34, 197, 94, .18);
}

.header-actions { display: flex; gap: 6px; flex-shrink: 0; }

.icon-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: #f1f2f4;
    color: var(--text);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.05rem;
    transition: background .2s, transform .1s;
    flex-shrink: 0;
    text-decoration: none;
}

.icon-btn:hover { background: #e6e8eb; color: var(--text); }
.icon-btn:active { transform: scale(.92); }

.app-header .dropdown-menu {
    border: none;
    border-radius: var(--radius);
    box-shadow: 0 10px 30px rgba(0, 0, 0, .12);
    width: min(280px, calc(100vw - 32px));
}

/* ---------- Hero ---------- */
.hero {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius);
    padding: 20px;
    color: #fff;
    background:
        radial-gradient(circle at 100% 0%, rgba(255, 255, 255, .22) 0, transparent 45%),
        linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    box-shadow: 0 10px 24px var(--primary-glow);
}

.hero h1 {
    font-size: 1.35rem;
    font-weight: 700;
    margin: 0 0 4px;
    letter-spacing: -.4px;
    position: relative;
    z-index: 1;
    max-width: 75%;
}

.hero p {
    margin: 0;
    opacity: .92;
    font-size: .88rem;
    position: relative;
    z-index: 1;
    max-width: 75%;
}

.hero-emoji {
    position: absolute;
    right: 12px;
    bottom: -6px;
    font-size: 4.2rem;
    transform: rotate(-12deg);
    pointer-events: none;
    filter: drop-shadow(0 6px 10px rgba(0, 0, 0, .2));
}

.hero-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 12px;
    position: relative;
    z-index: 1;
}

.hero-tag {
    background: rgba(255, 255, 255, .2);
    border-radius: 999px;
    padding: 4px 10px;
    font-size: .72rem;
    font-weight: 500;
}

/* ---------- Busca ---------- */
.search-box { position: relative; }

.search-box > i {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--muted);
    pointer-events: none;
}

.search-box input {
    width: 100%;
    border-radius: 999px;
    padding: 12px 44px;
    border: 1px solid var(--border);
    background: var(--surface);
    font-size: 16px; /* evita zoom no iOS */
    box-shadow: var(--shadow);
    transition: border-color .2s, box-shadow .2s;
}

.search-box input::-webkit-search-cancel-button { display: none; }

.search-box input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--primary-color) 15%, transparent);
}

.search-clear {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 50%;
    background: #f1f2f4;
    color: var(--muted);
    display: none;
    align-items: center;
    justify-content: center;
}

.search-box.has-value .search-clear { display: inline-flex; }

/* ---------- Categorias ---------- */
.cat-bar {
    position: sticky;
    top: var(--header-h);
    z-index: 1010;
    background: var(--bg);
    margin: 0 -12px;
    padding: 10px 12px;
}

.cat-bar.scrolled { box-shadow: 0 6px 12px -10px rgba(0, 0, 0, .25); }

.nav-categories {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    scrollbar-width: none;
    scroll-snap-type: x proximity;
    padding: 2px;
}

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

.btn-cat {
    flex-shrink: 0;
    scroll-snap-align: start;
    border-radius: 999px;
    padding: 9px 16px;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text);
    font-weight: 600;
    font-size: .88rem;
    white-space: nowrap;
    transition: background .2s, color .2s, border-color .2s, transform .1s;
}

.btn-cat:active { transform: scale(.95); }

.btn-cat.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: #fff;
    box-shadow: 0 4px 12px var(--primary-glow);
}

.section-title {
    font-weight: 700;
    font-size: 1.05rem;
    margin: 6px 0 12px;
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.section-title small { font-weight: 500; color: var(--muted); font-size: .8rem; }

/* ---------- Cards de produto ---------- */
.product-card {
    display: flex;
    gap: 14px;
    align-items: stretch;
    height: 100%;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 12px;
    box-shadow: var(--shadow);
    transition: transform .2s, box-shadow .2s, border-color .2s;
}

.product-card.in-cart { border-color: color-mix(in srgb, var(--primary-color) 45%, #fff); }

@media (hover: hover) {
    .product-card:hover {
        transform: translateY(-2px);
        box-shadow: 0 10px 24px rgba(16, 24, 40, .1);
    }
}

.product-img,
.product-ph {
    width: 92px;
    height: 92px;
    border-radius: var(--radius-sm);
    object-fit: cover;
    background: var(--primary-soft);
    flex-shrink: 0;
}

.product-ph {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.4rem;
}

.product-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.product-info h6 {
    font-weight: 600;
    font-size: .96rem;
    margin: 2px 0 4px;
    line-height: 1.3;
    word-break: break-word;
}

.product-desc {
    color: var(--muted);
    font-size: .8rem;
    line-height: 1.4;
    margin: 0 0 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-footer {
    margin-top: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    min-height: 38px;
}

.price-tag {
    color: var(--text);
    font-weight: 700;
    font-size: 1rem;
    white-space: nowrap;
}

.btn-add {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: none;
    background: var(--primary-color);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    box-shadow: 0 4px 10px var(--primary-glow);
    transition: transform .1s;
    flex-shrink: 0;
}

.btn-add:active { transform: scale(.9); }

.qty-control {
    display: inline-flex;
    align-items: center;
    background: var(--primary-soft);
    border-radius: 999px;
    padding: 3px;
    flex-shrink: 0;
}

.btn-qty {
    border: none;
    background: var(--surface);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    color: var(--primary-color);
    box-shadow: 0 1px 3px rgba(0, 0, 0, .1);
}

.btn-qty:active { transform: scale(.9); }

.qty-num {
    margin: 0 8px;
    font-weight: 700;
    min-width: 18px;
    text-align: center;
    color: var(--primary-color);
}

/* Card de destaque (Monte seu lanche) */
.card-custom-promo {
    background:
        radial-gradient(circle at 90% 20%, rgba(255, 255, 255, .25) 0, transparent 40%),
        linear-gradient(135deg, #ff9f1c, #ff6b35);
    color: #fff;
    border: none;
    cursor: pointer;
}

.card-custom-promo .product-desc { color: rgba(255, 255, 255, .92); }
.card-custom-promo .price-tag { color: #fff; font-size: .9rem; }
.card-custom-promo .btn-add { background: #fff; color: #ff6b35; box-shadow: none; }
.card-custom-promo .product-ph { background: rgba(255, 255, 255, .2); }

/* Estados vazios / carregando */
.empty-state {
    text-align: center;
    color: var(--muted);
    padding: 48px 16px;
}

.empty-state .emoji {
    font-size: 2.8rem;
    display: block;
    margin-bottom: 8px;
}

.skeleton {
    background: linear-gradient(90deg, #eceef1 25%, #f7f8fa 50%, #eceef1 75%);
    background-size: 200% 100%;
    animation: shimmer 1.2s infinite;
    border-radius: var(--radius);
    height: 118px;
}

@keyframes shimmer { to { background-position: -200% 0; } }

.fade-in { animation: fadeIn .25s ease-out both; }

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: none; }
}

/* ---------- Barra "Ver carrinho" ---------- */
#cart-bar {
    position: fixed;
    left: 12px;
    right: 12px;
    bottom: calc(76px + var(--safe-bottom));
    z-index: 1030;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 13px 16px;
    border: none;
    border-radius: 16px;
    background: var(--primary-color);
    color: #fff;
    font-weight: 600;
    box-shadow: 0 10px 25px var(--primary-glow);
    transform: translateY(150%);
    opacity: 0;
    pointer-events: none;
    transition: transform .3s cubic-bezier(.2, .9, .3, 1.2), opacity .2s;
}

#cart-bar.show {
    transform: none;
    opacity: 1;
    pointer-events: auto;
}

#cart-bar .cart-bar-count {
    background: rgba(255, 255, 255, .22);
    border-radius: 8px;
    padding: 2px 9px;
    font-size: .85rem;
}

#cart-bar.bump { animation: bump .35s ease-out; }

@keyframes bump {
    40% { transform: scale(1.04); }
}

/* ---------- Navegação inferior ---------- */
.footer-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1030;
    display: flex;
    background: rgba(255, 255, 255, .97);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-top: 1px solid var(--border);
    padding: 6px 8px calc(6px + var(--safe-bottom));
}

.footer-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    color: var(--muted);
    background: none;
    border: none;
    position: relative;
    padding: 6px 0;
    border-radius: 12px;
    font-size: .7rem;
    font-weight: 500;
    user-select: none;
}

.footer-item i { font-size: 1.3rem; line-height: 1; }
.footer-item.active { color: var(--primary-color); }
.footer-item:active { background: #f1f2f4; }

.badge-cart {
    position: absolute;
    top: 0;
    left: calc(50% + 4px);
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 999px;
    background: var(--primary-color);
    color: #fff;
    font-size: .64rem;
    font-weight: 700;
    line-height: 18px;
    text-align: center;
    border: 2px solid #fff;
    box-sizing: content-box;
    display: none;
}

.badge-cart.show { display: block; }
.badge-cart.badge-ped { background: #ef4444; }

/* ---------- Monte seu lanche ---------- */
#burger-builder {
    height: 260px;
    display: flex;
    flex-direction: column-reverse;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle at 50% 70%, #fff7ec 0, #fff 60%);
    border-radius: var(--radius);
    overflow: hidden;
    position: relative;
    border: 2px dashed #f1d7b8;
}

.ingrediente-img {
    height: 46px;
    width: min(240px, 75%);
    margin-bottom: -22px;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    flex-shrink: 0;
}

.ingrediente-img.drop { animation: drop .35s cubic-bezier(.3, 1.4, .6, 1); }

@keyframes drop {
    from { transform: translateY(-120px); opacity: 0; }
    to { transform: none; opacity: 1; }
}

.pao_baixo { background-image: url('/assets/img/ingredientes/paobaixo2.png'); height: 50px; }
.hamburguer { background-image: url('/assets/img/ingredientes/hamburguer.png'); }
.frango { background-image: url('/assets/img/ingredientes/frango.png'); }
.bacon { background-image: url('/assets/img/ingredientes/bacon.png'); height: 42px; }
.presunto { background-image: url('/assets/img/ingredientes/presunto.png'); height: 38px; }
.mussarela { background-image: url('/assets/img/ingredientes/mussarela.png'); height: 38px; }
.ovo { background-image: url('/assets/img/ingredientes/ovo.png'); height: 42px; }
.catupiry { background-image: url('/assets/img/ingredientes/maionese.png'); height: 38px; }
.alface { background-image: url('/assets/img/ingredientes/alface.png'); height: 48px; }
.tomate { background-image: url('/assets/img/ingredientes/tomate.png'); width: min(140px, 50%); height: 38px; }
.pao_cima { background-image: url('/assets/img/ingredientes/paocima.png'); height: 58px; z-index: 20; }

.ing-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}

.ing-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface);
    text-align: left;
    font-size: .85rem;
    font-weight: 600;
    transition: border-color .15s, transform .1s;
}

.ing-btn:active { transform: scale(.96); border-color: var(--primary-color); }
.ing-btn .ing-emoji { font-size: 1.4rem; }
.ing-btn small { display: block; color: #16a34a; font-weight: 500; font-size: .75rem; }

.ing-count {
    margin-left: auto;
    background: var(--primary-color);
    color: #fff;
    border-radius: 999px;
    min-width: 22px;
    height: 22px;
    font-size: .72rem;
    display: none;
    align-items: center;
    justify-content: center;
}

.ing-count.show { display: inline-flex; }

.ing-btn.sel { border-color: var(--primary-color); background: color-mix(in srgb, var(--primary-color) 8%, #fff); }

@media (min-width: 768px) {
    #burger-builder { height: 340px; }
}

/* ---------- Página inicial (lista de lojas) ---------- */
.store-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    color: var(--text);
    text-decoration: none;
    height: 100%;
    position: relative;
    overflow: hidden;
    transition: transform .2s, box-shadow .2s;
}

.store-card::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 5px;
    background: var(--store-color, var(--primary-color));
}

.store-card:hover { color: var(--text); transform: translateY(-2px); box-shadow: 0 10px 24px rgba(16, 24, 40, .1); }

.store-card img {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    object-fit: contain;
    padding: 6px;
    background: color-mix(in srgb, var(--store-color, var(--primary-color)) 10%, #fff);
    flex-shrink: 0;
}

.store-card h6 { font-weight: 600; margin: 0 0 2px; }
.store-card small { color: var(--muted); }
.store-card .bi-chevron-right { margin-left: auto; color: var(--muted); }

/* ---------- Desktop ---------- */
@media (min-width: 768px) {
    body { padding-bottom: 170px; }

    .hero { padding: 28px 32px; }
    .hero h1 { font-size: 1.75rem; }
    .hero p { font-size: .95rem; }
    .hero-emoji { font-size: 6.5rem; right: 40px; }

    .product-img, .product-ph { width: 108px; height: 108px; }

    .footer-bar {
        left: 50%;
        right: auto;
        bottom: 16px;
        transform: translateX(-50%);
        width: 440px;
        border: 1px solid var(--border);
        border-radius: 22px;
        box-shadow: 0 12px 30px rgba(16, 24, 40, .14);
        padding: 6px;
    }

    #cart-bar {
        left: 50%;
        right: auto;
        width: 440px;
        margin-left: -220px;
        bottom: 96px;
    }
}

/* ---------- Modais ---------- */
.modal-content {
    border: none;
    border-radius: 22px;
    overflow: hidden;
}

.modal-header {
    border-bottom: 1px solid var(--border);
    padding: 14px 18px;
    background: var(--surface);
}

.modal-title { font-weight: 700; font-size: 1.08rem; }

.modal-body { background: var(--bg); }

.modal-footer {
    border-top: 1px solid var(--border);
    background: var(--surface);
    padding: 12px 16px calc(12px + var(--safe-bottom));
    display: block;
}

@media (max-width: 575.98px) {
    .modal-fullscreen-sm-down .modal-content { border-radius: 0; }
}

@media (max-width: 767.98px) {
    .modal-fullscreen-md-down .modal-content { border-radius: 0; }
}

.panel {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px;
    margin-bottom: 12px;
}

.panel-title {
    font-weight: 600;
    font-size: .95rem;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.panel-title i { color: var(--primary-color); }

.form-control,
.form-select {
    font-size: 16px; /* evita zoom no iOS */
    padding: 11px 14px;
    border-radius: var(--radius-sm);
    border: 1px solid #dfe2e6;
    background-color: #fafbfc;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--primary-color);
    background-color: #fff;
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--primary-color) 15%, transparent);
}

.form-control.is-invalid { border-color: #dc3545; }

.form-label { font-size: .8rem; font-weight: 600; color: #4b5563; margin-bottom: 4px; }

/* Montagem visual (copo de açaí / pote de isopor) */
.montar-visual { position: sticky; top: -16px; z-index: 3; margin: -16px -16px 12px; padding: 12px 16px 8px; text-align: center;
    background: radial-gradient(circle at 50% 30%, color-mix(in srgb, var(--primary-color) 10%, #fff), #fff 70%);
    border-bottom: 1px solid var(--border); }
.montar-visual svg { height: 190px; max-width: 100%; overflow: visible; }
.montar-visual .cai { animation: cair .45s cubic-bezier(.3, 1.4, .5, 1) both; }
@keyframes cair { from { transform: translateY(-90px); opacity: 0; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .montar-visual .cai { animation: none; } }

/* Desconto */
.preco-linha { display: block; line-height: 1.1; }
.preco-antigo { font-size: .75rem; font-weight: 500; color: var(--muted); }
.tag-desc { display: inline-block; background: #dcfce7; color: #166534; font-size: .68rem; font-weight: 700; border-radius: 6px; padding: 1px 6px; margin-left: 6px; vertical-align: 1px; }

/* Esgotado e taxa de entrega */
.product-card.esgotado { opacity: .6; }
.product-card.esgotado .product-img, .product-card.esgotado .product-ph { filter: grayscale(1); }
.tag-esgotado { display: inline-block; background: #f3f4f6; color: #6b7280; font-size: .75rem; font-weight: 700; border-radius: 8px; padding: 6px 10px; }
.ing-btn:disabled, .sabor-item.esgotado { opacity: .45; }
.taxa-row { display: flex; justify-content: space-between; align-items: baseline; width: 100%; font-size: .88rem; color: var(--muted); margin-bottom: 4px; }
.taxa-row small { display: block; font-size: .72rem; color: #16a34a; text-align: right; }
.taxa-row span:last-child { text-align: right; color: var(--text); font-weight: 600; }

/* Complementos (grupos) */
.grupo-box { margin-bottom: 16px; border-radius: 14px; }
.grupo-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; background: #f6f7f9; border-radius: 12px; padding: 9px 12px; margin-bottom: 8px; }
.grupo-head h6 { margin: 0; font-weight: 700; font-size: .92rem; }
.grupo-head small { color: var(--muted); font-size: .75rem; }
.grupo-box.obrigatorio .grupo-head small { color: #b45309; font-weight: 600; }
.grupo-cont { font-weight: 700; font-size: .78rem; color: var(--muted); white-space: nowrap; }
.grupo-cont.ok { color: #16a34a; }
.grupo-box .sabor-item { margin-bottom: 6px; }
.sabor-nome em { display: block; font-style: normal; font-weight: 400; color: var(--muted); font-size: .74rem; }
.op-radio { width: 30px; height: 30px; border-radius: 50%; border: 2px solid var(--border); background: #fff; color: transparent; flex-shrink: 0; }
.sabor-item.sel .op-radio { background: var(--primary-color); border-color: var(--primary-color); color: #fff; }
.grupo-box.pisca { animation: piscar .9s ease 2; }
@keyframes piscar { 50% { box-shadow: 0 0 0 3px #f59e0b; } }

/* Sabores das bolas */
.sabores-cont { font-weight: 700; font-size: .8rem; color: var(--muted); }
.sabores-cont.ok { color: #16a34a; }
.sabores-grid { display: grid; grid-template-columns: 1fr; gap: 6px; }
@media (min-width: 576px) { .sabores-grid { grid-template-columns: 1fr 1fr; } }
.sabor-item { display: flex; align-items: center; gap: 10px; border: 1px solid var(--border); border-radius: var(--radius-sm);
    padding: 7px 8px 7px 10px; background: var(--surface); }
.sabor-item.sel { border-color: var(--primary-color); background: color-mix(in srgb, var(--primary-color) 6%, #fff); }
.sabor-cor { width: 24px; height: 24px; border-radius: 50%; flex-shrink: 0; box-shadow: inset 0 0 0 1px rgba(0,0,0,.12); }
.sabor-nome { flex: 1; min-width: 0; font-size: .86rem; font-weight: 600; }
.sabor-nome small { display: block; color: #16a34a; font-weight: 500; font-size: .72rem; }
.sabor-passo { display: inline-flex; align-items: center; gap: 2px; }
.sabor-passo button { width: 32px; height: 32px; border-radius: 50%; border: 1px solid var(--border); background: #fff; font-size: 1.1rem; line-height: 1; color: var(--text); }
.sabor-passo button[data-op="1"] { background: var(--primary-color); border-color: var(--primary-color); color: #fff; }
.sabor-passo button:disabled { opacity: .35; }
.sabor-passo b { min-width: 22px; text-align: center; font-size: .9rem; }

/* Nome da loja no topo abre as informações */
.brand-btn { background: none; border: 0; padding: 0; text-align: left; color: inherit; cursor: pointer; min-width: 0; }
.brand-info { font-size: .75em; color: var(--muted); vertical-align: 1px; }
.info-logo { width: 36px; height: 36px; object-fit: contain; border-radius: 10px; }
.info-status { display: inline-block; font-size: .8rem; font-weight: 700; border-radius: 8px; padding: 4px 10px; margin-bottom: 12px; }
.info-status.on { background: #dcfce7; color: #166534; }
.info-status.off { background: #fee2e2; color: #991b1b; }
.info-lista { display: flex; flex-direction: column; gap: 14px; }
.info-item { display: flex; gap: 12px; align-items: flex-start; font-size: .88rem; }
.info-item > i { font-size: 1.15rem; color: var(--primary-color); width: 22px; text-align: center; margin-top: 1px; }
.info-item b { display: block; }
.info-item span { color: var(--muted); }
.info-horarios { width: 100%; margin-top: 6px; font-size: .85rem; }
.info-horarios td { padding: 3px 0; }
.info-horarios td:last-child { text-align: right; }
.info-horarios tr.hoje td { font-weight: 700; color: var(--primary-color); }

/* Loja fechada */
.aviso-fechado { display: flex; gap: 12px; align-items: flex-start; background: #fff7ed; border: 1px solid #fed7aa; color: #7c2d12;
    border-radius: 16px; padding: 12px 14px; font-size: .85rem; }
.aviso-fechado i { font-size: 1.3rem; color: #ea580c; }
.dot-online.off { background: #dc2626 !important; box-shadow: none !important; animation: none !important; }
.st-loja { display: inline-block; font-size: .68rem; font-weight: 700; border-radius: 6px; padding: 1px 6px; margin-right: 4px; }
.st-loja.on { background: #dcfce7; color: #166534; }
.st-loja.off { background: #fee2e2; color: #991b1b; }
#btn-finalizar.fechada { background: #9ca3af; box-shadow: none; }

/* Cliente identificado */
.tel-status { font-size: .78rem; color: var(--muted); margin-top: 4px; min-height: 0; }
.tel-status:empty { display: none; }
.cliente-card { margin-top: 2px; }
#cliente-campos + .cliente-card { margin-top: 12px; }
.cc-head { display: flex; align-items: center; gap: 10px; }
.cc-head b { display: block; font-size: .92rem; line-height: 1.25; }
.cc-head small { color: var(--muted); font-size: .8rem; }
.cc-avatar { width: 40px; height: 40px; border-radius: 50%; flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center;
    background: var(--primary-color); color: #fff; font-weight: 700; font-size: 1.05rem; }
.cc-end { display: flex; gap: 6px; font-size: .85rem; margin-top: 10px; padding: 10px 12px; border-radius: 12px;
    background: color-mix(in srgb, var(--primary-color) 7%, #fff); }
.cc-end i { color: var(--primary-color); }
.cc-acoes { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 10px; }
.cc-acoes .btn-soft { font-size: .8rem; padding: 7px 12px; }
.cc-opcoes { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 10px; }
.cc-opcoes button { border: 1px solid var(--border); background: var(--surface); border-radius: 12px; padding: 10px 8px;
    font-size: .8rem; font-weight: 600; color: var(--text); }
.cc-opcoes button.active { border-color: var(--primary-color); color: var(--primary-color);
    background: color-mix(in srgb, var(--primary-color) 8%, #fff); }

.saved-hint {
    font-size: .78rem;
    color: #16a34a;
    background: #ecfdf3;
    border-radius: 10px;
    padding: 8px 10px;
    margin-bottom: 12px;
    display: none;
}

/* Itens do carrinho */
.cart-item {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 12px;
    margin-bottom: 8px;
}

.cart-item-info { flex: 1; min-width: 0; }

.cart-item-info h6 {
    font-size: .9rem;
    font-weight: 600;
    margin: 0 0 2px;
    word-break: break-word;
}

.cart-item-info small { color: var(--muted); }

.cart-item-total {
    font-weight: 700;
    font-size: .9rem;
    white-space: nowrap;
}

/* Forma de pagamento */
.pay-options {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.pay-option input { position: absolute; opacity: 0; pointer-events: none; }

.pay-option label {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 12px 6px;
    border: 1.5px solid #dfe2e6;
    border-radius: var(--radius-sm);
    font-size: .8rem;
    font-weight: 600;
    cursor: pointer;
    text-align: center;
    transition: all .15s;
    background: #fafbfc;
    height: 100%;
}

.pay-option label i { font-size: 1.3rem; }

.pay-option input:checked + label {
    border-color: var(--primary-color);
    background: var(--primary-soft);
    color: var(--primary-color);
}

.pay-option input:focus-visible + label { outline: 2px solid var(--primary-color); outline-offset: 2px; }

.total-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    width: 100%;
    margin: 0 0 10px;
    padding: 0 4px;
}

.total-row span:first-child { color: var(--muted); font-weight: 500; }

.total-row span:last-child {
    font-weight: 700;
    font-size: 1.3rem;
    color: var(--text);
}

.btn-primary-app {
    width: 100%;
    border: none;
    border-radius: 14px;
    padding: 14px;
    font-weight: 700;
    font-size: 1rem;
    background: var(--primary-color);
    color: #fff;
    box-shadow: 0 8px 18px var(--primary-glow);
    transition: transform .1s, opacity .2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-primary-app:hover { color: #fff; }
.btn-primary-app:active { transform: scale(.98); }
.btn-primary-app:disabled { opacity: .6; }

.btn-soft {
    border: 1px solid var(--border);
    background: var(--surface);
    border-radius: 12px;
    padding: 9px 12px;
    font-weight: 600;
    font-size: .85rem;
}

/* Histórico de pedidos */
.order-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 14px;
    margin-bottom: 12px;
}

.order-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border-radius: 999px;
    padding: 3px 10px;
    font-size: .74rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .3px;
}

.st-pendente { background: #fff7e0; color: #a16207; }
.st-producao { background: #e8f0ff; color: #1d4ed8; }
.st-entrega { background: #e6f7fb; color: #0e7490; }
.st-finalizado { background: #e8f7ee; color: #15803d; }

.order-items {
    background: var(--bg);
    border-radius: var(--radius-sm);
    padding: 8px 12px;
    margin: 10px 0;
    font-size: .84rem;
}

.order-items > div {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    padding: 4px 0;
    border-bottom: 1px dashed #e2e5e9;
}

.order-items > div:last-child { border-bottom: none; }

/* Sucesso */
.success-icon {
    width: 76px;
    height: 76px;
    border-radius: 50%;
    background: #e8f7ee;
    color: #16a34a;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 2.6rem;
    animation: pop .4s cubic-bezier(.3, 1.6, .6, 1);
}

@keyframes pop {
    from { transform: scale(.4); opacity: 0; }
    to { transform: none; opacity: 1; }
}

/* ---------- Overlay / Toast ---------- */
#loading-overlay {
    position: fixed;
    inset: 0;
    background: rgba(255, 255, 255, .75);
    backdrop-filter: blur(4px);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 2000;
}

#loading-overlay.show { display: flex; }
#loading-overlay .spinner-border { color: var(--primary-color); }

#app-toast {
    position: fixed;
    top: calc(var(--header-h) + 10px);
    left: 50%;
    z-index: 2100;
    width: max-content;
    max-width: calc(100vw - 32px);
    background: #1c1c1e;
    color: #fff;
    border-radius: 14px;
    padding: 11px 16px;
    font-size: .88rem;
    font-weight: 500;
    box-shadow: 0 10px 30px rgba(0, 0, 0, .25);
    transform: translate(-50%, -20px);
    opacity: 0;
    pointer-events: none;
    transition: transform .25s, opacity .25s;
}

#app-toast.show { transform: translate(-50%, 0); opacity: 1; }

.anim-pop { animation: addToCart .3s ease-in-out; }

@keyframes addToCart {
    50% { transform: scale(1.2); }
}

/* Toque nos itens do cardápio não seleciona texto nem mostra o menu de copiar */
.product-card, .btn-cat, .btn-add, .btn-qty, .ing-btn, .sabor-item, .footer-bar, .lx-row {
    -webkit-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;
    -webkit-tap-highlight-color: transparent;
}

/* ---------- Pedir de novo ---------- */
.order-rodape { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; margin-top: 2px; }
.btn-repetir { display: inline-flex; align-items: center; gap: 6px; border: 1.5px solid var(--primary-color); background: var(--primary-soft);
    color: var(--primary-color); font-weight: 700; font-size: .82rem; border-radius: 999px; padding: 6px 14px; cursor: pointer; }
.btn-repetir:hover { background: var(--primary-color); color: #fff; }
.btn-repetir:disabled { opacity: .7; cursor: wait; }

/* ---------- Sugestão no carrinho ---------- */
.sugestao { margin: -4px 0 16px; padding: 12px; border-radius: var(--radius); background: var(--primary-soft); border: 1px dashed var(--primary-color); animation: sugIn .35s ease; }
.sugestao-tit { font-weight: 700; font-size: .9rem; margin-bottom: 10px; }
.sugestao-lista { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 4px; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; }
.sugestao-item { flex: 0 0 112px; scroll-snap-align: start; display: flex; flex-direction: column; align-items: stretch; gap: 4px; text-align: left;
    background: #fff; border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 6px; cursor: pointer; font: inherit; color: inherit;
    transition: transform .15s, box-shadow .15s; }
.sugestao-item:hover { transform: translateY(-2px); box-shadow: 0 6px 14px rgba(0, 0, 0, .08); }
.sugestao-item:active { transform: scale(.97); }
.sugestao-item img, .sugestao-ph { width: 100%; height: 72px; object-fit: contain; border-radius: 8px; background: #f6f7f9; display: flex; align-items: center; justify-content: center; font-size: 2rem; }
.sugestao-nome { font-size: .76rem; font-weight: 600; line-height: 1.2; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 1.85em; }
.sugestao-preco { display: flex; align-items: center; justify-content: space-between; font-size: .8rem; font-weight: 700; color: var(--primary-color); }
.sugestao-preco i { font-size: 1.15rem; }
@keyframes sugIn { from { opacity: 0; transform: translateY(6px); } }

/* ---------- Lanche destrinchado ---------- */
.lx-midia { position: relative; flex-shrink: 0; cursor: pointer; align-self: flex-start; border-radius: var(--radius-sm); }
.lx-midia:focus-visible { outline: 2px solid var(--primary-color); outline-offset: 2px; }
.lx-hint { position: absolute; left: 50%; bottom: 6px; transform: translateX(-50%); background: rgba(17, 17, 17, .72); color: #fff;
    font-size: .66rem; font-weight: 600; border-radius: 999px; padding: 2px 8px; white-space: nowrap; pointer-events: none; }
.lx-desc { cursor: pointer; }
.lanche-foto { margin: 0 0 14px; border-radius: var(--radius); overflow: hidden; background: #fff; box-shadow: 0 6px 18px rgba(0, 0, 0, .08); }
.lanche-foto img { display: block; width: 100%; max-height: 60vh; object-fit: contain; aspect-ratio: 1 / 1; background: #fff; }
.lanche-sec { display: flex; align-items: center; gap: 6px; margin: 4px 0 8px; font-size: .9rem; font-weight: 700; color: var(--text); }
.lanche-sec i { color: var(--primary-color); }
.lanche-explodido { display: flex; flex-direction: column; align-items: stretch; padding: 10px 6px 8px;
    background: radial-gradient(circle at 35% 45%, #fff7ec 0, #fff 65%); border-radius: var(--radius); }
.lx-row { display: grid; grid-template-columns: 50% 50%; align-items: center; margin-top: -18px; position: relative; z-index: calc(100 - var(--i));
    transition: margin-top .55s cubic-bezier(.3, 1.3, .5, 1); transition-delay: calc(var(--i) * 35ms); }
.lx-row:first-child { margin-top: 0; }
.lanche-explodido.aberto .lx-row { margin-top: 2px; }
.lanche-explodido.aberto .lx-row:first-child { margin-top: 0; }
.lx-camada { display: flex; justify-content: center; }
.lx-img { width: 100%; max-width: 165px; background-size: contain; background-repeat: no-repeat; background-position: center;
    filter: drop-shadow(0 4px 4px rgba(0, 0, 0, .12)); }
.lx-img.lx-estreito { max-width: 108px; }
.lx-img.lx-lombo { filter: sepia(.35) saturate(.9) hue-rotate(-12deg) brightness(1.18) drop-shadow(0 4px 4px rgba(0, 0, 0, .12)); }
.lx-desenho { width: 82%; max-width: 145px; border-radius: 999px; box-shadow: 0 3px 4px rgba(0, 0, 0, .1); display: flex; align-items: center; justify-content: center; }
.lx-desenho span { font-size: .62rem; font-weight: 700; color: #374151; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding: 0 8px; }
.lx-milho { background: radial-gradient(circle, #ffd43b 42%, transparent 46%) 0 0 / 11px 11px, #f6c21a; }
.lx-batata { background: repeating-linear-gradient(100deg, #f1b13a 0 3px, #ffd27a 3px 5px, #e39a22 5px 7px); }
.lx-cebola { background: repeating-radial-gradient(circle at 50% 50%, #fff 0 3px, #e9d5f5 3px 5px); width: 70%; }
.lx-oregano { background: radial-gradient(circle, #5f8f3e 30%, transparent 34%) 0 0 / 7px 7px, rgba(95, 143, 62, .12); width: 70%; box-shadow: none; }
.lx-picles { background: radial-gradient(circle, #9bc26b 40%, #6e9a3d 42%) 0 0 / 22px 12px; width: 70%; }
.lx-outro { background: #f3f4f6; border: 1px dashed #d1d5db; }
.lx-rotulo { display: flex; align-items: center; gap: 6px; min-width: 0; opacity: 0; transform: translateX(-8px);
    transition: opacity .35s, transform .35s; transition-delay: calc(.25s + var(--i) * 35ms); }
.lanche-explodido.aberto .lx-rotulo { opacity: 1; transform: none; }
.lx-linha { width: 18px; flex-shrink: 0; border-top: 1.5px dashed #cbd2da; }
.lx-rotulo b { font-size: .76rem; font-weight: 600; line-height: 1.2; color: var(--text); }
.lx-rotulo em { font-style: normal; font-size: .7rem; font-weight: 700; color: var(--primary-color); background: var(--primary-soft); border-radius: 6px; padding: 0 5px; }
.lanche-ings { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.lx-chip { background: #f6f7f9; border: 1px solid var(--border); border-radius: 999px; padding: 5px 10px; font-size: .78rem; font-weight: 500; }
.lx-chip b { color: var(--primary-color); }
.lanche-acomp { margin: 12px 0 0; font-size: .85rem; color: var(--muted); }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: .01ms !important;
        transition-duration: .01ms !important;
    }
}

/* Chave Pix (loja sem Pix na maquininha) */
.pix-box { background: #ecfdf5; border: 1px dashed #10b981; border-radius: 12px; padding: 10px 12px; }
.pix-chave-linha { display: flex; align-items: center; gap: 8px; margin: 6px 0 2px; }
.pix-chave-linha code { flex: 1; min-width: 0; overflow-wrap: anywhere; background: #fff; color: #065f46; border-radius: 8px; padding: 6px 8px; font-size: .9rem; }
.pix-copiar { flex-shrink: 0; font-size: .8rem; padding: 6px 10px; }
