/* Product detail; site navigation, inquiry and footer use common.css. */
.detail-page { color: #102538; background: #fff; }
.detail-container { width: min(90%, 1500px); margin: auto; }

.detail-overview {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  gap: 52px;
  padding: 36px 0 44px;
  align-items: start;
}
.detail-summary { min-width: 0; overflow-wrap: anywhere; }
.detail-gallery { min-width: 0; }

.detail-main-image {
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  background: #e9edf0;
}
.detail-main-image > img {
  width: 100%;
  aspect-ratio: 462 / 274;
  height: auto;
  object-fit: cover;
  display: block;
}
.detail-main-image button {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 0;
  color: #30455a;
  background: #ffffffed;
  box-shadow: 0 3px 14px #233b4e20;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
}
.detail-main-image button:hover {
  background: #e40018;
  color: #fff;
}
.detail-gallery-prev { left: 16px; }
.detail-gallery-next { right: 16px; }

.detail-thumbnail-carousel {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
  min-width: 0;
}
.detail-thumbnails {
  position: relative;
  display: flex;
  flex-wrap: nowrap;
  flex: 1 1 0;
  min-width: 0;
  gap: 10px;
  overflow-x: auto;
  scrollbar-width: none;
}
.detail-thumbnails::-webkit-scrollbar { display: none; }
.detail-thumbnails button {
  flex: 0 0 calc((100% - 40px) / 5);
  min-width: 72px;
  overflow: hidden;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 6px;
  background: #eef1f5;
  cursor: pointer;
  transition: border-color 0.2s ease;
}
.detail-thumbnails button.is-active { border-color: #ed0019; }
.detail-thumbnails img {
  width: 100%;
  height: auto;
  aspect-ratio: 1.45;
  object-fit: cover;
  display: block;
}

/* Product Summary Typography */
.detail-summary h2 {
  margin: 0 0 16px;
  font-size: clamp(22px, 2.1vw, 30px);
  line-height: 1.28;
  font-weight: 800;
  letter-spacing: -0.3px;
  color: #0f172a;
}
.detail-summary > p {
  color: #475569;
  font-size: 15px;
  line-height: 1.68;
  margin: 0 0 20px;
}

.detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 24px;
}
.detail-actions button,
.detail-actions a {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  min-height: 46px;
  padding: 10px 28px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  background: #fff;
  color: #102538;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
}
.detail-actions .detail-quote {
  color: #fff;
  background: #e40018;
  border-color: #e40018;
  box-shadow: 0 4px 14px rgba(228, 0, 24, 0.25);
}
.detail-actions .detail-quote:hover {
  background: #b80d14;
  border-color: #b80d14;
}

/* Feature Highlights */
.detail-features {
  background: #f8fafc;
  border-top: 1px solid #edf2f7;
  border-bottom: 1px solid #edf2f7;
  padding: 36px 0;
}
.detail-features > div {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 32px;
}
.detail-features article {
  display: flex;
  gap: 18px;
  align-items: flex-start;
}
.detail-features article > span {
  display: grid;
  place-items: center;
  flex: 0 0 50px;
  width: 50px;
  height: 50px;
  border: 2px solid #e40018;
  border-radius: 50%;
  color: #e40018;
  font-size: 22px;
}
.detail-features h3 {
  margin: 0 0 6px;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.35;
  color: #0f172a;
}
.detail-features p {
  margin: 0;
  color: #64748b;
  font-size: 13.5px;
  line-height: 1.5;
}

/* Product Details Rich Content Section */
.detail-content {
  padding-top: 48px;
  padding-bottom: 32px;
}

.detail-section-heading {
  margin-bottom: 24px;
}
.detail-section-heading::before {
  content: '';
  display: block;
  background: #e40018;
  width: 44px;
  height: 3px;
  margin-bottom: 14px;
  border-radius: 2px;
}
.detail-section-heading h2 {
  margin: 0 0 8px;
  font-size: clamp(22px, 2.1vw, 28px);
  font-weight: 800;
  line-height: 1.25;
  color: #0f172a;
  letter-spacing: -0.3px;
}
.detail-section-heading p {
  margin: 0;
  color: #64748b;
  font-size: 15px;
  line-height: 1.6;
}

/* Rich-text Typography in Product Detail */
.detail-content .jiahe-richtext {
  color: #334155;
  font-size: 15.5px;
  line-height: 1.76;
}
.detail-content .jiahe-richtext p {
  margin: 0 0 16px;
}
.detail-content .jiahe-richtext h2 {
  font-size: 22px;
  font-weight: 750;
  line-height: 1.3;
  margin: 30px 0 14px;
  color: #0f172a;
}
.detail-content .jiahe-richtext h3 {
  font-size: 18px;
  font-weight: 700;
  line-height: 1.35;
  margin: 22px 0 12px;
  color: #0f172a;
}
.detail-content .jiahe-richtext h4 {
  font-size: 16px;
  font-weight: 600;
  line-height: 1.4;
  margin: 18px 0 10px;
  color: #0f172a;
}
.detail-content .jiahe-richtext ul,
.detail-content .jiahe-richtext ol {
  margin: 0 0 20px;
  padding-left: 24px;
}
.detail-content .jiahe-richtext li {
  margin: 6px 0;
  font-size: 15px;
  line-height: 1.65;
}
.detail-content .jiahe-richtext table {
  width: 100%;
  margin: 20px 0 24px;
  border-collapse: collapse;
  font-size: 14px;
  line-height: 1.55;
}
.detail-content .jiahe-richtext th,
.detail-content .jiahe-richtext td {
  padding: 12px 16px;
  border: 1px solid #e2e8f0;
  text-align: left;
}
.detail-content .jiahe-richtext th {
  background: #f8fafc;
  font-weight: 700;
  color: #1e293b;
}

/* Specifications Table */
.detail-specs {
  width: 100%;
  border-collapse: collapse;
  background: #f8fafc;
  font-size: 13.5px;
  line-height: 1.5;
}
.detail-specs th,
.detail-specs td {
  border: 1px solid #e2e8f0;
  padding: 11px 16px;
  text-align: left;
}
.detail-specs th {
  width: 30%;
  font-weight: 700;
  color: #1e293b;
}
.detail-specs td {
  color: #475569;
}

/* Description Component */
.detail-description {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  gap: 40px;
  border: 1px solid #e6ebf0;
  border-radius: 10px;
  padding: 32px 36px;
  box-shadow: 0 4px 18px rgba(16, 37, 56, 0.04);
  align-items: center;
}
.detail-description h3 {
  margin: 0 0 12px;
  font-size: clamp(20px, 1.8vw, 26px);
  line-height: 1.3;
  font-weight: 750;
  color: #0f172a;
}
.detail-description p {
  margin: 0;
  color: #475569;
  font-size: 15px;
  line-height: 1.65;
}
.detail-description h4 {
  margin: 22px 0 12px;
  font-size: 18px;
  font-weight: 700;
  color: #0f172a;
}
.detail-description ul {
  padding: 0;
  margin: 0;
  list-style: none;
}
.detail-description li {
  display: flex;
  gap: 10px;
  align-items: baseline;
  margin-top: 8px;
  color: #475569;
  font-size: 14.5px;
  line-height: 1.6;
}
.detail-description li i {
  color: #e40018;
  font-size: 14px;
}
.detail-description > img {
  width: 100%;
  height: auto;
  border-radius: 6px;
}

/* ========================================================
   Related Products / Applications Section
   ======================================================== */
.detail-applications {
  padding-top: 52px;
  padding-bottom: 64px;
  border-top: 1px solid #eef2f6;
  margin-top: 48px;
}

/* Header with eyebrow, title, description and View All button */
.detail-related-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
  margin-bottom: 32px;
}

.detail-related-title-wrap {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.detail-related-eyebrow {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 2px;
  color: #d71920;
  text-transform: uppercase;
  line-height: 1.2;
}

.detail-related-header h2,
.detail-applications .detail-section-heading h2 {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 0;
  font-size: clamp(22px, 2.1vw, 28px);
  font-weight: 800;
  line-height: 1.25;
  color: #0f172a;
  letter-spacing: -0.4px;
}

.detail-related-header h2::before,
.detail-applications .detail-section-heading h2::before {
  content: '';
  display: inline-block;
  width: 4px;
  height: 22px;
  background: #d71920;
  border-radius: 2px;
  flex-shrink: 0;
}

.detail-related-title-wrap p,
.detail-applications .detail-section-heading p {
  margin: 0;
  color: #64748b;
  font-size: 14.5px;
  line-height: 1.6;
}

.detail-related-all {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  font-weight: 600;
  color: #334155;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  padding: 8px 18px;
  border-radius: 30px;
  text-decoration: none;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  white-space: nowrap;
  flex-shrink: 0;
}

.detail-related-all i {
  color: #d71920;
  font-size: 12px;
  transition: transform 0.25s ease, color 0.25s ease;
}

.detail-related-all:hover {
  background: #d71920;
  border-color: #d71920;
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(215, 25, 32, 0.25);
}

.detail-related-all:hover i {
  color: #fff;
  transform: translateX(4px);
}

/* Grid Layout: 4 Columns */
.detail-app-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 24px;
}

/* Card Style (Both .detail-related-card and legacy .detail-app-grid > a) */
.detail-related-card,
.detail-app-grid > a {
  display: flex;
  flex-direction: column;
  background: #ffffff;
  border: 1px solid #e7edf5;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 18px rgba(12, 32, 66, 0.04);
  transition: transform 0.32s cubic-bezier(0.16, 1, 0.3, 1),
              box-shadow 0.32s cubic-bezier(0.16, 1, 0.3, 1),
              border-color 0.32s ease;
  position: relative;
  min-width: 0;
  text-decoration: none;
  height: 100%;
  box-sizing: border-box;
}

.detail-related-card:hover,
.detail-app-grid > a:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 36px rgba(12, 32, 66, 0.1);
  border-color: #d0deee;
}

/* Card Thumbnail */
.detail-related-thumb,
.detail-app-grid > a > img {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  min-height: auto;
  background: #f8fafc;
  overflow: hidden;
}

.detail-related-thumb img,
.detail-app-grid > a > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.45s cubic-bezier(0.16, 1, 0.3, 1);
}

.detail-related-card:hover .detail-related-thumb img,
.detail-app-grid > a:hover > img {
  transform: scale(1.06);
}

/* Thumbnail Hover Overlay Badge */
.detail-related-hover-action {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.28s ease, transform 0.28s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
}

.detail-related-hover-action i {
  font-size: 11px;
  transition: transform 0.2s ease;
}

.detail-related-card:hover .detail-related-hover-action {
  opacity: 1;
  transform: translateY(0);
}

.detail-related-card:hover .detail-related-hover-action i {
  transform: translateX(3px);
}

/* Card Content / Info */
.detail-related-info {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 18px 20px 20px;
  min-width: 0;
  box-sizing: border-box;
  justify-content: space-between;
}

.detail-related-info h3,
.detail-app-grid > a > h3 {
  margin: 0 0 14px;
  font-size: 15.5px;
  line-height: 1.4;
  font-weight: 700;
  letter-spacing: -0.2px;
  color: #0f172a;
  text-align: left;
}

.detail-app-grid > a > h3 {
  padding: 16px 18px 18px;
}

.detail-related-info h3 a {
  color: #0f172a;
  text-decoration: none;
  transition: color 0.22s ease;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.8em;
}

.detail-app-grid > a > h3 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.8em;
}

.detail-related-info h3 a:hover,
.detail-related-card:hover .detail-related-info h3 a,
.detail-app-grid > a:hover > h3 {
  color: #d71920;
}

/* Bottom Action Row with Micro-arrow */
.detail-related-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-top: 12px;
  border-top: 1px solid #f1f5f9;
  margin-top: auto;
}

.detail-related-more {
  font-size: 13px;
  font-weight: 600;
  color: #64748b;
  transition: color 0.2s ease;
}

.detail-related-arrow {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  color: #d71920;
  font-size: 11px;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.detail-related-card:hover .detail-related-more {
  color: #d71920;
}

.detail-related-card:hover .detail-related-arrow {
  background: #d71920;
  border-color: #d71920;
  color: #fff;
  transform: translateX(3px);
  box-shadow: 0 3px 10px rgba(215, 25, 32, 0.35);
}

.detail-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.detail-thumbnail-carousel > button {
  display: inline-flex;
  flex: 0 0 30px;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 38px;
  padding: 0;
  border: 1px solid #d71920;
  border-radius: 4px;
  background: #d71920;
  color: #fff;
  cursor: pointer;
}
.detail-thumbnail-carousel > button[hidden] { display: none; }
.detail-thumbnail-carousel > button:disabled { opacity: .35; cursor: default; }
.detail-thumbnail-carousel > button:focus-visible,
.detail-thumbnails button:focus-visible { outline: 2px solid #d71920; outline-offset: 2px; }

/* Responsive Adjustments */
@media (max-width: 1200px) {
  .detail-overview {
    gap: 32px;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  }
  .detail-specs th,
  .detail-specs td {
    padding: 9px 12px;
    font-size: 13px;
  }
  .detail-actions button,
  .detail-actions a {
    padding: 10px 20px;
    font-size: 13.5px;
  }
  .detail-features article { gap: 14px; }
  .detail-features article > span {
    flex-basis: 44px;
    width: 44px;
    height: 44px;
    font-size: 20px;
  }
  .detail-features h3 { font-size: 15px; }
  .detail-features p { font-size: 13px; }
  .detail-description { gap: 28px; padding: 26px; }

  .detail-app-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
  }
}

@media (max-width: 860px) {
  .detail-overview { grid-template-columns: 1fr; }
  .detail-summary h2 { font-size: 22px; }
  .detail-summary > p { font-size: 14.5px; }
  .detail-features > div { grid-template-columns: 1fr 1fr; gap: 24px; }
  .detail-description { grid-template-columns: 1fr; }
  .detail-description > img { max-height: 360px; object-fit: cover; }

  .detail-applications {
    padding-top: 40px;
    padding-bottom: 48px;
    margin-top: 36px;
  }
  .detail-app-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
  }
}

@media (max-width: 580px) {
  .detail-related-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 24px;
  }
  .detail-related-all {
    align-self: flex-start;
  }
}

@media (max-width: 480px) {
  .detail-overview { padding-top: 24px; }
  .detail-thumbnail-carousel { margin-top: 10px; }
  .detail-main-image button { width: 36px; height: 36px; font-size: 13px; }
  .detail-features > div { grid-template-columns: 1fr; gap: 18px; }
  .detail-features article { flex-direction: row; }
  .detail-features h3 { font-size: 15px; }
  .detail-features p { font-size: 13px; }
  .detail-description { padding: 20px; }
  .detail-description h3 { font-size: 19px; }
  .detail-description p,
  .detail-description li { font-size: 14px; }
  .detail-section-heading h2 { font-size: 21px; }
  .detail-section-heading p { font-size: 14px; }
  .detail-app-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
  }
  .detail-related-info {
    padding: 14px 14px 16px;
  }
  .detail-related-info h3 {
    font-size: 14px;
    margin-bottom: 8px;
  }
  .detail-related-bottom {
    padding-top: 8px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .detail-related-card,
  .detail-app-grid > a,
  .detail-related-thumb img,
  .detail-app-grid > a > img,
  .detail-related-arrow,
  .detail-related-all {
    transition: none !important;
    transform: none !important;
  }
}
