.products-page {
  background-color: #fff;
  color: #00263e;
}

.products-page .products-section {
  margin-top: 4%;
}

.products-page .container {
  width: min(1110px, calc(100% - 40px));
  margin: 0 auto;
}

/* Products Hero — match Who We Are hero styling */
.wwa-hero {
  position: relative;
  min-height: 100vh;
  background-size: cover;
  background-position: center;
  color: #ffffff;
}

.wwa-hero__overlay {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  background: linear-gradient(
    180deg,
    rgba(10, 38, 70, 0.86) 0%,
    rgba(10, 38, 70, 0.65) 100%
  );
  display: flex;
  align-items: center;
}

.wwa-hero .container {
  position: relative;
  z-index: 1;
  padding-top: clamp(72px, 10vh, 140px);
  padding-bottom: clamp(72px, 10vh, 140px);
}

.wwa-hero__eyebrow {
  font-size: 0.95rem;
  letter-spacing: 3px;
  text-transform: uppercase;
  margin-bottom: 18px;
  color: #ffffff;
  font-weight: 600;
  padding-left: 5%;
}

.wwa-hero__title {
  font-size: clamp(2.2rem, 4vw, 3.4rem);
  margin: 0 0 18px;
  line-height: 1.2;
  padding-top: 0;
  padding-left: 5%;
}

/* Products hero: mirror Who We Are hero vertical spacing */
.products-page .wwa-hero__title {
  padding-top: 30% !important;
}

.wwa-hero__description {
  max-width: 640px;
  font-size: 1.05rem;
  line-height: 1.75;
  color: rgba(255, 255, 255, 0.9);
}

.section-heading {
  text-align: center;
  max-width: 780px;
  margin-bottom: 48px;
}

.section-heading h2 {
  font-size: clamp(1.75rem, 2.6vw, 2.125rem);
  line-height: 1.15;
  font-weight: 700;
  margin-bottom: 16px;
}

.section-heading p {
  font-size: 1.0625rem;
  line-height: 1.7;
  margin: 0;
}

.section-heading-product-intro {
  text-align: left;
  max-width: none;
  width: 100%;
  margin: 0 0 36px 0;
}

.section-heading-product-intro p {
  font-size: 1.0625rem;
  line-height: 1.7;
  margin: 0;
  text-align: left;
  width: 100%;
  box-sizing: border-box;
  padding-left: 40px;
  padding-right: 40px;
}

/* Match heading left edge to paragraph column */
.section-heading-product-intro h2 {
  margin: 0 0 16px 0;
  padding-left: 40px;
  padding-right: 40px;
}

/* Platform intro paragraph gutters (desktop/tablet) */
.products-section--platform .section-heading-product-intro p {
  font-size: 1.125rem;
  line-height: 1.85;
}

/* Keep centered presentation on small screens */
@media (max-width: 767.98px) {
  .products-section--platform .section-heading-product-intro p {
    padding-left: 0;
    padding-right: 0;
    text-align: center;
  }
  .products-section--platform .section-heading-product-intro h2 {
    padding-left: 0;
    padding-right: 0;
    text-align: center;
  }
}

/* Tablet gutters */
@media (min-width: 768px) and (max-width: 1199.98px) {
  .section-heading-product-intro p {
    padding-left: 32px;
    padding-right: 32px;
  }
  .section-heading-product-intro h2 {
    padding-left: 32px;
    padding-right: 32px;
  }
}

.section-heading__eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.24em;
  font-size: 0.75rem;
  font-weight: 600;
  color: #0877b4;
  margin-bottom: 12px;
}

/*
 * Brine Treatment section heading overrides
 * Match design: title‑case eyebrow, reduced spacing/size, narrower width,
 * and muted paragraph color. Scoped to avoid changing other sections.
 */
.products-section--brine .section-heading {
  max-width: none;
  width: 100%;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 32px;
}

.products-section--brine .section-heading__eyebrow {
  text-transform: none;
  letter-spacing: 0.02em;
  font-size: 1rem;
  color: #0877b4;
}

.products-section--brine .section-heading h2 {
  font-size: clamp(1.75rem, 2.6vw, 2.125rem);
  line-height: 1.2;
  margin-bottom: 10px;
}

.products-section--brine p {
  font-size: 0.95rem;
  line-height: 1.6;
  color: #6c7b88;
}

.products-grid {
  display: grid;
  gap: 32px;
  align-items: start;
}

.products-grid--three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

/* Horizontal row layout for platform cards */
.products-grid--rows {
  grid-template-columns: 1fr;
  gap: 40px;
}

.products-grid--rows .product-card {
  flex-direction: row;
  align-items: center;
}

.products-grid--rows .product-card__media {
  padding: 24px 24px 24px 32px;
  flex: 0 0 320px;
  max-width: 340px;
}

.products-grid--rows .product-card__body {
  padding: 32px 40px;
}

.product-card {
  background: #ffffff;
  border-radius: 20px;
  box-shadow: 0 24px 48px rgba(9, 32, 76, 0.08);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 100%;
}

.product-card__media {
  padding: 40px 40px 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.product-card__media img {
  width: auto;
  max-width: 100%;
  height: auto;
  object-fit: contain;
}

/* Ensure images in the Brine/Bromine Technology section are contained and responsive */
.products-section--brine .product-card {
  overflow: hidden;
}
.products-section--brine .product-card__media {
  border-radius: 10px !important;
  overflow: hidden;
  padding: 32px;
}
.products-section--brine .product-card__media img {
  border-radius: 10px !important;
  width: 100%;
  height: auto;
  max-width: 100%;
  display: block;
}

.product-card__body {
  padding: 32px 40px 40px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.product-card__body h3 {
  font-size: 1.5rem;
  line-height: 1.3;
  margin: 0;
}

.product-card__body p {
  margin: 0;
  line-height: 1.7;
  color: #405262;
}

.product-card__body .btn {
  align-self: flex-start;
}

.product-card__body .btn + .btn {
  margin-left: 12px;
}

/* Inline actions (e.g., Technical Brochure + Call Sales) */
.product-card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

/* Two-button group styling scoped to products page */
.products-page .product-card__body .btn--primary,
.products-page .product-card__body .btn--plain {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 0 18px;
  border-radius: 16px;
  font-size: 16px;
  line-height: 1;
  letter-spacing: 0.02em;
  text-transform: none;
  transition: background-color 0.2s ease, color 0.2s ease,
    border-color 0.2s ease, box-shadow 0.2s ease, transform 0.15s ease;
  box-sizing: border-box;
  white-space: nowrap;
}

/* Primary chip */
.products-page .product-card__body .btn--primary {
  background: #0d5aa6;
  border: 1px solid #0b4f92;
  color: #fff;
  box-shadow: 0 6px 14px rgba(13, 90, 166, 0.25);
}
.products-page .product-card__body .btn--primary:hover {
  background: #2a7fd8;
  border-color: #2a7fd8;
  transform: translateY(-1px);
  box-shadow: 0 10px 20px rgba(42, 127, 216, 0.25);
}
.products-page .product-card__body .btn--primary {
  position: relative;
  padding-right: 52px;
}
.products-page .product-card__body .btn--primary::before {
  content: "";
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 28px;
  height: 28px;
  background-image: url("../images/icons/arrow-down-circle-outline-white.svg");
  background-size: 28px 28px;
  background-repeat: no-repeat;
}

/* Outline chip */
.products-page .product-card__body .btn--plain {
  position: relative;
  padding-right: 52px;
  background: #ffffff;
  border: 3px solid #cbd6e3;
  color: #0a2646;
  box-shadow: 0 3px 10px rgba(12, 40, 64, 0.08),
    inset 0 -2px 0 rgba(12, 40, 64, 0.03);
}
.products-page .product-card__body .btn--plain:hover {
  background: #f2f6fb;
  border-color: #aeb9c6;
  color: #0a2646;
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(12, 40, 64, 0.12),
    inset 0 -2px 0 rgba(12, 40, 64, 0.04);
}
.products-page .product-card__body .btn--plain::before {
  content: "";
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 34px;
  height: 34px;
  background-image: url("../images/icons/arrow-down-circle-fill-black.svg");
  background-size: 34px 34px;
  background-repeat: no-repeat;
}

/* Focus styles for accessibility */
.products-page .product-card__body .btn--primary:focus,
.products-page .product-card__body .btn--plain:focus {
  outline: 0;
  box-shadow: 0 0 0 3px rgba(13, 90, 166, 0.25);
}

/* Hover effect for the circle/arrow */
.products-page .product-card__body .btn--primary:hover::after {
  background: #2a7fd8;
}
.products-page .product-card__body .btn--plain:hover::after {
  background: #2a7fd8;
}

/* Fixed desktop sizes to match design */
@media (min-width: 1200px) {
  .products-page .product-card__body .btn--primary {
    width: 242px;
    height: 59px;
    line-height: 59px;
  }
  .products-page .product-card__body .btn--plain {
    width: 169px;
    height: 59px;
    line-height: 59px;
  }
}

/* Large tablets */
@media (min-width: 992px) and (max-width: 1199.98px) {
  .products-page .product-card__body .btn--primary {
    min-width: 220px;
    width: auto;
    height: 56px;
    line-height: 56px;
  }
  .products-page .product-card__body .btn--plain {
    min-width: 185px;
    width: auto;
    height: 56px;
    line-height: 56px;
  }
  .products-page .product-card__body .btn--primary,
  .products-page .product-card__body .btn--plain {
    padding-right: 64px;
  }
  .products-page .product-card__body .btn--primary::before {
    right: 14px;
  }
  .products-page .product-card__body .btn--plain::before {
    right: 14px;
  }
}

/* Tablets */
@media (min-width: 768px) and (max-width: 991.98px) {
  .products-page .product-card__body .btn--primary {
    min-width: 210px;
    width: auto;
    height: 54px;
    line-height: 54px;
  }
  .products-page .product-card__body .btn--plain {
    min-width: 180px;
    width: auto;
    height: 54px;
    line-height: 54px;
  }
  .products-page .product-card__body .btn--primary,
  .products-page .product-card__body .btn--plain {
    padding-right: 64px;
  }
  .products-page .product-card__body .btn--primary::before {
    right: 14px;
  }
  .products-page .product-card__body .btn--plain::before {
    right: 14px;
  }
}

/* Mobile: stack buttons full-width and align edges */
@media (max-width: 767.98px) {
  .products-page .product-card__actions {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }
  .products-page .product-card__body .btn + .btn {
    margin-left: 0;
  }
  .products-page .product-card__body .btn--primary,
  .products-page .product-card__body .btn--plain {
    width: 100%;
    flex: 1 1 auto;
    height: 52px;
    line-height: 52px;
    justify-content: center;
    min-width: 0;
  }
  .products-page .product-card__body .btn--primary::before,
  .products-page .product-card__body .btn--plain::before {
    width: 28px;
    height: 28px;
    background-size: 28px 28px;
  }
}

.product-card--compact .product-card__media {
  padding: 32px;
}

.product-card--compact .product-card__body {
  padding-top: 24px;
}

.products-section--commercial {
  background: #f4f7fb;
  padding: 72px 0;
}

.commercial-ready__badge {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #2d2d2d;
  margin-bottom: 32px;
}

.commercial-ready__icon {
  position: relative;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #0078ba;
}
.commercial-ready__icon::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 12px;
  height: 6px;
  border-left: 3px solid #fff;
  border-bottom: 3px solid #fff;
  transform: translate(-50%, -60%) rotate(-45deg);
  border-radius: 1px;
}

.commercial-ready__layout {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: 56px;
  align-items: center;
}

/* Single-column enlarged image with caption */
.commercial-ready--single {
  display: block;
}
.commercial-ready--single .commercial-ready__media {
  margin: 0 auto;
  max-width: 1100px;
  padding: 18px;
  background: #ffffff;
  border-radius: 18px;
  box-shadow: 0 32px 64px rgba(9, 32, 76, 0.12);
}
.commercial-ready--single .commercial-ready__media img {
  width: 100%;
  border-radius: 12px;
  box-shadow: none;
  cursor: zoom-in;
}
.commercial-ready__caption {
  max-width: 860px;
  margin: 22px auto 0;
}
.commercial-ready__caption h2 {
  text-align: left;
  margin: 0 0 14px;
}
.commercial-ready__caption p {
  margin: 0;
}

.commercial-ready__media img {
  width: 100%;
  border-radius: 18px;
  box-shadow: 0 32px 64px rgba(9, 32, 76, 0.12);
}

.commercial-ready__content h2 {
  font-size: clamp(1.75rem, 2.4vw, 2.125rem);
  margin: 0 0 20px;
}

.commercial-ready__content p {
  margin: 0;
  line-height: 1.7;
  font-size: 1.0625rem;
}

.products-section__split {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 56px;
  align-items: center;
}

.products-section__content h2 {
  font-size: clamp(1.75rem, 2.6vw, 2.125rem);
  margin: 0 0 20px;
}

.products-section__content p {
  font-size: 1.0625rem;
  line-height: 1.7;
  margin: 0 0 32px;
}

.products-section__media img {
  width: 100%;
  border-radius: 18px;
  box-shadow: 0 28px 56px rgba(13, 40, 64, 0.16);
}

/* Make NEO2 image appear on the left on desktop */
.products-section--neo .products-section__media {
  grid-column: 1;
}
.products-section--neo .products-section__content {
  grid-column: 2;
}
@media (max-width: 1024px) {
  .products-section--neo .products-section__media,
  .products-section--neo .products-section__content {
    grid-column: auto;
  }
}

/* NEO2 card-style layout */
.products-section--neo .products-section__split {
  background: #ffffff;
  border: 1px solid rgba(12, 40, 64, 0.08);
  border-radius: 18px;
  box-shadow: 0 18px 48px rgba(9, 32, 76, 0.08);
  padding: 24px;
  grid-template-columns: 280px 1fr;
  gap: 24px;
  align-items: center;
}
@media (min-width: 1200px) {
  .products-section--neo .products-section__split {
    padding: 28px 32px;
    grid-template-columns: 320px 1fr;
    gap: 28px;
  }
}
@media (max-width: 1024px) {
  .products-section--neo .products-section__split {
    grid-template-columns: 1fr;
    padding: 20px;
  }
}

.products-section--neo .products-section__media {
  justify-self: start;
}
.products-section--neo .products-section__media img {
  width: 100%;
  max-width: 320px;
  height: 220px;
  object-fit: cover;
  border-radius: 12px;
  box-shadow: 0 10px 20px rgba(13, 40, 64, 0.12);
}

/* Lightbox styles */
.no-scroll {
  overflow: hidden;
}
.lightbox-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.9);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}
.lightbox-overlay.is-open {
  display: flex;
}
.lightbox-viewport {
  position: relative;
  width: 90vw;
  height: 90vh;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.35);
  padding: 24px;
}
.lightbox-image {
  max-width: 100%;
  max-height: 100%;
  transform-origin: center center;
  user-select: none;
  cursor: grab;
}
.lightbox-controls {
  position: fixed;
  inset: 0;
  z-index: 10000;
  pointer-events: none;
}
.lightbox-close {
  position: absolute;
  top: 20px;
  right: 24px;
  font-size: 22px;
  pointer-events: all;
}
.lightbox-zoom {
  position: absolute;
  left: 24px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 12px;
  pointer-events: all;
}
.lightbox-btn {
  background: #0d5aa6;
  color: #fff;
  border: 1px solid #0d5aa6;
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}
.lightbox-btn:hover {
  background: #2a7fd8;
  border-color: #2a7fd8;
}

@media (max-width: 1024px) {
  .products-hero__inner,
  .commercial-ready__layout,
  .products-section__split {
    grid-template-columns: 1fr;
  }

  .products-grid--three {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .products-grid--rows .product-card {
    flex-direction: column;
    align-items: stretch;
  }

  .products-grid--rows .product-card__media {
    flex: none;
    max-width: none;
    padding: 32px 24px 0;
  }

  .products-grid--rows .product-card__body {
    padding: 28px 24px 32px;
  }

  .products-hero__media {
    text-align: center;
  }

  .product-card__actions {
    justify-content: flex-start;
  }
}

@media (max-width: 768px) {
  .products-page .products-section {
    padding: 72px 0;
  }

  .products-hero {
    padding: 120px 0 72px;
  }

  .products-grid--three {
    grid-template-columns: 1fr;
  }

  .products-grid--rows {
    gap: 24px;
  }

  .product-card__media {
    padding: 32px 24px 0;
  }

  .product-card__body {
    padding: 28px 24px 32px;
  }

  .products-page .container {
    width: calc(100% - 32px);
  }
}

/* Brine/Other Technology image sizing on smaller screens */
@media (max-width: 1024px) {
  .products-section--brine .product-card--compact .product-card__media {
    flex: auto;
    width: 100%;
    height: auto;
    max-width: none;
    padding: 24px;
  }
}

@media (max-width: 768px) {
  .products-section--brine .product-card--compact .product-card__media {
    height: auto;
    padding: 20px;
  }
  .products-section--brine .product-card--compact .product-card__body {
    padding: 20px 18px 24px;
  }
  .products-section--brine .product-card--compact .product-card__body h3 {
    font-size: 1.35rem;
  }
}

.products-section--brine {
  padding-bottom: 72px;
}
