/* ============================================================
   La Plata Vive — Directorio Comercial
   ============================================================ */

/* Variables */
:root {
  --blue:    #0f4c81;
  --blue-d:  #0a3459;
  --blue-l:  #e8f0f9;
  --orange:  #f97316;
  --orange-d:#ea6a0a;
  --green:   #16a34a;
  --gray:    #64748b;
  --gray-l:  #f1f5f9;
  --gray-b:  #e2e8f0;
  --white:   #ffffff;
  --text:    #1e293b;
  --shadow:  0 2px 12px rgba(0,0,0,.08);
  --radius:  12px;
  --radius-s:6px;
  --font:    'Inter', system-ui, -apple-system, sans-serif;
}

/* Reset */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: var(--font); color: var(--text); background: var(--gray-l); line-height: 1.6; }
a    { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
img  { max-width: 100%; }
ul   { list-style: none; }

/* Container */
.container { max-width: 1200px; margin: 0 auto; padding: 0 1.25rem; }

/* ── Header ── */
.site-header {
  background: var(--blue);
  padding: .9rem 0;
  position: sticky; top: 0; z-index: 100;
  box-shadow: 0 2px 8px rgba(0,0,0,.2);
}
.header-inner { display: flex; align-items: center; gap: 1.5rem; }
.logo { display: flex; align-items: center; gap: .5rem; color: var(--white); font-size: 1.3rem; font-weight: 700; }
.logo:hover { text-decoration: none; opacity: .9; }
.logo-icon { font-size: 1.5rem; }
.logo-text strong { color: var(--orange); }
.main-nav { display: flex; gap: 1.5rem; margin-left: auto; }
.main-nav a { color: rgba(255,255,255,.85); font-size: .95rem; font-weight: 500; }
.main-nav a:hover { color: var(--white); text-decoration: none; }
.nav-toggle { display: none; background: none; border: 2px solid rgba(255,255,255,.4); color: var(--white); padding: .3rem .6rem; border-radius: var(--radius-s); cursor: pointer; font-size: 1.2rem; margin-left: auto; }

/* ── Hero ── */
.hero {
  background: linear-gradient(135deg, var(--blue) 0%, var(--blue-d) 100%);
  color: var(--white);
  padding: 4.5rem 0 3.5rem;
  text-align: center;
}
.hero h1 { font-size: clamp(1.8rem, 5vw, 3rem); font-weight: 800; margin-bottom: .75rem; line-height: 1.2; }
.hero p  { font-size: 1.15rem; opacity: .85; margin-bottom: 2rem; }
.hero-badge { display: inline-block; background: var(--orange); color: var(--white); padding: .25rem .9rem; border-radius: 999px; font-size: .8rem; font-weight: 700; letter-spacing: .5px; margin-bottom: 1rem; }

/* Buscador hero */
.search-box { max-width: 680px; margin: 0 auto; }
.search-wrap {
  position: relative; display: flex; background: var(--white);
  border-radius: var(--radius); box-shadow: 0 4px 24px rgba(0,0,0,.25);
  /* Sin overflow:hidden para que el dropdown no quede recortado */
}
.search-wrap input {
  flex: 1; border: none; outline: none; padding: 1rem 1.25rem;
  font-size: 1.1rem; font-family: var(--font); color: var(--text);
  border-radius: var(--radius) 0 0 var(--radius);
  min-width: 0;
}
.search-wrap button {
  background: var(--orange); color: var(--white); border: none; cursor: pointer;
  padding: 0 1.5rem; font-size: 1rem; font-weight: 600; font-family: var(--font);
  transition: background .2s; border-radius: 0 var(--radius) var(--radius) 0;
  white-space: nowrap;
}
.search-wrap button:hover { background: var(--orange-d); }
.search-chips { display: flex; flex-wrap: wrap; gap: .5rem; justify-content: center; margin-top: 1rem; }
.chip { background: rgba(255,255,255,.15); color: var(--white); border: 1px solid rgba(255,255,255,.3); padding: .3rem .8rem; border-radius: 999px; font-size: .82rem; cursor: pointer; transition: background .2s; }
.chip:hover { background: rgba(255,255,255,.25); }

/* Autocomplete */
.autocomplete-dropdown {
  position: absolute; top: 100%; left: 0; right: 0;
  background: var(--white); border-radius: 0 0 var(--radius) var(--radius);
  box-shadow: 0 8px 24px rgba(0,0,0,.15); z-index: 50; max-height: 320px; overflow-y: auto;
}
.autocomplete-item { padding: .75rem 1.25rem; cursor: pointer; border-bottom: 1px solid var(--gray-b); display: flex; gap: .75rem; align-items: flex-start; }
.autocomplete-item:hover { background: var(--gray-l); }
.autocomplete-item:last-child { border-bottom: none; }
.ac-nombre { font-weight: 600; color: var(--text); }
.ac-cat    { font-size: .8rem; color: var(--gray); }

/* ── Stats bar ── */
.stats-bar { background: var(--white); padding: 1rem 0; border-bottom: 1px solid var(--gray-b); }
.stats-inner { display: flex; gap: 2.5rem; justify-content: center; flex-wrap: wrap; }
.stat { text-align: center; }
.stat-n { font-size: 1.5rem; font-weight: 800; color: var(--blue); }
.stat-l { font-size: .8rem; color: var(--gray); }

/* ── Section ── */
.section { padding: 3rem 0; }
.section-title { font-size: 1.5rem; font-weight: 700; color: var(--blue); margin-bottom: 1.5rem; }
.section-title span { color: var(--orange); }

/* ── Category grid ── */
.cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 1rem; }
.cat-card {
  background: var(--white); border-radius: var(--radius); padding: 1.25rem;
  text-align: center; box-shadow: var(--shadow); transition: transform .2s, box-shadow .2s;
  color: var(--text); display: block;
}
.cat-card:hover { transform: translateY(-3px); box-shadow: 0 6px 20px rgba(0,0,0,.12); text-decoration: none; }
.cat-icon { font-size: 2rem; margin-bottom: .5rem; }
.cat-name { font-size: .9rem; font-weight: 600; line-height: 1.3; }
.cat-count { font-size: .78rem; color: var(--gray); margin-top: .25rem; }

/* ── Negocio cards ── */
.cards-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 1.25rem; }
.card {
  background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow);
  overflow: hidden; display: flex; flex-direction: column; transition: transform .2s, box-shadow .2s;
}
.card:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(0,0,0,.12); }
.card-body { padding: 1.25rem 1.25rem .75rem; flex: 1; }
.card-nombre { font-size: 1rem; font-weight: 700; line-height: 1.3; margin-bottom: .4rem; }
.card-nombre a { color: var(--text); }
.card-nombre a:hover { color: var(--blue); text-decoration: none; }
.card-cat  { display: inline-block; background: var(--blue-l); color: var(--blue); font-size: .75rem; font-weight: 600; padding: .15rem .6rem; border-radius: 999px; margin-bottom: .5rem; }
.card-dir, .card-tel, .card-zona { font-size: .85rem; color: var(--gray); margin-top: .3rem; }
.card-zona { font-size: .78rem; }
.card-actions { padding: .75rem 1.25rem 1.1rem; display: flex; gap: .5rem; flex-wrap: wrap; border-top: 1px solid var(--gray-b); }

/* ── Botones ── */
.btn { display: inline-flex; align-items: center; gap: .3rem; padding: .45rem .9rem; border-radius: var(--radius-s); font-size: .82rem; font-weight: 600; cursor: pointer; border: none; transition: background .2s, transform .1s; text-decoration: none; }
.btn:hover { transform: translateY(-1px); text-decoration: none; }
.btn-ver  { background: var(--blue);   color: var(--white); }
.btn-ver:hover  { background: var(--blue-d); }
.btn-tel  { background: var(--green);  color: var(--white); }
.btn-tel:hover  { background: #15803d; }
.btn-wa   { background: #25d366;       color: var(--white); }
.btn-wa:hover   { background: #1da851; }
.btn-edit { background: var(--orange); color: var(--white); }
.btn-del  { background: #ef4444;       color: var(--white); }
.btn-sm   { padding: .3rem .6rem; font-size: .78rem; }
.no-tel   { font-size: .8rem; color: var(--gray); align-self: center; }

/* ── Ficha ── */
.ficha-wrap { display: grid; grid-template-columns: 1fr 380px; gap: 2rem; align-items: start; }
.ficha-card { background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); padding: 2rem; }
.ficha-nombre { font-size: 1.8rem; font-weight: 800; color: var(--text); margin-bottom: .5rem; line-height: 1.2; }
.ficha-cat    { display: inline-block; background: var(--blue-l); color: var(--blue); font-size: .85rem; font-weight: 700; padding: .3rem .9rem; border-radius: 999px; margin-bottom: 1.25rem; }
.ficha-row    { display: flex; gap: .75rem; align-items: flex-start; padding: .75rem 0; border-bottom: 1px solid var(--gray-b); }
.ficha-row:last-child { border-bottom: none; }
.ficha-icon   { font-size: 1.3rem; flex-shrink: 0; width: 2rem; text-align: center; }
.ficha-info   { flex: 1; }
.ficha-lbl    { font-size: .75rem; font-weight: 600; color: var(--gray); text-transform: uppercase; letter-spacing: .5px; margin-bottom: .15rem; }
.ficha-val    { font-size: .95rem; color: var(--text); }
.ficha-actions { display: flex; gap: .75rem; flex-wrap: wrap; margin-top: 1.5rem; }
.ficha-actions .btn { padding: .6rem 1.2rem; font-size: .9rem; }
.ficha-mapa   { background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.ficha-mapa iframe { width: 100%; height: 300px; border: none; display: block; }
.ficha-mapa-link { display: block; text-align: center; padding: .75rem; font-size: .85rem; font-weight: 600; color: var(--blue); }
.similar-title { font-size: 1.1rem; font-weight: 700; margin: 2rem 0 1rem; color: var(--blue); }

/* ── Buscador página ── */
.buscar-header { padding: 2rem 0 1rem; }
.buscar-form   { display: flex; gap: .75rem; flex-wrap: wrap; }
.buscar-input  { flex: 1; min-width: 220px; padding: .75rem 1rem; border: 2px solid var(--gray-b); border-radius: var(--radius-s); font-size: 1rem; font-family: var(--font); outline: none; }
.buscar-input:focus { border-color: var(--blue); }
.buscar-submit { background: var(--blue); color: var(--white); border: none; padding: .75rem 1.5rem; border-radius: var(--radius-s); font-size: 1rem; font-weight: 600; cursor: pointer; font-family: var(--font); }
.buscar-submit:hover { background: var(--blue-d); }
.result-info { font-size: .9rem; color: var(--gray); margin: 1rem 0; }
.result-info strong { color: var(--text); }
.no-results { text-align: center; padding: 3rem; }
.no-results h2 { color: var(--gray); margin-bottom: .5rem; }

/* ── Paginación ── */
.pagination { display: flex; gap: .5rem; flex-wrap: wrap; justify-content: center; margin-top: 2.5rem; }
.pag-btn { padding: .5rem .9rem; border-radius: var(--radius-s); background: var(--white); color: var(--blue); font-weight: 600; font-size: .9rem; box-shadow: var(--shadow); transition: background .2s; }
.pag-btn:hover { background: var(--blue); color: var(--white); text-decoration: none; }
.pag-btn.active { background: var(--blue); color: var(--white); }

/* ── Breadcrumb ── */
.breadcrumb { font-size: .85rem; color: var(--gray); padding: .75rem 0; }
.breadcrumb a { color: var(--gray); }
.breadcrumb a:hover { color: var(--blue); }
.breadcrumb span { margin: 0 .4rem; }

/* ── Page header ── */
.page-header { background: var(--blue); color: var(--white); padding: 2.5rem 0 2rem; }
.page-header h1 { font-size: clamp(1.5rem,4vw,2.2rem); font-weight: 800; }
.page-header p  { opacity: .8; margin-top: .4rem; }

/* ── Admin ── */
.admin-wrap  { display: grid; grid-template-columns: 220px 1fr; gap: 2rem; align-items: start; padding: 2rem 0; }
.admin-sidebar { background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.admin-sidebar h3 { background: var(--blue); color: var(--white); padding: 1rem 1.25rem; font-size: .95rem; font-weight: 700; }
.admin-sidebar a  { display: block; padding: .75rem 1.25rem; color: var(--text); border-bottom: 1px solid var(--gray-b); font-size: .9rem; }
.admin-sidebar a:hover, .admin-sidebar a.active { background: var(--blue-l); color: var(--blue); text-decoration: none; }
.admin-main  { background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); padding: 1.75rem; }
.admin-main h2 { font-size: 1.3rem; font-weight: 700; color: var(--blue); margin-bottom: 1.25rem; padding-bottom: .75rem; border-bottom: 2px solid var(--gray-b); }
.stat-cards  { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 1rem; margin-bottom: 1.5rem; }
.stat-card   { background: var(--blue-l); border-radius: var(--radius-s); padding: 1.25rem; text-align: center; }
.stat-card .n { font-size: 2rem; font-weight: 800; color: var(--blue); }
.stat-card .l { font-size: .8rem; color: var(--gray); margin-top: .2rem; }

/* Tabla admin */
.admin-table { width: 100%; border-collapse: collapse; font-size: .88rem; }
.admin-table th { background: var(--gray-l); padding: .65rem 1rem; text-align: left; font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .4px; color: var(--gray); border-bottom: 2px solid var(--gray-b); }
.admin-table td { padding: .65rem 1rem; border-bottom: 1px solid var(--gray-b); vertical-align: top; }
.admin-table tr:hover td { background: var(--gray-l); }
.admin-search-bar { display: flex; gap: .75rem; margin-bottom: 1.25rem; }
.admin-search-bar input { flex: 1; padding: .6rem .9rem; border: 2px solid var(--gray-b); border-radius: var(--radius-s); font-size: .9rem; font-family: var(--font); outline: none; }
.admin-search-bar input:focus { border-color: var(--blue); }

/* Formulario */
.form-group { margin-bottom: 1rem; }
.form-group label { display: block; font-size: .85rem; font-weight: 600; margin-bottom: .3rem; color: var(--gray); }
.form-group input, .form-group textarea, .form-group select {
  width: 100%; padding: .6rem .9rem; border: 2px solid var(--gray-b); border-radius: var(--radius-s);
  font-size: .9rem; font-family: var(--font); outline: none;
}
.form-group input:focus, .form-group textarea:focus { border-color: var(--blue); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }

/* Alert */
.alert { padding: .85rem 1.25rem; border-radius: var(--radius-s); margin-bottom: 1rem; font-size: .9rem; }
.alert-ok  { background: #dcfce7; color: #15803d; border: 1px solid #86efac; }
.alert-err { background: #fee2e2; color: #b91c1c; border: 1px solid #fca5a5; }

/* ── Footer ── */
.site-footer { background: var(--blue-d); color: rgba(255,255,255,.8); margin-top: 4rem; padding: 3rem 0 0; }
.footer-inner { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 2rem; padding-bottom: 2rem; }
.footer-col h4 { color: var(--white); font-size: .95rem; margin-bottom: .75rem; }
.footer-col p  { font-size: .85rem; line-height: 1.6; }
.footer-col ul { display: flex; flex-direction: column; gap: .4rem; }
.footer-col a  { color: rgba(255,255,255,.7); font-size: .85rem; }
.footer-col a:hover { color: var(--white); text-decoration: none; }
.footer-bottom { background: rgba(0,0,0,.2); text-align: center; padding: 1rem; font-size: .8rem; }

/* ── Loading ── */
.loading { text-align: center; padding: 2rem; color: var(--gray); }
.spinner { display: inline-block; width: 28px; height: 28px; border: 3px solid var(--gray-b); border-top-color: var(--blue); border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Trending / Más buscadas ── */
.trending-section {
  background: var(--white);
  padding: 2rem 0 2.5rem;
  border-bottom: 1px solid var(--gray-b);
}
.trending-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
}
.trending-title {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text);
  margin: 0;
}
.trending-badge {
  background: linear-gradient(135deg, #ef4444, #f97316);
  color: var(--white);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .6px;
  text-transform: uppercase;
  padding: .2rem .7rem;
  border-radius: 999px;
}
.trending-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: .6rem;
}
.trending-card {
  display: flex;
  align-items: center;
  gap: .85rem;
  background: var(--gray-l);
  border: 1px solid var(--gray-b);
  border-radius: var(--radius-s);
  padding: .7rem 1rem;
  color: var(--text);
  text-decoration: none;
  transition: background .18s, box-shadow .18s, transform .18s;
  position: relative;
}
.trending-card:hover {
  background: var(--blue-l);
  border-color: var(--blue);
  box-shadow: 0 2px 12px rgba(15,76,129,.12);
  transform: translateX(3px);
  text-decoration: none;
  color: var(--blue);
}
.trending-icon { font-size: 1.5rem; flex-shrink: 0; }
.trending-info { flex: 1; min-width: 0; }
.trending-name  { display: block; font-weight: 600; font-size: .92rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.trending-count { display: block; font-size: .75rem; color: var(--gray); margin-top: .1rem; }
.trending-arrow { font-size: 1.2rem; color: var(--gray); font-weight: 300; flex-shrink: 0; }
.trending-card:hover .trending-arrow { color: var(--blue); }

/* ── Teléfonos múltiples en ficha (3 columnas) ── */
.phones-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: .5rem;
  margin-top: .35rem;
}
.phone-col {
  display: flex;
  align-items: center;
  gap: .5rem;
  background: var(--blue-l);
  border: 1px solid #c7daf0;
  border-radius: var(--radius-s);
  padding: .55rem .75rem;
  color: var(--blue);
  text-decoration: none;
  font-weight: 600;
  font-size: .88rem;
  transition: background .15s, transform .1s;
}
.phone-col:hover {
  background: var(--blue);
  color: var(--white);
  text-decoration: none;
  transform: translateY(-1px);
}
.phone-icon { font-size: 1rem; flex-shrink: 0; }
.phone-num  { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ── Touch targets mínimos ── */
.btn, .pag-btn, .buscar-submit, .search-wrap button,
.chip, .cat-card, .nav-toggle {
  min-height: 44px;
}
.btn { min-height: 40px; }

/* ── Responsive 1024px ── */
@media (max-width: 1024px) {
  .cards-grid { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
  .cat-grid   { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
}

/* ── Responsive 900px (tablet) ── */
@media (max-width: 900px) {
  .ficha-wrap  { grid-template-columns: 1fr; }
  .admin-wrap  { grid-template-columns: 1fr; }
  .admin-sidebar { display: flex; overflow-x: auto; border-radius: var(--radius) var(--radius) 0 0; }
  .admin-sidebar h3, .admin-sidebar a { white-space: nowrap; }
  .admin-main  { padding: 1.25rem; }
  .form-row    { grid-template-columns: 1fr; }
  .ficha-card  { padding: 1.5rem; }
  .ficha-nombre { font-size: 1.5rem; }
  .section { padding: 2rem 0; }
  .hero { padding: 3rem 0 2.5rem; }
  .stats-inner { gap: 1.5rem; }

  /* Tabla admin con scroll horizontal */
  .table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .admin-table  { min-width: 600px; }
}

/* ── Trending responsive ── */
@media (max-width: 900px) {
  .trending-grid { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
}
@media (max-width: 640px) {
  .trending-section { padding: 1.5rem 0 2rem; }
  .trending-title   { font-size: 1.1rem; }
  .trending-grid    { grid-template-columns: 1fr 1fr; gap: .45rem; }
  .trending-card    { padding: .6rem .75rem; gap: .6rem; }
  .trending-icon    { font-size: 1.25rem; }
  .trending-name    { font-size: .82rem; }
  .trending-count   { display: none; }
}
@media (max-width: 400px) {
  .trending-grid { grid-template-columns: 1fr; }
  .trending-count { display: block; }
}

/* ── Responsive 640px (mobile) ── */
@media (max-width: 640px) {
  /* Header */
  .site-header { position: relative; }
  .main-nav {
    display: none; flex-direction: column; gap: 0;
    position: absolute; top: 100%; left: 0; right: 0;
    background: var(--blue-d); padding: .5rem 0;
    box-shadow: 0 4px 12px rgba(0,0,0,.3); z-index: 200;
  }
  .main-nav.open { display: flex; }
  .main-nav a {
    padding: .85rem 1.5rem; border-bottom: 1px solid rgba(255,255,255,.1);
    font-size: 1rem;
  }
  .nav-toggle { display: block; }

  /* Hero */
  .hero { padding: 2rem 0 1.75rem; }
  .hero h1 { font-size: 1.6rem; }
  .hero p  { font-size: 1rem; margin-bottom: 1.5rem; }
  .hero-badge { font-size: .75rem; }

  /* Buscador hero — input arriba, botón abajo en pantallas muy chicas */
  .search-wrap { flex-direction: column; border-radius: var(--radius); overflow: hidden; }
  .search-wrap input  { font-size: 1rem; padding: .85rem 1rem; border-radius: var(--radius) var(--radius) 0 0; }
  .search-wrap button { padding: .85rem 1rem; font-size: 1rem; border-radius: 0 0 var(--radius) var(--radius); width: 100%; }
  .search-chips { gap: .4rem; }
  .chip { font-size: .78rem; padding: .35rem .7rem; }

  /* Stats */
  .stats-bar { padding: .75rem 0; }
  .stats-inner { gap: 1rem; }
  .stat-n { font-size: 1.3rem; }

  /* Secciones */
  .section { padding: 1.75rem 0; }
  .section-title { font-size: 1.2rem; margin-bottom: 1rem; }

  /* Categorías */
  .cat-grid { grid-template-columns: repeat(3, 1fr); gap: .65rem; }
  .cat-card { padding: .85rem .5rem; }
  .cat-icon { font-size: 1.6rem; margin-bottom: .3rem; }
  .cat-name { font-size: .75rem; }
  .cat-count { font-size: .68rem; }

  /* Cards de negocios */
  .cards-grid { grid-template-columns: 1fr; gap: 1rem; }
  .card-actions { flex-direction: column; gap: .4rem; }
  .card-actions .btn { width: 100%; justify-content: center; padding: .6rem 1rem; font-size: .88rem; }
  .card-actions .no-tel { text-align: center; }

  /* Buscar página */
  .buscar-header { padding: 1.25rem 0 .75rem; }
  .buscar-form   { flex-direction: column; gap: .5rem; }
  .buscar-form > div { min-width: 0; width: 100%; }
  .buscar-input  { width: 100%; min-width: 0; font-size: 1rem; }
  .buscar-submit { width: 100%; padding: .85rem 1rem; font-size: 1rem; }

  /* Autocomplete en buscar */
  #buscar-dropdown { max-height: 220px; }
  .autocomplete-item { padding: .65rem 1rem; }

  /* Paginación */
  .pagination { gap: .35rem; margin-top: 1.75rem; }
  .pag-btn { padding: .55rem .75rem; font-size: .85rem; }

  /* Page header (categoría) */
  .page-header { padding: 1.5rem 0 1.25rem; }
  .page-header h1 { font-size: 1.4rem; }

  /* Ficha */
  .ficha-card { padding: 1.25rem; }
  .ficha-nombre { font-size: 1.3rem; }
  .ficha-actions { flex-direction: column; }
  .ficha-actions .btn { width: 100%; justify-content: center; }
  .ficha-mapa iframe { height: 220px; }

  /* Footer */
  .site-footer { margin-top: 2.5rem; }
  .footer-inner { grid-template-columns: 1fr; gap: 1.25rem; padding-bottom: 1.25rem; }

  /* Admin */
  .admin-main { padding: 1rem; }
  .stat-cards { grid-template-columns: repeat(2, 1fr); }
  .admin-search-bar { flex-direction: column; }
}

/* ── Responsive 400px (teléfonos pequeños) ── */
@media (max-width: 400px) {
  .container { padding: 0 .85rem; }
  .cat-grid { grid-template-columns: repeat(2, 1fr); }
  .hero h1 { font-size: 1.4rem; }
  .card-body { padding: 1rem 1rem .65rem; }
  .stat-cards { grid-template-columns: 1fr; }
}
