:root { --primary:#0f766e; --primary-dark:#0b5f59; --ink:#111827; --muted:#6b7280; --line:#e5e7eb; --bg:#f7f7f7; --card:#fff; --radius:16px; }
* { box-sizing:border-box; }
html, body { height:100%; }
body { margin:0; font-family:system-ui,-apple-system,"Segoe UI",Roboto,sans-serif; color:var(--ink); background:var(--bg); }
a { color:var(--primary); }
button, input, select { font:inherit; }

/* Header no estilo Airbnb */
.top { position:sticky; top:0; z-index:1000; background:#fff; border-bottom:1px solid var(--line); display:flex; align-items:center; gap:18px; padding:14px 24px; flex-wrap:wrap; }
.brand { font-weight:800; font-size:1.25rem; color:var(--primary); text-decoration:none; letter-spacing:-.02em; white-space:nowrap; }
.brand span { color:var(--ink); }
.search { flex:1; display:flex; align-items:center; gap:0; background:#fff; border:1px solid var(--line); border-radius:999px; box-shadow:0 2px 10px rgba(0,0,0,.06); padding:6px 6px 6px 8px; min-width:320px; }
.seg { display:flex; flex-direction:column; gap:1px; padding:6px 14px; border-radius:999px; cursor:text; min-width:120px; }
.seg:hover { background:#f5f5f5; }
.seg-wide { flex:1; min-width:180px; }
.seg-small { min-width:92px; }
.seg span { font-size:.72rem; font-weight:700; color:var(--ink); }
.seg input, .seg select { border:0; outline:0; background:transparent; font-size:.88rem; color:var(--muted); padding:0; width:100%; }
.seg input::placeholder { color:#9ca3af; }
.div { width:1px; height:28px; background:var(--line); }
.round { width:44px; height:44px; border-radius:50%; border:0; background:var(--primary); color:#fff; display:grid; place-items:center; cursor:pointer; flex:none; }
.round:hover { background:var(--primary-dark); }
.geo { display:flex; align-items:center; gap:7px; border:1px solid var(--line); background:#fff; border-radius:999px; padding:10px 14px; cursor:pointer; color:var(--ink); font-weight:600; font-size:.85rem; }
.geo:hover { background:#f5f5f5; }

/* Mapa + painel flutuante (Google) */
.stage { position:relative; height:calc(100vh - 78px); }
#map { position:absolute; inset:0; z-index:1; }
.panel { position:absolute; z-index:500; top:18px; left:18px; bottom:18px; width:min(430px, calc(100% - 36px)); display:flex; flex-direction:column; gap:12px; pointer-events:none; }
.panel-head, .chips, .list { pointer-events:auto; }
.panel-head { background:transparent; display:flex; align-items:flex-end; justify-content:space-between; gap:12px; }
.panel-head h1 { font-size:1.1rem; margin:0; background:#fff; padding:10px 14px; border-radius:999px; box-shadow:0 2px 10px rgba(0,0,0,.10); }
.muted { margin:0; color:var(--muted); font-size:.8rem; }
.count { background:#fff; border-radius:999px; padding:6px 12px; font-size:.78rem; color:var(--muted); box-shadow:0 2px 10px rgba(0,0,0,.10); white-space:nowrap; }
.chips { display:flex; gap:8px; flex-wrap:wrap; }
.chip { background:#fff; border:1px solid var(--line); border-radius:999px; padding:7px 12px; box-shadow:0 2px 8px rgba(0,0,0,.05); display:flex; align-items:center; }
.chip select { border:0; background:transparent; outline:0; font-size:.82rem; font-weight:600; color:var(--ink); max-width:150px; cursor:pointer; }
.chip-btn { font-size:.82rem; font-weight:600; cursor:pointer; color:var(--muted); }
.chip-btn:hover { color:var(--ink); }
.list { overflow:auto; display:flex; flex-direction:column; gap:12px; padding-bottom:8px; }
.skeleton { background:#fff; border:1px solid var(--line); border-radius:var(--radius); padding:24px; color:var(--muted); text-align:center; }

/* Card da loja: painel Google + estetica Airbnb */
.store { background:var(--card); border:1px solid var(--line); border-radius:var(--radius); overflow:hidden; box-shadow:0 6px 18px rgba(0,0,0,.08); cursor:pointer; transition:transform .12s, box-shadow .12s; }
.store:hover { transform:translateY(-2px); box-shadow:0 10px 24px rgba(0,0,0,.12); }
.store.active { outline:2px solid var(--primary); }
.store-main { display:flex; gap:12px; padding:12px; }
.thumb { width:84px; height:84px; border-radius:12px; flex:none; overflow:hidden; background:linear-gradient(135deg, color-mix(in srgb, var(--primary) 18%, #fff), #eef2f2); display:grid; place-items:center; color:var(--primary); font-weight:800; font-size:1.4rem; }
.thumb img { width:100%; height:100%; object-fit:cover; }
.info { min-width:0; display:flex; flex-direction:column; gap:4px; }
.info h2 { font-size:.98rem; margin:0; line-height:1.25; }
.line { color:var(--muted); font-size:.82rem; display:flex; gap:8px; flex-wrap:wrap; }
.dist { color:var(--primary); font-weight:800; }
.products { border-top:1px solid var(--line); padding:10px 14px 12px; display:grid; gap:6px; background:#fcfcfc; }
.product { display:flex; justify-content:space-between; gap:10px; font-size:.84rem; }
.product b { white-space:nowrap; }
.card-actions { display:flex; gap:8px; padding:0 14px 12px; flex-wrap:wrap; }
.card-actions a, .card-actions button { font-size:.8rem; font-weight:700; text-decoration:none; border-radius:999px; padding:7px 12px; border:1px solid var(--line); background:#fff; color:var(--ink); cursor:pointer; }
.card-actions a.primary { background:var(--primary); border-color:var(--primary); color:#fff; }
.empty { background:#fff; border:1px dashed var(--line); border-radius:var(--radius); padding:28px; text-align:center; color:var(--muted); }

@media (max-width: 900px) {
  .top { padding:10px 14px; gap:10px; }
  .search { min-width:100%; order:3; }
  .geo span { display:none; }
  .geo { padding:10px; }
  .stage { height:auto; display:flex; flex-direction:column; }
  #map { position:relative; height:340px; order:0; }
  .panel { position:relative; inset:auto; width:auto; padding:14px; order:1; pointer-events:auto; }
  .panel-head h1, .count { box-shadow:none; padding:0; background:transparent; }
  .list { overflow:visible; }
}

/* Pino com a foto do produto e o preco (estilo Google) */
.store-pin { background:none; border:0; }
.pin-bubble { display:flex; align-items:center; gap:7px; background:#fff; border:1px solid var(--line); border-radius:999px; padding:5px 10px 5px 5px; box-shadow:0 4px 14px rgba(0,0,0,.18); max-width:120px; }
.pin-bubble img { width:34px; height:34px; border-radius:50%; object-fit:cover; flex:none; }
.pin-ph { width:34px; height:34px; border-radius:50%; background:color-mix(in srgb, var(--primary) 16%, #fff); color:var(--primary); font-weight:800; display:grid; place-items:center; flex:none; }
.pin-price { font-size:.78rem; font-weight:800; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.pin-dot { width:10px; height:10px; background:#fff; border:2px solid var(--primary); border-radius:50%; margin:2px auto 0; box-shadow:0 2px 6px rgba(0,0,0,.25); }
.popup-img { width:100%; max-width:180px; border-radius:8px; display:block; margin-bottom:6px; }

.count:empty { display:none; }

/* Modal da loja (abre so pelo pino do mapa) */
.modal { position:fixed; inset:0; z-index:3000; display:grid; place-items:center; padding:20px; }
.modal[hidden] { display:none; }
.modal-backdrop { position:absolute; inset:0; background:rgba(15,23,42,.45); backdrop-filter:blur(2px); }
.modal-card { position:relative; background:#fff; border-radius:20px; width:min(560px, 100%); max-height:min(86vh, 760px); overflow:auto; box-shadow:0 24px 60px rgba(0,0,0,.25); padding:22px; }
.modal-close { position:absolute; top:10px; right:12px; border:0; background:#f3f4f6; width:34px; height:34px; border-radius:50%; font-size:1.3rem; line-height:1; cursor:pointer; color:var(--ink); }
.modal-store { display:flex; gap:14px; align-items:flex-start; padding-right:28px; }
.modal-avatar { width:64px; height:64px; border-radius:16px; background:linear-gradient(135deg, color-mix(in srgb, var(--primary) 18%, #fff), #eef2f2); display:grid; place-items:center; font-weight:800; color:var(--primary); font-size:1.4rem; overflow:hidden; flex:none; }
.modal-avatar img { width:100%; height:100%; object-fit:cover; }
.modal-store h2 { margin:0 0 4px; font-size:1.2rem; }
.modal-meta { color:var(--muted); font-size:.86rem; display:flex; gap:10px; flex-wrap:wrap; }
.modal-products { margin-top:16px; display:grid; gap:8px; }
.modal-product { display:flex; align-items:center; gap:10px; border:1px solid var(--line); border-radius:12px; padding:8px 10px; }
.modal-product img { width:44px; height:44px; border-radius:8px; object-fit:cover; flex:none; }
.modal-product .ph { width:44px; height:44px; border-radius:8px; background:#f3f4f6; display:grid; place-items:center; color:var(--muted); font-size:.8rem; flex:none; }
.modal-product .inf { flex:1; min-width:0; display:flex; flex-direction:column; gap:2px; }
.modal-product .inf strong { font-size:.9rem; }
.modal-product .inf span { color:var(--muted); font-size:.78rem; }
.modal-product b { white-space:nowrap; }
.modal-actions { display:flex; gap:8px; margin-top:18px; flex-wrap:wrap; }
.modal-actions a { text-decoration:none; border-radius:999px; padding:10px 16px; font-weight:700; font-size:.86rem; border:1px solid var(--line); color:var(--ink); background:#fff; }
.modal-actions a.primary { background:var(--primary); color:#fff; border-color:var(--primary); }

/* Onde a pessoa esta (ou o ponto buscado) */
.user-pin { background:none; border:0; }
.user-dot { display:block; width:18px; height:18px; border-radius:50%; background:#2563eb; border:3px solid #fff; box-shadow:0 0 0 2px rgba(37,99,235,.35), 0 4px 10px rgba(0,0,0,.25); position:relative; }
.user-dot::after { content:""; position:absolute; inset:-9px; border-radius:50%; border:2px solid rgba(37,99,235,.45); animation:pulse 1.8s ease-out infinite; }
@keyframes pulse { 0% { transform:scale(.6); opacity:.9; } 100% { transform:scale(1.6); opacity:0; } }

/* Card flutuante da loja (estilo Airbnb sobre o mapa) */
.store-card { position:absolute; z-index:900; top:18px; right:18px; width:min(360px, calc(100% - 36px)); max-height:calc(100% - 36px); overflow:auto; background:#fff; border-radius:20px; box-shadow:0 18px 50px rgba(0,0,0,.28); padding:0 0 14px; }
.store-card[hidden] { display:none; }
.store-card-close { position:absolute; top:10px; right:10px; z-index:2; width:34px; height:34px; border-radius:50%; border:0; background:rgba(255,255,255,.92); box-shadow:0 2px 8px rgba(0,0,0,.18); font-size:1.25rem; line-height:1; cursor:pointer; color:var(--ink); }
.card-cover { height:170px; border-radius:20px 20px 0 0; background:linear-gradient(135deg, color-mix(in srgb, var(--primary) 20%, #fff), #e8eeee); display:grid; place-items:center; overflow:hidden; }
.card-cover img { width:100%; height:100%; object-fit:cover; }
.card-cover .ph { font-size:2.4rem; font-weight:800; color:var(--primary); }
.card-body { padding:14px 16px 0; display:grid; gap:6px; }
.card-body h2 { margin:0; font-size:1.12rem; line-height:1.25; }
.card-body .dist-line { color:var(--muted); font-size:.85rem; display:flex; gap:8px; flex-wrap:wrap; }
.card-body .dist-line b { color:var(--primary); }
.card-products { margin-top:6px; display:grid; gap:6px; }
.card-product { display:flex; align-items:center; gap:8px; font-size:.86rem; border-top:1px solid var(--line); padding-top:7px; }
.card-product:first-child { border-top:0; padding-top:0; }
.card-product img { width:36px; height:36px; border-radius:8px; object-fit:cover; flex:none; }
.card-product .ph { width:36px; height:36px; border-radius:8px; background:#f3f4f6; display:grid; place-items:center; color:var(--muted); font-size:.7rem; flex:none; }
.card-product span { flex:1; min-width:0; }
.card-product b { white-space:nowrap; }
.card-actions { display:flex; gap:8px; margin-top:12px; flex-wrap:wrap; }
.card-actions a { text-decoration:none; border-radius:999px; padding:9px 14px; font-weight:700; font-size:.84rem; border:1px solid var(--line); color:var(--ink); background:#fff; }
.card-actions a.primary { background:var(--primary); color:#fff; border-color:var(--primary); }
@media (max-width: 900px) {
  .store-card { position:fixed; left:12px; right:12px; bottom:12px; top:auto; width:auto; max-height:70vh; }
}

.user-label { background:#2563eb; color:#fff; border:0; border-radius:999px; padding:3px 9px; font-size:.72rem; font-weight:700; box-shadow:0 2px 8px rgba(0,0,0,.2); }
.user-label::before { display:none; }

/* Sugestoes e chips de categoria (estilo Google Maps) */
.suggest { position:fixed; z-index:1100; top:74px; left:50%; transform:translateX(-50%); width:min(620px, calc(100% - 28px)); background:#fff; border:1px solid var(--line); border-radius:14px; box-shadow:0 16px 40px rgba(0,0,0,.18); overflow:hidden; }
.suggest[hidden] { display:none; }
.suggest-item { display:flex; align-items:center; gap:10px; padding:10px 14px; font-size:.9rem; cursor:pointer; }
.suggest-item:hover, .suggest-item.active { background:#f3f4f6; }
.suggest-item .ico { width:26px; height:26px; border-radius:50%; background:#eef2f2; color:var(--primary); display:grid; place-items:center; font-size:.8rem; flex:none; }
.suggest-item small { color:var(--muted); margin-left:auto; font-size:.75rem; }
.suggest-head { padding:10px 14px 6px; font-size:.72rem; font-weight:800; text-transform:uppercase; letter-spacing:.05em; color:var(--muted); }
.cat-chips { display:flex; gap:8px; flex-wrap:wrap; }
.cat-chip { background:#fff; border:1px solid var(--line); border-radius:999px; padding:7px 13px; font-size:.82rem; font-weight:600; cursor:pointer; box-shadow:0 2px 8px rgba(0,0,0,.05); white-space:nowrap; }
.cat-chip:hover { border-color:var(--primary); color:var(--primary); }
.cat-chip.active { background:var(--primary); border-color:var(--primary); color:#fff; }

/* Sliders (raio e preco) */
.seg-radius { min-width:170px; }
.seg-radius input[type=range] { accent-color:var(--primary); width:100%; }
.seg-radius b { color:var(--ink); font-weight:800; }
.price-filter { display:flex; align-items:center; gap:10px; background:#fff; border:1px solid var(--line); border-radius:14px; padding:8px 12px; box-shadow:0 2px 8px rgba(0,0,0,.05); pointer-events:auto; }
.price-title { font-size:.78rem; font-weight:800; color:var(--muted); }
.dual { position:relative; flex:1; height:22px; }
.dual input[type=range] { position:absolute; left:0; right:0; top:0; width:100%; accent-color:var(--primary); pointer-events:none; }
.dual input[type=range]::-webkit-slider-thumb { pointer-events:auto; }
.dual input[type=range]::-moz-range-thumb { pointer-events:auto; }
.price-label { font-size:.78rem; font-weight:700; white-space:nowrap; }

.card-actions button { border-radius:999px; padding:9px 14px; font-weight:700; font-size:.84rem; border:1px solid var(--line); background:#fff; color:var(--ink); cursor:pointer; }
.card-actions button.saved { background:#fef3c7; border-color:#f59e0b; color:#92400e; }

.stars { color:#f59e0b; letter-spacing:1px; }
.open { color:#047857; font-weight:800; }
.closed { color:#b91c1c; font-weight:700; }
.reviews { margin-top:10px; display:grid; gap:6px; font-size:.82rem; }
.rev-sum { display:flex; align-items:center; gap:6px; }
.review { border-top:1px solid var(--line); padding-top:6px; }
.review p { margin:2px 0 0; color:#334155; }
.rev-form { border-top:1px solid var(--line); padding-top:8px; display:grid; gap:6px; }
.rev-form summary { cursor:pointer; font-weight:700; color:var(--primary); }
.rev-form input, .rev-form select, .rev-form textarea { border:1px solid var(--line); border-radius:8px; padding:7px 9px; font:inherit; font-size:.85rem; }
.rev-form button { border:0; border-radius:8px; background:var(--primary); color:#fff; padding:8px; font-weight:700; cursor:pointer; }

/* Chips de ramo (Google-like) com rolagem horizontal */
.ramo-chips { display:flex; flex-wrap:wrap; gap:8px; padding:2px 2px 4px; pointer-events:auto; }
.ramo-chips::-webkit-scrollbar { display:none; }
.ramo-chip { flex:none; display:flex; align-items:center; gap:6px; background:#fff; border:1px solid var(--line); border-radius:999px; padding:8px 14px; font-size:.84rem; font-weight:700; cursor:pointer; box-shadow:0 2px 8px rgba(0,0,0,.05); white-space:nowrap; }
.ramo-chip:hover { border-color:var(--primary); color:var(--primary); }
.ramo-chip.active { background:var(--primary); border-color:var(--primary); color:#fff; }

/* Responsivo: tablets e celulares */
@media (max-width: 1024px) {
  .stage { height: auto; display: flex; flex-direction: column; }
  #map { position: relative; inset: auto; height: 320px; order: 0; }
  .panel { position: relative; inset: auto; width: auto; padding: 12px; order: 1; pointer-events: auto; }
  .panel-head h1 { box-shadow: none; padding: 0; background: transparent; }
  .count { box-shadow: none; }
  .store-card { position: fixed; left: 12px; right: 12px; bottom: 12px; top: auto; width: auto; max-height: 72vh; }
}
@media (max-width: 700px) {
  .top { padding: 10px 12px; gap: 10px; }
  .brand { font-size: 1.05rem; }
  .search { min-width: 0; flex: 1 1 100%; flex-wrap: wrap; padding: 8px; border-radius: 18px; gap: 6px; }
  .seg, .seg-wide, .seg-small, .seg-radius { min-width: 0; flex: 1 1 100%; padding: 6px 10px; }
  .div { display: none; }
  .round { width: 40px; height: 40px; margin-left: auto; }
  .geo { padding: 9px; }
  .geo span { display: none; }
  .panel-head h1 { font-size: 1rem; }
  .price-filter { flex-wrap: wrap; }
  .price-filter .dual { flex-basis: 100%; order: 3; }
  .ramo-chips, .chips, .cat-chips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding-bottom: 4px; }
  .ramo-chips::-webkit-scrollbar, .chips::-webkit-scrollbar, .cat-chips::-webkit-scrollbar { display: none; }
  .chip, .cat-chip, .ramo-chip { flex: none; }
}
@media (max-width: 700px) {
  .seg-wide { flex: 1 1 100%; }
  .search .seg:not(.seg-wide):not(.seg-radius) { flex: 1 1 58%; }
  .seg-radius { flex: 1 1 38%; }
  .search .round { flex: none; }
}

/* Modal de todos os ramos */
.ramos-modal { position:fixed; inset:0; z-index:3200; display:grid; place-items:center; padding:18px; }
.ramos-modal[hidden] { display:none; }
.ramos-backdrop { position:absolute; inset:0; background:rgba(15,23,42,.45); }
.ramos-card { position:relative; background:#fff; border-radius:18px; width:min(560px,100%); max-height:80vh; overflow:auto; padding:18px; box-shadow:0 24px 60px rgba(0,0,0,.25); }
.ramos-head { display:flex; align-items:center; justify-content:space-between; margin-bottom:10px; }
.ramos-head h2 { margin:0; font-size:1.1rem; }
.ramos-head button { border:0; background:#f3f4f6; width:32px; height:32px; border-radius:50%; font-size:1.2rem; cursor:pointer; }
.ramos-grid { display:grid; grid-template-columns:repeat(2,1fr); gap:8px; }
.ramos-option { text-align:left; border:1px solid var(--line); background:#fff; border-radius:10px; padding:10px 12px; font-size:.85rem; font-weight:600; cursor:pointer; }
.ramos-option:hover { border-color:var(--primary); color:var(--primary); }
.ramos-option.active { background:var(--primary); border-color:var(--primary); color:#fff; }
@media (max-width:700px) { .ramos-grid { grid-template-columns:1fr; } }
@media (max-width: 700px) {
  .ramo-chips { flex-wrap: wrap; overflow: visible; }
  .ramo-chips::-webkit-scrollbar { display: none; }
}
