/* ==========================================================
   Achado Web: vitrine de afiliados multi-loja
   Cores principais: altere aqui para mudar o visual do site.
   ========================================================== */
:root {
  --navy: #0a1633;
  --navy-2: #0f1f47;
  --navy-3: #172d63;
  --yellow: #ffc81e;
  --yellow-2: #f2b600;
  --green: #14a44d;
  --green-2: #0e8a3f;
  --bg: #f2f4f8;
  --card: #ffffff;
  --line: #e2e6ee;
  --text: #111827;
  --muted: #5b6475;
  --blue: #1a56db;
  --danger: #e11d48;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .06), 0 2px 8px rgba(16, 24, 40, .05);
  --shadow-lg: 0 10px 30px rgba(10, 22, 51, .18);
  --container: 1440px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 16px; }
body { margin: 0; font-family: var(--font); font-size: 15px; line-height: 1.45; color: var(--text); background: var(--bg); -webkit-font-smoothing: antialiased; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
h1, h2, h3 { margin: 0; line-height: 1.2; }
ul { margin: 0; padding: 0; list-style: none; }
fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--yellow); outline-offset: 2px; border-radius: 6px; }

.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--yellow); color: var(--navy); padding: 10px 14px; border-radius: 8px; font-weight: 700; }
.skip-link:focus { top: 12px; }
.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 24px; }
.ic { width: 20px; height: 20px; flex: none; }
.ic-sm { width: 16px; height: 16px; }
.icon-btn { display: inline-flex; align-items: center; justify-content: center; width: 42px; height: 42px; border-radius: 10px; color: inherit; }
.icon-btn:hover { background: rgba(255, 255, 255, .08); }
.badge { display: inline-flex; align-items: center; justify-content: center; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--yellow); color: var(--navy); font-size: 11px; font-weight: 800; line-height: 1; }
.only-mobile { display: none !important; }

/* ---------- Cabeçalho ---------- */
.site-header { background: var(--navy); color: #fff; position: relative; z-index: 30; }
.header-top { display: flex; align-items: center; gap: 28px; padding-top: 16px; padding-bottom: 16px; }
.menu-toggle { display: none; }
.logo { display: inline-flex; align-items: center; gap: 10px; color: #fff; flex: none; }
.logo-icon { width: 54px; height: 54px; color: var(--yellow); }
.logo-text { display: flex; flex-direction: column; line-height: .95; }
.logo-name { font-size: 30px; font-weight: 900; font-style: italic; letter-spacing: -.5px; }
.logo-name b { font-weight: 900; color: var(--yellow); }
.logo-domain { align-self: flex-end; font-size: 15px; font-weight: 800; letter-spacing: .5px; }
.logo--small .logo-icon { width: 36px; height: 36px; }
.logo--small .logo-name { font-size: 22px; }

.search { flex: 1; max-width: 640px; margin: 0 auto; display: flex; background: #fff; border-radius: 12px; overflow: hidden; box-shadow: 0 0 0 2px transparent; transition: box-shadow .15s; }
.search:focus-within { box-shadow: 0 0 0 3px rgba(255, 200, 30, .55); }
.search input { flex: 1; min-width: 0; border: 0; padding: 13px 18px; font-size: 16px; color: var(--text); background: transparent; outline: none; }
.search input::-webkit-search-cancel-button { cursor: pointer; }
.search button { width: 58px; background: var(--yellow); color: var(--navy); display: grid; place-items: center; }
.search button:hover { background: var(--yellow-2); }
.search button .ic { width: 24px; height: 24px; }

.fav-link { display: inline-flex; align-items: center; gap: 10px; color: #fff; font-weight: 600; padding: 8px 10px; border-radius: 10px; flex: none; }
.fav-link:hover, .fav-link[aria-pressed="true"] { background: rgba(255, 255, 255, .1); }
.fav-link[aria-pressed="true"] .fav-icon { color: var(--yellow); }
.fav-icon { position: relative; display: inline-flex; }
.fav-icon .ic { width: 28px; height: 28px; }
.fav-icon .badge { position: absolute; top: -6px; right: -9px; }

.header-nav { background: var(--navy-2); border-top: 1px solid rgba(255, 255, 255, .08); }
.nav-inner { display: flex; align-items: center; gap: 22px; min-height: 52px; }
.cat-menu { position: relative; }
.cat-menu-btn { display: inline-flex; align-items: center; gap: 10px; background: var(--yellow); color: var(--navy); font-weight: 800; padding: 0 18px; height: 52px; border-radius: 12px 12px 0 0; margin-top: 4px; }
.cat-menu-btn:hover { background: var(--yellow-2); }
.cat-menu-btn[aria-expanded="true"] .ic-sm { transform: rotate(180deg); }
.cat-dropdown { position: absolute; top: 100%; left: 0; width: min(760px, 90vw); max-height: 70vh; overflow: auto; background: #fff; color: var(--text); border-radius: 0 12px 12px 12px; box-shadow: var(--shadow-lg); padding: 18px 20px; display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 18px; }
.cat-dropdown h3 { font-size: 13px; text-transform: uppercase; letter-spacing: .6px; color: var(--muted); margin-bottom: 8px; display: flex; align-items: center; gap: 8px; }
.cat-dropdown button, .cat-dropdown a { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; padding: 7px 8px; border-radius: 8px; font-size: 14px; }
.cat-dropdown button:hover, .cat-dropdown a:hover { background: var(--bg); }
.cat-dropdown button .ic, .cat-dropdown a .ic { color: var(--navy-3); width: 18px; height: 18px; }
.nav-links { display: flex; align-items: center; gap: 4px; overflow-x: auto; scrollbar-width: none; }
.nav-links::-webkit-scrollbar { display: none; }
.nav-links a { display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 8px; font-weight: 700; font-size: 14.5px; white-space: nowrap; }
.nav-links a .ic { color: var(--yellow); }
.nav-links a:hover, .nav-links a[aria-current="true"] { background: rgba(255, 255, 255, .1); }

/* ---------- Gaveta (celular) ---------- */
.drawer { position: fixed; inset: 0; z-index: 60; }
.drawer-backdrop, .filters-backdrop { position: fixed; inset: 0; background: rgba(5, 12, 30, .55); }
.drawer-panel { position: absolute; top: 0; bottom: 0; left: 0; width: min(340px, 86vw); background: #fff; display: flex; flex-direction: column; box-shadow: var(--shadow-lg); animation: slide-in .2s ease-out; }
@keyframes slide-in { from { transform: translateX(-100%); } to { transform: none; } }
.drawer-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 12px 12px 16px; background: var(--navy); color: #fff; }
.drawer-body { overflow-y: auto; padding: 8px 0 24px; }
.drawer-body h3 { font-size: 12px; text-transform: uppercase; letter-spacing: .6px; color: var(--muted); padding: 16px 18px 6px; }
.drawer-body a, .drawer-body button { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; padding: 11px 18px; font-size: 15px; font-weight: 600; }
.drawer-body a:hover, .drawer-body button:hover { background: var(--bg); }
.drawer-body .ic { color: var(--navy-3); }
.drawer-body .sub { font-weight: 500; padding-left: 30px; }

/* ---------- Banner ---------- */
.hero-wrap { margin-top: 16px; }
.hero { position: relative; overflow: hidden; border-radius: 16px; aspect-ratio: 1920 / 460; width: 100%;
  background: radial-gradient(ellipse 60% 120% at 78% 60%, rgba(255, 170, 0, .55), transparent 60%), radial-gradient(ellipse 40% 80% at 95% 10%, rgba(255, 210, 60, .35), transparent 70%), linear-gradient(100deg, #071029 0%, #0d2257 55%, #1a2f6e 100%);
  color: #fff; display: flex; align-items: center; }
.hero-art { position: absolute; inset: 0; }
/* Arte dos produtos: encostada à direita, com a borda esquerda esmaecida para se fundir ao fundo azul */
.hero-art img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: right center; }
.hero-slot { display: none; position: absolute; top: 18px; bottom: 18px; right: 18px; width: 46%; border: 2px dashed rgba(255, 255, 255, .5); border-radius: 12px; align-items: center; justify-content: center; text-align: center; font-size: 14px; color: rgba(255, 255, 255, .85); line-height: 1.6; }
.hero-slot code { background: rgba(0, 0, 0, .35); padding: 2px 8px; border-radius: 6px; font-size: 13px; }
.hero-slot-mobile { display: none; }
.hero.no-art .hero-art { display: none; }
.hero.no-art .hero-slot { display: flex; }
.hero-text { position: relative; padding: 30px 48px; max-width: 820px; }
.hero h1 { font-size: clamp(28px, 3.1vw, 46px); font-weight: 900; font-style: italic; letter-spacing: -1px; text-shadow: 0 2px 12px rgba(0, 0, 0, .35); }
.hero h1 em { color: var(--yellow); display: block; }
.hero p { font-size: clamp(16px, 1.45vw, 21px); font-weight: 600; margin: 12px 0 20px; max-width: 600px; text-shadow: 0 1px 8px rgba(0, 0, 0, .4); }
.hero .hl { color: var(--yellow); }
.btn-hero { display: inline-flex; align-items: center; gap: 10px; background: var(--yellow); color: var(--navy); font-weight: 800; font-size: 18px; padding: 13px 28px; border-radius: 999px; box-shadow: 0 6px 18px rgba(255, 200, 30, .35); }
.btn-hero:hover { background: var(--yellow-2); }

/* ---------- Abas de loja ---------- */
.store-tabs { display: flex; gap: 10px; margin-top: 18px; overflow-x: auto; scrollbar-width: none; padding: 2px; }
.store-tabs::-webkit-scrollbar { display: none; }
.store-tab { display: inline-flex; align-items: center; gap: 8px; padding: 10px 18px; border-radius: 999px; background: #fff; border: 1.5px solid var(--line); font-weight: 700; white-space: nowrap; box-shadow: var(--shadow); }
.store-tab:hover { border-color: var(--navy-3); }
.store-tab[aria-pressed="true"] { background: var(--navy); color: #fff; border-color: var(--navy); }
.store-tab .count { font-size: 12px; font-weight: 700; padding: 1px 7px; border-radius: 999px; background: var(--bg); color: var(--muted); }
.store-tab[aria-pressed="true"] .count { background: rgba(255, 255, 255, .15); color: #fff; }

/* ---------- Botões de categoria ---------- */
/* 12 blocos ("Todas" + 11 categorias) em 2 linhas cheias de 6 */
.cat-tiles { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; margin-top: 14px; }
.cat-tile { width: 100%; min-height: 96px; background: #fff; border: 1.5px solid var(--line); border-radius: var(--radius); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; padding: 12px 8px; text-align: center; font-size: 13.5px; font-weight: 600; line-height: 1.2; box-shadow: var(--shadow); transition: border-color .15s, transform .15s; }
.cat-tile .ic { width: 34px; height: 34px; color: var(--navy); }
.cat-tile:hover { border-color: var(--navy-3); transform: translateY(-1px); }
.cat-tile[aria-pressed="true"], .cat-tile[aria-current="page"] { border-color: var(--yellow-2); background: #fff8df; }
.cat-tile[aria-pressed="true"] .ic, .cat-tile[aria-current="page"] .ic { color: #b07d00; }

/* ---------- Etiqueta da loja (texto, sem logo) ---------- */
.store-tag { display: inline-flex; align-items: center; padding: 3px 9px; border-radius: 999px; font-size: 11.5px; font-weight: 800; letter-spacing: .2px; white-space: nowrap; background: var(--tag-bg, #e5e7eb); color: var(--tag-fg, #111827); }

/* ---------- Layout com filtros ---------- */
.layout { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 20px; margin-top: 18px; margin-bottom: 40px; align-items: start; }
.filters { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px; position: sticky; top: 12px; max-height: calc(100vh - 24px); overflow-y: auto; }
.filters-head { display: flex; align-items: center; justify-content: space-between; padding-bottom: 12px; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.filters-head h2 { display: flex; align-items: center; gap: 10px; font-size: 18px; }
.filter-group { padding: 12px 0; }
.filter-label { display: block; font-weight: 800; font-size: 14.5px; margin-bottom: 8px; padding: 0; }
.filters select, .minmax input { width: 100%; height: 40px; border: 1.5px solid var(--line); border-radius: 9px; padding: 0 10px; background: #fff; font-size: 14px; }
.filters select:focus, .minmax input:focus { border-color: var(--navy-3); outline: none; }
.radio { display: flex; align-items: center; gap: 10px; padding: 5px 0; font-size: 14.5px; cursor: pointer; }
.radio input { width: 18px; height: 18px; accent-color: var(--navy); margin: 0; }
.minmax { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 8px; }
.filter-note { font-size: 12.5px; color: var(--muted); margin: 10px 0 0; }
.filter-note.warn { color: #9a6700; }
.filters-actions { display: flex; gap: 8px; padding-top: 8px; }
.btn-ghost { flex: 1; height: 40px; border-radius: 9px; border: 1.5px solid var(--line); font-weight: 700; font-size: 14px; }
.btn-ghost:hover { border-color: var(--navy-3); }
.btn-primary { flex: 1; height: 44px; border-radius: 10px; background: var(--navy); color: #fff; font-weight: 800; }
.chip-row { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { padding: 8px 14px; border-radius: 999px; border: 1.5px solid var(--line); font-weight: 700; font-size: 14px; background: #fff; }
.chip[aria-pressed="true"] { background: var(--navy); color: #fff; border-color: var(--navy); }

/* ---------- Resultados ---------- */
.toolbar { display: flex; align-items: center; gap: 12px; min-height: 22px; }
.summary { margin: 0; color: var(--muted); font-size: 14px; }
.summary strong { color: var(--text); }
.summary .link-btn { color: var(--blue); font-weight: 700; text-decoration: underline; text-underline-offset: 2px; }
.btn-filter { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 16px; border-radius: 10px; background: #fff; border: 1.5px solid var(--line); font-weight: 800; box-shadow: var(--shadow); flex: none; }

.store-group { margin-top: 18px; }
.store-group + .store-group { margin-top: 30px; }
.store-group-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding-bottom: 8px; border-bottom: 2px solid var(--line); }
.store-group-head h2 { font-size: 22px; font-weight: 900; display: flex; align-items: center; gap: 10px; }
.store-group-head h2 .ic { color: #e8a300; width: 26px; height: 26px; }
.store-group-note { font-size: 13px; color: var(--muted); margin: 8px 0 0; }

.section { margin-top: 18px; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.section-head h3 { font-size: 19px; font-weight: 800; display: flex; align-items: center; gap: 10px; }
.section-head h3 .ic { width: 24px; height: 24px; color: var(--navy-3); }
.section-source { font-size: 12.5px; color: var(--muted); margin: 3px 0 0; }
.section-source strong { color: var(--text); font-weight: 700; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(196px, 1fr)); gap: 14px; }
.more-btn { display: block; margin: 14px auto 0; padding: 10px 22px; border-radius: 999px; border: 1.5px solid var(--navy-3); color: var(--navy-3); font-weight: 800; background: #fff; }
.more-btn:hover { background: var(--navy); color: #fff; }

/* ---------- Card de produto ---------- */
.card { position: relative; background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); border: 1px solid var(--line); padding: 12px; display: flex; flex-direction: column; gap: 8px; transition: box-shadow .15s, transform .15s; }
.card:hover { box-shadow: 0 8px 24px rgba(16, 24, 40, .12); transform: translateY(-2px); }
.card.is-highlight { outline: 3px solid var(--yellow); outline-offset: 2px; animation: pulse 1.2s ease-out 2; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(255, 200, 30, .7); } 100% { box-shadow: 0 0 0 16px rgba(255, 200, 30, 0); } }
.card-top { display: flex; align-items: center; gap: 6px; min-height: 30px; }
.rank { display: inline-flex; align-items: center; justify-content: center; min-width: 30px; height: 26px; padding: 0 7px; border-radius: 8px; background: var(--navy); color: var(--yellow); font-weight: 900; font-size: 13px; }
.card-top .store-tag { margin-right: auto; }
.fav-btn { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; color: #9aa3b2; flex: none; }
.fav-btn:hover { background: var(--bg); color: var(--danger); }
.fav-btn .ic { width: 22px; height: 22px; }
.fav-btn[aria-pressed="true"] { color: var(--danger); }
.fav-btn[aria-pressed="true"] path { fill: currentColor; }
.card-img { display: block; aspect-ratio: 1 / 1; border-radius: 8px; overflow: hidden; background: #fff; }
.card-img img { width: 100%; height: 100%; object-fit: contain; }
.img-missing { width: 100%; height: 100%; display: grid; place-items: center; background: var(--bg); color: var(--muted); font-size: 13px; text-align: center; padding: 12px; }
.card-title { font-size: 14.5px; font-weight: 600; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; min-height: calc(1.3em * 2); }
.card-title a:hover { color: var(--blue); }
.card-price { margin-top: auto; display: flex; flex-direction: column; gap: 2px; }
.price { font-size: 21px; font-weight: 900; color: var(--text); letter-spacing: -.3px; }
.price-link { display: inline; font-size: 13px; font-weight: 700; color: var(--blue); }
.price-link:hover { text-decoration: underline; }
.price-link .ic { width: 14px; height: 14px; display: inline-block; vertical-align: -2px; margin-left: 4px; }
.price-link--solo { font-size: 15px; padding: 6px 0; }
.price-disclaimer { font-size: 11px; color: var(--muted); margin: 2px 0 0; }
.price-date { display: block; font-size: 11px; color: var(--muted); margin-top: 1px; }
.btn-buy { display: flex; align-items: center; justify-content: center; gap: 6px; min-height: 42px; padding: 8px 10px; border-radius: 9px; background: var(--green); color: #fff; font-weight: 800; font-size: 14px; text-align: center; line-height: 1.15; }
.btn-buy:hover { background: var(--green-2); }
.btn-buy .ic { width: 17px; height: 17px; }
.share-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; font-size: 13px; font-weight: 700; color: #128c4b; padding: 4px; border-radius: 8px; }
.share-btn:hover { background: #e9f8ef; }
.share-btn .ic { width: 17px; height: 17px; }

.empty { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 40px 24px; text-align: center; color: var(--muted); margin-top: 18px; }
.empty h2 { color: var(--text); font-size: 20px; margin-bottom: 8px; }
.empty .btn-ghost { display: inline-block; flex: none; padding: 0 18px; margin-top: 14px; line-height: 37px; }

/* ---------- Rodapé ---------- */
.site-footer { background: var(--navy); color: #d5dbea; margin-top: 30px; }
.footer-seals { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; padding-top: 26px; padding-bottom: 22px; border-bottom: 1px solid rgba(255, 255, 255, .1); }
.seal { display: flex; gap: 12px; align-items: flex-start; }
.seal .ic { width: 34px; height: 34px; color: var(--yellow); }
.seal strong { display: block; color: #fff; font-size: 15px; }
.seal span { font-size: 13px; }
.footer-main { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 24px; padding-top: 26px; padding-bottom: 22px; }
.footer-brand p { margin: 12px 0 0; font-weight: 600; color: #fff; }
.footer-brand .logo-icon { width: 44px; height: 44px; }
.footer-brand .logo-name { font-size: 24px; }
.footer-col h2 { font-size: 15px; color: #fff; margin-bottom: 10px; }
.footer-col li { margin: 6px 0; font-size: 14px; }
.footer-col a:hover, .footer-col button:hover { color: var(--yellow); }
.footer-col button { font-size: 14px; color: inherit; text-align: left; }
.footer-legal { border-top: 1px solid rgba(255, 255, 255, .1); padding-top: 18px; padding-bottom: 28px; font-size: 13px; color: #b9c2d6; }
.footer-legal p { margin: 0 0 8px; max-width: 980px; }
.footer-legal .copy { margin-top: 12px; color: #8d97ad; }

/* ---------- Botão voltar ao topo e aviso ---------- */
.to-top { position: fixed; right: 16px; bottom: calc(18px + env(safe-area-inset-bottom)); z-index: 40; width: 48px; height: 48px; border-radius: 50%; background: var(--yellow); color: var(--navy); display: grid; place-items: center; box-shadow: var(--shadow-lg); }
.to-top .ic { width: 24px; height: 24px; }
.to-top { border: 2px solid var(--navy); opacity: .95; transition: transform .15s, background .15s, opacity .15s; }
.to-top:hover { background: var(--yellow-2); opacity: 1; transform: translateY(-2px); }
.to-top:focus-visible { outline: 3px solid var(--navy); outline-offset: 3px; }
.toast { position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom)); transform: translate(-50%, 20px); z-index: 70; background: var(--navy); color: #fff; padding: 11px 18px; border-radius: 10px; font-weight: 600; font-size: 14px; box-shadow: var(--shadow-lg); opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; max-width: calc(100vw - 32px); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Páginas de texto (Sobre / Privacidade) ---------- */
.page { max-width: 860px; margin: 24px auto 0; background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 34px 40px; }
.page h1 { font-size: 30px; margin-bottom: 8px; }
.page h2 { font-size: 21px; margin: 28px 0 8px; scroll-margin-top: 16px; }
.page p, .page li { color: #333c4e; font-size: 16px; line-height: 1.65; }
.page ul { list-style: disc; padding-left: 22px; }
.page a { color: var(--blue); text-decoration: underline; }
.page .muted { color: var(--muted); font-size: 14px; }
.back-link { display: inline-flex; align-items: center; gap: 8px; color: #fff; font-weight: 700; padding: 8px 12px; border-radius: 10px; margin-left: auto; }
.back-link:hover { background: rgba(255, 255, 255, .1); }

/* ==========================================================
   Tablet e celular
   ========================================================== */
@media (max-width: 1100px) {
  .footer-seals { grid-template-columns: repeat(2, 1fr); }
  .footer-main { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 960px) {
  .container { padding: 0 14px; }
  .only-mobile { display: flex !important; }
  .header-top { flex-wrap: wrap; gap: 6px 10px; padding-top: 10px; padding-bottom: 12px; }
  .menu-toggle { display: inline-flex; margin-left: -8px; }
  .logo-icon { width: 40px; height: 40px; }
  .logo-name { font-size: 23px; }
  .logo-domain { font-size: 11px; }
  .fav-link { margin-left: auto; padding: 8px; }
  .fav-label { display: none; }
  .search { order: 3; flex-basis: 100%; max-width: none; }
  .search input { padding: 11px 14px; }
  .header-nav { display: none; }

  .hero { aspect-ratio: auto; min-height: 260px; }
  .hero-text { padding: 26px 28px; max-width: 62%; }

  .store-tabs { margin-top: 14px; margin-left: -14px; margin-right: -14px; padding: 2px 14px; }
  .cat-tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
  .cat-tile { min-height: 84px; font-size: 12.5px; padding: 10px 6px; }
  .cat-tile .ic { width: 28px; height: 28px; }

  .layout { grid-template-columns: minmax(0, 1fr); margin-top: 14px; }
  .filters { position: fixed; z-index: 65; left: 0; right: 0; bottom: 0; top: auto; max-height: 86vh; border-radius: 18px 18px 0 0; padding: 16px 18px calc(16px + env(safe-area-inset-bottom)); transform: translateY(105%); transition: transform .22s ease-out; box-shadow: var(--shadow-lg); }
  .filters.open { transform: none; }
  .filters-backdrop { z-index: 64; }
  .filters-actions { position: sticky; bottom: calc(-16px - env(safe-area-inset-bottom)); background: #fff; padding: 12px 0 4px; }
  .toolbar { flex-wrap: wrap; }
}

@media (max-width: 640px) {
  body { font-size: 14.5px; }
  .cat-tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .cat-tile { min-height: 74px; gap: 6px; font-size: 12px; }
  .cat-tile .ic { width: 24px; height: 24px; }
  /* Celular: texto em cima e a arte (quadrada) embaixo, sem sobrepor */
  .hero { min-height: auto; aspect-ratio: auto; flex-direction: column; align-items: stretch; }
  .hero-text { order: 1; max-width: none; }
  .hero-art { position: relative; inset: auto; order: 2; margin-top: -6px; }
  .hero-art img { position: static; display: block; width: 100%; height: auto; max-width: none; aspect-ratio: 1080 / 794; object-position: center bottom;
    -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 16%); mask-image: linear-gradient(to bottom, transparent 0, #000 16%); }
  .hero.no-art { aspect-ratio: 1 / 1; }
  .hero-slot { top: auto; left: 14px; right: 14px; bottom: 14px; width: auto; height: 30%; font-size: 12px; }
  .hero-slot code { font-size: 11px; }
  .hero-slot-desktop { display: none; }
  .hero-slot-mobile { display: block; }
  .hero-text { padding: 20px 18px; }
  .hero h1 { font-size: clamp(23px, 7vw, 30px); letter-spacing: -.5px; }
  .hero p { font-size: 14.5px; margin: 8px 0 14px; }
  .btn-hero { font-size: 15px; padding: 10px 20px; }
  .store-tab { padding: 8px 14px; font-size: 14px; }

  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .card { padding: 9px; gap: 6px; }
  .card:hover { transform: none; }
  .card-top { min-height: 28px; gap: 4px; }
  .rank { min-width: 26px; height: 22px; font-size: 12px; padding: 0 5px; }
  .store-tag { font-size: 10px; padding: 2px 7px; }
  .fav-btn { width: 30px; height: 30px; margin-right: -4px; }
  .card-title { font-size: 13.5px; }
  .price { font-size: 18px; }
  .price-link { font-size: 12px; }
  .price-link--solo { font-size: 14px; }
  .btn-buy { font-size: 13px; min-height: 40px; padding: 6px 8px; }
  .share-btn { font-size: 12px; }
  .store-group-head h2 { font-size: 19px; }
  .section-head h3 { font-size: 17px; }

  .footer-seals { grid-template-columns: 1fr; gap: 14px; }
  .footer-main { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
  .page { margin: 14px 10px 0; padding: 22px 18px; }
  .page h1 { font-size: 25px; }
}

@media (min-width: 961px) {
  .to-top { right: 28px; bottom: 28px; width: 52px; height: 52px; }
}

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

/* ---------- Cabeçalho fixo no topo e ajustes ---------- */
.site-header { position: sticky; top: 0; }
html { scroll-padding-top: calc(var(--header-h, 0px) + 12px); }
.filters { top: calc(var(--header-h, 0px) + 12px); max-height: calc(100vh - var(--header-h, 0px) - 24px); }
.link-btn { font-size: inherit; }
details.price-disclaimer { font-size: 11.5px; color: var(--muted); }
details.price-disclaimer summary { cursor: pointer; color: var(--blue); font-weight: 600; list-style: none; }
details.price-disclaimer summary::-webkit-details-marker { display: none; }
details.price-disclaimer[open] { background: var(--bg); border-radius: 6px; padding: 6px 8px; }
fieldset:disabled .radio, fieldset:disabled .minmax { opacity: .45; cursor: not-allowed; }
@media (max-width: 960px) {
  .filters { top: auto; max-height: 86vh; }
}
