/* MedielSoft Hero Slider — namespaced styles with FALLENS token fallbacks */

.ms-hero-slider {
  --ms-hero-content-inset: clamp(56px, 5vw, 72px);
  position: relative;
  width: 100%;
  max-width: var(--fd-container, 1440px);
  margin: 0 auto var(--fd-content-top-gap, 24px);
  overflow: hidden;
}

.note-editable.ms-hero-slider__slide {
  --ms-hero-content-inset: clamp(56px, 5vw, 72px);
}

.ms-hero-slider__swiper,
.ms-hero-slider__static,
.ms-hero-slider__html,
.ms-hero-slider__canvas {
  width: 100%;
  max-width: none;
}

.ms-hero-slider__slide {
  --fd-bg: #090909;
  --fd-bg-2: #111820;
  --fd-text: #f2f5f3;
  --fd-text-soft: #d8ded9;
  --fd-accent: #7fb420;
  --fd-accent-2: #9bd739;
  --fd-accent-soft: rgba(127, 180, 32, 0.16);
  --fd-accent-glow: rgba(127, 180, 32, 0.34);
  --fd-border-accent: rgba(127, 180, 32, 0.38);
  --fd-radius-sm: 6px;
  position: relative;
  overflow: hidden;
  width: 100%;
  background: var(--fd-bg);
  color: var(--fd-text);
  font-family: Montserrat, Arial, sans-serif;
}

.ms-hero-slider--carousel .ms-hero-slider__slide {
  height: var(--ms-hero-uniform-height, auto);
}

.ms-hero-slider--carousel .ms-hero-slider__html {
  display: flex;
  height: 100%;
}

.ms-hero-slider--carousel .ms-hero-slider__canvas {
  flex: 1 0 100%;
}

.ms-hero-slider__canvas {
  position: relative;
  min-height: var(--ms-hero-height, auto);
  display: flex;
  align-items: center;
  box-sizing: border-box;
  background:
    radial-gradient(ellipse 70% 80% at 75% 50%, var(--fd-accent-glow, rgba(127, 180, 32, 0.12)) 0%, transparent 55%),
    linear-gradient(135deg, var(--fd-bg, #0a0f14) 0%, var(--fd-bg-2, #111820) 45%, #0d1218 100%);
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
}

.ms-hero-slider__canvas--has-image {
  --ms-hero-overlay: linear-gradient(90deg, rgba(9, 9, 9, 0.97) 0%, rgba(9, 9, 9, 0.84) 34%, rgba(9, 9, 9, 0.24) 64%, rgba(9, 9, 9, 0.06) 100%);
  background-image: var(--ms-hero-overlay), var(--ms-hero-bg);
}

.ms-hero-slider__canvas::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 20% 80%, rgba(127, 180, 32, 0.06) 0%, transparent 50%);
  pointer-events: none;
  z-index: 0;
}

.ms-hero-slider__picture {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.ms-hero-slider__picture--standalone {
  position: relative;
  inset: auto;
  display: block;
  width: 100%;
}

.ms-hero-slider__image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ms-hero-slider__picture--standalone .ms-hero-slider__image {
  height: auto;
  object-fit: contain;
}

.ms-hero-slider--carousel .ms-hero-slider__slide--mode-imageonly .ms-hero-slider__picture--standalone,
.ms-hero-slider--carousel .ms-hero-slider__slide--mode-imageonly .ms-hero-slider__image {
  height: 100%;
}

.ms-hero-slider--carousel .ms-hero-slider__slide--mode-imageonly .ms-hero-slider__image {
  object-fit: cover;
}

.ms-hero-slider__slide--mode-htmlwithimage::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(90deg, rgba(9, 9, 9, 0.97) 0%, rgba(9, 9, 9, 0.84) 34%, rgba(9, 9, 9, 0.24) 64%, rgba(9, 9, 9, 0.06) 100%);
  pointer-events: none;
}

.ms-hero-slider__slide--mode-htmlwithimage .ms-hero-slider__html {
  position: relative;
  z-index: 2;
}

.ms-hero-slider__slide--mode-htmlwithimage .ms-hero-slider__canvas {
  background: transparent;
}

.ms-hero-slider__inner {
  position: relative;
  z-index: 1;
}

.ms-hero-slider__slide .fd-hero__inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}

.ms-hero-slider .ms-hero-slider__slide .fd-container,
.note-editable.ms-hero-slider__slide .fd-container {
  width: 100%;
  max-width: var(--fd-container, 1440px);
  margin-inline: auto;
  box-sizing: border-box;
}

.ms-hero-slider .ms-hero-slider__slide .fd-container.fd-hero__inner,
.note-editable.ms-hero-slider__slide .fd-container.fd-hero__inner {
  padding-block: clamp(24px, 4vw, 48px);
  padding-inline: var(--ms-hero-content-inset) !important;
}

.note-editable.ms-hero-slider__slide--mode-htmlwithimage::before {
  z-index: 0;
}

.note-editable.ms-hero-slider__slide--mode-htmlwithimage .ms-hero-slider__canvas {
  z-index: 1;
}

.ms-hero-slider__slide .fd-hero__content {
  max-width: 580px;
}

.ms-hero-slider__slide .fd-hero__eyebrow {
  margin: 0 0 20px;
  color: var(--fd-accent);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.ms-hero-slider__slide .fd-hero__title {
  margin: 0 0 24px;
  font-size: clamp(2rem, 3.2vw, 3.25rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  color: var(--fd-text, #fff);
}

.ms-hero-slider__title-accent {
  color: var(--fd-accent, #7fb420);
}

.ms-hero-slider__slide .fd-hero__text {
  margin: 0 0 36px;
  font-size: 1.05rem;
  line-height: 1.65;
  color: var(--fd-text-soft, rgba(255, 255, 255, 0.72));
  max-width: 480px;
}

.ms-hero-slider__slide .fd-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.ms-hero-slider__slide .fd-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 22px;
  border: 1px solid var(--fd-border-accent);
  border-radius: var(--fd-radius-sm);
  color: var(--fd-text);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-decoration: none;
  text-transform: uppercase;
  box-sizing: border-box;
}

.ms-hero-slider__slide .fd-btn--primary {
  border-color: var(--fd-accent);
  background: linear-gradient(135deg, var(--fd-accent) 0%, var(--fd-accent-2) 100%);
  color: #10150b;
  box-shadow: 0 0 28px var(--fd-accent-soft);
}

.ms-hero-slider__slide .fd-btn--secondary {
  background: rgba(255, 255, 255, 0.03);
}

.ms-hero-slider__cta-primary {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.ms-hero-slider__cta-arrow {
  font-size: 1.1em;
  line-height: 1;
}

.ms-hero-slider__slide .fd-hero__visual {
  display: flex;
  justify-content: flex-end;
  align-items: center;
}

.ms-hero-slider__slide .fd-hero__visual-card {
  width: min(100%, 340px);
  aspect-ratio: 4 / 5;
  border-radius: var(--fd-radius-lg, 12px);
  border: 1px solid var(--fd-border-accent, rgba(127, 180, 32, 0.35));
  background:
    linear-gradient(160deg, var(--fd-surface-2, #151b22) 0%, var(--fd-card, #111820) 50%, #0a0f14 100%);
  box-shadow:
    0 24px 64px rgba(0, 0, 0, 0.55),
    0 0 48px var(--fd-accent-soft, rgba(127, 180, 32, 0.18));
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 28px;
  position: relative;
  overflow: hidden;
}

.ms-hero-slider__slide .fd-hero__visual-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 55%;
  background: linear-gradient(180deg, rgba(127, 180, 32, 0.12) 0%, transparent 100%);
}

.ms-hero-slider__slide .fd-hero__visual-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fd-accent, #7fb420);
  margin-bottom: 6px;
}

.ms-hero-slider__slide .fd-hero__visual-spec {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--fd-text, #fff);
  line-height: 1.2;
}

.ms-hero-slider__slide .fd-hero__visual-tag {
  display: inline-block;
  margin-top: 12px;
  padding: 4px 12px;
  border-radius: var(--fd-radius-sm, 6px);
  background: var(--fd-accent-soft, rgba(127, 180, 32, 0.18));
  color: var(--fd-accent-2, #9fd43a);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* Product shot mockup (slide 1 style) */
.ms-hero-slider__product-shot {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  width: 100%;
  min-height: 360px;
}

.ms-hero-slider__product-jar {
  position: relative;
  width: min(100%, 220px);
  aspect-ratio: 2 / 5;
  border-radius: 18px 18px 14px 14px;
  background:
    linear-gradient(90deg, #0a0a0a 0%, #1a1a1a 18%, #111 50%, #1a1a1a 82%, #080808 100%);
  border: 2px solid #2a2a2a;
  box-shadow:
    0 28px 64px rgba(0, 0, 0, 0.65),
    0 0 40px rgba(127, 180, 32, 0.12);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 28px 16px;
  text-align: center;
}

.ms-hero-slider__product-jar::before {
  content: "";
  position: absolute;
  inset: 8px 10px auto;
  height: 42px;
  border-radius: 10px 10px 4px 4px;
  background: linear-gradient(180deg, #1f1f1f 0%, #0d0d0d 100%);
  border: 1px solid #333;
}

.ms-hero-slider__product-brand {
  margin-top: 36px;
  font-size: 1.35rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  color: var(--fd-accent, #9fd43a);
}

.ms-hero-slider__product-weight {
  font-size: 2rem;
  font-weight: 800;
  color: #fff;
  line-height: 1;
}

.ms-hero-slider__product-type {
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.88);
}

.ms-hero-slider__product-count {
  margin-top: 8px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: rgba(255, 255, 255, 0.55);
}

.ms-hero-slider__html {
  position: relative;
  width: 100%;
}

.ms-hero-slider__progress {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 4;
  display: none;
  height: 2px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.08);
  pointer-events: none;
}

.ms-hero-slider--progress-active .ms-hero-slider__progress {
  display: block;
}

.ms-hero-slider__progress-fill {
  display: block;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, #000 0%, #75ab16 44%, #9bd739 86%);
  transform: scaleX(0);
  transform-origin: left center;
  will-change: transform;
}

.ms-hero-slider__pagination {
  left: auto !important;
  right: clamp(20px, 4vw, 48px) !important;
  bottom: clamp(20px, 3vw, 32px) !important;
  width: auto !important;
  display: flex;
  align-items: center;
  gap: 8px;
  z-index: 2;
}

.ms-hero-slider__pagination .swiper-pagination-bullet {
  width: 44px;
  height: 3px;
  margin: 0 !important;
  border-radius: 2px;
  opacity: 1 !important;
  background: rgba(255, 255, 255, 0.28) !important;
  transition: background 0.2s ease, width 0.2s ease;
}

.ms-hero-slider__pagination .swiper-pagination-bullet-active,
.ms-hero-slider__pagination .swiper-pagination-bullet-active-main {
  width: 56px;
  background: var(--fd-accent, #7fb420) !important;
}

.ms-hero-slider .ms-hero-slider__nav {
  --swiper-navigation-size: 18px;
  width: 42px;
  height: 72px;
  margin-top: -36px;
  background: rgba(8, 12, 16, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 0;
  color: #fff;
  backdrop-filter: blur(4px);
  transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease;
  z-index: 2;
}

.ms-hero-slider .ms-hero-slider__nav::after {
  font-size: 16px;
  font-weight: 700;
}

.ms-hero-slider .ms-hero-slider__nav:hover {
  background: rgba(8, 12, 16, 0.78);
  border-color: var(--fd-accent, #7fb420);
  color: var(--fd-accent, #7fb420);
}

.ms-hero-slider .ms-hero-slider__nav--prev {
  left: 0;
  border-left: none;
  border-radius: 0 6px 6px 0;
}

.ms-hero-slider .ms-hero-slider__nav--next {
  right: 0;
  border-right: none;
  border-radius: 6px 0 0 6px;
}

.ms-hero-slider .ms-hero-slider__nav.swiper-button-disabled {
  opacity: 0.35;
  pointer-events: none;
}

.ms-hero-slider__nav {
  color: var(--fd-text, #fff);
}

.ms-hero-slider--single .ms-hero-slider__nav,
.ms-hero-slider--single .ms-hero-slider__pagination {
  display: none !important;
}

@media (max-width: 1200px) {
  .ms-hero-slider__slide .fd-hero__inner {
    gap: 32px;
  }
}

@media (max-width: 991px) {
  .ms-hero-slider,
  .note-editable.ms-hero-slider__slide {
    --ms-hero-content-inset: 48px;
  }

  .ms-hero-slider__canvas {
    min-height: var(--ms-hero-height-tablet, var(--ms-hero-height, auto));
  }

  .ms-hero-slider__canvas--has-image {
    --ms-hero-overlay: linear-gradient(90deg, rgba(9, 9, 9, 0.96) 0%, rgba(9, 9, 9, 0.82) 48%, rgba(9, 9, 9, 0.38) 100%);
    background-position: 68% center;
  }

  .ms-hero-slider__slide .fd-hero__inner {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .ms-hero-slider__slide .fd-hero__content {
    max-width: min(58vw, 560px);
  }

  .ms-hero-slider__slide .fd-hero__visual {
    justify-content: center;
  }

  .ms-hero-slider__slide .fd-hero__visual-card {
    width: min(100%, 280px);
    aspect-ratio: 16 / 10;
  }

  .ms-hero-slider__visual {
    justify-content: flex-start;
  }
}

@media (max-width: 767px) {
  .ms-hero-slider,
  .note-editable.ms-hero-slider__slide {
    --ms-hero-content-inset: 20px;
  }

  .ms-hero-slider__canvas {
    min-height: var(--ms-hero-height-mobile, var(--ms-hero-height-tablet, var(--ms-hero-height, auto)));
    align-items: flex-end;
  }

  .ms-hero-slider__canvas--has-image {
    --ms-hero-overlay: linear-gradient(180deg, rgba(9, 9, 9, 0.18) 0%, rgba(9, 9, 9, 0.56) 42%, rgba(9, 9, 9, 0.96) 72%, rgba(9, 9, 9, 1) 100%);
    background-position: 70% center;
  }

  .ms-hero-slider__slide--mode-htmlwithimage::before {
    background: linear-gradient(180deg, rgba(9, 9, 9, 0.18) 0%, rgba(9, 9, 9, 0.56) 42%, rgba(9, 9, 9, 0.96) 72%, rgba(9, 9, 9, 1) 100%);
  }

  .ms-hero-slider .ms-hero-slider__slide .fd-container.fd-hero__inner,
  .note-editable.ms-hero-slider__slide .fd-container.fd-hero__inner {
    padding-block: 32px 72px;
    padding-inline: var(--ms-hero-content-inset) !important;
  }

  .ms-hero-slider__slide .fd-hero__content {
    max-width: 100%;
  }

  .ms-hero-slider__slide .fd-hero__title {
    margin-bottom: 16px;
    font-size: clamp(1.9rem, 8vw, 2.5rem);
  }

  .ms-hero-slider__slide .fd-hero__text {
    margin-bottom: 24px;
    font-size: 0.95rem;
    line-height: 1.55;
  }

  .ms-hero-slider__slide .fd-hero__actions {
    flex-direction: column;
    align-items: stretch;
  }

  .ms-hero-slider__slide .fd-hero__actions .fd-btn {
    width: 100%;
    text-align: center;
  }

  .ms-hero-slider__pagination {
    right: 16px !important;
    bottom: 18px !important;
    gap: 6px;
  }

  .ms-hero-slider__pagination .swiper-pagination-bullet {
    width: 28px;
  }

  .ms-hero-slider__pagination .swiper-pagination-bullet-active,
  .ms-hero-slider__pagination .swiper-pagination-bullet-active-main {
    width: 38px;
  }

  .ms-hero-slider .ms-hero-slider__nav {
    top: auto;
    bottom: 14px;
    display: flex !important;
    width: 36px;
    height: 36px;
    margin-top: 0;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
  }

  .ms-hero-slider .ms-hero-slider__nav--prev {
    left: 16px;
  }

  .ms-hero-slider .ms-hero-slider__nav--next {
    right: auto;
    left: 60px;
  }
}

@media (max-width: 480px) {
  .ms-hero-slider__slide .fd-hero__title {
    font-size: 1.75rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ms-hero-slider__swiper .swiper-wrapper {
    transform: none !important;
  }
}
