.hero {
  position: relative;
  /* El hero no debe estar atado a 90vh si quieres control por px */
  overflow: visible; /* permite que los relés sobresalgan */
}

/* Fondo con altura máxima 600px */
.hero__background {
  position: absolute;
  inset: 0;
  width: 100%;
  height: min(90vh, 600px); /* ✅ máximo 600px */
  z-index: 0;
}

.hero__background-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center; /* ajusta según altura del header */
}

/* Overlay debe cubrir el mismo alto que el fondo */
.hero__overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: min(90vh, 600px);
  z-index: 1;
  /* Si tu overlay tiene estilos, mantenlos aquí */
  /* background: rgba(0,0,0,0.25); */
}

/* Contenedor “real” del hero: igual al alto del fondo,
   pero con padding bottom para dejar espacio a la parte que sobresale */
.hero .container {
  position: relative;
  z-index: 2;
}

.hero__content {
  position: relative;
  height: min(90vh, 600px); /* ✅ coincide con el fondo */
  color: #fff;

  /* Reserva espacio para el solape de los relés */
  padding-bottom: 120px; /* ajusta según tamaño de relés */
}

/* TEXTO */
.hero__text-container {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  height: 100%;
}

.hero__text-content {
  text-align: left;
  margin-top: 100px;
}

/* TITULOS */
.hero__title {
  font-size: 70px;
  font-weight: bold;
  margin: 0;
}

.hero__subtitle {
  font-size: 24px;
}

/* BADGES */
.hero__badges {
  display: flex;
  gap: 10px;
  margin-top: 10px;
}

.hero__badge-item {
  height: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 5px 10px;
  border-radius: 5px;
}

.hero__badge-item img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.hero__badge-item--garantia img {
  transform: scale(1.15);
  transform-origin: center;
}

/* RELÉS: anclados al final del fondo y sobresaliendo */
.hero__products {
  position: absolute;
  left: 0;
  right: 0;

  bottom: 0; /* ✅ pegados al final del fondo */
  transform: translateY(50%); /* ✅ mitad dentro / mitad fuera */

  display: flex;
  justify-content: space-between;
  align-items: flex-end;

  gap: 24px;
  padding: 0 10px;

  z-index: 3;
  pointer-events: none; /* opcional: evita que “molesten” */
}

.hero__product-img {
  width: clamp(120px, 16vw, 240px);
  height: auto;
  max-width: 20%;
  object-fit: contain;
}

/* --- MOBILE --- */
@media (max-width: 768px) {
  .hero__content {
    height: min(90vh, 600px);
    padding-bottom: 90px; /* menos reserva en móvil */
  }

  .hero__text-container {
    justify-content: center;
    text-align: center;
  }

  .hero__text-content {
    margin-top: 80px;
    text-align: center;
  }

  .hero__title {
    font-size: clamp(36px, 10vw, 52px);
    line-height: 1.05;
  }

  .hero__subtitle {
    font-size: clamp(16px, 4.5vw, 20px);
    margin-left: auto;
    margin-right: auto;
  }

  .hero__badges {
    justify-content: center;
    flex-wrap: wrap;
  }

  /* En móvil: mantenemos anclaje abajo y permitimos scroll horizontal */
  .hero__products {
    bottom: 0;
    transform: translateY(45%);

    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;

    justify-content: flex-start;
    flex-wrap: nowrap;
    gap: 14px;
    padding: 12px 10px;

    scroll-snap-type: x mandatory;
    pointer-events: auto; /* para poder hacer scroll */
  }

  .hero__product-img {
    flex: 0 0 auto;
    width: 140px;
    max-width: none;
    height: auto;
    scroll-snap-align: start;
  }

  .hero__products::-webkit-scrollbar {
    height: 0;
  }
}
