.product-detail-hero__bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -2;
}

.product-detail-hero__bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: bottom;
}

.product-detail-hero {
  background: url(../../img/tower/hero-product-detail-pc.webp);
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center center;
  color: #fff;
  border-radius: 0 0 4rem 4rem;
  padding: 2.2rem 0;
  height: 37.4rem;
  margin-bottom: 4rem;
  position: relative;
  z-index: 1;
  overflow: hidden;
}

@media screen and (min-width: 769px) {
  .product-detail-hero {
    margin-top: calc(-1 * var(--site-header-offset, 80px));
    padding-top: calc(2.2rem + var(--site-header-offset, 80px));
  }
}

.product-detail-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: 0 0 40px 40px;
  background: linear-gradient(90deg,
      #4a3d6a 0.48%,
      rgba(58, 90, 205, 0.62) 67.86%,
      rgba(112, 158, 239, 0.34) 104.84%,
      rgba(97, 169, 246, 0) 150.92%);
  mix-blend-mode: multiply;
}

@media screen and (min-width: 1600px) {
  .product-detail-hero,
  .product-detail-hero::before {
    border-radius: 0 0 55px 55px;
  }
}

.product-detail-hero__inner {
  max-width: 116rem;
  width: 100%;
  height: 100%;
  margin: 0 auto;
  padding: 0 2.4rem;
  position: relative;
}

.product-detail-hero__breadcrumb {
  font-family: 'Noto Sans JP', sans-serif;
  font-style: normal;
  font-weight: 500;
  font-size: 1.6rem;
  line-height: 1;
  letter-spacing: 0;
  position: relative;
  z-index: 2;
}

.product-detail-hero__breadcrumb a {
  color: #fff;
  text-decoration: none;
}

.product-detail-hero__breadcrumb a:hover {
  opacity: 0.7;
}

.product-detail-hero__breadcrumb-list {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  list-style: none;
  padding: 0;
  margin: 0;
  row-gap: 10px;
}

.product-detail-hero__breadcrumb-item {
  display: flex;
  align-items: center;
  white-space: nowrap;
}

.product-detail-hero__breadcrumb-item>a,
.product-detail-hero__breadcrumb-item>span {
  display: inline-flex;
  align-items: center;
  line-height: 1;
}

.product-detail-hero__breadcrumb-item+.product-detail-hero__breadcrumb-item::before {
  content: '';
  display: block;
  flex: 0 0 auto;
  width: 0.45em;
  height: 0.45em;
  border-top: 1px solid currentColor;
  border-right: 1px solid currentColor;
  transform: rotate(45deg);
  margin: 0 0.5em;
}

.product-detail-hero__breadcrumb-separator {
  display: inline-block;
  margin: 0 0.5em;
  vertical-align: middle;
}

.icon.ionic-ios-arrow-forward {
  width: 0.45em;
  height: 0.45em;
  border-top: 1px solid currentColor;
  border-right: 1px solid currentColor;
  transform: rotate(45deg);
}

.product-detail-hero__content {
  position: relative;
  width: 100%;
  height: 100%;
}

.product-detail-hero__title {
  position: absolute;
  top: 13.4rem;
  left: 50%;
  transform: translateX(-50%);
  width: fit-content;
  max-width: 100%;
  font-size: 4rem;
  font-weight: 400;
  margin-bottom: 2.6rem;
  line-height: 1.3;
  text-align: center;
}

.product-detail-hero__subtitle {
  position: absolute;
  top: 20.9rem;
  left: 50%;
  transform: translateX(-50%);
  width: min(112rem, calc(100% - 5.4rem));
  font-size: 1.8rem;
  line-height: 1.8;
  margin: 0;
  text-align: center;
  white-space: nowrap;
  font-weight: 500;
}

.product-detail-hero__content--no-subtitle .product-detail-hero__title,
.product-detail-hero__content:not(:has(.product-detail-hero__subtitle)) .product-detail-hero__title,
.product-detail-hero__content:has(.product-detail-hero__subtitle:empty) .product-detail-hero__title {
  top: 17.4rem;
  font-weight: 500;
}

.product-detail-hero__content:has(.product-detail-hero__subtitle:not(:empty)) .product-detail-hero__title {
  font-weight: 500;
}

@media screen and (min-width: 769px) {
  .product-detail-hero {
    height: calc(37.4rem + 79px);
  }

  .product-detail-hero__title {
    white-space: nowrap;
    top: calc(13.4rem - 53px);
  }

  .page-tower-product-round-type .product-detail-hero__title {
    transform: translateX(calc(-50% - 11px));
    color: #fff;
    text-align: center;
    leading-trim: both;
    text-edge: cap;
    font-family: 'Noto Sans JP', sans-serif;
    font-size: 40px;
    font-style: normal;
    font-weight: 500;
    line-height: 56px;
  }

  .page-tower-product-round-type .product-detail-hero__subtitle {
    top: calc(20.9rem - 53px);
    transform: translateX(calc(-50% - 11px));
  }

  .product-detail-hero__content--no-subtitle .product-detail-hero__title,
  .product-detail-hero__content:not(:has(.product-detail-hero__subtitle)) .product-detail-hero__title,
  .product-detail-hero__content:has(.product-detail-hero__subtitle:empty) .product-detail-hero__title {
    top: calc(17.4rem - 53px);
  }
}


@media screen and (max-width: 768px) {
  .product-detail-hero {
    width: 100%;
    margin-left: 0;
    margin-top: 0;
    height: 44.6rem;
    min-height: 44.6rem;
    padding: 3rem 0;
    border-radius: 0 0 4rem 4rem;
  }

  .page-tower-product-round-type .product-detail-hero {
    height: 37.4rem;
    min-height: 37.4rem;
  }

  .page-tower-product-round-type .product-detail-hero__breadcrumb {
    position: relative;
    left: -2px;
    top: -7px;
    display: flex;
    flex-wrap: wrap;
    row-gap: 8px;
  }

  .page-tower-product-round-type .product-detail-hero__breadcrumb-item+.product-detail-hero__breadcrumb-item::before {
    margin: 0 0.5em 0 0;
  }

  .product-detail-hero__title {
    top: 9.7rem;
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 5.4rem);
    font-family: 'Noto Sans JP', sans-serif;
    font-style: normal;
    font-weight: 700;
    font-size: 24px;
    line-height: 36px;
    letter-spacing: 0;
    text-align: center;
  }

  .product-detail-hero__subtitle {
    display: none;
  }

  .product-detail-hero__content--no-subtitle .product-detail-hero__title,
  .product-detail-hero__content:not(:has(.product-detail-hero__subtitle)) .product-detail-hero__title,
  .product-detail-hero__content:has(.product-detail-hero__subtitle:empty) .product-detail-hero__title {
    top: 9.7rem;
  }

}
/* SubPageHero component styles (maintenance variant) */
.page-tower-maintenance .sub-page-hero {
    background: url(../../img/tower/maintenance-hero-bg.webp);
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center bottom;
    color: #fff;
    border-radius: 0 0 5.5rem 5.5rem;
    padding: 2.2rem 0;
    height: 37.4rem;
    position: relative;
    z-index: 1;
    overflow: hidden;
}

@media screen and (min-width: 769px) {
  .page-tower-maintenance .sub-page-hero {
    padding: 12.1rem 0 0;
    height: calc(37.4rem + var(--site-header-offset, 80px));
    max-height: calc(37.4rem + var(--site-header-offset, 80px));
  }
}

.page-tower-maintenance .sub-page-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg,
        #4a3d6a 0.48%,
        rgba(58, 90, 205, 0.62) 67.86%,
        rgba(112, 158, 239, 0.34) 104.84%,
        rgba(97, 169, 246, 0) 150.92%);
    mix-blend-mode: multiply;
    z-index: -1;
}

.page-tower-maintenance .sub-page-hero .product-detail-hero__inner {
    max-width: 116rem;
    width: 100%;
    margin: 0 auto;
    padding: 0 2.4rem;
}

.page-tower-maintenance .sub-page-hero .product-detail-hero__breadcrumb {
    position: relative;
    z-index: 2;
}

.page-tower-maintenance .sub-page-hero .product-detail-hero__breadcrumb-list {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    list-style: none;
    padding: 0;
    margin: 0;
    row-gap: 1rem;
}

.page-tower-maintenance .sub-page-hero .product-detail-hero__breadcrumb-item {
    display: flex;
    align-items: center;
    white-space: nowrap;
}

.page-tower-maintenance .sub-page-hero .product-detail-hero__breadcrumb-item > a,
.page-tower-maintenance .sub-page-hero .product-detail-hero__breadcrumb-item > span {
    display: inline-flex;
    align-items: center;
    line-height: 1;
}

.page-tower-maintenance .sub-page-hero .product-detail-hero__breadcrumb-item + .product-detail-hero__breadcrumb-item::before {
    content: "";
    display: block;
    flex: 0 0 auto;
    width: 0.45em;
    height: 0.45em;
    border-top: 1px solid currentColor;
    border-right: 1px solid currentColor;
    transform: rotate(45deg);
    margin: 0 0.5em;
}

.page-tower-maintenance .sub-page-hero .product-detail-hero__content {
    width: 92%;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.page-tower-maintenance .sub-page-hero .product-detail-hero__title {
    font-size: 4rem;
    font-weight: 400;
    text-align: center;
    margin: 0;
}

.page-tower-maintenance .sub-page-hero .product-detail-hero__subtitle:empty {
    display: none;
}

@media screen and (max-width: 1024px) {
    .page-tower-maintenance .sub-page-hero {
        height: auto;
        min-height: 25rem;
        padding: 3rem 0;
    }
}

@media screen and (max-width: 768px) {
    .page-tower-maintenance .sub-page-hero {
        height: 37.2rem;
        min-height: 37.2rem;
        padding: 2.2rem 0;
        border-radius: 0 0 5.5rem 5.5rem;
    }

    /* Reset absolute centering on SP — use flow layout like renewal page */
    .page-tower-maintenance .sub-page-hero .product-detail-hero__content {
        position: relative;
        top: unset;
        left: unset;
        transform: none;
        width: 100%;
    }

    /* Title: centered horizontally, positioned at same depth as renewal page */
    .page-tower-maintenance .sub-page-hero .product-detail-hero__title {
        position: absolute;
        top: 14.1rem;
        left: 50%;
        transform: translateX(-50%);
        width: 100%;
        font-size: 2.4rem;
        font-weight: 700;
        text-align: center;
        margin: 0;
    }
}



/* Product detail pages: keep current title weight behavior */
.page-tower-product-detail .sub-page-hero .product-detail-hero__content:has(.product-detail-hero__subtitle:not(:empty)) .product-detail-hero__title {
    font-weight: 500;
}

@media screen and (max-width: 768px) {
    .page-tower-product-detail .sub-page-hero {
        background-position: right center !important;
    }

    .page-tower-product-detail .sub-page-hero .product-detail-hero__content:has(.product-detail-hero__subtitle:not(:empty)) .product-detail-hero__title {
        font-weight: 500;
    }
}
