@charset "utf-8";
/*==================================================
スライダーのためのcss
===================================*/ :root {
  --primary-black: #000;
  --text-gray: #666;
  --border-color: #eee;
  --arrow-bg: rgba(255, 255, 255, 0.8);
}
body {
  font-family: "PingFang SC", "Helvetica Neue", Arial, sans-serif;
  margin: 0;
  padding: 0;
  color: var(--primary-black);
  background-color: #fff;
}
header {
  border-bottom: 1px solid var(--border-color);
  padding: 20px;
  text-align: center;
  font-weight: bold;
  letter-spacing: 3px;
  position: sticky;
  top: 0;
  background: #fff;
  z-index: 100;
}
.main-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
}
/* --- 图片展示区域 --- */
.gallery-section {
  flex: 1.2;
  padding: 10px;
}
/* 大图容器 */
.viewer-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 1/1;
  background-color: #f9f9f9;
  overflow: hidden;
  display: flex;
  align-items: center;
}
.main-image-viewer img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity 0.4s ease;
}
/* 左右箭头 */
.nav-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  background: var(--arrow-bg);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  transition: 0.3s;
  z-index: 10;
}
.nav-arrow:hover {
  background: #fff;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}
.prev-arrow {
  left: 15px;
}
.next-arrow {
  right: 15px;
}
/* 缩略图 */
.thumbnail-list {
  display: flex;
  gap: 10px;
  margin-top: 15px;
  overflow-x: auto;
  scrollbar-width: none;
}
.thumb {
  width: 70px;
  height: 70px;
  flex-shrink: 0;
  cursor: pointer;
  border: 2px solid transparent;
  opacity: 0.6;
}
.thumb.active {
  border-color: #000;
  opacity: 1;
}
.thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
/* --- 信息详情区域 --- */
.info-section {
  flex: 1;
  padding: 20px 10px;
}
.text-area p {
  font-size: 14px;
}
.spec-table td {
  font-size: 14px;
}
.product-name {
  font-size: 24px;
  margin: 10px 0;
  font-weight: 600;
}
.price-tag {
  font-size: 24px;
  font-weight: bold;
  margin-bottom: 25px;
}
.price-tag small {
  font-size: 14px;
  font-weight: normal;
  color: var(--text-gray);
}
.detail-block {
  margin-bottom: 25px;
  border-top: 1px solid var(--border-color);
  padding-top: 15px;
}
.detail-block h3 {
  font-size: 14px;
  margin-bottom: 10px;
}
.spec-table {
  width: 100%;
  font-size: 13px;
  border-collapse: collapse;
}
.spec-table td {
  padding: 10px 0;
  border-bottom: 1px solid #f5f5f5;
}
.spec-table tr td:first-child {
  min-width: 180px;
}
.buy-button {
  display: block;
  background: #000;
  color: #fff;
  text-align: center;
  padding: 18px;
  text-decoration: none;
  font-weight: bold;
  margin-top: 30px;
}
/* 容器设置为100%宽度 */
.product-list {
  width: 100%;
  max-width: 100%; /* 覆盖之前可能存在的限制 */
  margin: 80px 0;
  padding: 0 20px; /* 两边留白，如需贴边可设为0 */
  box-sizing: border-box;
}
.list-title {
  font-size: 22px;
  text-align: center;
  margin-bottom: 50px;
  letter-spacing: 0.2em;
  font-weight: bold;
}
/* 核心：6个一行布局 */
.product-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr); /* PC端一行6个 */
  gap: 40px 15px; /* 上下间距40px，左右间距15px */
}
.product-item a {
  text-decoration: none;
  color: #333;
  display: block;
  transition: opacity 0.3s;
}
.product-item:hover a {
  opacity: 0.7;
}
.p-img {
  width: 100%;
  aspect-ratio: 1/1; /* 强制正方形 */
  overflow: hidden;
  background: #f7f7f7;
  margin-bottom: 12px;
}
.p-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.p-name {
  font-size: 13px;
  line-height: 1.4;
  height: 2.8em;
  overflow: hidden;
  margin-bottom: 5px;
}
.p-price {
  font-size: 15px;
  font-weight: bold;
}
main .main-container:first-of-type {
  padding: 120px 15px 30px;
}
	main .main-container:nth-child(n+2) {
  padding: 30px 15px 120px;
}

/* 响应式调整 */
@media (max-width: 1200px) {
  .product-grid {
    grid-template-columns: repeat(4, 1fr); /* 中屏一行4个 */
  }
}
@media (max-width: 768px) {
  .product-list {
    padding: 0 10px;
  }
  .product-grid {
    grid-template-columns: repeat(2, 1fr); /* 手机端一行2个 */
    gap: 25px 10px;
  }
  .p-name {
    font-size: 12px;
  }
}
/* --- 响应式布局: 900px --- */
@media (min-width: 900px) {
  .main-container {
    flex-direction: row;
    padding: 120px 60px;
    gap: 50px;
  }
	main .main-container:first-of-type {
  padding: 120px 0 30px;
}
	main .main-container:nth-child(n+2) {
  padding: 30px 0 120px;
}
  .gallery-section {
    position: sticky;
    top: 100px;
    height: fit-content;
  }
  .product-name {
    font-size: 30px;
    line-height: 1.25;
  }
}