/* ============================================================
   pages.css — 页面特有样式补充
   ============================================================ */

/* 首页产品区块特色样式 */
.product-zone {
  position: relative;
  padding: var(--sp-12) 0;
  border-bottom: 1px solid var(--border-subtle);
}
.product-zone:last-child { border-bottom: none; }

/* 首页推荐产品卡片网格 */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--sp-4);
}

/* 产品详情页 */
.product-detail__hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-8);
  align-items: start;
  margin-bottom: var(--sp-10);
}
.product-detail__media {
  aspect-ratio: 4/3;
  background: var(--bg-subtle);
  border-radius: var(--radius-xl);
  display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--border-subtle);
}
.product-detail__media svg { width: 96px; height: 96px; color: var(--brand-accent-soft); }
.product-detail__title { font-size: var(--fs-28); font-weight: var(--fw-700); margin-bottom: var(--sp-3); }
.product-detail__desc { font-size: var(--fs-15); color: var(--text-secondary); line-height: var(--lh-relaxed); margin-bottom: var(--sp-5); }
.product-detail__specs { margin-top: var(--sp-8); }

/* 询价表单 */
.inquiry-form { max-width: 640px; margin: 0 auto; }
.inquiry-form .card { padding: var(--sp-6); }
.inquiry-list {
  margin-bottom: var(--sp-5);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.inquiry-list__item {
  display: flex; align-items: center; justify-content: space-between;
  padding: var(--sp-3) var(--sp-4);
  border-bottom: 1px solid var(--border-subtle);
  font-size: var(--fs-13);
}
.inquiry-list__item:last-child { border-bottom: none; }
.inquiry-list__item .name { font-weight: var(--fw-500); }
.inquiry-list__item .qty { color: var(--text-tertiary); }

/* 关于我们 */
.timeline { position: relative; padding-left: var(--sp-6); }
.timeline::before { content: ""; position: absolute; left: 7px; top: 0; bottom: 0; width: 2px; background: var(--brand-accent); }
.timeline__item { position: relative; margin-bottom: var(--sp-6); }
.timeline__item::before {
  content: ""; position: absolute; left: calc(-1 * var(--sp-6) + 2px); top: 4px;
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--brand-primary); border: 2px solid #fff; box-shadow: 0 0 0 2px var(--brand-primary);
}
.timeline__date { font-size: var(--fs-12); color: var(--brand-accent); font-weight: var(--fw-600); }
.timeline__title { font-size: var(--fs-15); font-weight: var(--fw-600); margin: var(--sp-1) 0; }
.timeline__desc { font-size: var(--fs-13); color: var(--text-secondary); line-height: var(--lh-relaxed); }

/* 新闻详情 */
.article { max-width: var(--reading-max); margin: 0 auto; }
.article__title { font-size: var(--fs-28); font-weight: var(--fw-700); line-height: var(--lh-tight); margin-bottom: var(--sp-3); }
.article__meta { display: flex; align-items: center; gap: var(--sp-4); font-size: var(--fs-13); color: var(--text-tertiary); margin-bottom: var(--sp-6); padding-bottom: var(--sp-4); border-bottom: 1px solid var(--border-subtle); }
.article__body { font-size: var(--fs-15); line-height: var(--lh-relaxed); color: var(--text-primary); }
.article__body p { margin-bottom: var(--sp-4); }
.article__body h3 { font-size: var(--fs-18); font-weight: var(--fw-700); margin: var(--sp-6) 0 var(--sp-3); }
.article__body ul { padding-left: var(--sp-5); margin-bottom: var(--sp-4); }
.article__body ul li { list-style: disc; margin-bottom: var(--sp-2); }

/* 页面头部 banner */
.page-banner {
  background: linear-gradient(135deg, var(--blue-700), var(--blue-500));
  color: #fff; padding: var(--sp-12) 0;
}
.page-banner__title { font-size: var(--fs-32); font-weight: var(--fw-700); margin-bottom: var(--sp-2); }
.page-banner__desc { font-size: var(--fs-14); color: rgba(255,255,255,.8); }

/* 响应式补充 */
@media (max-width: 1024px) {
  .feature-grid { grid-template-columns: repeat(3, 1fr); }
  .product-detail__hero { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
  .product-detail__title { font-size: var(--fs-24); }
}
@media (max-width: 640px) {
  .feature-grid { grid-template-columns: 1fr; }
}

/* 详情页 上一篇 / 下一篇 翻页 */
.mmm-pager .pager-link { display:flex; gap:8px; align-items:center; color:inherit; text-decoration:none; padding:6px 0; transition:color .2s; }
.mmm-pager .pager-link:hover { color:var(--brand-primary); }
.mmm-pager .pager-dir { color:var(--text-muted); flex-shrink:0; font-size:var(--fs-13); }
.mmm-pager .pager-tt { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }

/* ===== 淘宝式商品图集（主图+缩略图+放大镜+Lightbox） ===== */
.product-detail__media {
  aspect-ratio: auto;
  background: #fff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: var(--sp-4);
  display: block;
}
.pd-gallery { width: 100%; }
.pd-gallery__stage {
  position: relative;
  overflow: hidden;
  cursor: zoom-in;
  aspect-ratio: 1/1;
  background: #fff;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
}
.pd-gallery__main {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  user-select: none;
  -webkit-user-drag: none;
}
.pd-gallery__hint {
  position: absolute;
  left: 10px;
  bottom: 10px;
  z-index: 2;
  font-size: 12px;
  color: #999;
  background: rgba(255,255,255,.85);
  padding: 2px 8px;
  border-radius: 4px;
  pointer-events: none;
}
.pd-gallery__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 3;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: rgba(0,0,0,.35);
  color: #fff;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity .2s, background .2s;
}
.pd-gallery__stage:hover .pd-gallery__nav { opacity: 1; }
.pd-gallery__nav:hover { background: rgba(0,0,0,.6); }
.pd-gallery__nav--prev { left: 10px; }
.pd-gallery__nav--next { right: 10px; }
.pd-gallery__nav.is-disabled { opacity: 0 !important; pointer-events: none; }
/* 放大镜 */
.pd-gallery__lens {
  position: absolute;
  width: 140px;
  height: 140px;
  border: 2px solid var(--brand-primary);
  border-radius: 6px;
  background-repeat: no-repeat;
  box-shadow: 0 0 0 1px rgba(255,255,255,.6), 0 4px 14px rgba(0,0,0,.25);
  pointer-events: none;
  z-index: 4;
  display: none;
}
/* 缩略图 */
.pd-gallery__thumbs {
  display: flex;
  gap: 10px;
  margin-top: 12px;
  flex-wrap: wrap;
}
.pd-gallery__thumb {
  width: 68px;
  height: 68px;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 6px;
  background: #fff;
  overflow: hidden;
  cursor: pointer;
  transition: border-color .2s, box-shadow .2s;
}
.pd-gallery__thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pd-gallery__thumb:hover { border-color: rgba(31,78,121,.4); }
.pd-gallery__thumb.is-active {
  border-color: var(--brand-primary);
  box-shadow: 0 0 0 1px var(--brand-primary);
}
/* Lightbox 大图 */
.pd-lightbox {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0,0,0,.9);
  display: flex;
  align-items: center;
  justify-content: center;
}
.pd-lightbox[hidden] { display: none; }
.pd-lightbox__img {
  max-width: 88vw;
  max-height: 84vh;
  object-fit: contain;
  border-radius: 6px;
  box-shadow: 0 8px 40px rgba(0,0,0,.5);
}
.pd-lightbox__close {
  position: absolute;
  top: 18px;
  right: 22px;
  z-index: 5;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 50%;
  background: rgba(255,255,255,.15);
  color: #fff;
  font-size: 20px;
  cursor: pointer;
  transition: background .2s;
}
.pd-lightbox__close:hover { background: rgba(255,255,255,.3); }
.pd-lightbox .pd-gallery__nav { opacity: 1; background: rgba(255,255,255,.18); }
.pd-lightbox .pd-gallery__nav:hover { background: rgba(255,255,255,.35); }
.pd-lightbox__count {
  position: absolute;
  bottom: 22px;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255,255,255,.8);
  font-size: 14px;
}
body.pd-lightbox-open { overflow: hidden; }
@media (max-width: 640px) {
  .pd-gallery__thumb { width: 56px; height: 56px; }
  .pd-gallery__nav { opacity: 1; }
}

/* ============================================================
   搜索结果缩略图 —— 淘宝式 1:1 白底裁剪（与列表页统一）
   ============================================================ */
.card-img-150 {
  aspect-ratio: 1/1;
  background: #fff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
  display: block;
  margin-bottom: var(--sp-3);
}
.card-img-150 a { position: relative; display: block; width: 100%; height: 100%; }
.card-img-top {
  width: 100%; height: 100%;
  object-fit: cover; display: block;
  transition: transform 600ms ease, filter 500ms ease;
}
.card-img-150:hover .card-img-top { transform: scale(1.05); filter: brightness(1.04); }

/* ============================================================
   全站列表缩略图统一兜底（淘宝式 1:1 白底裁剪）
   作用于任何仍使用 .card-img 的内容列表缩略图
   ============================================================ */
.product-grid .card__media { aspect-ratio: 1/1; background: #fff; border-bottom: 1px solid var(--border-subtle); }
