/* 商品列表、商品图片、详情弹窗与尺码样式。 */

/* 首页衣橱：入口与标题同排，商品行下方缩短留白。 */
#collection:has(.wardrobe-entry) {
  padding-bottom: 40px;
}
#collection .section-title:has(.wardrobe-entry) {
  align-items: center;
  gap: 20px;
  margin-bottom: 24px;
}
.wardrobe-entry {
  flex-shrink: 0;
  padding: 12px 20px;
  font-size: 13px;
  margin-left: auto;
}
@media (max-width: 580px) {
  #collection .section-title:has(.wardrobe-entry) {
    flex-wrap: wrap;
    gap: 16px;
  }
  .wardrobe-entry {
    padding: 10px 14px;
    font-size: 12px;
  }
}

/* 第四模块只显示一行；其余商品横向滚动，公开商品由服务器按点击率排序。 */
#products.products {
  display: grid;
  grid-template-columns: none;
  grid-auto-flow: column;
  grid-auto-columns: calc((100% - 66px) / 4);
  overflow-x: auto;
  gap: 22px;
  scroll-snap-type: x mandatory;
  padding-bottom: 16px;
  overscroll-behavior-x: contain;
  scrollbar-color: #6642ea #101016;
  scrollbar-width: none;
}
#products.products::-webkit-scrollbar {
  display: none;
}
.collection-paging {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 18px;
  margin-top: 12px;
}
.collection-paging[hidden] {
  display: none;
}
.collection-paging button {
  width: 48px;
  height: 44px;
  border: 1px solid #6642ea80;
  border-radius: 8px;
  background: #6642ea;
  color: white;
  font-size: 22px;
  cursor: pointer;
}
.collection-paging button:disabled {
  opacity: 0.3;
  cursor: default;
}
.collection-paging button:focus-visible {
  outline: 2px solid #b59cff;
  outline-offset: 3px;
}
.collection-paging span {
  color: var(--muted);
  font-size: 13px;
  min-width: 44px;
  text-align: center;
}
#products .product-card {
  scroll-snap-align: start;
  min-width: 0;
}
#products .product-art {
  height: auto;
  aspect-ratio: 3/4;
}
@media (max-width: 1000px) {
  #products.products {
    grid-auto-columns: calc((100% - 44px) / 3);
  }
}
@media (max-width: 580px) {
  #products.products {
    grid-auto-columns: 74%;
    gap: 16px;
  }
}

.actual-art img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform 0.3s;
  background: #111018;
}
.actual-art:hover img {
  transform: scale(1.03);
}
.actual-art .tag {
  background: #08080bcc;
  padding: 5px 8px;
  border-radius: 3px;
  color: #d2c3ef;
}
.actual-art .arrow {
  background: #14101cd9;
}
.actual-detail img {
  display: block;
  width: 100%;
  max-height: 540px;
  object-fit: contain;
  background: #111018;
}
.actual-hero {
  transform: none !important;
  filter: none !important;
  max-width: 360px !important;
  width: 72% !important;
  border: 1px solid #6642ea55;
  border-radius: 8px;
  overflow: hidden;
}
.actual-hero img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
}
.hero-placeholder {
  font-size: 22px;
  font-weight: 600;
  letter-spacing: 3px;
  color: #9d81e7;
}
.detail-price {
  font-size: 22px !important;
  color: #b59cff;
}
.detail select {
  background: #1b1428;
  color: #efe9f9;
  border: 1px solid #473458;
  padding: 12px;
  width: 100%;
  border-radius: 4px;
  margin: 12px 0;
}
.description,
.detail details p {
  white-space: pre-wrap;
}
.detail details {
  margin-top: 20px;
  font-size: 12px;
  line-height: 1.8;
}
.detail-thumbs {
  display: flex;
  gap: 8px;
  margin-top: 18px;
}
.detail-thumbs button {
  border: 1px solid #443158;
  background: none;
  padding: 0;
  width: 55px;
  height: 70px;
}
.detail-thumbs img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.product-info p {
  color: #b8a4df !important;
  font-size: 14px !important;
}
.detail .button {
  margin-top: 12px;
}
.actual-art {
  height: 410px;
}
.checkout-info p {
  font-size: 12px;
}
@media (max-width: 800px) {
  .actual-art {
    height: 300px;
  }
  .actual-hero {
    max-width: 300px !important;
  }
}
@media (max-width: 580px) {
  .actual-art {
    height: 420px;
  }
  .actual-detail img {
    max-height: 380px;
  }
  .actual-hero {
    max-width: 250px !important;
  }
}
@media (prefers-reduced-motion: reduce) {
  .actual-art img {
    transition: none;
  }
  .actual-art:hover img {
    transform: none;
  }
}

[hidden] {
  display: none !important;
}
.hero h1 {
  white-space: pre-line;
}
.hero .intro {
  white-space: pre-line;
}
