/* Flora product section — Evian-style layout with Flora design tokens */

.products-section {
  --product-accent: #ececec;
  --product-accent-soft: #f5f5f5;
  --product-text: #3e3e3e;
  --product-primary: var(--primary, #d0b475);
  --section-gutter: 60px;
  --white: #ffffff;
  padding: 0;
  margin: 0 var(--section-gutter) 70px;
  background: var(--product-accent-soft);
  display: flex;
  flex-direction: column;
  max-width: 100%;
  overflow-x: clip;
}

.products-intro {
  text-align: center;
  max-width: 100%;
  margin: 0;
  padding: clamp(24px, 3.5vh, 36px) clamp(32px, 5vw, 60px) clamp(16px, 2.5vh, 28px);
  background: var(--white);
  position: relative;
  z-index: 2;
}

.products-intro h2 {
  max-width: 505px;
  margin: 0 auto 20px;
  font-family: "Marcellus", Georgia, serif;
  font-size: clamp(34px, 4vw, 48px);
  font-weight: 400;
  line-height: 1.2;
  color: var(--product-text);
}

.products-intro p {
  max-width: 505px;
  margin: 0 auto 0;
  font-family: "Jost", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 19px;
  font-weight: 300;
  line-height: 24px;
  color: var(--product-text);
}

.products-subsection {
  display: flex;
  flex-direction: column;
}

.products-subsection + .products-subsection {
  /* margin-top: clamp(32px, 5vh, 56px); */
}

.products-subsection-intro {
  text-align: center;
  padding: clamp(20px, 3vh, 32px) clamp(32px, 5vw, 60px) clamp(12px, 2vh, 20px);
  background: var(--white);
}

.products-subsection-intro h3 {
  max-width: 505px;
  margin: 0 auto 12px;
  font-family: "Marcellus", Georgia, serif;
  font-size: clamp(26px, 3vw, 36px);
  font-weight: 400;
  line-height: 1.2;
  color: var(--product-text);
}

.products-subsection-intro p {
  max-width: 505px;
  margin: 0 auto;
  font-family: "Jost", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 17px;
  font-weight: 300;
  line-height: 24px;
  color: var(--product-text);
}

.product-carousel {
  position: relative;
  max-width: 100%;
  margin: 0;
  padding: 0;
  background: var(--product-accent);
  overflow-x: clip;
}

.product-carousel[data-single-slide] .carousel-arrow,
.product-carousel[data-single-slide] .carousel-tabs {
  display: none;
}

.carousel-viewport {
  overflow-x: clip;
  overflow-y: visible;
  position: relative;
  width: 100%;
  max-width: 100%;
}

.carousel-track {
  display: flex;
  transition: transform 0.45s ease-in-out;
  max-width: 100%;
}

.carousel-slide {
  flex: 0 0 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: clamp(8px, 1.2vh, 14px);
  padding: clamp(20px, 3vh, 36px) clamp(12px, 3vw, 40px) clamp(36px, 5vh, 64px);
  min-height: clamp(480px, 72vh, 920px);
  max-width: 100%;
  box-sizing: border-box;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s, visibility 0.35s;
  background: linear-gradient(
    180deg,
    var(--white) 0%,
    var(--white) 50%,
    var(--product-accent) 50%,
    var(--product-accent) 100%
  );
}

.carousel-slide.is-active {
  opacity: 1;
  visibility: visible;
}

.range-bottles {
  --bottle-sm-height: clamp(280px, 48vh, 540px);
  --bottle-lg-height: clamp(380px, 62vh, 720px);
  --bottle-scale: clamp(1.12, 0.9vw + 0.65, 1.28);
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: end;
  justify-items: center;
  column-gap: clamp(10px, 1.5vw, 40px);
  flex: 0 0 auto;
  min-height: 0;
  width: 100%;
  max-width: min(1600px, 100%);
  margin: 0 auto;
  padding: 0 clamp(8px, 2vw, 24px);
  position: relative;
  z-index: 2;
  box-sizing: border-box;
}

.mini-bottle {
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  flex: 0 0 auto;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  transition: transform 0.2s;
  text-decoration: none;
}

.mini-bottle:hover {
  transform: translateY(-4px);
}

.mini-bottle img {
  width: auto;
  max-width: 100%;
  object-fit: contain;
  object-position: bottom center;
  display: block;
  --optical-offset: 0px;
  transform: scale(var(--bottle-scale)) translateY(var(--optical-offset));
  transform-origin: bottom center;
  filter: drop-shadow(0 20px 36px rgba(0, 0, 0, 0.22));
  will-change: transform;
}

.mini-bottle span {
  position: absolute;
  left: 50%;
  bottom: clamp(-36px, -3vh, -28px);
  transform: translateX(-50%);
  font-family: "Jost", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: clamp(12px, 1.25vw, 15px);
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--product-text);
  white-space: nowrap;
}

/* Two-bottle layout */
.range-bottles.two .mini-bottle,
.range-bottles.two .mini-bottle.tall {
  height: auto;
  align-items: flex-end;
}

.range-bottles.two .mini-bottle img {
  height: var(--bottle-sm-height);
  --optical-offset: 0px;
}

.range-bottles.two .mini-bottle.tall img {
  height: var(--bottle-lg-height);
  --optical-offset: 6px;
}

/* Four-bottle layout — two tight groups with one clear gap between */
.range-bottles.four {
  --bottle-sm-height: clamp(340px, 54vh, 680px);
  --bottle-lg-height: clamp(460px, 72vh, 900px);
  --bottle-scale: clamp(1.08, 0.6vw + 0.9, 1.18);
  --bottle-row-height: calc(var(--bottle-lg-height) * var(--bottle-scale));
  --pair-gap: clamp(4px, 0.5vw, 10px);
  --group-gap: clamp(44px, 6vw, 96px);
  display: flex !important;
  flex-direction: row;
  align-items: flex-end;
  justify-content: center;
  gap: var(--group-gap);
  width: 100%;
  max-width: 100%;
  padding-inline: clamp(4px, 1vw, 16px);
  grid-template-columns: unset;
}

.range-bottles.four .bottle-group {
  display: flex !important;
  flex-direction: row;
  align-items: flex-end;
  justify-content: center;
  gap: var(--pair-gap);
  width: fit-content;
  flex: 0 0 auto;
}

.range-bottles.four .bottle-group .mini-bottle {
  width: auto !important;
  max-width: none;
  flex: 0 0 auto !important;
  height: var(--bottle-row-height);
  align-items: flex-end;
  overflow: visible;
}

.range-bottles.four .bottle-group .mini-bottle img {
  max-width: none;
  width: auto;
  height: calc(var(--bottle-sm-height) * var(--bottle-scale));
  transform: translateY(0);
  transform-origin: bottom center;
  --optical-offset: 0px;
}

.range-bottles.four .bottle-group .mini-bottle.tall img {
  height: calc(var(--bottle-lg-height) * var(--bottle-scale));
  transform: translateY(0);
  transform-origin: bottom center;
  --optical-offset: 0px;
}

/* Three-bottle layout — regular line (200mL, 500mL, 1L) */
.range-bottles.three {
  --bottle-sm-height: clamp(300px, 48vh, 600px);
  --bottle-md-height: clamp(380px, 58vh, 740px);
  --bottle-lg-height: clamp(460px, 72vh, 900px);
  --bottle-scale: clamp(1.08, 0.6vw + 0.9, 1.18);
  --bottle-row-height: calc(var(--bottle-lg-height) * var(--bottle-scale));
  display: flex !important;
  flex-direction: row;
  align-items: flex-end;
  justify-content: center;
  gap: clamp(0px, 0.4vw, 6px);
  width: 100%;
  max-width: 100%;
  padding-inline: clamp(4px, 1vw, 16px);
  grid-template-columns: unset;
}

.range-bottles.three .mini-bottle {
  width: auto !important;
  max-width: none;
  flex: 0 0 auto !important;
  height: var(--bottle-row-height);
  align-items: flex-end;
  overflow: visible;
}

.range-bottles.three .mini-bottle img {
  max-width: none;
  width: auto;
  height: calc(var(--bottle-sm-height) * var(--bottle-scale));
  transform: translateY(0);
  transform-origin: bottom center;
}

.range-bottles.three .mini-bottle.medium img {
  height: calc(var(--bottle-md-height) * var(--bottle-scale));
}

.range-bottles.three .mini-bottle.tall img {
  height: calc(var(--bottle-lg-height) * var(--bottle-scale));
}

.range-link {
  margin-top: clamp(32px, 4.5vh, 52px);
  flex-shrink: 0;
  font-family: "Jost", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.107em;
  text-transform: uppercase;
  color: var(--product-text);
  border: 0.8px solid var(--product-text);
  padding: 12px 15px;
  min-width: 232px;
  text-align: center;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
  margin-bottom: 0;
  display: inline-block;
  position: relative;
  z-index: 3;
}

.range-link:hover {
  background: rgba(208, 180, 117, 0.12);
  border-color: var(--product-primary);
  color: var(--product-text);
}

.carousel-arrow {
  position: absolute;
  bottom: 30px;
  width: 44px;
  height: 44px;
  border: 0.8px solid var(--product-text);
  border-radius: 0;
  background: transparent;
  color: var(--product-text);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
}

.carousel-arrow:hover {
  background: rgba(208, 180, 117, 0.12);
  border-color: var(--product-primary);
}

.carousel-arrow.prev {
  left: clamp(20px, 10%, 100px);
}

.carousel-arrow.next {
  right: clamp(20px, 10%, 100px);
}

.carousel-tabs {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 0;
  position: absolute;
  bottom: 110px;
  left: 50%;
  transform: translateX(-50%);
}

.carousel-tab {
  width: 40px;
  height: 2px;
  padding: 0;
  border: none;
  border-radius: 0;
  background: rgba(62, 62, 62, 0.25);
  cursor: pointer;
  font-size: 0;
  transition: background 0.2s;
  color: transparent;
}

.carousel-tab.is-active {
  background: var(--product-primary);
}

@media (max-width: 768px) {
  .products-section {
    margin: 0 12px 50px;
  }

  .carousel-slide {
    padding: 0 8px 44px;
    min-height: auto;
  }

  .range-bottles {
    --bottle-sm-height: clamp(220px, 44vw, 360px);
    --bottle-lg-height: clamp(280px, 56vw, 460px);
    --bottle-scale: 1.0;
    column-gap: clamp(8px, 3vw, 24px);
  }

  .range-bottles.four {
    --bottle-sm-height: clamp(220px, 48vw, 380px);
    --bottle-lg-height: clamp(300px, 62vw, 480px);
    --bottle-row-height: calc(var(--bottle-lg-height) * var(--bottle-scale));
    --bottle-scale: 1.06;
    --pair-gap: clamp(4px, 1.5vw, 10px);
    --group-gap: clamp(24px, 7vw, 48px);
    flex-direction: column;
    align-items: center;
    width: 100%;
  }

  .range-bottles.four .bottle-group {
    gap: var(--pair-gap);
  }

  .range-bottles.four .bottle-group .mini-bottle {
    height: var(--bottle-row-height);
  }

  .range-bottles.four .bottle-group .mini-bottle img {
    transform: translateY(0);
  }

  .range-bottles.four .bottle-group .mini-bottle.tall img {
    transform: translateY(0);
  }

  .range-bottles.three {
    --bottle-sm-height: clamp(200px, 42vw, 340px);
    --bottle-md-height: clamp(260px, 52vw, 420px);
    --bottle-lg-height: clamp(320px, 62vw, 500px);
    --bottle-row-height: calc(var(--bottle-lg-height) * var(--bottle-scale));
    --bottle-scale: 1.06;
    flex-direction: column;
    align-items: center;
    gap: clamp(4px, 1.5vw, 10px);
  }

  .range-bottles.three .mini-bottle {
    height: var(--bottle-row-height);
  }

  .carousel-arrow {
    display: none;
  }
}

@media (min-width: 1400px) {
  .range-bottles {
    --bottle-sm-height: 520px;
    --bottle-lg-height: 680px;
    --bottle-scale: 1.24;
    column-gap: 48px;
  }

  .range-bottles.four {
    --bottle-sm-height: 620px;
    --bottle-lg-height: 820px;
    --bottle-row-height: calc(var(--bottle-lg-height) * var(--bottle-scale));
    --bottle-scale: 1.14;
    --pair-gap: 8px;
    --group-gap: 88px;
  }

  .range-bottles.three {
    --bottle-sm-height: 560px;
    --bottle-md-height: 680px;
    --bottle-lg-height: 820px;
    --bottle-row-height: calc(var(--bottle-lg-height) * var(--bottle-scale));
    --bottle-scale: 1.14;
    /* gap: 4px; */
  }
}

@media (min-width: 1800px) {
  .range-bottles {
    --bottle-sm-height: 560px;
    --bottle-lg-height: 720px;
    --bottle-scale: 1.28;
    column-gap: 64px;
  }

  .range-bottles.four {
    --bottle-sm-height: 680px;
    --bottle-lg-height: 920px;
    --bottle-row-height: calc(var(--bottle-lg-height) * var(--bottle-scale));
    --bottle-scale: 1.18;
    --pair-gap: 10px;
    --group-gap: 108px;
  }

  .range-bottles.three {
    --bottle-sm-height: 620px;
    --bottle-md-height: 760px;
    --bottle-lg-height: 920px;
    --bottle-row-height: calc(var(--bottle-lg-height) * var(--bottle-scale));
    --bottle-scale: 1.18;
    gap: 6px;
  }
}
