/* ========= Reset básico da página ========= */
:root{
  --bg:#ffffff;
  --ink:#111827;
  --muted:#6b7280;
  --brand:#2563eb;
  --brand-2:#0ea5e9;
  --card:#f8fafc;
  --line:#e5e7eb;
  --pill:#f3f4f6;
  --ok:#16a34a;
}

html,body{background:var(--bg);color:var(--ink);}
*{box-sizing:border-box}
img{max-width:100%;display:block}

/* Mantém alinhado com o header fixo */
.hv-header-spacer{height:64px}

/* ========= HERO (banners) ========= */
.hero{
  width:100%;
  max-width:1440px;
  margin:24px auto 8px;
  padding:0 16px;
  overflow:hidden;                 /* corta qualquer sangramento lateral */
}
.hero-track{
  --per-view: 1;
  --hero-gap: 16px;
  display:flex;
  gap:var(--hero-gap);
  justify-content:flex-start;      /* estabilidade: o JS centraliza via padding */
  will-change:transform;
}
@media (min-width:640px){  .hero-track{ --per-view: 2; } }
@media (min-width:1024px){ .hero-track{ --per-view: 3; } }
@media (min-width:1280px){ .hero-track{ --per-view: 4; } }

/* largura exata do card descontando o gap e mantendo proporção 16:6 */
.hero-card{
  flex: 0 0 calc((100% - (var(--hero-gap) * (var(--per-view) - 1))) / var(--per-view));
  border-radius:16px;
  overflow:hidden;
  background:linear-gradient(180deg,#0ea5e9,#2563eb);
  box-shadow:0 6px 18px rgba(2,6,23,.06);
  height: clamp(240px, 26vw, 380px); /* ajuste se quiser mais/menos alto */
  border-radius: 16px;
  overflow: hidden;

  /* mantém proporção e centraliza conteúdo sem cortar */
  aspect-ratio: 16 / 6;
  display:flex;
  align-items:center;
  justify-content:center;
}
/* mobile */
.hero-card{ height: 200px; }
@media (min-width: 640px){  .hero-card{ height: 200px; } }
@media (min-width: 1024px){ .hero-card{ height: 200px; } }
@media (min-width: 1440px){ .hero-card{ height: 200px; } }

.hero-card img{
  width: 100%;
  height: 100%;
  object-fit: cover;      /* <- preenche sem sobras */
  object-position: center;/* centraliza o recorte */
  display: block;
  background: #eef2f7;
}

/* indicadores */
.hero-dots{display:flex;gap:6px;justify-content:center;margin:10px 0 0}
.hero-dots .dot{
  width:7px;height:7px;border-radius:999px;background:#d1d5db;display:inline-block
}
.hero-dots .dot.active{background:var(--brand)}

/* ========= Barra de busca ========= */
.search-wrap{max-width:1200px;margin:12px auto;padding:0 16px}
.search{
  display:grid;gap:10px;grid-template-columns: 1fr 1fr 180px 120px auto auto max-content;
}
@media (max-width:980px){
  .search{grid-template-columns:1fr}
}
.pill{
  display:flex;align-items:center;gap:10px;
  background:var(--pill);border:1px solid var(--line);
  padding:10px 12px;border-radius:999px;
}
.pill svg{width:18px;height:18px}
.pill input[type="search"], .pill input[type="text"], .pill select{
  border:none;background:transparent;outline:none;width:100%;font:inherit;color:inherit;
}
.pill.sm{padding:8px 12px;font-size:.92rem}
.btn{
  border:1px solid var(--line);background:#fff;border-radius:999px;padding:10px 16px;cursor:pointer
}
.btn:hover{background:#f9fafb}
.btn.primary{background:var(--brand);border-color:var(--brand);color:#fff}
.btn.primary:hover{filter:brightness(0.95)}

/* ========= Seções / cards ========= */
.sections{max-width:1200px;margin:24px auto 80px;padding:0 16px}
.section-head{display:flex;align-items:center;justify-content:space-between;margin:18px 4px}
.section-head h3{margin:0;font-size:1.15rem}
.section-head .more{color:var(--brand);text-decoration:none}
.section-head .more:hover{text-decoration:underline}

.grid{
  display:grid;gap:14px;
  grid-template-columns: repeat(12,1fr);
}
@media (max-width:640px){ .grid{grid-template-columns: repeat(6,1fr);} }

.card{
  grid-column: span 12;
  background:var(--card);border:1px solid var(--line);border-radius:14px;
  padding:12px;
}
@media (min-width:640px){ .card{grid-column: span 6;} }
@media (min-width:1024px){ .card{grid-column: span 4;} }

.card .row{display:grid;grid-template-columns:72px 1fr;gap:12px;align-items:center}
.logo{width:72px;height:72px;border-radius:12px;overflow:hidden;background:#fff;border:1px solid var(--line)}
.logo img{width:100%;height:100%;object-fit:cover}

.card h4{margin:0 0 4px 0;font-size:1.02rem}
.card .meta{color:var(--muted);font-size:.92rem;margin-bottom:6px}

.badges{display:flex;flex-wrap:wrap;gap:6px;margin-bottom:8px}
.badge{
  background:#eef2ff;border:1px solid #e5e7eb;color:#4338ca;
  padding:4px 8px;border-radius:999px;font-size:.82rem
}
.badge.ok{background:#ecfdf5;border-color:#dcfce7;color:#065f46}

/* botões do card (desktop padrão) */
.actions{display:flex;gap:8px}

/* === Ações do card — responsivo === */
@media (max-width: 780px){
  .card .actions{
    display:grid;
    grid-template-columns: 1fr 1fr; /* 2 botões lado a lado */
    gap:8px;
  }
  .card .btn{
    padding:10px 12px;
    font-size:.95rem;
    line-height:1.1;
  }
}
@media (max-width: 360px){
  .card .actions{ grid-template-columns: 1fr; } /* empilha se muito estreito */
}

/* ========= Modal cidade unificado com header ========= */
.city-modal{
  position:fixed; inset:0; display:none; align-items:center; justify-content:center;
  z-index:2147483500 !important; padding:16px;
}
.city-modal.is-open{ display:flex; }
.city-modal .backdrop{
  position:fixed; inset:0; background:rgba(0,0,0,.45);
  z-index:2147483499 !important;
}

/* Painel do modal — nome exclusivo para evitar conflitos */
.city-modal .city-panel{
  position:relative;
  z-index:2147483501 !important;
  background:#ffffff !important;
  color:inherit;
  border-radius:14px;
  max-width:560px; width:100%;
  padding:18px;
  border:1px solid var(--line);
  box-shadow:0 30px 80px rgba(2,6,23,.25);
  display:block !important;     /* força visível */
  opacity:1 !important;         /* previne efeitos herdados */
  transform:none !important;    /* previne animações conflitantes */
}

/* ========= Footer ========= */
footer{margin-top:40px}

/* ========= Pequenas melhorias ========= */
/* === Centralizar botões nos cards de destaque (apenas telas pequenas) === */
.hub-destaque .card-actions,
.hub-destaque .actions,
.store-card .card-actions,
.store-card .actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;     /* centraliza horizontalmente */
  align-items: center;
  text-align: center;          /* fallback */
}
/* 425px ↓  (iPhone 12/13/14, etc.) */
@media (max-width: 1024px) {
  .hub-destaque .card-actions .btn,
  .store-card .card-actions .btn {
    font-size: 13px;
    line-height: 1;
    padding: 10px 14px;
  }
}


/* 425px ↓  (iPhone 12/13/14, etc.) */
@media (max-width: 425px) {
  .hub-destaque .card-actions .btn,
  .store-card .card-actions .btn {
    font-size: 13px;
    line-height: 1;
    padding: 10px 14px;
  }
}

/* 375px ↓  (iPhone SE/8, alguns Androids compactos) */
@media (max-width: 375px) {
  .hub-destaque .card-actions .btn,
  .store-card .card-actions .btn {
    font-size: 12px;
    padding: 9px 12px;
  }
}
/* Travar a cor do "Ver loja" nos cards (inclui :visited) */
.store-card .card-actions a,
.store-card .card-actions a:link,
.store-card .card-actions a:visited {
  color: #2f66ff !important;   /* azul padrão */
  text-decoration: none;
}

.store-card .card-actions a:hover,
.store-card .card-actions a:active,
.store-card .card-actions a:focus {
  color: #1646e8 !important;   /* azul mais escuro no hover/focus */
}

/* Se seu wrapper for .hub-destaque em vez de .store-card, mantenha também: */
.hub-destaque .card-actions a,
.hub-destaque .card-actions a:link,
.hub-destaque .card-actions a:visited {
  color: #2f66ff !important;
}
.hub-destaque .card-actions a:hover,
.hub-destaque .card-actions a:active,
.hub-destaque .card-actions a:focus {
  color: #1646e8 !important;
}
