/* ============================================================
   PRODUCT DETAIL PAGE
   Companion stylesheet — relies on products.css for tokens,
   sidebar, hero, mobile nav, and CTA band.
============================================================ */

/* ---------- Product header (gallery + info) ---------- */
.product-detail {
  width: 100%;
}

.product-header {
  display: grid;
  grid-template-columns: minmax(0, 54%) minmax(330px, 1fr);
  gap: 30px;
  align-items: start;
  margin-bottom: 50px;
}

/* ---------- Image gallery ---------- */
.product-gallery {
  position: relative;
  min-width: 0;
}

.gallery-shell {
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr);
  gap: 20px;
  width: 100%;
}

.gallery-shell.is-single-image {
  grid-template-columns: minmax(0, 1fr);
}

.gallery-shell.is-single-image .product-thumbs,
.gallery-shell.is-single-image .gallery-nav {
  display: none;
}

.product-thumbs {
  width: 74px;
  height: clamp(420px, 47vw, 520px);
  padding: 2px;
}

.product-thumbs .swiper-slide {
  width: 68px;
  height: 68px !important;
  border: 1px solid transparent;
  border-radius: 8px;
  overflow: hidden;
  background: #f2f2f2;
  opacity: 0.62;
  cursor: pointer;
  transition: border-color 0.22s var(--ease), opacity 0.22s var(--ease), box-shadow 0.22s var(--ease);
}

.product-thumbs .swiper-slide-thumb-active {
  border-color: var(--ink);
  opacity: 1;
  box-shadow: 0 0 0 1px var(--ink);
}

.product-thumbs img,
.product-main img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gallery-stage {
  position: relative;
  overflow: hidden;
  border-radius: 10px;
  background: #f3f3f3;
}

.product-main {
  width: 100%;
  height: clamp(420px, 47vw, 520px);
}

.product-main .swiper-slide {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
}

.gallery-nav {
  position: absolute;
  top: 50%;
  z-index: 3;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(20, 16, 15, 0.08);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.86);
  color: var(--ink);
  font-size: 1.45rem;
  transform: translateY(-50%);
  box-shadow: 0 8px 22px rgba(20, 16, 15, 0.08);
  transition: background 0.22s var(--ease), color 0.22s var(--ease), transform 0.22s var(--ease);
}

.gallery-nav:hover {
  background: var(--c1);
  color: #fff;
  transform: translateY(-50%) scale(1.04);
}

.gallery-prev {
  left: 18px;
}

.gallery-next {
  right: 18px;
}

/* ---------- Product info ---------- */
.product-info {
  min-width: 0;
  padding-top: 2px;
}

.product-title {
  font-family: var(--f-display);
  font-size: 22px;
  font-weight: 700;
  line-height: 1.18;
  color: var(--ink);
  margin-bottom: 14px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.product-price {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin-bottom: 7px;
}

.price-range {
  font-family: var(--f-display);
  font-size: clamp(1.75rem, 2.8vw, 2.25rem);
  font-weight: 800;
  color: var(--c1);
  line-height: 1;
}

.price-unit {
  font-size: 0.95rem;
  color: var(--muted);
  font-weight: 500;
}

.price-notice {
  font-size: 0.84rem;
  color: var(--muted);
  line-height: 1.45;
  margin-bottom: 14px;
}

/* Meta row — MOQ / SKU / SERVICE */
.product-meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  padding-bottom: 16px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.meta-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-height: 58px;
  padding: 10px 12px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: #fbfaf8;
}

.meta-label {
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
}

.meta-value {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.2;
}

/* Features list */
.product-features {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px 12px;
  margin-bottom: 17px;
}

.feature-item {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  font-size: 0.86rem;
  line-height: 1.28;
  color: var(--ink-3);
}

.feature-item i {
  font-size: 1rem;
  color: #2bb24c;
  flex-shrink: 0;
}

/* Category */
.product-taxonomy {
  padding: 13px 0 15px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--line);
  border-top: 1px solid var(--line);
}

.taxonomy-item {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  font-size: 0.85rem;
}

.tax-label {
  color: var(--muted);
}

.tax-link {
  color: var(--ink);
  font-weight: 600;
  transition: color 0.25s var(--ease);
}

.tax-link:hover {
  color: var(--c1);
}

/* Tags can grow a lot, so keep them outside the narrow info column. */
.product-tags {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px 18px;
  margin: -24px 0 32px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: #fbfaf8;
}

.tag-label {
  flex-shrink: 0;
  padding-top: 6px;
  font-size: 0.84rem;
  color: var(--muted);
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-width: 0;
}

.tag-chip {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  max-width: 100%;
  padding: 0 12px;
  border: 1px solid rgba(155, 12, 14, 0.16);
  border-radius: 999px;
  background: var(--white);
  color: var(--ink);
  font-size: 0.82rem;
  font-weight: 600;
  line-height: 1.2;
  transition: color 0.22s var(--ease), border-color 0.22s var(--ease), background 0.22s var(--ease);
}

.tag-chip:hover {
  border-color: var(--c1);
  background: var(--red-soft);
  color: var(--c1);
}

/* Action buttons */
.product-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.btn-contact,
.btn-message {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-width: 148px;
  min-height: 48px;
  padding: 0 24px;
  border-radius: 4px;
  font-size: 0.92rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: #fff;
  transition: all 0.3s var(--ease);
}

.btn-contact i,
.btn-message i {
  font-size: 1.15rem;
}

.btn-contact {
  background: var(--c1);
  box-shadow: 0 6px 18px var(--red-glow);
}

.btn-contact:hover {
  background: var(--c2);
  transform: translateY(-2px);
  box-shadow: 0 10px 26px var(--red-glow);
}

.btn-message {
  background: var(--c2);
  color: var(--ink);
  box-shadow: 0 6px 18px var(--accent-glow);
}

.btn-message:hover {
  background: var(--c1);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 10px 26px var(--accent-glow);
}

/* ---------- Introduction / spec table ---------- */
.product-introduction {
  width: 100%;
}

.intro-title {
  font-family: var(--f-display);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--ink);
  padding-bottom: 16px;
  margin-bottom: 0;
  border-bottom: 2px solid var(--ink);
}

.intro-table {
  border: 1px solid var(--line);
  border-top: none;
}

.table-row {
  display: grid;
  grid-template-columns: 1fr 2fr 1fr 2fr;
}

.table-row:nth-child(odd) {
  background: var(--sand);
}

.table-cell {
  padding: 14px 18px;
  font-size: 0.9rem;
  border-bottom: 1px solid var(--line);
  border-right: 1px solid var(--line);
  display: flex;
  align-items: center;
}

.table-cell:last-child {
  border-right: none;
}

.table-row:last-child .table-cell {
  border-bottom: none;
}

.table-cell.label {
  color: var(--muted);
  font-weight: 500;
}

.table-cell.value {
  color: var(--ink);
  font-weight: 600;
}

/* ---------- Related products: independent full-width row ---------- */
.related-products-section {
  background: var(--white);
  padding: 28px 0 72px;
}

.related-products-inner {
  padding: 0;
}

.related-heading {
  margin-bottom: 22px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.related-heading h2 {
  margin-top: 8px;
  color: var(--ink);
  font-family: var(--f-display);
  font-size: 1.7rem;
  line-height: 1.15;
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
  align-items: stretch;
}

.related-grid .product-card {
  height: 100%;
}

/* ============================================================
   RESPONSIVE
============================================================ */
@media (max-width: 1024px) {
  .product-header {
    grid-template-columns: 1fr;
    gap: 28px;
  }
  .product-gallery {
    position: static;
  }
  .product-info {
    max-width: 760px;
  }
  .related-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 768px) {
  .page-container {
    padding: 32px 20px 0px !important;
  }

  .related-products-section .wrap {
    padding: 0 !important;
  }

  .product-header {
    grid-template-columns: 1fr;
    gap: 22px;
    margin-bottom: 40px;
  }

  .gallery-shell {
    grid-template-columns: 64px minmax(0, 1fr);
    gap: 12px;
  }
  .product-thumbs {
    width: 64px;
    height: clamp(330px, 63vw, 440px);
  }
  .product-thumbs .swiper-slide {
    width: 58px;
    height: 58px !important;
  }
  .product-main {
    height: clamp(330px, 63vw, 440px);
  }
  .gallery-nav {
    width: 38px;
    height: 38px;
    font-size: 1.25rem;
  }
  .product-title {
    font-size: 16px;
    margin-bottom: 16px;
    padding-bottom: 16px;
    font-weight: bold;
    line-height: normal;
  }
  .price-range {
    font-size: 1.7rem;
  }
  .product-features {
    grid-template-columns: 1fr;
  }
  .product-tags {
    margin-top: -18px;
  }
  /* Spec table → stacked two columns per row */
  .table-row {
    grid-template-columns: 1fr 1.4fr;
  }
  .table-cell {
    padding: 12px 14px;
    font-size: 0.85rem;
  }
  .related-products-section {
    padding: 22px 20px 52px;
  }
  .related-heading {
    display: block;
  }
}

@media (max-width: 480px) {
  .gallery-shell {
    display: flex;
    flex-direction: column-reverse;
    gap: 10px;
  }
  .product-main {
    height: clamp(260px, 72vw, 340px);
  }
  .product-thumbs {
    width: 100%;
    height: 58px;
    padding: 0;
  }
  .product-thumbs .swiper-slide {
    width: 58px !important;
    height: 58px !important;
  }
  .gallery-prev {
    left: 12px;
  }
  .gallery-next {
    right: 12px;
  }
  .product-actions {
    flex-wrap: nowrap;
  }
  .btn-contact,
  .btn-message {
    width: 100%;
  }

  .meta-item {
    min-height: auto;
  }
  .product-taxonomy {
    margin-bottom: 14px;
  }
  .product-tags {
    flex-direction: column;
    gap: 8px;
    padding: 14px;
    margin-bottom: 26px;
  }
  .tag-label {
    padding-top: 0;
  }
  .intro-title {
    font-size: 1.3rem;
  }
  .table-cell {
    padding: 10px 12px;
    font-size: 0.8rem;
  }
  .related-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.company-support {
  margin: 2rem auto;
  padding: 40px 50px;
  background: #f9fafc;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  font-family: 'Helvetica Neue', Arial, sans-serif;
  color: #333;
  line-height: 1.8;
}

.company-support p {
  font-size: 16px;
  color: #444;
}

.company-support ul {
  list-style: none;
  padding: 0;
  margin: 25px 0;
}

.company-support li {
  position: relative;
  padding-left: 28px;
  margin-bottom: 12px;
  font-size: 16px;
}

.company-support li::before {
  content: '✔';
  position: absolute;
  left: 0;
  top: 0;
  color: var(--c1);
  font-weight: bold;
}

.company-support strong {
  color: var(--c1);
  font-weight: 600;
}

.company-support p:last-of-type {
  color: #111;
}

@media screen and (max-width: 700px) {
  .company-support {
    padding: 22px 14px;
  }
  .company-support p,
  .company-support li {
    font-size: 14px;
  }
}

/* table */
/* 表格容器，支持水平滚动 */
/* 自适应且美观的 Table 样式 */

.cont111.entry {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  font-size: 14px;
}

.cont111.entry table {
  width: 100%;
  min-width: 640px;
  border-collapse: collapse;
  table-layout: fixed;
  background: #fff;
  border: 1px solid #e6e6e6;
  font-size: 16px;
  color: #222;
  table-layout: auto;
  margin-bottom: 10px;
}

.cont111.entry td {
  padding: 0.5rem;
  border: 1px solid #e6e6e6;
  vertical-align: middle;
  line-height: 1.5;
  background: #fff;
  white-space: normal;
  word-break: break-word;
  font-size: 0.775rem;
}

/* 第1、3列：标题项 */
.cont111.entry td:nth-child(1),
.cont111.entry td:nth-child(3) {
  width: 18%;
  font-weight: 400;
  color: #333;
  background: #f8f8f8;
}

/* 第2、4列：内容项 */
.cont111.entry td:nth-child(2),
.cont111.entry td:nth-child(4) {
  width: 32%;
  font-weight: 700;
  color: #111;
}

.cont111 img {
  width: auto;
}

/* 整体容器 */
#key-attributes {
  background: #ffffff;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.04);
}

/* 表格主体 */
#key-attributes .id-grid.id-grid-cols-2 {
  border: none;
}

/* 每一行 */
#key-attributes .id-grid[id] {
  transition: background 0.2s ease, box-shadow 0.2s ease;
}

/* 行 hover 效果 */
#key-attributes .id-grid[id]:hover {
  background: #fafafa;
  box-shadow: inset 0 0 0 9999px rgba(0, 0, 0, 0.02);
}

/* 左侧标题单元格 */
#key-attributes .id-bg-\[\#f8f8f8\] {
  background: #e3e3e3 !important;
  font-weight: 600;
  color: #333;
  border-right: 1px solid #ececec;
}

/* 右侧内容 */
#key-attributes .id-font-medium {
  color: #111;
}

/* 字体 & 间距微调 */
#key-attributes .id-text-sm {
  font-size: 14px;
  line-height: 20px;
}

#key-attributes .id-p-4 {
  padding: 12px 14px;
}

/* 隐藏折叠区域时，不留缝隙 */
#key-attributes .id-hidden {
  display: none !important;
}

/* 外层改成一行两块 */
#key-attributes .id-grid.id-grid-cols-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0; /* 保持表格感，如果想要间距可以改成 8px */
}

/* 每一块（每个属性）本身还是 2 列：标题 + 数值 */
#key-attributes .id-grid[id] {
  display: grid;
  grid-template-columns: 2fr 3fr;
  border-bottom: 1px solid #e9e9e9;
}

/* 让边框更规整 */
#key-attributes .id-grid[id]:nth-child(odd) {
  border-right: 1px solid #e9e9e9;
}

/* 行 hover */
#key-attributes .id-grid[id]:hover {
  background: #fafafa;
}

/* 左侧标题 */
#key-attributes .id-bg-\[\#f8f8f8\] {
  background: #f5f7fa !important;
  font-weight: 600;
  border-right: 1px solid #ededed;
}

/* 右侧值 */
#key-attributes .id-font-medium {
  color: #111;
}
