/* ==========================================================================
   Shandong Gaoqiang New Material Technology Co., Ltd. - Product Detail CSS
   Exact Match to User Reference Screenshot & Optimized Responsive Styling
   ========================================================================== */

/* --------------------------------------------------
   1. Detail Hero Section & Breadcrumb
   -------------------------------------------------- */
.detail-hero {
  min-height: 240px;
  display: flex;
  align-items: center;
  color: #ffffff;
  background:
    linear-gradient(90deg, rgba(8, 29, 60, 0.94) 0%, rgba(8, 29, 60, 0.78) 45%, rgba(8, 29, 60, 0.35) 100%),
    url('../images/rd_lab.jpg') center / cover no-repeat;
}

.detail-hero-copy {
  padding: 40px 24px;
}

.detail-hero h1 {
  margin: 0 0 8px;
  font-size: clamp(2.3rem, 4vw, 3.2rem);
  font-weight: 800;
  letter-spacing: -0.035em;
  color: #ffffff;
}

.detail-hero p {
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.45;
  font-weight: 600;
  color: #cbd5e1;
}

.hero-decor-bar {
  display: block;
  width: 42px;
  height: 3px;
  margin-top: 16px;
  background: var(--accent);
  border-radius: 2px;
}

.detail-breadcrumb {
  padding: 15px 0;
  color: #64748b;
  background: #f8fafc;
  border-bottom: 1px solid #edf2f7;
  font-size: 0.85rem;
}

.detail-breadcrumb .container {
  display: flex;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
  overflow-x: auto;
}

.detail-breadcrumb a {
  color: #64748b;
  transition: color 0.2s ease;
}

.detail-breadcrumb a:hover {
  color: #1665d8;
}

.detail-breadcrumb .active-crumb {
  color: #1665d8;
  font-weight: 700;
}

.detail-breadcrumb .fas.fa-chevron-right {
  color: #94a3b8;
  font-size: 0.65rem;
}

/* --------------------------------------------------
   2. Product Intro Overview (2-Column Grid)
   -------------------------------------------------- */
.product-intro {
  padding: 56px 0 52px;
  background: #ffffff;
}

.product-intro-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  align-items: start;
  gap: 56px;
}

/* Left Gallery */
.product-gallery {
  display: flex;
  flex-direction: column;
}

.gallery-main {
  height: 440px;
  padding: 28px;
  border-radius: 12px;
  background: #f8fafc;
  border: 1px solid #edf2f7;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.gallery-main img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  transition: opacity 0.3s ease;
}

.gallery-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 16px;
}

.gallery-thumbnails {
  display: flex;
  flex: 1;
  gap: 10px;
  overflow-x: auto;
  padding: 2px;
}

.gallery-thumb {
  flex: 0 0 72px;
  height: 58px;
  border-radius: 6px;
  border: 1px solid #e2e8f0;
  padding: 3px;
  background: #ffffff;
  cursor: pointer;
  transition: all 0.25s ease;
}

.gallery-thumb.active {
  border: 2px solid #1665d8;
  box-shadow: 0 0 0 2px rgba(22, 101, 216, 0.15);
}

.gallery-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 4px;
}

.gallery-arrow {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  border-radius: 50%;
  border: 1px solid #e2e8f0;
  background: #ffffff;
  color: #0f223d;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.25s ease;
}

.gallery-arrow:hover {
  background: #1665d8;
  color: #ffffff;
  border-color: #1665d8;
}

/* Right Summary */
.product-summary {
  display: flex;
  flex-direction: column;
}

.product-code-title {
  margin: 0 0 4px;
  color: #0f223d;
  font-size: 2.1rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.product-category-name {
  margin: 0 0 16px;
  color: #1665d8;
  font-size: 1.1rem;
  font-weight: 700;
}

.product-lead {
  max-width: 600px;
  margin: 0 0 26px;
  color: #64748b;
  font-size: 0.95rem;
  line-height: 1.65;
}

/* Features List */
.product-features {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 32px;
}

.feature-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.feature-icon-box {
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  border-radius: 8px;
  background: #eef5ff;
  color: #1665d8;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
}

.feature-info h4 {
  margin: 0 0 2px;
  color: #0f223d;
  font-size: 0.92rem;
  font-weight: 700;
}

.feature-info p {
  margin: 0;
  color: #64748b;
  font-size: 0.85rem;
  line-height: 1.45;
}

/* Action Buttons */
.product-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.btn-contact-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 26px;
  color: #1665d8;
  background: #ffffff;
  border: 1.5px solid #1665d8;
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 700;
  transition: all 0.3s ease;
  text-decoration: none;
}

.btn-contact-outline:hover {
  background: #1665d8;
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(22, 101, 216, 0.2);
}

/* --------------------------------------------------
   3. Product Details Rich Text Section
   -------------------------------------------------- */
.product-information {
  padding: 56px 0 64px;
  background: #ffffff;
}

.product-rich-text {
  display: flex;
  flex-direction: column;
  gap: 48px;
}

.rich-text-section {
  display: flex;
  flex-direction: column;
}

/* Panel 1: Description Grid */
.description-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 40px;
  align-items: start;
}

.desc-text-col p {
  margin: 0 0 16px;
  color: #475569;
  font-size: 0.95rem;
  line-height: 1.7;
}

/* Keep rich-text table cells from inheriting the article paragraph layout. */
.desc-text-col table p {
  margin: 0;
  color: inherit;
  font-size: inherit;
  line-height: inherit;
}

/* Section Headings inside Panels */
.detail-section-heading {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 22px;
}

.heading-line {
  width: 28px;
  height: 3px;
  background: #1665d8;
  border-radius: 2px;
}

.detail-section-heading h3 {
  margin: 0;
  color: #0f223d;
  font-size: 1.1rem;
  font-weight: 800;
  letter-spacing: 0.5px;
}

/* Panel 2: Spec Table */
.spec-table-wrap {
  overflow-x: auto;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
}

.spec-table {
  width: 100%;
  border-collapse: collapse;
  background: #ffffff;
  font-size: 0.9rem;
}

.spec-table th {
  background: #f1f5f9;
  color: #0f223d;
  font-weight: 700;
  padding: 12px 20px;
  text-align: left;
  border-bottom: 1px solid #e2e8f0;
  border-right: 1px solid #e2e8f0;
}

.spec-table th:last-child,
.spec-table td:last-child {
  border-right: 0;
}

.spec-table td {
  padding: 12px 20px;
  color: #475569;
  border-bottom: 1px solid #f1f5f9;
  border-right: 1px solid #f1f5f9;
}

.spec-table tr:nth-child(even) td {
  background: #f8fafc;
}

.spec-table tr:last-child td {
  border-bottom: 0;
}

/* Panel 3: Application Grid */
.application-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.app-card {
  background: #ffffff;
  border-radius: 10px;
  border: 1px solid #edf2f7;
  overflow: hidden;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.04);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.app-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.08);
}

.app-img-wrap {
  position: relative;
  height: 160px;
  overflow: hidden;
}

.app-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.app-card:hover .app-img-wrap img {
  transform: scale(1.06);
}

.app-icon-badge {
  position: absolute;
  bottom: 12px;
  left: 12px;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: #1665d8;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

.app-card-title {
  margin: 0;
  padding: 14px 16px;
  color: #0f223d;
  font-size: 0.95rem;
  font-weight: 700;
  text-align: center;
}

/* Panel 4: Storage Panel */
.storage-panel {
  display: flex;
  align-items: flex-start;
  gap: 22px;
  background: #f8fafc;
  border: 1px solid #edf2f7;
  border-radius: 12px;
  padding: 28px 32px;
}

.storage-icon-box {
  width: 48px;
  height: 48px;
  flex: 0 0 48px;
  border-radius: 10px;
  background: #eef5ff;
  color: #1665d8;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
}

.storage-text-content h3 {
  margin: 0 0 8px;
  color: #0f223d;
  font-size: 1.1rem;
  font-weight: 800;
}

.storage-text-content p {
  margin: 0;
  color: #475569;
  font-size: 0.95rem;
  line-height: 1.7;
}

/* --------------------------------------------------
   4. Related Products Section (5 Cards Grid)
   -------------------------------------------------- */
.related-products {
  padding: 60px 0 80px;
  background: #f8fafc;
  border-top: 1px solid #edf2f7;
}

.related-header-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.related-nav-arrows {
  display: flex;
  gap: 8px;
}

.related-arrow-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: #0f223d;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.25s ease;
}

.related-arrow-btn:hover {
  background: #1665d8;
  color: #ffffff;
  border-color: #1665d8;
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 20px;
}

.related-card {
  background: #ffffff;
  border-radius: 12px;
  border: 1px solid #edf2f7;
  overflow: hidden;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.04);
  transition: all 0.3s cubic-bezier(0.25, 1, 0.5, 1);
  display: flex;
  flex-direction: column;
}

.related-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.1);
  border-color: #cbd5e1;
}

.related-card-img {
  height: 180px;
  background: #f8fafc;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  overflow: hidden;
}

.related-card-img img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  transition: transform 0.35s ease;
}

.related-card:hover .related-card-img img {
  transform: scale(1.06);
}

.related-card-body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.related-card-name {
  margin: 0 0 4px;
  color: #0f223d;
  font-size: 0.95rem;
  font-weight: 800;
}

.related-card-cat {
  margin: 0 0 14px;
  color: #64748b;
  font-size: 0.8rem;
  line-height: 1.4;
  min-height: 2.2em;
}

.related-card-link {
  color: #1665d8;
  font-size: 0.85rem;
  font-weight: 700;
  margin-top: auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: color 0.25s ease;
  text-decoration: none;
}

.related-card-link i {
  font-size: 0.75rem;
  transition: transform 0.25s ease;
}

.related-card:hover .related-card-link {
  color: var(--accent);
}

.related-card:hover .related-card-link i {
  transform: translateX(4px);
}

/* --------------------------------------------------
   5. CTA Banner & Footer Extensions
   -------------------------------------------------- */
.products-cta {
  position: relative;
  min-height: 240px;
  padding: 60px 0;
  overflow: hidden;
  color: #ffffff;
  background: url('../images/index-cta.png') center / cover no-repeat;
}

.products-cta-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(135deg, rgba(8, 29, 60, 0.94) 0%, rgba(8, 29, 60, 0.82) 100%);
}

.products-cta-wave {
  position: absolute;
  z-index: 2;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 140px;
  pointer-events: none;
}

.products-cta-wave svg {
  display: block;
  width: 100%;
  height: 100%;
}

.products-cta-inner {
  position: relative;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 36px;
}

.products-cta h2 {
  margin: 0 0 8px;
  color: #ffffff;
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  font-weight: 800;
  line-height: 1.25;
}

.products-cta p {
  margin: 0;
  color: #cbd5e1;
  font-size: 1rem;
}

.products-cta-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-width: 180px;
  padding: 12px 28px;
  border: 1.5px solid rgba(255, 255, 255, 0.85);
  border-radius: 6px;
  color: #ffffff;
  background: transparent;
  font-size: 0.95rem;
  font-weight: 700;
  transition: all 0.3s ease;
  text-decoration: none;
  white-space: nowrap;
}

.products-cta-btn:hover {
  color: #081d3c;
  background: #ffffff;
  border-color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
}

/* Footer QR Code Box */
.footer-qr-box {
  margin-top: 16px;
}

.qr-placeholder {
  width: 110px;
  height: 110px;
  background: #ffffff;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #081d3c;
  font-size: 4rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* --------------------------------------------------
   6. Responsive Adjustments
   -------------------------------------------------- */
@media (max-width: 1200px) {
  .related-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 992px) {
  .product-intro-grid {
    grid-template-columns: 1fr;
    gap: 36px;
  }
  .gallery-main {
    height: 360px;
  }
  .description-grid {
    gap: 30px;
  }
  .application-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .products-cta-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 24px;
  }
}

@media (max-width: 768px) {
  .detail-hero {
    min-height: 200px;
  }
  .detail-hero h1 {
    font-size: 2rem;
  }
  .gallery-main {
    height: 300px;
  }
  .related-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .application-grid {
    grid-template-columns: 1fr;
  }
  .detail-tabs {
    margin: 0 -24px 24px;
    padding: 0 16px;
  }
  .detail-tab {
    padding: 14px 18px;
    font-size: 0.85rem;
  }
  .product-actions {
    flex-direction: column;
    width: 100%;
  }
  .btn-contact-outline {
    width: 100%;
  }
}

@media (max-width: 480px) {
  .related-grid {
    grid-template-columns: 1fr;
  }
}
