/* ==========================================================================
   Hero carousel (.x-hero) — Banco Falabella Perú clone
   All rules scoped under .x-hero.
   ========================================================================== */

.x-hero {
  background: var(--white);
  padding: 32px 96px;
  position: relative;
}

.x-hero__wrapper {
  max-width: var(--container-section); /* 1352px */
  margin: 0 auto;
  position: relative;
}

.x-hero__viewport {
  overflow: hidden;
  height: 462px;
  position: relative;
}

.x-hero__track {
  display: flex;
  gap: 32px;
  align-items: stretch;
  padding: 0 0 2px;
  height: 462px;
  transition: transform .45s ease;
  will-change: transform;
}

.x-hero__slide {
  flex: 0 0 100%;
  width: 100%;
  height: 460px;
  position: relative;
  border-radius: var(--r-panel); /* 24px card inner */
  overflow: hidden;
  box-shadow: var(--shadow-card-dark);
}

.x-hero__picture {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border-radius: var(--r-panel);
}

.x-hero__picture img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--r-panel);
}

.x-hero__content {
  position: absolute;
  left: 0;
  top: 0;
  height: 460px;
  width: 50%;
  max-width: 50%;
  background: var(--hero-scrim); /* rgba(0,0,0,.35) */
  border-radius: var(--r-card);  /* 16px */
  padding: 85px 64px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  z-index: 1;
}

.x-hero__title {
  font-size: var(--fs-hero); /* 40px */
  font-weight: var(--fw-medium);
  line-height: 56px;
  letter-spacing: -0.8px;
  color: var(--white);
  margin: 0 0 8px;
}

.x-hero__sub {
  font-size: 22px;
  font-weight: var(--fw-medium);
  line-height: 33px;
  letter-spacing: -0.22px;
  color: var(--white);
  margin: 0 0 24px;
}

.x-hero__cta {
  align-self: flex-start;
  text-transform: uppercase;
}

.x-hero__arrow {
  position: absolute;
  top: 211px;
  width: 40px;
  height: 40px;
  z-index: var(--z-arrows); /* 97 */
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}

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

.x-hero__arrow img {
  width: 40px;
  height: 40px;
}

.x-hero__dots {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 20px 0 10px;
  height: 6px;
}

.x-hero__dot {
  width: 6px;
  height: 6px;
  border-radius: var(--r-dot); /* 15px */
  background: transparent;
  border: 0;
  padding: 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color .3s .3s, width .3s;
}

/* The visible inactive dot is a pale-lime ::after (exact live-site pattern) */
.x-hero__dot::after {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: var(--r-dot);
  background: var(--lime-pale); /* #E9F0C8 */
  transition: background-color .3s;
}

.x-hero__dot + .x-hero__dot {
  margin-left: 8px;
}

.x-hero__dot.is-active {
  width: 24px;
  background: var(--lime); /* #BDD004 */
  transition: background-color .3s, width .3s;
}

.x-hero__dot.is-active::after {
  display: none;
}

/* --- Tablet: section padding --- */
@media (max-width: 1023px) {
  .x-hero {
    padding: 32px 0;
  }
}

/* --- Mobile layout --- */
@media (max-width: 767px) {
  .x-hero__viewport {
    padding: 0 24px;
    height: 502px;
  }

  .x-hero__track {
    gap: 16px;
    height: 502px;
  }

  .x-hero__slide {
    height: 500px;
  }

  .x-hero__content {
    inset: 0;
    width: 100%;
    max-width: 100%;
    height: auto;
    padding: 24px;
    justify-content: center;
    border-radius: var(--r-card); /* 16px */
  }

  /* Live site hides carousel arrows on mobile */
  .x-hero__arrow {
    display: none;
  }
}
