/* HERO por capas · saborinter */
.sbh { --sbh-alto: clamp(520px, 72vh, 720px); position: relative; height: var(--sbh-alto); overflow: hidden; background: #0b3b54; color: #fff; isolation: isolate; }
.sbh-slide { position: absolute; inset: 0; opacity: 0; visibility: hidden; transition: opacity 1s ease, visibility 0s linear 1s; }
.sbh-slide.is-activa { opacity: 1; visibility: visible; transition: opacity 1s ease; z-index: 1; }
.sbh-fondo { position: absolute; inset: 0; overflow: hidden; }
.sbh-fondo img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.12); }
.sbh-slide.is-activa .sbh-fondo img { animation: sbh-kenburns 9s ease-out forwards; }
.sbh-velo { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(0,0,0,.55) 0%, rgba(0,0,0,.28) 55%, rgba(0,0,0,.05) 100%); }
.sbh-contenido { position: relative; z-index: 2; height: 100%; max-width: 1180px; margin: 0 auto; padding: 0 24px 60px; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); align-items: center; gap: 32px; }
.sbh-texto { display: flex; flex-direction: column; align-items: flex-start; gap: 16px; }
.sbh-titulo { margin: 0; font-family: var(--sb-font-titulos, 'Fraunces', Georgia, serif); font-weight: 600; font-size: clamp(2.1rem, 4.3vw, 3.9rem); line-height: 1.04; color: #fff; text-shadow: 0 3px 18px rgba(0,0,0,.4); }
.sbh-linea { display: block; overflow: hidden; padding-bottom: .06em; }
.sbh-etiqueta { background: #F4B223; color: #3a2a00; font-weight: 700; font-size: 14px; letter-spacing: 0; padding: 6px 14px; border-radius: 999px; box-shadow: 0 6px 18px rgba(0,0,0,.25); }
.sbh-sub { margin: 0; max-width: 560px; font-size: clamp(1rem, 1.5vw, 1.3rem); font-weight: 600; text-shadow: 0 2px 10px rgba(0,0,0,.5); }
.sbh-botones { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 8px; }
.sbh-btn { display: inline-block; background: #C1272D; color: #fff !important; font-weight: 700; text-transform: none; letter-spacing: 0; padding: 16px 36px; border-radius: 999px; text-decoration: none; transition: transform .18s, filter .18s; }
.sbh-btn:hover { transform: translateY(-2px); filter: brightness(.9); }
.sbh-btn--linea { background: rgba(255,255,255,.14); border: 2px solid #fff; -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.sbh-producto { display: flex; justify-content: center; align-items: center; }
.sbh-producto img { width: 100%; max-width: 560px; max-height: 440px; object-fit: contain; height: auto; filter: drop-shadow(0 24px 30px rgba(0,0,0,.35)); }

/* Capas: estado inicial y entrada escalonada (--d = orden) */
.sbh-capa { display: inline-block; opacity: 0; transform: translateY(40px); }
.sbh-linea .sbh-capa { transform: translateY(105%); opacity: 1; }
.sbh-producto .sbh-flota { opacity: 0; transform: translateX(80px) rotate(4deg) scale(.92); }
.sbh-slide.is-activa .sbh-capa { animation: sbh-subir .8s cubic-bezier(.2,.8,.2,1) forwards; animation-delay: calc(.25s + var(--d, 0) * .14s); }
.sbh-slide.is-activa .sbh-linea .sbh-capa { animation-name: sbh-linea; animation-duration: .9s; }
.sbh-slide.is-activa .sbh-producto .sbh-flota { animation: sbh-producto 1.1s cubic-bezier(.2,.9,.25,1.15) .55s forwards, sbh-flotar 6s ease-in-out 1.8s infinite; }

@keyframes sbh-kenburns { from { transform: scale(1.12); } to { transform: scale(1); } }
@keyframes sbh-subir { to { opacity: 1; transform: none; } }
@keyframes sbh-linea { from { transform: translateY(105%); } to { transform: none; } }
@keyframes sbh-producto { to { opacity: 1; transform: none; } }
@keyframes sbh-flotar { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }

/* Controles */
.sbh-flecha { position: absolute; top: 50%; z-index: 5; transform: translateY(-50%); width: 48px; height: 48px; border-radius: 50%; border: 0; background: rgba(255,255,255,.9); color: #0b3b54; font-size: 28px; line-height: 1; cursor: pointer; box-shadow: 0 6px 18px rgba(0,0,0,.25); opacity: 0; transition: opacity .25s, transform .2s; }
.sbh:hover .sbh-flecha, .sbh-flecha:focus-visible { opacity: 1; }
.sbh-flecha:hover { transform: translateY(-50%) scale(1.06); }
.sbh-prev { left: 20px; } .sbh-next { right: 20px; }
.sbh-puntos { position: absolute; z-index: 5; left: 50%; bottom: 78px; transform: translateX(-50%); display: flex; gap: 10px; }
.sbh-puntos button { width: 12px; height: 12px; padding: 0; border-radius: 999px; border: 0; background: rgba(255,255,255,.55); cursor: pointer; transition: width .3s, background .3s; }
.sbh-puntos button[aria-selected="true"] { width: 34px; background: #fff; }

/* Sello Grupo Ibermir (como el demo) */
.sbh-ibermir { position: absolute; z-index: 6; right: 24px; bottom: 74px; display: inline-flex; align-items: center; gap: 10px; padding: 8px 15px; border-radius: 999px; background: rgba(15,15,15,.34); -webkit-backdrop-filter: blur(5px); backdrop-filter: blur(5px); color: #fff !important; text-decoration: none; font-size: 13px; font-weight: 600; opacity: .94; transition: .18s; }
.sbh-ibermir:hover { background: rgba(15,15,15,.52); opacity: 1; transform: translateY(-1px); }
.sbh-ibermir img { height: 34px; width: auto; filter: drop-shadow(0 0 1.5px #fff) drop-shadow(0 0 1.5px #fff) drop-shadow(0 0 1px #fff); }
.sbh-ibermir span { white-space: nowrap; text-shadow: 0 1px 3px rgba(0,0,0,.55); }

/* Onda inferior */
.sbh-onda { position: absolute; z-index: 4; left: 0; right: 0; bottom: -1px; height: 70px; pointer-events: none;
  background-color: #0b3b54; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 90' preserveAspectRatio='none'%3E%3Cpath d='M0,60 C240,10 480,10 720,45 C960,80 1200,85 1440,40 L1440,90 L0,90 Z'/%3E%3C/svg%3E") 0 0 / 100% 100% no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 90' preserveAspectRatio='none'%3E%3Cpath d='M0,60 C240,10 480,10 720,45 C960,80 1200,85 1440,40 L1440,90 L0,90 Z'/%3E%3C/svg%3E") 0 0 / 100% 100% no-repeat; }
/* misma trama (fija a la ventana) que la sección azul de debajo, para que la onda y la sección sean continuas */
.sbh-onda::before { content: ""; position: absolute; inset: 0; background: url("trama-clara.svg") repeat fixed 0 0 / 220px 220px; opacity: .07; }

@media (max-width: 900px) {
  .sbh { --sbh-alto: auto; min-height: 640px; height: auto; }
  .sbh-slide { position: absolute; }
  .sbh-slide.is-activa { position: relative; }
  .sbh-contenido { grid-template-columns: 1fr; padding: 70px 20px 130px; gap: 18px; align-content: center; min-height: 640px; }
  .sbh-producto { order: -1; }
  .sbh-producto img { max-width: 320px; }
  .sbh-velo { background: linear-gradient(180deg, rgba(0,0,0,.25), rgba(0,0,0,.6)); }
  .sbh-flecha { display: none; }
  .sbh-puntos { bottom: 64px; }
  .sbh-ibermir { right: 14px; bottom: 58px; padding: 6px 11px; gap: 7px; font-size: 11px; }
  .sbh-ibermir img { height: 26px; }
  .sbh-onda { height: 40px; }
}
@media (prefers-reduced-motion: reduce) {
  .sbh-slide, .sbh-slide.is-activa { transition: none; }
  .sbh-capa, .sbh-linea .sbh-capa, .sbh-producto .sbh-flota { opacity: 1 !important; transform: none !important; animation: none !important; }
  .sbh-fondo img { animation: none !important; transform: none; }
}

/* v0.5.2 · fondo de color de marca (diapositivas sin foto, p. ej. Novedad): degradado + trama + foco de luz tras el producto */
.sbh-fondo--color { --c1: #8a2027; --c2: #4a1014; --c3: #2a0a0c; background: radial-gradient(120% 100% at 78% 45%, var(--c1) 0%, var(--c2) 55%, var(--c3) 100%); }
.sbh-color--azul .sbh-fondo--color { --c1: #1d6a90; --c2: #0b3b54; --c3: #072638; }
.sbh-color--verde .sbh-fondo--color { --c1: #2f7d3a; --c2: #17462a; --c3: #0d2a19; }
.sbh-color--oro .sbh-fondo--color { --c1: #e0a21b; --c2: #a86a0b; --c3: #6b3f05; }
.sbh-fondo--color::before { content: ""; position: absolute; inset: 0; background: url("trama-clara.svg") repeat; background-size: 220px 220px; opacity: .08; }
.sbh-luz { position: absolute; width: 760px; height: 760px; right: -2%; top: 50%; transform: translateY(-50%); border-radius: 50%; background: radial-gradient(circle, rgba(255,214,150,.38) 0%, rgba(255,214,150,.12) 38%, rgba(255,214,150,0) 68%); }
.sbh-fondo--color i { position: absolute; border-radius: 50%; border: 2px solid rgba(255,255,255,.16); }
.sbh-fondo--color i:nth-child(2) { width: 120px; height: 120px; left: 5%; top: 14%; background: rgba(244,178,35,.18); border: 0; }
.sbh-fondo--color i:nth-child(3) { width: 420px; height: 420px; right: 9%; top: 50%; transform: translateY(-50%); }
.sbh-fondo--color i:nth-child(4) { width: 70px; height: 70px; left: 46%; bottom: 20%; background: rgba(255,255,255,.10); border: 0; }
.sbh-slide.is-activa .sbh-luz { animation: sbh-latido 7s ease-in-out infinite alternate; }
.sbh-slide.is-activa .sbh-fondo--color i:nth-child(2), .sbh-slide.is-activa .sbh-fondo--color i:nth-child(4) { animation: sbh-burbuja 8s ease-in-out infinite alternate; }
.sbh-slide--color .sbh-velo { display: none; }
@keyframes sbh-burbuja { to { transform: translate(18px, -14px); } }
@keyframes sbh-latido { from { transform: translateY(-50%) scale(1); } to { transform: translateY(-50%) scale(1.08); } }
@media (max-width: 900px) { .sbh-luz { width: 460px; height: 460px; top: 26%; right: -20%; } .sbh-fondo--color i:nth-child(3) { width: 260px; height: 260px; top: 26%; right: 4%; } }

/* Diapositiva con vídeo de fondo: el vídeo ya trae sus propios textos ("Llegó el momento…", logo final),
   así que el titular se oculta a la vista (sigue para Google y lectores de pantalla) y no hay velo */
.sbh-fondo--video video { width: 100%; height: 100%; object-fit: cover; display: block; background: #0b3b54; }
.sbh-slide--video .sbh-velo { display: none; }
.sbh-slide--video .sbh-texto { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
/* Botón de sonido del vídeo (24-10-2026) */
.sbh-sonido { position: absolute; left: 24px; bottom: 24px; z-index: 6; display: inline-flex; align-items: center; gap: 8px; padding: 9px 16px 9px 12px; border: 0; border-radius: 999px; background: rgba(11,59,84,.78); color: #fff; font: inherit; font-size: 14px; font-weight: 700; cursor: pointer; backdrop-filter: blur(6px); box-shadow: 0 6px 18px rgba(0,0,0,.25); transition: background .2s, transform .2s; }
.sbh-sonido:hover { background: #C1272D; transform: scale(1.04); }
.sbh-sonido:focus-visible { outline: 3px solid #F4B223; outline-offset: 2px; }
.sbh-sonido svg { width: 22px; height: 22px; }
.sbh-sonido .sbh-on, .sbh-sonido[aria-pressed="true"] .sbh-off { display: none; }
.sbh-sonido[aria-pressed="true"] .sbh-on { display: inline; }
@media (max-width: 767px) { .sbh-sonido { left: 14px; bottom: 14px; padding: 8px; } .sbh-sonido span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); } }

/* Móvil (11-11-2026): el vídeo se ve COMPLETO (sin recortar) sobre su portada difuminada, y los botones del hero
   suben arriba para no chocar con los flotantes de abajo (carrito, correo, WhatsApp) */
@media (max-width: 767px) {
  .sbh-fondo--video { background: #0b3b54; }
  .sbh-fondo--video::before { content: ""; position: absolute; inset: -40px; background: var(--sbh-poster, none) center / cover no-repeat; filter: blur(22px) brightness(.55); }
  .sbh-fondo--video video { position: relative; z-index: 1; object-fit: contain; background: transparent; }
  .sbh-sonido { top: 14px; bottom: auto; }
  .sbh-ibermir { top: 14px; bottom: auto; right: 14px; }
}
