/* Single product — from storefront-son layout, WORLDPO RU brand */

.product-detail-h1 {
  font-size: clamp(1.25rem, 2.2vw, 1.5rem);
  font-weight: 700;
  color: #222;
  /* padding 避免与相邻区块 margin 折叠，保证与顶栏/下方灰底有可见间距 */
  margin: 0;
  padding: 28px 0 20px;
  line-height: 1.4;
}

.product-detail-page {
  background: #f8f8f8;
  padding: 24px 0 40px;
}

.product-main-content {
  background: #fff;
  padding: 36px 40px;
  margin: 0 0 24px;
  overflow: hidden;
}

.product-image-box {
  float: left;
  width: 45%;
  padding-right: 28px;
  box-sizing: border-box;
}

.product-image-box .image-wrapper {
  background: #fff;
  padding: 32px;
  text-align: center;
  border: 1px solid var(--wpo-accent, #c82019);
}

.product-image-box .image-wrapper img {
  max-width: 100%;
  height: auto;
  max-height: 400px;
  object-fit: contain;
}

.product-gallery .gallery-main {
  margin-bottom: 12px;
}

.product-gallery .gallery-thumbs ul {
  display: flex;
  gap: 10px;
  list-style: none;
  padding: 0;
  margin: 0;
  flex-wrap: wrap;
}

.product-gallery .gallery-thumbs li {
  width: 60px;
  height: 60px;
  border: 2px solid #eee;
  cursor: pointer;
  overflow: hidden;
  transition: border-color 0.25s;
}

.product-gallery .gallery-thumbs li.active,
.product-gallery .gallery-thumbs li:hover {
  border-color: var(--wpo-accent, #c82019);
}

.product-gallery .gallery-thumbs li a {
  display: block;
  width: 100%;
  height: 100%;
}

.product-gallery .gallery-thumbs li img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.product-info-box {
  float: left;
  width: 55%;
  padding-left: 12px;
  box-sizing: border-box;
}

.product-info-box .product-category {
  font-size: 14px;
  color: #666;
  margin-bottom: 8px;
}

.product-info-box .product-title {
  font-size: clamp(1.5rem, 2.8vw, 2rem);
  color: var(--wpo-accent, #c82019);
  margin-bottom: 12px;
  line-height: 1.3;
  font-weight: 700;
}

.product-info-box .product-mfr-part {
  font-size: 15px;
  color: #555;
  margin-bottom: 12px;
}

.product-compat-note {
  font-size: 13px;
  color: #444;
  background: #fff5f4;
  border-left: 3px solid var(--wpo-accent, #c82019);
  padding: 10px 14px;
  margin-bottom: 14px;
  line-height: 1.5;
  white-space: nowrap;
}

.product-info-box .product-desc,
.product-info-box .product-short-desc {
  font-size: 15px;
  color: #666;
  padding: 8px 0;
  border-bottom: 1px solid #eee;
  margin-bottom: 12px;
  line-height: 1.55;
}

.product-info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px 24px;
  margin-bottom: 12px;
}

.product-info-grid .product-desc {
  padding: 6px 0;
  font-size: 14px;
  color: #555;
  border-bottom: 1px dashed #e0e0e0;
  margin-bottom: 0;
}

.product-tags-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.product-tag {
  display: inline-block;
  font-size: 12px;
  color: var(--wpo-accent, #c82019);
  background: #fff5f4;
  border: 1px solid #f0c4c0;
  border-radius: 3px;
  padding: 3px 10px;
  text-decoration: none;
  transition: all 0.2s;
}

.product-tag:hover {
  color: #fff;
  background: var(--wpo-accent, #c82019);
  border-color: var(--wpo-accent, #c82019);
}

.product-price-stock {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 16px;
  padding: 8px 0;
}

.product-price-box .price-regular {
  font-size: 16px;
  color: #999;
  text-decoration: line-through;
  margin-right: 8px;
}

.product-price-box .price-sale,
.product-price-box .price-current {
  font-size: 22px;
  color: var(--wpo-accent, #c82019);
  font-weight: 700;
}

.product-stock-box .stock-in {
  color: #2e7d32;
  font-weight: 600;
}

.product-stock-box .stock-out {
  color: #c82019;
  font-weight: 600;
}

.product-stock-box .stock-available {
  color: #666;
}

.product-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.product-actions a {
  display: inline-block;
  padding: 12px 28px;
  font-size: 15px;
  font-weight: 600;
  background: var(--wpo-accent, #c82019);
  color: #fff !important;
  text-decoration: none;
  transition: background 0.25s;
}

.product-actions a:hover {
  background: var(--wpo-accent-hover, #a61a14);
}

.product-actions a.secondary {
  background: var(--wpo-ink, #0a1628);
}

.product-actions a.secondary:hover {
  background: #1c2d45;
}

/* Detail tabs */
.product-detail-content {
  background: #fff;
  padding: 36px 40px;
  margin-bottom: 24px;
  overflow: hidden;
}

.detail-sidebar {
  float: left;
  width: 22%;
  padding-right: 16px;
  box-sizing: border-box;
}

.detail-sidebar ul {
  border: 1px solid #eee;
  list-style: none;
  margin: 0;
  padding: 0;
}

.detail-sidebar li {
  border-bottom: 1px solid #eee;
}

.detail-sidebar li:last-child {
  border-bottom: none;
}

.detail-sidebar li a {
  display: block;
  padding: 14px 18px;
  font-size: 15px;
  color: #333;
  background: #fafafa;
  text-decoration: none;
  transition: all 0.25s;
}

.detail-sidebar li.active a,
.detail-sidebar li a:hover {
  background: var(--wpo-accent, #c82019);
  color: #fff;
}

.detail-content {
  float: left;
  width: 78%;
  padding-left: 24px;
  box-sizing: border-box;
}

.detail-section {
  display: none;
}

.detail-section.active {
  display: block;
}

.detail-section .section-title {
  font-size: 1.2rem;
  color: #333;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--wpo-accent, #c82019);
  margin-bottom: 18px;
  font-weight: 700;
}

.param-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.param-table tr {
  border-bottom: 1px solid #eee;
}

.param-table td {
  padding: 12px 10px;
  line-height: 1.55;
}

.param-table td:first-child {
  font-weight: 600;
  color: #333;
  width: 38%;
  background: #f9f9f9;
  text-align: right;
  padding-right: 16px;
}

.param-table td:last-child {
  color: #555;
}

.param-disclaimer {
  font-size: 12px;
  color: #888;
  font-style: italic;
  line-height: 1.55;
  padding: 10px 14px;
  margin: 0;
  background: #fffbe6;
  border-left: 3px solid #faad14;
  text-align: left !important;
  font-weight: 400 !important;
  width: auto !important;
}

.product-long-desc {
  margin-top: 28px;
  font-size: 15px;
  line-height: 1.7;
  color: #444;
}

.related-vertical-list {
  display: flex;
  flex-direction: column;
  gap: 1px;
  background: #eee;
}

.related-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 14px 16px;
  background: #fff;
  text-decoration: none !important;
  color: #333;
  transition: background 0.2s;
}

.related-item:hover {
  background: #fff8f7;
}

.related-item-img {
  flex-shrink: 0;
  width: 72px;
  height: 72px;
  border: 1px solid #eee;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fafafa;
}

.related-item-img img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.related-item-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--wpo-ink, #0a1628);
  margin-bottom: 6px;
}

.related-item:hover .related-item-title {
  color: var(--wpo-accent, #c82019);
}

.related-item-desc {
  font-size: 13px;
  color: #666;
  line-height: 1.45;
  margin-bottom: 8px;
}

.related-item-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 12px;
  color: #888;
}

.related-item-meta span {
  position: relative;
  padding-left: 12px;
}

.related-item-meta span::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 5px;
  height: 5px;
  background: var(--wpo-accent, #c82019);
  border-radius: 50%;
}

.ap-no-related {
  color: #999;
  padding: 20px 0;
}

.product-nav {
  margin-top: 8px;
  padding: 20px 0 10px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.product-nav .nav-previous a,
.product-nav .nav-next a {
  display: block;
  padding: 14px 18px;
  border: 1px solid #ddd;
  background: #fff;
  text-decoration: none;
  color: #333;
  transition: border-color 0.2s;
}

.product-nav .nav-previous a:hover,
.product-nav .nav-next a:hover {
  border-color: var(--wpo-accent, #c82019);
}

.product-nav .nav-next {
  text-align: right;
}

.product-nav .nav-label {
  display: block;
  font-size: 12px;
  color: #999;
}

.product-nav .nav-title {
  display: block;
  font-weight: 600;
  margin-top: 4px;
}

.product-nav .nav-empty {
  display: block;
  padding: 14px 18px;
  color: #ccc;
  background: #fff;
  border: 1px solid #eee;
}

/* Quote modal */
#wpo-quote-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 99999;
  align-items: center;
  justify-content: center;
  display: none;
}

#wpo-quote-modal .modal-box {
  background: #fff;
  max-width: 460px;
  width: 90%;
  padding: 36px 28px 28px;
  position: relative;
  text-align: center;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
}

#wpo-quote-modal .modal-close {
  position: absolute;
  top: 8px;
  right: 12px;
  border: 0;
  background: transparent;
  font-size: 28px;
  color: #999;
  cursor: pointer;
  line-height: 1;
}

#wpo-quote-modal .modal-text {
  font-size: 14px;
  line-height: 1.65;
  color: #444;
  margin: 0 0 20px;
  text-align: left;
}

#wpo-quote-modal .modal-text a {
  color: var(--wpo-accent, #c82019);
  font-weight: 600;
}

#wpo-quote-modal .modal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}

#wpo-quote-modal .modal-actions .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 16px;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  color: #fff;
}

#wpo-quote-modal .btn-primary {
  background: var(--wpo-accent, #c82019);
}

#wpo-quote-modal .btn-email {
  background: #1c2d45;
}

#wpo-quote-modal .btn-whatsapp {
  background: #25d366;
}

@media (max-width: 900px) {
  .product-image-box,
  .product-info-box,
  .detail-sidebar,
  .detail-content {
    float: none;
    width: 100%;
    padding: 0;
  }

  .product-compat-note {
    white-space: normal;
  }

  .product-image-box {
    margin-bottom: 24px;
  }

  .detail-sidebar {
    margin-bottom: 20px;
  }

  .product-main-content,
  .product-detail-content {
    padding: 20px 16px;
  }

  .product-info-grid {
    grid-template-columns: 1fr;
  }

  .product-nav {
    grid-template-columns: 1fr;
  }

  .product-nav .nav-next {
    text-align: left;
  }

  .param-table td:first-child {
    width: 42%;
    font-size: 13px;
  }
}
