/* Sectores · capa interactiva (empieza en Nutrición deportiva, ES/EN/PT)
   Rejilla de productos en una pantalla, anillo 3D de formatos,
   pista de proceso y FAQ en dos columnas. Sin dependencias. */
.sx,
.sx-faq {
  --sx-ink: #000066;
  --sx-night: #00002E;
  --sx-gold: #C8A84B;
  --sx-paper: #F3F4F9;
  --sx-steel: #8A90B8;
  --sx-line: rgba(0, 0, 102, .12);
  --sx-ease: cubic-bezier(.22, 1, .36, 1);
}

/* ---------- A. Productos: las 8 familias en una pantalla ---------- */
.sx-wrap {
  position: relative;
  z-index: 1;
  width: min(1240px, calc(100% - 48px));
  margin: 0 auto;
}

.sx.sx-prod {
  padding: clamp(64px, 7vw, 88px) 0;
}

.sx-prod .section-header {
  margin-bottom: 0;
}

.sx.sx-prod .section-header {
  max-width: none;
}

.sx.sx-prod .section-header h2 {
  max-width: none;
  font-size: clamp(1.9rem, 2.9vw, 2.5rem);
  text-wrap: balance;
}

.sx.sx-prod .section-header p {
  margin-top: 8px;
  margin-bottom: 0;
}

.sx-cards-grid {
  display: grid;
  grid-template-columns: repeat(var(--cols, 4), minmax(0, 1fr));
  gap: 14px;
  margin-top: clamp(28px, 3.5vw, 44px);
}

.sx-panel {
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 6px;
  background: rgba(255, 255, 255, .04);
  outline: none;
  transition: border-color .35s, transform .5s var(--sx-ease), background .35s;
}

.sx-panel:hover,
.sx-panel:focus-visible {
  border-color: rgba(200, 168, 75, .7);
  background: rgba(255, 255, 255, .07);
  transform: translateY(-4px);
}

.sx-panel:focus-visible {
  box-shadow: 0 0 0 2px var(--sx-gold);
}

.sx-panel-img {
  aspect-ratio: var(--ar, 2 / 1);
  overflow: hidden;
  background: #fff;
}

/* Fotos de unos 2:1: se muestran enteras, sin recorte */
.sx-panel-img img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform 1s var(--sx-ease);
}

.sx-panel:hover .sx-panel-img img,
.sx-panel:focus-visible .sx-panel-img img {
  transform: scale(1.03);
}

.sx-panel-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 10px 14px 12px;
  color: #fff;
}

.sx-kicker,
.sx-formats-l {
  display: none;
}

.sx-panel-body h3 {
  margin: 0 0 8px;
  font-family: 'Nunito Sans', sans-serif;
  font-size: 1.08rem;
  font-weight: 800;
  line-height: 1.2;
  color: #fff;
}

/* Capacidades: aparecen sobre la foto al pasar el ratón o con el foco */
.sx-caps {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  aspect-ratio: var(--ar, 2 / 1);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  margin: 0;
  padding: 16px;
  list-style: none;
  background: linear-gradient(180deg, rgba(0, 0, 46, .55) 0%, rgba(0, 0, 46, .95) 55%);
  opacity: 0;
  transform: translateY(12px);
  transition: opacity .35s, transform .5s var(--sx-ease);
  pointer-events: none;
}

.sx-panel:hover .sx-caps,
.sx-panel:focus-visible .sx-caps {
  opacity: 1;
  transform: none;
}

.sx-caps li {
  position: relative;
  padding: 3px 0 3px 14px;
  font-size: .8rem;
  line-height: 1.4;
  color: rgba(255, 255, 255, .9);
}

.sx-caps li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 10px;
  width: 5px;
  height: 5px;
  background: var(--sx-gold);
}

.sx-formats {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.sx-formats li {
  padding: 2px 7px;
  border: 1px solid rgba(200, 168, 75, .45);
  border-radius: 3px;
  font-family: 'Inter', sans-serif;
  font-size: .68rem;
  font-weight: 600;
  letter-spacing: .03em;
  color: rgba(255, 255, 255, .88);
}

/* ---------- A2. Productos: filtro por formato, foco y ficha ---------- */
.sx-filter {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: clamp(18px, 2.4vw, 28px);
}

.sx-filter-l {
  margin-right: 6px;
  font-family: 'Inter', sans-serif;
  font-size: .68rem;
  font-weight: 600;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, .5);
}

.sx-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 999px;
  background: transparent;
  color: rgba(255, 255, 255, .82);
  font-family: 'Inter', sans-serif;
  font-size: .78rem;
  font-weight: 600;
  cursor: pointer;
  transition: background .3s, border-color .3s, color .3s;
}

.sx-chip i {
  font-style: normal;
  font-size: .68rem;
  color: var(--sx-gold);
}

.sx-chip:hover {
  border-color: rgba(200, 168, 75, .7);
  color: #fff;
}

.sx-chip[aria-pressed="true"] {
  border-color: var(--sx-gold);
  background: var(--sx-gold);
  color: var(--sx-night);
}

.sx-chip[aria-pressed="true"] i {
  color: var(--sx-night);
}

.sx-chip:focus-visible {
  outline: 2px solid var(--sx-gold);
  outline-offset: 2px;
}

.sx-cards-grid {
  max-width: calc(var(--cols, 4) * 310px);
  margin: 18px auto 0;
}

/* Foco dorado que sigue al cursor */
.sx-panel::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 3;
  border-radius: inherit;
  background: radial-gradient(360px circle at var(--mx, 50%) var(--my, 0%), rgba(200, 168, 75, .22), transparent 45%);
  opacity: 0;
  transition: opacity .4s;
  pointer-events: none;
}

.sx-panel:hover::before {
  opacity: 1;
}

/* Filete dorado que crece al pasar el ratón */
.sx-panel::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  z-index: 4;
  width: 100%;
  height: 2px;
  background: var(--sx-gold);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .6s var(--sx-ease);
}

.sx-panel:hover::after,
.sx-panel:focus-visible::after,
.sx-cards.is-filtered .sx-panel.is-match::after {
  transform: scaleX(1);
}

.sx-panel-img {
  position: relative;
  padding: 6px;
}

/* Ficha: las capacidades suben desde la base de la foto */
.sx-panel .sx-caps {
  inset: 0 0 auto 0;
  height: auto;
  aspect-ratio: var(--ar, 2 / 1);
  justify-content: flex-end;
  padding: 0;
  background: none;
  transform: none;
  opacity: 1;
  overflow: hidden;
}

.sx-panel .sx-caps::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 46, .93);
  opacity: 0;
  transition: opacity .4s;
}

.sx-panel .sx-caps li {
  position: relative;
  margin: 0;
  padding: 6px 14px 6px 28px;
  background: transparent;
  transform: translateY(calc(100% * 4));
  transition: transform .5s var(--sx-ease);
}

.sx-panel .sx-caps li:first-child {
  padding-top: 12px;
}

.sx-panel .sx-caps li:last-child {
  padding-bottom: 12px;
}

.sx-panel .sx-caps li::before {
  left: 14px;
  top: 14px;
}

.sx-panel .sx-caps li:first-child::before {
  top: 20px;
}

.sx-panel .sx-caps p {
  position: relative;
  margin: 0;
  padding: 14px 16px;
  font-size: .9rem;
  line-height: 1.5;
  color: rgba(255, 255, 255, .92);
  transform: translateY(100%);
  transition: transform .5s var(--sx-ease);
}

.sx-panel:hover .sx-caps p,
.sx-panel:focus-visible .sx-caps p {
  transform: none;
}

.sx-panel .sx-caps li:nth-child(2) { transition-delay: .03s; }
.sx-panel .sx-caps li:nth-child(3) { transition-delay: .06s; }

.sx-panel:hover .sx-caps::before,
.sx-panel:focus-visible .sx-caps::before {
  opacity: 1;
}

.sx-panel:hover .sx-caps li,
.sx-panel:focus-visible .sx-caps li {
  transform: none;
}

/* Filtro activo */
.sx-cards.is-filtered .sx-panel {
  opacity: .32;
  filter: grayscale(.85);
  transition: opacity .45s, filter .45s, border-color .35s, transform .5s var(--sx-ease);
}

.sx-cards.is-filtered .sx-panel.is-match {
  opacity: 1;
  filter: none;
  border-color: rgba(200, 168, 75, .8);
}

.sx-formats li.is-hit {
  border-color: var(--sx-gold);
  background: var(--sx-gold);
  color: var(--sx-night);
}

/* ---------- B. Formatos: los 9 envases a la vista, sin recortes ---------- */
section.sx.sx-fmt .section-header {
  margin-bottom: 0;
  padding-bottom: 0;
}

.sx-shelf {
  --fc: 3;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px;
  width: min(1120px, calc(100% - 48px));
  margin: clamp(28px, 3.5vw, 44px) auto 0;
  padding: 0;
  list-style: none;
}

.sx-shelf > li {
  flex: 0 0 calc((100% - (var(--fc) - 1) * 16px) / var(--fc));
}

.sx-pack {
  display: flex;
  flex-direction: column;
  height: 100%;
  margin: 0;
  background: #fff;
  border: 1px solid var(--sx-line);
  border-radius: 6px;
  transition: border-color .35s, box-shadow .45s var(--sx-ease), transform .45s var(--sx-ease);
}

.sx-pack:hover {
  border-color: var(--sx-gold);
  box-shadow: 0 22px 44px -26px rgba(0, 0, 46, .4);
  transform: translateY(-4px);
}

/* Proporción nativa de las maquetas (676 x 368): la imagen se ve entera */
.sx-pack-img {
  display: block;
  aspect-ratio: 676 / 368;
  padding: 10px;
}

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

.sx-pack figcaption {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: auto;
  padding: 12px 14px;
  border-top: 1px solid var(--sx-line);
  font-family: 'Nunito Sans', sans-serif;
  font-size: 1rem;
  font-weight: 800;
  color: var(--sx-ink);
}

.sx-pack figcaption::before {
  content: '';
  width: 14px;
  height: 2px;
  background: var(--sx-gold);
}

/* ---------- C. Proceso: pista ---------- */
.sx-track {
  --p: 0;
  position: relative;
  width: min(1200px, calc(100% - 48px));
  margin: clamp(40px, 5vw, 64px) auto 0;
}

.sx-lane {
  position: absolute;
  top: 6px;
  left: 6px;
  right: calc((100% - 84px) / 4 - 6px);
  height: 2px;
  background: var(--sx-line);
}

.sx-lane i {
  position: absolute;
  inset: 0;
  background: var(--sx-gold);
  transform: scaleX(var(--p));
  transform-origin: left;
}

.sx-lane b {
  position: absolute;
  top: 50%;
  left: calc(var(--p) * 100%);
  width: 18px;
  height: 18px;
  margin: -9px 0 0 -9px;
  border-radius: 50%;
  background: var(--sx-gold);
  box-shadow: 0 0 0 6px rgba(200, 168, 75, .2);
}

.sx-laps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 28px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.sx-lap {
  position: relative;
  padding-top: 40px;
  opacity: .42;
  transition: opacity .5s var(--sx-ease);
}

.sx-lap.is-on {
  opacity: 1;
}

.sx-lap-dot {
  position: absolute;
  top: 0;
  left: 0;
  width: 14px;
  height: 14px;
  border: 2px solid var(--sx-steel);
  border-radius: 50%;
  background: #fff;
  transition: border-color .4s, background .4s;
}

.sx-lap.is-on .sx-lap-dot {
  border-color: var(--sx-gold);
  background: var(--sx-gold);
}

.sx-lap-num {
  display: block;
  margin-bottom: 14px;
  font-family: 'Nunito Sans', sans-serif;
  font-size: clamp(3rem, 5vw, 4.4rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -.04em;
  color: transparent;
  -webkit-text-fill-color: transparent;
  -webkit-text-stroke: 1.5px var(--sx-steel);
  transition: -webkit-text-stroke-color .5s;
}

.sx-lap.is-on .sx-lap-num {
  -webkit-text-stroke-color: var(--sx-gold);
}

.sx-lap h3 {
  margin: 0 0 10px;
  font-family: 'Nunito Sans', sans-serif;
  font-size: 1.25rem;
  font-weight: 800;
  line-height: 1.2;
  color: var(--sx-ink);
}

.sx-lap p {
  margin: 0;
  font-size: .95rem;
  line-height: 1.6;
  color: #4a4f6b;
}

/* ---------- D. FAQ ---------- */
.mp-faq.sx-faq .container {
  display: grid;
  grid-template-columns: minmax(0, .8fr) minmax(0, 1.4fr);
  gap: 40px 72px;
  align-items: start;
}

.mp-faq.sx-faq .mp-faq-head {
  position: sticky;
  top: 120px;
  margin: 0;
  text-align: left;
}

.mp-faq.sx-faq .mp-faq-head h2 {
  font-size: clamp(2rem, 3.4vw, 2.8rem);
  line-height: 1.06;
  letter-spacing: -.025em;
  text-align: left;
}

.mp-faq.sx-faq .mp-faq-list {
  max-width: none;
  margin: 0;
}

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .mp-faq.sx-faq .container {
    grid-template-columns: 1fr;
  }

  .mp-faq.sx-faq .mp-faq-head {
    position: static;
  }

  .sx-cards-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }


  .sx-laps {
    grid-template-columns: 1fr;
    gap: 34px;
    padding-left: 36px;
  }

  .sx-lane {
    top: 0;
    bottom: 0;
    left: 6px;
    right: auto;
    width: 2px;
    height: auto;
  }

  .sx-lane i {
    transform: scaleY(var(--p));
    transform-origin: top;
  }

  .sx-lane b {
    top: calc(var(--p) * 100%);
    left: 50%;
    margin: -9px 0 0 -9px;
  }

  .sx-lap {
    padding-top: 0;
  }

  .sx-lap-dot {
    left: -36px;
    top: 4px;
  }
}

@media (max-width: 640px) {
  .sx-shelf {
    --fc: 2;
    gap: 10px;
    width: calc(100% - 32px);
  }

  .sx-shelf > li {
    flex-basis: calc((100% - 10px) / 2);
  }

  .sx-pack figcaption {
    padding: 10px;
    font-size: .9rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .sx-panel,
  .sx-panel-img img,
  .sx-caps,
  .sx-caps li,
  .sx-panel::after,
  .sx-pack,
  .sx-lap {
    transition: none;
  }
}
