/* ========== RESET & BASE ========== */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --cream: hsl(40, 40%, 95%);
  --cream-dark: hsl(36, 45%, 88%);
  --chocolate: hsl(25, 60%, 20%);
  --chocolate-light: hsl(25, 40%, 35%);
  --gold: hsl(38, 70%, 50%);
  --gold-light: hsl(40, 60%, 75%);
  --brown: hsl(30, 56%, 28%);
  --brown-light: hsl(30, 35%, 40%);
  --text-dark: hsl(25, 30%, 12%);
  --text-muted: hsl(25, 15%, 45%);
  --bg-light: hsl(30, 25%, 96%);
  --border: hsl(30, 20%, 85%);
  --card-bg: hsl(35, 30%, 97%);
  --font-display: 'Playfair Display', serif;
  --font-body: 'Lato', sans-serif;
}

body {
  font-family: var(--font-body);
  background: var(--bg-light);
  color: var(--text-dark);
  line-height: 1.6;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
}

a {
  text-decoration: none;
  color: inherit;
}

img {
  max-width: 100%;
  display: block;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.text-center { text-align: center; }

/* ========== HEADER ========== */
.header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  background: hsla(25, 60%, 20%, 0.95);
  backdrop-filter: blur(8px);
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0.75rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.logo-img {
  height: 56px;
  width: 56px;
  border-radius: 50%;
}

.logo-title {
  font-size: 1.25rem;
  color: var(--cream);
  letter-spacing: 0.05em;
}

.logo-subtitle {
  color: var(--gold-light);
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  font-family: var(--font-body);
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--cream);
  font-size: 1.5rem;
  cursor: pointer;
}

.nav {
  display: flex;
  gap: 2rem;
}

.nav-link {
  font-family: var(--font-body);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: hsla(40, 40%, 95%, 0.8);
  padding: 0.5rem 0;
  transition: color 0.3s;
}

.nav-link:hover,
.nav-link.active {
  color: var(--gold);
}

/* ========== HERO ========== */
.hero {
  position: relative;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: hsla(25, 60%, 20%, 0.7);
}

.hero-content {
  position: relative;
  z-index: 10;
  text-align: center;
  padding: 0 1.5rem;
}

.hero-label {
  font-family: var(--font-body);
  color: var(--gold-light);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.3em;
  margin-bottom: 1rem;
}

.hero-title {
  font-size: 3.2rem;
  color: var(--cream);
  margin-bottom: 1.5rem;
  line-height: 1.15;
}

.hero-desc {
  font-family: var(--font-body);
  color: hsla(40, 40%, 95%, 0.7);
  font-size: 1.1rem;
  max-width: 500px;
  margin: 0 auto 2.5rem;
}

/* ========== PAGE HERO (subpáginas) ========== */
.page-hero {
  padding: 7rem 1.5rem 4rem;
  background: var(--chocolate);
  text-align: center;
}

.page-hero-title {
  font-size: 2.5rem;
  color: var(--cream);
  margin-bottom: 1rem;
}

.page-hero-desc {
  font-family: var(--font-body);
  color: hsla(40, 40%, 95%, 0.6);
  max-width: 450px;
  margin: 0 auto;
}

/* ========== BUTTONS ========== */
.btn-gold {
  display: inline-block;
  padding: 1rem 2.5rem;
  background: var(--gold);
  color: var(--text-dark);
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  border: none;
  cursor: pointer;
  transition: all 0.3s;
  box-shadow: 0 4px 15px hsla(38, 70%, 50%, 0.3);
}

.btn-gold:hover {
  background: hsl(38, 70%, 42%);
  box-shadow: 0 6px 20px hsla(38, 70%, 50%, 0.4);
}

/* ========== SECTIONS ========== */
.section {
  padding: 5rem 1.5rem;
}

.bg-light { background: var(--bg-light); }
.bg-cream-dark { background: var(--cream-dark); }

.section-label {
  font-family: var(--font-body);
  color: var(--gold);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.3em;
  margin-bottom: 0.5rem;
}

.section-title {
  font-size: 2.5rem;
  font-weight: 600;
  color: var(--brown);
  margin-bottom: 1rem;
}

.section-subtitle {
  font-family: var(--font-body);
  color: var(--text-muted);
  font-size: 1.1rem;
  letter-spacing: 0.05em;
}

/* ========== CAROUSEL ========== */
.carousel {
  position: relative;
  max-width: 900px;
  margin: 2rem auto 0;
  border-radius: 0.5rem;
  overflow: hidden;
  box-shadow: 0 25px 50px -12px rgba(0,0,0,0.25);
}

.carousel-track {
  position: relative;
  aspect-ratio: 3 / 2;
}

.carousel-slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.7s;
}

.carousel-slide.active {
  opacity: 1;
}

.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: hsla(25, 60%, 20%, 0.6);
  color: var(--cream);
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  transition: background 0.3s;
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
}

.carousel-btn:hover { background: hsla(25, 60%, 20%, 0.8); }
.carousel-prev { left: 1rem; }
.carousel-next { right: 1rem; }

.carousel-dots {
  position: absolute;
  bottom: 1rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 0.5rem;
}

.carousel-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: hsla(40, 40%, 95%, 0.5);
  border: none;
  cursor: pointer;
  transition: all 0.3s;
}

.carousel-dot.active {
  background: var(--gold);
  transform: scale(1.1);
}

/* ========== ABOUT / STATS ========== */
.about-text {
  font-family: var(--font-body);
  color: var(--text-muted);
  font-size: 1.1rem;
  line-height: 1.8;
  margin-top: 1.5rem;
}

.stats {
  display: flex;
  justify-content: center;
  gap: 3rem;
  margin-top: 3rem;
}

.stat-number {
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--brown);
}

.stat-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-top: 0.25rem;
}

/* ========== CTA ========== */
.cta-section {
  padding: 4rem 1.5rem;
  background: var(--chocolate);
  text-align: center;
}

.cta-title {
  font-size: 2rem;
  color: var(--cream);
  margin-bottom: 1rem;
}

.cta-desc {
  font-family: var(--font-body);
  color: hsla(40, 40%, 95%, 0.6);
  margin-bottom: 2rem;
  max-width: 450px;
  margin-left: auto;
  margin-right: auto;
}

/* ========== SABORES GRID ========== */
.sabores-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1.5rem;
  max-width: 1100px;
  margin: 0 auto;
}

.sabor-card {
  background: var(--card-bg);
  border-radius: 0.5rem;
  overflow: hidden;
  box-shadow: 0 4px 6px rgba(0,0,0,0.07);
  transition: all 0.3s;
}

.sabor-card:hover {
  box-shadow: 0 10px 25px rgba(0,0,0,0.15);
  transform: translateY(-4px);
}

.sabor-img-wrap {
  aspect-ratio: 1;
  overflow: hidden;
}

.sabor-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s;
}

.sabor-card:hover .sabor-img-wrap img {
  transform: scale(1.1);
}

.sabor-info {
  padding: 1rem;
  text-align: center;
}

.sabor-info h3 {
  font-size: 1rem;
  color: var(--brown);
  font-weight: 600;
}

.sabor-info p {
  font-family: var(--font-body);
  color: var(--text-muted);
  font-size: 0.75rem;
  margin-top: 0.25rem;
}

/* ========== PRECIOS ========== */
.precios-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}

.precio-card {
  background: var(--card-bg);
  border-radius: 0.5rem;
  padding: 1.5rem;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
  border: 1px solid var(--border);
  transition: box-shadow 0.3s;
}

.precio-card:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.precio-cantidad {
  font-family: var(--font-body);
  font-size: 0.85rem;
  color: var(--text-muted);
}

.precio-valor {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--brown);
  margin-top: 0.5rem;
}

/* ========== CONTACTO ========== */
.contacto-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}

.contacto-card {
  background: var(--card-bg);
  border-radius: 0.5rem;
  padding: 2.5rem;
  text-align: center;
  box-shadow: 0 4px 6px rgba(0,0,0,0.07);
  border: 1px solid var(--border);
  transition: all 0.3s;
}

.contacto-card:hover {
  box-shadow: 0 10px 25px rgba(0,0,0,0.15);
  transform: translateY(-4px);
}

.contacto-icon {
  font-size: 3.5rem;
  margin-bottom: 1rem;
}

.contacto-card h3 {
  font-size: 1.5rem;
  color: var(--brown);
  margin-bottom: 0.5rem;
}

.contacto-handle {
  font-family: var(--font-body);
  color: var(--text-muted);
  font-size: 0.9rem;
}

.contacto-cta {
  font-family: var(--font-body);
  color: var(--gold);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  margin-top: 1rem;
}

/* ========== FOOTER ========== */
.footer {
  background: var(--chocolate);
  color: hsla(40, 40%, 95%, 0.8);
  padding: 3rem 0 0;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 2rem;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.footer-logo {
  height: 64px;
  width: 64px;
  border-radius: 50%;
}

.footer-title {
  font-size: 1.25rem;
  color: var(--cream);
}

.footer-subtitle {
  color: var(--gold-light);
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  font-family: var(--font-body);
}

.footer-contact {
  text-align: right;
  font-family: var(--font-body);
  font-size: 0.9rem;
  line-height: 1.8;
}

.footer-tagline {
  color: hsla(40, 40%, 95%, 0.5);
  margin-top: 0.5rem;
}

.footer-bottom {
  border-top: 1px solid hsla(40, 40%, 95%, 0.1);
  margin-top: 2rem;
  padding: 1.5rem;
  text-align: center;
  font-size: 0.75rem;
  color: hsla(40, 40%, 95%, 0.4);
  font-family: var(--font-body);
}

/* ========== ANIMATIONS ========== */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.animate-fade-in {
  animation: fadeIn 0.8s ease-out forwards;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 768px) {
  .menu-toggle { display: block; }

  .nav {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0; right: 0;
    background: var(--chocolate);
    padding: 1.5rem;
    gap: 0.25rem;
  }

  .nav.open { display: flex; }

  .hero-title { font-size: 2.2rem; }

  .sabores-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .precios-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .contacto-grid {
    grid-template-columns: 1fr;
  }

  .footer-inner {
    flex-direction: column;
    text-align: center;
  }

  .footer-contact { text-align: center; }

  .stats { gap: 2rem; }

  .page-hero-title { font-size: 2rem; }
}

.carrito-box {
  background: var(--card-bg);
  border-radius: 12px;
  padding: 20px;
  border: 1px solid var(--border);
  margin-top: 20px;
}

#lista-carrito {
  list-style: none;
  margin: 15px 0;
  padding: 0;
}

#lista-carrito li {
  margin-bottom: 10px;
  font-size: 0.9rem;
}

.total {
  font-weight: bold;
  margin: 10px 0;
}

.acciones-carrito {
  display: flex;
  gap: 10px;
}

.btn-vaciar {
  background: #dc3545;
  color: white;
  border: none;
  padding: 10px;
  cursor: pointer;
}

/* BOTONES GENERALES */
button {
  border: none;
  padding: 10px 16px;
  border-radius: 8px;
  font-family: 'Lato', sans-serif;
  cursor: pointer;
  transition: all 0.25s ease;
}

/* BOTÓN SUMAR / RESTAR */
button[onclick*="cambiarCantidad"] {
  background: #f3f3f3;
  color: #333;
  margin: 2px;
}

button[onclick*="cambiarCantidad"]:hover {
  background: #e0e0e0;
  transform: scale(1.1);
}

/* BOTÓN ELIMINAR */
button[onclick*="eliminarProducto"] {
  background: #ff4d4d;
  color: #fff;
  margin-top: 5px;
}

button[onclick*="eliminarProducto"]:hover {
  background: #e60000;
  transform: scale(1.05);
}

/* BOTÓN VACIAR */
.btn-vaciar {
  background: #999;
  color: #fff;
}

.btn-vaciar:hover {
  background: #666;
  transform: translateY(-2px);
}

/* BOTÓN COMPRAR */
.btn-comprar {
  background: linear-gradient(135deg, #c9a45c, #a67c2e);
  color: white;
  font-weight: bold;
  padding: 12px 20px;
}

.btn-comprar:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.2);
}

/* BOTONES EN FILA */
.acciones-carrito {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-top: 15px;
}
.precio-card {
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.precio-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0,0,0,0.2);
}

.carrito-box {
  background: #fff;
  padding: 20px;
  border-radius: 12px;
  box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

.duelo-container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
}

.duelo-card {
  width: 200px;
  cursor: pointer;
  background: #fff;
  border-radius: 12px;
  padding: 10px;
  box-shadow: 0 10px 20px rgba(0,0,0,0.1);
  transition: 0.2s;
}

.duelo-card:hover {
  transform: scale(1.05);
}

.duelo-card img {
  width: 100%;
  border-radius: 10px;
}

.vs {
  font-size: 28px;
  font-weight: bold;
  color: #a67c2e;
}

.duelo-acciones {
  margin-top: 20px;
  display: flex;
  gap: 10px;
  justify-content: center;
}

/* CONTENEDOR */
.ranking-box {
  text-align: center;
  margin-top: 30px;
  padding: 25px;
  background: #fff8f0;
  border-radius: 20px;
  box-shadow: 0 10px 25px rgba(0,0,0,0.08);
}

/* TITULO */
.ranking-title {
  font-size: 28px;
  color: #8b5e3c;
  margin-bottom: 5px;
}

.ranking-sub {
  font-size: 14px;
  color: #777;
  margin-bottom: 20px;
}

/* ITEM */
.ranking-item {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
  margin: 10px 0;
}

/* POSICIÓN */
.ranking-pos {
  font-size: 20px;
  font-weight: bold;
  color: #c59d5f;
}

/* IMAGEN */
.ranking-img {
  width: 50px;
  height: 50px;
  object-fit: cover;
  border-radius: 50%;
}

/* NOMBRE */
.ranking-nombre {
  font-size: 18px;
  font-weight: 500;
}

/* TEXTO FINAL */
.ranking-extra {
  margin-top: 15px;
  font-size: 14px;
  color: #a67c52;
}
