/* Carrusel de banners del home: ancho completo + degradado inferior. */
.em-carousel-container {
  --em-fade-height: 45%;      /* Qué tanto del banner se desvanece a transparente */
  --em-dots-bottom: 22%;      /* Altura de los dots desde abajo del banner */
}

/* Ancho completo: rompe el contenedor del tema y ocupa toda la pantalla */
.em-carousel-container {
  position: relative;
  width: 100vw;
  max-width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  overflow: hidden;
  background: transparent;
}

.em-carousel {
  display: flex;
  transition: transform 0.3s ease;
  will-change: transform;
}

.em-slide {
  min-width: 100%;
  box-sizing: border-box;
}

.em-slide a {
  display: block;
}

/* Imagen 1920x500, sin bordes redondeados */
.em-slide img {
  width: 100%;
  height: auto;
  aspect-ratio: 1920 / 500;
  object-fit: cover;
  display: block;
  border-radius: 0;

  /* La parte inferior de la imagen se vuelve transparente */
  -webkit-mask-image: linear-gradient(
    to bottom,
    #000 calc(100% - var(--em-fade-height)),
    transparent 100%
  );
  mask-image: linear-gradient(
    to bottom,
    #000 calc(100% - var(--em-fade-height)),
    transparent 100%
  );
}

/* Capa del degradado (no bloquea clics) */
.em-carousel-fade {
  position: absolute;
  inset: auto 0 0 0;
  height: var(--em-fade-height);
  pointer-events: none;
}

/* Botones de navegación */
.em-carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background-color: rgba(0, 0, 0, 0.5);
  color: white;
  border: none;
  cursor: pointer;
  padding: 15px;
  font-size: 18px;
  border-radius: 50%;
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 55;
  transition: background-color 0.2s;
}

.em-carousel-btn:hover {
  background-color: rgba(0, 0, 0, 0.8);
}

.em-carousel-btn:focus-visible {
  outline: 3px solid #fff;
  outline-offset: 2px;
}

.em-prev { left: 20px; }
.em-next { right: 20px; }

/* Dots dentro del banner, sobre el degradado */
.em-carousel-dots {
  position: absolute;
  left: 0;
  right: 0;
  bottom: var(--em-dots-bottom);
  display: flex;
  justify-content: center;
  z-index: 3;
}

.em-dot {
  cursor: pointer;
  height: 8px;
  width: 8px;
  margin: 0 4px;
  background-color: rgba(0, 0, 0, 0.25);
  border-radius: 50%;
  display: inline-block;
  transition: background-color 0.2s;
  border: none;
  padding: 0;
}

.em-dot.active,
.em-dot:hover {
  background-color: rgba(0, 0, 0, 0.7);
}

/* Opcional: pon esta clase en la sección que va debajo para que "monte" sobre el degradado como en Mercado Libre */
.em-overlap {
  position: relative;
  z-index: 5;
  margin-top: -120px;
}

@media screen and (max-width: 768px) {
  .em-carousel-container {
    --em-fade-height: 35%;
    --em-dots-bottom: 18%;
  }

  .em-carousel-btn {
    padding: 10px;
    font-size: 14px;
    width: 36px;
    height: 36px;
  }

  .em-prev { left: 10px; }
  .em-next { right: 10px; }

  .em-overlap { margin-top: -30px; }
}

@media (prefers-reduced-motion: reduce) {
  .em-carousel { transition: none; }
}
