/* DEBUG-CSS: 2026-02-27 23:59 */

/* ==============================
   NoSinal — site.css (LIMPO)
   Único arquivo, sem duplicidade
   ============================== */

/* =========================
   TOKENS
   ========================= */
:root{
  --bg: #070A10;

  --panel: rgba(255,255,255,.06);
  --panel2: rgba(255,255,255,.09);
  --stroke: rgba(255,255,255,.10);

  --text: rgba(255,255,255,.92);
  --muted: rgba(255,255,255,.68);

  --brand: #6AE4FF;
  --brand2: #8B5CF6;

  --good: #22c55e;
  --warn: #f59e0b;
  --bad:  #ef4444;

  --radius: 18px;
  --shadow: 0 18px 50px rgba(0,0,0,.55);
}

[data-theme="light"]{
  --bg: #F5F7FB;

  --panel: rgba(0,0,0,.03);
  --panel2: rgba(0,0,0,.06);
  --stroke: rgba(0,0,0,.08);

  --text: #0f172a;
  --muted: rgba(15,23,42,.65);

  --brand: #2563eb;
  --brand2: #7c3aed;

  --good: #16a34a;
  --warn: #d97706;
  --bad:  #dc2626;

  --shadow: 0 10px 30px rgba(0,0,0,.08);
}

/* =========================
   BASE
   ========================= */
*{ box-sizing:border-box; }

html,body{
  margin:0;
  background:
    radial-gradient(1200px 600px at 25% 0%, rgba(106,228,255,.10), transparent 55%),
    radial-gradient(1000px 600px at 80% 15%, rgba(139,92,246,.10), transparent 55%),
    var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Inter, Arial, sans-serif;
}

a{ color:inherit; text-decoration:none; }
a:hover{ text-decoration:none; }

img{ max-width:100%; height:auto; }

.container{
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 18px;
}

.muted{ color: var(--muted); }

/* =========================
   COMPONENTES
   ========================= */
.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:10px;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.05);
  color: var(--text);
  transition: transform .12s ease, background .12s ease, border-color .12s ease;
  cursor:pointer;
}
.btn:hover{
  transform: translateY(-1px);
  background: rgba(255,255,255,.08);
  border-color: rgba(255,255,255,.18);
}
.btn.primary{
  border: 0;
  background: linear-gradient(135deg, var(--brand), var(--brand2));
  color: #071018;
  font-weight: 800;
}
.btn.primary:hover{ filter: brightness(1.04); }

.badge{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding: 8px 12px;
  border: 1px solid var(--stroke);
  background: rgba(255,255,255,.05);
  border-radius: 999px;
  color: var(--muted);
}

.pill{
  display:inline-flex;
  align-items:center;
  padding: 7px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.04);
  color: rgba(255,255,255,.78);
  font-size: 12px;
  white-space: nowrap;
}

.card{
  border: 1px solid rgba(255,255,255,.10);
  background: linear-gradient(180deg, rgba(255,255,255,.08), rgba(255,255,255,.04));
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow:hidden;
}

/* Conteúdo padrão dentro de cards */
.card-inner{ padding: 18px; }

/* listing.php usa "card-pad" (sem isso, o texto cola na borda) */
.card-pad{ padding: 18px; }

/* =========================
   HOME - CATEGORIAS
   ========================= */

.home-categories{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  margin-top:10px;
}

/* MOBILE: 3 colunas organizadas */
@media (max-width: 820px){
  .home-categories{
    display:grid;
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 480px){
  .home-categories{
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Grade de categorias */
/* =========================
   CATEGORIAS (DESKTOP + MOBILE)
   ========================= */

/* Base (desktop/tablet) */
.cat-grid{
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

/* Pills */
.cat-pill{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.04);
  color: rgba(255,255,255,.92);
  text-decoration: none;
  white-space: nowrap;
}

/* Estado selecionado (se você usa .on) */
.cat-pill.on{
  border-color: rgba(106,228,255,.55);
  background: rgba(106,228,255,.10);
}

/* MOBILE: vira “barra rolável” (não empilha) */
/* MOBILE: categorias em grid 2 colunas (organizado, sem scroll) */
@media (max-width: 820px){
  .cat-grid{
    display:grid;
    grid-template-columns: repeat(3, 1fr);
  }
  .cat-pill{
    justify-content: center;
    white-space: nowrap;
  }
}

@media (max-width: 480px){
  .cat-grid{
    display:grid;
    grid-template-columns: repeat(2, 1fr);
  }
  .cat-pill{
    justify-content: center;
    white-space: nowrap;
  }
}
/* ==============================
   CAPAS (listagens)
   listing.php usa: <img class="cover small" ...>
   ============================== */

/* =========================
   CAPAS (cards/listagens)
   - .cover.small deve ser 1:1
   ========================= */

.cover{
  width: 100%;
  height: auto;              /* remove altura fixa */
  display: block;
  object-fit: cover;
  background: rgba(255,255,255,.05);
}

/* listing.php usa: <img class="cover small" ...> */
.cover.small{
  aspect-ratio: 1 / 1;       /* ✅ QUADRADO */
  height: auto;              /* ✅ garante que o ratio mande */
  object-fit: cover;         /* sem distorcer */
  object-position: center;
  border-radius: 16px;
}

/* =========================
   TIPOGRAFIA
   ========================= */
.h1{
  font-size: clamp(28px, 3.4vw, 44px);
  line-height: 1.06;
  margin: 12px 0 8px;
  font-weight: 900;
}
.sub{
  color: var(--muted);
  font-size: 15px;
  line-height: 1.5;
  max-width: 62ch;
}

.section-title{
  display:flex;
  align-items:center;
  justify-content:space-between;
  margin: 18px 0 10px;
}
.section-title h2{
  font-size: 18px;
  margin:0;
  letter-spacing:.3px;
}

/* =========================
   GRID
   ========================= */
.grid{
  display:grid;
  gap:16px;
  align-items:start;

  /* mantém responsivo, mas evita “card gigante” */
  grid-template-columns: repeat(auto-fit, minmax(260px, 320px));
  justify-content: start; /* não estica pra preencher a linha */
}

@media (max-width: 900px){
  .grid{
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    justify-content: stretch; /* no mobile pode ocupar a largura */
  }
}

@media (max-width: 640px){
  .grid{ grid-template-columns: 1fr; }
}

/* thumb padrão (listagens) */
.thumb{
  width:100%;
  aspect-ratio: 4 / 3;
  background: rgba(255,255,255,.05);
  border-radius: 14px;
  overflow:hidden;
}
.thumb img{
  width:100%;
  height:100%;
  object-fit: cover;
  display:block;
}

/* =========================
   TOP NAV (header)
   ========================= */

.topnav{
  position:sticky;
  top:0;
  z-index: 999;
  background: rgba(7,10,16,.65);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255,255,255,.06);
}
.topnav-inner{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:14px 0;
  position:relative;
}

/* brand */
.brand{
  display:flex;
  align-items:center;
  gap:14px;
  text-decoration:none;
}
.logo-img{
  height:100px;
  width:auto;
  object-fit:contain;
  display:block;
  filter: drop-shadow(0 0 4px rgba(255,255,255,0.12));
}
.brand-tagline{
  font-size:18px;
  color:var(--muted);
  line-height:1.2;
  max-width:360px;
}

/* desktop nav */
.nav-desktop{
  display:flex;
  align-items:center;
  gap:18px;
}
.nav-desktop a{ color:rgba(255,255,255,.86); }
.nav-desktop a:hover{ color:rgba(255,255,255,.98); }

/* hamburger */
.nav-toggle{
  display:none;
  width:44px;
  height:44px;
  border-radius:12px;
  border:1px solid rgba(255,255,255,.12);
  background:rgba(255,255,255,.06);
  cursor:pointer;
  align-items:center;
  justify-content:center;
  gap:5px;
}
.nav-toggle:hover{
  background:rgba(255,255,255,.08);
  border-color:rgba(255,255,255,.18);
}
.nav-toggle-bar{
  display:block;
  width:18px;
  height:2px;
  background:rgba(255,255,255,.85);
  border-radius:2px;
}

/* drawer mobile */
.nav-mobile{
  position:absolute;
  top: calc(100% + 10px);
  right: 0;
  width: min(360px, calc(100vw - 36px));
  border-radius:18px;
  border:1px solid rgba(255,255,255,.12);
  background: rgba(10,12,18,.86);
  backdrop-filter: blur(14px);
  box-shadow: 0 18px 60px rgba(0,0,0,.65);
  padding:12px;
  display:flex;
  flex-direction:column;
  gap:10px;
  z-index:999;
}
.nav-mobile a{
  padding:10px 12px;
  border-radius:12px;
  color:rgba(255,255,255,.92);
  background:rgba(255,255,255,.04);
  border:1px solid rgba(255,255,255,.08);
}
.nav-mobile a:hover{
  background:rgba(255,255,255,.07);
  border-color:rgba(255,255,255,.14);
}
html.menu-open{ overflow:hidden; }

@media (max-width: 980px){
  .nav-desktop{ display:none; }
  .nav-toggle{ display:inline-flex; }
  .logo-img{ height:46px; }
  .brand-tagline{ max-width: 260px; }
}
@media (max-width: 768px){
  .brand{ flex-wrap:wrap; }
  .brand-tagline{
    flex-basis:100%;
    max-width:100%;
    font-size:14px;
  }
}

/* =========================
   HERO HOME — estilo OLX
   (desktop 3.4:1, mobile 3.4:1)
   ========================= */
.hero.hero--olx{
  padding: 18px 0 26px;
}
.hero.hero--olx .hero-inner{
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 18px;
}

/* IMPORTANTÍSSIMO: o card do hero não pode ter altura extra */
.hero.hero--olx .card.hero-full{
  padding: 0;
  min-height: 0;
  height: auto;
  overflow:hidden;
  border-radius: 18px;
}

/* o carousel define altura */
.hero.hero--olx .ns-carousel{
  position:relative;
  width:100%;
  aspect-ratio: 2.6 / 1;  /* OLX desktop */
  min-height: 0px;
  overflow:hidden;
}

/* slides ocupam 100% */
.hero.hero--olx .ns-slide{
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  background-size: cover;
  background-position:center;
  background-repeat:no-repeat;
  opacity:0;
  transition: opacity .35s ease;
}
.hero.hero--olx .ns-slide.is-active{
  opacity:1;
  z-index:1;
}

/* dots sobre o banner (não empurram altura) */
.hero.hero--olx .ns-dots{
  position:absolute;
  left:0;
  right:0;
  bottom:14px;
  margin:0;
  display:flex;
  justify-content:center;
  gap:10px;
  z-index:2;
}
.hero.hero--olx .ns-dot{
  width:22px;
  height:4px;
  border-radius:999px;
  background: rgba(255,255,255,.35);
}
.hero.hero--olx .ns-dot.is-active{
  background: rgba(255,255,255,.9);
}

@media (max-width: 980px){
  .hero.hero--olx{ padding: 14px 0 20px; }
  .hero.hero--olx .hero-inner{ padding: 0 14px; }

  .hero.hero--olx .ns-carousel{
    aspect-ratio: 2.6 / 1; /* OLX mobile */
    min-height: 0px;
  }
  .hero.hero--olx .card.hero-full{ border-radius: 14px; }
}

/* =========================
   CATEGORIAS (chips)
   ========================= */
.chips{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
}
.chip{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.04);
  color: rgba(255,255,255,.84);
}
.chip:hover{
  background: rgba(255,255,255,.07);
  border-color: rgba(255,255,255,.16);
}
.chip.is-active{
  border: 0;
  background: linear-gradient(135deg, var(--brand), var(--brand2));
  color: #071018;
  font-weight: 800;
}

/* =========================
   MARKETPLACE CARDS (anúncios)
   ========================= */
.market-card{
  display:flex;
  flex-direction:column;
  gap:10px;
}
.market-title{
  font-weight:900;
  letter-spacing:.2px;
}
.market-meta{
  color: var(--muted);
  font-size: 13px;
  display:flex;
  gap:10px;
  flex-wrap:wrap;
}

/* =========================
   PROMOS (grid + lightbox simples)
   ========================= */
.promo-grid{
  display:grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}
@media (max-width: 980px){
  .promo-grid{ grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px){
  .promo-grid{ grid-template-columns: 1fr; }
}

.promo-tile{
  position:relative;
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.04);
  overflow:hidden;
  cursor:pointer;
}
.promo-tile img{
  width:100%;
  height:100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  display:block;
}
.promo-tile:hover{
  border-color: rgba(255,255,255,.18);
  background: rgba(255,255,255,.06);
}

/* Lightbox */
.promo-modal{
  position: fixed;
  inset: 10% 10%;
  z-index: 2000;
  border-radius: 22px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(8,10,16,.92);
  backdrop-filter: blur(18px);
  box-shadow: 0 30px 120px rgba(0,0,0,.70);
  overflow:hidden;
  display:none;
}
.promo-modal.is-open{ display:block; }

.promo-stage{
  position:relative;
  width:100%;
  height:100%;
  display:flex;
  align-items:center;
  justify-content:center;
  padding: 18px;
}
.promo-img{
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 16px;
}

.promo-close,
.promo-prev,
.promo-next{
  position:absolute;
  top: 14px;
  width:44px;
  height:44px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.08);
  display:flex;
  align-items:center;
  justify-content:center;
  cursor:pointer;
  z-index: 50;
}
.promo-close{ right: 14px; }
.promo-prev{ left: 14px; top: 50%; transform: translateY(-50%); }
.promo-next{ right: 14px; top: 50%; transform: translateY(-50%); }

@media (max-width: 768px){
  .promo-modal{ inset: 8% 4%; }
}

/* =========================
   POST (página de conteúdo)
   ========================= */
.post-wrap{ margin: 18px 0; }

.post-header{
  padding: 18px 18px 0;
}
.post-title{
  font-size: clamp(24px, 2.4vw, 36px);
  font-weight: 950;
  margin: 0 0 8px;
}
.post-sub{
  color: var(--muted);
  margin: 0 0 12px;
}

.post-body{
  padding: 0 18px 18px;
  color: rgba(255,255,255,.88);
  line-height: 1.6;
}
.post-body p{ margin: 0 0 12px; }

/* =========================
   AD-HERO (post de anúncio)
   Desktop: contain (não corta)
   Mobile: cover (bonito)
   ========================= */
.ad-hero{
  display:grid;
  grid-template-columns: 420px 1fr;
  border-radius: 24px;
  border: 1px solid rgba(255,255,255,.10);
  background: linear-gradient(180deg, rgba(255,255,255,.07), rgba(255,255,255,.03));
  box-shadow: 0 18px 60px rgba(0,0,0,.55);
  overflow:hidden;
  margin-bottom:16px;
  min-height: 360px;
}

.ad-hero-media{
  height: 100%;
  display:flex;
  align-items:center;
  justify-content:center;
  background: rgba(0,0,0,.35);
  border-right: 1px solid rgba(255,255,255,.08);
  padding: 10px; /* respiro */
}
.ad-hero-media img{
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain; /* DESKTOP seguro */
  display:block;
}

.ad-hero-body{
  min-width:0;
  padding: 16px 16px 18px;
}

.ad-hero-actions{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  margin-top: 12px;
}

.ad-hero-meta{
  margin-top: 12px;
  color: rgba(255,255,255,.72);
  font-size: 13px;
  display:grid;
  gap: 6px;
  padding-top: 12px;
  border-top: 1px solid rgba(255,255,255,.10);
}

/* FIX: no mobile, a capa do anúncio NÃO pode virar 1/1 */
@media (max-width: 900px){

  .ad-hero{
    grid-template-columns: 1fr;
    min-height: 0 !important;
  }

  /* o frame manda na altura */
  .ad-hero .ad-hero-media{
    aspect-ratio: 1 / 1 !important;   /* <- força 4:3 */
    height: auto !important;
    padding: 0 !important;
    overflow: hidden !important;

    display: block !important;
    border-right: 0 !important;
    border-bottom: 1px solid rgba(255,255,255,.08) !important;
  }

  .ad-hero .ad-hero-media img{
    width: 100% !important;
    height: 100% !important;
    max-width: none !important;
    max-height: none !important;

    object-fit: cover !important;
    object-position: center 30% !important; /* ajuste fino */
    display: block !important;
  }
}
/* =========================
   FOOTER
   ========================= */
.footer{
  margin: 24px 0 40px;
  color: rgba(255,255,255,.55);
  font-size: 13px;
  text-align:center;
}



