﻿/* Lojas: filtro compacto, mapa, postos, região, página da loja (seguir, pedido, promoções, check-in) */

/* ---------- Seletor de região ---------- */
.region-btn {
    display: inline-flex; align-items: center; gap: 5px; min-height: 36px; max-width: 100%; padding: 6px 12px;
    border-radius: var(--r-pill); border: 1px solid var(--line); background: var(--surface); color: var(--ink-2);
    font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; white-space: nowrap;
}
.region-btn span { overflow: hidden; text-overflow: ellipsis; }
.region-btn .icon:first-child { color: var(--brand); flex: none; }
.region-btn .icon:last-child { color: var(--muted); flex: none; }
.region-btn:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
/* Na home, no lugar do "eyebrow" da cidade */
.region-btn--eyebrow {
    min-height: 32px; margin: 0 0 4px -8px; padding: 4px 8px; border: 0; background: none;
    font-family: var(--font-mono); font-size: 11px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; color: var(--muted);
}
.region-btn--compact { min-height: 40px; padding: 6px 10px; max-width: 150px; }
.region-sheet__hint { font-size: 13.5px; }
.region-list { overflow: hidden; }
.region-row { width: 100%; text-align: left; background: none; border: 0; font: inherit; color: inherit; cursor: pointer; min-height: 56px; }
.region-row .list-row__title, .region-row .list-row__sub { display: block; }
.region-row__pin { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 11px; background: var(--brand-tint); color: var(--brand); flex: none; }
.region-row--on { background: var(--brand-tint); }
.region-row[disabled] { opacity: .6; }

/* ---------- Diretório: cabeçalho compacto ---------- */
.dir-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 6px 0 12px; }
.dir-head .region-btn { max-width: 58%; }
.dir-bar { display: flex; gap: 8px; }
.dir-bar__search { flex: 1; min-width: 0; height: 46px; padding: 0 12px; gap: 8px; }
.dir-bar__search input { font-size: 15px; }
.dir-bar__search button { display: grid; place-items: center; width: 32px; height: 32px; color: var(--muted); }
.dir-bar__filters {
    position: relative; display: inline-flex; align-items: center; gap: 6px; flex: none; height: 46px; padding: 0 14px;
    border-radius: 16px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); box-shadow: var(--shadow-sm);
    font: inherit; font-size: 14px; font-weight: 600; cursor: pointer;
}
.dir-bar__filters.on { border-color: var(--brand); background: var(--brand-tint); color: var(--brand); }
.dir-bar__count {
    display: grid; place-items: center; min-width: 20px; height: 20px; padding: 0 5px; border-radius: var(--r-pill);
    background: var(--brand); color: var(--tag); font-size: 11.5px; font-weight: 700;
}
.dir-bar__filters:focus-visible, .dir-kinds .chip:focus-visible, .dir-view button:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }

.dir-kinds {
    display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none;
    margin: 10px calc(var(--gutter) * -1) 0; padding: 2px var(--gutter) 4px;
}
.dir-kinds::-webkit-scrollbar { display: none; }
.dir-kinds .chip { flex: none; min-height: 38px; padding: 6px 13px; font-size: 13.5px; cursor: pointer; }

.dir-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 10px 0 12px; }
.dir-toolbar p { font-size: 13px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dir-view { flex: none; padding: 3px; gap: 2px; border-radius: 12px; }
.dir-view button { display: inline-flex; align-items: center; justify-content: center; gap: 5px; min-height: 36px; padding: 0 12px; font-size: 13px; }

/* Cartão mais baixo que o antigo */
.dir-tile__media { height: 108px; }

/* Selos pequenos: seguindo, preço oficial, pedido no WhatsApp */
.store-flags { display: flex; flex-wrap: wrap; gap: 5px; margin: -4px 0 10px 30px; }
.store-flag {
    display: inline-flex; align-items: center; gap: 3px; padding: 2px 7px; border-radius: var(--r-pill);
    font-size: 11px; font-weight: 650; line-height: 1.5; white-space: nowrap; background: var(--surface-2); color: var(--ink-2); border: 1px solid var(--line);
}
.store-flag--follow { background: var(--brand-tint); border-color: var(--brand-tint-2); color: var(--brand); }
.store-flag--official { background: var(--save-soft); border-color: transparent; color: var(--save); }
.store-flag--order { background: #E3F6EA; border-color: transparent; color: #0B6B34; }

/* Folha de filtros */
.filter-group { display: flex; flex-direction: column; gap: 8px; }
.filter-group.card { gap: 0; overflow: hidden; }
.filter-toggle { width: 100%; padding: 12px 14px; min-height: 60px; background: none; border: 0; font: inherit; color: var(--ink); text-align: left; cursor: pointer; }
.filter-toggle + .filter-toggle { border-top: 1px solid var(--line); }
.filter-toggle strong { font-size: 14.5px; font-weight: 600; }
.filter-toggle:focus-visible { outline: 2px solid var(--brand); outline-offset: -2px; }
.filter-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.filter-chips .chip { cursor: pointer; }
.filter-actions { display: grid; grid-template-columns: auto 1fr; gap: 8px; position: sticky; bottom: -24px; padding: 10px 0 4px; background: var(--surface); }

/* ---------- Mapa ---------- */
.dir-map-wrap { position: relative; }
.dir-map {
    height: min(62dvh, 520px); min-height: 320px; border-radius: var(--r-lg); overflow: hidden;
    border: 1px solid var(--line); background: var(--surface-sunk); z-index: 0;
}
.dir-map__me { position: absolute; right: 12px; bottom: 28px; z-index: 500; }
.dir-map__note { font-size: 12.5px; margin-top: 8px; }
.dir-map .leaflet-control-attribution { font-size: 10.5px; }
.dir-map .leaflet-popup-content-wrapper { border-radius: 14px; box-shadow: var(--shadow-lg); }
.dir-map .leaflet-popup-content { margin: 12px 14px; font-family: var(--font-body); }
.map-pop strong { display: block; font-size: 14.5px; color: var(--ink); }
.map-pop__meta { margin: 2px 0 0 !important; font-size: 12px; color: var(--muted); }
.map-pop__index { margin: 4px 0 0 !important; font-size: 12.5px; font-weight: 600; color: var(--ink-2); }
.map-pop__link { display: inline-block; margin-top: 8px; font-weight: 650; color: var(--info) !important; }

/* ---------- Postos ---------- */
.fuel-tabs { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; margin: -6px calc(var(--gutter) * -1) 14px; padding: 2px var(--gutter) 4px; }
.fuel-tabs::-webkit-scrollbar { display: none; }
.fuel-tabs .chip { flex: none; cursor: pointer; }
.fuel-summary { display: grid; grid-template-columns: 1fr 1fr; padding: 14px 16px; margin-bottom: 14px; }
.fuel-summary > div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.fuel-summary__best { padding-left: 16px; border-left: 1px dashed var(--line-strong); }
.fuel-summary strong { font-size: 22px; font-weight: 600; letter-spacing: -.02em; }
.fuel-summary small { font-size: 12px; }
.fuel-list { display: flex; flex-direction: column; gap: 10px; }
.fuel-station { display: block; padding: 12px 14px; color: inherit; }
.fuel-station--best { border-color: color-mix(in srgb, var(--save) 45%, var(--line)); box-shadow: 0 0 0 1px color-mix(in srgb, var(--save) 25%, transparent); }
.fuel-station__top { display: flex; align-items: center; gap: 10px; }
.fuel-station__name { flex: 1; min-width: 0; }
.fuel-station__price { display: flex; flex-direction: column; align-items: flex-end; gap: 3px; flex: none; }
.fuel-station__none { font-size: 12.5px; }
.fuel-station__seen { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin: 6px 0 0 42px; font-size: 12px; color: var(--muted); }
.pill--official { background: var(--save-soft); color: var(--save); font-size: 10.5px; padding: 1px 7px; }
.fuel-station__others { display: flex; flex-wrap: wrap; gap: 4px 12px; margin: 6px 0 0 42px; padding: 0; list-style: none; font-size: 12.5px; color: var(--ink-2); }
.fuel-station__others .mono { font-weight: 600; }
.fuel-station__foot { display: flex; align-items: center; justify-content: space-between; margin: 8px 0 0 42px; color: var(--muted); }
.fuel-note { font-size: 12px; margin-top: 14px; }

/* ---------- Promoções (sempre "Patrocinado") ---------- */
.promo { overflow: hidden; display: flex; flex-direction: column; }
.promo__img { display: block; width: 100%; height: 120px; object-fit: cover; background: var(--surface-sunk); }
.promo__band {
    display: flex; align-items: center; gap: 10px; padding: 12px 14px;
    background: color-mix(in srgb, var(--store) 9%, var(--surface)); border-bottom: 1px solid var(--line);
}
.promo__store { flex: none; border-radius: 12px; }
.promo__head { flex: 1; min-width: 0; }
.promo__title { font-family: var(--font-display); font-weight: 650; font-size: 15.5px; letter-spacing: -.01em; line-height: 1.2; }
.promo__sub { font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.promo__band .pill--sponsored { flex: none; align-self: flex-start; }
.promo__item { min-height: 56px; padding: 8px 14px; color: inherit; }
.promo__more { display: block; padding: 8px 14px; font-size: 12.5px; font-weight: 600; color: var(--info); border-top: 1px solid var(--line); }
.promo__foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-top: auto; padding: 10px 14px; border-top: 1px solid var(--line); font-size: 12.5px; color: var(--muted); }
.promo__foot > span { display: inline-flex; align-items: center; gap: 5px; }
.promo__coupon { min-height: 40px; font-size: 13.5px; }
.promo--slide { width: min(320px, 84vw); }
.promo-stack { display: flex; flex-direction: column; gap: 14px; }

.coupon-sheet { display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; padding-bottom: 8px; }
.coupon-sheet > p:first-child { font-size: 14px; }
.coupon-sheet__code {
    width: 100%; padding: 22px 12px; border-radius: var(--r-md); border: 2px dashed var(--tag-deep);
    background: var(--tag-soft); color: var(--ink); font-size: clamp(28px, 10vw, 40px); font-weight: 700; letter-spacing: .12em; word-break: break-all;
}
.coupon-sheet__code--used { opacity: .45; text-decoration: line-through; }
.coupon-sheet__text { font-weight: 600; font-size: 15px; }
.coupon-sheet__meta { font-size: 13px; }
.coupon-sheet__note { font-size: 12px; color: var(--muted); }

/* ---------- Página da loja: seguir e pedido ---------- */
.store-cta { display: flex; gap: 8px; margin-top: 14px; flex-wrap: wrap; }
.store-cta .btn { flex: 1 1 140px; }
.store-cta__count { display: inline-grid; place-items: center; min-width: 22px; height: 20px; padding: 0 6px; border-radius: var(--r-pill); background: rgb(255 255 255 / .16); font-size: 12px; font-weight: 700; }
.store-cta__following { color: var(--brand); }
.store-cta__following .store-cta__count { background: var(--brand-tint); }
.store-cta + .store-actions { margin-top: 10px; }


/* ---------- Check-in ---------- */
.checkin-intro { display: flex; gap: 14px; align-items: flex-start; padding: 16px; background: var(--brand-tint); border-color: var(--brand-tint-2); }
.checkin-intro__icon { display: grid; place-items: center; width: 52px; height: 52px; flex: none; border-radius: 16px; background: var(--brand); color: var(--tag); }
.checkin-intro p { margin-top: 6px; font-size: 14px; color: var(--ink-2); line-height: 1.45; }
.checkin-steps { display: flex; flex-direction: column; gap: 8px; margin: 16px 0; padding: 0; list-style: none; font-size: 14px; color: var(--ink-2); }
.checkin-steps li { display: flex; align-items: center; gap: 10px; }
.checkin-steps strong { display: grid; place-items: center; width: 26px; height: 26px; flex: none; border-radius: 50%; background: var(--surface-sunk); color: var(--ink); font-size: 13px; }
.checkin-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 18px; }
.checkin-note { font-size: 13.5px; margin-bottom: 14px; }
.checkin-code__row { display: flex; gap: 8px; }
.checkin-code__row .input { flex: 1; min-width: 0; font-size: 14px; }
.checkin-code__row .btn { flex: none; min-height: 50px; }
.checkin__again { margin-top: 4px; }
.form-error + .checkin-actions, .form-error + .checkin-note { margin-top: 14px; }

/* ---------- Home: atalhos extras discretos ---------- */
.home-shortcuts { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; margin: -6px calc(var(--gutter) * -1) 18px; padding: 2px var(--gutter) 4px; }
.home-shortcuts::-webkit-scrollbar { display: none; }
.home-shortcuts .chip { flex: none; min-height: 38px; padding: 6px 12px; font-size: 13px; }
.home-shortcuts .chip .icon { color: var(--brand); }
.promo-strip .h-scroll { align-items: stretch; }

@media (prefers-reduced-motion: reduce) {
    .dir-bar__filters, .region-btn { transition: none; }
}

/* ---------------------------------------------------------------- pedido pelo WhatsApp: catálogo + carrinho
   Uma janela alta com duas etapas (escolher, revisar). O carrinho vive no rodapé fixo, então a lista de produtos
   pode rolar sem perder o total nem o botão principal. */
.sheet--tall { height: 92%; max-height: 92%; }
.sheet__foot { flex: none; padding: 12px 20px calc(12px + var(--safe-bottom, 0px)); border-top: 1px solid var(--line); background: var(--surface); }
.order-sheet .sheet__body { gap: 12px; padding-bottom: 16px; }

.order-note { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 9px 12px; border-radius: 12px; background: var(--tag-soft);
    border: 1px solid var(--tag-line); font-size: 13px; color: var(--ink-2); }
.order-note strong { color: var(--ink); }
.order-search { margin: 0; }
.order-chips { margin: 0 -20px; padding: 0 20px 2px; }
.chip--list { border-style: dashed; }

.order-catalog { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.order-catalog li { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.order-catalog li:last-child { border-bottom: 0; }
.order-catalog li.is-in .order-catalog__text strong { color: var(--brand); }
.order-catalog__text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.order-catalog__text strong { font-size: 14.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.order-catalog__text small { font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.order-catalog__price { display: inline-flex; align-items: baseline; gap: 4px; margin-top: 2px; font-size: 12.5px; color: var(--muted); }
.order-catalog__price .pill { margin-left: 4px; }
.order-add { position: relative; flex: none; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%;
    background: var(--brand); color: var(--on-brand); }
.order-add::after { content: ""; position: absolute; inset: -5px; } /* área de toque ≥ 44px */
.order-add:active { transform: scale(.94); }
.order-empty { padding: 18px 0 6px; text-align: center; }

.order-lists { display: flex; flex-direction: column; gap: 8px; }
.order-list-pick { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--line);
    background: var(--surface); color: var(--ink); text-align: left; }
.order-list-pick small { display: block; font-size: 12.5px; color: var(--muted); }
.order-list-pick:disabled { opacity: .5; }
.order-list-pick > .icon { color: var(--brand); }
.order-list-pick__emoji { font-size: 22px; }

.order-free { display: flex; gap: 8px; align-items: center; padding-top: 4px; }
.order-free .input { flex: 1; min-width: 0; font-size: 14px; }

.order-back { display: inline-flex; align-items: center; gap: 4px; align-self: flex-start; font-size: 14px; }
.order-review { list-style: none; margin: 0; padding: 4px 14px; border-radius: 16px; background: var(--surface-2); }
.order-review li { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.order-review li:last-child { border-bottom: 0; }
.order-review__emoji { font-size: 20px; width: 28px; text-align: center; flex: none; }
.order-review__text { min-width: 0; }
.order-review__text strong { display: block; font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.order-review__text small { font-size: 12.5px; color: var(--muted); }
.order-review .stepper { background: var(--surface); }

.order-bar { display: flex; align-items: center; gap: 12px; }
.order-bar__summary { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.25; }
.order-bar__count { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); font-weight: 600; }
.order-bar__summary strong { font-family: var(--font-mono); font-size: 17px; }
.order-bar__summary strong small { font-family: var(--font-body); font-size: 12px; font-weight: 500; color: var(--muted); }
.order-bar__min { font-size: 12px; color: var(--up); font-weight: 600; }
.order-bar .btn { flex: none; display: inline-flex; align-items: center; gap: 6px; }

.order-float { position: sticky; bottom: 12px; z-index: 20; display: flex; align-items: center; gap: 12px; width: calc(100% - 32px); margin: 8px 16px 12px;
    padding: 10px 12px 10px 10px; border-radius: 18px; background: var(--brand); color: var(--on-brand); text-align: left; box-shadow: var(--shadow-lg); }
.order-float strong { display: block; font-size: 14.5px; }
.order-float small { display: block; font-size: 12.5px; color: var(--on-brand-muted); }
.order-float__icon { position: relative; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: rgb(255 255 255 / .12); }
.order-float__badge { position: absolute; top: -5px; right: -5px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 99px; background: var(--tag);
    color: var(--on-tag); font-size: 11.5px; font-weight: 800; display: grid; place-items: center; }
.order-float__cta { display: inline-flex; align-items: center; gap: 4px; font-weight: 700; font-size: 14px; color: var(--tag); }
@media (prefers-reduced-motion: no-preference) {
    .order-float { animation: sheet-in .28s var(--ease-out) both; }
}

.order-sheet { padding-bottom: 0; }
