/* ====== Achadinhos – estilos ======
   Cores principais: troque aqui para mudar o visual do site todo. */
:root {
  --navy: #12173F;        /* barras escuras: topo, rodapé */
  --brand: #2B32A3;       /* cor da marca (índigo): cabeçalho, títulos */
  --brand-2: #3A42C4;
  --brand-soft: #EEF0FF;
  --accent: #087F44;      /* botão de compra (verde esmeralda) */
  --accent-2: #066A38;
  --accent-soft: #E3F6EC;
  --gold: #F5B83D;        /* detalhe pequeno: destaques no fundo escuro */
  --ink: #1d1d1f;
  --muted: #5f6368;
  --line: #e7e3d4;
  --bg: #fafaf7;
  --card: #ffffff;
  --green: #0a7d3b;
  --red: #e0245e;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(0,0,0,.06), 0 4px 14px rgba(0,0,0,.06);
  --header-h: 68px;
  font-synthesis: none;
}

*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 12px); }
body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.45;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
[hidden] { display: none !important; }

.wrap { width: 100%; max-width: 1280px; margin: 0 auto; padding: 0 16px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--navy); color: #fff; padding: 8px 12px; border-radius: 8px; z-index: 100; }
.skip:focus { left: 8px; }
:focus-visible { outline: 3px solid var(--brand-2); outline-offset: 2px; }

/* ===== Botões ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 10px 18px; border-radius: 999px; border: 2px solid transparent;
  font-weight: 700; text-decoration: none; transition: transform .12s, background .12s;
}
.btn:active { transform: scale(.98); }
.btn--dark { background: var(--brand); color: #fff; }
.btn--dark:hover { background: var(--brand-2); }
.btn--buy { background: var(--accent); color: #fff; box-shadow: 0 2px 0 rgba(0,0,0,.12); }
.btn--buy:hover { background: var(--accent-2); }
.btn--ghost { background: #fff; border-color: var(--line); color: var(--ink); }
.btn--ghost:hover { border-color: var(--brand); color: var(--brand); }
.icon-btn {
  display: inline-grid; place-items: center; position: relative;
  width: 44px; height: 44px; border-radius: 12px; border: 0; background: transparent;
}
.icon-btn:hover { background: rgba(127,127,127,.16); }
.badge {
  display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px;
  border-radius: 999px; background: var(--gold); color: var(--navy); font-size: 12px; font-weight: 800;
}

/* ===== Cabeçalho ===== */
.header { position: sticky; top: 0; z-index: 40; background: var(--brand); color: #fff; box-shadow: 0 1px 0 rgba(0,0,0,.08); }
.topbar { background: var(--navy); color: #f3f3f3; font-size: 13px; }
.topbar__in { display: flex; justify-content: space-between; gap: 12px; padding-top: 6px; padding-bottom: 6px; }
.topbar b { color: var(--gold); }
.header__in { display: flex; align-items: center; gap: 16px; min-height: var(--header-h); }
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; flex: none; }
.logo__mark { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; background: #fff; color: var(--brand); }
.logo__mark svg { width: 26px; height: 26px; }
.logo__text { display: flex; flex-direction: column; font-weight: 900; font-size: 22px; letter-spacing: -.02em; line-height: 1; }
.logo__text small { font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; margin-top: 3px; opacity: .75; }
.search { position: relative; flex: 1; min-width: 0; }
.search input {
  width: 100%; height: 46px; padding: 0 16px 0 44px; border-radius: 999px;
  border: 2px solid transparent; background: #fff; color: var(--ink); font-size: 16px;
}
.search input:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 4px rgba(245,184,61,.35); }
.search__icon { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.nav { display: flex; align-items: center; gap: 6px; }
.nav a, .nav__fav {
  display: inline-flex; align-items: center; gap: 6px; padding: 10px 12px; border-radius: 10px;
  font-weight: 700; text-decoration: none; border: 0; background: transparent; white-space: nowrap;
}
.nav a:hover, .nav__fav:hover { background: rgba(255,255,255,.14); }
.nav__fav.is-active { background: #fff; color: var(--brand); }
.menu-btn, .fav-mobile { display: none; }
.fav-mobile .badge { position: absolute; top: 2px; right: 0; }

/* ===== Gaveta ===== */
.drawer { position: fixed; inset: 0; z-index: 60; visibility: hidden; }
.drawer.is-open { visibility: visible; }
.drawer__backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.45); opacity: 0; transition: opacity .2s; }
.drawer.is-open .drawer__backdrop { opacity: 1; }
.drawer__panel {
  position: absolute; top: 0; bottom: 0; left: 0; width: min(86vw, 340px); background: #fff;
  transform: translateX(-100%); transition: transform .25s ease; overflow-y: auto; display: flex; flex-direction: column;
}
.drawer.is-open .drawer__panel { transform: none; }
.drawer__head { display: flex; justify-content: space-between; align-items: center; padding: 12px 12px 12px 18px; background: var(--brand); color: #fff; }
.drawer__nav { display: flex; flex-direction: column; padding: 8px; }
.drawer__nav a, .drawer__nav button {
  display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 8px 12px; border-radius: 10px;
  text-decoration: none; border: 0; background: transparent; text-align: left; font-weight: 600;
}
.drawer__nav a:hover, .drawer__nav button:hover { background: var(--brand-soft); }
.drawer__nav svg { color: var(--brand); }
.drawer__label { margin: 14px 12px 4px; font-size: 12px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }

/* ===== Banner ===== */
.hero { margin-top: 20px; }
.hero__box {
  position: relative; overflow: hidden; border-radius: 22px; background: radial-gradient(120% 140% at 85% 20%, #4A52E0 0%, var(--brand) 38%, var(--navy) 100%);
  width: 100%; aspect-ratio: 1920 / 560; min-height: 300px;
}
.hero__art img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero__placeholder {
  position: absolute; inset: 14px; display: none; place-items: center; text-align: center;
  border: 2px dashed rgba(255,255,255,.35); border-radius: 14px; color: rgba(255,255,255,.75);
  font-weight: 800; font-size: 14px; letter-spacing: .04em; text-transform: uppercase;
  background: transparent;
}
.hero__placeholder small { font-weight: 600; text-transform: none; letter-spacing: 0; opacity: .8; }
/* Sem arte: o banner fica só com o fundo em degradê (o espaço tracejado não aparece no site publicado). */
.hero.no-art .hero__placeholder { display: none; }
.hero__text {
  position: relative; z-index: 2; height: 100%; display: flex; flex-direction: column; justify-content: center;
  align-items: flex-start; gap: 10px; max-width: 620px; padding: 36px 48px; color: #fff;
}
.hero__kicker { margin: 0; display: inline-block; background: var(--gold); color: var(--navy); font-weight: 800; padding: 4px 12px; border-radius: 999px; font-size: 14px; }
.hero h1 { margin: 0; font-size: clamp(28px, 3.6vw, 46px); line-height: 1.05; letter-spacing: -.02em; }
.hero__text p:not(.hero__kicker) { margin: 0; font-size: 18px; color: #E3E6FF; }
.hero .btn--dark { background: var(--accent); color: #fff; margin-top: 6px; }
.hero .btn--dark:hover { background: var(--accent-2); }

/* ===== Botões de categoria ===== */
.cats { margin-top: 20px; }
.cats__track { display: grid; grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: 10px; }
.cat-btn {
  display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 14px 8px 12px;
  border-radius: var(--radius); border: 2px solid transparent; background: #fff; box-shadow: var(--shadow);
  font-size: 13px; font-weight: 700; line-height: 1.2; text-align: center; transition: border-color .12s, transform .12s;
}
.cat-btn:hover { transform: translateY(-2px); border-color: var(--brand-2); }
.cat-btn__icon { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 50%; background: var(--brand-soft); color: var(--brand); }
.cat-btn__icon svg { width: 26px; height: 26px; }
.cat-btn.is-active { border-color: var(--brand); }
.cat-btn.is-active .cat-btn__icon { background: var(--brand); color: #fff; }

/* ===== Layout com filtros ===== */
.layout { display: grid; grid-template-columns: 260px 1fr; gap: 24px; margin-top: 24px; align-items: start; }
.filters { position: sticky; top: calc(var(--header-h) + 44px); }
.filters__panel { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px; max-height: calc(100vh - var(--header-h) - 64px); overflow-y: auto; }
.filters__head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; font-size: 18px; }
.filters__close, .filters__apply { display: none; }
.fgroup { border: 0; margin: 0; padding: 14px 0; border-top: 1px solid var(--line); }
.fgroup legend { font-weight: 800; padding: 0; margin-bottom: 8px; }
.check { display: flex; align-items: center; gap: 10px; min-height: 36px; font-size: 14px; cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--brand); flex: none; }
.check span.count { margin-left: auto; color: var(--muted); font-size: 12px; }
.prices { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  min-height: 34px; padding: 6px 12px; border-radius: 999px; border: 1.5px solid var(--line); background: #fff;
  font-size: 13px; font-weight: 600;
}
.chip.is-active { background: var(--brand); border-color: var(--brand); color: #fff; }
.price-range { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 10px; }
.price-range label { font-size: 12px; color: var(--muted); display: grid; gap: 4px; }
.price-range input { height: 40px; width: 100%; border: 1.5px solid var(--line); border-radius: 10px; padding: 0 10px; color: var(--ink); }
.filters__actions { display: grid; gap: 8px; padding-top: 14px; border-top: 1px solid var(--line); }

/* ===== Resultados ===== */
.toolbar { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
.toolbar__info { margin: 0; color: var(--muted); font-size: 14px; flex: 1; }
.filter-btn { display: none; }
.sort select { height: 40px; border-radius: 10px; border: 1.5px solid var(--line); background: #fff; padding: 0 10px; }

.psection { margin-bottom: 34px; }
.psection__head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin: 14px 0 12px; }
.psection__head h2 { margin: 0; font-size: 22px; letter-spacing: -.01em; display: flex; align-items: center; gap: 10px; }
.psection__head h2::before { content: ""; width: 6px; height: 24px; border-radius: 3px; background: var(--brand); }
.psection__src { margin: 2px 0 0; font-size: 13px; color: var(--muted); }
.psection__src a { color: var(--ink); }
.psection__more { font-weight: 700; font-size: 14px; border: 0; background: none; text-decoration: underline; padding: 6px 0; white-space: nowrap; }

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

/* ===== Card ===== */
.card {
  position: relative; display: flex; flex-direction: column; background: var(--card); border-radius: var(--radius);
  box-shadow: var(--shadow); overflow: hidden; transition: transform .15s, box-shadow .15s;
}
.card:hover { transform: translateY(-3px); box-shadow: 0 2px 4px rgba(0,0,0,.06), 0 10px 26px rgba(0,0,0,.1); }
.card__media { position: relative; display: block; aspect-ratio: 1; background: #fff; overflow: hidden; }
.card__media img { position: absolute; inset: 12px; width: calc(100% - 24px); height: calc(100% - 24px); object-fit: contain; }
.card__rank {
  position: absolute; top: 10px; left: 10px; background: var(--navy); color: #fff;
  font-size: 12px; font-weight: 800; padding: 4px 9px; border-radius: 999px; line-height: 1.2;
}
.card__actions { position: absolute; top: 6px; right: 6px; display: flex; flex-direction: column; gap: 4px; }
.card__icon {
  display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; border: 0;
  background: rgba(255,255,255,.92); box-shadow: 0 1px 4px rgba(0,0,0,.15); color: var(--ink);
}
.card__icon svg { width: 20px; height: 20px; }
.card__icon.is-fav { color: var(--red); }
.card__icon.is-fav svg { fill: currentColor; }
.card__icon--wa { color: #128C4A; }
.card__body { display: flex; flex-direction: column; gap: 4px; padding: 10px 14px 14px; flex: 1; border-top: 1px solid #f0efe9; }
.card__store { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.card__title {
  margin: 0; font-size: 14px; font-weight: 600; line-height: 1.3; min-height: calc(1.3em * 2);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.card__title a { text-decoration: none; }
.card__title a:hover { text-decoration: underline; }
.card__price { margin: 6px 0 0; font-size: 22px; font-weight: 800; letter-spacing: -.01em; }
.card__price-to { font-size: .62em; font-weight: 700; color: var(--muted); white-space: nowrap; }
.card__date { margin: 0; font-size: 12px; color: var(--muted); }
.store-pill {
  display: inline-block; vertical-align: middle; font-size: 11px; font-weight: 800; letter-spacing: .03em;
  padding: 2px 8px; border-radius: 999px; background: var(--brand-soft); color: var(--brand); line-height: 1.4;
}
.cat-btn .store-pill { font-size: 10px; padding: 1px 6px; }
.card__cta { margin-top: 10px; width: 100%; min-height: 42px; font-size: 14px; padding: 8px 10px; }
.card__live { margin-top: 6px; font-size: 12px; text-align: center; color: var(--ink); }

/* ===== Vazio / extra ===== */
.empty { text-align: center; padding: 40px 16px; background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); }
.slot { margin: 10px auto 30px; }

/* ===== Rodapé ===== */
.footer { margin-top: 40px; background: var(--navy); color: #E3E6FF; padding: 34px 0 40px; }
.seals { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.seals li { display: flex; gap: 12px; align-items: flex-start; padding: 16px; border-radius: var(--radius); background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.1); }
.seals svg { width: 30px; height: 30px; color: #6EE7A8; }
.seals strong { display: block; color: #fff; }
.seals span { font-size: 13px; color: #B8BEE6; }
.footer__legal { margin-top: 24px; font-size: 13px; color: #B8BEE6; }
.footer__legal a { color: #fff; }
.disclaimer { color: #fff; font-size: 14px; padding: 14px 16px; border-left: 4px solid var(--gold); background: rgba(255,255,255,.06); border-radius: 0 10px 10px 0; }
.copy { opacity: .7; }

/* ===== Voltar ao topo / aviso ===== */
.to-top {
  position: fixed; right: 16px; bottom: 18px; z-index: 30; width: 50px; height: 50px; border-radius: 50%;
  border: 0; background: var(--brand); color: #fff; display: none; place-items: center; box-shadow: 0 6px 18px rgba(0,0,0,.25);
}
.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); z-index: 70; opacity: 0; pointer-events: none;
  background: var(--navy); color: #fff; padding: 10px 16px; border-radius: 999px; font-size: 14px; transition: .2s;
  max-width: calc(100vw - 32px); text-align: center;
}
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }

/* ===== Tablet ===== */
@media (max-width: 1100px) {
  .nav a { display: none; }
  .seals { grid-template-columns: repeat(2, 1fr); }
}

/* ===== Celular ===== */
@media (max-width: 860px) {
  :root { --header-h: 112px; }
  .topbar__in > span:first-child { display: none; }
  .topbar__in { justify-content: center; }
  .header__in { flex-wrap: wrap; gap: 6px 8px; padding-top: 8px; padding-bottom: 10px; min-height: 0; }
  .menu-btn, .fav-mobile { display: inline-grid; }
  .logo { flex: 1; }
  .logo__mark { width: 36px; height: 36px; }
  .logo__text { font-size: 20px; }
  .nav { display: none; }
  .search { order: 3; flex-basis: 100%; }
  .search input { height: 44px; }

  .hero { margin-top: 12px; }
  .hero__box { aspect-ratio: auto; min-height: 0; border-radius: 18px; }
  .hero__text { padding: 26px 20px 24px; }
  .hero__text p:not(.hero__kicker) { font-size: 16px; }
  .hero.no-art .hero__placeholder { inset: 8px; }
  .hero.no-art .hero__placeholder span { display: none; }

  .cats { margin-top: 14px; padding: 0; }
  .cats__track {
    display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 4px 16px 10px;
    scrollbar-width: none; -webkit-overflow-scrolling: touch;
  }
  .cats__track::-webkit-scrollbar { display: none; }
  .cat-btn { flex: 0 0 96px; scroll-snap-align: start; padding: 12px 6px 10px; font-size: 12px; box-shadow: 0 1px 3px rgba(0,0,0,.08); }
  .cat-btn__icon { width: 46px; height: 46px; }

  .layout { grid-template-columns: 1fr; margin-top: 12px; }
  .filters { position: fixed; inset: 0; z-index: 65; top: 0; visibility: hidden; background: rgba(0,0,0,0); transition: background .2s, visibility .2s; }
  .filters.is-open { visibility: visible; background: rgba(0,0,0,.45); }
  .filters__panel {
    position: absolute; left: 0; right: 0; bottom: 0; max-height: 88vh; border-radius: 20px 20px 0 0;
    transform: translateY(100%); transition: transform .25s ease; padding: 16px 16px calc(16px + env(safe-area-inset-bottom));
  }
  .filters.is-open .filters__panel { transform: none; }
  .filters__close, .filters__apply { display: inline-flex; }
  .filters__actions { grid-template-columns: 1fr 1fr; position: sticky; bottom: -16px; background: #fff; padding-bottom: 4px; }

  .filter-btn { display: inline-flex; min-height: 40px; padding: 6px 14px; }
  .toolbar { flex-wrap: wrap; }
  .toolbar__info { order: 3; flex-basis: 100%; }
  .sort { margin-left: auto; }

  .psection__head h2 { font-size: 19px; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .card__media img { inset: 8px; width: calc(100% - 16px); height: calc(100% - 16px); }
  .card__body { padding: 8px 10px 12px; }
  .card__title { font-size: 13px; }
  .card__price { font-size: 19px; }
  .card__cta { font-size: 13px; min-height: 40px; padding: 8px 6px; }
  .card__rank { top: 6px; left: 6px; font-size: 12px; padding: 3px 8px; }
  .card__rank-cat { display: none; }
  .card__icon { width: 34px; height: 34px; }

  .seals { grid-template-columns: 1fr; }
  .to-top { display: grid; }
  .to-top[hidden] { display: none !important; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; }
}
