/* ARIAN v18 — approved responsive layout from exact-hex preview v5.
 * Scope: Products page responsive only. Does not alter the desktop design.
 * Important: preserves each card's existing navy hexagon background-image.
 */

@media (max-width: 1100px) {
  #products-structure,
  #products-usage,
  #products-raw-materials {
    overflow: visible !important;
  }
}

@media (max-width: 767px) {
  .c-section--products .o-section__wrapper,
  #products-structure .o-section__wrapper,
  #products-usage .o-section__wrapper,
  #products-raw-materials .o-section__wrapper {
    padding-left: 14px !important;
    padding-right: 14px !important;
    box-sizing: border-box !important;
  }

  /* Section titles: layout only; typography/color remain theme-controlled. */
  #products-structure > .title,
  #products-usage .c-products-usage-content > .title,
  #products-raw-materials .c-products-usage-content > .title {
    justify-content: center !important;
    text-align: center !important;
    width: max-content !important;
    max-width: calc(100% - 24px) !important;
    margin-left: auto !important;
    margin-right: auto !important;
    margin-bottom: 26px !important;
  }

  /* Polymer structure: two equal columns. */
  #products-structure {
    padding: 30px 0 36px !important;
  }

  #products-structure .c-products-tabs {
    display: block !important;
  }

  #products-structure .tabs-content {
    width: 100% !important;
    height: auto !important;
    aspect-ratio: auto !important;
    padding: 0 !important;
  }

  #products-structure .tabs {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 24px 14px !important;
    width: 100% !important;
    height: auto !important;
    padding: 0 !important;
    align-items: start !important;
  }

  #products-structure .tabs .tab,
  #products-structure .tabs .tab:nth-child(n) {
    width: 100% !important;
    margin: 0 !important;
    transform: none !important;
    justify-content: center !important;
  }

  #products-structure .tab .home-services__item {
    width: 145px !important;
    min-width: 145px !important;
    max-width: 145px !important;
    height: 160px !important;
    min-height: 160px !important;
    max-height: 160px !important;
    margin: 0 auto !important;
    overflow: visible !important;
    /* Never use background shorthand here: it would remove the navy hexagon. */
    background-color: transparent !important;
  }

  #products-structure .home-services__item > .u-flex.u-flex--column.items-center {
    width: 100% !important;
    height: 100% !important;
    box-sizing: border-box !important;
    padding: 12px 10px !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    overflow: visible !important;
    background-color: transparent !important;
  }

  /* User-approved fix: remove only the gray inner pseudo-layer.
     The navy hexagon belongs to the card itself and remains untouched. */
  #products-structure .home-services__item > .u-flex.u-flex--column.items-center::before {
    content: none !important;
    display: none !important;
    background: none !important;
  }

  #products-structure .tabs .tab img {
    display: block !important;
    position: static !important;
    width: 74px !important;
    height: 64px !important;
    max-width: 72% !important;
    max-height: 64px !important;
    margin: 0 auto !important;
    object-fit: contain !important;
    object-position: center !important;
    filter: none !important;
    transform: none !important;
  }

  #products-structure .panes {
    width: 100% !important;
    margin-top: 30px !important;
  }

  #products-structure .pane {
    width: 100% !important;
    box-sizing: border-box !important;
    padding: 18px !important;
    border-radius: 12px !important;
  }

  /* Usage + raw materials: same equal two-column rhythm. */
  #products-usage,
  #products-raw-materials {
    padding: 40px 0 48px !important;
  }

  #products-usage .c-products-usage-content > ul,
  #products-raw-materials .c-products-usage-content > ul {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 24px 14px !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    align-items: start !important;
    justify-content: center !important;
  }

  #products-usage .home-services__item,
  #products-raw-materials .home-services__item {
    width: 145px !important;
    min-width: 145px !important;
    max-width: 145px !important;
    height: 160px !important;
    min-height: 160px !important;
    max-height: 160px !important;
    margin: 0 auto !important;
    overflow: visible !important;
    background-color: transparent !important;
  }

  #products-usage .home-services__item > a,
  #products-raw-materials .home-services__item > a {
    width: 100% !important;
    height: 100% !important;
    box-sizing: border-box !important;
    padding: 12px 8px 10px !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    overflow: visible !important;
    background-color: transparent !important;
    box-shadow: none !important;
  }

  #products-usage .home-services__item .on-hover,
  #products-raw-materials .home-services__item .on-hover {
    display: none !important;
  }

  #products-usage .home-services__item .df-img {
    display: block !important;
    position: static !important;
    width: 78px !important;
    height: 64px !important;
    max-width: 76% !important;
    max-height: 64px !important;
    margin: 0 auto !important;
    object-fit: contain !important;
    object-position: center !important;
    opacity: 1 !important;
    transform: none !important;
    filter: none !important;
  }

  #products-raw-materials .apm-raw-media {
    position: relative !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 110px !important;
    height: 68px !important;
    flex: 0 0 68px !important;
    max-width: 82% !important;
    margin: 0 auto !important;
    overflow: visible !important;
  }

  #products-raw-materials .apm-raw-media .df-img {
    display: block !important;
    position: static !important;
    inset: auto !important;
    width: 100% !important;
    height: 100% !important;
    max-width: 100% !important;
    max-height: 100% !important;
    margin: 0 !important;
    object-fit: contain !important;
    object-position: center !important;
    opacity: 1 !important;
    transform: none !important;
    filter: none !important;
  }

  /* Card title layout only: keep theme typography/color, reserve stable space. */
  #products-structure .home-services__item h2,
  #products-usage .home-services__item h2,
  #products-raw-materials .home-services__item h2 {
    position: static !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    max-width: 122px !important;
    min-height: 42px !important;
    margin: 0 auto !important;
    padding: 0 !important;
    text-align: center !important;
    white-space: normal !important;
    word-break: normal !important;
    overflow-wrap: anywhere !important;
    background-color: transparent !important;
  }

  #products-structure .home-services__item h2::before,
  #products-usage .home-services__item h2::before,
  #products-raw-materials .home-services__item h2::before {
    content: none !important;
    display: none !important;
  }

  #products-structure .home-services__item h2::after,
  #products-usage .home-services__item h2::after,
  #products-raw-materials .home-services__item h2::after {
    content: "" !important;
    position: static !important;
    display: block !important;
    width: 30px !important;
    min-width: 30px !important;
    max-width: 30px !important;
    height: 2px !important;
    flex: 0 0 2px !important;
    margin: 7px auto 0 !important;
    padding: 0 !important;
    background: #FFD400 !important;
    border: 0 !important;
    border-radius: 2px !important;
    transform: none !important;
    left: auto !important;
    right: auto !important;
    top: auto !important;
    bottom: auto !important;
  }

  #products-raw-materials .home-services__item:last-child {
    grid-column: 1 / -1 !important;
    justify-self: center !important;
  }
}

@media (min-width: 768px) and (max-width: 1100px) {
  #products-structure .tabs {
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 24px !important;
    width: 100% !important;
    height: auto !important;
  }

  #products-structure .tabs .tab,
  #products-structure .tabs .tab:nth-child(n) {
    width: 100% !important;
    margin: 0 !important;
    transform: none !important;
    justify-content: center !important;
  }

  #products-usage .c-products-usage-content > ul,
  #products-raw-materials .c-products-usage-content > ul {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 26px 20px !important;
  }
}
