/* 产品详情页专用样式 */

/* 选项卡内容切换时的轻微淡入，避免内容跳变 */
[data-tab-panel] {
  animation: panel-in 0.25s ease-out both;
}

@keyframes panel-in {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* 规格表在窄屏下保持可读行高 */
.spec-table td,
.spec-table th {
  vertical-align: top;
  line-height: 1.6;
}

/* 产品主图舞台：单张大图，点阵底纹 + 红色角标，替代原缩略图轮播与规格速览栏 */
.product-stage {
  position: relative;
  border: 1px solid #e4eaf0;
  background-color: #ffffff;
  background-image: radial-gradient(rgba(11, 27, 43, 0.055) 1px, transparent 1px);
  background-size: 18px 18px;
  padding: 1.75rem 1.25rem;
}

.product-stage__rule {
  position: absolute;
  left: 0;
  top: 0;
  width: 56px;
  height: 3px;
  background-color: #c8102e;
}

.product-stage__img {
  display: block;
  width: 100%;
  height: 300px;
  object-fit: contain;
  mix-blend-mode: multiply;
}

@media (min-width: 640px) {
  .product-stage {
    padding: 2.25rem 2rem;
  }

  .product-stage__img {
    height: 400px;
  }
}

/* 主图 + 右侧产品描述栏 */
.product-hero {
  display: grid;
  gap: 16px;
}

.product-brief {
  border: 1px solid #e4eaf0;
  background-color: #f5f8fa;
  padding: 20px 18px;
}

.product-brief__eyebrow {
  margin: 0;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #c8102e;
}

.product-brief__lead {
  margin: 12px 0 0;
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.7;
  color: #0b1b2b;
}

.product-brief__text {
  margin: 12px 0 0;
  font-size: 12.5px;
  line-height: 1.85;
  color: #5b7184;
}

.product-brief__note {
  margin: 14px 0 0;
  font-size: 11.5px;
  line-height: 1.7;
  color: #758996;
}

@media (min-width: 1024px) {
  .product-hero {
    grid-template-columns: minmax(0, 1fr) 264px;
    gap: 18px;
    align-items: start;
  }

  .product-stage__img {
    height: 380px;
  }
}

@media (min-width: 1280px) {
  .product-hero {
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 20px;
  }

  .product-stage__img {
    height: 430px;
  }
}

@media (prefers-reduced-motion: reduce) {
  [data-tab-panel] {
    animation: none;
  }
}

/* ---------------------------------------------------------------
   相册：主图 + 缩略图（点击主图可看大图，无悬停放大镜）
   --------------------------------------------------------------- */
.product-zoom {
  position: relative;
  cursor: zoom-in;
}

/* 缩略图条：图片数量由后台决定，超过宽度可横向滚动，不显示计数 */
.product-album {
  display: flex;
  gap: 10px;
  margin-top: 14px;
  padding-bottom: 2px;
  overflow-x: auto;
  scrollbar-width: none;
}

.product-album::-webkit-scrollbar {
  display: none;
}

.product-album__item {
  flex: 0 0 auto;
  width: 88px;
  height: 88px;
  padding: 6px;
  border: 1px solid #e4eaf0;
  background-color: #ffffff;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.product-album__item img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.product-album__item:hover {
  border-color: #c8102e;
}

.product-album__item.is-active {
  border-color: #c8102e;
  box-shadow: inset 0 0 0 1px #c8102e;
}

.product-album__item:focus-visible {
  outline: 2px solid #c8102e;
  outline-offset: 2px;
}

@media (min-width: 640px) {
  .product-album {
    gap: 12px;
    margin-top: 16px;
  }

  .product-album__item {
    width: 104px;
    height: 104px;
  }
}

/* 点击大图后的看图浮层 */
.product-lightbox {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4vmin;
  background-color: rgba(7, 18, 30, 0.94);
}

.product-lightbox[hidden] {
  display: none;
}

.product-lightbox__img {
  width: auto;
  height: auto;
  max-width: min(1120px, 92vw);
  max-height: 86vh;
  padding: 8px;
  background-color: #ffffff;
  object-fit: contain;
}

.product-lightbox__close,
.product-lightbox__nav {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.4);
  background-color: rgba(255, 255, 255, 0.06);
  color: #ffffff;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

.product-lightbox__close:hover,
.product-lightbox__nav:hover {
  border-color: #c8102e;
  background-color: #c8102e;
}

.product-lightbox__close svg,
.product-lightbox__nav svg {
  width: 20px;
  height: 20px;
}

.product-lightbox__close {
  top: 18px;
  right: 18px;
}

.product-lightbox__nav {
  top: 50%;
  transform: translateY(-50%);
}

.product-lightbox__nav--prev {
  left: 16px;
}

.product-lightbox__nav--next {
  right: 16px;
}

.product-lightbox__nav[hidden] {
  display: none;
}

@media (prefers-reduced-motion: reduce) {
  .product-album__item {
    transition: none;
  }
}
