/* ================================================================
   CHIRICADOS — Hoja de Estilos Principal
   Tema: Chiriquí · Verde montaña · Tierra · Café
   ================================================================ */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@700;900&family=Nunito:wght@400;600;700;800&display=swap');

/* ── Variables ──────────────────────────────────────────────── */
:root {
  --verde-baru:     #1a4d2e;
  --verde-cafe:     #2d7a4f;
  --verde-claro:    #4aab72;
  --verde-menta:    #e6f5ed;
  --tierra:         #8b5e3c;
  --tierra-claro:   #c9906a;
  --crema:          #fdf6ec;
  --crema-oscuro:   #f5ece0;
  --cafe-oscuro:    #2c1810;
  --cafe-medio:     #5c3d2e;
  --dorado:         #d4a843;
  --dorado-claro:   #fef3d0;
  --rojo:           #c0392b;
  --rojo-claro:     #fde8e8;
  --azul:           #2980b9;
  --wa-verde:       #25d366;
  --gris-suave:     #f0ebe3;
  --gris-borde:     #ddd5c8;
  --gris-medio:     #9e8e7e;
  --gris-texto:     #6b5b4e;
  --texto:          #2c1810;
  --blanco:         #ffffff;

  --sombra-xs:  0 1px 4px rgba(44,24,16,.10);
  --sombra-sm:  0 2px 10px rgba(44,24,16,.12);
  --sombra-md:  0 6px 24px rgba(44,24,16,.16);
  --sombra-lg:  0 14px 40px rgba(44,24,16,.20);

  --radio-sm:   8px;
  --radio:      12px;
  --radio-lg:   20px;
  --radio-xl:   28px;

  --fuente-titulo: 'Playfair Display', Georgia, serif;
  --fuente-cuerpo: 'Nunito', system-ui, sans-serif;

  --header-h: 68px;
  --catnav-h: 48px;
}

/* ── Reset ──────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: var(--fuente-cuerpo);
  background: var(--crema);
  color: var(--texto);
  line-height: 1.65;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
main { flex: 1; }
img { max-width: 100%; display: block; }
a { color: var(--verde-cafe); text-decoration: none; transition: color .15s; }
a:hover { color: var(--verde-baru); }
h1,h2,h3,h4 { line-height: 1.25; }
input, select, textarea, button { font-family: inherit; }
ul { list-style: none; }

/* ── Container ──────────────────────────────────────────────── */
.container {
  max-width: 1220px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ── Header ─────────────────────────────────────────────────── */
.site-header {
  background: var(--verde-baru);
  position: sticky;
  top: 0;
  z-index: 900;
  height: var(--header-h);
  box-shadow: 0 2px 16px rgba(0,0,0,.25);
}
.header-inner {
  display: flex;
  align-items: center;
  gap: 16px;
  height: 100%;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  flex-shrink: 0;
}
.logo-icon { font-size: 1.6rem; }
.logo-text {
  font-family: var(--fuente-titulo);
  font-size: 1.75rem;
  font-weight: 900;
  color: var(--crema);
  letter-spacing: -.5px;
  line-height: 1;
}
.logo-text span { color: var(--dorado); }
.logo-tagline {
  display: block;
  font-size: .65rem;
  color: var(--verde-claro);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-top: 2px;
}

.header-search {
  flex: 1;
  max-width: 520px;
  display: flex;
  background: rgba(255,255,255,.13);
  border: 1.5px solid rgba(255,255,255,.22);
  border-radius: 40px;
  overflow: hidden;
  transition: background .2s, border-color .2s;
}
.header-search:focus-within {
  background: rgba(255,255,255,.2);
  border-color: var(--dorado);
}
.search-input {
  flex: 1;
  border: none;
  background: transparent;
  padding: 10px 18px;
  color: var(--crema);
  font-size: .9rem;
  outline: none;
}
.search-input::placeholder { color: rgba(253,246,236,.5); }
.search-btn {
  background: var(--dorado);
  border: none;
  padding: 0 18px;
  cursor: pointer;
  color: var(--cafe-oscuro);
  transition: background .2s;
  display: flex;
  align-items: center;
}
.search-btn:hover { background: #e8bc55; }

.header-nav { margin-left: auto; }
.btn-publicar {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--dorado);
  color: var(--cafe-oscuro);
  font-weight: 800;
  padding: 10px 20px;
  border-radius: 40px;
  font-size: .9rem;
  border: 2px solid var(--dorado);
  transition: all .2s;
  white-space: nowrap;
}
.btn-publicar:hover { background: transparent; color: var(--dorado); }

/* ── Category Nav ───────────────────────────────────────────── */
.cat-nav {
  background: var(--blanco);
  border-bottom: 2px solid var(--gris-borde);
  box-shadow: var(--sombra-xs);
  position: sticky;
  top: var(--header-h);
  z-index: 800;
}
.cat-nav-inner {
  display: flex;
  gap: 2px;
  overflow-x: auto;
  scrollbar-width: none;
  height: var(--catnav-h);
  align-items: center;
}
.cat-nav-inner::-webkit-scrollbar { display: none; }
.cat-nav-link {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 14px;
  height: 100%;
  font-weight: 700;
  font-size: .85rem;
  color: var(--gris-texto);
  border-bottom: 3px solid transparent;
  white-space: nowrap;
  transition: all .15s;
  text-decoration: none;
}
.cat-nav-link:hover { color: var(--verde-baru); border-bottom-color: var(--verde-claro); }
.cat-nav-link.active { color: var(--verde-baru); border-bottom-color: var(--verde-cafe); }
.cat-nav-icon { font-size: 1rem; }
.cat-nav-count {
  background: var(--gris-suave);
  color: var(--gris-medio);
  font-size: .7rem;
  padding: 2px 6px;
  border-radius: 20px;
  font-weight: 800;
}
.cat-nav-link.active .cat-nav-count { background: var(--verde-baru); color: var(--crema); }

/* ── Hero ───────────────────────────────────────────────────── */
.hero {
  background: linear-gradient(135deg, var(--verde-baru) 0%, var(--verde-cafe) 55%, #3d9166 100%);
  padding: 64px 20px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.hero::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 60px;
  background: url("data:image/svg+xml,%3Csvg viewBox='0 0 1200 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0 60L0 30 Q200 0 400 25 Q600 50 800 15 Q1000 -10 1200 20L1200 60Z' fill='%23fdf6ec'/%3E%3C/svg%3E") center/cover;
}
.hero-content { position: relative; z-index: 1; }
.hero-title {
  font-family: var(--fuente-titulo);
  font-size: clamp(2rem, 5vw, 3.4rem);
  color: var(--crema);
  margin-bottom: 12px;
  text-shadow: 0 2px 20px rgba(0,0,0,.25);
}
.hero-title span { color: var(--dorado); }
.hero-sub { color: rgba(253,246,236,.85); font-size: 1.1rem; margin-bottom: 28px; }
.hero-search {
  display: flex;
  max-width: 540px;
  margin: 0 auto;
  background: var(--blanco);
  border-radius: 40px;
  overflow: hidden;
  box-shadow: var(--sombra-md);
}
.hero-search-input {
  flex: 1;
  border: none;
  padding: 14px 22px;
  font-size: 1rem;
  outline: none;
  color: var(--texto);
}

/* ── Sections ───────────────────────────────────────────────── */
.section { padding: 48px 0; }
.section-alt { background: var(--crema-oscuro); }
.section-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 24px;
}
.section-title {
  font-family: var(--fuente-titulo);
  font-size: 1.6rem;
  color: var(--verde-baru);
  margin-bottom: 24px;
}
.section-header .section-title { margin-bottom: 0; }
.link-ver-todos { font-weight: 700; color: var(--verde-cafe); font-size: .9rem; }

/* ── Category Grid ──────────────────────────────────────────── */
.cat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 14px;
}
.cat-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  background: var(--blanco);
  border: 2px solid var(--gris-borde);
  border-radius: var(--radio-lg);
  padding: 24px 16px 18px;
  text-decoration: none;
  color: var(--cafe-medio);
  transition: all .2s;
  gap: 8px;
}
.cat-card:hover {
  border-color: var(--verde-cafe);
  background: var(--verde-menta);
  transform: translateY(-3px);
  box-shadow: var(--sombra-sm);
  color: var(--verde-baru);
}
.cat-card-icon { font-size: 2.2rem; }
.cat-card-name { font-weight: 700; font-size: .9rem; }
.cat-card-count { font-size: .75rem; color: var(--gris-medio); }

/* ── Ads Grid ───────────────────────────────────────────────── */
.ads-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 20px;
}
.ads-grid-4 { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }

/* ── Ad Card ────────────────────────────────────────────────── */
.ad-card {
  background: var(--blanco);
  border: 1.5px solid var(--gris-borde);
  border-radius: var(--radio);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform .22s, box-shadow .22s;
}
.ad-card:hover { transform: translateY(-4px); box-shadow: var(--sombra-md); }
.ad-card.featured { border-color: var(--dorado); box-shadow: 0 0 0 2px var(--dorado-claro); }

.ad-card-img-link { display: block; }
.ad-card-img {
  position: relative;
  aspect-ratio: 4/3;
  background: var(--gris-suave);
  overflow: hidden;
}
.ad-card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s; }
.ad-card:hover .ad-card-img img { transform: scale(1.05); }
.ad-card-no-img {
  width: 100%; height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3.5rem;
  background: linear-gradient(135deg, var(--gris-suave), var(--crema-oscuro));
}

.ad-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  font-size: .7rem;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: .5px;
}
.badge-featured { background: var(--dorado); color: var(--cafe-oscuro); }

.ad-card-body { padding: 14px 16px 16px; display: flex; flex-direction: column; flex: 1; }
.ad-card-cat { font-size: .72rem; font-weight: 800; text-transform: uppercase; letter-spacing: 1px; color: var(--verde-cafe); margin-bottom: 5px; }
.ad-card-title { font-family: var(--fuente-titulo); font-size: 1.02rem; font-weight: 700; color: var(--cafe-oscuro); margin-bottom: 6px; line-height: 1.3; }
.ad-card-title a { color: inherit; text-decoration: none; }
.ad-card-title a:hover { color: var(--verde-baru); }
.ad-card-desc { font-size: .84rem; color: var(--gris-texto); flex: 1; margin-bottom: 10px; line-height: 1.5; }
.ad-card-footer { display: flex; justify-content: space-between; align-items: flex-end; border-top: 1px solid var(--gris-suave); padding-top: 10px; gap: 8px; flex-wrap: wrap; }
.ad-card-price { font-size: 1.18rem; font-weight: 800; color: var(--verde-baru); }
.ad-card-price .nego { font-size: .72rem; color: var(--gris-medio); font-weight: 400; }
.price-consult { font-size: .85rem; color: var(--gris-medio); font-weight: 600; }
.ad-card-meta { font-size: .76rem; color: var(--gris-medio); text-align: right; }

/* ── CTA Section ────────────────────────────────────────────── */
.cta-section { background: var(--verde-baru); padding: 48px 20px; margin-top: auto; }
.cta-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.cta-inner h2 { font-family: var(--fuente-titulo); font-size: 1.6rem; color: var(--crema); margin-bottom: 6px; }
.cta-inner p { color: rgba(253,246,236,.75); }

/* ── Listing Layout ─────────────────────────────────────────── */
.listing-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 28px;
  padding: 20px 0 40px;
  align-items: start;
}
.listing-header { margin-bottom: 20px; }
.listing-header h1 { font-family: var(--fuente-titulo); font-size: 1.5rem; color: var(--verde-baru); }
.listing-count { font-size: 1rem; color: var(--gris-medio); font-family: var(--fuente-cuerpo); font-weight: 400; }

/* ── Filter Sidebar ─────────────────────────────────────────── */
.filter-sidebar {
  background: var(--blanco);
  border: 1.5px solid var(--gris-borde);
  border-radius: var(--radio);
  padding: 20px;
  position: sticky;
  top: calc(var(--header-h) + var(--catnav-h) + 16px);
}
.filter-title { font-family: var(--fuente-titulo); font-size: 1.05rem; color: var(--verde-baru); margin-bottom: 16px; }
.filter-group { margin-bottom: 14px; }
.filter-group label { display: block; font-weight: 700; font-size: .82rem; color: var(--gris-texto); margin-bottom: 5px; }

/* ── Detail Page ────────────────────────────────────────────── */
.detalle-grid {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 28px;
  padding: 16px 0 48px;
  align-items: start;
}
.breadcrumb { font-size: .82rem; color: var(--gris-medio); margin-bottom: 12px; }
.breadcrumb a { color: var(--gris-medio); }
.breadcrumb a:hover { color: var(--verde-cafe); }

.gallery { margin-bottom: 24px; }
.gallery-main {
  position: relative;
  border-radius: var(--radio);
  overflow: hidden;
  background: var(--cafe-oscuro);
  aspect-ratio: 16/10;
}
.gallery-main-img { width: 100%; height: 100%; object-fit: cover; }
.gallery-count { position: absolute; bottom: 10px; right: 10px; background: rgba(0,0,0,.6); color: white; font-size: .75rem; padding: 3px 10px; border-radius: 20px; }
.gallery-thumbs { display: flex; gap: 8px; margin-top: 10px; overflow-x: auto; padding-bottom: 4px; }
.gallery-thumb { flex-shrink: 0; width: 80px; height: 60px; border-radius: var(--radio-sm); overflow: hidden; border: 2.5px solid transparent; cursor: pointer; transition: border-color .15s; background: none; padding: 0; }
.gallery-thumb.active { border-color: var(--verde-cafe); }
.gallery-thumb img { width: 100%; height: 100%; object-fit: cover; }
.gallery-empty { aspect-ratio: 16/10; background: var(--gris-suave); border-radius: var(--radio); display: flex; align-items: center; justify-content: center; font-size: 6rem; margin-bottom: 24px; }

.detalle-desc-card { background: var(--blanco); border: 1.5px solid var(--gris-borde); border-radius: var(--radio); padding: 24px; }
.detalle-title { font-family: var(--fuente-titulo); font-size: 1.6rem; margin-bottom: 10px; }
.detalle-price-row { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.detalle-price { font-size: 1.8rem; font-weight: 800; color: var(--verde-baru); font-family: var(--fuente-titulo); }
.detalle-price-consult { font-size: 1.1rem; color: var(--gris-medio); }
.detalle-meta { display: flex; flex-wrap: wrap; gap: 12px; font-size: .83rem; color: var(--gris-medio); margin-bottom: 20px; }
.detalle-desc h3 { font-size: 1rem; color: var(--gris-texto); margin-bottom: 10px; }
.desc-text { line-height: 1.8; white-space: pre-wrap; word-break: break-word; }

.contact-card { background: var(--blanco); border: 2px solid var(--verde-claro); border-radius: var(--radio-lg); padding: 24px; margin-bottom: 16px; }
.contact-title { font-family: var(--fuente-titulo); font-size: 1.05rem; color: var(--verde-baru); margin-bottom: 10px; }
.contact-name { font-size: 1.1rem; font-weight: 700; margin-bottom: 18px; }
.contact-btns { display: flex; flex-direction: column; gap: 10px; }
.contact-warning { background: var(--dorado-claro); border-radius: var(--radio-sm); padding: 10px 14px; font-size: .78rem; margin-top: 16px; color: var(--cafe-medio); line-height: 1.5; }
.contact-location { margin-top: 12px; font-size: .85rem; color: var(--gris-texto); }

.detalle-meta-card { background: var(--blanco); border: 1.5px solid var(--gris-borde); border-radius: var(--radio); overflow: hidden; }
.meta-row { display: flex; justify-content: space-between; padding: 10px 16px; font-size: .85rem; border-bottom: 1px solid var(--gris-suave); }
.meta-row:last-child { border-bottom: none; }
.meta-row span:first-child { color: var(--gris-medio); }
.meta-row span:last-child { font-weight: 700; }

/* ── Forms ──────────────────────────────────────────────────── */
.form-page-container { max-width: 780px; margin: 0 auto; padding: 32px 20px 48px; }
.form-page-header { text-align: center; margin-bottom: 28px; }
.form-page-header h1 { font-family: var(--fuente-titulo); font-size: 2rem; color: var(--verde-baru); margin-bottom: 8px; }
.form-page-header p { color: var(--gris-texto); }

.form-card {
  background: var(--blanco);
  border: 1.5px solid var(--gris-borde);
  border-radius: var(--radio-xl);
  padding: 32px;
  box-shadow: var(--sombra-sm);
}
.form-section-title {
  font-family: var(--fuente-titulo);
  font-size: 1.05rem;
  color: var(--verde-baru);
  padding-bottom: 8px;
  border-bottom: 2px solid var(--gris-suave);
  margin: 24px 0 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.form-section-title:first-child { margin-top: 0; }

.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-weight: 700; font-size: .85rem; color: var(--gris-texto); margin-bottom: 5px; }
.form-group small { display: block; margin-top: 4px; font-size: .77rem; color: var(--gris-medio); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-group-center { display: flex; align-items: center; }
.req { color: var(--rojo); }
.text-muted { color: var(--gris-medio) !important; font-size: .82rem; }

.form-control {
  width: 100%;
  padding: 11px 14px;
  border: 2px solid var(--gris-borde);
  border-radius: var(--radio-sm);
  font-size: .95rem;
  color: var(--texto);
  background: var(--blanco);
  transition: border-color .15s, box-shadow .15s;
  outline: none;
  -webkit-appearance: none;
}
.form-control:focus {
  border-color: var(--verde-cafe);
  box-shadow: 0 0 0 3px rgba(45,122,79,.12);
}
textarea.form-control { min-height: 130px; resize: vertical; }

.input-prefix { display: flex; }
.input-prefix .prefix {
  display: flex;
  align-items: center;
  padding: 0 12px;
  background: var(--gris-suave);
  border: 2px solid var(--gris-borde);
  border-right: none;
  border-radius: var(--radio-sm) 0 0 var(--radio-sm);
  font-weight: 700;
  color: var(--gris-texto);
}
.input-prefix .form-control { border-radius: 0 var(--radio-sm) var(--radio-sm) 0; }

.checkbox-label { display: flex; align-items: center; gap: 8px; cursor: pointer; font-weight: 600; font-size: .9rem; }
.checkbox-label input[type=checkbox] { width: 18px; height: 18px; accent-color: var(--verde-cafe); cursor: pointer; flex-shrink: 0; }

.form-submit { margin-top: 28px; text-align: center; }
.form-submit-note { margin-top: 10px; font-size: .82rem; color: var(--gris-medio); }

/* ── Upload Zone ────────────────────────────────────────────── */
.upload-zone {
  border: 2.5px dashed var(--verde-claro);
  border-radius: var(--radio-lg);
  padding: 36px 20px;
  text-align: center;
  cursor: pointer;
  transition: all .2s;
  background: rgba(74,171,114,.04);
  position: relative;
}
.upload-zone input[type=file] {
  position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%;
}
.upload-zone:hover, .upload-zone.drag-over {
  background: rgba(74,171,114,.1);
  border-color: var(--verde-baru);
}
.upload-icon { font-size: 2.5rem; margin-bottom: 8px; }
.upload-zone p { font-size: .9rem; color: var(--gris-texto); }
.upload-zone strong { color: var(--verde-cafe); }

.previews-grid { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.preview-item { position: relative; width: 90px; height: 70px; border-radius: var(--radio-sm); overflow: hidden; }
.preview-item img { width: 100%; height: 100%; object-fit: cover; }
.preview-remove {
  position: absolute; top: 3px; right: 3px;
  background: rgba(0,0,0,.65); color: white; border: none;
  border-radius: 50%; width: 20px; height: 20px; cursor: pointer;
  font-size: .7rem; display: flex; align-items: center; justify-content: center;
}

.current-images { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 16px; }
.current-img-item { position: relative; width: 100px; height: 80px; border-radius: var(--radio-sm); overflow: hidden; }
.current-img-item img { width: 100%; height: 100%; object-fit: cover; }
.img-remove-btn {
  position: absolute; top: 4px; right: 4px;
  background: rgba(192,57,43,.85); color: white; border: none;
  border-radius: 50%; width: 22px; height: 22px; cursor: pointer;
  font-size: .75rem; display: flex; align-items: center; justify-content: center;
}

/* ── Alerts ─────────────────────────────────────────────────── */
.alerta {
  padding: 13px 18px;
  border-radius: var(--radio-sm);
  margin-bottom: 20px;
  font-size: .9rem;
  border-left: 4px solid;
  line-height: 1.6;
}
.alerta ul { padding-left: 18px; margin-top: 6px; list-style: disc; }
.alerta-exito  { background: var(--verde-menta); border-color: var(--verde-cafe); color: var(--verde-baru); }
.alerta-error  { background: var(--rojo-claro); border-color: var(--rojo); color: #7a1f1a; }
.alerta-info   { background: var(--dorado-claro); border-color: var(--dorado); color: var(--cafe-medio); }

/* ── Buttons ────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 11px 22px;
  border-radius: 40px;
  font-weight: 800;
  font-size: .9rem;
  cursor: pointer;
  transition: all .18s;
  text-decoration: none;
  border: 2px solid transparent;
  font-family: inherit;
  white-space: nowrap;
  line-height: 1;
}
.btn-lg { padding: 14px 28px; font-size: 1rem; }
.btn-sm { padding: 8px 16px; font-size: .84rem; }
.btn-xs { padding: 5px 10px; font-size: .78rem; border-radius: 6px; }
.btn-block { display: flex; width: 100%; }

.btn-verde { background: var(--verde-baru); color: white; border-color: var(--verde-baru); }
.btn-verde:hover { background: var(--verde-cafe); border-color: var(--verde-cafe); color: white; }
.btn-outline-verde { background: transparent; color: var(--verde-baru); border-color: var(--verde-baru); }
.btn-outline-verde:hover { background: var(--verde-baru); color: white; }
.btn-dorado { background: var(--dorado); color: var(--cafe-oscuro); border-color: var(--dorado); }
.btn-dorado:hover { background: #c49430; border-color: #c49430; color: white; }
.btn-rojo { background: var(--rojo); color: white; border-color: var(--rojo); }
.btn-rojo:hover { background: #a32419; border-color: #a32419; color: white; }
.btn-whatsapp { background: var(--wa-verde); color: white; border-color: var(--wa-verde); }
.btn-whatsapp:hover { background: #1da851; border-color: #1da851; color: white; }

/* ── Badges ─────────────────────────────────────────────────── */
.badge {
  display: inline-flex; align-items: center;
  padding: 3px 9px; border-radius: 20px;
  font-size: .72rem; font-weight: 800; letter-spacing: .3px;
}
.badge-nego { background: var(--verde-menta); color: var(--verde-baru); }

/* ── Pagination ─────────────────────────────────────────────── */
.paginacion {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  margin-top: 36px;
  flex-wrap: wrap;
}
.paginacion a, .paginacion span {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 40px; height: 40px; padding: 0 8px;
  border-radius: var(--radio-sm);
  font-size: .88rem; font-weight: 700;
  border: 1.5px solid var(--gris-borde);
  background: var(--blanco);
  color: var(--texto);
  transition: all .15s;
  text-decoration: none;
}
.paginacion a:hover { background: var(--verde-cafe); color: white; border-color: var(--verde-cafe); }
.paginacion .activa { background: var(--verde-baru); color: white; border-color: var(--verde-baru); }

/* ── Empty State ────────────────────────────────────────────── */
.empty-state { text-align: center; padding: 64px 20px; color: var(--gris-medio); }
.empty-icon { font-size: 4rem; margin-bottom: 16px; display: block; opacity: .5; }
.empty-state h3 { font-family: var(--fuente-titulo); font-size: 1.3rem; color: var(--cafe-medio); margin-bottom: 8px; }
.empty-state p { font-size: .9rem; margin-bottom: 20px; }

/* ── Success Card ───────────────────────────────────────────── */
.success-card { background: var(--blanco); border: 2px solid var(--verde-claro); border-radius: var(--radio-xl); padding: 40px; text-align: center; }
.success-icon { font-size: 4rem; margin-bottom: 16px; }
.success-card h1 { font-family: var(--fuente-titulo); color: var(--verde-baru); margin-bottom: 12px; }
.token-box { background: var(--verde-menta); border: 2px solid var(--verde-claro); border-radius: var(--radio); padding: 24px; margin: 24px 0; text-align: left; }
.token-box h3 { color: var(--verde-baru); margin-bottom: 8px; }
.token-links { display: flex; gap: 12px; margin: 16px 0; flex-wrap: wrap; }
.token-url { background: var(--blanco); border-radius: var(--radio-sm); padding: 10px 14px; font-size: .82rem; word-break: break-all; }
.token-url code { color: var(--verde-cafe); font-family: monospace; }

/* ── Delete Card ────────────────────────────────────────────── */
.delete-card { background: var(--blanco); border: 2px solid var(--rojo); border-radius: var(--radio-xl); padding: 40px; text-align: center; max-width: 520px; margin: 40px auto; }
.delete-icon { font-size: 4rem; margin-bottom: 16px; }
.delete-ad-title { font-size: 1.1rem; font-weight: 700; margin: 12px 0; padding: 12px; background: var(--gris-suave); border-radius: var(--radio-sm); }
.delete-actions { display: flex; gap: 12px; justify-content: center; margin-top: 24px; flex-wrap: wrap; }

/* ── Options row ────────────────────────────────────────────── */
.options-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

/* ── Footer ─────────────────────────────────────────────────── */
.site-footer { background: var(--cafe-oscuro); color: rgba(253,246,236,.7); padding: 48px 0 0; }
.footer-inner { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 40px; padding-bottom: 32px; }
.footer-brand .footer-logo { font-size: 1.5rem; color: var(--crema); display: block; margin-bottom: 10px; }
.footer-brand p { font-size: .88rem; line-height: 1.7; }
.footer-copy { margin-top: 12px; font-size: .8rem; color: rgba(253,246,236,.45); }
.footer-col h4 { color: var(--crema); font-weight: 800; margin-bottom: 12px; font-size: .82rem; text-transform: uppercase; letter-spacing: 1px; }
.footer-col a { display: block; font-size: .88rem; color: rgba(253,246,236,.6); margin-bottom: 7px; transition: color .15s; }
.footer-col a:hover { color: var(--dorado); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); padding: 16px 0; text-align: center; font-size: .8rem; }
.footer-bottom p { color: rgba(253,246,236,.45); }

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 960px) {
  .listing-layout { grid-template-columns: 1fr; }
  .filter-sidebar { position: static; }
  .detalle-grid { grid-template-columns: 1fr; }
  .detalle-right { order: -1; }
  .contact-card { padding: 18px; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 700px) {
  .header-search { display: none; }
  .hero { padding: 44px 20px 72px; }
  .cat-grid { grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); }
  .ads-grid { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
  .form-card { padding: 20px; }
  .form-row { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr; }
  .cta-inner { flex-direction: column; text-align: center; }
  .options-row { grid-template-columns: 1fr; }
  .section { padding: 32px 0; }
}
@media (max-width: 480px) {
  .cat-grid { grid-template-columns: repeat(3, 1fr); }
  .btn-publicar { padding: 8px 14px; font-size: .8rem; }
  .logo-text { font-size: 1.4rem; }
  .logo-tagline { display: none; }
}
