/* ===== Bazar CyberPiu ===== */
:root {
  --bg: #0b0b0d;
  --bg-2: #141418;
  --panel: #1a1a1f;
  --line: #2a2a31;
  --text: #f3f3f5;
  --muted: #a3a3ad;
  --yellow: #ffc21a;
  --yellow-2: #ff9f0a;
  --card: #ffffff;
  --card-text: #16161a;
  --card-muted: #6a6a74;
  --green: #25d366;
  --radius: 12px;
  --shadow: 0 6px 20px rgba(0, 0, 0, .35);
  --font: "Poppins", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 500 15px/1.45 var(--font);
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
button, input, select { font: inherit; }
button { cursor: pointer; }
svg { width: 1.2em; height: 1.2em; flex: none; }
[hidden] { display: none !important; }
.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(--yellow); color: #000; padding: 8px 12px; z-index: 100; border-radius: 6px; }
.skip:focus { left: 8px; }
:focus-visible { outline: 3px solid var(--yellow); outline-offset: 2px; }

.wrap { width: 100%; max-width: 1440px; margin: 0 auto; padding: 0 16px; }
.muted { color: var(--muted); }

/* ---------- Botões ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 0; border-radius: 10px; padding: 11px 18px;
  font-weight: 700; text-decoration: none; line-height: 1.1;
  transition: transform .15s, filter .15s;
}
.btn:hover { filter: brightness(1.06); }
.btn:active { transform: translateY(1px); }
.btn-yellow { background: linear-gradient(180deg, var(--yellow), var(--yellow-2)); color: #111; }
.btn-ghost { background: transparent; color: var(--muted); border: 1px solid var(--line); }
.btn-block { width: 100%; margin-top: 10px; }
.icon-btn {
  display: inline-grid; place-items: center; width: 42px; height: 42px;
  border: 0; border-radius: 10px; background: transparent; color: var(--text);
}
.icon-btn svg { width: 26px; height: 26px; }

/* ---------- Cabeçalho ---------- */
.site-header { position: sticky; top: 0; z-index: 40; background: var(--bg); border-bottom: 1px solid var(--line); }
.header-top { display: flex; align-items: center; gap: 24px; padding-top: 12px; padding-bottom: 12px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; flex: none; }
.brand img { width: 56px; height: 56px; }
.brand-text { display: flex; flex-direction: column; line-height: .9; font-style: italic; font-weight: 800; }
.brand-text small { font-size: 18px; color: #e9e9ee; }
.brand-text strong { font-size: 30px; color: #fff; letter-spacing: -.5px; }
.brand-text em { color: var(--yellow); font-style: italic; }

.search { flex: 1; display: flex; max-width: 720px; margin: 0 auto; }
.search input {
  flex: 1; min-width: 0; height: 48px; padding: 0 22px;
  border: 0; border-radius: 999px 0 0 999px; background: #fff; color: #111; font-size: 15px;
}
.search input::placeholder { color: #777; }
.search button {
  width: 64px; border: 0; border-radius: 0 999px 999px 0;
  background: linear-gradient(180deg, var(--yellow), var(--yellow-2)); color: #111;
  display: grid; place-items: center;
}
.search button svg { width: 24px; height: 24px; }

.fav-btn {
  position: relative; display: flex; align-items: center; gap: 8px;
  background: none; border: 0; color: var(--text); font-size: 12.5px; text-align: left; line-height: 1.2;
}
.fav-btn svg { width: 30px; height: 30px; }
.fav-btn[aria-pressed="true"] { color: var(--yellow); }
.badge {
  position: absolute; top: -6px; left: 20px; min-width: 20px; height: 20px; padding: 0 5px;
  border-radius: 999px; background: var(--yellow-2); color: #111; font-size: 11px; font-weight: 800;
  display: grid; place-items: center;
}

.main-nav { background: var(--bg-2); border-top: 1px solid var(--line); }
.nav-inner { display: flex; align-items: center; gap: 36px; min-height: 46px; }
.main-nav a, .nav-cats, .nav-note {
  display: inline-flex; align-items: center; gap: 8px;
  color: var(--text); text-decoration: none; font-weight: 600; font-size: 14.5px;
  background: none; border: 0; padding: 0;
}
.main-nav svg { color: var(--yellow); }
.main-nav a:hover { color: var(--yellow); }
.nav-cats svg { color: var(--yellow); width: 22px; height: 22px; }
.nav-note { margin-left: auto; color: var(--muted); font-weight: 500; }

/* ---------- Gaveta ---------- */
.overlay { position: fixed; inset: 0; background: rgba(0,0,0,.6); z-index: 60; }
.drawer {
  position: fixed; top: 0; left: 0; bottom: 0; width: min(320px, 86vw); z-index: 70;
  background: var(--bg-2); border-right: 1px solid var(--line);
  transform: translateX(-102%); transition: transform .25s ease; overflow-y: auto;
  padding-bottom: 24px;
}
.drawer.open { transform: none; }
.drawer-head { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.drawer-head .brand-text strong { font-size: 24px; }
.drawer-head .brand-text small { font-size: 15px; }
.drawer-nav a, .drawer-nav button {
  display: flex; align-items: center; gap: 12px; width: 100%;
  padding: 13px 18px; color: var(--text); text-decoration: none; font-weight: 600;
  background: none; border: 0; text-align: left;
}
.drawer-nav a:hover, .drawer-nav button:hover { background: var(--panel); }
.drawer-nav svg { color: var(--yellow); width: 22px; height: 22px; }
.drawer-title { margin: 16px 18px 4px; font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }

/* ---------- Banner ---------- */
.hero { margin-top: 14px; }
.hero-box {
  position: relative; overflow: hidden; border-radius: 16px;
  aspect-ratio: 1920 / 600; min-height: 300px;
  background: radial-gradient(120% 140% at 85% 30%, #2a1c00 0%, #0f0f13 55%) ;
  border: 1px solid #3a2c08;
}
.hero-art, .hero-art img { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero-art img { object-fit: cover; }
.hero-placeholder { display: none; }
.hero-box.no-art .hero-art { display: none; }
.hero-box.no-art .hero-placeholder {
  position: absolute; top: 14px; bottom: 14px; right: 14px; width: 46%;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  border: 2px dashed rgba(255, 194, 26, .55); border-radius: 12px;
  color: rgba(255, 255, 255, .8); text-align: center; padding: 12px;
}
.hero-placeholder span { font-weight: 700; font-size: 18px; color: var(--yellow); }
.hero-placeholder code { font-size: 13px; background: rgba(0,0,0,.4); padding: 3px 8px; border-radius: 6px; }
.hero-placeholder .ph-mob { display: none; }

.hero-text {
  position: relative; z-index: 2; height: 100%;
  display: flex; flex-direction: column; justify-content: center; align-items: flex-start;
  padding: 24px clamp(20px, 4vw, 56px); max-width: 52%;
}
.hero-text h1 {
  margin: 0; font-size: clamp(28px, 3.2vw, 50px); line-height: 1.08; font-weight: 800; font-style: italic;
  text-shadow: 0 3px 12px rgba(0,0,0,.6); transform: rotate(-2deg); transform-origin: left;
}
.hero-text h1 span { display: block; }
.hero-text mark { background: none; color: var(--yellow); }
.hero-text p { margin: 12px 0 18px; font-size: clamp(14px, 1.4vw, 20px); font-weight: 700; font-style: italic; text-shadow: 0 2px 8px rgba(0,0,0,.7); }
.hero-text .btn { font-size: 17px; padding: 13px 26px; border-radius: 12px; }

/* ---------- Títulos de seção ---------- */
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 22px 0 12px; }
.bar-title { margin: 0; font-size: 21px; font-weight: 700; padding-left: 14px; border-left: 5px solid var(--yellow); line-height: 1.15; }

/* ---------- Categorias ---------- */
.cat-row {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(128px, 1fr)); gap: 10px;
}
.cat-chip {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
  min-height: 98px; padding: 12px 8px; border-radius: var(--radius);
  background: var(--panel); border: 1px solid var(--line); color: var(--text);
  font-size: 13px; font-weight: 600; text-align: center; line-height: 1.2;
  transition: border-color .15s, transform .15s;
}
.cat-chip svg { width: 36px; height: 36px; color: var(--yellow); }
.cat-chip:hover { border-color: var(--yellow); transform: translateY(-2px); }
.cat-chip[aria-pressed="true"] { border-color: var(--yellow); background: #2a2208; }
.cat-chip .n { font-size: 11px; color: var(--muted); font-weight: 500; }

.notice {
  margin-top: 16px; padding: 12px 16px; border-radius: 10px;
  background: #2a2208; border: 1px solid #5b4508; color: #ffe39a; font-size: 14px;
}
.notice strong { color: var(--yellow); }

/* ---------- Layout principal ---------- */
.layout {
  display: grid; grid-template-columns: 240px minmax(0, 1fr) 300px; gap: 18px;
  align-items: start; margin-top: 22px; margin-bottom: 40px;
}
.layout.no-top { grid-template-columns: 240px minmax(0, 1fr); }

.filters {
  position: sticky; top: 140px;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px;
}
.filters-head { display: flex; align-items: center; justify-content: space-between; }
.filters h2 { display: flex; align-items: center; gap: 8px; margin: 0 0 6px; font-size: 19px; }
.filters h2 svg { color: var(--yellow); }
.f-label { display: block; margin: 14px 0 6px; font-weight: 700; font-size: 14px; }
.filters select, .filters input[type="number"] {
  width: 100%; height: 42px; padding: 0 12px; border-radius: 8px;
  border: 1px solid var(--line); background: #24242b; color: var(--text);
}
.price-row { display: flex; align-items: center; gap: 6px; color: var(--muted); }
.price-row input { -moz-appearance: textfield; }
.price-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.price-chips button {
  border: 1px solid var(--line); background: #24242b; color: var(--text);
  border-radius: 999px; padding: 5px 10px; font-size: 12px;
}
.price-chips button.on { border-color: var(--yellow); color: var(--yellow); }
.switch { display: flex; align-items: center; justify-content: space-between; margin: 16px 0 4px; font-weight: 700; font-size: 14px; cursor: pointer; }
.switch input { position: absolute; opacity: 0; }
.switch i { width: 42px; height: 24px; border-radius: 999px; background: #3a3a44; position: relative; transition: background .2s; }
.switch i::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: transform .2s; }
.switch input:checked + i { background: var(--yellow-2); }
.switch input:checked + i::after { transform: translateX(18px); }
.switch input:focus-visible + i { outline: 3px solid var(--yellow); outline-offset: 2px; }

.results-bar { display: flex; align-items: center; gap: 12px; margin-bottom: 4px; }
.results-info { margin: 0; color: var(--muted); font-size: 14px; }
.btn-filter { background: var(--panel); color: var(--text); border: 1px solid var(--line); position: relative; }
.btn-filter svg { color: var(--yellow); }
.btn-filter .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--yellow); }

/* Seção de produtos */
.p-section {
  background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 14px; margin-bottom: 18px; scroll-margin-top: 150px;
}
.p-section .section-head { margin: 0 0 12px; flex-wrap: wrap; }
.p-section h2 { margin: 0; display: flex; align-items: center; gap: 8px; font-size: 20px; color: var(--yellow); }
.p-section h2 svg { width: 26px; height: 26px; }
.meta { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 12.5px; color: var(--muted); }
.meta a { color: var(--yellow); }

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

/* Card */
.card {
  position: relative; display: flex; flex-direction: column;
  background: var(--card); color: var(--card-text); border-radius: 10px; overflow: hidden;
  border: 1px solid #e6e6ea; transition: transform .15s, box-shadow .15s;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.card-img { display: block; aspect-ratio: 1; background: #fff; padding: 12px; }
.card-img img { width: 100%; height: 100%; object-fit: contain; }
.rank {
  position: absolute; top: 8px; left: 8px; z-index: 2;
  background: linear-gradient(180deg, var(--yellow), var(--yellow-2)); color: #111;
  font-weight: 800; font-size: 12px; padding: 3px 9px; border-radius: 999px;
}
.heart {
  position: absolute; top: 6px; right: 6px; z-index: 2;
  width: 36px; height: 36px; display: grid; place-items: center;
  border-radius: 50%; border: 0; background: rgba(255,255,255,.92); color: #8a8a94;
  box-shadow: 0 1px 4px rgba(0,0,0,.15);
}
.heart svg { width: 20px; height: 20px; }
.heart.on { color: #e5243b; }
.heart.pop { animation: pop .3s; }
@keyframes pop { 50% { transform: scale(1.25); } }

.card-body { display: flex; flex-direction: column; flex: 1; padding: 4px 12px 12px; }
.card-cat { font-size: 11px; color: var(--card-muted); text-transform: uppercase; letter-spacing: .04em; font-weight: 600; }
.card-title {
  margin: 3px 0 6px; font-size: 14px; font-weight: 600; line-height: 1.3;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.6em;
}
.card-title a { text-decoration: none; }
.card-title a:hover { text-decoration: underline; }
.price { font-size: 21px; font-weight: 800; letter-spacing: -.3px; }
.price-date { font-size: 11.5px; color: var(--card-muted); margin-bottom: 4px; }
.price-now { font-size: 12px; color: #2d6cdf; font-weight: 600; text-decoration: none; margin-bottom: 10px; }
.price-now:hover { text-decoration: underline; }
.card-actions { display: flex; gap: 8px; margin-top: auto; }
.card-actions .btn { flex: 1; padding: 10px 8px; font-size: 13.5px; border-radius: 8px; }
.wa {
  flex: none; width: 40px; display: grid; place-items: center; border-radius: 8px;
  background: var(--green); color: #fff; border: 0;
}
.wa svg { width: 22px; height: 22px; }
.btn[aria-disabled="true"] { background: #e3e3e8; color: #777; pointer-events: none; }

.empty { text-align: center; padding: 50px 16px; color: var(--muted); background: var(--bg-2); border: 1px dashed var(--line); border-radius: var(--radius); }
.empty strong { display: block; color: var(--text); font-size: 18px; margin-bottom: 6px; }

/* Ranking lateral */
.top-rank {
  position: sticky; top: 140px;
  background: #fff; color: var(--card-text); border-radius: var(--radius); padding: 14px;
}
.top-rank h2 { display: flex; align-items: center; gap: 8px; margin: 0 0 8px; font-size: 18px; }
.top-rank h2 svg { color: var(--yellow-2); width: 26px; height: 26px; }
.top-rank ol { list-style: none; margin: 0; padding: 0; }
.top-rank li + li { border-top: 1px solid #eee; }
.top-rank a { display: grid; grid-template-columns: 64px 1fr; gap: 10px; align-items: center; padding: 10px 0; text-decoration: none; }
.top-rank img { width: 64px; height: 64px; object-fit: contain; }
.top-rank .t-cat { font-size: 11px; color: var(--card-muted); text-transform: uppercase; font-weight: 600; }
.top-rank .t-name { font-size: 13.5px; font-weight: 600; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.top-rank .t-price { font-weight: 800; }
.top-rank .src { margin: 8px 0 0; font-size: 12px; color: var(--card-muted); }
.top-rank .src a { display: inline; color: #2d6cdf; padding: 0; }

/* ---------- Rodapé ---------- */
.site-footer { border-top: 3px solid var(--yellow); background: #070708; padding-top: 28px; }
.foot-grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr 1.6fr; gap: 24px; padding-bottom: 22px; border-bottom: 1px solid var(--line); }
.foot-brand { display: flex; align-items: center; gap: 14px; }
.slogan { margin: 0; font-style: italic; font-weight: 800; font-size: 17px; line-height: 1.25; }
.site-footer h3 { margin: 0 0 8px; font-size: 15px; }
.site-footer a { display: block; color: var(--muted); text-decoration: none; font-size: 14px; padding: 3px 0; }
.site-footer a:hover { color: var(--yellow); }
.socials { display: flex; gap: 10px; }
.socials a { color: var(--text); }
.socials svg { width: 30px; height: 30px; }
.seals { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.seals li { display: flex; gap: 12px; align-items: center; font-size: 13px; color: var(--muted); }
.seals svg { width: 32px; height: 32px; color: var(--yellow); }
.seals strong { display: block; color: var(--text); font-size: 14px; }
.disclaimer { padding: 18px 16px 28px; font-size: 13.5px; text-align: center; }
.disclaimer p { margin: 0 0 8px; }
.disclaimer p:first-child { color: var(--text); font-weight: 600; }
.disclaimer a { display: inline; color: var(--yellow); padding: 0; font-size: inherit; }
.copy { color: var(--muted); font-size: 12.5px; }

/* Voltar ao topo */
.to-top {
  position: fixed; right: 16px; bottom: 18px; z-index: 30;
  width: 48px; height: 48px; border-radius: 50%; border: 0;
  background: linear-gradient(180deg, var(--yellow), var(--yellow-2)); color: #111;
  display: grid; place-items: center; box-shadow: var(--shadow);
}
.to-top svg { width: 26px; height: 26px; }

/* Páginas de texto (Sobre / Privacidade) */
.page { max-width: 820px; margin: 30px auto 50px; background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(20px, 4vw, 40px); }
.page h1 { margin-top: 0; color: var(--yellow); font-size: clamp(24px, 4vw, 32px); }
.page h2 { font-size: 19px; margin-top: 26px; }
.page p, .page li { color: #d6d6dc; }
.page a { color: var(--yellow); }

.only-mobile { display: none; }

/* ---------- Responsivo ---------- */
@media (max-width: 1199px) {
  .layout, .layout.no-top { grid-template-columns: 230px minmax(0, 1fr); }
  .top-rank { display: none !important; }
}

@media (max-width: 899px) {
  .only-mobile { display: inline-flex; }
  .main-nav { display: none; }
  .header-top { flex-wrap: wrap; gap: 6px 10px; padding-top: 8px; padding-bottom: 10px; }
  .brand { margin-right: auto; }
  .brand img { width: 44px; height: 44px; }
  .brand-text small { font-size: 14px; }
  .brand-text strong { font-size: 23px; }
  .search { order: 5; flex: 1 0 100%; max-width: none; }
  .search input { height: 44px; padding: 0 16px; }
  .search button { width: 54px; }
  .fav-label { display: none; }
  .fav-btn { padding: 6px; }

  .layout, .layout.no-top { display: block; margin-top: 16px; }
  .filters {
    position: fixed; top: auto; left: 0; right: 0; bottom: 0; z-index: 70;
    max-height: 86vh; overflow-y: auto; border-radius: 18px 18px 0 0;
    transform: translateY(105%); transition: transform .25s ease; padding-bottom: 24px;
  }
  .filters.open { transform: none; }
  .results-bar { margin-bottom: 12px; }

  .cat-row {
    display: flex; overflow-x: auto; scroll-snap-type: x mandatory; gap: 8px;
    margin: 0 -16px; padding: 0 16px 6px; scrollbar-width: none;
  }
  .cat-row::-webkit-scrollbar { display: none; }
  .cat-chip { flex: 0 0 96px; min-height: 92px; scroll-snap-align: start; font-size: 12px; }
  .cat-chip svg { width: 30px; height: 30px; }
  .section-head { margin-top: 18px; }
  .bar-title { font-size: 18px; }

  .foot-grid { grid-template-columns: 1fr 1fr; }
  .foot-brand, .seals { grid-column: 1 / -1; }
}

@media (max-width: 767px) {
  /* No celular: texto em cima, arte (3:2) embaixo */
  .hero-box { aspect-ratio: auto; min-height: 0; display: flex; flex-direction: column; }
  .hero-text { order: 1; height: auto; max-width: 100%; padding: 22px 18px 18px; }
  .hero-text h1 { font-size: clamp(25px, 7.4vw, 36px); }
  .hero-text p { margin: 10px 0 14px; }
  .hero-art { position: relative; order: 2; inset: auto; height: auto; aspect-ratio: 3 / 2; }
  .hero-box.no-art .hero-placeholder { position: relative; order: 2; inset: auto; width: auto; aspect-ratio: 3 / 2; margin: 0 12px 12px; }
  .hero-placeholder .ph-desk { display: none; }
  .hero-placeholder .ph-mob { display: inline; }

  .p-section { padding: 10px; margin-left: -6px; margin-right: -6px; }
  .p-section h2 { font-size: 17px; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .card-img { padding: 8px; }
  .card-body { padding: 2px 8px 10px; }
  .card-title { font-size: 13px; }
  .price { font-size: 17px; }
  .price-date, .price-now { font-size: 11px; }
  .card-actions { gap: 6px; }
  .card-actions .btn { font-size: 12px; padding: 9px 4px; }
  .wa { width: 36px; }
  .heart { width: 32px; height: 32px; }
  .rank { font-size: 11px; padding: 2px 7px; }
}

@media (min-width: 900px) { .to-top { display: none !important; } }

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