/* ========================================
   Top Runner Mold Transformer Styles (Template aligned)
   ======================================== */

.product-topmold-page .ehps-hero {
  background-image: url('../images/products/pro_back.webp');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  color: var(--color-white);
}

.product-topmold-page .ehps-hero .page-title,
.product-topmold-page .ehps-hero .page-subtitle {
  color: var(--color-white);
}

.product-topmold-page .topmold-title-break-sp {
  display: none;
}

/* 商品詳細と同様の暗いグレー＋白文字に統一 */
/* .content-box h2 の #1a202c を上書き（components.css, pages.css） */
.product-topmold-page .topmold-main-box h2,
.product-topmold-page .topmold-main-box .topmold-section-title {
  color: var(--color-white) !important;
}

.product-topmold-page .topmold-main-box {
  background-color: var(--color-gray-300);
  border: none;
  border-radius: var(--radius-none);
  padding: var(--spacing-3xl);
  display: flex;
  flex-direction: column;
  gap: var(--spacing-2xl);
  color: var(--color-white);
  text-align: left !important;
}

.product-topmold-page .topmold-main-box .solution-back-link .btn-outline,
.product-topmold-page .topmold-main-box .solution-back-link .btn,
.product-topmold-page .solution-back-link-mobile .btn-outline,
.product-topmold-page .solution-back-link-mobile .btn {
  color: var(--color-white);
  background-color: transparent;
  border-color: var(--color-white);
}
.product-topmold-page .topmold-main-box .solution-back-link .btn-outline:hover,
.product-topmold-page .topmold-main-box .solution-back-link .btn:hover,
.product-topmold-page .solution-back-link-mobile .btn-outline:hover,
.product-topmold-page .solution-back-link-mobile .btn:hover {
  color: var(--color-gray-300);
  background-color: var(--color-white);
  border-color: var(--color-white);
}

.product-topmold-page .topmold-main-box .btn-primary,
.product-topmold-page .topmold-main-box .btn-outline {
  color: var(--color-white);
  background-color: transparent;
  border-color: var(--color-white);
}
.product-topmold-page .topmold-main-box .btn-primary:hover,
.product-topmold-page .topmold-main-box .btn-outline:hover {
  color: var(--color-gray-300);
  background-color: var(--color-white);
  border-color: var(--color-white);
}

.product-topmold-page .topmold-section {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-lg);
  text-align: left !important;
}

.product-topmold-page .topmold-section p {
  text-align: left !important;
  color: var(--color-white);
}

.product-topmold-page .topmold-section-header {
  display: flex;
  align-items: flex-end;
  gap: var(--spacing-lg);
  width: 100%;
}

.product-topmold-page .topmold-section-title {
  font-size: var(--font-size-2xl);
  font-weight: var(--font-weight-bold);
  color: var(--color-white);
  margin: 0;
  text-align: left;
}

.product-topmold-page .topmold-section-subtitle {
  flex-shrink: 0;
  font-size: var(--font-size-lg);
  color: var(--color-white);
  margin: 0;
  font-style: italic;
  text-align: right;
  white-space: nowrap;
  line-height: 1.2;
}

.product-topmold-page .topmold-section-subtitle--right {
  margin-left: auto;
}

.product-topmold-page .topmold-section-divider {
  width: 100%;
  height: 1px;
  background-color: rgba(255, 255, 255, 0.3);
}

/* Hero -------------------------------------------------- */
.product-topmold-page .topmold-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.9fr);
  gap: var(--spacing-2xl);
  align-items: center;
}

.product-topmold-page .topmold-hero-left {
  width: 100%;
}

.product-topmold-page .topmold-hero-image {
  display: block;
  width: 100%;
  height: auto;
  border: none;
  filter: drop-shadow(0 18px 36px rgba(0, 0, 0, 0.25));
}

.product-topmold-page .topmold-hero-right {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-lg);
  align-items: flex-start;
  text-align: left;
}

.product-topmold-page .topmold-hero-badges {
  display: flex;
  gap: var(--spacing-lg);
  align-items: center;
}

.product-topmold-page .topmold-hero-badge {
  height: 110px;
  width: auto;
}

.product-topmold-page .topmold-main-box .topmold-hero-release {
  color: var(--color-white);
}

.product-topmold-page .topmold-main-box .topmold-hero-title {
  color: var(--color-white);
}

.product-topmold-page .topmold-main-box .topmold-hero-copy {
  color: var(--color-white);
}

.product-topmold-page .topmold-hero-release {
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-semibold);
  color: var(--color-white);
  margin: 0;
}

.product-topmold-page .topmold-hero-title {
  font-size: var(--font-size-3xl);
  font-weight: var(--font-weight-bold);
  color: var(--color-white);
  margin: 0;
}

.product-topmold-page .topmold-hero-copy {
  font-size: var(--font-size-base);
  color: var(--color-white);
  line-height: var(--line-height-relaxed);
  margin: 0;
}

/* Features -------------------------------------------------- */
.product-topmold-page .topmold-main-box .topmold-section-line {
  background-color: rgba(255, 255, 255, 0.3);
}

.product-topmold-page .topmold-section-line {
  border: none;
  height: 1px;
  background-color: #d1d5db;
  margin: 0;
}

.product-topmold-page .topmold-features .features-list {
  margin: var(--spacing-lg) 0;
  text-align: left !important;
}

.product-topmold-page .topmold-main-box .topmold-features .features-list li {
  color: var(--color-white);
}

.product-topmold-page .topmold-features .features-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.35em;
  margin-bottom: var(--spacing-sm);
  padding-left: 0;
  color: var(--color-white);
  text-align: left !important;
  /* 句読点・括弧など約物のみ詰める（Chrome/Edge 等。body の palt/halt と併用） */
  text-spacing-trim: normal;
  hanging-punctuation: allow-end;
}

.product-topmold-page .topmold-main-box .topmold-features .features-list li::before,
.product-topmold-page .topmold-features .features-list li::before {
  position: static;
  flex: 0 0 auto;
  width: auto;
  margin: 0;
  color: var(--color-white);
  font-weight: var(--font-weight-bold);
  line-height: inherit;
}

/* Specifications：仕様表は SVG（油入トップランナーと同方式） */
.product-topmold-page .topmold-spec-figure {
  margin: 0;
  text-align: center;
}

.product-topmold-page .topmold-spec-figure__img {
  display: block;
  width: 100%;
  max-width: 960px;
  height: auto;
  margin: 0 auto;
}

/* Certifications -------------------------------------------- */
.product-topmold-page .topmold-certifications {
  display: block;
}

.product-topmold-page .topmold-cert-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--spacing-xl);
}

.product-topmold-page .topmold-cert-item {
  flex: 0 1 calc((100% - 2 * var(--spacing-xl)) / 3);
  max-width: 260px;
  min-width: 200px;
}

.product-topmold-page .topmold-certifications .topmold-cert-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: var(--spacing-sm);
  width: 100%;
}

.product-topmold-page .topmold-cert-image {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border: 1px solid var(--color-gray-200);
  background-color: var(--color-white);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.product-topmold-page .topmold-main-box .topmold-cert-caption {
  color: var(--color-white);
}

.product-topmold-page .topmold-cert-caption {
  font-size: var(--font-size-sm);
  color: var(--color-white);
}

/* Download -------------------------------------------------- */
.product-topmold-page .topmold-download {
  text-align: center;
}

/* 資料ダウンロード（PDF）: 白い罫線ボタンに統一 */
.product-topmold-page .topmold-main-box .topmold-download .btn-primary {
  color: var(--color-white);
  background-color: transparent;
  border: 2px solid var(--color-white);
}

.product-topmold-page .topmold-main-box .topmold-download .btn-primary:hover {
  color: var(--color-gray-300);
  background-color: var(--color-white);
  border-color: var(--color-white);
}

.product-topmold-page .topmold-download .btn {
  min-width: 220px;
}

/* Responsive ------------------------------------------------ */
@media (max-width: 1100px) {
  .product-topmold-page .topmold-hero {
    grid-template-columns: 1fr;
    gap: var(--spacing-2xl);
  }

  .product-topmold-page .topmold-hero-image {
    width: min(90%, 460px);
  }

  .product-topmold-page .topmold-hero-badges {
    flex-wrap: wrap;
  }
}

@media (max-width: 768px) {
  .product-topmold-page .topmold-main-box {
    padding: var(--spacing-2xl);
    gap: var(--spacing-2xl);
  }

  .product-topmold-page .ehps-hero .page-title {
    line-height: 0.95;
  }

  .product-topmold-page .topmold-title-break-sp {
    display: initial;
  }

  .product-topmold-page .ehps-hero .page-subtitle {
    margin-top: calc(var(--font-size-3xl) * 0.95 + var(--spacing-xs));
  }

  .product-topmold-page .topmold-hero-badges {
    flex-wrap: nowrap;
    gap: var(--spacing-md);
    align-items: center;
  }

  .product-topmold-page .topmold-hero-badge {
    height: clamp(64px, 18vw, 96px);
    width: auto;
    max-width: none;
    object-fit: contain;
  }

  .product-topmold-page .topmold-hero-image {
    margin-inline: auto;
  }

  .product-topmold-page .topmold-hero-release {
    align-self: stretch;
    width: 100%;
    text-align: center;
  }

  /* スマホ：日本語1行 → その下に英字1行、ともに左揃え（PCは変更しない） */
  .product-topmold-page .topmold-section-header {
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 0.2rem;
  }

  .product-topmold-page .topmold-section-title {
    width: 100%;
    text-align: left;
    white-space: nowrap;
    font-size: clamp(1.3125rem, 6.2vw, var(--font-size-3xl));
    line-height: 1.35;
  }

  .product-topmold-page .topmold-section-subtitle,
  .product-topmold-page .topmold-section-subtitle--right {
    margin-left: 0;
    align-self: flex-start;
    width: 100%;
    text-align: left;
    white-space: nowrap;
    font-size: clamp(0.8125rem, 3.6vw, 1rem);
    line-height: 1.3;
  }

  /* 英字↔hr・hr↔本文を hr の上下マージンだけで統一（gap 二重を防ぐ） */
  .product-topmold-page .topmold-section {
    gap: 0;
  }

  .product-topmold-page .topmold-section-line {
    margin-top: var(--spacing-lg);
    margin-bottom: var(--spacing-lg);
  }

  .product-topmold-page .topmold-features .features-list {
    margin-top: 0;
  }

  .product-topmold-page .topmold-feature-list {
    grid-template-columns: 1fr;
  }

  /* 認定画像：スマホのみ2列＋5枚目中央（PCの flex 3列は上書きしない） */
  .product-topmold-page .topmold-cert {
    overflow-x: visible;
  }

  .product-topmold-page .topmold-cert .topmold-cert-grid {
    --topmold-cert-gap: var(--spacing-md);
    --topmold-cert-grid-w: 84vw;
    --topmold-cert-w: calc((var(--topmold-cert-grid-w) - var(--topmold-cert-gap)) / 2);
    --topmold-cert-h: calc(var(--topmold-cert-w) * 4 / 3);
    display: grid;
    grid-template-columns: repeat(2, var(--topmold-cert-w));
    gap: var(--topmold-cert-gap);
    justify-content: center;
    justify-items: center;
    width: var(--topmold-cert-grid-w);
    max-width: var(--topmold-cert-grid-w);
    margin-inline: calc(50% - (var(--topmold-cert-grid-w) / 2));
    padding-inline: 0;
    box-sizing: border-box;
    flex-wrap: unset;
  }

  .product-topmold-page .topmold-cert .topmold-cert-item {
    flex: none;
    width: var(--topmold-cert-w);
    max-width: var(--topmold-cert-w);
    min-width: var(--topmold-cert-w);
  }

  .product-topmold-page .topmold-cert .topmold-cert-item:nth-child(5) {
    grid-column: 1 / -1;
    justify-self: center;
    width: var(--topmold-cert-w);
    max-width: var(--topmold-cert-w);
  }

  .product-topmold-page .topmold-cert .topmold-cert-grid .topmold-cert-image {
    display: block;
    box-sizing: border-box;
    width: var(--topmold-cert-w);
    max-width: var(--topmold-cert-w);
    min-width: var(--topmold-cert-w);
    height: var(--topmold-cert-h);
    max-height: var(--topmold-cert-h);
    min-height: var(--topmold-cert-h);
    aspect-ratio: unset;
    object-fit: cover;
  }
}

@media (max-width: 576px) {
  .product-topmold-page .topmold-kema-gallery .topmold-cert-image {
    max-width: 240px;
  }
}

