/* /carrusel — pantalla del televisor de la tienda.
   Banner de arriba negro y verde; zona de productos en BLANCO con la foto tal cual.
   Pensada para el televisor en VERTICAL (1080×1920); en horizontal la foto va a la izquierda.
   Sin "gap" en flex, aspect-ratio ni clamp(): los navegadores de algunos Smart TV son viejos. */

html, body { margin: 0; padding: 0; height: 100%; }
body.cr {
  background: #0b0f0c; color: #fff; overflow: hidden;
  font-family: 'Inter', 'SamsungOne', 'Segoe UI', Roboto, Arial, sans-serif;
  display: flex; flex-direction: column;
  -webkit-font-smoothing: antialiased;
}
body.cr:not(.cr--controles) { cursor: none; }

/* ── Banner de arriba: logo + QR ── */
.cr-top {
  flex: none; position: relative; height: 15vh; box-sizing: border-box;
  display: flex; align-items: center; padding: 0 4vw;
  background: linear-gradient(90deg, #000 0%, #0f1f0c 55%, #173d10 100%);
  border-bottom: .5vmin solid #39B820;
}
.cr-logo { height: 11vh; width: 11vh; border-radius: 50%; margin-right: 3vw; flex: none; }
.cr-brand { min-width: 0; flex: 1 1 auto; overflow: hidden; }
.cr-brand h1 { margin: 0; font-size: 5.4vmin; font-weight: 800; letter-spacing: .3vmin; line-height: 1.05; }
.cr-brand h1 b { color: #6be03f; }
.cr-brand h1 span { display: block; font-size: .62em; letter-spacing: 1vmin; color: #6be03f; font-weight: 700; }
.cr-brand p { margin: .8vmin 0 0; font-size: 2.6vmin; color: #cfd8cc; }
.cr-qr { margin-left: auto; display: flex; align-items: center; flex: none; }
.cr-qr__txt { text-align: right; margin-right: 2vmin; }
.cr-qr__txt strong { display: block; font-size: 3.6vmin; line-height: 1.1; color: #6be03f; }
.cr-qr__txt span { display: block; margin-top: .6vmin; font-size: 2.1vmin; color: #e8eee6; }
.cr-qr__code { background: #fff; padding: 1vmin; border-radius: 1.2vmin; width: 12.5vh; height: 12.5vh; box-sizing: border-box; }
.cr-qr__code svg { display: block; width: 100%; height: 100%; }

/* Luces navideñas bajo el banner (solo con Admin → CMS → Navidad encendido) */
.cr-luces { position: absolute; left: 0; right: 0; bottom: -1.2vmin; display: flex; justify-content: space-around; pointer-events: none; }
.cr-luces i { display: block; width: 1.2vmin; height: 1.8vmin; border-radius: 50%; background: #e33; box-shadow: 0 0 1.4vmin #e33; animation: cr-titila 1.6s infinite alternate; }
.cr-luces i:nth-child(3n+2) { background: #ffd23f; box-shadow: 0 0 1.4vmin #ffd23f; animation-delay: .5s; }
.cr-luces i:nth-child(3n) { background: #39B820; box-shadow: 0 0 1.4vmin #39B820; animation-delay: 1s; }
@keyframes cr-titila { from { opacity: 1; } to { opacity: .35; } }

/* ── Escenario: un producto a la vez, el siguiente sube desde abajo ── */
.cr-stage { flex: 1; position: relative; overflow: hidden; background: #fff; color: #111; }
.cr-aviso { position: absolute; top: 40%; left: 0; right: 0; text-align: center; font-size: 4vmin; color: #555; margin: 0; padding: 0 6vw; }
.cr-item {
  position: absolute; top: 0; left: 0; right: 0; bottom: 0; box-sizing: border-box;
  padding: 1.5vmin 3vw 2.5vmin; display: flex; background: #fff;
  -webkit-transform: translateY(105%); transform: translateY(105%);
  transition: -webkit-transform 1.1s cubic-bezier(.65, 0, .35, 1); transition: transform 1.1s cubic-bezier(.65, 0, .35, 1);
}
.cr-item.is-actual { -webkit-transform: translateY(0); transform: translateY(0); }
.cr-item.is-sale { -webkit-transform: translateY(-105%); transform: translateY(-105%); }

.cr-card {
  flex: 1; display: flex; flex-direction: column; overflow: hidden; background: #fff;
}
.cr-foto { position: relative; flex: 1 1 auto; min-height: 0; background: #fff; overflow: hidden; }
.cr-foto img.cr-img {
  position: absolute; top: 1%; left: 0; width: 100%; height: 86%;
  object-fit: contain; opacity: 0; transition: opacity .9s ease;
}
.cr-foto.sin-miniaturas img.cr-img { height: 98%; }
.cr-foto img.cr-img.on { opacity: 1; }
.cr-bar { position: absolute; top: 0; left: 0; height: .6vmin; width: 0; background: #39B820; border-radius: 99px; }
.cr-cont { position: absolute; top: 2vmin; right: 2vmin; background: rgba(0, 0, 0, .65); color: #fff; font-size: 2.2vmin; padding: .6vmin 1.8vmin; border-radius: 99px; }
.cr-thumbs { position: absolute; bottom: 2vmin; left: 0; right: 0; text-align: center; font-size: 0; }
.cr-thumbs img {
  width: 8vmin; height: 8vmin; object-fit: cover; margin: 0 .8vmin; border-radius: 1.2vmin;
  border: .5vmin solid #e2e2e2; opacity: .6; box-sizing: border-box; transition: opacity .4s, border-color .4s;
}
.cr-thumbs img.on { border-color: #39B820; opacity: 1; }

.cr-info { flex: none; padding: 2vmin 2vmin 1vmin; border-top: .2vmin solid #eee; }
.cr-badge { display: inline-block; color: #fff; background: #e0177a; font-weight: 800; font-size: 3.6vmin; padding: .8vmin 2.4vmin; border-radius: 99px; margin-bottom: 1.6vmin; }
.cr-marca { font-size: 2.8vmin; color: #2e8b1a; font-weight: 600; letter-spacing: .4vmin; text-transform: uppercase; }
.cr-nombre {
  font-size: 5.4vmin; font-weight: 700; line-height: 1.12; margin: .8vmin 0 2vmin; color: #111;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.cr-precios { line-height: 1; }
.cr-antes { display: block; font-size: 3.8vmin; color: #888; text-decoration: line-through; margin-bottom: .8vmin; }
.cr-precio { font-size: 10.5vmin; font-weight: 800; color: #22a114; letter-spacing: -.2vmin; }
.cr-cta { margin-top: 2.2vmin; font-size: 2.8vmin; color: #555; }
.cr-cta b { color: #111; }

/* Televisor vertical: banner más compacto para que quepan logo, marca y QR a lo ancho */
@media (orientation: portrait) {
  .cr-logo { height: 8.5vh; width: 8.5vh; margin-right: 2.5vw; }
  .cr-brand h1 { font-size: 4.8vmin; }
  .cr-brand p { font-size: 2.3vmin; }
  .cr-qr__txt strong { font-size: 3.2vmin; }
  .cr-qr__txt span { font-size: 1.9vmin; }
  .cr-qr__code { width: 12vh; height: 12vh; }
}

/* Televisor horizontal: foto a la izquierda, datos a la derecha */
@media (orientation: landscape) {
  .cr-top { height: 17vh; }
  .cr-logo { height: 13vh; width: 13vh; }
  .cr-qr__code { width: 14.5vh; height: 14.5vh; }
  .cr-card { flex-direction: row; }
  .cr-foto { flex: 0 0 58%; }
  .cr-info { flex: 1; display: flex; flex-direction: column; justify-content: center; padding: 4vmin 5vmin; border-top: 0; border-left: .2vmin solid #eee; }
  .cr-badge { -ms-flex-item-align: start; align-self: flex-start; }
  .cr-nombre { -webkit-line-clamp: 4; }
}

/* ── Controles: barra fija y delgada al final de la pantalla, FUERA de la zona del producto
   (el producto se acomoda encima, así el precio nunca queda tapado). ── */
.cr-controles {
  flex: none; display: flex; align-items: center; justify-content: center; white-space: nowrap;
  background: #000; border-top: .3vmin solid #39B820; padding: .6vmin 2vmin; font-size: 1.5vmin; color: #cfd8cc;
}
.cr-controles label { margin-right: 1vmin; }
.cr-controles select, .cr-controles button {
  font: inherit; font-size: 1.5vmin; padding: .3vmin 1vmin; border-radius: .6vmin;
  border: .2vmin solid #39B820; background: #111; color: #fff;
}
.cr-controles select { max-width: 45vw; }
.cr-controles button { margin-left: 1.2vmin; background: #39B820; font-weight: 700; }
.cr-controles select:focus, .cr-controles button:focus { outline: .4vmin solid #ffd23f; outline-offset: .2vmin; }

/* Black Days (Admin → CMS → Black Days): insignia «BLACK DAYS» grande que late y brilla + aviso del descuento pasando.
   Solo se animan transform y opacity (capas aparte, las mueve la tarjeta de video): fluido también en el navegador
   del televisor. El brillo es suave (1,2 s por ciclo, sin destellos bruscos); con «reducir movimiento» queda quieto. */
.cr-bd { flex: none; position: relative; display: flex; align-items: stretch; background: #0A0A0A; overflow: hidden; border-top: .6vmin solid #FFC72C; border-bottom: .6vmin solid #FFC72C; }
.cr-bd::after { content: ''; position: absolute; inset: -.6vmin 0; border-top: .6vmin solid #fff; border-bottom: .6vmin solid #fff; opacity: 0; pointer-events: none; z-index: 2; will-change: opacity; animation: cr-bd-fade 1.2s ease-in-out infinite alternate; }
.cr-bd__badge { flex: none; position: relative; isolation: isolate; display: flex; align-items: center; gap: 1.2vmin; padding: 1.2vmin 2.6vmin; background: #FFC72C; color: #0A0A0A; font-weight: 900; z-index: 1; box-shadow: 1.5vmin 0 3vmin rgba(0,0,0,.6); will-change: transform; animation: cr-bd-late 1.2s ease-in-out infinite alternate; }
.cr-bd__badge::before { content: ''; position: absolute; inset: 0; background: #FFF1B8; box-shadow: 0 0 4vmin 1vmin rgba(255,199,44,.9); opacity: 0; z-index: -1; will-change: opacity; animation: cr-bd-fade 1.2s ease-in-out infinite alternate; }
.cr-bd__badge span { font-size: 5.6vmin; line-height: .92; letter-spacing: .3vmin; text-align: center; }
.cr-bd__badge b { font-size: 4.4vmin; will-change: opacity; animation: cr-bd-rayo .6s ease-in-out infinite alternate; }
.cr-bd__marquee { flex: 1; min-width: 0; overflow: hidden; display: flex; align-items: center; white-space: nowrap; }
.cr-bd__track { display: inline-flex; align-items: center; gap: 3vmin; padding-left: 3vmin; font-weight: 900; will-change: transform; animation: cr-bd-correr 34s linear infinite; }
.cr-bd__big { position: relative; color: #FFC72C; font-size: 5vmin; letter-spacing: .2vmin; text-shadow: 0 0 1.2vmin rgba(255,199,44,.45); }
.cr-bd__big::after { content: attr(data-t); position: absolute; left: 0; top: 0; color: #fff; text-shadow: 0 0 2.5vmin rgba(255,199,44,.95); opacity: 0; will-change: opacity; animation: cr-bd-fade 1.2s ease-in-out infinite alternate; }
.cr-bd__track b { color: #FFC72C; font-size: 4vmin; }
.cr-bd__sm { color: #fff; font-weight: 800; font-size: 3.6vmin; }
@keyframes cr-bd-correr { from { transform: translate3d(0, 0, 0); } to { transform: translate3d(-50%, 0, 0); } }
@keyframes cr-bd-late { from { transform: scale(1); } to { transform: scale(1.06); } }
@keyframes cr-bd-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes cr-bd-rayo { from { opacity: 1; } to { opacity: .3; } }
@media (prefers-reduced-motion: reduce) {
  .cr-bd::after, .cr-bd__badge, .cr-bd__badge::before, .cr-bd__badge b, .cr-bd__track, .cr-bd__big::after { animation: none; }
}
