/* =========================================================
   Garimpei Ofertas — estilos
   Cores principais ficam aqui em cima (:root) para facilitar troca.
   ========================================================= */
:root {
  --yellow: #FFD000;
  --yellow-2: #FFE566;
  --yellow-soft: #FFF6CC;
  --ink: #141414;
  --ink-2: #3a3a3a;
  --muted: #6b6b6b;
  --line: #ECECEC;
  --bg: #F5F5F3;
  --card: #FFFFFF;
  --green: #1FA855;
  --star: #F5A623;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(0,0,0,.04), 0 4px 16px rgba(0,0,0,.05);
  --header-h: 72px;
  --font: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 12px); -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); color: var(--ink); background: var(--bg); line-height: 1.5; overflow-x: hidden; }
img { max-width: 100%; display: block; }
a { color: inherit; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3 { line-height: 1.15; margin: 0; }
.wrap { width: 100%; max-width: 1280px; margin: 0 auto; padding: 0 16px; }
.muted { color: var(--muted); }
.small { font-size: .82rem; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -9999px; top: 8px; background: var(--ink); color: #fff; padding: 8px 12px; border-radius: 8px; z-index: 100; }
.skip:focus { left: 8px; }
.ic { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
:focus-visible { outline: 3px solid #1a73e8; outline-offset: 2px; }

.only-mobile { display: none !important; }

/* ---------- Botões ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: 999px; padding: 12px 22px; font-weight: 700; text-decoration: none; transition: transform .12s, background .2s, box-shadow .2s; }
.btn:active { transform: scale(.98); }
.btn--dark { background: var(--ink); color: #fff; }
.btn--dark:hover { background: #000; }
.btn--yellow { background: var(--yellow); color: var(--ink); }
.btn--yellow:hover { background: #FFC700; }
.btn--ghost { background: transparent; border: 1.5px solid var(--line); color: var(--ink-2); }
.btn--ghost:hover { border-color: var(--ink); }
.btn--filter { background: var(--card); border: 1.5px solid var(--line); padding: 10px 16px; }
.icon-btn { display: inline-grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; border: 0; background: transparent; position: relative; text-decoration: none; }
.icon-btn:hover { background: rgba(0,0,0,.06); }
.badge { display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 99px; background: var(--ink); color: #fff; font-size: .68rem; font-weight: 700; line-height: 1; }
.badge[hidden] { display: none; }

/* ---------- Cabeçalho ---------- */
.topbar { position: sticky; top: 0; z-index: 40; background: #fff; border-bottom: 1px solid var(--line); }
.topbar__in { display: flex; align-items: center; gap: 24px; height: var(--header-h); }
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; flex: none; }
.logo__mark { width: 42px; height: 42px; border-radius: 12px; background: var(--yellow); display: grid; place-items: center; }
.logo__mark .ic { width: 24px; height: 24px; stroke-width: 2.2; }
.logo__txt { display: flex; flex-direction: column; line-height: 1.1; }
.logo__txt strong { font-size: 1.3rem; font-weight: 800; letter-spacing: -.02em; }
.logo__txt em { font-style: normal; color: #E0A800; }
.logo__txt small { font-size: .72rem; color: var(--muted); font-weight: 500; }

.search { flex: 1; max-width: 560px; display: flex; align-items: center; background: var(--bg); border: 1.5px solid transparent; border-radius: 999px; padding: 4px 4px 4px 18px; transition: border-color .2s, background .2s; }
.search:focus-within { border-color: var(--yellow); background: #fff; }
.search input { flex: 1; border: 0; background: transparent; outline: none; padding: 8px 0; min-width: 0; font-size: .95rem; }
.search input::-webkit-search-cancel-button { cursor: pointer; }
.search__btn { width: 42px; height: 38px; border-radius: 999px; border: 0; background: var(--yellow); display: grid; place-items: center; }

.nav { display: flex; gap: 22px; margin-left: auto; }
.nav a { text-decoration: none; font-weight: 600; font-size: .92rem; color: var(--ink-2); padding: 6px 0; border-bottom: 2.5px solid transparent; display: inline-flex; gap: 6px; align-items: center; }
.nav a:hover, .nav a.is-active { color: var(--ink); border-color: var(--yellow); }

/* ---------- Gaveta (menu celular) ---------- */
.scrim { position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 60; }
.scrim[hidden] { display: none; }
.drawer { position: fixed; top: 0; left: 0; bottom: 0; width: min(320px, 86vw); background: #fff; z-index: 70; transform: translateX(-102%); transition: transform .25s ease; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 8px; }
.drawer.is-open { transform: none; }
.drawer__head { display: flex; justify-content: space-between; align-items: center; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.drawer__nav { display: flex; flex-direction: column; }
.drawer__nav a { padding: 12px 6px; text-decoration: none; font-weight: 600; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; }
.drawer__cats-title { margin: 12px 0 4px; font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 700; }
.drawer__cats { display: flex; flex-direction: column; gap: 2px; }
.drawer__cats button { display: flex; align-items: center; gap: 10px; text-align: left; border: 0; background: transparent; padding: 10px 6px; border-radius: 10px; font-weight: 500; }
.drawer__cats button:hover { background: var(--bg); }

/* ---------- Banner ---------- */
.hero { margin-top: 20px; display: grid; grid-template-columns: 1fr 1.15fr; min-height: 340px; border-radius: 22px; overflow: hidden; background: linear-gradient(110deg, var(--yellow) 0%, var(--yellow-2) 55%, #FFF0A8 100%); box-shadow: var(--shadow); }
.hero__text { padding: 40px 44px; display: flex; flex-direction: column; gap: 16px; justify-content: center; }
.hero h1 { font-size: clamp(1.7rem, 3.2vw, 2.7rem); font-weight: 800; letter-spacing: -.03em; }
.hero p { margin: 0; color: #2a2a2a; font-size: 1.02rem; max-width: 46ch; }
.hero .btn { align-self: flex-start; }
.hero__seals { list-style: none; margin: 6px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px 18px; font-size: .82rem; font-weight: 600; }
.hero__seals li { display: flex; align-items: center; gap: 6px; }
.hero__seals .ic { width: 18px; height: 18px; }
.hero__media { position: relative; min-height: 260px; }
.hero__media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero__ph { display: none; }
.hero__media.is-empty img { display: none; }
.hero__media.is-empty .hero__ph { display: flex; position: absolute; inset: 18px; border: 2.5px dashed rgba(0,0,0,.28); border-radius: 18px; flex-direction: column; align-items: center; justify-content: center; gap: 4px; color: rgba(0,0,0,.55); text-align: center; font-size: .85rem; background: rgba(255,255,255,.25); }
.hero__ph strong { font-size: 1.05rem; color: rgba(0,0,0,.7); }

/* ---------- Categorias ---------- */
.cats { display: grid; grid-template-columns: repeat(11, minmax(0, 1fr)); gap: 10px; margin: 22px 0 6px; }
.cat { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 14px 6px; min-height: 86px; background: var(--card); border: 1.5px solid var(--line); border-radius: var(--radius); font-size: .76rem; font-weight: 600; text-align: center; line-height: 1.2; transition: border-color .2s, background .2s, transform .12s; }
.cat .ic { width: 26px; height: 26px; stroke-width: 1.8; }
.cat:hover { border-color: var(--yellow); transform: translateY(-1px); }
.cat[aria-selected="true"] { background: var(--yellow); border-color: var(--yellow); }

/* ---------- Layout ---------- */
.layout { display: grid; grid-template-columns: 250px 1fr; gap: 22px; align-items: start; margin-top: 18px; }

/* ---------- Filtros ---------- */
.filters { position: sticky; top: calc(var(--header-h) + 16px); background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px; max-height: calc(100vh - var(--header-h) - 32px); overflow-y: auto; }
.filters__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.filters__head strong { display: flex; align-items: center; gap: 8px; font-size: 1.05rem; }
.fgroup { border: 0; border-top: 1px solid var(--line); margin: 0; padding: 14px 0; }
.fgroup legend { font-weight: 700; font-size: .88rem; padding: 0; margin-bottom: 8px; float: left; width: 100%; }
.fgroup legend + * { clear: both; }
.check, .radio { display: flex; align-items: center; gap: 10px; padding: 5px 0; font-size: .88rem; cursor: pointer; }
.check input, .radio input { width: 17px; height: 17px; accent-color: var(--ink); margin: 0; flex: none; }
.radio .count { margin-left: auto; color: var(--muted); font-size: .78rem; }
.price-presets { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.price-presets button { border: 1.5px solid var(--line); background: #fff; border-radius: 99px; padding: 5px 10px; font-size: .78rem; font-weight: 600; }
.price-presets button.is-on { background: var(--yellow); border-color: var(--yellow); }
.price-range { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.price-range label { display: flex; flex-direction: column; gap: 2px; font-size: .74rem; color: var(--muted); }
.price-range input, .fgroup select { width: 100%; padding: 9px 10px; border: 1.5px solid var(--line); border-radius: var(--radius-sm); background: #fff; font-size: .9rem; color: var(--ink); }
.price-range input:focus, .fgroup select:focus { border-color: var(--ink); outline: none; }
.filters__foot { display: flex; gap: 8px; padding-top: 12px; border-top: 1px solid var(--line); }
.filters__foot .btn { flex: 1; padding: 10px 14px; font-size: .88rem; }

/* ---------- Resultados ---------- */
.results__head { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; margin-bottom: 12px; }
.results__head h2 { font-size: 1.45rem; font-weight: 800; letter-spacing: -.02em; }
.results__head p { margin: 4px 0 0; font-size: .84rem; }
.results__head a { color: var(--ink-2); }
.block { margin-bottom: 28px; }
.block__head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.block__head h3 { font-size: 1.12rem; font-weight: 800; display: flex; align-items: center; gap: 8px; }
.block__head h3 .ic { width: 22px; height: 22px; padding: 4px; box-sizing: content-box; background: var(--yellow); border-radius: 8px; }
.block__head a, .block__head button.link { font-size: .84rem; font-weight: 700; color: #B98600; text-decoration: none; background: none; border: 0; padding: 0; white-space: nowrap; }
.block__head a:hover, .block__head button.link:hover { text-decoration: underline; }

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

/* ---------- Card ---------- */
.card { position: relative; background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); display: flex; flex-direction: column; overflow: hidden; transition: box-shadow .2s, transform .2s; }
.card:hover { box-shadow: 0 2px 4px rgba(0,0,0,.05), 0 10px 28px rgba(0,0,0,.09); transform: translateY(-2px); }
.card__media { display: block; aspect-ratio: 1 / 1; background: #fff; padding: 14px; }
.card__media img { width: 100%; height: 100%; object-fit: contain; }
.card__rank { position: absolute; top: 10px; left: 10px; background: var(--ink); color: #fff; font-size: .68rem; font-weight: 700; padding: 4px 8px; border-radius: 8px; line-height: 1.2; max-width: calc(100% - 64px); }
.card__rank b { color: var(--yellow); }
.card__fav { position: absolute; top: 6px; right: 6px; width: 38px; height: 38px; border-radius: 50%; border: 0; background: rgba(255,255,255,.92); display: grid; place-items: center; box-shadow: 0 1px 4px rgba(0,0,0,.12); }
.card__fav .ic { width: 19px; height: 19px; }
.card__fav[aria-pressed="true"] { color: #E53935; }
.card__fav[aria-pressed="true"] .ic { fill: #E53935; }
.card__body { padding: 0 14px 14px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.card__cat { font-size: .7rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 700; }
.card__title { font-size: .9rem; font-weight: 600; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.6em; text-decoration: none; }
.card__title:hover { text-decoration: underline; }
.card__rating { display: flex; align-items: center; gap: 5px; font-size: .78rem; color: var(--muted); }
.card__rating .stars { color: var(--star); letter-spacing: 1px; font-size: .82rem; }
.card__price { font-size: 1.35rem; font-weight: 800; letter-spacing: -.02em; margin-top: 2px; }
.card__date { font-size: .72rem; color: var(--muted); margin-top: -4px; }
.card__check { font-size: .75rem; font-weight: 600; color: #2F6FDB; text-decoration: none; display: block; line-height: 1.35; }
.card__check .ic { width: 12px; height: 12px; vertical-align: -1px; margin-left: 2px; }
.card__check:hover { text-decoration: underline; }
.card__actions { display: flex; margin-top: auto; padding-top: 6px; }
.card__actions .btn { flex: 1; padding: 10px 8px; font-size: .82rem; white-space: nowrap; gap: 6px; }
.card__actions .btn .ic { width: 15px; height: 15px; }
.card__share { position: absolute; top: 50px; right: 6px; width: 38px; height: 38px; border-radius: 50%; background: rgba(255,255,255,.92); box-shadow: 0 1px 4px rgba(0,0,0,.12); display: grid; place-items: center; color: #1DA851; text-decoration: none; }
.card__share:hover { background: #EFFAF3; }
.card__share .ic { width: 19px; height: 19px; }

.empty { text-align: center; background: var(--card); border-radius: var(--radius); padding: 40px 20px; box-shadow: var(--shadow); }
.empty p { margin: 0 0 6px; }
.empty .btn { margin-top: 12px; }
.empty[hidden] { display: none; }

.skeleton { background: linear-gradient(90deg, #eee 25%, #f6f6f6 50%, #eee 75%); background-size: 200% 100%; animation: sk 1.2s infinite; border-radius: var(--radius); height: 340px; }
@keyframes sk { to { background-position: -200% 0; } }

/* ---------- Sobre / privacidade ---------- */
.info { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin: 30px auto 40px; }
.info__card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 26px; scroll-margin-top: calc(var(--header-h) + 16px); }
.info__card h2 { font-size: 1.2rem; font-weight: 800; margin-bottom: 10px; }
.info__card p { margin: 0 0 10px; font-size: .92rem; color: var(--ink-2); }

/* ---------- Rodapé ---------- */
.footer { background: var(--ink); color: #ddd; padding: 34px 0 24px; }
.seals { list-style: none; margin: 0 0 26px; padding: 0 0 26px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; border-bottom: 1px solid #2c2c2c; }
.seals li { display: flex; gap: 12px; align-items: center; }
.seals .ic { width: 40px; height: 40px; padding: 9px; box-sizing: border-box; background: var(--yellow); color: var(--ink); border-radius: 12px; }
.seals strong { display: block; color: #fff; font-size: .9rem; }
.seals span { font-size: .78rem; color: #aaa; }
.footer__bottom { display: flex; justify-content: space-between; gap: 30px; }
.footer__brand { max-width: 680px; }
.logo--footer .logo__txt strong { color: #fff; }
.logo--footer .logo__txt em { color: var(--yellow); }
.disclosure { margin: 14px 0 8px; font-size: .9rem; color: #fff; background: #1f1f1f; border-left: 3px solid var(--yellow); padding: 10px 14px; border-radius: 6px; }
.footer .muted { color: #9a9a9a; }
.footer__links { display: flex; flex-direction: column; gap: 8px; font-size: .88rem; }
.footer__links a { text-decoration: none; color: #ddd; }
.footer__links a:hover { color: var(--yellow); }
.copy { margin: 22px 0 0; }

/* ---------- Voltar ao topo ---------- */
.to-top { position: fixed; right: 16px; bottom: 18px; z-index: 30; width: 48px; height: 48px; border-radius: 50%; border: 0; background: var(--ink); color: var(--yellow); display: none; place-items: center; box-shadow: 0 6px 18px rgba(0,0,0,.25); }

/* =========================================================
   Tablet
   ========================================================= */
@media (max-width: 1100px) {
  .nav { gap: 14px; }
  .nav a[href="#sobre"] { display: none; }
  .cats { display: flex; overflow-x: auto; scroll-snap-type: x proximity; padding-bottom: 6px; scrollbar-width: thin; }
  .cat { flex: 0 0 104px; scroll-snap-align: start; }
}

/* =========================================================
   Celular
   ========================================================= */
@media (max-width: 860px) {
  :root { --header-h: 116px; }
  .only-mobile { display: inline-grid !important; }
  .btn.only-mobile { display: inline-flex !important; }
  .only-desktop { display: none !important; }
  .topbar__in { flex-wrap: wrap; height: auto; gap: 8px 6px; padding-top: 8px; padding-bottom: 10px; }
  .logo { flex: 1; min-width: 0; }
  .logo__mark { width: 36px; height: 36px; border-radius: 10px; }
  .logo__txt strong { font-size: 1.12rem; }
  .logo__txt small { display: none; }
  .fav-top .badge { position: absolute; top: 2px; right: 2px; }
  .search { order: 5; flex: 0 0 100%; max-width: none; }

  .hero { grid-template-columns: 1fr; margin-top: 14px; border-radius: 18px; }
  .hero__text { padding: 24px 20px 18px; gap: 12px; }
  .hero p { font-size: .94rem; }
  .hero__seals { gap: 8px 14px; font-size: .76rem; }
  .hero__media { aspect-ratio: 3 / 2; min-height: 0; }
  .hero__media.is-empty .hero__ph { inset: 12px; }

  .cats { margin-top: 16px; gap: 8px; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
  .cats::-webkit-scrollbar { display: none; }
  .cat { flex: 0 0 auto; min-height: 0; flex-direction: row; padding: 9px 14px; border-radius: 999px; font-size: .82rem; white-space: nowrap; }
  .cat .ic { width: 18px; height: 18px; }

  .layout { grid-template-columns: 1fr; margin-top: 12px; }
  .filters { position: fixed; top: auto; left: 0; right: 0; bottom: 0; z-index: 70; max-height: 86vh; border-radius: 20px 20px 0 0; transform: translateY(105%); transition: transform .25s ease; padding: 18px 18px calc(18px + env(safe-area-inset-bottom)); box-shadow: 0 -10px 30px rgba(0,0,0,.2); }
  .filters.is-open { transform: none; }
  .filters__foot { position: sticky; bottom: -18px; background: #fff; padding-bottom: 4px; }

  .results__head { align-items: center; }
  .results__head h2 { font-size: 1.2rem; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .card__media { padding: 10px; }
  .card__body { padding: 0 10px 10px; gap: 5px; }
  .card__title { font-size: .82rem; }
  .card__price { font-size: 1.15rem; }
  .card__rank { font-size: .62rem; top: 8px; left: 8px; padding: 3px 6px; }
  .card__actions .btn { font-size: .76rem; padding: 9px 4px; gap: 4px; }
  .card__actions .btn .ic { display: none; }
  .card__fav, .card__share { width: 34px; height: 34px; }
  .card__share { top: 44px; }
  .card__check { font-size: .7rem; }

  .info { grid-template-columns: 1fr; }
  .seals { grid-template-columns: 1fr 1fr; }
  .footer__bottom { flex-direction: column; }
  .to-top { display: grid; }
  .to-top[hidden] { display: none; }
}

@media (max-width: 380px) {
  .card__actions .btn { font-size: .7rem; }
  .seals { grid-template-columns: 1fr; }
}

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