body {
  background: #ffffff;
}

.deck-gallery-section {
  padding: 30px 0;
}

.deck-gallery-left {
  position: relative;
  width: 100%;
}

/* 主图轮播：使用 4:3 比例控制高度，让左侧高度与右侧色卡区域基本一致 */
.deck-main-swiper {
  width: 100%;
  aspect-ratio: 4 / 3;
  background: #f5f5f5;
  overflow: hidden;
}

.deck-main-swiper .swiper-wrapper,
.deck-main-swiper .swiper-slide {
  height: 100%;
}

.deck-main-swiper .swiper-slide {
  position: relative;
  overflow: hidden;
  background: #f5f5f5;
}

.deck-main-swiper .zoom-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  cursor: zoom-in;
  transition: transform 0.25s ease;
  transform-origin: center center;
  user-select: none;
}

.deck-main-swiper .zoom-img.is-zoomed {
  cursor: zoom-out;
  transform: scale(2);
}

/* 放大镜图标 */
.deck-zoom-hint {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 42px;
  height: 42px;
  background: rgba(255, 255, 255, 0.85);
  z-index: 5;
  pointer-events: none;
}

.deck-zoom-hint::before {
  content: "";
  position: absolute;
  left: 12px;
  top: 10px;
  width: 14px;
  height: 14px;
  border: 2px solid #222;
  border-radius: 50%;
}

.deck-zoom-hint::after {
  content: "";
  position: absolute;
  left: 25px;
  top: 25px;
  width: 11px;
  height: 2px;
  background: #222;
  transform: rotate(45deg);
  transform-origin: left center;
}

/* 左右箭头 */
.deck-main-swiper .swiper-button-prev,
.deck-main-swiper .swiper-button-next {
  color: #ffffff;
  width: 34px;
  height: 34px;
}

.deck-main-swiper .swiper-button-prev::after,
.deck-main-swiper .swiper-button-next::after {
  font-size: 26px;
  font-weight: bold;
}

/* 缩略图：覆盖到大图底部，水平居中 */
.deck-thumb-swiper {
  position: absolute;
  left: 50%;
  bottom: 14px;
  z-index: 20;
  width: auto;
  max-width: 82%;
  margin-top: 0;
  transform: translateX(-50%);
}

.deck-thumb-swiper .swiper-wrapper {
  justify-content: center;
}

.deck-thumb-swiper .swiper-slide {
  width: 64px;
  height: 48px;
  border: 2px solid rgba(255, 255, 255, 0.8);
  opacity: 0.65;
  cursor: pointer;
  overflow: hidden;
  box-sizing: border-box;
  background: #ffffff;
}

.deck-thumb-swiper .swiper-slide-thumb-active {
  opacity: 1;
  border-color: #08a66a;
}

.deck-thumb-swiper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* 右侧：色卡 */
.deck-swatch-panel {
  width: 100%;
}

.deck-filter {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
  padding-left: 0;
  margin-bottom: 16px;
}

/* 顶部过滤栏：放在左右两栏上方，宽度跟 container 一致 */
.deck-filter-top {
  margin-bottom: 18px;
}

.deck-filter-label {
  flex: 0 0 auto;
  color: #111111;
  font-size: 15px;
  font-weight: 600;
  line-height: 1;
}

.deck-filter-buttons {
  display: flex;
  flex: 1 1 auto;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
}

.deck-filter-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 26px;
  padding: 3px 12px;
  border: 1px solid #d7d7d7;
  border-radius: 999px;
  background: #ffffff;
  color: #111111;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
  transition: background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}

.deck-filter-btn:hover,
.deck-filter-btn:focus-visible {
  border-color: #9a9a9a;
  outline: none;
}

.deck-filter-btn.is-active {
  border-color: #006b5b;
  background: #006b5b;
  color: #ffffff;
  font-weight: 600;
}

.deck-filter-dot {
  width: 10px;
  height: 10px;
  margin-right: 5px;
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 50%;
  background: var(--filter-color, #cccccc);
  flex: 0 0 auto;
}

.deck-filter-btn.is-active .deck-filter-dot {
  border-color: rgba(255, 255, 255, 0.72);
}

.deck-filter-empty {
  padding: 22px 10px;
  color: #777777;
  font-size: 15px;
  text-align: center;
  border: 1px dashed #dddddd;
  background: #fafafa;
}

.deck-empty-slide {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #777777;
  font-size: 15px;
}

.deck-swatches {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  padding-left: 4px;
  align-content: start;
}

.deck-swatch {
  position: relative;
  border: 0;
  padding: 0;
  background: transparent;
  cursor: pointer;
  overflow: hidden;
  outline: none !important;
  box-shadow: none;
}

.deck-swatch:focus,
.deck-swatch:active {
  outline: none !important;
  box-shadow: none !important;
}

.deck-swatch img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  display: block;
}

/* 色卡选中绿边框：用伪元素覆盖，点击后立即显示 */
.deck-swatch.is-active::after {
  content: "";
  position: absolute;
  inset: 0;
  border: 4px solid #08a66a;
  pointer-events: none;
  z-index: 4;
  box-sizing: border-box;
}

/* 色卡 hover 覆盖层：鼠标移入时显示半透明背景和白色色卡名称 */
.deck-swatch-title {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px;
  background: rgba(0, 0, 0, 0.45);
  color: #ffffff;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.25;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.deck-swatch:hover .deck-swatch-title,
.deck-swatch:focus-visible .deck-swatch-title {
  opacity: 1;
}

/* 平板 */
@media (max-width: 991px) {
  .deck-swatch-panel {
    margin-top: 20px;
  }

  .deck-swatches {
    padding-left: 0;
  }
}

/* 手机端：色卡保持一行 3 列 */
@media (max-width: 575px) {
  .deck-gallery-section {
    padding: 20px 0;
  }

  .deck-filter {
    gap: 8px;
    margin-bottom: 12px;
  }

  .deck-filter-label {
    width: 100%;
  }

  .deck-filter-buttons {
    gap: 7px;
  }

  .deck-filter-btn {
    min-height: 25px;
    padding: 3px 10px;
    font-size: 13px;
  }

  .deck-swatches {
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
  }

  .deck-thumb-swiper {
    bottom: 10px;
    max-width: 88%;
  }

  .deck-thumb-swiper .swiper-slide {
    width: 52px;
    height: 38px;
  }

  .deck-swatch-title {
    font-size: 13px;
    padding: 6px;
  }
}