/* Products — Figma node 1276-3566 (Barytes), 1440×800 artboard.
   All coordinates are exact px values from the Figma dev export. */

.products {
  position: relative;
  background-color: #dfdfdf;
  min-height: 800px;
  overflow: hidden;
}

.products__inner {
  position: relative;
  width: 1440px;
  height: 800px;
  margin: 0 auto;
}

/* ── Left rail — anchored to the section (not the scaled artboard) and aligned
   to the page-wide section rail variable, so the line stays continuous with the
   sections above/below at every viewport width. ── */
.products__rail {
  position: absolute;
  left: var(--section-rail-left);
  top: 0;
  bottom: 0;
  width: 90px;
  z-index: 5;
}

.products__rail-line {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 0.5px;
  background: #231f20;
}

.products__rail-label {
  position: absolute;
  left: var(--section-rail-label-inset);
  top: 130px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-family: 'Lexend Giga', sans-serif;
  font-weight: 300;
  font-size: 14px;
  line-height: 18px;
  letter-spacing: -1px;
  color: #231f20;
  max-width: var(--section-rail-label-max);
}

.products__rail-num {
  white-space: nowrap;
}

.products__rail-name {
  width: 58px;
  white-space: normal;
}

/* ── Content column (Frame 1321316783) — auto-layout, gap:80 ── */
.products__content {
  position: absolute;
  left: 199px;
  top: 120px;
  width: 916px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 80px;
  z-index: 1;
}

/* ── Heading block (Frame 1321316780) — 916×138, gap:14 ── */
.products__header {
  width: 916px;
  height: 138px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
}

/* H1 box: 2 lines × 50px line-height (125%) = 100px — matches Frame 1321316780 math exactly */
.products__heading {
  width: 100%;
  font-family: 'Lexend Giga', sans-serif;
  font-weight: 500;
  font-size: 40px;
  line-height: 50px;
  letter-spacing: -0.09em;
  color: #231f20;
  margin: 0;
}

.products__subheading {
  font-family: 'Blinker', sans-serif;
  font-weight: 400;
  font-size: 20px;
  line-height: 24px;
  color: #5b5b5b;
  white-space: nowrap;
}

/* ── Mineral block (Frame 1321316774) — gap:36, centred, 773px ── */
.products__mineral {
  width: 773px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 36px;
}

/* ── Name block (Frame 1321316773) — gap:4 ── */
.products__name-block {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
}

/* ── Watermark name — Lexend Giga 500, 78/88, -9px, #ABAAAA ── */
.products__watermark {
  width: 100%;
  font-family: 'Lexend Giga', sans-serif;
  font-weight: 500;
  font-size: 78px;
  line-height: 88px;
  letter-spacing: -9px;
  text-transform: uppercase;
  color: #abaaaa;
  user-select: none;
  white-space: normal;
  transition: opacity var(--transition-medium);
}

/* ── Rule (Vector 7) — 645px, 1px #231F20 ── */
.products__rule {
  width: 645px;
  height: 0;
  border-top: 1px solid #231f20;
  flex-shrink: 0;
}

/* ── Formula row (Frame 1321316775) — centred ── */
.products__formula-row {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* ── Formula text — Lexend Giga 300, 32/40, -1px, #5B5B5B ── */
.products__formula {
  width: 490px;
  font-family: 'Lexend Giga', sans-serif;
  font-weight: 300;
  font-size: 32px;
  line-height: 40px;
  letter-spacing: -1px;
  color: #5b5b5b;
  text-align: center;
  transition: opacity var(--transition-medium);
}

/* ── Product image (barite-specimen 1) — overridden per-product via CSS vars ── */
.products__image {
  position: absolute;
  left: var(--products-image-left, 704px);
  top: var(--products-image-top, 346px);
  width: var(--products-image-width, 491px);
  height: var(--products-image-height, 334px);
  object-fit: contain;
  object-position: center;
  transition: opacity var(--transition-medium);
  z-index: 3;
  pointer-events: none;
}

/* ── Soft glow behind image (Ellipse 49) ── */
.products__glow {
  position: absolute;
  left: 500px;
  top: 667px;
  width: 155px;
  height: 140px;
  background: #d9d9d9;
  filter: blur(50px);
  z-index: 0;
  pointer-events: none;
}

/* ── CTA "Know more" ── */
.products__cta {
  position: absolute;
  left: 341px;
  top: 638px;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0;
  height: 42px;
  color: #231f20;
  z-index: 4;
}

.products__cta-text {
  font-family: 'Lexend Giga', sans-serif;
  font-weight: 600;
  font-size: 20px;
  line-height: 25px;
  letter-spacing: -1px;
}

.products__cta-arrow {
  width: 24px;
  height: 24px;
  color: #231f20;
  transition: transform var(--transition-fast);
}

.products__cta:hover .products__cta-arrow {
  transform: translateX(5px);
}

/* ── Nav arrows (Frame 1321316798) — 44px round #27E3FF ── */
.products__btn {
  position: absolute;
  top: 449px;
  width: 44px;
  height: 44px;
  border-radius: 22px;
  background: #27e3ff;
  color: #231f20;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  border: none;
  cursor: pointer;
  padding: 0;
  transition: transform var(--transition-fast);
}

.products__btn--prev {
  left: 109px;
}

.products__btn--next {
  left: calc(109px + 1260px - 44px);
}

.products__btn svg {
  width: 14px;
  height: 17px;
}

.products__btn:hover {
  background: #27e3ff;
  transform: scale(1.06);
}

/* ── Screen-reader-only counter ── */
.products__counter {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ── Desktop scale: 1200–1439 — center scale so content isn't clipped ── */
@media (max-width: 1439px) and (min-width: 1200px) {
  .products {
    min-height: 0;
    height: calc(800px * (100vw / 1440));
    overflow: hidden;
  }

  .products__inner {
    position: relative;
    left: 50%;
    margin-left: -720px;
    transform: scale(calc(100vw / 1440));
    transform-origin: top center;
  }

  .products__subheading {
    white-space: normal;
    max-width: 100%;
  }
}

/* ── Tablet + mobile — fluid stacked layout ── */
@media (max-width: 1199px) {
  .products {
    min-height: 0;
    height: auto;
    padding-bottom: 24px;
    overflow: visible;
    overflow-x: clip;
  }

  .products__rail-label {
    top: var(--section-rail-label-top);
  }

  .products__rail-name {
    display: none;
  }

  .products__inner {
    position: relative;
    width: 100%;
    max-width: 100%;
    height: auto;
    margin: 0 auto;
    left: auto;
    transform: none;
    padding:
      max(88px, var(--section-content-min-top))
      var(--content-padding)
      108px
      var(--content-offset);
    box-sizing: border-box;
  }

  .products__content {
    position: static;
    width: 100%;
    max-width: 100%;
    gap: 48px;
  }

  .products__header {
    width: 100%;
    height: auto;
  }

  .products__heading {
    font-size: clamp(26px, 6.5vw, 40px);
    line-height: 1.25;
  }

  .products__subheading {
    white-space: normal;
    font-size: clamp(16px, 4vw, 20px);
    line-height: 1.35;
    max-width: 100%;
  }

  .products__mineral {
    width: 100%;
    max-width: 100%;
    gap: 28px;
  }

  .products__watermark {
    font-size: clamp(36px, 10vw, 78px);
    line-height: 1.1;
    letter-spacing: -0.05em;
    max-width: 100%;
    overflow-wrap: anywhere;
  }

  .products__rule {
    width: 100%;
    max-width: 645px;
  }

  .products__formula {
    width: auto;
    max-width: 100%;
    font-size: clamp(22px, 6vw, 32px);
    line-height: 1.25;
  }

  .products__image {
    position: relative;
    left: auto;
    top: auto;
    width: min(100%, 400px);
    height: auto;
    max-height: 280px;
    display: block;
    margin: 16px auto 0;
  }

  .products__glow {
    display: none;
  }

  .products__cta {
    position: static;
    margin-top: 28px;
    min-height: 44px;
  }

  .products__btn {
    top: auto;
    bottom: 32px;
  }

  .products__btn--prev {
    left: max(var(--content-padding), var(--section-rail-left));
  }

  .products__btn--next {
    left: auto;
    right: var(--content-padding);
  }
}

@media (max-width: 768px) {
  .products__inner {
    padding-bottom: 96px;
  }

  .products__btn {
    bottom: 24px;
    width: 48px;
    height: 48px;
    border-radius: 24px;
  }
}

@media (max-width: 480px) {
  .products__inner {
    padding-bottom: 88px;
  }

  .products__image {
    width: 100%;
    max-width: 300px;
    max-height: 220px;
  }
}
