/* Hielo (muestra): portada sin scroll en compu, como el sitio de refrescos de referencia. La joya 3D va al centro,
   las frutas-joya flotan y se apartan del cursor, las burbujas suben y los 5 sabores van en tarjetas a la derecha. */
.pagina-inicio { overflow: hidden; height: 100vh; height: 100dvh; }

/* ---------- burbujas ---------- */
#bubbles-container { position: fixed; inset: 0; pointer-events: none; z-index: 0; overflow: hidden; }
/* La burbuja sube (span) y se bambolea de lado (i), como el gas de un refresco. */
.bubble { position: absolute; bottom: -50px; pointer-events: none; }
.bubble i {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.6);
  background: radial-gradient(circle at 32% 30%, rgba(255, 255, 255, 0.9) 0 9%, rgba(255, 255, 255, 0.14) 11% 62%, rgba(255, 255, 255, 0.05) 64%);
  animation: bamboleo var(--b, 2s) ease-in-out infinite alternate;
}
@keyframes bamboleo { from { transform: translateX(calc(var(--a, 6px) * -1)); } to { transform: translateX(var(--a, 6px)); } }
@keyframes fizz {
  0% { transform: translateY(0) scale(0.6); opacity: 0; }
  12% { opacity: 0.85; transform: translateY(-8vh) scale(1); }
  100% { transform: translateY(-105vh) scale(1.1); opacity: 0; }
}
@keyframes floatUpImg {
  0% { transform: translateY(0) translateX(0) rotate(0deg); opacity: 0; }
  10% { opacity: 0.4; }
  90% { opacity: 0.4; }
  100% { transform: translateY(-110vh) translateX(30px) rotate(360deg); opacity: 0; }
}

/* ---------- portada ---------- */
.hero {
  height: 100vh;
  height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 5rem 4% 0;
}
.hero-content {
  display: flex;
  justify-content: space-between;
  align-items: stretch;
  width: 100%;
  height: 100%;
  position: relative;
}

/* Como el logo: una palabra chica en cursiva y la grande pintada con su sombra de rótulo. */
.main-title, .side-title {
  font-family: var(--font-heading);
  font-size: clamp(4.4rem, 8.2vw, 10rem);
  line-height: 0.92;
  font-weight: 400;
  white-space: nowrap;
  color: #ffffff;
  /* Sombra de rótulo, como el logo: la letra se corre en escalones en el tono más oscuro del sabor. */
  --tono-sombra: var(--bg-outer);
  text-shadow: 0.01em 0.01em 0 var(--tono-sombra), 0.02em 0.02em 0 var(--tono-sombra), 0.03em 0.03em 0 var(--tono-sombra), 0.04em 0.04em 0 var(--tono-sombra), 0.05em 0.05em 0 var(--tono-sombra);
}
.guion {
  display: inline-block;
  font-family: var(--font-guion);
  font-size: 0.64em;
  line-height: 1;
  color: var(--accent);
  rotate: -6deg;
  translate: 0.06em 0.12em;
  text-shadow: none;
}

/* Letreros de lado, como en las fotos de joyería de referencia */
.etiqueta-vertical {
  position: fixed;
  top: 50%;
  z-index: 120;
  font: 800 0.72rem var(--font-ui);
  font-stretch: 125%;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--muted-color);
  white-space: nowrap;
  pointer-events: none;
}
.etiqueta-vertical--izq { left: 1.1%; transform: translate(-50%, -50%) rotate(-90deg) translateY(50%); transform-origin: center; }
.etiqueta-vertical--der { right: 1.1%; transform: translate(50%, -50%) rotate(90deg) translateY(50%); transform-origin: center; }

/* ---------- brillos del fondo (diamante y hielo sobre negro: "screen" borra el negro) ---------- */
.leaves-container {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  mix-blend-mode: screen;
}
.leaf { position: absolute; width: 60px; height: 60px; pointer-events: none; object-fit: contain; }
.l1 { top: 10%; left: 15%; width: 90px; height: 90px; }
.l2 { top: 40%; left: 80%; width: 140px; height: 140px; opacity: 0.55; }
.l3 { top: 70%; left: 75%; width: 80px; height: 80px; }
.l4 { top: 85%; left: 20%; width: 120px; height: 120px; opacity: 0.45; }

/* ---------- columna izquierda ---------- */
.hero-left {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 6rem 0 5rem;
  gap: 2rem;
  z-index: 112; /* arriba de las frutas (110): pasan por detrás de los títulos y no tapan el texto */
}
.description { color: #ffffff; text-shadow: 0 1px 14px rgba(0, 0, 0, 0.25); font-size: 1.1rem; line-height: 1.6; max-width: 400px; text-wrap: pretty; }
.award-badge { display: flex; align-items: center; gap: 1rem; margin-top: auto; }
.award-text { display: flex; flex-direction: column; }
.award-title { font: 800 0.72rem var(--font-ui); font-stretch: 125%; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted-color); }
.award-subtitle { font-size: 0.9rem; font-weight: 600; }

/* ---------- frutas-joya (las "moras" del original) ---------- */
.berries-container, .berries-container-bg { position: absolute; inset: 0; pointer-events: none; }
.berries-container { z-index: 110; }
.berries-container-bg { z-index: 0; }
.berry {
  position: absolute;
  width: 120px;
  height: 120px;
  object-fit: contain;
  filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.3));
  will-change: transform;
  scale: var(--fruta, 1);
}
.berry.volteada { scale: calc(-1 * var(--fruta, 1)) var(--fruta, 1); }
/* Las rodajas de lima son discos grandes y planos: van más chicas para que no tapen la joya. */
body[data-sabor="lima"] { --fruta: 0.6; }
/* Alrededor de la joya, nunca encima: el centro (más o menos 38–62% de ancho) queda libre. */
.b1 { top: 22%; left: 21%; width: 190px; height: 190px; }
.b2 { top: 64%; left: 30%; width: 100px; height: 100px; }
.b3 { top: 42%; left: 63%; width: 200px; height: 200px; }
.b4 { top: 74%; left: 66%; width: 120px; height: 120px; }
.b5 { top: 60%; left: 17%; width: 115px; height: 115px; }
.b6 { top: 28%; left: 77%; width: 150px; height: 150px; }
.b7 { top: 8%; left: 33%; width: 80px; height: 80px; opacity: 0.7; filter: blur(1.5px) drop-shadow(0 6px 12px rgba(0, 0, 0, 0.25)); }
.b8 { top: 62%; left: 64%; width: 70px; height: 70px; opacity: 0.6; filter: blur(2px); }
.b9 { top: 84%; left: 27%; width: 75px; height: 75px; opacity: 0.7; filter: blur(1.5px); }

/* ---------- la joya en 3D ---------- */
.hero-center {
  display: flex;
  justify-content: center;
  align-items: center;
  position: absolute;
  inset: 0;
  z-index: 1;
  opacity: 0; /* aparece con GSAP cuando la joya ya cargó; el flotado (0 a -20 px en 6 s) va en inicio.js */
  pointer-events: none;
  background: radial-gradient(circle at center, color-mix(in srgb, var(--accent) 14%, transparent) 0%, transparent 62%);
}

.main-product-3d {
  --giro: 25deg;
  width: 80vw;
  height: var(--alto, 80vh);
  outline: none;
  --progress-bar-color: transparent;
  --poster-color: transparent;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(var(--giro));
  pointer-events: none;
  background: transparent;
}

/* ---------- columna derecha: los 5 sabores ---------- */
.hero-right {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: flex-end;
  text-align: right;
  height: 100%;
  padding: 6rem 0 5rem;
  z-index: 112;
  width: 520px;
  pointer-events: none;
}
.product-carousel { display: flex; flex-direction: column; gap: 1.25rem; align-items: flex-end; pointer-events: auto; outline: none; }
.carousel-cards { display: flex; gap: 0.6rem; }

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.9rem;
  width: 96px;
  padding: 4.4rem 0.4rem 0.8rem;
  border-radius: 24px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  text-align: center;
  cursor: pointer;
  transition: background-color 0.4s ease, border-color 0.4s ease;
}
.card:hover { background: rgba(255, 255, 255, 0.12); border-color: rgba(255, 255, 255, 0.4); }
.card.active { border-color: var(--accent); border-width: 1px; background: rgba(255, 255, 255, 0.1); }
.card img {
  width: 92px;
  height: 116px;
  margin-top: -7.6rem;
  object-fit: contain;
  filter: drop-shadow(0 18px 26px rgba(0, 0, 0, 0.45));
  transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
  will-change: transform;
  pointer-events: none;
}
.card:hover img, .card:focus-visible img { transform: translateY(-24px) rotate(-10deg) scale(1.12); }
.card-info { display: flex; flex-direction: column; width: 100%; font-size: 0.8rem; line-height: 1.35; }
.card-info span:first-child { font-weight: 600; }
.card-info span:last-child { color: var(--muted-color); }

.carousel-nav { display: flex; gap: 0.75rem; }
.nav-arrow {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--glass-border);
  background: var(--glass-bg);
  color: #ffffff;
  cursor: pointer;
  transition: background-color 0.3s ease;
}
.nav-arrow:hover { background: rgba(255, 255, 255, 0.14); }
.side-title { align-self: flex-end; text-align: right; }

/* ---------- ficha de la joya (abajo al centro) ---------- */
.ficha {
  position: absolute;
  left: 50%;
  bottom: 3.2rem;
  translate: -50% 0; /* con translate (no transform) para que GSAP pueda moverla en y sin perder el centrado */
  z-index: 120;
  width: min(380px, 30vw);
  text-align: center;
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.35);
}
.ficha__sabor {
  display: inline-block;
  margin-bottom: 0.5rem;
  padding: 0.3rem 0.8rem;
  border-radius: 100px;
  background: var(--accent);
  color: var(--on-accent);
  font: 800 0.72rem var(--font-ui);
  font-stretch: 125%;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-shadow: none;
}
.ficha__nombre { font: 700 1.05rem var(--font-ui); }
.ficha__titulo { font: 400 1.5rem/1 var(--font-heading); letter-spacing: 0.01em; }
.ficha__precio { font-weight: 500; color: var(--muted-color); }
.ficha__texto { margin-top: 0.25rem; font-size: 0.86rem; line-height: 1.45; color: #ffffff; text-wrap: balance; }

.pagina-inicio .nota-ejemplo {
  position: fixed;
  left: 50%;
  bottom: 0.9rem;
  transform: translateX(-50%);
  z-index: 120;
  white-space: nowrap;
}

/* ---------- tableta y celular: la portada se puede bajar ---------- */
@media (max-width: 1100px) {
  .pagina-inicio {
    overflow-x: hidden; overflow-y: auto; height: auto;
    /* En celular el texto va arriba y la joya abajo: el centro claro del degradado baja a la joya. */
    background: radial-gradient(circle at 50% 80%, var(--bg-inner) 0%, var(--bg-mid) 40%, var(--bg-outer) 100%) fixed;
  }
  .hero { height: auto; min-height: 100dvh; padding: 6rem 16px 2rem; }
  .hero-content { flex-direction: column; height: auto; gap: 1.5rem; }
  .etiqueta-vertical, .leaves-container { display: none; }
  .main-title, .side-title { font-size: clamp(3.6rem, 13vw, 5.6rem); }
  .hero-left { height: auto; padding: 1rem 0 0; gap: 1.25rem; }
  .description { font-size: 1rem; }
  .award-badge { margin-top: 0.5rem; order: 3; }
  .hero-center {
    position: relative;
    inset: auto;
    height: 62vh;
    min-height: 380px;
    order: 1;
    margin: 0 -16px;
    overflow: hidden;
  }
  .main-product-3d { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(var(--giro)); }
  .ficha { position: static; translate: none; width: 100%; order: 2; }
  .hero-right { width: 100%; height: auto; padding: 0; align-items: stretch; text-align: left; order: 4; gap: 2rem; }
  .product-carousel { align-items: stretch; }
  .carousel-cards { overflow-x: auto; padding: 6.5rem 2px 0.5rem; margin-top: -5.5rem; scroll-snap-type: x mandatory; scrollbar-width: none; }
  .carousel-cards::-webkit-scrollbar { display: none; }
  .card { flex: none; width: 96px; scroll-snap-align: start; }
  .carousel-nav { justify-content: flex-start; }
  .side-title { align-self: flex-start; text-align: left; }
  .berry { width: 90px; height: 90px; }
  .b1, .b3 { width: 120px; height: 120px; }
  .b4, .b7, .b8 { display: none; }
  .pagina-inicio .nota-ejemplo { position: static; transform: none; white-space: normal; padding: 1rem 16px 1.5rem; text-align: center; }
}

@media (prefers-reduced-motion: reduce) {
  .hero-center { opacity: 1; }
  #bubbles-container { display: none; }
}
