/* ==========================================================
   Hero Slider (esalas-hero-slider)
   ========================================================== */

.ehs-carousel {
  --header-h: 110px;
  --hero-h: calc(100vh - var(--header-h));  /* fallback */
  --hero-h: calc(100svh - var(--header-h)); /* mobile-safe viewport */
  --ehs-min-height: 480px;
  width: 100%;
  position: relative;
}

/* WordPress admin bar (logged-in only) */
.admin-bar .ehs-carousel {
  --hero-h: calc(100svh - var(--header-h) - 32px);
}
@media (max-width: 782px) {
  .admin-bar .ehs-carousel {
    --hero-h: calc(100svh - var(--header-h) - 46px);
  }
}

/* Full mode: fills the screen but grows with tall content (e.g. a form) instead of clipping it.
   The min-height lives on the slide; the flex stage stretches all items to the tallest one. */
.ehs-carousel.ehs-height-full {
  height: auto;
  overflow: hidden;
}
.ehs-carousel.ehs-height-full .ehs-slide {
  min-height: max(var(--hero-h), var(--ehs-min-height));
  padding-block: 40px;
  box-sizing: border-box;
}

.ehs-carousel.ehs-height-custom {
  height: var(--ehs-custom-h, 600px);
  min-height: var(--ehs-min-height);
  overflow: hidden;
}

/* Kills the inline height from Owl's autoHeight and stretches stage/items */
.ehs-carousel .owl-stage-outer,
.ehs-carousel .owl-stage-outer.owl-height {
  height: 100% !important;
}
.ehs-carousel .owl-stage {
  display: flex;
  height: 100%;
}
.ehs-carousel .owl-item {
  height: 100%;
  float: none;
}

/* ---------- Slide ---------- */
.ehs-slide {
  position: relative;
  height: 100%;
  display: flex;
  align-items: center;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.ehs-slide__overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background-color: rgba(0, 0, 0, 0.45);
  pointer-events: none;
}

.ehs-slide__product {
  position: absolute;
  z-index: 2;
  max-height: 90%;
  width: 45%;
  pointer-events: none;
}
.ehs-slide__product img {
  display: block;
  width: 100%;
  height: auto;
}
.ehs-slide__product--right {
  right: 5%;
}
.ehs-slide__product--left {
  left: 5%;
}
.ehs-slide__product--shortcode {
  position: static;
  max-height: none;
  flex-shrink: 0;
  pointer-events: auto;
}

/* Content above overlay/product image */
.ehs-slide .container {
  position: relative;
  z-index: 3;
  width: 100%;
}

.ehs-slide__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 40px;
}

.ehs-slide__content {
  max-width: 900px;
}

.ehs-slide__title {
  color: #fff;
  font-size: clamp(2rem, 4.5vw, 3.75rem);
  line-height: 1.1;
  margin: 0 0 20px;
}

.ehs-slide__title-highlight {
  color: inherit;
}

.ehs-slide__text {
  color: rgba(255, 255, 255, 0.9);
  font-size: clamp(1rem, 1.4vw, 1.25rem);
  line-height: 1.6;
  margin: 0 0 30px;
}
.ehs-slide__text p:last-child {
  margin-bottom: 0;
}

.ehs-slide__button {
  display: inline-block;
  text-decoration: none;
}

/* ---------- Nav & dots over the slide ---------- */
.ehs-carousel .owl-nav {
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  z-index: 4;
  display: flex;
  justify-content: space-between;
  padding-inline: 20px;
  transform: translateY(-50%);
  pointer-events: none;
}
.ehs-carousel .owl-nav button {
  pointer-events: auto;
}

.ehs-carousel .owl-dots {
  position: absolute;
  bottom: 30px;
  left: 50%;
  z-index: 4;
  transform: translateX(-50%);
}

/* ---------- Responsive hide toggles for nav/dots ---------- */
@media (max-width: 1024px) {
  .ehs-nav-hide-tablet .owl-nav {
    display: none;
  }
  .ehs-dots-hide-tablet .owl-dots {
    display: none;
  }
}

@media (max-width: 767px) {
  .ehs-nav-hide-mobile .owl-nav {
    display: none;
  }
  .ehs-dots-hide-mobile .owl-dots {
    display: none;
  }
}

/* ---------- Editor live-preview (no Owl init in the Elementor panel) ---------- */
.ehs-editor-preview {
  height: auto !important;
  min-height: 0 !important;
  overflow: visible !important;
}
.ehs-editor-preview .ehs-slide {
  height: 420px;
  min-height: 0 !important;
  margin-bottom: 10px;
}
.ehs-slide__product-shortcode-placeholder {
  border: 1px dashed rgba(255, 255, 255, 0.6);
  padding: 10px 14px;
  font-size: 12px;
  color: #fff;
  background: rgba(0, 0, 0, 0.35);
}
