/** ============================================================
    COMPONENT: Carousels
    Source: home.css, details.css
    ============================================================ */

/* ============================================
   HERO CAROUSEL
   ============================================ */

#heroCarousel {
  position: relative;
  border-radius: var(--radius-xl);
  overflow: hidden;
}

#heroCarousel .carousel-inner {
  overflow: hidden;
  border-radius: var(--radius-xl);
}

#heroCarousel .carousel-item {
  transition: opacity 0.65s ease-out;
}

/* Custom dot indicators */
.es-hero__dots {
  position: absolute;
  bottom: 1.25rem;
  left: 50%;
  transform: translateX(-50%);
  margin: 0;
  gap: 0.6rem;
  z-index: 10;
}

.es-hero__dots button {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background-color: hsl(0 0% 100% / 0.3);
  border: none;
  opacity: 1;
  margin: 0;
  padding: 0;
  transition: all 0.2s var(--ease-out);
}

.es-hero__dots button.active {
  background-color: #ffffff;
  transform: scale(1.2);
}

/* Minimal circular arrows */
.es-hero__arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: hsl(0 0% 100% / 0.08);
  border: 1.5px solid hsl(0 0% 100% / 0.2);
  border-radius: 50%;
  z-index: 10;
  opacity: 0;
  transition: opacity 0.25s ease, background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

#heroCarousel:hover .es-hero__arrow {
  opacity: 1;
}

.es-hero__arrow.carousel-control-prev { left: 1rem; }
.es-hero__arrow.carousel-control-next { right: 1rem; }

.es-hero__arrow:hover {
  background: hsl(0 0% 100% / 0.18);
  border-color: hsl(0 0% 100% / 0.4);
  transform: translateY(-50%) scale(1.08);
}

.es-hero__arrow-icon {
  color: #ffffff;
  font-size: 1.1rem;
  line-height: 1;
}

/* ============================================
   PRODUCT CAROUSEL (details.css)
   ============================================ */

.carousel-container {
  position: relative;
  width: 100%;
  overflow: hidden;
  margin-top: 20px;
}

.carousel-track {
  display: flex;
  transition: transform var(--duration-base) var(--ease-out);
  gap: 0;
}

.carousel-card {
  flex: 0 0 20%;
  box-sizing: border-box;
}

@media (max-width: 1200px) { .carousel-card { flex: 0 0 25%; } }
@media (max-width: 992px)  { .carousel-card { flex: 0 0 33.33%; } }
@media (max-width: 768px)  { .carousel-card { flex: 0 0 50%; } }
@media (max-width: 480px)  { .carousel-card { flex: 0 0 100%; } }

.carousel-button {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: var(--clr-primary);
  color: #fff;
  border: 1px solid var(--clr-primary);
  width: 40px;
  height: 40px;
  cursor: pointer;
  z-index: 10;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-sm);
  transition: all var(--duration-fast) var(--ease-out);
}
.carousel-button.left { left: 5px; }
.carousel-button.right { right: 5px; }
.carousel-button:hover {
  background: var(--clr-primary-dark);
  border-color: var(--clr-primary-dark);
  box-shadow: var(--shadow-glow);
}

/* ============================================
    ENTRANCE ANIMATION
    ============================================ */

@keyframes hero-reveal {
  from { opacity: 0; transform: translateY(24px) scale(0.985); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
.hero-anim {
  animation: hero-reveal 0.7s var(--ease-out) both;
  animation-delay: var(--anim-delay, 0ms);
}

/* ============================================
    HERO SLIDE STYLES (from home.css)
    ============================================ */

.es-hero {
  padding-block: 1.5rem;
}

.es-hero-slide {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 7;
  min-height: 320px;
  max-height: 680px;
  border-radius: var(--radius-xl);
  overflow: hidden;
  background: var(--clr-primary);
  isolation: isolate;
}

.es-hero-slide__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  z-index: 1;
}

.es-hero-slide__scrim {
  position: absolute;
  inset: 0;
  z-index: 2;
  background: linear-gradient(
    90deg,
    hsl(263 70% 14% / 0.82) 0%,
    hsl(263 70% 14% / 0.55) 35%,
    hsl(263 70% 14% / 0.15) 60%,
    hsl(263 70% 14% / 0) 100%
  );
}

.es-hero-slide__body {
  position: relative;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  height: 100%;
  padding: clamp(2rem, 5vw, 5rem) clamp(2rem, 6vw, 6rem);
  max-width: 60%;
}

.es-hero-slide__kicker {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--clr-star);
  margin-bottom: 0.75rem;
}

.es-hero-slide__title {
  font-size: clamp(1.75rem, 4.2vw, 3.5rem);
  font-weight: 900;
  color: var(--surface-page);
  line-height: 1.08;
  letter-spacing: -0.035em;
  margin-bottom: 1.5rem;
  text-wrap: balance;
  text-shadow: 0 2px 24px hsl(263 80% 8% / 0.35);
}

.es-hero-slide--solid {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--clr-primary);
}

.es-hero__container {
  width: 100%;
  max-width: var(--content-max);
  margin-inline: auto;
  padding-inline: var(--content-pad);
}

.es-hero-slide--solid .es-hero-slide__body {
  align-items: center;
  text-align: center;
  max-width: 700px;
}

.es-hero-slide--solid .es-hero-slide__title {
  text-shadow: none;
}

@media (max-width: 991px) {
  .es-hero-slide {
    aspect-ratio: 16 / 10;
    min-height: 360px;
  }
  .es-hero-slide__body {
    max-width: 80%;
    padding: clamp(1.5rem, 4vw, 3rem);
  }
  .es-hero__arrow {
    display: none;
  }
}

@media (max-width: 575px) {
  .es-hero-slide {
    aspect-ratio: 4 / 3;
    min-height: 340px;
  }
  .es-hero-slide__body {
    max-width: 100%;
    align-items: center;
    text-align: center;
    padding: 2rem 1.5rem 3.5rem;
  }
  .es-hero-slide__scrim {
    background: linear-gradient(
      180deg,
      hsl(263 70% 14% / 0.75) 0%,
      hsl(263 70% 14% / 0.55) 45%,
      hsl(263 70% 14% / 0.25) 100%
    );
  }
  .es-hero-slide__title {
    text-wrap: pretty;
  }
}
