/* ==========================================================================
   La Saporita — style.css unificado (landing + menú)
   build 20260711
   ========================================================================== */

:root {
  --bg: #111;
  --card: #1b1b1b;
  --accent: #f4b400;
  --text: #f7f7f7;
  --muted: #b3b3b3;
  --border: #333;
  --font-main: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-title: "Playfair Display", serif;
  --font-body: "Poppins", "Segoe UI", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  background: radial-gradient(circle at top, #222 0, #050505 55%);
  color: var(--text);
  font-family: var(--font-body);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  overflow-x: hidden;
}

/* ==============================
   VIDEO + OVERLAYS + PARTICLES (persistentes en toda la app)
============================== */
#bg-video {
  position: fixed; inset: 0;
  width: 100vw; height: 100vh;
  object-fit: cover;
  z-index: -100;
  opacity: 0.4;
  pointer-events: none;
}
.video-overlay {
  position: fixed; inset: 0;
  background-color: rgba(255,255,255,0.4);
  z-index: -99;
  pointer-events: none;
}
.heatwave {
  position: fixed; inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(0deg, rgba(255,255,255,0.03) 0px, rgba(255,255,255,0.03) 2px, transparent 4px);
  animation: heat 6s infinite ease-in-out;
  z-index: -98;
}
@keyframes heat {
  0%, 100% { transform: translateY(0);     opacity: 0.25; }
  50%      { transform: translateY(-12px); opacity: 0.4;  }
}
.particles { position: fixed; inset: 0; pointer-events: none; overflow: hidden; z-index: -1; }
.particle {
  position: absolute; width: 6px; height: 6px;
  background: radial-gradient(circle, #ffd27f 0%, #ffb300 60%, transparent 100%);
  border-radius: 50%; opacity: 0.8; box-shadow: 0 0 10px #ffb300;
  animation: floatUp linear infinite;
}
@keyframes floatUp {
  from { transform: translateY(0) scale(1);        opacity: 0.8; }
  to   { transform: translateY(-120vh) scale(0.4); opacity: 0;   }
}

/* ==============================
   PANTALLAS (screens)
============================== */
.app-screen { width: 100%; display: flex; flex-direction: column; align-items: center; }
.hidden { display: none !important; }

/* ==============================
   PANTALLA 1 · PORTADA / BANDERAS
============================== */
#landing-screen {
  min-height: 100vh;
  justify-content: center;
  text-align: center;
  padding: 24px 16px;
}

.landing-logo-container {
  position: relative;
  display: inline-block;
  margin-bottom: 35px;
  opacity: 0;
  animation: fadeInLogo 1.4s ease forwards;
  z-index: 10;
}
.landing-logo {
  width: 180px;
  max-width: 80%;
  filter: drop-shadow(0 6px 14px rgba(0,0,0,0.45));
}
@keyframes fadeInLogo {
  0%   { opacity: 0; transform: translateY(-25px) scale(0.7); }
  60%  { opacity: 1; transform: translateY(0)     scale(1.3); }
  100% { opacity: 1; transform: translateY(0)     scale(1.4); }
}

.flags-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
  width: 95%;
  max-width: 600px;
  z-index: 10;
  margin-bottom: 90px;
}
.flag-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  font-family: var(--font-title);
  color: #000 !important;
  font-size: 1.05rem;
  font-weight: 600;
  opacity: 0;
  animation: fadePop 0.6s ease forwards;
  transition: transform 0.25s ease;
  width: calc(25% - 20px);
  min-width: 90px;
  background: none;
  border: none;
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  text-shadow: 2px 2px 4px rgba(255,255,255,0.6);
}
.flag-item span { color: inherit; }
@media (max-width: 400px) { .flag-item { width: calc(33.33% - 20px); } }
.flag-item:nth-child(1) { animation-delay: 0.25s; }
.flag-item:nth-child(2) { animation-delay: 0.38s; }
.flag-item:nth-child(3) { animation-delay: 0.51s; }
.flag-item:nth-child(4) { animation-delay: 0.64s; }
.flag-item:nth-child(5) { animation-delay: 0.77s; }
.flag-item:nth-child(6) { animation-delay: 0.90s; }
.flag-item:nth-child(7) { animation-delay: 1.03s; }
@keyframes fadePop { from { opacity: 0; transform: scale(0.85); } to { opacity: 1; transform: scale(1); } }
.flag-item img {
  width: 48px; height: 32px;
  object-fit: cover; border-radius: 6px;
  margin-bottom: 6px;
  transition: transform 0.25s ease, filter 0.25s ease;
}
.flag-item:hover img { transform: scale(1.12); filter: brightness(1.15); }
.product-helper {
  font-size: 0.75em;          /* más pequeño */
  font-style: italic;         /* cursiva */
  color: #c79b3b;             /* amarillo suave similar al precio */
  opacity: 0.75;              /* menos protagonismo */
  margin-top: 2px;
}



/* ==============================
   FOOTER — CONTADOR (solo portada)
============================== */
footer#main-footer {
  position: fixed; bottom: 0; left: 0; width: 100%;
  z-index: 20;
  display: flex; flex-direction: column; align-items: center; gap: 1px;
  font-family: var(--font-body);
  pointer-events: none;
}

#counter-total {
  display: flex; align-items: center; justify-content: center; gap: 2px;
  font-size: 1.2rem; font-weight: 700; color: #fff;
  text-shadow: 0 2px 6px rgba(0,0,0,0.9);
  padding-bottom: 1px;
}

#counter-total .icon-users {
  width: 22px; height: 22px;
  fill: #fff;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.9));
}

#counter-display {
  width: 100%;
  background: rgba(255,255,255,0.45);
  backdrop-filter: blur(6px);
  border-top: 2px solid rgba(255,255,255,0.5);
  padding: 2px 10px; /* reducido */
  display: flex; flex-direction: column; align-items: center;
  gap: 0px; /* sin separación entre filas */
}

.language-row {
  display: flex;
  justify-content: center;
  flex-wrap: nowrap;
  gap: 0 6px;
}

/* separación solo para la primera línea */
.language-row:first-child {
  margin-top: 3px; /* ajusta a 2–4px según lo que veas mejor */
}

.language-item {
  display: inline-flex;
  align-items: flex-start;
  gap: 2px;
  font-size: 0.70rem;
  color: #000;
  white-space: nowrap;
  line-height: 0.8;
}

.language-item strong {
  color: #000;
}

.middle-dot {
  font-size: 1.3rem;
  font-weight: 900;
  color: #000;
  line-height: 0.8;
  display: inline-block;
  margin-right: 1px;
}





/* ==============================
   PANTALLA 2 · MENÚ
============================== */
#menu-screen { padding: 16px; }

.main-container { width: 100%; max-width: 720px; margin: 0 auto; }
.menu-wrapper { width: 100%; position: relative; z-index: 1; }

header { text-align: center; margin-bottom: 20px; }
.menu-logo { display: block; margin: 0 auto 10px auto; max-width: 160px; height: auto; }

.title-container {
  position: relative;
  display: flex; justify-content: center; align-items: center;
  width: 100%;
}
.title {
  font-size: 1.4rem; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--accent);
  text-shadow: 2px 2px 4px rgba(0,0,0,0.8);
}
.subtitle { font-size: 0.9rem; color: var(--muted); margin-top: 4px; }

.zoom-controls {
  position: absolute; right: 0;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  z-index: 2000;
}
.zoom-label {
  color: var(--accent); font-size: 0.6rem; font-weight: normal;
  letter-spacing: 0.05em; text-transform: uppercase; margin-bottom: -2px;
}
.zoom-btn {
  width: 36px; height: 36px; border-radius: 50%;
  background-color: var(--card); color: var(--accent);
  border: 1.5px solid var(--border); font-size: 20px; font-weight: bold;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 3px 8px rgba(0,0,0,0.5);
  transition: background 0.2s ease, transform 0.1s ease;
  user-select: none; flex-shrink: 0;
}
.zoom-btn:active { transform: scale(0.9); background-color: var(--border); }
#btn-zoom-out { visibility: hidden; }

/* ACORDEONES */
.accordion {
  border-radius: 14px; overflow: hidden;
  box-shadow: 0 14px 40px rgba(0,0,0,0.55);
  border: 1px solid #222; background: rgba(10,10,10,0.9);
  backdrop-filter: blur(12px);
}
.accordion-item + .accordion-item { border-top: 1px solid var(--border); }
.accordion-header {
  width: 100%; background: linear-gradient(90deg, #181818, #101010);
  color: var(--text); padding: 14px 16px; border: none; outline: none;
  text-align: left; display: flex; align-items: center; justify-content: space-between;
  cursor: pointer; font-size: 1rem;
}
.accordion-header span.label {
  display: inline-flex; align-items: center; gap: 8px;
  font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; font-size: 0.85rem;
}
.accordion-header span.chevron { transition: transform 0.25s ease; font-size: 1.1rem; }
.accordion-header.active span.chevron { transform: rotate(90deg); }
.accordion-panel { max-height: 0; overflow: hidden; transition: max-height 0.3s ease; background: radial-gradient(circle at top left, #202020 0, #050505 55%); }
.panel-inner { padding: 10px 14px 14px 14px; }

.subcategory-title { font-weight: 700; letter-spacing: 0.05em; margin: 14px 0 6px 0; text-transform: uppercase; font-size: 0.85rem; }

/* PRODUCTOS */
.product { padding: 10px 0; border-bottom: 1px dashed var(--border); cursor: pointer; transition: background 0.2s ease; }
.product:last-child { border-bottom: none; }
.product:hover { background: rgba(199,155,59,0.1); }
.product-line { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; font-size: 0.95rem; }
.product-name { font-weight: 700; }
.product-price { font-weight: 700; color: var(--accent); white-space: nowrap; font-size: 0.95rem; }
.product-desc { margin-top: 4px; font-size: 0.85rem; color: var(--muted); line-height: 1.4; }

/* PRODUCTO AGOTADO / FUERA DE STOCK */
.product.sold-out {
  opacity: 0.55;
  filter: grayscale(35%);
}
.product.sold-out .product-name {
  text-decoration: line-through;
  text-decoration-color: rgba(230, 57, 70, 0.75);
}
.badge-sold-out {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: linear-gradient(135deg, #e63946, #b71c1c);
  color: #ffffff;
  padding: 2px 7px;
  border-radius: 4px;
  margin-left: 6px;
  vertical-align: middle;
  text-decoration: none !important;
  box-shadow: 0 2px 5px rgba(0,0,0,0.3);
}

/* ALÉRGENOS */
.product-allergens { display: flex; gap: 4px; margin-top: 4px; justify-content: flex-start; align-items: center; }
.allergen-icon { width: 30px; height: 30px; object-fit: contain; display: block; }

/* RESPONSIVE */
@media (max-width: 480px) {
  .accordion-header { padding: 12px 12px; }
  .panel-inner { padding: 8px 10px 12px 10px; }
  .product-line, .product-price { font-size: 0.9rem; }
  .product-desc { font-size: 0.8rem; }
}

/* REDES SOCIALES */
.social-footer {
  width: 100%;
  display: flex; justify-content: center; align-items: center;
  gap: 25px;
  margin: 40px auto 60px auto;
  position: relative; z-index: 10;
}
.social-item {
  display: flex; align-items: center; gap: 8px;
  color: var(--accent) !important;
  text-decoration: none !important;
  transition: opacity 0.3s ease, transform 0.2s ease;
  cursor: pointer;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.8);
}
.social-item i { font-size: 1.4rem; }
.social-text {
  font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.05em;
  font-weight: normal; color: var(--accent) !important;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.8);
}
.social-item:hover { opacity: 0.7; transform: translateY(-2px); }
@media (max-width: 480px) {
  .social-footer { gap: 15px; }
  .social-text { font-size: 0.65rem; }
  .social-item i { font-size: 1.2rem; }
}

/* MODAL DE CONTACTO */
.modal {
  display: none; position: fixed; z-index: 99999; left: 0; top: 0;
  width: 100%; height: 100%;
  background: rgba(0,0,0,0.8);
  backdrop-filter: blur(5px);
}
.modal-content {
  background: rgba(27,27,27,0.95);
  width: 90%; max-width: 420px;
  margin: 50px auto; padding: 30px;
  border-radius: 16px; position: relative;
  border: 1px solid var(--border);
  box-shadow: 0 20px 50px rgba(0,0,0,0.5);
  color: var(--text); font-family: var(--font-main);
}
.modal-content h2 {
  color: var(--accent); text-align: center; font-size: 1.3rem;
  text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 20px; font-weight: 600;
}
.close { position: absolute; right: 15px; top: 10px; font-size: 28px; cursor: pointer; color: var(--muted); transition: color 0.2s ease; }
.close:hover { color: var(--accent); }
form { display: flex; flex-direction: column; gap: 15px; }
form label { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); margin-bottom: -10px; font-weight: normal; }
form input, form select, form textarea {
  background: #222; border: 1px solid var(--border); border-radius: 8px; padding: 12px;
  color: var(--text); font-family: var(--font-main); font-size: 0.9rem;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}
form input:focus, form select:focus, form textarea:focus {
  outline: none; border-color: var(--accent); box-shadow: 0 0 0 2px rgba(244,180,0,0.2);
}
form button {
  margin-top: 10px; background: var(--accent); color: #000; border: none;
  padding: 14px; border-radius: 8px; font-weight: bold;
  text-transform: uppercase; letter-spacing: 0.1em; cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease;
}
form button:hover { background: #e6a500; transform: translateY(-2px); }
form button:active { transform: translateY(0); }

/* LIGHTBOX */
.lightbox {
  display: none; position: fixed; z-index: 2000; left: 0; top: 0;
  width: 100%; height: 100%;
  background-color: rgba(0,0,0,0.6);
  backdrop-filter: blur(5px);
  transition: all 0.3s ease;
}
.lightbox-content { position: relative; margin: auto; top: 50%; transform: translateY(-50%); width: 90%; max-width: 600px; text-align: center; }
.lightbox-content img { width: 100%; border-radius: 15px; box-shadow: 0 5px 25px rgba(0,0,0,0.5); border: 3px solid #c79b3b; }
.lightbox-caption { color: white; margin-top: 15px; font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; }
.lightbox-caption h3 { color: #c79b3b; font-size: 1.5rem; margin-bottom: 5px; }
.lightbox-close { position: absolute; top: 20px; right: 30px; color: white; font-size: 40px; cursor: pointer; z-index: 2100; }

.photo-hint {
  text-align: center; color: #ffffff;
  font-size: 0.85rem; font-style: italic;
  margin: 10px 0 20px 0; font-weight: normal;
  opacity: 0.85; display: block;
  text-shadow: 1px 1px 3px rgba(0,0,0,0.7);
  animation: fadeInDown 1s ease-out forwards;
}
@keyframes fadeInDown { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: translateY(0); } }
