.page-products {
  --cloud-orange: #ff6b35;
  --cloud-yellow: #ffd166;
  --cloud-teal: #00c2a8;
  --cloud-light: #ffb088;
  --cloud-pale: #ffe08a;
  --cut: 14px;
  --clip-cut: polygon(0 0, calc(100% - 14px) 0, 100% 14px, 100% 100%, 0 100%);
  --date-cell: 62px;
  --card-dark-text: rgba(10, 26, 26, .72);
}

.page-products .breadcrumb {
  max-width: var(--container-w);
  margin-inline: auto;
  padding: 1rem 1.25rem 0;
}

/* ===== 筛选排序栏 ===== */
.page-products__filter {
  position: relative;
  overflow: hidden;
  padding: 1.4rem 0 1rem;
  background: var(--bg-deep-blue);
}

.page-products__filter-bg {
  position: absolute;
  inset: auto 0 0 0;
  width: 100%;
  height: 80px;
  object-fit: cover;
  opacity: .5;
  z-index: 0;
  pointer-events: none;
}

.page-products__filter .container {
  position: relative;
  z-index: 1;
}

.page-products .page-title {
  font-family: var(--font-head);
  font-size: clamp(1.5rem, 4.5vw, 2.4rem);
  line-height: 1.18;
  margin: 0 0 .8rem;
  color: var(--text-main);
  text-transform: uppercase;
  letter-spacing: .02em;
}

.page-products .page-title-sub {
  display: block;
  font-family: var(--font-mono);
  font-size: .72em;
  font-weight: 400;
  color: var(--accent);
  margin-top: .35rem;
  letter-spacing: .08em;
}

.filter-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 2rem;
  padding: 1rem 1.25rem;
  margin-top: 1rem;
  background: rgba(10, 26, 26, .74);
  border-left: 4px solid var(--accent);
  clip-path: var(--clip-cut);
}

.filter-summary {
  display: flex;
  align-items: center;
  gap: .75rem;
  font-size: .9rem;
  color: var(--text-main);
}

.filter-label {
  color: var(--text-sub);
  font-size: .78rem;
}

.filter-value {
  font-weight: 700;
  color: var(--card-yellow);
}

.filter-count {
  font-size: 1.1rem;
  color: var(--accent);
  background: rgba(57, 255, 20, .1);
  padding: .2rem .5rem;
}

.filter-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .75rem 1.25rem;
}

.sort-label {
  color: var(--text-sub);
  font-size: .78rem;
}

.sort-links {
  display: inline-flex;
  flex-wrap: wrap;
  gap: .4rem;
}

.sort-link {
  color: var(--text-sub);
  text-decoration: none;
  font-size: .85rem;
  padding: .3rem .7rem;
  background: rgba(255, 255, 255, .06);
  border-radius: 2px;
  transition: background .2s;
}

.sort-link--active {
  background: var(--card-orange);
  color: #1a0a00;
  font-weight: 700;
}

.export-link {
  color: var(--accent);
  text-decoration: none;
  font-size: .8rem;
  border: 1px dashed var(--accent);
  padding: .35rem .7rem;
  white-space: nowrap;
}

.filter-subline {
  color: var(--text-sub);
  font-size: .78rem;
  margin: .85rem 0 0;
  letter-spacing: .04em;
}

/* ===== 联赛分区标签云 ===== */
.page-products__cloud {
  position: relative;
  overflow: hidden;
  padding: 2.5rem 0 3rem;
  background: var(--bg-deep-green);
}

.page-products__cloud-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 300px;
  object-fit: cover;
  opacity: .35;
  z-index: 0;
  pointer-events: none;
}

.page-products__cloud .container {
  position: relative;
  z-index: 1;
}

.page-products .section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: .5rem 1rem;
  margin-bottom: 1.25rem;
}

.page-products .section-head h2 {
  font-family: var(--font-head);
  font-size: 1.4rem;
  color: var(--text-main);
  margin: 0;
  padding-left: .45rem;
  border-left: 6px solid var(--accent);
}

.page-products .section-meta {
  color: var(--text-sub);
  font-size: .76rem;
  letter-spacing: .05em;
}

.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: .6rem 1rem;
  padding: 2rem 1rem;
  background: rgba(10, 26, 26, .6);
  clip-path: var(--clip-cut);
}

.tag-cloud-item {
  display: inline-flex;
  align-items: baseline;
  gap: .4rem;
  padding: .4rem .9rem;
  color: #0d1f1f;
  text-decoration: none;
  font-family: var(--font-head);
  border-radius: 2px;
  transform: skewX(-4deg);
  box-shadow: 0 2px 0 rgba(0, 0, 0, .25);
  transition: transform .2s ease;
}

.tag-cloud-item:hover,
.tag-cloud-item:focus-visible {
  transform: skewX(-4deg) translateY(-3px);
}

.tag-cloud-item--xl {
  font-size: 2rem;
  background: var(--cloud-orange);
  padding: .5rem 1.2rem;
}

.tag-cloud-item--lg {
  font-size: 1.55rem;
  background: var(--cloud-yellow);
}

.tag-cloud-item--md {
  font-size: 1.2rem;
  background: var(--cloud-teal);
}

.tag-cloud-item--sm {
  font-size: 1rem;
  background: var(--cloud-light);
}

.tag-cloud-item--xs {
  font-size: .85rem;
  background: var(--cloud-pale);
}

.cloud-count {
  font-family: var(--font-mono);
  font-size: .72em;
  opacity: .8;
}

/* ===== 日期索引条 ===== */
.page-products__dates {
  position: relative;
  overflow: hidden;
  padding: 2.5rem 0 3rem;
  background: var(--bg-deep-blue);
}

.page-products__dates-bg {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 120px;
  object-fit: cover;
  opacity: .25;
  z-index: 0;
  pointer-events: none;
}

.page-products__dates .container {
  position: relative;
  z-index: 1;
}

.date-strip {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 1rem .5rem;
  scroll-snap-type: x proximity;
  scrollbar-width: thin;
  scrollbar-color: var(--accent) rgba(255, 255, 255, .1);
}

.date-cell {
  flex: 0 0 var(--date-cell);
  min-height: 78px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: .5rem .25rem;
  background: rgba(255, 255, 255, .05);
  border: 2px solid transparent;
  border-radius: 3px;
  color: var(--text-main);
  text-decoration: none;
  scroll-snap-align: start;
  position: relative;
  transition: background .2s;
}

.date-cell:hover {
  background: rgba(255, 255, 255, .14);
}

.date-cell--today {
  border-color: var(--accent);
  background: rgba(57, 255, 20, .1);
}

.date-label {
  position: absolute;
  top: 2px;
  right: 3px;
  font-size: .62rem;
  font-weight: 700;
  color: var(--accent);
  font-family: var(--font-mono);
}

.date-num {
  font-size: .88rem;
  color: var(--card-yellow);
}

.date-count {
  font-size: .76rem;
  color: var(--text-sub);
}

.date-cell--today .date-num {
  color: var(--accent);
  font-weight: 700;
}

.date-cell--today .date-count {
  color: var(--text-main);
}

/* ===== 回放批次列表 ===== */
.page-products__batches {
  padding: 2.5rem 0 3rem;
  background: var(--bg-deep-green);
}

.batch-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

.batch-aside-img {
  width: 100%;
  height: auto;
  object-fit: cover;
  border-radius: 4px;
  display: block;
}

.aside-block {
  margin-top: 1rem;
  padding: 1rem 1.25rem;
  background: var(--bg-deep-blue);
  clip-path: var(--clip-cut);
}

.aside-title {
  font-family: var(--font-head);
  font-size: 1rem;
  color: var(--card-teal);
  margin: 0 0 .75rem;
}

.aside-links {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: .45rem;
}

.aside-links a {
  color: var(--text-main);
  text-decoration: none;
  font-size: .9rem;
  display: flex;
  align-items: center;
  gap: .5rem;
}

.aside-links a::before {
  content: '//';
  color: var(--accent);
  font-family: var(--font-mono);
}

.batch-list {
  position: relative;
  border-left: 2px solid rgba(57, 255, 20, .45);
  padding-left: 1.4rem;
  display: grid;
  gap: 1rem;
  align-content: start;
}

.batch-item {
  background: rgba(255, 255, 255, .045);
  position: relative;
  border-radius: 0 4px 4px 0;
}

.batch-item::before {
  content: '';
  position: absolute;
  left: -1.55rem;
  top: 1.15rem;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px rgba(57, 255, 20, .2);
}

.batch-item summary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .6rem 1.2rem;
  padding: .9rem 1rem .9rem 1.25rem;
  cursor: pointer;
  list-style: none;
  font-size: .9rem;
}

.batch-item summary::-webkit-details-marker {
  display: none;
}

.batch-item summary::after {
  content: '＋';
  margin-left: auto;
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--accent);
}

.batch-item[open] summary::after {
  content: '－';
}

.batch-code {
  font-size: 1rem;
  color: var(--card-yellow);
  font-weight: 700;
}

.batch-meta {
  color: var(--text-sub);
  font-size: .82rem;
}

.batch-zones {
  color: var(--card-teal);
  font-size: .74rem;
  letter-spacing: .04em;
}

.batch-entries {
  display: grid;
  gap: .35rem;
  padding: 0 1rem 1rem 1.25rem;
}

.batch-entry {
  display: flex;
  align-items: center;
  gap: .6rem;
  padding: .4rem .6rem;
  background: rgba(10, 26, 26, .4);
  color: var(--text-main);
  text-decoration: none;
  font-size: .85rem;
  transition: background .2s;
}

.batch-entry:hover {
  background: rgba(57, 255, 20, .1);
}

.batch-entry-name {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.batch-entry-qua {
  font-size: .75rem;
  color: var(--accent);
}

/* ===== 全部回放卡片墙 ===== */
.page-products__cards {
  position: relative;
  overflow: hidden;
  padding: 2.5rem 0 3rem;
  background: var(--bg-deep-blue);
}

.page-products__cards-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 200px;
  object-fit: cover;
  opacity: .3;
  z-index: 0;
  pointer-events: none;
}

.page-products__cards .container {
  position: relative;
  z-index: 1;
}

.replay-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

.replay-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: .6rem;
  padding: 1rem;
  background: var(--card-orange);
  color: #1a0a00;
  border-radius: 3px;
  clip-path: var(--clip-cut);
  min-height: 190px;
  box-shadow: 0 4px 0 rgba(0, 0, 0, .25);
}

.replay-card--teal {
  background: var(--card-teal);
  color: #00221d;
}

.replay-card--yellow {
  background: var(--card-yellow);
  color: #1a1500;
}

.replay-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .5rem;
}

.replay-card-title {
  font-family: var(--font-head);
  font-size: 1.02rem;
  line-height: 1.35;
  margin: .3rem 0;
  flex: 1;
}

.replay-card-meta {
  display: grid;
  gap: .2rem;
  font-size: .74rem;
  color: rgba(0, 0, 0, .65);
}

.replay-card--teal .replay-card-meta {
  color: rgba(0, 34, 29, .72);
}

.replay-card--yellow .replay-card-meta {
  color: rgba(26, 21, 0, .7);
}

.meta-id,
.meta-time {
  font-size: .74rem;
}

.replay-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .5rem;
  margin-top: auto;
}

.quality {
  font-size: .72rem;
  font-weight: 700;
  padding: .2rem .5rem;
  border-radius: 2px;
  background: var(--replay-green);
  color: #00220d;
}

.quality--original {
  background: #ffe680;
  color: #1a1500;
}

.quality--super {
  background: var(--card-orange);
  color: #1a0a00;
}

.quality--hd {
  background: #243b3b;
  color: var(--text-main);
}

.duration {
  font-size: .74rem;
}

/* ===== 徽标与标签 ===== */
.page-products .badge {
  font-size: .68rem;
  font-weight: 700;
  padding: .2rem .5rem;
  border-radius: 2px;
  letter-spacing: .05em;
}

.page-products .badge--new {
  background: var(--card-yellow);
  color: #1a1500;
}

.page-products .badge--hd {
  background: var(--card-teal);
  color: #00221d;
}

.page-products .badge--exclusive {
  background: var(--card-orange);
  color: #1a0a00;
}

.page-products .badge--replay {
  background: var(--replay-green);
  color: #00220d;
}

.page-products .badge--done {
  background: #4a5568;
  color: #e2e8f0;
}

.page-products .tag {
  font-size: .68rem;
  font-weight: 700;
  padding: .2rem .5rem;
  border-radius: 2px;
  letter-spacing: .04em;
  white-space: nowrap;
}

/* ===== 卡片墙底部 ===== */
.cards-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, .1);
}

.cards-footer-note {
  margin-left: auto;
  color: var(--text-sub);
  font-size: .74rem;
  letter-spacing: .05em;
}

/* ===== 响应式 ===== */
@media (min-width: 540px) {
  .replay-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .date-cell {
    min-height: 84px;
  }
}

@media (min-width: 768px) {
  .page-products__filter {
    padding: 2rem 0 1.5rem;
  }

  .filter-toolbar {
    padding: 1.25rem 1.5rem;
  }

  .tag-cloud {
    padding: 2.5rem 1.5rem;
  }

  .batch-layout {
    grid-template-columns: 300px 1fr;
    align-items: start;
  }

  .batch-aside-img {
    max-height: 300px;
  }
}

@media (min-width: 960px) {
  .replay-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .page-products .section-head h2 {
    font-size: 1.65rem;
  }
}

@media (min-width: 1200px) {
  .replay-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}
