/* ==========================================================
   Product 详情页（页面专属模块）
   共用样式来自 global.css（头尾/工具类）、home.css（WhyChose/CTA/入场）、
   products.css（You may also like 的目录卡片）
   ========================================================== */
/* ---------- 面包屑 ---------- */
.pdpCrumb {
  padding: clamp(24px, 3vw, 40px) var(--padding) 0;
  font-size: 14px;
  color: var(--gray-400);
}
.pdpCrumb a {
  color: inherit;
}
.pdpCrumb a:hover {
  color: var(--orange);
}
.pdpCrumb i {
  margin: 0 8px;
  font-style: normal;
}
.pdpCrumb b {
  font-weight: 400;
  color: var(--gray-700);
}
/* ---------- 两栏：左图库 / 右信息 ---------- */
.pdp {
  display: grid;
  grid-template-columns: minmax(0, 1fr) clamp(400px, 24vw, 460px);
  gap: clamp(28px, 3.6vw, 64px);
  padding: clamp(20px, 2.4vw, 36px) var(--padding) 0;
  align-items: start;
}
/* 图库 */
.gallery .main {
  position: relative;
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(120deg, #eef3f6 0%, #fbfcfd 100%);
  overflow: hidden;
}
.gallery .main img {
  height: 88%;
  width: auto;
  max-width: 90%;
  object-fit: contain;
  transition: opacity .25s ease;
}
.gallery .main img.is-fading {
  opacity: 0;
}
.gallery .thumbs {
  display: flex;
  gap: 14px;
  margin-top: 16px;
}
.gallery .thumb {
  width: clamp(72px, 7vw, 104px);
  aspect-ratio: 1;
  padding: 0;
  border: 1px solid var(--gray-100);
  border-radius: 8px;
  background: #f2f6f8;
  overflow: hidden;
  cursor: pointer;
  transition: border-color 0.2s ease;
}
.gallery .thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.gallery .thumb:hover {
  border-color: var(--gray-300);
}
.gallery .thumb.is-active {
  border-color: var(--orange);
  box-shadow: 0 0 0 1px var(--orange) inset;
}
/* 信息区 */
.info .eyebrow {
  font-size: 14px;
  color: var(--gray-400);
  text-transform: uppercase;
}
.info h1 {
  margin-top: 10px;
  font-size: clamp(30px, 3vw, 48px);
  line-height: 1;
  color: var(--black);
}
.info .code {
  margin-top: 12px;
  font-size: clamp(14px, 1.2vw, 18px);
  color: var(--gray-700);
}
.info .price {
  margin-top: 18px;
  font-family: var(--head);
  font-weight: 700;
  font-style: italic;
  font-size: clamp(26px, 2.4vw, 36px);
  color: var(--orange);
}
.info .spec {
  margin-top: 18px;
  font-size: clamp(14px, 1.2vw, 18px);
  line-height: 1.6;
  color: var(--gray-700);
}
.info .care {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 14px;
}
.info .care img {
  width: 30px;
}
/* 选项组：颜色 / 尺码 / 数量 */
.opt {
  margin-top: 28px;
}
.opt .lbl {
  display: flex;
  align-items: center;
  gap: 14px;
  font-family: var(--head);
  font-weight: 700;
  font-style: italic;
  font-size: 17px;
  text-transform: uppercase;
  color: var(--black);
}
.opt .guide {
  font-family: var(--head);
  font-style: italic;
  font-size: 13px;
  color: var(--orange);
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.opt .guide:hover {
  text-decoration: underline;
}
/* 颜色色块 */
.swatches {
  display: flex;
  gap: 12px;
  margin-top: 14px;
  flex-wrap: wrap;
}
.swatches .swatch {
  width: clamp(88px, 7vw, 112px);
  padding: 0;
  background: #fff;
  border: 1px solid var(--gray-200);
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  font-family: var(--head);
  font-weight: 700;
  font-size: 12px;
  text-transform: uppercase;
  color: var(--black);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.swatches .swatch .sw {
  display: block;
  height: 34px;
  border-bottom: 1px solid var(--gray-100);
}
.swatches .swatch .name {
  display: block;
  padding: 8px 0 10px;
}
.swatches .swatch:hover {
  border-color: var(--gray-400);
}
.swatches .swatch.is-active {
  border-color: var(--orange);
  box-shadow: 0 6px 16px rgba(255, 156, 18, 0.25);
}
/* 尺码 */
.sizes {
  display: flex;
  gap: 10px;
  margin-top: 14px;
  flex-wrap: wrap;
}
.sizes .size {
  min-width: clamp(52px, 3.8vw, 64px);
  height: clamp(48px, 3.8vw, 58px);
  padding: 0 10px;
  background: #fff;
  border: 1px solid var(--gray-200);
  border-radius: 8px;
  cursor: pointer;
  font-family: var(--head);
  font-weight: 700;
  font-size: 18px;
  text-transform: uppercase;
  color: var(--black);
  transition: border-color 0.2s ease;
}
.sizes .size:hover {
  border-color: var(--gray-400);
}
.sizes .size.is-active {
  border-color: var(--orange);
  box-shadow: 0 6px 16px rgba(255, 156, 18, 0.25);
}
/* 数量步进器 */
.qtyBox {
  margin-top: 14px;
  display: inline-flex;
  align-items: center;
  width: clamp(160px, 14vw, 200px);
  height: 52px;
  border: 1px solid var(--gray-200);
  border-radius: 8px;
}
.qtyBox button {
  flex: 0 0 48px;
  height: 100%;
  background: none;
  border: 0;
  cursor: pointer;
  font-size: 18px;
  color: var(--gray-600);
}
.qtyBox button:hover {
  color: var(--orange);
}
.qtyBox button:disabled {
  color: var(--gray-300);
  cursor: default;
}
.qtyBox input {
  flex: 1;
  min-width: 0;
  height: 100%;
  border: 0;
  outline: none;
  text-align: center;
  font-family: var(--head);
  font-weight: 700;
  font-size: 20px;
  color: var(--black);
  background: transparent;
  -moz-appearance: textfield;
}
.qtyBox input::-webkit-inner-spin-button,
.qtyBox input::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.qtyMax {
  margin-top: 6px;
  font-size: 11px;
  color: var(--gray-400);
  text-transform: uppercase;
}
/* 操作按钮组 */
.buyRow {
  display: flex;
  gap: 12px;
  margin-top: 32px;
  flex-wrap: wrap;
}
.buyRow .btnAction {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  height: 56px;
  padding: 0 24px;
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  font-family: var(--head);
  font-weight: 700;
  font-style: italic;
  font-size: 15px;
  text-transform: uppercase;
  transition: filter 0.2s ease, box-shadow 0.25s ease, transform 0.2s ease;
}
.buyRow .btnAction:hover {
  transform: translateY(-2px);
}
.buyRow .addBag {
  flex: 1 1 auto;
  white-space: nowrap;
  background: var(--orange);
  color: #1a1205;
}
.buyRow .addBag:hover {
  box-shadow: 0 8px 26px rgba(255, 156, 18, 0.55);
}
.buyRow .customize {
  flex: 1 1 auto;
  white-space: nowrap;
  background: var(--dark);
  color: #fff;
}
.buyRow .customize:hover {
  box-shadow: 0 8px 26px rgba(23, 24, 26, 0.35);
}
.buyRow .wish {
  flex: 0 0 56px;
  padding: 0;
  background: #fff;
  border: 1px solid var(--gray-200);
  color: var(--gray-700);
  font-size: 22px;
}
.buyRow .wish:hover {
  border-color: var(--orange);
  color: var(--orange);
}
.buyRow .wish[aria-pressed="true"] {
  border-color: var(--orange);
  color: var(--orange);
}
/* ---------- 商品描述 ---------- */
.desc {
  display: grid;
  grid-template-columns: minmax(0, 1fr) clamp(400px, 24vw, 460px);
  gap: clamp(28px, 3.6vw, 64px);
  padding: clamp(48px, 5vw, 80px) var(--padding) 0;
}
.desc .descMain {
  min-width: 0;
}
.desc h2 {
  font-size: clamp(26px, 2.4vw, 36px);
  line-height: 1;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--gray-200);
  color: var(--black);
}
.desc img {
  width: 100%;
  margin-top: 24px;
  border-radius: 6px;
}
/* ---------- You may also like ---------- */
.related {
  padding-top: clamp(48px, 5vw, 80px);
  /* 箭头与首页 FEATURED PRODUCTS 一致：纯图标、悬停放大变橙，prev 旋转 */
  /* 可滑动轨道：横向滚动、吸附对齐，桌面一屏约 3 张，隐藏滚动条 */
}
.related .relHead {
  padding: 0 var(--padding);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.related h2 {
  font-size: clamp(26px, 2.6vw, 40px);
  line-height: 1;
  color: var(--black);
}
.related .controller {
  display: flex;
  align-items: center;
}
.related .controller .arrow {
  margin-left: 10px;
  transition: all 0.3s ease-out;
  cursor: pointer;
}
.related .controller .arrow .iconfont {
  font-size: clamp(20px, 3vw, 32px);
}
.related .controller .prev {
  transform: rotate(180deg);
}
.related .controller .arrow:hover {
  transform: scale(1.1);
  color: var(--orange);
}
.related .controller .prev:hover {
  transform: scaleX(1.1) rotate(180deg);
}
.related .catalog {
  margin-top: 24px;
  padding: 0 var(--padding) clamp(48px, 5vw, 80px);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.related .catalog::-webkit-scrollbar {
  display: none;
}
.related .productItems.is-catalog {
  display: flex;
  gap: 20px;
  width: max-content;
  padding: 0;
}
.related .productItems.is-catalog .productItem {
  flex: 0 0 auto;
  width: calc((100vw - 2 * var(--padding) - 40px) / 3);
  scroll-snap-align: start;
}
@media (max-width: 1080px) {
  .related .productItems.is-catalog .productItem {
    width: calc((100vw - 2 * var(--padding) - 20px) / 2);
  }
  .pdp,
  .desc {
    grid-template-columns: 1fr;
  }
  .info {
    max-width: 640px;
  }
}
@media (max-width: 560px) {
  .related .productItems.is-catalog .productItem {
    width: 78vw;
  }
  .buyRow .btnAction {
    flex: 1 1 100%;
  }
  .buyRow .wish {
    flex: 0 0 56px;
  }
  .swatches .swatch {
    width: calc(25.333333333333332%);
  }
  .sizes .size {
    flex: 1 1 calc(10%);
    min-width: 0;
  }
}
