@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=Plus+Jakarta+Sans:wght@600;700;800&display=swap');

/* ══ VARIABLES ══ */
:root {
  --orange:   #f97316;
  --orange2:  #ea6c0a;
  --orange3:  #fdba74;
  --orangeXL: #fff7ed;
  --green:    #16a34a;
  --green2:   #15803d;
  --greenXL:  #f0fdf4;
  --dark:     #0f1117;
  --panel:    #ffffff;
  --bg:       #f8f9fa;
  --text:     #1a1a2e;
  --muted:    #6b7280;
  --line:     #e5e7eb;
  --shadow:   0 2px 16px rgba(0,0,0,.08);
  --shadow2:  0 8px 32px rgba(0,0,0,.12);
  --max:      1200px;
  --r:        12px;
}

/* ══ RESET ══ */
* { box-sizing: border-box; margin: 0; padding: 0 }
html { scroll-behavior: smooth }
body { font-family: 'Inter', sans-serif; background: var(--bg); color: var(--text); overflow-x: hidden }
a { color: inherit; text-decoration: none }
img { display: block; max-width: 100% }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 20px }

/* ══ TOPBAR ══ */
.topbar {
  background: var(--dark); color: rgba(255,255,255,.7);
  font-size: 12px; padding: 7px 24px;
  display: flex; align-items: center; justify-content: space-between;
}
.topbar a { color: rgba(255,255,255,.6); transition: color .2s }
.topbar a:hover { color: #fff }
.topbar-links { display: flex; gap: 20px }

/* ══ NAVBAR ══ */
.navbar {
  background: #fff; border-bottom: 2px solid var(--orange);
  position: sticky; top: 0; z-index: 999;
  box-shadow: 0 2px 12px rgba(0,0,0,.07);
}
.navbar-inner {
  max-width: var(--max); margin: 0 auto;
  display: flex; align-items: center; gap: 16px;
  height: 64px; padding: 0 20px;
}
.logo {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 22px; font-weight: 800; letter-spacing: -.03em;
  flex-shrink: 0; color: var(--orange);
}

.nav-cats {
  display: flex; gap: 2px; flex: 1;
  font-size: 13px; font-weight: 600;
}
.nav-cats a {
  padding: 6px 14px; border-radius: 8px;
  color: var(--muted); transition: background .2s, color .2s; white-space: nowrap;
}
.nav-cats a:hover, .nav-cats a.active { background: var(--orangeXL); color: var(--orange) }

.nav-right { display: flex; align-items: center; gap: 10px; margin-left: auto }
.btn-publicar {
  background: var(--orange); color: #fff;
  padding: 9px 20px; border-radius: 8px;
  font-size: 13px; font-weight: 700;
  transition: background .2s, transform .15s;
  white-space: nowrap;
}
.btn-publicar:hover { background: var(--orange2); transform: translateY(-1px) }
.btn-login {
  padding: 9px 16px; border-radius: 8px;
  border: 1.5px solid var(--line);
  font-size: 13px; font-weight: 600; color: var(--muted);
  transition: border-color .2s, color .2s;
}
.btn-login:hover { border-color: var(--orange); color: var(--orange) }
@media (max-width: 860px) { .nav-cats { display: none } }

/* ══ HERO ══ */
.hero {
  background: linear-gradient(135deg, var(--dark) 0%, #1e293b 60%, #0f2027 100%);
  padding: 52px 20px;
}
.hero-inner {
  max-width: var(--max); margin: 0 auto;
  display: flex; flex-direction: column; align-items: center; text-align: center; gap: 24px;
}
.hero-badge {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(249,115,22,.15); border: 1px solid rgba(249,115,22,.3);
  color: var(--orange3); font-size: 12px; font-weight: 600; letter-spacing: .08em;
  padding: 5px 14px; border-radius: 999px;
}
.hero-title {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: clamp(28px, 4vw, 52px); font-weight: 800;
  color: #fff; line-height: 1.1; letter-spacing: -.02em;
}
.hero-title span { color: var(--orange) }
.hero-sub { color: rgba(255,255,255,.55); font-size: 15px; max-width: 50ch }

/* SEARCH */
.search-wrap {
  width: 100%; max-width: 700px;
  background: #fff; border-radius: var(--r);
  box-shadow: 0 20px 60px rgba(0,0,0,.3);
  display: flex; overflow: hidden;
}
.search-cat {
  padding: 0 16px; border-right: 1px solid var(--line);
  font-size: 13px; font-weight: 600; color: var(--muted);
  background: none; border-top: none; border-bottom: none; border-left: none;
  cursor: pointer; white-space: nowrap; min-width: 130px;
  font-family: 'Inter', sans-serif;
}
.search-cat:focus { outline: none }
.search-input {
  flex: 1; padding: 16px; border: none; outline: none;
  font-size: 15px; font-family: 'Inter', sans-serif; color: var(--text);
}
.search-input::placeholder { color: #aab }
.search-btn {
  background: var(--orange); color: #fff;
  border: none; padding: 0 24px;
  font-size: 14px; font-weight: 700; cursor: pointer;
  font-family: 'Inter', sans-serif; transition: background .2s;
  display: flex; align-items: center; gap: 8px;
}
.search-btn:hover { background: var(--orange2) }

/* STATS */
.hero-stats {
  display: flex; gap: 32px; flex-wrap: wrap; justify-content: center;
}
.hero-stat { text-align: center }
.hero-stat-num {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 24px; font-weight: 800; color: #fff;
}
.hero-stat-label { font-size: 11px; color: rgba(255,255,255,.45); text-transform: uppercase; letter-spacing: .08em; margin-top: 2px }

/* ══ CATEGORY PILLS ══ */
.cat-bar {
  background: #fff; border-bottom: 1px solid var(--line);
  overflow-x: auto; scrollbar-width: none;
}
.cat-bar::-webkit-scrollbar { display: none }
.cat-bar-inner {
  max-width: var(--max); margin: 0 auto; padding: 0 20px;
  display: flex; gap: 0;
}
.cat-pill {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 14px 20px; font-size: 12px; font-weight: 600; color: var(--muted);
  border-bottom: 3px solid transparent;
  cursor: pointer; transition: color .2s, border-color .2s; white-space: nowrap;
}
.cat-pill:hover, .cat-pill.active { color: var(--orange); border-bottom-color: var(--orange) }
.cat-pill-icon { font-size: 20px }

/* ══ SECTIONS ══ */
.section { padding: 48px 0 }
.section-head { margin-bottom: 24px }
.section-label {
  font-size: 11px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase;
  color: var(--orange); margin-bottom: 6px;
}
.section-title {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: clamp(20px, 2.5vw, 28px); font-weight: 800; letter-spacing: -.02em;
}
.section-title span { color: var(--orange) }
.section-head-row { display: flex; justify-content: space-between; align-items: flex-end; flex-wrap: wrap; gap: 12px }
.ver-todos {
  font-size: 13px; font-weight: 600; color: var(--orange);
  display: flex; align-items: center; gap: 5px;
  border: 1.5px solid var(--line); padding: 6px 14px; border-radius: 8px;
  transition: border-color .2s, background .2s;
}
.ver-todos:hover { border-color: var(--orange); background: var(--orangeXL) }

/* ══ ANUNCIO CARD ══ */
.anuncios-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 20px;
}
.anuncio-card {
  background: var(--panel); border-radius: var(--r);
  box-shadow: var(--shadow); border: 1px solid var(--line);
  overflow: hidden; transition: transform .25s, box-shadow .25s;
  display: block;
}
.anuncio-card:hover { transform: translateY(-4px); box-shadow: var(--shadow2) }

.anuncio-img {
  position: relative; height: 190px; overflow: hidden; background: #f3f4f6;
}
.anuncio-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s }
.anuncio-card:hover .anuncio-img img { transform: scale(1.04) }

.badge-tipo {
  position: absolute; top: 10px; left: 10px;
  padding: 3px 10px; border-radius: 999px;
  font-size: 10px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
}
.badge-vehiculo  { background: #1d4ed8; color: #fff }
.badge-inmueble  { background: #15803d; color: #fff }
.badge-producto  { background: #9333ea; color: #fff }
.badge-servicio  { background: #0891b2; color: #fff }
.badge-empleo    { background: #d97706; color: #fff }

.badge-estado {
  position: absolute; top: 10px; right: 10px;
  padding: 3px 10px; border-radius: 999px;
  font-size: 10px; font-weight: 700;
}
.estado-nuevo    { background: #dcfce7; color: #15803d }
.estado-usado    { background: #fef9c3; color: #854d0e }
.estado-seminuevo{ background: #dbeafe; color: #1d4ed8 }

.anuncio-body { padding: 14px 16px }
.anuncio-precio {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 20px; font-weight: 800; color: var(--orange); margin-bottom: 4px;
}
.anuncio-titulo {
  font-size: 15px; font-weight: 700; line-height: 1.3; margin-bottom: 4px; color: var(--text);
}
.anuncio-excerpt {
  font-size: 12px; color: #6b7280; line-height: 1.4; margin-bottom: 6px;
}
.anuncio-meta {
  font-size: 12px; color: var(--muted);
  display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px;
}
.anuncio-meta span { display: flex; align-items: center; gap: 3px }
.anuncio-footer {
  border-top: 1px solid var(--line); padding-top: 10px;
  display: flex; justify-content: space-between; align-items: center;
  font-size: 11px; color: var(--muted);
}
.anuncio-footer .vendedor { font-weight: 600; color: var(--text) }

/* ══ ANUNCIO CARD HORIZONTAL (detalle lista) ══ */
.anuncios-list { display: flex; flex-direction: column; gap: 16px }
.anuncio-h {
  background: var(--panel); border-radius: var(--r);
  box-shadow: var(--shadow); border: 1px solid var(--line);
  overflow: hidden; display: flex;
  transition: box-shadow .25s;
}
.anuncio-h:hover { box-shadow: var(--shadow2) }
.anuncio-h-img { width: 200px; flex-shrink: 0; overflow: hidden; background: #f3f4f6 }
.anuncio-h-img img { width: 100%; height: 100%; object-fit: cover }
.anuncio-h-body { padding: 16px 20px; flex: 1; display: flex; flex-direction: column; gap: 6px }
@media (max-width: 600px) { .anuncio-h { flex-direction: column } .anuncio-h-img { width: 100%; height: 180px } }

/* ══ CATEGORIAS GRID ══ */
.cats-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 14px;
}
.cat-card {
  background: var(--panel); border-radius: var(--r); padding: 20px 16px;
  box-shadow: var(--shadow); border: 1px solid var(--line);
  text-align: center; cursor: pointer;
  transition: transform .2s, border-color .2s, box-shadow .2s;
}
.cat-card:hover { transform: translateY(-3px); border-color: var(--orange); box-shadow: var(--shadow2) }
.cat-card-icon { font-size: 32px; margin-bottom: 8px }
.cat-card-name { font-size: 13px; font-weight: 700; color: var(--text) }
.cat-card-count { font-size: 11px; color: var(--muted); margin-top: 2px }

/* ══ DETALLE ANUNCIO ══ */
.breadcrumb {
  background: #fff; border-bottom: 1px solid var(--line);
  padding: 12px 0; font-size: 13px; color: var(--muted);
}
.breadcrumb a { color: var(--orange) }
.breadcrumb a:hover { text-decoration: underline }
.breadcrumb span { margin: 0 6px }

.detalle-wrap {
  max-width: var(--max); margin: 0 auto; padding: 32px 20px;
  display: grid; grid-template-columns: 1fr 340px; gap: 32px; align-items: start;
}
@media (max-width: 900px) { .detalle-wrap { grid-template-columns: 1fr } }

/* Galería detalle */
.gallery-main { border-radius: var(--r); overflow: hidden; background: #f3f4f6; margin-bottom: 10px; text-align: center }
.gallery-main img { max-width: 100%; height: auto; display: block; margin: 0 auto }
.gallery-thumbs { display: flex; gap: 8px }
.gallery-thumbs img {
  width: 80px; height: 60px; object-fit: cover;
  border-radius: 8px; cursor: pointer; border: 2px solid transparent;
  transition: border-color .2s;
}
.gallery-thumbs img.active, .gallery-thumbs img:hover { border-color: var(--orange) }

/* Info detalle */
.detalle-precio {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 34px; font-weight: 800; color: var(--orange); margin-bottom: 4px;
}
.detalle-titulo {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 24px; font-weight: 800; line-height: 1.2; margin-bottom: 12px;
}
.detalle-badges { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px }
.detalle-meta {
  display: flex; flex-wrap: wrap; gap: 16px;
  font-size: 13px; color: var(--muted); margin-bottom: 20px;
  padding: 16px; background: var(--bg); border-radius: var(--r); border: 1px solid var(--line);
}
.detalle-meta-item { display: flex; flex-direction: column; gap: 2px }
.detalle-meta-label { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--muted) }
.detalle-meta-val { font-size: 14px; font-weight: 600; color: var(--text) }
.detalle-desc { font-size: 15px; line-height: 1.8; color: #374151 }
.detalle-desc p { margin-bottom: 12px }

/* Sidebar contacto */
.sidebar-contacto {
  background: var(--panel); border-radius: var(--r);
  box-shadow: var(--shadow); border: 1px solid var(--line);
  padding: 24px; position: sticky; top: 80px;
}
.sidebar-vendedor { display: flex; align-items: center; gap: 12px; margin-bottom: 20px }
.vendedor-avatar {
  width: 48px; height: 48px; border-radius: 50%; background: var(--orangeXL);
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; flex-shrink: 0;
}
.vendedor-nombre { font-size: 15px; font-weight: 700 }
.vendedor-member { font-size: 11px; color: var(--muted) }
.btn-whatsapp {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; background: #25d366; color: #fff;
  padding: 13px; border-radius: 10px; font-size: 15px; font-weight: 700;
  transition: background .2s; margin-bottom: 10px;
}
.btn-whatsapp:hover { background: #1ebe5d }
.btn-llamar {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; background: var(--orangeXL); color: var(--orange);
  padding: 13px; border-radius: 10px; font-size: 15px; font-weight: 700;
  border: 1.5px solid rgba(249,115,22,.3); transition: background .2s; margin-bottom: 10px;
}
.btn-llamar:hover { background: #fed7aa }
.btn-correo {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; background: var(--bg); color: var(--muted);
  padding: 12px; border-radius: 10px; font-size: 14px; font-weight: 600;
  border: 1.5px solid var(--line); transition: background .2s;
}
.btn-correo:hover { background: var(--line) }
.btn-web {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; background: var(--bg); color: var(--muted);
  padding: 11px 16px; border-radius: var(--r); font-size: 14px; font-weight: 600;
  border: 1.5px solid var(--line); transition: background .2s; text-decoration: none; margin-top: 8px;
}
.btn-web:hover { background: var(--line) }
.sidebar-info-list { margin-top: 20px; display: flex; flex-direction: column; gap: 10px }
.sidebar-info-row {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 13px; padding-bottom: 10px; border-bottom: 1px solid var(--line);
}
.sidebar-info-row:last-child { border-bottom: none }
.sidebar-info-row .label { color: var(--muted) }
.sidebar-info-row .val { font-weight: 600; color: var(--text) }

/* ══ CTA PUBLICAR ══ */
.cta-publicar {
  background: linear-gradient(135deg, var(--orange) 0%, var(--orange2) 50%, #c2410c 100%);
  padding: 60px 20px; text-align: center; position: relative; overflow: hidden;
}
.cta-publicar::before {
  content: ''; position: absolute; width: 400px; height: 400px;
  border-radius: 50%; background: rgba(255,255,255,.05);
  top: -150px; right: -100px;
}
.cta-publicar-title {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: clamp(24px, 3.5vw, 38px); font-weight: 800;
  color: #fff; margin-bottom: 10px; position: relative; z-index: 1;
}
.cta-publicar-sub {
  color: rgba(255,255,255,.75); font-size: 15px;
  max-width: 46ch; margin: 0 auto 28px; position: relative; z-index: 1;
}
.cta-btns { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; position: relative; z-index: 1 }
.btn-cta-white {
  background: #fff; color: var(--orange);
  padding: 13px 28px; border-radius: 8px; font-size: 15px; font-weight: 700;
  transition: transform .15s, box-shadow .15s;
  box-shadow: 0 4px 20px rgba(0,0,0,.15);
}
.btn-cta-white:hover { transform: translateY(-2px); box-shadow: 0 8px 28px rgba(0,0,0,.2) }
.btn-cta-outline {
  background: rgba(255,255,255,.12); color: #fff;
  border: 1.5px solid rgba(255,255,255,.4);
  padding: 13px 28px; border-radius: 8px; font-size: 15px; font-weight: 600;
  transition: background .2s;
}
.btn-cta-outline:hover { background: rgba(255,255,255,.2) }

/* ══ FOOTER ══ */
.footer { background: var(--dark); color: rgba(255,255,255,.45); padding: 48px 20px 24px }
.footer-inner {
  max-width: var(--max); margin: 0 auto;
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px; margin-bottom: 36px;
}
@media (max-width: 760px) { .footer-inner { grid-template-columns: 1fr 1fr } }
@media (max-width: 480px) { .footer-inner { grid-template-columns: 1fr } }
.footer-logo {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 22px; font-weight: 800; color: #fff; margin-bottom: 12px;
}
.footer-logo span { color: var(--orange) }
.footer-tagline { font-size: 13px; line-height: 1.7; max-width: 28ch }
.footer-col h4 {
  color: rgba(255,255,255,.75); font-size: 11px; font-weight: 700;
  letter-spacing: .12em; text-transform: uppercase; margin-bottom: 14px;
}
.footer-col ul { list-style: none }
.footer-col ul li { margin-bottom: 9px }
.footer-col ul li a { font-size: 13px; color: rgba(255,255,255,.45); transition: color .2s }
.footer-col ul li a:hover { color: var(--orange) }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.08); padding-top: 20px;
  max-width: var(--max); margin: 0 auto;
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 10px; font-size: 12px;
}
.footer-bottom a { color: var(--orange); font-weight: 500 }

/* ══ BUSCAR ══ */
.buscar-hero {
  background: var(--dark2); padding: 20px 0; border-bottom: 1px solid rgba(255,255,255,.06);
}
.buscar-header {
  display: flex; align-items: baseline; justify-content: space-between;
  flex-wrap: wrap; gap: 8px; margin: 28px 0 20px;
}
.buscar-total { font-size: 13px; color: var(--muted) }
.paginacion {
  display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; margin: 40px 0;
}
.pag-btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 38px; height: 38px; padding: 0 10px; border-radius: 8px;
  font-size: 14px; font-weight: 600; color: var(--text);
  background: var(--dark2); border: 1px solid rgba(255,255,255,.08); text-decoration: none;
  transition: background .2s, color .2s;
}
.pag-btn:hover { background: var(--orange); color: #fff }
.pag-btn.active { background: var(--orange); color: #fff; border-color: var(--orange) }
.sin-resultados { text-align: center; padding: 80px 20px; color: var(--muted) }
.sin-resultados p { font-size: 18px; margin-bottom: 24px }

/* ══ UTILS ══ */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity .5s, transform .5s }
.reveal.visible { opacity: 1; transform: none }
.price-a-convenir { font-size: 16px; font-weight: 700; color: var(--green) }
