/* ============================================
   VARIABLES CSS - MODO OSCURO (PREDETERMINADO)
   ============================================ */

:root {
  /* ===== FUENTE ===== */
  --font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  /* ===== TAMAÑOS DE TEXTO (Mobile First) ===== */
  --text-h1: 22px;
  --text-h2: 18px;
  --text-body: 14px;
  --text-small: 13px;
  --text-button: 15px;

  /* ===== COLORES MODO OSCURO ===== */
  --color-primary: #ff8a50;
  --color-primary-bg: #3d1a0a;
  --color-secondary: #25d366;
  --color-secondary-hover: #128c7e;

  --text-dark: #e8e8e8;
  --text-muted: #aaaaaa;
  --text-light: #888888;
  --text-white: #ffffff;

  --bg-body-color: #1a0a1a;
  --bg-card: rgba(30, 15, 30, 0.92);
  --bg-input: rgba(40, 20, 40, 0.9);
  --bg-input-focus: #2a1a2a;

  --border-color: #3d2a3d;
  --border-focus: #ff8a50;

  /* ===== BOTÓN DE TEMA ===== */
  --btn-theme-bg: rgba(255, 255, 255, 0.1);
  --btn-theme-hover: rgba(255, 255, 255, 0.2);
  --btn-theme-icon: #ffffff;
}

/* ============================================
   MODO CLARO (SOBRESCRIBE VARIABLES)
   ============================================ */

[data-theme="light"] {
  --color-primary: #e65100;
  --color-primary-bg: #fff3e0;
  --color-secondary: #25d366;
  --color-secondary-hover: #128c7e;

  --text-dark: #1a1a1a;
  --text-muted: #666666;
  --text-light: #999999;
  --text-white: #ffffff;

  --bg-body-color: #dd33bb;
  --bg-card: rgba(255, 255, 255, 0.95);
  --bg-input: rgba(255, 255, 255, 0.95);
  --bg-input-focus: #ffffff;

  --border-color: #e0e0e0;
  --border-focus: #e65100;

  --btn-theme-bg: rgba(0, 0, 0, 0.08);
  --btn-theme-hover: rgba(0, 0, 0, 0.15);
  --btn-theme-icon: #1a1a1a;
}

/* ============================================
   MEDIA QUERIES (SOLO TAMAÑOS DE TEXTO)
   ============================================ */

@media (min-width: 768px) {
  :root {
    --text-h1: 28px;
    --text-h2: 20px;
    --text-body: 15px;
    --text-small: 14px;
    --text-button: 16px;
  }
}

@media (min-width: 1025px) {
  :root {
    --text-h1: 32px;
    --text-h2: 22px;
    --text-body: 15px;
    --text-small: 14px;
    --text-button: 17px;
  }
}

@media (min-width: 1400px) {
  :root {
    --text-h1: 36px;
    --text-h2: 24px;
    --text-body: 16px;
    --text-small: 14px;
    --text-button: 18px;
  }
}

/* ============================================
   RESET Y ESTILOS BASE
   ============================================ */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: var(--font-family);
}

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--bg-body-color);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1000 1000'%3E%3Cdefs%3E%3CradialGradient id='a' cx='500' cy='500' r='40.5%25' gradientUnits='userSpaceOnUse'%3E%3Cstop offset='0' stop-color='%23dd33bb'/%3E%3Cstop offset='1' stop-color='%23404'/%3E%3C/radialGradient%3E%3CradialGradient id='b' cx='500' cy='500' r='36.3%25' gradientUnits='userSpaceOnUse'%3E%3Cstop offset='0' stop-color='%23F70' stop-opacity='1'/%3E%3Cstop offset='1' stop-color='%23F70' stop-opacity='0'/%3E%3C/radialGradient%3E%3C/defs%3E%3Crect fill='url(%23a)' width='1000' height='1000'/%3E%3Cg fill='none' stroke='%23F6B' stroke-width='1' stroke-miterlimit='10' stroke-opacity='0.62'%3E%3Crect x='12.5' y='12.5' width='975' height='975'/%3E%3Crect x='25' y='25' width='950' height='950'/%3E%3Crect x='37.5' y='37.5' width='925' height='925'/%3E%3Crect x='50' y='50' width='900' height='900'/%3E%3Crect x='62.5' y='62.5' width='875' height='875'/%3E%3Crect x='75' y='75' width='850' height='850'/%3E%3Crect x='87.5' y='87.5' width='825' height='825'/%3E%3Crect x='100' y='100' width='800' height='800'/%3E%3Crect x='112.5' y='112.5' width='775' height='775'/%3E%3Crect x='125' y='125' width='750' height='750'/%3E%3Crect x='137.5' y='137.5' width='725' height='725'/%3E%3Crect x='150' y='150' width='700' height='700'/%3E%3Crect x='162.5' y='162.5' width='675' height='675'/%3E%3Crect x='175' y='175' width='650' height='650'/%3E%3Crect x='187.5' y='187.5' width='625' height='625'/%3E%3Crect x='200' y='200' width='600' height='600'/%3E%3Crect x='212.5' y='212.5' width='575' height='575'/%3E%3Crect x='225' y='225' width='550' height='550'/%3E%3Crect x='237.5' y='237.5' width='525' height='525'/%3E%3Crect x='250' y='250' width='500' height='500'/%3E%3Crect x='262.5' y='262.5' width='475' height='475'/%3E%3Crect x='275' y='275' width='450' height='450'/%3E%3Crect x='287.5' y='287.5' width='425' height='425'/%3E%3Crect x='300' y='300' width='400' height='400'/%3E%3Crect x='312.5' y='312.5' width='375' height='375'/%3E%3Crect x='325' y='325' width='350' height='350'/%3E%3Crect x='337.5' y='337.5' width='325' height='325'/%3E%3Crect x='350' y='350' width='300' height='300'/%3E%3Crect x='362.5' y='362.5' width='275' height='275'/%3E%3Crect x='375' y='375' width='250' height='250'/%3E%3Crect x='387.5' y='387.5' width='225' height='225'/%3E%3Crect x='400' y='400' width='200' height='200'/%3E%3Crect x='412.5' y='412.5' width='175' height='175'/%3E%3Crect x='425' y='425' width='150' height='150'/%3E%3Crect x='437.5' y='437.5' width='125' height='125'/%3E%3Crect x='450' y='450' width='100' height='100'/%3E%3Crect x='462.5' y='462.5' width='75' height='75'/%3E%3Crect x='475' y='475' width='50' height='50'/%3E%3Crect x='487.5' y='487.5' width='25' height='25'/%3E%3C/g%3E%3Crect fill-opacity='0.62' fill='url(%23b)' width='1000' height='1000'/%3E %3C/svg%3E");
  background-attachment: fixed;
  background-size: cover;
  min-height: 100vh;
  padding: 12px;
  transition: background-color 0.3s ease;
}

/* ============================================
   HEADER
   ============================================ */

header {
  position: sticky;
  top: 0;
  background: var(--bg-card);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  padding: 12px 16px 16px;
  z-index: 10;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  margin-bottom: 16px;
  border-radius: 14px;
  transition: background 0.3s ease;
}

.header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1200px;
  margin: 0 auto;
  gap: 8px;
}

/* ============================================
   H1 + LOGO
   ============================================ */

h1 {
  font-family:
    "Archivo Narrow",
    system-ui,
    -apple-system,
    sans-serif;
  font-size: var(--text-h1);
  color: var(--color-primary);
  font-weight: 700;
  margin: 0;
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  gap: 2px;
}

.logo-header {
  height: 32px;
  width: auto;
  display: block;
  margin-top: -4px;
  flex-shrink: 0;
}

/* ============================================
   BOTÓN DE TEMA
   ============================================ */

.btn-theme {
  background: var(--btn-theme-bg);
  border: 1px solid var(--border-color);
  border-radius: 50%;
  width: 36px;
  height: 36px;
  min-width: 36px;
  min-height: 36px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  transition: all 0.3s ease;
  color: var(--btn-theme-icon);
  padding: 0;
  flex-shrink: 0;
}

.btn-theme:hover {
  background: var(--btn-theme-hover);
  transform: scale(1.05);
}

.btn-theme:active {
  transform: scale(0.92);
}

.btn-theme .icon {
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ============================================
   BUSCADOR
   ============================================ */

#buscador {
  width: 100%;
  padding: 8px 14px;
  border: 2px solid var(--border-color);
  border-radius: 50px;
  font-size: 13px;
  outline: none;
  background: var(--bg-input);
  color: var(--text-dark);
  transition: all 0.3s ease;
  margin-top: 8px;
}

#buscador:focus {
  border-color: var(--border-focus);
  background: var(--bg-input-focus);
  box-shadow: 0 0 0 4px rgba(255, 138, 80, 0.15);
}

#buscador::placeholder {
  color: var(--text-light);
  font-size: 12px;
}

/* ============================================
   FILTROS
   ============================================ */

.filtros {
  display: flex;
  gap: 6px;
  margin: 8px 0 0;
  flex-wrap: wrap;
  align-items: center;
}

.filtro-btn {
  padding: 4px 10px;
  border: 1.5px solid var(--border-color);
  border-radius: 50px;
  background: transparent;
  color: var(--text-dark);
  font-size: 11px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.25s ease;
  white-space: nowrap;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.filtro-btn.active {
  background: var(--color-primary);
  color: white;
  border-color: var(--color-primary);
}

.filtro-btn:hover {
  transform: scale(1.04);
  opacity: 0.85;
}

.filtro-btn:active {
  transform: scale(0.94);
}

#btnAbiertos.active {
  background: #2ecc71;
  border-color: #2ecc71;
  color: white;
}

#btnAbiertos.active:hover {
  background: #27ae60;
  border-color: #27ae60;
}

/* ============================================
   LISTA DE RESTAURANTES
   ============================================ */

#lista-negocios {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding-bottom: 20px;
}

/* ============================================
   TARJETAS
   ============================================ */

.tarjeta {
  background: var(--bg-card);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
  transition: all 0.2s ease;
  -webkit-tap-highlight-color: transparent;
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.tarjeta:active {
  transform: scale(0.98);
  background: rgba(40, 20, 40, 0.95);
}

/* ============================================
   PORTADA
   ============================================ */

.portada {
  position: relative;
  width: 100%;
  height: 180px;
  overflow: hidden;
  background: var(--bg-body-color);
}

.portada-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.tarjeta:hover .portada-img {
  transform: scale(1.03);
}

.portada-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 60%;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.7) 0%, transparent 100%);
  pointer-events: none;
}

.portada-info {
  position: absolute;
  bottom: 12px;
  left: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  z-index: 2;
  max-width: 80%;
}

.portada-logo {
  width: 40px;
  height: 40px;
  object-fit: cover;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.8);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  flex-shrink: 0;
}

.portada-nombre {
  color: white;
  font-size: 16px;
  font-weight: 700;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
  line-height: 1.2;
  letter-spacing: 0.3px;
}

.portada-estado {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  color: white;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.5px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  z-index: 2;
}

/* ============================================
   CONTENIDO DE TARJETA
   ============================================ */

.tarjeta-contenido {
  padding: 14px 16px 16px;
}

.descripcion {
  color: var(--text-muted);
  font-size: var(--text-body);
  margin-bottom: 10px;
  line-height: 1.4;
}

.promocion {
  background: var(--color-primary-bg);
  color: var(--color-primary);
  padding: 10px 12px;
  border-radius: 10px;
  font-weight: 600;
  font-size: var(--text-body);
  margin-bottom: 10px;
  border-left: 4px solid var(--color-primary);
  line-height: 1.4;
}

.horario {
  color: var(--text-light);
  font-size: var(--text-small);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
}

/* ============================================
   BOTONES DE ACCIÓN
   ============================================ */

.botones-accion {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 4px;
}

.btn-pedir {
  display: block;
  background: var(--color-secondary);
  color: var(--text-white);
  text-align: center;
  padding: 14px;
  border-radius: 50px;
  text-decoration: none;
  font-weight: 600;
  font-size: var(--text-button);
  transition: all 0.3s ease;
  letter-spacing: 0.3px;
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-pedir:active {
  transform: scale(0.96);
  background: var(--color-secondary-hover);
}

.btn-web {
  display: block;
  background: var(--bg-input);
  color: var(--text-dark);
  text-align: center;
  padding: 12px;
  border-radius: 50px;
  text-decoration: none;
  font-weight: 500;
  font-size: var(--text-small);
  transition: all 0.3s ease;
  letter-spacing: 0.3px;
  min-height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1.5px solid var(--border-color);
}

.btn-web:hover {
  background: var(--border-color);
  transform: translateY(-2px);
}

.btn-web:active {
  transform: scale(0.96);
}

/* ============================================
   FOOTER
   ============================================ */

footer {
  background: var(--bg-card);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  border-radius: 16px;
  padding: 24px 20px;
  margin-top: 24px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
  transition: background 0.3s ease;
}

.footer-contenido {
  max-width: 1200px;
  margin: 0 auto;
  text-align: center;
}

footer h2 {
  font-family:
    "Archivo Narrow",
    system-ui,
    -apple-system,
    sans-serif;
  font-size: 20px;
  color: var(--color-primary);
  margin-bottom: 12px;
  letter-spacing: 0.5px;
}

footer p {
  color: var(--text-muted);
  font-size: var(--text-body);
  line-height: 1.6;
  max-width: 600px;
  margin: 0 auto 10px;
}

.footer-contacto {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px;
  margin: 16px 0 20px;
}

.footer-link {
  color: var(--color-primary);
  text-decoration: none;
  font-weight: 600;
  font-size: var(--text-body);
  transition: opacity 0.3s ease;
}

.footer-link:hover {
  opacity: 0.7;
}

.footer-copy {
  font-size: var(--text-small);
  opacity: 0.5;
  margin-top: 12px;
}

/* ============================================
   MENSAJE "SIN RESULTADOS"
   ============================================ */

.sin-resultados {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-light);
  font-size: var(--text-body);
  grid-column: 1 / -1;
}

.sin-resultados span {
  font-size: 48px;
  display: block;
  margin-bottom: 16px;
}

.sin-resultados p:last-child {
  font-size: var(--text-small);
  color: var(--text-light);
  opacity: 0.6;
  margin-top: 8px;
}

/* ============================================
   ANIMACIONES
   ============================================ */

.tarjeta {
  animation: fadeInUp 0.4s ease-out both;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.tarjeta:nth-child(1) {
  animation-delay: 0.05s;
}
.tarjeta:nth-child(2) {
  animation-delay: 0.1s;
}
.tarjeta:nth-child(3) {
  animation-delay: 0.15s;
}
.tarjeta:nth-child(4) {
  animation-delay: 0.2s;
}
.tarjeta:nth-child(5) {
  animation-delay: 0.25s;
}
.tarjeta:nth-child(6) {
  animation-delay: 0.3s;
}
.tarjeta:nth-child(7) {
  animation-delay: 0.35s;
}
.tarjeta:nth-child(8) {
  animation-delay: 0.4s;
}
.tarjeta:nth-child(9) {
  animation-delay: 0.45s;
}
.tarjeta:nth-child(10) {
  animation-delay: 0.5s;
}

/* ============================================
   MEDIA QUERIES
   ============================================ */

@media (min-width: 768px) {
  body {
    padding: 24px;
  }

  header {
    padding: 16