/* ============================================
   Xiniu Construction Machinery - Product Detail Page Styles
   ============================================ */

/* ===== Product Hero ===== */
.product-hero {
  position: relative;
  width: 100%;
  height: 680px;
  margin-top: var(--header-height);
  overflow: hidden;
}

.product-hero-bg {
  position: absolute;
  inset: 0;
}

.product-hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to right, rgba(0,0,0,0.5) 0%, rgba(0,0,0,0.2) 50%, transparent 100%);
}

.product-hero-content {
  position: relative;
  z-index: 2;
  height: 100%;
  display: flex;
  align-items: center;
  padding: 0 260px;
}

.product-hero-content .container {
  max-width: none;
  margin: 0;
  padding: 0;
}

.product-hero-content h1 {
  font-family: var(--font-heading);
  font-size: 48px;
  font-weight: 700;
  color: var(--color-text-white);
  line-height: 1;
  text-shadow: 0 2px 10px rgba(0,0,0,0.3);
  margin-bottom: var(--space-md);
}

.product-hero-content p {
  font-size: var(--text-base);
  color: rgba(255,255,255,0.9);
  line-height: 1.7;
  max-width: 480px;
}

/* ===== Product Detail Section ===== */
.product-detail-section {
  padding: 40px 260px var(--space-3xl);
  background-color: var(--color-bg);
}

.product-detail-container {
  max-width: none;
  margin: 0;
  padding: 0;
}

/* ===== Breadcrumb ===== */
.product-breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: var(--space-xl);
  font-size: 16px;
  color: var(--color-text-secondary);
  flex-wrap: wrap;
}

.breadcrumb-home {
  display: flex;
  align-items: center;
  color: #C4301A;
}

.breadcrumb-home svg {
  width: 21px;
  height: 22px;
  fill: #C4301A;
}

.breadcrumb-separator {
  color: var(--color-text-muted);
}

.product-breadcrumb a {
  color: var(--color-text-secondary);
  transition: color var(--transition-fast);
}

.product-breadcrumb a:hover {
  color: var(--color-primary);
}

.breadcrumb-current {
  color: var(--color-text-muted);
}

/* ===== Product Info Wrap ===== */
.product-info-wrap {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-2xl);
  align-items: start;
}

/* ===== Product Gallery ===== */
.product-gallery {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.product-main-image {
  width: 100%;
  aspect-ratio: 4/3;
  background-color: #F5F5F5;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.product-main-image img {
  max-width: 90%;
  max-height: 90%;
  object-fit: contain;
}

.product-thumbnails {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.thumb-nav {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  cursor: pointer;
  transition: all var(--transition-fast);
  flex-shrink: 0;
  padding: 0;
  position: relative;
}

.thumb-nav:hover {
  opacity: 1;
}

.thumb-nav img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.thumb-nav-default,
.thumb-nav-hover {
  position: absolute;
  inset: 0;
  transition: opacity var(--transition-fast);
}

.thumb-nav-hover {
  opacity: 0;
}

.thumb-nav:hover .thumb-nav-default {
  opacity: 0;
}

.thumb-nav:hover .thumb-nav-hover {
  opacity: 1;
}

.thumb-list {
  display: flex;
  gap: var(--space-sm);
  flex: 1;
  overflow: hidden;
}

.thumb-item {
  width: 160px;
  height: 120px;
  background: #0F0F0F;
  opacity: 0.4;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border: none;
  transition: all var(--transition-fast);
  flex-shrink: 0;
  overflow: hidden;
}

.thumb-item:hover {
  opacity: 0.6;
}

.thumb-item.active {
  opacity: 1;
  background: #F5F5F5;
}

.thumb-item img {
  max-width: 90%;
  max-height: 90%;
  object-fit: contain;
}

/* ===== Product Info ===== */
.product-info {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.product-name {
  font-family: var(--font-heading);
  font-size: 32px;
  font-weight: 700;
  color: var(--color-text-primary);
  line-height: 1.2;
}

.product-subtitle {
  font-size: var(--text-xl);
  font-weight: 500;
  color: var(--color-text-secondary);
  margin-bottom: var(--space-md);
}

.product-specs {
  display: flex;
  flex-direction: column;
}

.spec-row {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: 10px 0;
}

.spec-label {
  font-size: 16px;
  color: var(--color-text-muted);
  flex-shrink: 0;
  min-width: 180px;
}

.spec-value {
  font-size: 18px;
  color: var(--color-text-primary);
  font-weight: 700;
}

.spec-value.highlight {
  color: var(--color-text-primary);
  font-weight: 700;
}

.brand-value {
  display: flex;
  align-items: center;
}

.brand-logo-small {
  height: 24px;
  width: auto;
}

.conditions {
  display: flex;
  gap: var(--space-sm);
  flex-wrap: wrap;
}

.condition-tag {
  font-size: 18px;
  color: var(--color-text-primary);
  font-weight: 700;
}

.download-link {
  display: inline-flex;
  align-items: center;
  transition: opacity var(--transition-fast);
}

.download-link:hover {
  opacity: 0.7;
}

.download-icon {
  width: 20px;
  height: 20px;
  object-fit: contain;
}

/* Product Action Buttons */
.product-actions {
  display: flex;
  gap: var(--space-md);
  margin-top: var(--space-lg);
}

.btn-inquiry {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 240px;
  padding: 12px 0;
  font-size: 18px;
  font-weight: 600;
  color: var(--color-text-white);
  background-color: #C4301A;
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
}

.btn-inquiry:hover {
  background-color: #A32816;
  transform: translateY(-1px);
}

.btn-consultation {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 280px;
  padding: 12px 0;
  font-size: 18px;
  font-weight: 600;
  color: var(--color-text-white);
  background-color: #666666;
  border: 1px solid #666666;
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
}

.btn-consultation:hover {
  background-color: #555555;
  border-color: #555555;
  transform: translateY(-1px);
}

/* ===== Performance Parameters ===== */
.parameters-section {
  padding: var(--space-3xl) 260px;
  background-color: var(--color-bg);
}

.parameters-container {
  max-width: none;
  margin: 0;
  padding: 0;
}

.section-title {
  font-family: var(--font-heading);
  font-size: 28px;
  font-weight: 700;
  color: var(--color-text-primary);
  text-align: center;
  margin-bottom: var(--space-xl);
}

.parameters-table-wrap {
  overflow-x: auto;
}

.parameters-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--text-sm);
}

.parameters-table thead th {
  background-color: #F5F5F5;
  padding: 14px 24px;
  text-align: left;
  font-weight: 600;
  color: var(--color-text-primary);
  border-bottom: 2px solid var(--color-border);
}

.parameters-table thead th:first-child {
  width: 40%;
}

.parameters-table tbody td {
  padding: 12px 24px;
  border-bottom: 1px solid var(--color-border-light);
  color: var(--color-text-secondary);
}

.parameters-table tbody tr:hover td {
  background-color: #FAFAFA;
}

/* ===== Product Details ===== */
.product-details-section {
  padding: var(--space-3xl) 260px;
  background-color: var(--color-bg-alt);
}

.product-details-container {
  max-width: none;
  margin: 0;
  padding: 0;
}

.product-details-container .section-title {
  margin-bottom: var(--space-2xl);
}

.detail-block {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-2xl);
  align-items: center;
  margin-bottom: var(--space-3xl);
}

.detail-block:last-child {
  margin-bottom: 0;
}

.detail-image {
  background-color: var(--color-bg);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 300px;
}

.detail-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.detail-text h3 {
  font-family: var(--font-heading);
  font-size: var(--text-xl);
  font-weight: 700;
  color: var(--color-text-primary);
  margin-bottom: var(--space-md);
  line-height: 1.4;
}

.detail-text p {
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  line-height: 1.8;
  margin-bottom: var(--space-md);
}

/* ===== Related Products / Global Layout ===== */
.related-products-section {
  padding: var(--space-3xl) 260px;
  background-color: var(--color-bg);
}

.related-products-container {
  max-width: none;
  margin: 0;
  padding: 0;
}

.related-products-container .section-title {
  margin-bottom: var(--space-xs);
}

.section-subtitle {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  text-align: center;
  margin-bottom: var(--space-2xl);
}

.related-products-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-xl);
}

/* Product card style - same as product-list page */
.related-product-card {
  background: linear-gradient(180deg, #E5E5E5 0%, #FFFFFF 100%);
  overflow: hidden;
  transition: all var(--transition-normal);
}

.related-product-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-card-hover);
}

.related-product-img {
  width: 100%;
  height: 220px;
  overflow: hidden;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-md);
}

.related-product-img img {
  width: 85%;
  height: 85%;
  object-fit: contain;
  transition: transform var(--transition-slow);
}

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

.related-product-body {
  padding: 0 var(--space-md) var(--space-md);
  background: transparent;
}

.related-product-card h4 {
  font-size: var(--text-base);
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--color-text-primary);
}

.related-product-spec {
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  line-height: 1.5;
  margin-bottom: 2px;
}

.related-product-actions {
  display: flex;
  gap: 8px;
  margin-top: var(--space-md);
}

/* Button style - same as product-list page */
.btn-related-more {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 8px 16px;
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-text-primary);
  background-color: transparent;
  border: 1px solid #0F0F0F;
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
  flex: 1;
  justify-content: center;
  white-space: nowrap;
}

.btn-related-more:hover {
  background-color: #C4301A;
  border-color: #C4301A;
  color: var(--color-text-white);
}

.btn-related-more svg {
  width: 12px;
  height: 12px;
  flex-shrink: 0;
}

.btn-related-inquiry {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 8px 16px;
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-text-primary);
  background-color: transparent;
  border: 1px solid #0F0F0F;
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
  flex: 1;
  justify-content: center;
  white-space: nowrap;
}

.btn-related-inquiry:hover {
  background-color: #C4301A;
  border-color: #C4301A;
  color: var(--color-text-white);
}

.btn-related-inquiry svg {
  width: 12px;
  height: 12px;
  flex-shrink: 0;
}

/* ===== Responsive ===== */
@media (max-width: 1919px) {
  .product-detail-section {
    padding: 40px 160px var(--space-3xl);
  }

  .product-info-wrap {
    gap: var(--space-xl);
  }

  .thumb-item {
    width: 120px;
    height: 90px;
  }

  .product-name {
    font-size: 26px;
  }

  .product-subtitle {
    font-size: var(--text-lg);
  }

  .spec-label {
    min-width: 150px;
    font-size: 15px;
  }

  .spec-value {
    font-size: 16px;
  }

  .condition-tag {
    font-size: 16px;
  }

  .btn-inquiry {
    width: 180px;
    font-size: 15px;
    padding: 10px 0;
  }

  .btn-consultation {
    width: 220px;
    font-size: 15px;
    padding: 10px 0;
  }
}

@media (max-width: 1650px) {
  .product-hero-content {
    padding: 0 160px;
  }

  .product-detail-section,
  .parameters-section,
  .product-details-section,
  .related-products-section {
    padding-left: 160px;
    padding-right: 160px;
  }
}

@media (max-width: 1399px) {
  .product-hero-content {
    padding: 0 120px;
  }

  .product-detail-section,
  .parameters-section,
  .product-details-section,
  .related-products-section {
    padding-left: 120px;
    padding-right: 120px;
  }

  .product-name {
    font-size: 24px;
  }

  .product-subtitle {
    font-size: var(--text-base);
  }

  .thumb-item {
    width: 100px;
    height: 75px;
  }

  .spec-label {
    min-width: 140px;
    font-size: 14px;
  }

  .spec-value {
    font-size: 15px;
  }

  .condition-tag {
    font-size: 15px;
  }

  .btn-inquiry {
    width: 160px;
    font-size: 14px;
    padding: 10px 0;
  }

  .btn-consultation {
    width: 200px;
    font-size: 14px;
    padding: 10px 0;
  }
}

@media (max-width: 1199px) {
  .product-hero-content {
    padding: 0 80px;
  }

  .product-detail-section,
  .parameters-section,
  .product-details-section,
  .related-products-section {
    padding-left: 80px;
    padding-right: 80px;
  }

  .product-info-wrap {
    gap: var(--space-xl);
  }

  .spec-row {
    grid-template-columns: 160px 1fr;
  }

  .related-products-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 1023px) {
  .product-hero {
    height: 320px;
  }

  .product-hero-content {
    padding: 0 40px;
  }

  .product-hero-content h1 {
    font-size: 38px;
  }

  .product-detail-section,
  .parameters-section,
  .product-details-section,
  .related-products-section {
    padding-left: 40px;
    padding-right: 40px;
  }

  .product-info-wrap {
    grid-template-columns: 1fr;
    gap: var(--space-xl);
  }

  .product-gallery {
    max-width: 600px;
    margin: 0 auto;
  }

  .detail-block,
  .detail-block.detail-block-reverse {
    grid-template-columns: 1fr;
    gap: var(--space-lg);
  }

  .detail-image {
    min-height: auto;
  }

  .detail-text {
    order: 2;
  }

  .detail-block.detail-block-reverse .detail-text {
    order: 2;
  }

  .detail-block.detail-block-reverse .detail-image {
    order: 1;
  }
}

@media (max-width: 767px) {
  .product-hero {
    height: auto;
    margin-top: var(--header-height);
    overflow: visible;
  }

  .product-hero-bg {
    display: none;
  }

  .product-hero-overlay {
    display: none;
  }

  .product-hero-content {
    position: relative;
    padding: 0 16px;
    height: 200px;
    background: url('../images/hero-bg-mobile.jpg') center top/cover no-repeat;
  }

  .product-hero-content::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(0,0,0,0.3) 0%, rgba(0,0,0,0.6) 100%);
    z-index: 0;
  }

  .product-hero-content .container {
    position: relative;
    z-index: 1;
  }

  .product-hero-content h1 {
    font-size: var(--text-3xl);
    margin-bottom: var(--space-sm);
  }

  .product-hero-content p {
    font-size: var(--text-sm);
  }

  .product-detail-section,
  .parameters-section,
  .product-details-section,
  .related-products-section {
    padding-left: 16px;
    padding-right: 16px;
  }

  .product-detail-section {
    padding-top: 24px;
    padding-bottom: var(--space-xl);
  }

  .parameters-section,
  .product-details-section,
  .related-products-section {
    padding-top: var(--space-xl);
    padding-bottom: var(--space-xl);
  }

  .product-breadcrumb {
    font-size: var(--text-xs);
    margin-bottom: var(--space-md);
  }

  .product-name {
    font-size: var(--text-xl);
  }

  .product-subtitle {
    font-size: var(--text-base);
  }

  .spec-row {
    display: grid;
    grid-template-columns: 120px 1fr;
    align-items: start;
    gap: var(--space-md);
    padding: 8px 0;
  }

  .spec-label {
    font-size: 13px;
    min-width: auto;
  }

  .spec-value {
    font-size: 14px;
    word-break: break-word;
  }

  .product-actions {
    flex-direction: column;
    gap: var(--space-sm);
  }

  .btn-inquiry,
  .btn-consultation {
    width: 100%;
    justify-content: center;
    padding: 12px 24px;
  }

  .section-title {
    font-size: var(--text-xl);
  }

  .parameters-table thead th,
  .parameters-table tbody td {
    padding: 10px 12px;
    font-size: var(--text-xs);
  }

  .detail-text h3 {
    font-size: var(--text-lg);
  }

  .detail-text p {
    font-size: var(--text-xs);
  }

  .related-products-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-lg);
  }

  .related-product-card h4 {
    font-size: var(--text-sm);
  }

  .related-product-actions {
    gap: 8px;
  }

  .btn-related-more,
  .btn-related-inquiry {
    padding: 8px 14px;
    font-size: 13px;
    gap: 4px;
  }

  .btn-related-more svg,
  .btn-related-inquiry svg {
    width: 11px;
    height: 11px;
  }
}

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

  .thumb-item {
    width: 60px;
    height: 48px;
  }
}
