/* ==================== Child Theme - Single Product Page Styles ==================== */

body.single-product {
  overflow-x: hidden;
}

body.single-product #site-content,
body.single-product .single-product-page {
  overflow-x: clip;
}

/*
 * Purpose: Product detail page specific styles and overrides
 *
 * Rules:
 * - Scope everything to body.single-product to avoid cross-page impact
 * - Use ss-* components + BEM blocks for the page
 */

body.single-product .single-product {
  padding: 28px;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}

body.single-product .single-product__layout {
  display: grid;
  grid-template-columns: 520px minmax(0, 1fr);
  gap: 36px;
  align-items: start;
}

/* ==================== Media / Gallery ==================== */
body.single-product .single-product__thumb {
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
}

body.single-product .single-product__image {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
}

body.single-product .single-product__gallery {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 100%;
}

body.single-product .single-product__main-image {
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
  width: 100%;
  max-width: 500px;
  aspect-ratio: 1 / 1;
  height: auto;
  display: flex;
  align-items: center;
  justify-content: flex-start;
}

body.single-product .single-product__main-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

body.single-product .single-product__thumbs {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  align-content: flex-start;
  gap: 8px;
  max-width: 100%;
  overflow-x: visible;
  padding-bottom: 0;
}

body.single-product .single-product__thumbs::after {
  content: "";
  flex: auto;
}

body.single-product .single-product__thumbs .single-product__thumb {
  padding: 0;
  border: 2px solid transparent;
  background: #f7f7f7;
  border-radius: 8px;
  width: 64px;
  height: 64px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

body.single-product .single-product__thumbs .single-product__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 6px;
  display: block;
}

body.single-product .single-product__thumbs .single-product__thumb:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

body.single-product .single-product__thumbs .single-product__thumb--active {
  border-color: var(--accent-color, #ff9933);
}

/* ==================== Info ==================== */
body.single-product .single-product__title {
  font-size: 24px;
  line-height: 1.25;
  font-weight: 700;
  color: var(--heading-primary-color, #1B3A5F);
  margin: 0 0 14px 0;
}

body.single-product .single-product__subtitle {
  margin: -4px 0 16px 0;
  font-size: 14px;
  line-height: 1.45;
  color: var(--body-text-color, #333);
}

body.single-product .single-product__subtitle p {
  margin: 0;
  position: relative;
  padding-left: 28px;
}

body.single-product .single-product__subtitle p + p {
  margin-top: 8px;
}

body.single-product .single-product__subtitle p::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 2px;
  width: 18px;
  height: 18px;
  border-radius: 9999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 12px;
  line-height: 1;
  color: #fff;
  background: var(--sf-pink, #E84C8B);
  box-shadow: 0 8px 18px rgba(232, 76, 139, .24);
}

body.single-product .single-product__subtitle br {
  display: block;
  content: "";
  margin-top: 4px;
}

body.single-product .single-product__product-no {
  margin-top: -10px;
  font-size: 14px;
  line-height: 1.6;
}

body.single-product .single-product__product-no .label {
  font-weight: 700;
  color: var(--heading-primary-color, #1B3A5F);
}

body.single-product .single-product__product-no .value {
  color: var(--body-text-color, #333);
}

body.single-product .single-product__meta {
  display: grid;
  gap: 10px;
  margin-bottom: 18px;
}

body.single-product .single-product__meta-item {
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: 8px;
  align-items: baseline;
  font-size: 14px;
  color: var(--body-text-color, #333);
}

body.single-product .single-product__meta-item .label {
  font-weight: 600;
  color: var(--heading-primary-color, #1B3A5F);
}

body.single-product .single-product__meta-item .value {
  color: var(--body-text-color, #333);
}

body.single-product .single-product__meta-quick {
  display: grid;
  gap: 6px;
  margin-top: 8px;
}

body.single-product .single-product__meta-b2b {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 20px;
  margin-top: 10px;
  font-size: 14px;
}

body.single-product .single-product__meta-b2b .single-product__meta-item {
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
  grid-template-columns: auto;
}

body.single-product .single-product__meta-b2b .single-product__meta-item .label {
  font-weight: 700;
}

/* ==================== Filter Tags ==================== */
body.single-product .single-product__filters {
  display: grid;
  gap: 14px;
  margin: 18px 0 22px;
}

body.single-product .single-product__filter-group {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 10px;
  align-items: start;
}

body.single-product .single-product__filter-group .label {
  font-weight: 600;
  color: var(--heading-primary-color, #1B3A5F);
  font-size: 14px;
}

body.single-product .single-product__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

body.single-product .single-product__tags .tag {
  display: inline-flex;
  padding: 6px 12px;
  border-radius: 999px;
  background: #f5f5f5;
  color: var(--body-text-color, #333);
  font-size: 13px;
}

/* ==================== Actions ==================== */
body.single-product .single-product__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 8px;
}

body.single-product .single-product__actions .ss-btn {
  min-width: 0;
  max-width: 100%;
}

/* ==================== Tabs ==================== */
body.single-product .single-product__tabs {
  margin-top: 32px;
  padding-top: 22px;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
}

body.single-product .single-product__tabs-nav {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
  background: #f7f7f9;
  padding: 4px;
  border-radius: 999px;
}

body.single-product .single-product__tab-button {
  border: none;
  padding: 8px 16px;
  border-radius: 999px;
  background: transparent;
  color: #555;
  font-size: 14px;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

body.single-product .single-product__tab-button.is-active {
  background: #fff;
  color: var(--heading-primary-color, #1B3A5F);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.06);
}

body.single-product .single-product__tabs-panels {
  background: #fff;
  border-radius: 12px;
  padding: 20px 22px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

body.single-product .single-product__tab {
  display: none;
}

body.single-product .single-product__tab.is-active {
  display: block;
}

body.single-product .single-product__tab-title {
  font-size: 20px;
  margin: 0 0 14px 0;
  color: var(--heading-primary-color, #1B3A5F);
}

body.single-product .single-product__params-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

body.single-product .single-product__params-table th,
body.single-product .single-product__params-table td {
  padding: 8px 10px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  text-align: left;
}

body.single-product .single-product__params-table th {
  width: 34%;
  font-weight: 600;
  color: var(--heading-primary-color, #1B3A5F);
}

body.single-product .single-product__params-table td {
  color: var(--body-text-color, #333);
}

body.single-product .single-product__params-list {
  margin: 0;
  padding-left: 18px;
}

body.single-product .single-product__params-list li {
  margin-bottom: 4px;
}

body.single-product .single-product__features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
  margin-top: 6px;
}

body.single-product .single-product__feature {
  display: flex;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 10px;
  background: #f8f9fb;
}

body.single-product .single-product__feature-icon {
  font-size: 20px;
}

body.single-product .single-product__feature-title {
  margin: 0 0 4px 0;
  font-size: 15px;
  color: var(--heading-primary-color, #1B3A5F);
}

body.single-product .single-product__feature-desc {
  margin: 0;
  font-size: 14px;
  color: var(--body-text-color, #333);
}

body.single-product .single-product__capabilities {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 18px;
}

body.single-product .single-product__capability {
  min-width: 120px;
  padding: 10px 12px;
  border-radius: 10px;
  background: #fff7ef;
  text-align: center;
}

body.single-product .single-product__capability-number {
  font-size: 18px;
  font-weight: 700;
  color: var(--accent-color, #ff9933);
}

body.single-product .single-product__capability-label {
  font-size: 13px;
  color: var(--body-text-color, #333);
}

body.single-product .single-product__tab-empty {
  margin: 0;
  font-size: 14px;
  color: #777;
}

body.single-product .single-product__content {
  font-size: 16px;
  line-height: 1.7;
  color: var(--body-text-color, #333);
}

body.single-product .single-product__content p {
  margin: 0 0 10px 0;
}

body.single-product .single-product__content p:last-child {
  margin-bottom: 0;
}

body.single-product .single-product__content h2 {
  margin-top: 24px;
  margin-bottom: 10px;
  font-size: 22px;
  color: var(--heading-primary-color, #1B3A5F);
}

body.single-product .single-product__content h3 {
  margin-top: 18px;
  margin-bottom: 8px;
  font-size: 18px;
  color: var(--heading-primary-color, #1B3A5F);
}

body.single-product .single-product__content img {
  display: block;
  max-width: 100% !important;
  width: 100% !important;
  height: auto !important;
  border-radius: 10px;
  object-fit: contain;
}

body.single-product .single-product__content figure,
body.single-product .single-product__content .wp-block-image,
body.single-product .single-product__content .alignwide,
body.single-product .single-product__content .alignfull {
  max-width: 100% !important;
  width: 100% !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  margin-top: 0;
  margin-bottom: 16px;
  clear: both;
}

body.single-product .single-product__content img {
  margin-bottom: 16px;
}

body.single-product .single-product__content iframe,
body.single-product .single-product__content video,
body.single-product .single-product__content embed,
body.single-product .single-product__content object {
  display: block;
  max-width: 100% !important;
  width: 100% !important;
  height: auto !important;
}

body.single-product .single-product__content iframe {
  aspect-ratio: 16 / 9;
  height: auto !important;
}

body.single-product .single-product__content table {
  display: block;
  max-width: 100%;
  overflow-x: auto;
}

body.single-product .single-product__content ul ul,
body.single-product .single-product__content ol ol {
  padding-left: 20px;
}

/* ==================== Company Info ==================== */
body.single-product .single-product__company {
  margin-top: 32px;
  padding: 10px;
  height: 300px;
  overflow: hidden;
}

@media (max-width: 1024px) {
  body.single-product .single-product__company {
    height: auto;
    overflow: visible;
  }

  body.single-product .single-product__company-inner {
    height: auto;
  }
}

body.single-product .single-product__company-inner {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 22px;
  align-items: center;
  height: 100%;
}

body.single-product .single-product__company-media {
  height: 200px;
  overflow: hidden;
  border-radius: 12px;
}

body.single-product .single-product__company-content {
  text-align: left;
}

body.single-product .single-product__company-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

body.single-product .single-product__company-title {
  margin: 0 0 10px 0;
  font-size: 22px;
  color: var(--heading-primary-color, #1B3A5F);
}

body.single-product .single-product__company-text {
  margin: 0 0 10px 0;
  font-size: 14px;
  color: var(--body-text-color, #333);
}

body.single-product .single-product__company-list {
  margin: 0;
  padding-left: 0px;
  font-size: 14px;
  color: var(--body-text-color, #333);
}

body.single-product .single-product__company-list li + li {
  margin-top: 4px;
}

/* ==================== Related Products ==================== */
body.single-product .single-product__related {
  margin-top: 24px;
  padding: 22px 20px 24px;
}

body.single-product .single-product__related-title {
  margin: 0 0 16px 0;
  font-size: 20px;
  color: var(--heading-primary-color, #1B3A5F);
}

body.single-product .single-product__related-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

body.single-product .single-product__related-item {
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.06);
  display: flex;
  flex-direction: column;
}

body.single-product .single-product__related-image {
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: #f5f5f5;
}

body.single-product .single-product__related-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

body.single-product .single-product__related-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  color: #777;
}

body.single-product .single-product__related-info {
  padding: 10px 12px 12px;
}

body.single-product .single-product__related-item-title {
  margin: 0 0 4px 0;
  font-size: 15px;
}

body.single-product .single-product__related-item-title a {
  color: var(--heading-primary-color, #1B3A5F);
  text-decoration: none;
}

body.single-product .single-product__related-item-title a:hover {
  text-decoration: underline;
}

body.single-product .single-product__related-sku {
  font-size: 13px;
  color: #666;
}

/* ==================== Responsive ==================== */
@media (max-width: 1024px) {
  body.single-product .single-product__layout {
    grid-template-columns: 1fr;
    gap: 22px;
  }

  body.single-product .single-product__company-inner {
    grid-template-columns: 1fr;
  }

  body.single-product .single-product__related-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 768px) {
  body.single-product .single-product {
    padding: 20px;
  }

  body.single-product .single-product__content {
    font-size: 16px;
  }

  body.single-product .single-product__content p,
  body.single-product .single-product__content li,
  body.single-product .single-product__content td,
  body.single-product .single-product__content th {
    font-size: 16px;
  }

  body.single-product .single-product__title {
    font-size: 18px;
  }

  body.single-product .single-product__content h1,
  body.single-product .single-product__content h2,
  body.single-product .single-product__content h3,
  body.single-product .single-product__content span {
    font-size: 18px;
  }

  body.single-product .single-product__meta-item,
  body.single-product .single-product__filter-group {
    grid-template-columns: 1fr;
  }

  body.single-product .single-product__actions .ss-btn {
    width: 100%;
  }

  body.single-product .single-product__tabs-panels {
    padding: 16px 14px;
  }

  body.single-product .single-product__related-grid {
    grid-template-columns: 1fr;
  }

  body.single-product .single-product__thumbs {
    overflow-x: auto;
  }
}

/* ==================== 询价表单模块 ==================== */
body.single-product .single-product__inquiry-form {
  margin-top: 40px;
  padding: 24px;
  height: auto;
}
body.single-product .single-product__inquiry-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 32px;
  align-items: flex-start;
  height: 100%;
}

body.single-product .single-product__inquiry-title {
  font-size: 28px;
  font-weight: 700;
  color: var(--heading-primary-color, #1B3A5F);
  margin: 0 0 10px 0;
}

body.single-product .single-product__inquiry-subtitle {
  font-size: 16px;
  color: var(--body-text-color, #666);
  margin: 0 0 28px 0;
}

body.single-product .single-product__inquiry-list {
  margin: 0;
  padding-left: 18px;
  font-size: 14px;
  color: var(--body-text-color, #333);
}

body.single-product .single-product__inquiry-list li + li {
  margin-top: 4px;
}

body.single-product .single-product__inquiry-right {
  max-width: 420px;
  margin-left: 0;
  width: 100%;
}

/* ==================== WPForms (Single Product) ==================== */
body.single-product .single-product__inquiry-right .wpforms-container {
  margin: 0 !important;
}

body.single-product .single-product__inquiry-right .wpforms-form {
  width: 100%;
  max-width: 400px;
}

body.single-product .single-product__inquiry-right .wpforms-field-label {
  display: block;
  margin-bottom: 6px;
  font-weight: 600;
  color: var(--heading-primary-color, #1B3A5F);
  font-size: 13px;
}

body.single-product .single-product__inquiry-right .wpforms-required-label {
  color: #ff0000;
}

body.single-product .single-product__inquiry-right .wpforms-field input[type="text"],
body.single-product .single-product__inquiry-right .wpforms-field input[type="email"],
body.single-product .single-product__inquiry-right .wpforms-field input[type="tel"],
body.single-product .single-product__inquiry-right .wpforms-field textarea {
  display: block;
  width: 100% !important;
  max-width: 100% !important;
  padding: 12px 14px;
  border: 1px solid rgba(0, 0, 0, 0.14);
  border-radius: 10px;
  font-size: 14px;
  font-family: inherit;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
  box-sizing: border-box;
  background: #fff;
}

body.single-product .single-product__inquiry-right .wpforms-field input.wpforms-field-medium,
body.single-product .single-product__inquiry-right .wpforms-field textarea.wpforms-field-medium {
  width: 100% !important;
  max-width: 100% !important;
}

body.single-product .single-product__inquiry-right .wpforms-field input[type="text"]:focus,
body.single-product .single-product__inquiry-right .wpforms-field input[type="email"]:focus,
body.single-product .single-product__inquiry-right .wpforms-field input[type="tel"]:focus,
body.single-product .single-product__inquiry-right .wpforms-field textarea:focus {
  outline: none;
  border-color: rgba(27, 58, 95, 0.55);
  box-shadow: 0 0 0 4px rgba(27, 58, 95, 0.10);
}

body.single-product .single-product__inquiry-right .wpforms-field textarea {
  resize: vertical;
  min-height: 120px;
}

/* Field spacing: 5px between each input block */
body.single-product .single-product__inquiry-right .wpforms-field {
  padding: 0 !important;
  margin: 0 0 5px 0 !important;
}

body.single-product .single-product__inquiry-right .wpforms-field:last-child {
  margin-bottom: 0 !important;
}

body.single-product .single-product__inquiry-right .wpforms-submit-container {
  padding: 0 !important;
  margin-top: 5px !important;
}

body.single-product .single-product__inquiry-right .wpforms-submit {
  width: 100% !important;
  border-radius: 12px !important;
  padding: 12px 16px !important;
}

/* ==================== FAQ (Single Product) ==================== */
body.single-product .single-product__faq {
  margin-top: 24px;
  padding: 20px 18px;
}

body.single-product .single-product__faq-title {
  margin: 0 0 12px 0;
  font-size: 20px;
  color: var(--heading-primary-color, #1B3A5F);
}

body.single-product .single-product__faq-list {
  display: grid;
  gap: 12px;
}

body.single-product .single-product__faq-item {
  padding: 12px 14px;
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 10px;
  background: #fff;
}

body.single-product .single-product__faq-q {
  font-weight: 700;
  color: var(--heading-primary-color, #1B3A5F);
  margin-bottom: 6px;
}

body.single-product .single-product__faq-a {
  color: var(--body-text-color, #333);
  font-size: 14px;
  line-height: 1.6;
}

@media (max-width: 768px) {
  body.single-product .single-product__inquiry-form {
    padding: 24px 20px;
  }

  body.single-product .single-product__inquiry-inner {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  body.single-product .single-product__inquiry-title {
    font-size: 24px;
  }
}
