/* ==========================================================================
   SECCIÓN SABORES · YOGURTTOPPINGS
   Archivo: css/sabores.css
   Estilo completo y premium para la sección Sabores
   ========================================================================== */

/* Variables y Tokens de Diseño */
.flavors {
  --f-green-900: #0B7A38;
  --f-green-700: #0F8A3F;
  --f-green-500: #4EA336;
  --f-green-400: #7DBF62;
  --f-green-300: #94CC70;
  --f-green-100: #D3E5B6;
  --f-cream-bg:  #FAFBEE;
  --f-cream-card: #FFFFFF;
  --f-text-dark: #0B7A38;
  --f-text-body: #3E6342;
  --f-shadow-soft: 0 10px 30px rgba(11, 122, 56, 0.08);
  --f-shadow-hover: 0 14px 36px rgba(11, 122, 56, 0.16);
  --f-ease-out: cubic-bezier(0.2, 0.8, 0.2, 1);
  --f-ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);

  position: relative;
  width: 100%;
  min-height: 100svh;
  background-color: var(--f-cream-bg);
  overflow: hidden;
  isolation: isolate;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(50px, 6vw, 90px) clamp(20px, 4vw, 60px);
  color: var(--f-text-dark);
  font-family: "Outfit", system-ui, -apple-system, sans-serif;
}

/* Reset acotado a la sección */
.flavors,
.flavors *,
.flavors *::before,
.flavors *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* ---- 1. FONDO LIMPIO ---- */
.flavors__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-color: var(--f-cream-bg, #FAFBEE);
}

/* ---- CAPAS DE PARTÍCULAS EN SABORES ---- */
.flavors__particles {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  overflow: hidden;
}

.flavors__particles--back {
  z-index: 1;
}

.flavors__particles--front {
  z-index: 15;
}

/* ---- 2. GRID / LAYOUT PRINCIPAL ---- */
.flavors__inner {
  position: relative;
  z-index: 5;
  width: 100%;
  max-width: 1540px;
  display: grid;
  grid-template-columns: minmax(280px, 1.05fr) minmax(360px, 1.45fr) minmax(300px, 1.1fr);
  gap: clamp(24px, 3.2vw, 56px);
  align-items: center;
  margin: 0 auto;
}

/* ---- 3. COLUMNA IZQUIERDA: SABORES ---- */
.flavors__content {
  position: relative;
  left: calc(var(--sabores-content-x, -165) * var(--px));
  top: calc(var(--sabores-content-y, 0) * var(--px));
  transform: rotate(calc(var(--sabores-content-rot, 0) * 1deg)) scale(var(--sabores-content-scale, 1.43));
  transform-origin: center center;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  width: 100%;
}

.flavors__tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px clamp(14px, 1.2vw, 18px);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.85);
  border: 1.5px solid var(--f-green-900);
  color: var(--f-green-900);
  font: 500 clamp(13px, 0.95vw, 15px) "Outfit", sans-serif;
  letter-spacing: 0.01em;
  box-shadow: 0 2px 10px rgba(11, 122, 56, 0.08);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  margin-bottom: clamp(14px, 1.2vw, 20px);
  user-select: none;
}

.flavors__tag-icon {
  width: 15px;
  height: 15px;
  fill: currentColor;
  flex-shrink: 0;
}

.flavors__title {
  display: flex;
  flex-direction: column;
  font-family: "Fredoka", cursive, sans-serif;
  font-weight: 700;
  font-synthesis: none;
  font-size: clamp(40px, 4.2vw, 72px);
  line-height: 0.96;
  letter-spacing: -0.01em;
  margin-bottom: clamp(14px, 1.2vw, 20px);
}

.flavors__title-line {
  white-space: nowrap;
}

.flavors__title-line--1 {
  color: var(--f-green-900);
}

.flavors__title-line--2 {
  color: var(--f-green-400);
  background: linear-gradient(90deg, #4EA336 0%, #7DBF62 60%, #0B7A38 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.flavors__subtitle {
  font: 400 clamp(14px, 1.05vw, 17px)/1.45 "Outfit", sans-serif;
  color: var(--f-text-body);
  margin-bottom: clamp(22px, 1.8vw, 32px);
  max-width: 420px;
}

.flavors__list {
  display: flex;
  flex-direction: column;
  gap: clamp(10px, 0.8vw, 14px);
  width: 100%;
  max-width: 360px;
}

/* Píldoras de sabor */
.flavor-pill {
  display: flex;
  align-items: center;
  gap: clamp(12px, 1.0vw, 16px);
  width: 100%;
  height: clamp(58px, 4.2vw, 68px);
  padding: 6px clamp(16px, 1.2vw, 22px) 6px 8px;
  border-radius: 999px;
  border: 1.5px solid rgba(11, 122, 56, 0.16);
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 4px 16px rgba(11, 122, 56, 0.05);
  cursor: pointer;
  text-align: left;
  user-select: none;
  transition: transform 0.28s var(--f-ease-out),
              background 0.28s var(--f-ease-out),
              border-color 0.28s var(--f-ease-out),
              box-shadow 0.28s var(--f-ease-out);
  position: relative;
  outline: none;
}

.flavor-pill:hover:not(.is-active) {
  transform: translateX(6px);
  background: #FFFFFF;
  border-color: rgba(11, 122, 56, 0.38);
  box-shadow: 0 8px 22px rgba(11, 122, 56, 0.12);
}

.flavor-pill:hover:not(.is-active) .flavor-pill__arrow {
  transform: translateX(4px);
  stroke: var(--f-green-900);
  opacity: 1;
}

.flavor-pill:active {
  transform: scale(0.98);
}

.flavor-pill:focus-visible {
  outline: 2px solid var(--f-green-900);
  outline-offset: 3px;
}

.flavor-pill.is-active {
  background: linear-gradient(135deg, #0B7A38 0%, #0F8A3F 100%);
  border-color: #0B7A38;
  box-shadow: 0 10px 28px rgba(11, 122, 56, 0.28),
              inset 0 1px 0 rgba(255, 255, 255, 0.25);
  transform: translateX(8px);
  cursor: default;
}

.flavor-pill__icon {
  width: clamp(44px, 3.2vw, 52px);
  height: clamp(44px, 3.2vw, 52px);
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  background: #FFFFFF;
  border: 1.5px solid rgba(255, 255, 255, 0.7);
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.25s var(--f-ease-spring);
}

.flavor-pill.is-active .flavor-pill__icon {
  transform: scale(1.05);
  border-color: #FFFFFF;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.18);
}

.flavor-pill__icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.flavor-pill__info {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
}

.flavor-pill__name {
  font: 600 clamp(16px, 1.1vw, 19px) "Outfit", sans-serif;
  color: var(--f-green-900);
  line-height: 1.15;
  transition: color 0.25s;
}

.flavor-pill.is-active .flavor-pill__name {
  color: #FFFFFF;
}

.flavor-pill__tag {
  font: 400 12px "Outfit", sans-serif;
  color: #648A66;
  margin-top: 2px;
  transition: color 0.25s;
}

.flavor-pill.is-active .flavor-pill__tag {
  color: rgba(255, 255, 255, 0.85);
}

.flavor-pill__check {
  width: 22px;
  height: 22px;
  stroke: #FFFFFF;
  display: none;
  flex-shrink: 0;
}

.flavor-pill__arrow {
  width: 20px;
  height: 20px;
  stroke: var(--f-green-900);
  opacity: 0.5;
  flex-shrink: 0;
  transition: transform 0.25s var(--f-ease-out), opacity 0.25s;
}

.flavor-pill.is-active .flavor-pill__check {
  display: block;
}

.flavor-pill.is-active .flavor-pill__arrow {
  display: none;
}

/* ---- ESCENARIO FIJO 1774x887 (igual que el hero) ---- */
.flavors__showcase { position: static; }                 /* desktop: no es contenedor */
.flavors__inner    { position: static; }                 /* desktop: el stage se ancla a .flavors */
.flavors__content, .flavors__side { z-index: 5; }        /* siguen por encima del stage */

.flavors__stage {
  position: absolute;
  left: 50%; top: 50%;
  width:  calc(1774 * var(--px));
  height: calc(887  * var(--px));
  transform: translate(-50%, -50%);
  z-index: 3;
  pointer-events: none;
  opacity: 0;
  transition: opacity .9s var(--f-ease-out);
}
.flavors.is-visible .flavors__stage { opacity: 1; }

.flavors__pedestal,
.flavors__cups {
  position: absolute;
  transform-origin: center center;
}

/* Valores de respaldo = variables :root (las que exporta el botón único) */
.flavors__pedestal {
  left:  calc(var(--sabores-pedestal-x, 887) * var(--px));
  top:   calc(var(--sabores-pedestal-y, 640) * var(--px));
  width: calc(var(--sabores-pedestal-w, 520) * var(--px));
  height: auto;
  transform: translate(-50%, -50%)
             rotate(calc(var(--sabores-pedestal-rot, 0) * 1deg))
             scale(var(--sabores-pedestal-scale, 1));
  user-select: none; -webkit-user-drag: none;
}
.flavors__cups {
  left:  calc(var(--sabores-cups-x, 887) * var(--px));
  top:   calc(var(--sabores-cups-y, 470) * var(--px));
  width: calc(var(--sabores-cups-w, 560) * var(--px));
  aspect-ratio: var(--cups-ratio, 2400 / 1792);
  transform: translate(-50%, -50%)
             rotate(calc(var(--sabores-cups-rot, 0) * 1deg))
             scale(var(--sabores-cups-scale, 1));
}

/* Capa de copas base de helado */
.flavors__scoop {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: fill;
  opacity: 0;
  transform: scale(0.96);
  transition: opacity 0.5s var(--f-ease-out), transform 0.5s var(--f-ease-out);
  filter: drop-shadow(0 14px 24px rgba(0, 0, 0, 0.10));
  z-index: 1;
  will-change: opacity, transform;
}

.flavors__scoop.is-active {
  opacity: 1;
  transform: scale(1);
}

.flavors__scoop.is-leaving {
  opacity: 0;
  transform: scale(0.96);
}

/* Superposiciones de toppings sobre helado de Vainilla */
.flavors__overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: fill;
  opacity: 0;
  transform: scale(1);
  pointer-events: none;
  transition: opacity 0.24s var(--f-ease-out);
  z-index: 2;
  will-change: opacity;
}

.flavors__overlay.is-instant-off {
  transition: none !important;
  opacity: 0 !important;
}

.flavors__overlay.is-on {
  opacity: 1;
}

.flavors__overlay.is-leaving {
  opacity: 0;
  transform: scale(0.98);
  transition: opacity 0.45s var(--f-ease-out), transform 0.45s var(--f-ease-out);
}

/* ---- 5. COLUMNA DERECHA: PANEL DE TOPPINGS ---- */
.flavors__side {
  position: relative;
  left: calc(var(--sabores-side-x, 180) * var(--px));
  top: calc(var(--sabores-side-y, 0) * var(--px));
  transform: rotate(calc(var(--sabores-side-rot, 0) * 1deg)) scale(var(--sabores-side-scale, 1.49));
  transform-origin: center center;
  display: flex;
  flex-direction: column;
  gap: clamp(16px, 1.4vw, 22px);
  width: 100%;
  max-width: 390px;
  align-items: stretch;
}

.toppings-panel {
  width: 100%;
  border-radius: clamp(24px, 2.0vw, 34px);
  padding: clamp(20px, 1.8vw, 28px);
  background: rgba(255, 255, 255, 0.88);
  border: 1.5px solid rgba(11, 122, 56, 0.18);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  box-shadow: 0 12px 36px rgba(11, 122, 56, 0.08), inset 0 1px 0 #FFFFFF;
  transition: opacity 0.3s var(--f-ease-out), border-color 0.3s;
}

.toppings-panel[data-enabled="false"] {
  border-color: rgba(11, 122, 56, 0.10);
}

.toppings-panel__header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: clamp(14px, 1.2vw, 20px);
}

.toppings-panel__title {
  font-family: "Fredoka", cursive, sans-serif;
  font-weight: 700;
  font-size: clamp(22px, 1.6vw, 28px);
  color: var(--f-green-900);
  line-height: 1.1;
}

.toppings-panel__subtitle {
  font: 400 clamp(12px, 0.9vw, 14px) "Outfit", sans-serif;
  color: var(--f-text-body);
  margin-top: 4px;
}

.toppings-panel__badge {
  padding: 4px 12px;
  border-radius: 999px;
  background: rgba(11, 122, 56, 0.10);
  border: 1px solid rgba(11, 122, 56, 0.18);
  color: var(--f-green-900);
  font: 600 12px "Outfit", sans-serif;
  white-space: nowrap;
}

.toppings-grid {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(10px, 1.1vw, 16px);
  justify-items: center;
}

.topping {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}

.topping__btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: none;
  border: 0;
  padding: 4px;
  margin: 0;
  width: 100%;
  cursor: pointer;
  outline: none;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.25s var(--f-ease-out);
}

.toppings-panel[data-enabled="false"] .topping__btn {
  cursor: pointer;
}

.topping__media {
  position: relative;
  display: block;
  width: clamp(62px, 5.2vw, 84px);
  aspect-ratio: 1;
}

.topping__circle {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  overflow: hidden;
  background: #FFFFFF;
  border: 2px solid rgba(11, 122, 56, 0.16);
  box-shadow: 0 4px 14px rgba(11, 122, 56, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(6px, 0.6vw, 10px);
  transition: transform 0.28s var(--f-ease-spring),
              border-color 0.25s,
              box-shadow 0.25s;
}

.topping__circle img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.topping__btn:hover .topping__circle {
  transform: translateY(-3px) scale(1.06);
  border-color: var(--f-green-700);
  box-shadow: 0 8px 20px rgba(11, 122, 56, 0.18);
}

.topping__btn:active .topping__circle {
  transform: scale(0.96);
}

.topping__btn.is-selected .topping__circle {
  border-color: var(--f-green-900);
  border-width: 2.5px;
  box-shadow: 0 0 0 4px rgba(11, 122, 56, 0.22),
              0 8px 22px rgba(11, 122, 56, 0.24);
  transform: scale(1.04);
}

.topping__check {
  width: clamp(20px, 1.6vw, 26px);
  height: clamp(20px, 1.6vw, 26px);
  position: absolute;
  top: -2px;
  right: -2px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--f-green-900);
  color: #FFFFFF;
  box-shadow: 0 3px 8px rgba(11, 122, 56, 0.35);
  opacity: 0;
  transform: scale(0.3);
  transition: opacity 0.2s, transform 0.32s var(--f-ease-spring);
  pointer-events: none;
}

.topping__check svg {
  width: 60%;
  height: 60%;
}

.topping__btn.is-selected .topping__check {
  opacity: 1;
  transform: scale(1);
}

.topping__name {
  font: 500 clamp(12px, 0.9vw, 14px) "Outfit", sans-serif;
  color: #2D4C30;
  text-align: center;
  margin-top: 6px;
  transition: color 0.2s, font-weight 0.2s;
}

.topping__btn.is-selected .topping__name {
  color: var(--f-green-900);
  font-weight: 600;
}

/* Beneficios */
.flavors__benefits {
  list-style: none;
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 12px clamp(14px, 1.2vw, 18px);
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(11, 122, 56, 0.14);
  border-radius: 18px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.flavors__benefit {
  display: flex;
  align-items: center;
  gap: 7px;
  font: 500 clamp(11px, 0.85vw, 13px) "Outfit", sans-serif;
  color: var(--f-green-900);
  line-height: 1.2;
}

.flavors__benefit svg {
  width: 18px;
  height: 18px;
  stroke: var(--f-green-900);
  fill: none;
  stroke-width: 1.8;
  flex-shrink: 0;
}

/* Botón CTA de Ordenar */
.flavors__cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  height: clamp(48px, 3.6vw, 56px);
  border-radius: 999px;
  background: var(--f-green-900);
  color: #FFFFFF;
  text-decoration: none;
  border: none;
  font: 600 clamp(15px, 1.05vw, 17px) "Outfit", sans-serif;
  letter-spacing: 0.01em;
  box-shadow: 0 8px 24px rgba(11, 122, 56, 0.25);
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: transform 0.25s var(--f-ease-out),
              background 0.25s,
              box-shadow 0.25s var(--f-ease-out);
}

.flavors__cta svg {
  width: 18px;
  height: 18px;
  transition: transform 0.25s var(--f-ease-out);
}

.flavors__cta:hover {
  background: var(--f-green-700);
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(11, 122, 56, 0.35);
}

.flavors__cta:hover svg {
  transform: translateX(4px);
}

.flavors__cta:active {
  transform: scale(0.98);
}

/* ---- 6. ANIMACIONES DE ENTRADA AL SCROLL ---- */
/* Causa 5: el reveal NO debe tocar `transform` */
.flavors [data-reveal] {
  opacity: 0;
  translate: 0 28px;                      /* propiedad individual: se suma al transform */
  transition: opacity .8s var(--f-ease-out), translate .8s var(--f-ease-out);
}
.flavors.is-visible [data-reveal] { opacity: 1; translate: 0 0; }

/* ---- 7. RESPONSIVE / MEDIA QUERIES ---- */
@media (max-width: 1180px) {
  .flavors__inner {
    grid-template-columns: 1fr 1.2fr 1fr;
    gap: 20px;
  }

  .toppings-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ---- MÓVIL / TABLET (<=980px): layout apilado propio, NO editable por ahora ---- */
@media (max-width: 980px) {
  .flavors {
    padding: 60px 20px;
    height: auto;
    min-height: auto;
  }

  .flavors__inner {
    grid-template-columns: 1fr;
    gap: 40px;
    max-width: 580px;
  }

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

  .flavors__title {
    align-items: center;
  }

  .flavors__subtitle {
    max-width: 100%;
  }

  .flavors__list {
    max-width: 100%;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
  }

  .flavors__showcase { position: relative; height: 480px; }
  .flavors__stage    { position: absolute; left: 50%; top: 0; width: 100%; height: 100%; transform: translateX(-50%); }
  .flavors__pedestal { left: 50%; top: auto; bottom: 0;  width: 300px; transform: translateX(-50%); }
  .flavors__cups     { left: 50%; top: auto; bottom: 70px; width: 330px; transform: translateX(-50%); }

  .flavors__side {
    max-width: 100%;
  }
}

@media (max-width: 600px) {
  .flavors {
    padding: 40px 16px 60px;
  }

  .flavors__title {
    font-size: 38px;
  }

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

  .flavor-pill {
    height: 60px;
  }

  .flavor-pill.is-active {
    transform: none;
  }

  .topping__media {
    width: 56px;
  }

  .toppings-panel {
    padding: 18px 14px;
  }

  .toppings-grid {
    gap: 8px;
  }
}

/* ---- 8. NAVEGACIÓN FIJA AL SCROLLEAR (.nav.is-scrolled) ---- */
.nav.is-scrolled {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  width: 100% !important;
  height: 72px !important;
  z-index: 9999 !important;
  background: rgba(250, 251, 238, 0.94) !important;
  backdrop-filter: blur(16px) saturate(140%) !important;
  -webkit-backdrop-filter: blur(16px) saturate(140%) !important;
  border-bottom: 1.5px solid rgba(11, 122, 56, 0.14) !important;
  box-shadow: 0 4px 24px rgba(11, 122, 56, 0.08) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  padding: 0 clamp(20px, 5vw, 80px) !important;
  animation: navSlideDown 0.35s cubic-bezier(0.2, 0.8, 0.2, 1) !important;
}

@keyframes navSlideDown {
  from {
    transform: translateY(-100%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.nav.is-scrolled .nav__brand {
  position: static !important;
  display: flex !important;
  align-items: center !important;
}

.nav.is-scrolled .nav__brand img {
  height: 46px !important;
  width: auto !important;
}

.nav.is-scrolled .nav__menu {
  position: static !important;
  transform: none !important;
  display: flex !important;
  gap: clamp(18px, 2.8vw, 42px) !important;
}

.nav.is-scrolled .nav__link {
  font-size: 16px !important;
  padding: 6px 0 !important;
  color: #0B7A38 !important;
}

.nav.is-scrolled .btn-order {
  position: static !important;
  display: inline-flex !important;
  width: auto !important;
  padding: 0 22px !important;
  height: 42px !important;
  font-size: 15px !important;
  background: #0B7A38 !important;
  color: #FFFFFF !important;
  box-shadow: 0 4px 14px rgba(11, 122, 56, 0.25) !important;
}

.nav.is-scrolled .btn-order svg {
  stroke: #FFFFFF !important;
  width: 17px !important;
  height: 17px !important;
}

.nav.is-scrolled .btn-order:hover {
  background: #0F8A3F !important;
  transform: translateY(-2px) !important;
}

@media (max-width: 900px) {
  .nav.is-scrolled .nav__menu {
    display: none !important;
  }
  .nav.is-scrolled .nav__toggle {
    display: block !important;
  }
}