@import url("/css/components.css");

/* ===== Banner "zona de prueba" ===== */
.test-banner {
  background: oklch(90% 0.1 55);
  padding: 6px 24px;
  text-align: center;
  font: 700 12px var(--font-body);
  letter-spacing: .05em;
  text-transform: uppercase;
  color: oklch(30% 0.1 55);
}

/* Reutiliza el mismo hero de Home (ver css/pages/home.css: .hero, .hero-bg, .hero-scrim, .hero-content, .hero-badge, .hero-title, .hero-body) */

/* ===== Franja "Alimentos esenciales" ===== */
.test-alimentos {
  min-height: 140px;
  background: oklch(97% 0.008 85);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  padding: 32px 24px 40px;
}
.test-alimentos-logo { height: 30px; width: auto; display: block; background: oklch(97% 0.008 85); }
.test-alimentos-heading {
  font: 400 clamp(18px, 3vw, 24px) var(--font-display);
  margin: 0;
  color: var(--color-green-bright);
  text-align: center;
  line-height: 1.1;
}
.test-alimentos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 24px;
  max-width: 1000px;
  width: 100%;
  margin-top: 26px;
}
.test-alimentos-grid img {
  height: auto;
  display: block;
  margin: 0 auto;
  cursor: pointer;
  transition: transform .25s ease;
}
.test-alimentos-grid img:hover { transform: scale(1.1); }
.test-alimentos-grid img.title-barras { width: 68%; }
.test-alimentos-grid img.title-proteina { width: 58%; }
.test-alimentos-grid img.title-creatina { width: 68%; }

/* ===== Sección Barras de proteína (la más compleja) ===== */
.test-bar-section {
  position: relative;
  overflow: hidden;
  background: linear-gradient(180deg, oklch(97% 0.02 142), oklch(99% 0.006 140));
  padding: 64px 40px;
}
@media (max-width: 759px) {
  .test-bar-section { padding: 40px 20px; }
}

.test-bg-layer {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity .6s ease;
}
.test-bg-layer.active { opacity: 1; }
.test-bg--default { background: linear-gradient(180deg, oklch(97% 0.02 142), oklch(99% 0.006 140)); }
.test-bg--brownie { background: linear-gradient(90deg, rgba(20,10,6,.6), rgba(20,10,6,.2)), url("/assets/prueba/bg-brownie.png") center / cover no-repeat; }
.test-bg--frutosrojos { background: linear-gradient(90deg, rgba(255,255,255,.55), rgba(255,255,255,.15)), url("/assets/prueba/bg-frutosrojos.png") center / cover no-repeat; }
.test-bg--lechecoco { background: linear-gradient(90deg, rgba(60,40,20,.55), rgba(60,40,20,.2)), url("/assets/prueba/bg-lechecoco.png") center / cover no-repeat; }
.test-bg--tartaqueso { background: linear-gradient(90deg, rgba(179,18,42,.5), rgba(179,18,42,.15)), url("/assets/prueba/bg-tartaqueso.png") center / cover no-repeat; }

.test-bar-inner { max-width: 1120px; margin: 0 auto; position: relative; z-index: 1; }
.test-bar-eyebrow {
  font: 700 12px var(--font-body);
  letter-spacing: .08em;
  text-transform: uppercase;
  color: oklch(55% 0.14 55);
  transition: color .4s;
  display: block;
}
.test-bar-eyebrow.on-dark { color: #fff; }

.test-bar-heading {
  font: 400 clamp(28px, 5vw, 40px) var(--font-display);
  margin: 10px 0 40px;
  transition: color .6s ease;
}
.test-bar-heading--brownie { color: #fff; }
.test-bar-heading--frutosrojos { color: #D6006D; }
.test-bar-heading--lechecoco { color: #6B4423; }
.test-bar-heading--tartaqueso { color: #F5EAD0; }

.test-bar-stack {
  display: grid;
  grid-template-columns: 300px auto;
  gap: 0;
  align-items: center;
  width: fit-content;
  margin: 0 auto;
}
@media (max-width: 759px) {
  .test-bar-stack { grid-template-columns: 1fr; }
}

/* Pila de imágenes de barra (crossfade) */
.test-bar-imgstack {
  position: relative;
  width: 364px;
  height: 468px;
  margin-top: -35px;
  z-index: 2;
  pointer-events: none;
}
@media (max-width: 759px) {
  .test-bar-imgstack { width: 187px; height: 229px; margin-top: -50px; margin-left: auto; margin-right: auto; }
}

.test-bar-layer {
  position: absolute;
  top: 50%;
  left: 0;
  width: 100%;
  margin-left: 90px;
  transform: translateY(-50%);
  opacity: 0;
  transition: opacity .6s ease;
  z-index: 1;
}
.test-bar-layer.active { opacity: 1; z-index: 2; }
@media (max-width: 759px) {
  .test-bar-layer { margin-left: 0; }
}

.test-bar-float { animation: barFloat 4s ease-in-out infinite; }
.test-bar-rotate { }
@media (max-width: 759px) {
  .test-bar-rotate { transform: rotate(-80deg); }
}
.test-bar-img {
  display: block;
  width: 100%;
  pointer-events: none;
  filter: drop-shadow(0 24px 30px rgba(0,0,0,.2));
}

/* Tiras de sabor (botones) */
.test-bar-buttons {
  display: flex;
  flex-direction: column;
  gap: 28px;
  margin-left: -40px;
  margin-top: -90px;
  position: relative;
  z-index: 1;
}
@media (max-width: 759px) {
  .test-bar-buttons {
    align-items: center;
    gap: 6px;
    margin: 0;
    margin-top: -55px;
  }
}

.flavor-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 400px;
  padding: 10.5px 10px;
  min-height: 56px;
  border: none;
  border-radius: var(--radius-panel);
  cursor: pointer;
  transition: transform .15s, opacity .15s, filter .15s;
  opacity: .72;
  filter: grayscale(.15);
  transform: scale(1);
  box-shadow: 0 4px 10px rgba(0,0,0,.1);
}
@media (max-width: 759px) {
  .flavor-btn { width: 340px; padding: 6.25px 8.5px; min-height: 33px; margin: 0 auto; }
}
.flavor-btn.active { opacity: 1; filter: none; transform: scale(1.03); box-shadow: var(--shadow-flavor-active); }
.flavor-btn:hover { transform: scale(1.08) translateY(-4px); filter: brightness(1.1); box-shadow: var(--shadow-flavor-hover); }

.flavor-btn--brownie { background: #8B5A2B; }
.flavor-btn--frutosrojos { background: #D6006D; }
.flavor-btn--lechecoco { background: #C9A66B; }
.flavor-btn--tartaqueso { background: #B3122A; }
@media (min-width: 760px) {
  .flavor-btn--brownie { margin-left: -24px; }
  .flavor-btn--frutosrojos { margin-left: -4px; }
  .flavor-btn--lechecoco { margin-left: 16px; }
  .flavor-btn--tartaqueso { margin-left: 36px; }
}

.flavor-label {
  font: 400 16.13px var(--font-display);
  color: #fff;
  text-transform: uppercase;
  letter-spacing: .02em;
  text-align: center;
}
@media (max-width: 759px) {
  .flavor-label { font-size: 11.29px; }
}

/* ===== Secciones simples (Proteína / Creatina en la página Prueba) ===== */
.test-simple-section { padding: 80px 40px; }
@media (max-width: 759px) {
  .test-simple-section { padding: 56px 24px; }
}
.test-simple-section--proteina { background: oklch(97% 0.015 55); }
.test-simple-section--creatina { background: oklch(97% 0.02 142); }

.test-simple-grid {
  max-width: 1120px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 48px;
  align-items: center;
}
.test-simple-eyebrow { font: 700 12px var(--font-body); letter-spacing: .08em; text-transform: uppercase; color: oklch(55% 0.14 55); }
.test-simple-heading { font: 400 clamp(28px, 5vw, 40px) var(--font-display); margin: 10px 0 16px; color: oklch(14% 0 0); }
.test-simple-desc { font: 15px/1.7 var(--font-body); color: oklch(38% 0.01 140); margin: 0 0 20px; max-width: 480px; }

.test-chip-row { display: flex; flex-wrap: wrap; gap: 8px; }
.test-chip { background: #fff; color: oklch(30% 0.01 140); font: 600 13px var(--font-body); padding: 7px 14px; border-radius: var(--radius-pill); border: 1px solid; }
.test-chip--orange { border-color: oklch(88% 0.02 55); }
.test-chip--green { border-color: oklch(88% 0.02 142); }

.test-simple-img { height: 220px; border-radius: var(--radius-hero); overflow: hidden; }
.test-simple-img img { width: 100%; height: 100%; object-fit: cover; }
