/* ==========================================================================
   Products Page - Desktop View
   Uses project variables from variables.css
   ========================================================================== */

/* Hero Section
   -------------------------------------------------------------------------- */
.products_hero {
  background-color: var(--secondary-100);
  padding: var(--spacing-10) var(--spacing-12);
}

.products_hero_inner {
  max-width: 1440px;
  margin: 0 auto;
  display: flex;
  gap: var(--spacing-6);
  align-items: center;
}

.products_hero_text_box {
  background-color: var(--secondary);
  padding: var(--spacing-9);
  border-radius: var(--radius-5);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--spacing-4);
  flex: 1 1 0;
  min-width: 0;
}

.products_hero_breadcrumb {
  display: flex;
  align-items: center;
  gap: var(--spacing-1);
}

.products_hero_breadcrumb_link {
  font-size: var(--text-btn-small);
  font-weight: var(--font-weight-500);
  color: var(--black);
  text-decoration: none;
  letter-spacing: 0.5px;
}

.products_hero_breadcrumb_link:hover {
  color: var(--primary);
}

.products_hero_breadcrumb_icon {
  width: 16px;
  height: 16px;
  color: var(--black);
}

.products_hero_breadcrumb_current {
  font-size: var(--text-btn-small);
  font-weight: var(--font-weight-500);
  color: var(--primary);
  letter-spacing: 0.5px;
}

.products_hero_title_block {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-2);
}

.products_hero_title {
  font-size: var(--text-h1);
  font-weight: var(--font-weight-700);
  line-height: 1.16667;
  color: var(--black);
  margin: 0;
}

.products_hero_title_accent {
  color: var(--primary);
}

.products_hero_description {
  font-size: var(--text-large);
  font-weight: var(--font-weight-400);
  line-height: 1.55556;
  color: var(--black);
  margin: 0;
}

.products_hero_image {
  flex: 1 1 0;
  min-width: 0;
  border-radius: var(--radius-5);
  overflow: hidden;
  aspect-ratio: 612 / 434;
}

.products_hero_image_bg {
  width: 100%;
  height: 100%;
  min-height: 394px;
}

/* Section Label (shared)
   -------------------------------------------------------------------------- */
.products_section_label {
  display: flex;
  align-items: center;
  gap: var(--spacing-2);
}

.products_section_dash {
  width: 32px;
  height: 2px;
  background-color: var(--primary);
  border-radius: 9999px;
}

.products_section_label_text {
  font-size: var(--text-citation);
  font-weight: var(--font-weight-500);
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0;
}

/* Product Sections
   -------------------------------------------------------------------------- */
.products_section {
  padding: var(--spacing-10) var(--spacing-12);
  background-color: var(--white);
}

.products_section_inner {
  max-width: 1440px;
  margin: 0 auto;
  display: flex;
  gap: var(--spacing-6);
  align-items: stretch;
}

.products_section_reverse .products_section_inner {
  flex-direction: row-reverse;
}

/* Screenshot container (image-left sections) */
.products_section_screenshot {
  flex: 1 1 0;
  min-width: 0;
  border-radius: var(--radius-5);
  background-color: var(--secondary-200);
  position: relative;
  min-height: 440px;
  display: flex;
  align-items: center;
}

.products_section_screenshot img {
  position: absolute;
  left: -20px;
  width: calc(100% + 20px);
  height: auto;
  border-radius: var(--radius-3);
  box-shadow: -4px 4px 24px rgba(0, 0, 0, 0.08);
  display: block;
}

/* Screenshot container (image-right / reversed sections) */
.products_section_reverse .products_section_screenshot img {
  left: auto;
  right: -20px;
  width: calc(100% + 20px);
  box-shadow: 4px 4px 24px rgba(0, 0, 0, 0.08);
}

/* Content side */
.products_section_content {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: var(--spacing-8);
  justify-content: center;
  padding: var(--spacing-5) 0;
}

.products_section_details {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-6);
}

.products_section_header {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-3);
}

/* Product Logo */
.products_product_logo {
  width: 294px;
  height: 96px;
  border-radius: var(--radius-3);
  overflow: hidden;
}

.products_product_logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.products_section_description {
  font-size: var(--text-large);
  font-weight: var(--font-weight-400);
  line-height: 1.55556;
  color: var(--black);
  margin: 0;
}

/* Built For box */
.products_built_for {
  border: var(--stroke-1) solid var(--primary);
  border-radius: var(--radius-3);
  padding: var(--spacing-4);
  font-size: var(--text-small);
  font-weight: var(--font-weight-400);
  line-height: 1.42857;
}

.products_built_for_label {
  color: var(--primary);
  margin-right: var(--spacing-1);
}

.products_built_for_text {
  color: var(--neutral-600);
}

/* Features grid */
.products_features {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--spacing-4);
}

.products_feature_item {
  display: flex;
  align-items: center;
  gap: var(--spacing-2);
  font-size: var(--text-small);
  font-weight: var(--font-weight-400);
  color: var(--black);
  line-height: 1.42857;
}

.products_feature_icon {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  background-color: var(--secondary);
  border-radius: var(--radius-6);
  display: flex;
  align-items: center;
  justify-content: center;
}

.products_feature_icon svg {
  width: 16px;
  height: 16px;
}

/* View Button */
.products_view_btn {
  align-self: flex-start;
  padding: var(--spacing-3) var(--spacing-6);
  font-size: var(--text-btn-primary);
  font-weight: var(--font-weight-600);
  letter-spacing: 0.5px;
  text-decoration: none;
}

.products_btn_icon {
  width: 16px;
  height: 16px;
  filter: brightness(0) invert(1);
}

/* WellEdge Section Layout (Product 6)
   Uses CSS Grid so desktop = original look, mobile = stacks naturally
   -------------------------------------------------------------------------- */
.products_section_wellEdge {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: auto auto auto;
  column-gap: var(--spacing-6);
  row-gap: 0;
}

/* Row 1, Col 1: content */
.products_wellEdge_content {
  grid-column: 1;
  grid-row: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: var(--spacing-6);
}

/* Row 2, Col 1+2: partner cards (full width) */
.products_section_wellEdge .products_partner_cards {
  grid-column: 1 / 3;
  grid-row: 2;
}

/* Row 3, Col 1+2: button (full width, centered) */
.products_section_wellEdge .products_partner_action {
  grid-column: 1 / 3;
  grid-row: 3;
}

/* Col 2, Rows 1–3: screenshot pinned to the right column */
.products_wellEdge_screenshot {
  grid-column: 2;
  grid-row: 1;
  border-radius: var(--radius-5);
  background-color: var(--secondary-200);
  position: relative;
  min-height: 440px;
  display: flex;
  align-items: center;
}

.products_wellEdge_screenshot img {
  position: absolute;
  right: -20px;
  width: calc(100% + 20px);
  height: auto;
  border-radius: var(--radius-3);
  box-shadow: 4px 4px 24px rgba(0, 0, 0, 0.08);
  display: block;
}

/* Partner Cards (Product 6 / WellEdge)
   -------------------------------------------------------------------------- */
.products_partner_cards {
  display: flex;
  gap: var(--spacing-6);
  margin-top: var(--spacing-9);
}

.products_partner_card {
  flex: 1 1 0;
  min-width: 0;
  background-color: var(--white);
  border: var(--stroke-1) solid var(--border);
  border-radius: var(--radius-5);
  padding: var(--spacing-6);
  display: flex;
  flex-direction: column;
  gap: var(--spacing-4);
}

.products_partner_card_icon {
  width: 48px;
  height: 48px;
  background-color: var(--secondary-200);
  border-radius: var(--radius-3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--text-h6);
  font-weight: var(--font-weight-600);
  color: var(--black);
  flex-shrink: 0;
}

.products_partner_card_body {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-2);
}

.products_partner_card_title {
  font-size: var(--text-h6);
  font-weight: var(--font-weight-600);
  line-height: 1.375;
  color: var(--black);
  margin: 0;
}

.products_partner_card_desc {
  font-size: var(--text-small);
  font-weight: var(--font-weight-400);
  line-height: 1.42857;
  color: var(--neutral-600);
  margin: 0;
}

.products_partner_action {
  display: flex;
  justify-content: center;
  padding: var(--spacing-9) 0 0;
}

/* CTA Section
   -------------------------------------------------------------------------- */
.products_cta {
  background-color: var(--secondary);
  padding: var(--spacing-10) var(--spacing-12);
}

.products_cta_inner {
  max-width: 1036px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--spacing-3);
  text-align: center;
}

.products_cta_label {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--spacing-2);
}

.products_cta_title {
  font-size: var(--text-h2);
  font-weight: var(--font-weight-700);
  line-height: 1.22222;
  color: var(--black);
  margin: 0;
}

.products_cta_title_accent {
  color: var(--primary);
}

.products_cta_description {
  font-size: var(--text-large);
  font-weight: var(--font-weight-400);
  line-height: 1.55556;
  color: var(--black);
  margin: 0;
}

.products_cta_actions {
  display: flex;
  gap: var(--spacing-4);
  margin-top: var(--spacing-3);
}

.products_cta_icon {
  width: 24px;
  height: 24px;
  filter: brightness(0) invert(1);
}

/* ==========================================================================
   Products Page - Mobile Responsive (≤ 768px)
   ========================================================================== */
@media (max-width: 768px) {

  /* Hero Section
     ------------------------------------------------------------------------ */
  .products_hero {
    padding: var(--spacing-6) var(--spacing-4);
  }

  .products_hero_inner {
    flex-direction: column;
    gap: var(--spacing-4);
  }

  .products_hero_text_box {
    padding: var(--spacing-6);
    gap: var(--spacing-3);
    width: 100%;
  }

  .products_hero_title {
    font-size: clamp(1.75rem, 7vw, 2.5rem);
    line-height: 1.2;
  }

  .products_hero_description {
    font-size: var(--text-regular);
  }

  .products_hero_image {
    width: 100%;
    aspect-ratio: 4 / 3;
  }

  .products_hero_image_bg {
    min-height: 220px;
  }

  /* Product Sections
     ------------------------------------------------------------------------ */
  .products_section {
    padding: var(--spacing-8) var(--spacing-4);
  }

  /* All product sections: screenshot on top, content below */
  .products_section_inner,
  .products_section_reverse .products_section_inner {
    flex-direction: column;
    gap: 0;
  }

  /* Screenshot container: fixed height, full-width */
  .products_section_screenshot {
    width: 100%;
    height: 220px;
    flex: none;
    border-radius: var(--radius-5) var(--radius-5) 0 0;
    overflow: hidden;
  }

  /* Reset the absolute-positioned image to fill the container naturally */
  .products_section_screenshot img,
  .products_section_reverse .products_section_screenshot img {
    position: relative;
    top: auto;
    left: auto;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top left;
    border-radius: 0;
    box-shadow: none;
  }

  /* Content side */
  .products_section_content {
    flex: none;
    width: 100%;
    gap: var(--spacing-5);
    padding-top: var(--spacing-6);
  }

  .products_section_details {
    gap: var(--spacing-4);
  }

  .products_section_description {
    font-size: var(--text-regular);
  }

  /* Product Logo */
  .products_product_logo {
    width: 100%;
    max-width: 220px;
    height: 72px;
  }

  /* Built For box */
  .products_built_for {
    font-size: var(--text-caption);
  }

  /* Features grid — keep 2 columns on mobile (matches design) */
  .products_features {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--spacing-3);
  }

  .products_feature_item {
    font-size: var(--text-caption);
    align-items: flex-start;
    gap: var(--spacing-1);
  }

  /* View Button — full width on mobile */
  .products_view_btn {
    align-self: stretch;
    text-align: center;
    justify-content: center;
  }

  /* WellEdge Section Layout
     ------------------------------------------------------------------------ */
  .products_section_wellEdge {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-6);
  }

  /* Screenshot: full-width card, appears last (correct DOM order) */
  .products_wellEdge_screenshot {
    width: 100%;
    height: 240px;
    min-height: 0;
    flex: none;
    border-radius: var(--radius-5);
    overflow: hidden;
  }

  .products_wellEdge_screenshot img {
    position: relative;
    top: auto;
    left: auto;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
    border-radius: 0;
    box-shadow: none;
  }

  .products_wellEdge_content {
    gap: var(--spacing-4);
  }

  /* Partner Cards (WellEdge)
     ------------------------------------------------------------------------ */
  .products_section_wellEdge .products_partner_cards {
    flex-direction: column;
    gap: var(--spacing-4);
    margin-top: 0;
  }

  .products_partner_card {
    flex-direction: row;
    align-items: flex-start;
    gap: var(--spacing-4);
    padding: var(--spacing-4);
  }

  .products_partner_card_icon {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-3);
    flex-shrink: 0;
  }

  .products_section_wellEdge .products_partner_action {
    padding: 0;
  }

  .products_partner_action .btn {
    width: 100%;
    justify-content: center;
  }

  /* CTA Section
     ------------------------------------------------------------------------ */
  .products_cta {
    padding: var(--spacing-8) var(--spacing-4);
  }

  .products_cta_title {
    font-size: clamp(1.5rem, 6vw, 2rem);
    line-height: 1.3;
  }

  .products_cta_description {
    font-size: var(--text-regular);
  }

  .products_cta_actions {
    flex-direction: column;
    width: 100%;
    gap: var(--spacing-3);
  }

  .products_cta_actions .btn {
    width: 100%;
    justify-content: center;
  }
}