/* ═══════════════════════════════════════════════
   Guía FYO — local.css (Etapa 3)
   Página pública de perfil de cada local
   Planes: gratis / base / fyo
   ═══════════════════════════════════════════════ */

:root {
  --orange: #E8650A;
  --yellow: #F5A623;
  --teal:   #1DBFA3;
  --navy:   #0F1923;
  --pink:   #FF6B9D;
  --green:  #27AE60;
  --cream:  #FFF8F0;
  --white:  #ffffff;
  --text:   #333344;
  --muted:  #777788;
  --border: #EDE8E2;
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { font-family: 'Nunito', sans-serif; background: var(--cream); color: var(--text); overflow-x: hidden; }

/* ══════════════ NAV ══════════════ */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 200;
  background: var(--navy); display: flex; align-items: center;
  justify-content: space-between; padding: 14px 40px;
  box-shadow: 0 2px 20px rgba(0,0,0,0.3);
}
.nav-logo { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.nav-paw { font-size: 22px; }
.logo-text { font-family: 'Fredoka One', cursive; font-size: 20px; color: var(--yellow); display: block; line-height: 1.1; }
.nav-logo small { font-size: 10px; color: #888; font-weight: 600; display: block; }
.nav-right { display: flex; align-items: center; gap: 16px; }
.nav-back {
  color: #aaa; font-weight: 700; font-size: 14px; text-decoration: none; transition: color 0.2s;
}
.nav-back:hover { color: var(--yellow); }
/* login-btn, user-btn, user-avatar, user-menu → auth.css */
.nav-right { position: relative; }

/* ══════════════ ESTADOS DE CARGA ══════════════ */
.loading-state {
  min-height: 100vh; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 18px;
  padding-top: 80px; background: var(--navy);
}
.spinner {
  width: 44px; height: 44px; border: 4px solid rgba(255,255,255,0.12);
  border-top-color: var(--orange); border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
.loading-state p { color: #5a7a8a; font-weight: 700; }
@keyframes spin { to { transform: rotate(360deg); } }

.error-state {
  min-height: 100vh; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 16px;
  padding: 100px 20px 40px; text-align: center;
}
.error-icon { font-size: 3.5rem; }
.error-state h2 { font-family: 'Fredoka One', cursive; font-size: 1.8rem; color: var(--navy); }
.error-state p { color: var(--muted); }
.error-btn {
  margin-top: 8px; background: var(--orange); color: white;
  padding: 12px 28px; border-radius: 50px; text-decoration: none;
  font-weight: 800; font-size: 0.95rem; transition: transform 0.2s;
}
.error-btn:hover { transform: scale(1.03); }

/* ══════════════ HERO ══════════════ */
.hero {
  position: relative; min-height: 420px; display: flex;
  align-items: flex-end; margin-top: 62px; overflow: hidden;
  background: var(--navy);
}
.hero-gallery {
  position: absolute; inset: 0; display: flex;
}
.hero-img {
  flex: 1; background-size: cover; background-position: center;
}
.hero-logo-wrap {
  position: absolute; inset: 0; display: flex;
  align-items: center; justify-content: center;
  background: rgba(255,255,255,0.08);
}
.hero-logo-img {
  max-width: 220px; max-height: 220px; object-fit: contain;
  border-radius: 20px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.3);
  background: white; padding: 12px;
}
@media (max-width: 600px) {
  .hero-logo-img { max-width: 140px; max-height: 140px; border-radius: 16px; padding: 8px; }
}
.hero-placeholder {
  position: absolute; inset: 0; display: flex; align-items: center;
  justify-content: center; font-size: 120px; opacity: 0.08;
}
.fav-btn-local {
  position: absolute; top: 16px; right: 16px; z-index: 10;
  padding: 8px 18px; border-radius: 50px;
  background: rgba(0,0,0,0.5); backdrop-filter: blur(6px);
  border: 1.5px solid rgba(255,255,255,0.2);
  color: rgba(255,255,255,0.85); font-family: 'Nunito', sans-serif;
  font-weight: 800; font-size: 14px; cursor: pointer;
  transition: all 0.2s;
}
.fav-btn-local:hover { background: rgba(0,0,0,0.7); color: white; }
.fav-btn-local.fav-active {
  background: #ff4757; border-color: #ff4757; color: white;
}
.hero-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(15,25,35,0.92) 0%, rgba(15,25,35,0.4) 60%, rgba(15,25,35,0.1) 100%);
}
.hero-content {
  position: relative; z-index: 1; padding: 36px 40px;
  width: 100%; max-width: 1100px; margin: 0 auto;
}
.hero-badges { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.hero-badge {
  padding: 5px 14px; border-radius: 50px; font-size: 12px; font-weight: 800;
  text-transform: uppercase; letter-spacing: 1px;
}
.badge-rubro { background: rgba(232,101,10,0.3); color: var(--yellow); border: 1px solid rgba(232,101,10,0.4); }
.badge-gratis { background: rgba(255,255,255,0.1); color: #aaa; border: 1px solid rgba(255,255,255,0.15); }
.badge-base { background: rgba(245,166,35,0.2); color: var(--yellow); border: 1px solid rgba(245,166,35,0.3); }
.badge-fyo { background: rgba(29,191,163,0.25); color: var(--teal); border: 1px solid rgba(29,191,163,0.35); }
.badge-top { background: rgba(29,191,163,0.25); color: var(--teal); border: 1px solid rgba(29,191,163,0.35); }
.badge-voucher { background: rgba(245,166,35,0.2); color: var(--yellow); border: 1px solid rgba(245,166,35,0.3); }
.hero-title {
  font-family: 'Fredoka One', cursive; font-size: clamp(2rem, 5vw, 3.2rem);
  color: white; line-height: 1.1; margin-bottom: 12px;
}
.hero-meta { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-tag {
  display: flex; align-items: center; gap: 6px;
  color: rgba(255,255,255,0.7); font-size: 0.9rem; font-weight: 700;
}

/* ══════════════ LAYOUT ══════════════ */
.local-layout {
  max-width: 1100px; margin: 0 auto; padding: 36px 20px 60px;
  display: grid; grid-template-columns: 1fr 360px; gap: 28px;
  align-items: start;
}
.local-main { display: flex; flex-direction: column; gap: 20px; }

/* ══════════════ INFO CARDS ══════════════ */
.info-card {
  background: var(--white); border: 1.5px solid var(--border);
  border-radius: 18px; padding: 24px;
}
.info-card-title {
  font-size: 0.75rem; font-weight: 800; text-transform: uppercase;
  letter-spacing: 1.2px; color: var(--orange); margin-bottom: 14px;
  padding-bottom: 8px; border-bottom: 1px solid rgba(232,101,10,0.15);
}
.info-text { color: var(--text); line-height: 1.75; font-size: 0.97rem; }
.info-text-muted { color: var(--muted); font-weight: 700; font-size: 0.95rem; line-height: 1.6; }

/* Horarios */
.horarios-display { display: flex; flex-direction: column; gap: 6px; }
.horario-linea {
  display: flex; justify-content: space-between; align-items: center;
  padding: 8px 12px; border-radius: 8px; font-size: 0.92rem;
  color: var(--text); font-weight: 600;
}
.horario-linea:nth-child(odd) { background: var(--cream); }
.horario-linea strong {
  min-width: 100px; color: var(--navy); font-weight: 800; font-size: 0.88rem;
}

/* Menú PDF */
.menu-link {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 20px; background: var(--cream); border: 2px solid var(--border);
  border-radius: 10px; color: var(--navy); font-weight: 800; font-size: 0.9rem;
  text-decoration: none; transition: all 0.2s;
  cursor: pointer; font-family: 'Nunito', sans-serif;
}
.menu-link:hover { border-color: var(--orange); background: #fff5ee; }

/* ══════════════ MODAL MENÚ PDF ══════════════ */
.pdf-modal {
  position: fixed; inset: 0; z-index: 600; background: rgba(0,0,0,0.75);
  display: flex; align-items: center; justify-content: center;
  padding: 20px; opacity: 0; pointer-events: none;
  transition: opacity 0.25s;
}
.pdf-modal.open { opacity: 1; pointer-events: all; }
.pdf-modal-box {
  background: white; border-radius: 14px; overflow: hidden;
  width: 100%; max-width: 900px; height: 88vh;
  display: flex; flex-direction: column;
  box-shadow: 0 20px 60px rgba(0,0,0,0.4);
}
.pdf-modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 18px; background: var(--navy); color: white;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}
.pdf-modal-header strong {
  font-size: 0.95rem; font-weight: 800;
  color: var(--yellow);
}
.pdf-modal-actions {
  display: flex; align-items: center; gap: 12px;
}
.pdf-modal-open {
  font-size: 0.78rem; font-weight: 700; color: rgba(255,255,255,0.75);
  text-decoration: none; padding: 6px 10px; border-radius: 6px;
  transition: background 0.2s, color 0.2s;
}
.pdf-modal-open:hover { background: rgba(255,255,255,0.08); color: white; }
.pdf-modal-close {
  background: rgba(255,255,255,0.08); border: none; color: white;
  width: 32px; height: 32px; border-radius: 50%;
  font-size: 16px; cursor: pointer; display: flex;
  align-items: center; justify-content: center;
  transition: background 0.2s;
}
.pdf-modal-close:hover { background: #ff4757; }
.pdf-modal-box iframe {
  flex: 1; width: 100%; border: none; background: #2a2a2a;
}
@media (max-width: 600px) {
  .pdf-modal { padding: 0; }
  .pdf-modal-box { height: 100vh; max-height: 100vh; border-radius: 0; }
  .pdf-modal-open { display: none; }
}

/* Ubicación */
.maps-btn {
  display: inline-flex; align-items: center; gap: 8px; margin-top: 14px;
  padding: 10px 20px; background: white; border: 2px solid var(--border);
  border-radius: 10px; color: var(--navy); font-weight: 800; font-size: 0.88rem;
  text-decoration: none; transition: all 0.2s;
}
.maps-btn:hover { border-color: var(--orange); background: #fff5ee; }

/* ══════════════ GALERÍA ══════════════ */
.foto-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px;
}
.foto-item {
  aspect-ratio: 1; border-radius: 10px; overflow: hidden;
  cursor: pointer; transition: transform 0.2s;
}
.foto-item:hover { transform: scale(1.03); }
.foto-item img {
  width: 100%; height: 100%; object-fit: cover; display: block;
}
.foto-item:first-child {
  grid-column: 1 / -1; aspect-ratio: 16 / 7;
}

/* ══════════════ RESEÑAS ══════════════ */
.resenas-lista { display: flex; flex-direction: column; gap: 12px; margin-bottom: 16px; }
.resena-item {
  background: var(--cream); border-radius: 12px; padding: 14px 16px;
  border: 1px solid var(--border);
}
.resena-autor { font-weight: 800; font-size: 0.85rem; color: var(--navy); margin-bottom: 4px; }
.resena-fecha { font-size: 0.75rem; color: var(--muted); margin-bottom: 6px; }
.resena-texto { font-size: 0.9rem; color: var(--text); line-height: 1.6; }
.resenas-empty { color: var(--muted); font-size: 0.9rem; font-style: italic; }
.resena-form { margin-top: 12px; }
.resena-form-label { font-weight: 700; font-size: 0.9rem; color: var(--navy); margin-bottom: 8px; }
.resena-input {
  width: 100%; padding: 12px; border: 1.5px solid var(--border); border-radius: 10px;
  font-family: 'Nunito', sans-serif; font-size: 0.9rem; resize: vertical;
  outline: none; transition: border-color 0.2s;
}
.resena-input:focus { border-color: var(--orange); }
.resena-submit {
  margin-top: 8px; padding: 10px 24px; border: none; border-radius: 50px;
  background: var(--orange); color: white; font-family: 'Nunito', sans-serif;
  font-weight: 800; font-size: 0.88rem; cursor: pointer; transition: all 0.2s;
}
.resena-submit:hover { background: var(--yellow); color: var(--navy); }
.resena-login { color: var(--muted); font-size: 0.88rem; margin-top: 8px; }
.resena-login a { color: var(--orange); font-weight: 800; }

/* ══════════════ SIDEBAR ══════════════ */
.local-sidebar { display: flex; flex-direction: column; gap: 16px; position: sticky; top: 82px; }

/* Sello FYO */
.sello-fyo-card {
  background: linear-gradient(135deg, var(--navy), #1a2535);
  border-radius: 16px; padding: 18px 20px;
  display: flex; align-items: center; gap: 14px;
  border: 2px solid rgba(29,191,163,0.3);
}
.sello-icon { font-size: 2rem; }
.sello-info strong { display: block; color: var(--teal); font-size: 0.97rem; margin-bottom: 2px; }
.sello-info span { font-size: 0.8rem; color: #5a7a8a; font-weight: 700; }

/* Voucher card */
.voucher-card {
  background: var(--navy); border-radius: 18px; padding: 22px;
  border: 2px solid rgba(245,166,35,0.25);
}
.voucher-header { margin-bottom: 14px; }
.voucher-tag {
  font-size: 0.8rem; font-weight: 800; text-transform: uppercase;
  letter-spacing: 1px; color: var(--yellow);
}
.voucher-item { margin-bottom: 16px; padding-bottom: 16px; border-bottom: 1px solid rgba(255,255,255,0.06); }
.voucher-item:last-child { margin-bottom: 0; padding-bottom: 0; border-bottom: none; }
.voucher-texto {
  font-family: 'Fredoka One', cursive; font-size: 1.4rem;
  color: var(--yellow); line-height: 1.2; margin-bottom: 6px;
}
.voucher-validez { font-size: 0.8rem; color: #5a7a8a; font-weight: 700; margin-bottom: 12px; }
.voucher-btn {
  width: 100%; padding: 12px; border-radius: 10px; border: none;
  background: var(--orange); color: white; font-family: 'Nunito', sans-serif;
  font-weight: 800; font-size: 0.93rem; cursor: pointer;
  transition: transform 0.2s, background 0.2s;
}
.voucher-btn:hover { background: var(--yellow); color: var(--navy); transform: scale(1.02); }
.voucher-btn:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }
.voucher-success {
  text-align: center; padding: 8px 0;
}
.voucher-success .vs-check { font-size: 2rem; margin-bottom: 8px; }
.voucher-success .vs-msg { font-size: 0.88rem; color: #5a7a8a; font-weight: 700; }
.voucher-success .vs-msg strong { display: block; color: white; font-size: 0.97rem; margin-bottom: 4px; }

/* Contacto */
.contacto-card {
  background: var(--white); border: 1.5px solid var(--border); border-radius: 18px; padding: 20px;
}
.contacto-title {
  font-size: 0.75rem; font-weight: 800; text-transform: uppercase;
  letter-spacing: 1.2px; color: var(--orange); margin-bottom: 14px;
  padding-bottom: 8px; border-bottom: 1px solid rgba(232,101,10,0.15);
}
.contacto-links { display: flex; flex-direction: column; gap: 8px; }
.contacto-link {
  display: flex; align-items: center; gap: 10px; padding: 10px 14px;
  border-radius: 10px; border: 1.5px solid var(--border); text-decoration: none;
  color: var(--text); font-weight: 700; font-size: 0.9rem; transition: all 0.2s;
}
.contacto-link:hover { border-color: var(--orange); background: #fff5ee; }
.contacto-link.wsp { background: #25D366; border-color: #25D366; color: white; }
.contacto-link.wsp:hover { background: #1da850; border-color: #1da850; }

/* Compartir */
.compartir-card {
  background: var(--white); border: 1.5px solid var(--border); border-radius: 18px; padding: 20px;
}
.compartir-title {
  font-size: 0.75rem; font-weight: 800; text-transform: uppercase;
  letter-spacing: 1.2px; color: var(--orange); margin-bottom: 14px;
  padding-bottom: 8px; border-bottom: 1px solid rgba(232,101,10,0.15);
}
.compartir-btns { display: flex; gap: 8px; }
.share-btn {
  flex: 1; padding: 10px; border-radius: 10px; border: none;
  font-family: 'Nunito', sans-serif; font-weight: 800; font-size: 0.85rem;
  cursor: pointer; transition: all 0.2s;
}
.share-wsp { background: #25D366; color: white; }
.share-wsp:hover { background: #1da850; }
.share-copy { background: white; border: 1.5px solid var(--border) !important; color: var(--text); }
.share-copy:hover { border-color: var(--orange) !important; color: var(--orange); }

/* ══════════════ FOOTER ══════════════ */
.footer {
  background: #060c12; color: #666; text-align: center;
  padding: 24px 20px; font-size: 13px; font-weight: 600;
}
.footer a { color: var(--yellow); text-decoration: none; }
.footer a:hover { text-decoration: underline; }

/* ══════════════ LIGHTBOX ══════════════ */
.lightbox {
  position: fixed; inset: 0; z-index: 600; background: rgba(0,0,0,0.93);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none; transition: opacity 0.3s;
}
.lightbox.open { opacity: 1; pointer-events: all; }
.lightbox img { max-width: 90vw; max-height: 88vh; border-radius: 10px; object-fit: contain; }
.lightbox-close {
  position: absolute; top: 20px; right: 24px; background: none; border: none;
  color: white; font-size: 28px; cursor: pointer; opacity: 0.7; transition: opacity 0.2s;
}
.lightbox-close:hover { opacity: 1; }

/* auth-overlay, auth-box, auth-tabs, auth-btn, etc. → auth.css */

/* ══════════════ COOKIE BANNER ══════════════ */
.cookie-banner {
  position: fixed; bottom: 0; left: 0; right: 0; background: var(--navy);
  color: white; padding: 16px 24px; display: flex; align-items: center;
  justify-content: space-between; gap: 16px; flex-wrap: wrap; z-index: 400;
  box-shadow: 0 -4px 24px rgba(0,0,0,0.3); font-size: 14px;
  transform: translateY(100%); transition: transform 0.4s ease;
}
.cookie-banner.visible { transform: translateY(0); }
.cookie-banner p { margin: 0; flex: 1; min-width: 200px; line-height: 1.5; color: #ccc; }
.cookie-banner a { color: var(--teal); text-decoration: underline; }
.cookie-btns { display: flex; gap: 10px; flex-shrink: 0; }
.cookie-btns button {
  padding: 9px 20px; border-radius: 50px; border: none; font-weight: 700;
  font-size: 13px; cursor: pointer; font-family: 'Nunito', sans-serif;
}
.cookie-accept { background: var(--teal); color: var(--navy); }
.cookie-btns button:not(.cookie-accept) { background: transparent; color: #ccc; border: 1px solid #444; }

/* ══════════════ RESPONSIVE ══════════════ */
@media (max-width: 900px) {
  .nav { padding: 12px 18px; }
  .nav-back { display: none; }
  .local-layout { grid-template-columns: 1fr; }
  .local-sidebar { position: static; }
  .hero-content { padding: 24px 20px; }
  .foto-grid { grid-template-columns: 1fr 1fr; }
  .foto-item:first-child { grid-column: 1 / -1; }
}
@media (max-width: 480px) {
  .hero { min-height: 300px; }
  .hero-title { font-size: 1.7rem; }
  .foto-grid { grid-template-columns: 1fr; }
  .foto-item:first-child { aspect-ratio: 16 / 9; }
  .compartir-btns { flex-direction: column; }
}
