/* ── Reset & Base ──────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: #fafaf8; color: #1e293b; line-height: 1.6;
  overflow-x: hidden;
}

/* ── CSS Variables (set dynamically by menu.js) ───────────────────────── */
:root {
  --acento:  #f97316;
  --blue:    #0c4a6e;
  --blue2:   #0369a1;
  --gold:    #d97706;
  --sand:    #fef3c7;
  --white:   #fff;
  --gray:    #64748b;
  --light:   #f8fafc;
  --radius:  16px;
  --shadow:  0 4px 20px rgba(0,0,0,.10);
  --shadow-lg: 0 12px 40px rgba(0,0,0,.18);
}

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

/* ── Loading screen ───────────────────────────────────────────────────── */
.loading-screen {
  position: fixed; inset: 0; z-index: 999;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  background: #fafaf8; gap: 16px;
  color: var(--gray); font-size: 0.9rem;
}
.loading-spinner {
  width: 40px; height: 40px;
  border: 3px solid #e2e8f0;
  border-top-color: var(--acento);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── "Carta en preparación" screen ───────────────────────────────────── */
.prep-screen {
  position: fixed; inset: 0; z-index: 999;
  display: none; flex-direction: column;
  align-items: center; justify-content: center;
  background: #fafaf8; text-align: center; padding: 24px;
}
.prep-screen.visible { display: flex; }
.prep-icon { font-size: 4rem; margin-bottom: 16px; }
.prep-screen h1 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.8rem; color: var(--blue); margin-bottom: 8px;
}
.prep-screen p { color: var(--gray); }

/* ══════════════════════════════════════════════════════════════════════ */
/* NAVBAR                                                                 */
/* ══════════════════════════════════════════════════════════════════════ */
.navbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  transition: background .3s, box-shadow .3s;
}
.navbar.scrolled { background: var(--white); box-shadow: 0 2px 16px rgba(0,0,0,.12); }

.nav-inner {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 24px; max-width: 1200px; margin: 0 auto;
}
.nav-logo {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.4rem; font-weight: 700; color: var(--white);
  text-decoration: none; transition: color .3s;
}
.navbar.scrolled .nav-logo { color: var(--blue); }

.nav-links { display: flex; gap: 32px; }
.nav-links a {
  color: rgba(255,255,255,.9); text-decoration: none;
  font-size: 0.9rem; font-weight: 500; letter-spacing: .02em;
  transition: color .2s;
}
.nav-links a:hover { color: var(--white); }
.navbar.scrolled .nav-links a { color: var(--blue2); }
.navbar.scrolled .nav-links a:hover { color: var(--acento); }

.nav-burger {
  display: none; flex-direction: column; gap: 5px;
  background: none; border: none; cursor: pointer; padding: 4px;
}
.nav-burger span {
  display: block; width: 24px; height: 2px;
  background: var(--white); border-radius: 2px; transition: background .3s;
}
.navbar.scrolled .nav-burger span { background: var(--blue); }

.nav-mobile {
  display: none; flex-direction: column;
  background: var(--white); border-top: 1px solid #e2e8f0; padding: 12px 0;
}
.nav-mobile.open { display: flex; }
.nav-mobile a {
  padding: 12px 24px; color: var(--blue); text-decoration: none;
  font-weight: 500; font-size: 0.95rem; transition: background .15s;
}
.nav-mobile a:hover { background: var(--light); }

/* ══════════════════════════════════════════════════════════════════════ */
/* HERO                                                                   */
/* ══════════════════════════════════════════════════════════════════════ */
.hero {
  position: relative; height: 100vh; min-height: 560px;
  display: flex; align-items: center; justify-content: center;
  background: #0c4a6e center/cover no-repeat; /* bg-image set by JS */
  text-align: center;
}
.hero-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(7,25,48,.55) 0%, rgba(7,25,48,.40) 50%, rgba(7,25,48,.65) 100%);
}
.hero-content { position: relative; z-index: 1; padding: 0 20px; }
.hero-pre {
  font-size: 0.85rem; letter-spacing: .18em; text-transform: uppercase;
  color: #93c5fd; margin-bottom: 12px; font-weight: 500;
}
.hero-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: clamp(3.5rem, 8vw, 7rem); font-weight: 700;
  color: var(--white); line-height: 1; margin-bottom: 16px;
  text-shadow: 0 2px 20px rgba(0,0,0,.4);
}
.hero-sub {
  font-size: clamp(1rem, 2.5vw, 1.3rem); color: rgba(255,255,255,.85);
  margin-bottom: 36px; font-style: italic;
  font-family: 'Playfair Display', Georgia, serif;
}
.hero-btn {
  display: inline-block; padding: 14px 36px;
  background: var(--acento); color: var(--white);
  text-decoration: none; border-radius: 50px;
  font-weight: 600; font-size: 0.95rem; letter-spacing: .03em;
  transition: filter .2s, transform .2s, box-shadow .2s;
  box-shadow: 0 4px 20px rgba(0,0,0,.3);
}
.hero-btn:hover { filter: brightness(1.1); transform: translateY(-2px); }

.hero-scroll {
  position: absolute; bottom: 28px; left: 50%; transform: translateX(-50%);
  color: rgba(255,255,255,.6); font-size: 1.4rem;
  animation: bounce 2s infinite;
}
@keyframes bounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50%       { transform: translateX(-50%) translateY(8px); }
}

/* ══════════════════════════════════════════════════════════════════════ */
/* CARTA / MENÚ                                                           */
/* ══════════════════════════════════════════════════════════════════════ */
.menu-section { padding: 80px 0; }

.section-header { text-align: center; margin-bottom: 48px; }
.section-header h2 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: clamp(2rem, 4vw, 2.8rem); color: var(--blue); margin-bottom: 10px;
}
.section-header p { color: var(--gray); font-size: 1rem; }

/* Tabs */
.tabs-wrap { overflow-x: auto; scrollbar-width: none; margin-bottom: 40px; }
.tabs-wrap::-webkit-scrollbar { display: none; }
.tabs {
  display: flex; gap: 8px; justify-content: center;
  min-width: max-content; padding: 0 24px;
}
.tab {
  padding: 9px 20px; border-radius: 50px;
  border: 1.5px solid #cbd5e1; background: var(--white);
  font-size: 0.875rem; font-weight: 500; cursor: pointer;
  color: var(--gray); transition: all .2s; white-space: nowrap;
  font-family: inherit;
}
.tab:hover { border-color: var(--blue2); color: var(--blue2); }
.tab.active { background: var(--blue); border-color: var(--blue); color: var(--white); }

/* Product grid */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 24px;
}

/* Product card */
.product-card {
  background: var(--white); border-radius: var(--radius);
  box-shadow: var(--shadow); overflow: hidden;
  transition: transform .25s, box-shadow .25s;
  display: flex; flex-direction: column;
}
.product-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); }

.product-img {
  height: 220px; position: relative; overflow: hidden;
  background: var(--img-grad, linear-gradient(135deg,#0c4a6e,#0369a1));
  display: flex; align-items: center; justify-content: center;
}
.product-img img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; opacity: 0; transition: opacity .4s;
}
.product-img img.loaded { opacity: 1; }
.product-img img.loaded + .fallback { display: none; }
.fallback { font-size: 3.5rem; z-index: 1; user-select: none; }

.cat-badge {
  position: absolute; top: 12px; right: 12px; z-index: 2;
  font-size: 0.7rem; font-weight: 700; letter-spacing: .06em;
  padding: 3px 10px; border-radius: 20px; text-transform: uppercase;
  color: #fff;
}

.product-info { padding: 18px 20px; flex: 1; display: flex; flex-direction: column; }
.product-info h3 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.1rem; color: var(--blue); margin-bottom: 6px;
}
.product-info p { font-size: 0.82rem; color: var(--gray); flex: 1; line-height: 1.5; }
.price {
  display: inline-block; margin-top: 14px;
  font-size: 1.15rem; font-weight: 700; color: var(--acento);
}

/* ══════════════════════════════════════════════════════════════════════ */
/* SOBRE NOSOTROS                                                         */
/* ══════════════════════════════════════════════════════════════════════ */
.about-section {
  background: var(--blue);
  padding: 80px 0; color: var(--white); text-align: center;
}
.about-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: clamp(1.8rem, 4vw, 2.6rem); margin-bottom: 16px; color: #bfdbfe;
}
.about-desc { font-size: 1rem; color: rgba(255,255,255,.8); max-width: 600px; margin: 0 auto 48px; }

.about-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.about-card {
  background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.15);
  border-radius: var(--radius); padding: 28px 20px; text-align: center;
}
.about-card .icon { font-size: 2rem; margin-bottom: 12px; display: block; }
.about-card h3 { font-size: 1rem; font-weight: 600; color: #bfdbfe; margin-bottom: 8px; }
.about-card p  { font-size: 0.85rem; color: rgba(255,255,255,.7); line-height: 1.6; }

/* ══════════════════════════════════════════════════════════════════════ */
/* FOOTER                                                                 */
/* ══════════════════════════════════════════════════════════════════════ */
footer {
  background: #070f1a; color: rgba(255,255,255,.5);
  padding: 32px 24px; text-align: center; font-size: 0.82rem;
}
.footer-logo {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.3rem; color: var(--white); margin-bottom: 8px; display: block;
}
.social { display: flex; justify-content: center; gap: 16px; margin: 12px 0; font-size: 1.4rem; }
.social a { text-decoration: none; transition: transform .2s; display: inline-block; }
.social a:hover { transform: scale(1.2); }
.footer-info { margin-top: 8px; }

/* Branding footer */
.footer-brand { margin-top: 12px; font-size: 0.72rem; color: rgba(255,255,255,.25); }
.footer-brand a { color: rgba(255,255,255,.3); text-decoration: none; }
.footer-brand a:hover { color: rgba(255,255,255,.5); }

/* ══════════════════════════════════════════════════════════════════════ */
/* RESPONSIVE                                                             */
/* ══════════════════════════════════════════════════════════════════════ */
@media (max-width: 900px) {
  .about-cards { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 767px) {
  .nav-links  { display: none; }
  .nav-burger { display: flex; }
  .nav-inner  { padding: 14px 20px; }
  .hero-title { font-size: 3rem; }
  .menu-section { padding: 60px 0; }
  .section-header { margin-bottom: 32px; }
  .tabs { justify-content: flex-start; }
  .products-grid { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
  .about-section { padding: 60px 0; }
  .about-cards { grid-template-columns: 1fr; gap: 16px; max-width: 400px; margin: 0 auto; }
}

@media (max-width: 480px) {
  .products-grid { grid-template-columns: 1fr; }
  .hero-title { font-size: 2.5rem; }
  .hero-btn { padding: 12px 28px; font-size: 0.875rem; }
  .container { padding: 0 16px; }
}

/* ── Botón flotante de acceso al admin ─────────────────────────────────── */
.admin-access-btn {
  position: fixed; bottom: 16px; right: 16px; z-index: 200;
  width: 36px; height: 36px; border-radius: 50%;
  background: rgba(0,0,0,.32);
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem; text-decoration: none;
  opacity: .35; transition: opacity .2s, transform .2s;
  backdrop-filter: blur(4px);
}
.admin-access-btn:hover { opacity: 1; transform: scale(1.12); }
