/* ARIAN v9 — Raw Materials section on Products page.
 * Scope: #products-raw-materials only.
 * Geometry follows the first rendered card in #products-usage via CSS variables
 * populated by arian-products-raw-sync.js. Hover/opacity/margins are NOT cloned.
 */
#products-raw-materials {
  --apm-raw-card-w: 220px;
  --apm-raw-card-h: 242px;
  --apm-raw-img-w: 178px;
  --apm-raw-img-h: 120px;
  --apm-raw-title-size: 15px;
  margin-top: 56px;
  padding: 46px 0 68px;
  background: rgb(251, 251, 251);
  scroll-margin-top: 110px;
  box-sizing: border-box;
}

#products-raw-materials .c-products-usage-content > .title {
  margin-top: 0;
  margin-bottom: 38px;
}

#products-raw-materials .c-products-usage-content > ul {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: flex-start;
  gap: 16px;
  width: 100%;
  box-sizing: border-box;
}

#products-raw-materials .home-services__item {
  position: relative;
  flex: 0 0 var(--apm-raw-card-w) !important;
  width: var(--apm-raw-card-w) !important;
  height: var(--apm-raw-card-h) !important;
  min-width: var(--apm-raw-card-w) !important;
  max-width: var(--apm-raw-card-w) !important;
  min-height: var(--apm-raw-card-h) !important;
  max-height: var(--apm-raw-card-h) !important;
  box-sizing: border-box;
  background-size: 100% 100% !important;
  background-repeat: no-repeat !important;
  background-position: center !important;
}

#products-raw-materials .home-services__item > a {
  position: relative;
  width: 100%;
  height: 100%;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 24px 22px 25px;
  overflow: hidden;
}

/* Dedicated stable image stage prevents hover from changing layout height. */
#products-raw-materials .apm-raw-media {
  position: relative;
  display: block;
  flex: 0 0 var(--apm-raw-img-h);
  width: var(--apm-raw-img-w);
  height: var(--apm-raw-img-h);
  max-width: 84%;
  margin: 0 auto;
  overflow: visible;
}

/* v9 uses clean SVG artwork, so no corner masks are needed. */
#products-raw-materials .apm-raw-media::before,
#products-raw-materials .apm-raw-media::after {
  content: none !important;
  display: none !important;
}

#products-raw-materials .apm-raw-media img {
  position: absolute !important;
  inset: 0 !important;
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  max-width: 100% !important;
  max-height: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  object-fit: contain !important;
  object-position: center !important;
  background: transparent !important;
  transform-origin: center;
  transition: opacity .28s ease, transform .28s ease, filter .28s ease;
}

#products-raw-materials .apm-raw-media .df-img {
  opacity: 1 !important;
  transform: scale(1) !important;
  filter: none !important;
  z-index: 2;
}

#products-raw-materials .apm-raw-media .on-hover {
  opacity: 0 !important;
  transform: scale(.97) !important;
  filter: none !important;
  z-index: 3;
}

#products-raw-materials .home-services__item:hover .apm-raw-media .df-img,
#products-raw-materials .home-services__item:focus-within .apm-raw-media .df-img {
  opacity: 0 !important;
  transform: scale(1.03) !important;
}

#products-raw-materials .home-services__item:hover .apm-raw-media .on-hover,
#products-raw-materials .home-services__item:focus-within .apm-raw-media .on-hover {
  opacity: 1 !important;
  transform: scale(1) !important;
}

#products-raw-materials .home-services__item h2 {
  position: relative;
  display: block;
  width: auto !important;
  max-width: calc(100% - 22px) !important;
  margin: 0 !important;
  padding: 0 0 12px !important;
  color: var(--color-text);
  font-size: var(--apm-raw-title-size) !important;
  font-weight: 600;
  line-height: 1.65;
  text-align: center;
  overflow-wrap: normal;
  word-break: normal;
  transition: color .2s ease;
}

/* Kill inherited decorative lines; draw one controlled line inside the title box. */
#products-raw-materials .home-services__item h2::before {
  content: none !important;
  display: none !important;
}

#products-raw-materials .home-services__item h2::after {
  content: "" !important;
  position: absolute !important;
  left: 50% !important;
  right: auto !important;
  bottom: 0 !important;
  width: 38px !important;
  min-width: 38px !important;
  max-width: 38px !important;
  height: 2px !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 2px;
  background: #FFD400 !important;
  transform: translateX(-50%) !important;
}

#products-raw-materials .home-services__item:hover h2,
#products-raw-materials .home-services__item:focus-within h2 {
  color: var(--color-secondary);
}

#products-raw-materials .home-services__item.is-disabled {
  opacity: .55;
  filter: grayscale(1);
}
#products-raw-materials .home-services__item.is-disabled > a { pointer-events: none; }

@media (max-width: 767px) {
  #products-raw-materials {
    margin-top: 42px;
    padding: 38px 0 52px;
    scroll-margin-top: 88px;
  }
  #products-raw-materials .c-products-usage-content > .title { margin-bottom: 28px; }
  #products-raw-materials .c-products-usage-content > ul { gap: 16px 12px; }
  #products-raw-materials .home-services__item > a { padding: 18px 14px 19px; gap: 6px; }
  #products-raw-materials .home-services__item h2 { line-height: 1.55; padding-bottom: 10px !important; }
  #products-raw-materials .home-services__item h2::after {
    width: 32px !important;
    min-width: 32px !important;
    max-width: 32px !important;
  }
}
