/* ========================= */
/* RESET BÁSICO              */
/* ========================= */

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #111827;
  background-color: #f9fafb;
  line-height: 1.6;
}

/* ========================= */
/* ESTRUCTURA GENERAL        */
/* ========================= */

main {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 1.25rem 3rem;
}

.section {
  padding: 4rem 0 0;
}

.section-inner {
  max-width: 960px;
  margin: 0 auto;
}

.section h2 {
  font-size: 2rem;
  margin-bottom: 1rem;
}

.section-intro {
  font-size: 0.98rem;
  color: #4b5563;
  max-width: 580px;
  margin-bottom: 2rem;
}

/* ========================= */
/* NAV SUPERIOR              */
/* ========================= */

.top-nav {
  width: 100%;
  padding: 0.75rem 1.5rem;
  background: #111827;
  color: #f9fafb;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 40;
}

.top-nav .logo {
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.9rem;
}

.main-nav {
  display: flex;
  gap: 1.25rem;
}

.main-nav a {
  font-size: 0.9rem;
  text-decoration: none;
  color: #e5e7eb;
  transition: color 0.2s ease;
}

.main-nav a:hover {
  color: #facc15;
}

/* Botón música */

.music-toggle {
  border-radius: 999px;
  padding: 0.35rem 0.9rem;
  border: 1px solid #facc15;
  background: transparent;
  color: #facc15;
  font-size: 0.8rem;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.music-toggle:hover {
  background-color: #facc15;
  color: #111827;
}

/* ========================= */
/* BOTONES GENÉRICOS         */
/* ========================= */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.7rem 1.3rem;
  font-size: 0.95rem;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease, color 0.15s ease;
}

.btn.primary {
  background-color: #a67c52;
  color: #f9fafb;
}

.btn.primary:hover {
  background-color: #8b623e;
  box-shadow: 0 12px 24px rgba(34, 27, 21, 0.35);
  transform: translateY(-1px);
}

.btn.ghost {
  background-color: transparent;
  color: #a67c52;
  border-color: #d1b08a;
}

.btn.ghost:hover {
  background-color: #f5ebe0;
}

.btn.small {
  font-size: 0.85rem;
  padding: 0.5rem 1.1rem;
}

/* ========================= */
/* DESTACADOS ORIGEN         */
/* ========================= */

.highlights h2 {
  text-align: left;
}

.highlights .section-intro {
  margin-bottom: 2.5rem;
}

.cards-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.5rem;
}

.card {
  background-color: #ffffff;
  border-radius: 18px;
  padding: 1.5rem;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
  border: 1px solid #e5e7eb;
}

.card h3 {
  font-size: 1.05rem;
  margin-bottom: 0.5rem;
}

.card p {
  font-size: 0.95rem;
  color: #4b5563;
}

/* ========================= */
/* VIDEO CAFÉ                */
/* ========================= */

.coffee-video {
  padding-top: 4.5rem;
}

.coffee-video h2 {
  text-align: center;
}

.coffee-video .section-intro {
  text-align: center;
  margin-left: auto;
  margin-right: auto;
}

.video-wrapper {
  max-width: 900px;
  margin: 0 auto;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.35);
}

.video-wrapper video {
  width: 100%;
  display: block;
}

/* ========================= */
/* SECCIÓN PRODUCTOS         */
/* ========================= */

.products h2 {
  text-align: center;
}

.products .section-intro {
  text-align: center;
  margin-left: auto;
  margin-right: auto;
  max-width: 680px;
}

/* GRID */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

/* CARD */
.product-card {
  background-color: #ffffff;
  border-radius: 18px;
  padding: 1.5rem;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
  border: 1px solid #e5e7eb;
  text-align: center;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

/* TITULO */
.product-card h3 {
  font-size: 1.05rem;
  margin-bottom: 0.5rem;
}

/* TEXTO */
.product-card p {
  color: #4b5563;
  font-size: 0.95rem;
  margin-bottom: 0.75rem;
}

/* TAG */
.product-tag {
  display: inline-flex;
  padding: 0.25rem 0.7rem;
  border-radius: 999px;
  font-size: 0.78rem;
  background-color: #fef3c7;
  color: #92400e;
  margin-bottom: 0.75rem;
}

/* IMAGEN DEL PRODUCTO */
.product-img {
  width: 100%;
  max-width: 240px;
  height: auto;
  max-height: 320px;
  display: block;
  margin: 12px auto 14px;
  object-fit: contain;
  cursor: pointer;
  transition: transform 0.2s ease;
}

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

.product-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.1);
}

/* ========================= */
/* GALERÍA                   */
/* ========================= */

.gallery h2 {
  text-align: center;
}

.gallery .section-intro {
  text-align: center;
  margin-left: auto;
  margin-right: auto;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.gallery figure {
  background: #fff;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid #e5e7eb;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
}

.gallery img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  display: block;
}

.gallery figcaption {
  padding: 0.75rem 0.9rem 0.9rem;
  font-size: 0.9rem;
  color: #4b5563;
}

/* Animación reveal sencilla */

.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.in-view {
  opacity: 1;
  transform: translateY(0);
}

/* FIX PROVISORIO: mostrar siempre las imágenes de la galería */
.reveal {
  opacity: 1 !important;
  transform: none !important;
}

/* ========================= */
/* HISTORIA / CONTACTO       */
/* ========================= */

.story h2,
.contact h2 {
  text-align: center;
}

.story p,
.contact p {
  max-width: 720px;
  margin: 0 auto;
  text-align: center;
  color: #4b5563;
  font-size: 0.98rem;
}

.contact {
  padding-bottom: 3rem;
}

.contact-list {
  list-style: none;
  margin-top: 1rem;
  text-align: center;
}

.contact-list li {
  margin-bottom: 0.4rem;
}

.contact a {
  color: #f59e0b;
  text-decoration: none;
}

.contact a:hover {
  text-decoration: underline;
}

/* ========================= */
/* MINI JUEGO CAFÉ BREAK     */
/* ========================= */

.game h2 {
  text-align: center;
}

.game .section-intro {
  text-align: center;
  margin-left: auto;
  margin-right: auto;
}

.game-wrapper {
  display: flex;
  justify-content: center;
  margin-top: 1.5rem;
}

#coffeeGame {
  border: 1px solid #ddd;
  border-radius: 12px;
  background: #111;
}

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

.site-footer {
  padding: 1.5rem 0;
  background-color: #111827;
  color: #9ca3af;
  font-size: 0.85rem;
  text-align: center;
  margin-top: 3rem;
}

/* ========================= */
/* RESPONSIVE                */
/* ========================= */

@media (max-width: 900px) {
  .hero-content,
  .cards-row,
  .product-grid,
  .gallery-grid {
    grid-template-columns: 1fr;
  }

  .main-nav {
    display: none; /* luego podemos hacer menú móvil */
  }
}
/* ========================= */
/* MODAL PARA IMÁGENES       */
/* ========================= */

.modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.92);
  z-index: 9999;
  display: flex;
  flex-direction: column;
}

.hidden {
  display: none;
}

.modal-close {
  align-self: flex-end;
  background: none;
  border: none;
  color: #fff;
  font-size: 28px;
  padding: 16px;
  cursor: pointer;
}

.modal-content {
  flex: 1;
  display: grid;
  place-items: center;
  overflow: auto;
  padding: 20px;
}

.modal-content img {
  max-width: 95%;
  max-height: 90vh;
}