/* ==========================================================================
   FUENTES AUTOHOSPEDADAS

   Son exactamente los mismos archivos .woff2 que servía Google Fonts, ahora
   servidos desde este dominio: mismo render, ningún tercero y sin enviar la
   IP del visitante a Google. Licencia SIL OFL 1.1 (ver assets/fonts/OFL-*.txt).

   Detalle: Google sirve los cinco pesos de Inter con UN SOLO archivo (son
   idénticos byte a byte). Aquí se hace lo mismo —una sola descarga— pero se
   declara un @font-face por peso, igual que hacía Google, para que el render
   sea exactamente el mismo.
   ========================================================================== */

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../assets/fonts/inter.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('../assets/fonts/inter.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('../assets/fonts/inter.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('../assets/fonts/inter.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url('../assets/fonts/inter.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Cinzel';
  font-style: normal;
  font-weight: 900;
  font-display: swap;
  src: url('../assets/fonts/cinzel-900.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ==========================================================================
   CSS PROPIO - sustituye al CDN de Tailwind
   Mismo diseño y mismos valores que las utilidades que se usaban, pero
   sin descargar nada: la tarjeta no depende de ningún CDN para verse bien.
   ========================================================================== */

:root {
  --stone-50: #fafaf9;
  --stone-100: #f5f5f4;
  --stone-200: #e7e5e4;
  --stone-400: #a8a29e;
  --stone-500: #78716c;
  --stone-600: #57534e;
  --stone-700: #44403c;
  --stone-800: #292524;
  --stone-900: #1c1917;
  --amber-50: #fffbeb;
  --amber-100: #fef3c7;
  --amber-200: #fde68a;
  --amber-400: #fbbf24;
  --amber-500: #f59e0b;
  --amber-600: #d97706;
  --amber-900: #78350f;
  --rose-600: #e11d48;
  --emerald-600: #059669;
  --blue-50: #eff6ff;
  --blue-400: #60a5fa;
  --blue-600: #2563eb;
  --pink-50: #fdf2f8;
  --pink-400: #f472b6;
  --pink-500: #ec4899;
  --pink-600: #db2777;
  --purple-600: #9333ea;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }

html { height: 100%; }

body {
  margin: 0;
  padding: 0 8px;
  min-height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--stone-900);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  /* Textura de fondo del body */
  background-color: #f7f5f0;
  background-image: radial-gradient(#e5ded2 0.75px, transparent 0.75px);
  background-size: 16px 16px;
}

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

::selection { background: var(--amber-100); color: var(--amber-900); }

h1, h2, h3, p { margin: 0; }
img, svg { display: block; }
img { max-width: 100%; }
a { color: inherit; text-decoration: none; }

button {
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  cursor: pointer;
}

.hidden { display: none !important; }

/* ---------- Tarjeta ---------- */
.card {
  position: relative;
  width: 100%;
  max-width: 32rem;
  margin: auto;
  background: #fff;
  border: 1px solid rgba(231, 229, 228, .9);
  border-radius: 1rem;
  box-shadow: 0 20px 40px -15px rgba(0, 0, 0, .12);
  overflow: hidden;
}

@media (min-width: 640px) {
  .card { border-radius: 1.5rem; }
}

/* Capa de fondo: su altura la fija el JS (congelarFondo) para que la
   imagen no se reescale al desplegar el horario. */
.bg-layer {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 100%;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  -webkit-mask-image: linear-gradient(to bottom, #000 calc(100% - 90px), transparent 100%);
  mask-image: linear-gradient(to bottom, #000 calc(100% - 90px), transparent 100%);
}

.bg-layer img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: right bottom;
  opacity: .14;
  -webkit-user-select: none;
  user-select: none;
}

.card-inner { position: relative; z-index: 10; }

/* ---------- Cabecera ---------- */
.card-header {
  position: relative;
  padding: 16px 16px 12px;
  text-align: center;
  background: linear-gradient(to bottom, rgba(255, 255, 255, .95), rgba(255, 255, 255, .8), transparent);
}

@media (min-width: 640px) {
  .card-header { padding-left: 24px; padding-right: 24px; }
}

/* Barra superior: banderas + acciones */
.topbar {
  position: relative;
  z-index: 20;
  width: 100%;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.langs {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px;
  background: rgba(255, 255, 255, .95);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(231, 229, 228, .9);
  border-radius: 9999px;
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, .05);
}

.lang-btn {
  width: 28px;
  height: 28px;
  border-radius: 9999px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: .5;
  transition: opacity .2s, transform .2s, box-shadow .2s;
}

.lang-btn svg { width: 100%; height: 100%; }

.lang-btn:hover { opacity: .9; }

.lang-btn.is-active {
  opacity: 1;
  transform: scale(1.05);
  box-shadow: 0 0 0 2px var(--amber-500), 0 1px 2px 0 rgba(0, 0, 0, .05);
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.icon-btn {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 9999px;
  border: 1px solid rgba(231, 229, 228, .9);
  background: rgba(255, 255, 255, .95);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  color: var(--stone-700);
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, .05);
  transition: background-color .2s, transform .2s, color .2s;
}

.icon-btn svg { width: 14px; height: 14px; }

.icon-btn:hover { background: var(--stone-100); }

.icon-btn:active { transform: scale(.9); }

.icon-btn--qr {
  background: var(--amber-500);
  border: 0;
  color: #fff;
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, .1), 0 1px 2px -1px rgba(0, 0, 0, .1);
}

.icon-btn--qr:hover { background: var(--amber-600); }

/* Marca: logo + separador + slogan */
.brand {
  padding-top: 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.logo-wrap {
  width: 100%;
  max-width: 360px;
  padding: 0 4px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.logo {
  width: 100%;
  height: auto;
  max-height: 12rem;
  object-fit: contain;
  filter: drop-shadow(0 1px 1px rgba(0, 0, 0, .05));
}

.divider {
  width: 100%;
  margin-top: -4px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.divider-line {
  width: 7rem;
  height: 1.5px;
  background: linear-gradient(to right, transparent, var(--amber-400), transparent);
}

.palm {
  width: 24px;
  height: 24px;
  object-fit: contain;
}

.slogan {
  margin-top: 4px;
  color: var(--stone-800);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .25em;
  text-transform: uppercase;
  filter: drop-shadow(0 1px 1px rgba(0, 0, 0, .05));
}

/* Badge de estado */
.status-wrap {
  margin-top: 24px;
  margin-bottom: 12px;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 24px;
  border-radius: 9999px;
  background: var(--rose-600);
  color: #fff;
  font-size: 1rem;
  font-weight: 700;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, .1), 0 2px 4px -2px rgba(0, 0, 0, .1);
  transition: background-color .3s;
}

.status-badge.is-open { background: var(--emerald-600); }

.status-dot {
  width: 12px;
  height: 12px;
  border-radius: 9999px;
  background: #fff;
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, .05);
}

.status-text {
  font-size: 12px;
  letter-spacing: .05em;
  text-transform: uppercase;
}

@media (min-width: 640px) {
  .status-text { font-size: 14px; }
}

/* ---------- Botonera ---------- */
.actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 12px 16px 16px;
}

@media (min-width: 640px) {
  .actions { padding: 24px; }
}

.hours-btn {
  width: 100%;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 1px solid rgba(253, 230, 138, .8);
  border-radius: 1rem;
  background: rgba(255, 251, 235, .9);
  color: var(--amber-900);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .05em;
  text-transform: uppercase;
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, .05);
  transition: background-color .2s, transform .2s;
}

.hours-btn:hover { background: rgba(254, 243, 199, .9); }

.hours-btn:active { transform: scale(.95); }

.hours-btn-label {
  display: flex;
  align-items: center;
  gap: 8px;
}

.chevron {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  transition: transform .2s;
}

.chevron.is-open { transform: rotate(180deg); }

.drawer {
  margin-top: 12px;
  padding: 16px;
  background: rgba(255, 255, 255, .95);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(253, 230, 138, .8);
  border-radius: 1rem;
  color: var(--stone-800);
  font-size: 14px;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, .1), 0 2px 4px -2px rgba(0, 0, 0, .1);
}

.drawer > * + * { margin-top: 12px; }

.drawer-title {
  margin-bottom: 6px;
  color: var(--amber-900);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .05em;
  text-transform: uppercase;
}

.hours-box {
  padding: 10px;
  background: rgba(255, 251, 235, .8);
  border: 1px solid rgba(253, 230, 138, .5);
  border-radius: .75rem;
  color: var(--stone-700);
  font-size: 12px;
}

.hours-box > * + * { margin-top: 6px; }

.hours-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.hours-day {
  color: var(--stone-800);
  font-weight: 700;
}

.hours-time {
  flex-shrink: 0;
  padding: 2px 8px;
  background: rgba(253, 230, 138, .7);
  border-radius: .375rem;
  color: var(--amber-900);
  font-weight: 800;
}

.location {
  padding-top: 8px;
  border-top: 1px solid var(--stone-200);
}

.location-title {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--stone-900);
  font-size: 12px;
  font-weight: 700;
}

.location-desc {
  margin-top: 2px;
  color: var(--stone-600);
  font-size: 11px;
  font-weight: 500;
  line-height: 1.625;
}

/* ---------- Filas de enlace ---------- */
.link-row {
  width: 100%;
  padding: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 1px solid rgba(231, 229, 228, .9);
  border-radius: 1rem;
  background: rgba(255, 255, 255, .95);
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, .05);
  transition: border-color .2s, background-color .2s, transform .2s;
}

.link-row:active { transform: scale(.95); }

.link-row-inner {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.link-icon {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: .75rem;
  background: var(--amber-100);
  color: var(--amber-600);
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, .05);
  transition: background-color .15s, color .15s;
}

.link-icon svg { width: 20px; height: 20px; }

.link-text {
  min-width: 0;
  text-align: left;
}

.link-title {
  color: var(--stone-800);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .05em;
  text-transform: uppercase;
}

.link-title-row {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.link-sub {
  color: var(--stone-600);
  font-size: 13px;
  font-weight: 500;
}

.link-sub--clip {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.rating {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 0 6px;
  background: var(--amber-100);
  border: 1px solid var(--amber-200);
  border-radius: .375rem;
  color: var(--amber-900);
  font-size: 11px;
  font-weight: 800;
}

.rating-star {
  color: var(--amber-500);
  font-size: 10px;
}

.link-arrow {
  flex-shrink: 0;
  color: var(--stone-400);
  transition: transform .2s, color .2s;
}

.link-arrow svg { width: 20px; height: 20px; }

/* Maps y reseñas */
.link-row--maps:hover,
.link-row--reviews:hover {
  border-color: var(--amber-400);
  background: rgba(255, 251, 235, .7);
}

.link-row--maps:hover .link-icon {
  background: var(--amber-500);
  color: #fff;
}

.link-row--reviews:hover .link-icon { background: var(--amber-100); }

.link-row--maps:hover .link-arrow,
.link-row--reviews:hover .link-arrow {
  transform: translateX(4px);
  color: var(--amber-600);
}

.link-icon--reviews {
  background: var(--stone-100);
  box-shadow: inset 0 2px 4px 0 rgba(0, 0, 0, .05);
}

/* Instagram */
.link-row--instagram:hover {
  border-color: var(--pink-400);
  background: rgba(253, 242, 248, .7);
}

.link-row--instagram:hover .link-arrow {
  transform: translateX(4px);
  color: var(--pink-600);
}

.link-icon--instagram {
  background: linear-gradient(to top right, var(--amber-400), var(--pink-500), var(--purple-600));
  color: #fff;
}

/* Facebook */
.link-row--facebook:hover {
  border-color: var(--blue-400);
  background: rgba(239, 246, 255, .7);
}

.link-row--facebook:hover .link-arrow {
  transform: translateX(4px);
  color: var(--blue-600);
}

.link-icon--facebook {
  background: var(--blue-600);
  color: #fff;
}

/* ---------- Pie ---------- */
.footer {
  padding: 16px;
  text-align: center;
  background: rgba(255, 255, 255, .9);
  border-top: 1px solid var(--stone-100);
}

.footer-text {
  color: var(--stone-500);
  font-size: 11px;
  font-weight: 500;
}

/* Con el modal abierto, el fondo no se desplaza.
   Lo pone y lo quita js/app.js al abrir y cerrar. */
body.modal-abierto { overflow: hidden; }

/* ---------- Modal QR ---------- */
.modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(28, 25, 23, .6);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}

.modal-panel {
  position: relative;
  width: 100%;
  max-width: 20rem;
  padding: 24px;
  text-align: center;
  background: #fff;
  border: 1px solid var(--stone-200);
  border-radius: 1.5rem;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, .25);
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 9999px;
  background: var(--stone-100);
  color: var(--stone-500);
  font-size: 16px;
  line-height: 1;
  transition: background-color .15s;
}

.modal-close:hover { background: var(--stone-200); }

.modal-title {
  color: var(--amber-500);
  font-family: "Cinzel", serif;
  font-size: 1.25rem;
  font-weight: 900;
}

.modal-desc {
  margin: 4px 0 16px;
  color: var(--stone-500);
  font-size: 12px;
}

.qr-box {
  display: inline-block;
  padding: 12px;
  background: var(--stone-50);
  border: 1px solid var(--stone-200);
  border-radius: 1rem;
  box-shadow: inset 0 2px 4px 0 rgba(0, 0, 0, .05);
}

#qrcodeCanvas {
  display: flex;
  justify-content: center;
}

.modal-footer {
  margin-top: 16px;
  padding-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  border-top: 1px solid var(--stone-100);
}

.btn-dark {
  width: 100%;
  padding: 8px 0;
  border-radius: .75rem;
  background: var(--stone-800);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  transition: background-color .15s;
}

.btn-dark:hover { background: var(--stone-900); }

/* ---------- Toast ---------- */
.toast {
  position: fixed;
  bottom: 20px;
  z-index: 50;
  padding: 8px 16px;
  border-radius: 9999px;
  background: var(--stone-900);
  color: #fff;
  font-size: 12px;
  font-weight: 500;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, .1), 0 4px 6px -4px rgba(0, 0, 0, .1);
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s;
}

.toast.is-visible { opacity: 1; }

/* ---------- Animaciones ---------- */
@keyframes slideUpFade {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

.anim-1 { animation: slideUpFade .5s cubic-bezier(.16, 1, .3, 1) both; }
.anim-2 { animation: slideUpFade .5s cubic-bezier(.16, 1, .3, 1) .08s both; }
.anim-3 { animation: slideUpFade .5s cubic-bezier(.16, 1, .3, 1) .16s both; }
.anim-4 { animation: slideUpFade .5s cubic-bezier(.16, 1, .3, 1) .24s both; }

@keyframes subtleFloat {
  0%, 100% { transform: translateY(0) scale(1); }
  50%      { transform: translateY(-3px) scale(1.01); }
}

.logo-subtle {
  will-change: transform;
  animation: subtleFloat 5s ease-in-out infinite;
}

@keyframes calmPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%      { opacity: .4; transform: scale(.85); }
}

.calm-blink { animation: calmPulse 2s ease-in-out infinite; }

/* Respeta a quien tenga reducidas las animaciones del sistema */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
}

/* ---------- Página 404 ---------- */
.page-404 {
  max-width: 26rem;
  margin: auto;
  padding: 40px 24px;
  text-align: center;
  background: #fff;
}

.page-404 .logo {
  max-width: 210px;
  margin: 0 auto 20px;
}

.page-404 h1 {
  margin-bottom: 8px;
  color: var(--stone-800);
  font-size: 1.25rem;
  font-weight: 800;
}

.page-404 p {
  margin-bottom: 24px;
  color: var(--stone-600);
  font-size: 14px;
  line-height: 1.6;
}

.page-404 a {
  color: var(--amber-600);
  font-size: 14px;
  font-weight: 700;
  text-decoration: underline;
}