/**
 * Swiper 12.1.4
 * Most modern mobile touch slider and framework with hardware accelerated transitions
 * https://swiperjs.com
 *
 * Copyright 2014-2026 Vladimir Kharlampidi
 *
 * Released under the MIT License
 *
 * Released on: April 29, 2026
 */

:root {
  --swiper-theme-color: #007aff;
  /*
  --swiper-preloader-color: var(--swiper-theme-color);
  --swiper-wrapper-transition-timing-function: initial;
  */
}
:host {
  position: relative;
  display: block;
  margin-left: auto;
  margin-right: auto;
  z-index: 1;
}
.swiper {
  margin-left: auto;
  margin-right: auto;
  position: relative;
  overflow: hidden;
  list-style: none;
  padding: 0;
  /* Fix of Webkit flickering */
  z-index: 1;
  display: block;
}
.swiper-vertical > .swiper-wrapper {
  flex-direction: column;
}
.swiper-wrapper {
  position: relative;
  width: 100%;
  height: 100%;
  z-index: 1;
  display: flex;
  transition-property: transform;
  transition-timing-function: var(--swiper-wrapper-transition-timing-function, initial);
  box-sizing: content-box;
}
.swiper-android .swiper-slide,
.swiper-ios .swiper-slide,
.swiper-wrapper {
  transform: translate3d(0px, 0, 0);
}
.swiper-horizontal {
  touch-action: pan-y;
}
.swiper-vertical {
  touch-action: pan-x;
}
.swiper-slide {
  flex-shrink: 0;
  width: 100%;
  height: 100%;
  position: relative;
  transition-property: transform;
  display: block;
}
.swiper-slide-invisible-blank {
  visibility: hidden;
}
/* Auto Height */
.swiper-autoheight,
.swiper-autoheight .swiper-slide {
  height: auto;
}
.swiper-autoheight .swiper-wrapper {
  align-items: flex-start;
  transition-property: transform, height;
}
.swiper-backface-hidden .swiper-slide {
  transform: translateZ(0);
  backface-visibility: hidden;
}
/* 3D Effects */
.swiper-3d.swiper-css-mode .swiper-wrapper {
  perspective: 1200px;
}
.swiper-3d .swiper-wrapper {
  transform-style: preserve-3d;
}
.swiper-3d {
  perspective: 1200px;
  .swiper-slide,
  .swiper-cube-shadow {
    transform-style: preserve-3d;
  }
}

/* CSS Mode */
.swiper-css-mode {
  > .swiper-wrapper {
    overflow: auto;
    scrollbar-width: none; /* For Firefox */
    -ms-overflow-style: none; /* For Internet Explorer and Edge */
    &::-webkit-scrollbar {
      display: none;
    }
  }
  > .swiper-wrapper > .swiper-slide {
    scroll-snap-align: start start;
  }
  &.swiper-horizontal {
    > .swiper-wrapper {
      scroll-snap-type: x mandatory;
    }
    > .swiper-wrapper > .swiper-slide:first-child {
      margin-inline-start: var(--swiper-slides-offset-before);
      scroll-margin-inline-start: var(--swiper-slides-offset-before);
    }
    > .swiper-wrapper > .swiper-slide:last-child {
      margin-inline-end: var(--swiper-slides-offset-after);
    }
  }
  &.swiper-vertical {
    > .swiper-wrapper {
      scroll-snap-type: y mandatory;
    }
    > .swiper-wrapper > .swiper-slide:first-child {
      margin-block-start: var(--swiper-slides-offset-before);
      scroll-margin-block-start: var(--swiper-slides-offset-before);
    }
    > .swiper-wrapper > .swiper-slide:last-child {
      margin-block-end: var(--swiper-slides-offset-after);
    }
  }
  &.swiper-free-mode {
    > .swiper-wrapper {
      scroll-snap-type: none;
    }
    > .swiper-wrapper > .swiper-slide {
      scroll-snap-align: none;
    }
  }
  &.swiper-centered {
    > .swiper-wrapper::before {
      content: '';
      flex-shrink: 0;
      order: 9999;
    }
    > .swiper-wrapper > .swiper-slide {
      scroll-snap-align: center center;
      scroll-snap-stop: always;
    }
  }
  &.swiper-centered.swiper-horizontal {
    > .swiper-wrapper > .swiper-slide:first-child {
      margin-inline-start: var(--swiper-centered-offset-before);
    }
    > .swiper-wrapper::before {
      height: 100%;
      min-height: 1px;
      width: var(--swiper-centered-offset-after);
    }
  }
  &.swiper-centered.swiper-vertical {
    > .swiper-wrapper > .swiper-slide:first-child {
      margin-block-start: var(--swiper-centered-offset-before);
    }
    > .swiper-wrapper::before {
      width: 100%;
      min-width: 1px;
      height: var(--swiper-centered-offset-after);
    }
  }
}

/* Slide styles start */
/* 3D Shadows */
.swiper-3d {
  .swiper-slide-shadow,
  .swiper-slide-shadow-left,
  .swiper-slide-shadow-right,
  .swiper-slide-shadow-top,
  .swiper-slide-shadow-bottom,
  .swiper-slide-shadow,
  .swiper-slide-shadow-left,
  .swiper-slide-shadow-right,
  .swiper-slide-shadow-top,
  .swiper-slide-shadow-bottom {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 10;
  }
  .swiper-slide-shadow {
    background: rgba(0, 0, 0, 0.15);
  }
  .swiper-slide-shadow-left {
    background-image: linear-gradient(to left, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0));
  }
  .swiper-slide-shadow-right {
    background-image: linear-gradient(to right, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0));
  }
  .swiper-slide-shadow-top {
    background-image: linear-gradient(to top, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0));
  }
  .swiper-slide-shadow-bottom {
    background-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0));
  }
}
.swiper-lazy-preloader {
  width: 42px;
  height: 42px;
  position: absolute;
  left: 50%;
  top: 50%;
  margin-left: -21px;
  margin-top: -21px;
  z-index: 10;
  transform-origin: 50%;
  box-sizing: border-box;
  border: 4px solid var(--swiper-preloader-color, var(--swiper-theme-color));
  border-radius: 50%;
  border-top-color: transparent;
}
.swiper:not(.swiper-watch-progress),
.swiper-watch-progress .swiper-slide-visible {
  .swiper-lazy-preloader {
    animation: swiper-preloader-spin 1s infinite linear;
  }
}
.swiper-lazy-preloader-white {
  --swiper-preloader-color: #fff;
}
.swiper-lazy-preloader-black {
  --swiper-preloader-color: #000;
}
@keyframes swiper-preloader-spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}
/* Slide styles end */

/* Product details — aligned with Vue views/productDetails */

.product-details-page {
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: clamp(12px, 2vw, 24px) clamp(10px, 2vw, 16px) clamp(32px, 4vw, 48px);
  box-sizing: border-box;
}

.product-details-breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: clamp(14px, 2vw, 20px);
  font-size: 13px;
  color: #888;
}

.product-details-breadcrumb a {
  color: var(--color-vue-teal, #2a8f82);
  text-decoration: none;
}

.product-details-breadcrumb a:hover {
  text-decoration: underline;
}

.product-details-breadcrumb__sep {
  color: #ccc;
}

.product-details-main {
  display: grid;
  grid-template-columns: minmax(0, 420px) minmax(0, 1fr);
  gap: clamp(20px, 3vw, 40px);
  align-items: start;
}

.product-details-gallery__main {
  position: relative;
  width: 100%;
  aspect-ratio: 210 / 297;
  border: 1px solid #e5ebe9;
  border-radius: 8px;
  overflow: hidden;
  background: #fafcfb;
}

.product-details-gallery__thumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}

.product-details-gallery__thumb {
  position: relative;
  width: 64px;
  aspect-ratio: 210 / 297;
  border: 2px solid transparent;
  border-radius: 4px;
  overflow: hidden;
  padding: 0;
  cursor: pointer;
  background: #fff;
}

.product-details-gallery__thumb.is-active {
  border-color: var(--color-vue-teal, #2a8f82);
}

.product-details-info {
  min-width: 0;
}

.product-details-info__title {
  margin: 0 0 10px;
  font-size: clamp(20px, 2.2vw, 26px);
  font-weight: 700;
  color: #222;
  line-height: 1.35;
}

.product-details-info__code {
  margin: 0 0 16px;
  font-size: 14px;
  color: #666;
}

.product-details-info__price-row {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 10px 14px;
  margin-bottom: 18px;
}

.product-details-info__price {
  font-size: clamp(24px, 2.5vw, 32px);
  font-weight: 700;
  color: var(--color-vue-teal, #2a8f82);
}

.product-details-info__price-old {
  font-size: 16px;
  color: #999;
  text-decoration: line-through;
}

.product-details-info__off {
  font-size: 13px;
  font-weight: 600;
  color: #b91c1c;
  background: #fef2f2;
  padding: 2px 8px;
  border-radius: 4px;
}

.product-details-info__specs {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 18px;
  padding: 14px 16px;
  border: 1px solid #e5ebe9;
  border-radius: 8px;
  background: #fafcfb;
}

.product-details-info__spec-row {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: #555;
}

.product-details-info__spec-label {
  flex-shrink: 0;
  font-size: 14px;
  font-weight: 600;
  color: #444;
}

.product-details-info__spec-value {
  font-size: 14px;
  color: #333;
}

.product-details-info__qty {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.product-details-info__qty label {
  font-size: 14px;
  font-weight: 600;
  color: #444;
}

.product-details-info__qty-stepper {
  display: inline-flex;
  align-items: stretch;
  border: 1px solid #ddd;
  border-radius: 6px;
  overflow: hidden;
  background: #fff;
}

.product-details-info__qty-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  min-height: 36px;
  padding: 0;
  border: none;
  background: #f5f5f5;
  color: #444;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  font-family: inherit;
}

.product-details-info__qty-btn:hover:not(:disabled) {
  background: #e8eeec;
  color: var(--color-vue-teal, #2a8f82);
}

.product-details-info__qty-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.product-details-info__qty-input {
  width: 48px;
  height: 36px;
  margin: 0;
  padding: 0;
  text-align: center;
  border: none;
  border-left: 1px solid #ddd;
  border-right: 1px solid #ddd;
  border-radius: 0;
  background: #fff;
  color: #333;
  font-size: 14px;
  font-weight: 600;
  -moz-appearance: textfield;
  appearance: textfield;
}

.product-details-info__qty-input::-webkit-outer-spin-button,
.product-details-info__qty-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.product-details-info__policy {
  margin: 0 0 12px;
  font-size: 12px;
  line-height: 1.6;
  color: #888;
  white-space: pre-wrap;
}

.product-details-info__actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 12px;
  margin-bottom: 16px;
}

.product-details-info__actions-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.product-details-info__actions-row--secondary {
  margin-top: 10px;
  align-items: flex-start;
}

.product-details-info__trial-block {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
}

.product-details-info__trial-hint {
  margin: 0;
  padding-left: 2px;
  font-size: 12px;
  line-height: 1.4;
  color: #888;
}

.product-details-info__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 18px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, opacity 0.2s;
  border: 1px solid transparent;
  font-family: inherit;
}

.product-details-info__btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.product-details-info__btn--primary {
  background: var(--color-vue-teal, #2a8f82);
  color: #fff;
  border-color: var(--color-vue-teal, #2a8f82);
}

.product-details-info__btn--primary:hover:not(:disabled) {
  background: #237a6f;
}

.product-details-info__btn--secondary {
  background: #fff;
  color: #333;
  border-color: #ddd;
}

.product-details-info__btn--secondary:hover:not(:disabled) {
  border-color: var(--color-vue-teal, #2a8f82);
  color: var(--color-vue-teal, #2a8f82);
}

.product-details-info__btn--ghost {
  background: transparent;
  color: #555;
  border-color: #e5ebe9;
}

.product-details-info__trial-player {
  margin-top: 18px;
  width: 100%;
  padding: 14px 16px;
  border: 1px solid #e5ebe9;
  border-radius: 8px;
  background: #fafcfb;
  box-sizing: border-box;
}

.product-details-info__trial-player-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.product-details-info__trial-player-title {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  color: #333;
  line-height: 1.35;
  min-width: 0;
}

.product-details-info__trial-player-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 1px solid #e5ebe9;
  border-radius: 6px;
  background: #fff;
  color: #666;
  cursor: pointer;
  font-family: inherit;
}

.product-details-info__trial-player-close:hover {
  border-color: var(--color-vue-teal, #2a8f82);
  color: var(--color-vue-teal, #2a8f82);
}

.product-details-info__btn.is-active {
  border-color: var(--color-vue-teal, #2a8f82);
  color: var(--color-vue-teal, #2a8f82);
  background: #eef7f5;
}

.product-preview-video-panel__frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #0f0f0f;
  border-radius: 8px;
  overflow: hidden;
}

.product-preview-video-panel__tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
}

.product-preview-video-panel__tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  padding: 6px;
  border: 1px solid #e5ebe9;
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
  font-family: inherit;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
}

.product-preview-video-panel__tab.is-empty {
  opacity: 0.55;
}

.product-preview-video-panel__tab.is-empty.is-active {
  opacity: 1;
}

.product-preview-video-panel__tab.is-active {
  border-color: var(--color-vue-teal, #2a8f82);
  box-shadow: 0 0 0 1px var(--color-vue-teal, #2a8f82);
  background: #eef7f5;
}

.product-preview-video-panel__tab-icon {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.product-preview-video-panel__empty {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 16px;
  color: #888;
}

.product-preview-video-panel__play-trigger {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  border: 0;
  background: rgba(15, 15, 15, 0.72);
  color: #fff;
  cursor: pointer;
  font-family: inherit;
}

.product-preview-video-panel__play-trigger:hover:not(:disabled) {
  background: rgba(15, 15, 15, 0.85);
}

.product-preview-video-panel__play-trigger:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.product-preview-video-panel__iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.product-preview-video-panel__fallback {
  margin: 10px 0 0;
  font-size: 13px;
  text-align: right;
}

.product-preview-video-panel__fallback a {
  color: var(--color-vue-teal, #2a8f82);
  text-decoration: underline;
}

.product-details-tabs {
  margin-top: clamp(28px, 4vw, 40px);
  border: 1px solid #e5ebe9;
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
}

.product-details-tabs__nav {
  display: flex;
  border-bottom: 1px solid #e5ebe9;
  background: #fafcfb;
}

.product-details-tabs__tab {
  flex: 1;
  min-height: 42px;
  padding: 0 14px;
  border: none;
  border-bottom: 3px solid transparent;
  background: transparent;
  font-size: 15px;
  font-weight: 600;
  color: #666;
  cursor: pointer;
  font-family: inherit;
  transition: color 0.2s, border-color 0.2s;
}

.product-details-tabs__tab.is-active {
  color: var(--color-vue-teal, #2a8f82);
  border-bottom-color: var(--color-vue-teal, #2a8f82);
  background: #fff;
}

.product-details-tabs__panel {
  padding: clamp(12px, 2vw, 16px);
}

/* 乐谱详情 / 乐谱介绍：内容区略收窄，表格更紧凑 */
.product-details-tabs__content {
  width: 100%;
  max-width: min(100%, 520px);
}

.product-details-meta-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.product-details-meta-table th,
.product-details-meta-table td {
  padding: 7px 10px;
  border-bottom: 1px solid #eef2f1;
  text-align: left;
  font-size: 13px;
  line-height: 1.45;
  vertical-align: middle;
}

.product-details-meta-table th {
  width: 32%;
  color: #666;
  font-weight: 600;
  background: #fafcfb;
}

.product-details-meta-table td {
  color: #333;
  word-break: break-word;
}

.product-details-meta-table tr:last-child th,
.product-details-meta-table tr:last-child td {
  border-bottom: none;
}

.product-details-intro {
  font-size: 13px;
  line-height: 1.65;
  color: #444;
  white-space: pre-wrap;
}

.product-details-intro--empty {
  color: #999;
}

/* 收藏 / 加购未登录提示 — 对齐登录页忘记密码弹窗磨玻璃遮罩 + 白卡片 */
.product-details-auth-overlay[data-slot='dialog-overlay'] {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(15, 23, 42, 0.58);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.product-details-auth-modal[data-slot='dialog-content'] {
  position: fixed;
  top: 50%;
  left: 50%;
  z-index: 101;
  display: grid;
  width: calc(100% - 32px);
  max-width: 400px;
  margin: 0;
  padding: 28px 32px 24px;
  transform: translate(-50%, -50%);
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 20px;
  background: #fff;
  box-shadow:
    0 24px 48px rgba(15, 23, 42, 0.2),
    0 8px 20px rgba(15, 23, 42, 0.12);
  color: #222;
  gap: 16px;
  isolation: isolate;
}

.product-details-auth-modal [data-slot='dialog-title'] {
  font-size: 18px;
  font-weight: 700;
  color: #222;
}

.product-details-auth-modal__message {
  margin: 0;
  font-size: 14px;
  line-height: 1.6;
  color: #666;
}

.product-details-auth-modal__footer {
  margin: 0;
  padding: 0;
  border: none;
  background: transparent;
  flex-direction: row;
  justify-content: flex-end;
  gap: 12px;
}

@media (max-width: 900px) {
  .product-details-main {
    grid-template-columns: minmax(0, 1fr);
  }

  .product-details-gallery__main {
    max-width: 420px;
    margin: 0 auto;
  }
}

@media (max-width: 560px) {
  .product-details-info__actions-row {
    flex-direction: column;
  }

  .product-details-info__actions-row .product-details-info__btn {
    width: 100%;
  }
}


/* Category page — aligned with Vue categoryPageView.vue */

.category-page__heading {
  margin: 0 0 1rem;
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1.3;
}

.category-page {
  width: 100%;
  max-width: 1240px;
  padding: clamp(16px, 2.5vw, 30px) clamp(8px, 2vw, 16px) 16px;
  margin: 0 auto;
  box-sizing: border-box;
}

.category-data {
  width: 100%;
  margin-top: clamp(10px, 1.5vw, 16px);
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  justify-content: center;
  gap: clamp(12px, 2vw, 30px);
}

/* 器乐谱：与钢琴页一致的 2×2 网格（左：乐器树 + 筛选，右：轮播 + 商品） */
.category-data--sidebar {
  display: grid;
  grid-template-columns: minmax(0, 220px) minmax(0, 1fr);
  grid-template-rows: auto auto;
  column-gap: clamp(12px, 2vw, 30px);
  row-gap: clamp(10px, 1.5vw, 16px);
  align-items: start;
}

.category-data--sidebar .category-left--top {
  grid-column: 1;
  grid-row: 1;
  min-width: 0;
  width: 100%;
}

.category-data--sidebar .category-left--bottom {
  grid-column: 1;
  grid-row: 2;
  min-width: 0;
  width: 100%;
}

.category-data--sidebar .category-main--carousel {
  grid-column: 2;
  grid-row: 1;
  min-width: 0;
  width: 100%;
}

.category-data--sidebar .category-main--products {
  grid-column: 2;
  grid-row: 2;
  min-width: 0;
  width: 100%;
}

.category-data--sidebar .category-main--products .category-cards__items {
  padding-top: 0;
}

/* 旗舰店乐谱：左栏独立 flex 列，右栏轮播+商品固定间距，左侧 leaf 展开不拉高右侧行轨 */
.category-data--flagship-sheet-music.category-data--sidebar {
  grid-template-columns: minmax(0, 220px) minmax(0, 1fr);
  grid-template-rows: auto;
  column-gap: clamp(12px, 2vw, 30px);
  row-gap: 0;
  align-items: start;
}

.category-data--flagship-sheet-music .category-flagship-sidebar-column {
  grid-column: 1;
  grid-row: 1;
  display: flex;
  flex-direction: column;
  gap: clamp(10px, 1.5vw, 16px);
  min-width: 0;
  width: 100%;
}

.category-data--flagship-sheet-music .category-flagship-sidebar-column .category-left--top,
.category-data--flagship-sheet-music .category-flagship-sidebar-column .category-left--bottom {
  grid-column: unset;
  grid-row: unset;
}

.category-data--flagship-sheet-music .category-flagship-main-column {
  grid-column: 2;
  grid-row: 1;
  display: flex;
  flex-direction: column;
  gap: clamp(10px, 1.5vw, 16px);
  min-width: 0;
  width: 100%;
  align-self: start;
}

.category-data--flagship-sheet-music .category-flagship-main-column .category-main--carousel,
.category-data--flagship-sheet-music .category-flagship-main-column .category-main--products {
  grid-column: unset;
  grid-row: unset;
}

.category-data--flagship-sheet-music.category-data--sidebar .category-main--products .category-cards__items {
  padding-top: 0;
  padding-bottom: 32px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(10px, 1.8vw, 16px);
}

.category-data--sidebar .category-left--bottom .category-card {
  margin-bottom: 0;
}

.category-left {
  width: 220px;
  max-width: 100%;
  flex: 0 0 auto;
  min-width: 0;
}

.category-card {
  width: 100%;
  border: 1px solid #e5ebe9;
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  margin-bottom: clamp(10px, 1.5vw, 16px);
}

.category-card--format {
  margin-bottom: clamp(10px, 1.5vw, 12px);
}

.category-format-bar {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: clamp(10px, 1.5vw, 12px);
}

.category-format-bar__btn {
  width: 100%;
  border: 1px solid #e5ebe9;
  border-radius: 8px;
  background: #fff;
  color: #555;
  font-size: clamp(13px, 1.05vw, 15px);
  font-weight: 500;
  padding: 10px 12px;
  text-align: left;
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.category-format-bar__btn:hover {
  border-color: var(--color-vue-teal);
  color: var(--color-vue-teal);
}

.category-format-bar__btn--active {
  border-color: var(--color-vue-teal);
  background: rgba(0, 168, 150, 0.08);
  color: var(--color-vue-teal);
  font-weight: 600;
}


.category-card__head {
  font-size: clamp(14px, 1.2vw, 16px);
  font-weight: 600;
  color: #333;
  padding: clamp(8px, 1.2vw, 14px) clamp(12px, 1.5vw, 16px);
  border-bottom: 1px solid #e5ebe9;
  background: #fff;
}

.category-card__body {
  padding: clamp(10px, 1.5vw, 14px);
}

.category-loading-hint {
  color: #888;
  font-size: 13px;
  margin: 0;
}

.category-filters .category-filter-group__title {
  color: #666;
  font-size: clamp(12px, 1.05vw, 14px);
  font-weight: 600;
  padding-bottom: 8px;
}

.category-filter-divider {
  border: none;
  border-top: 1px solid #e5ebe9;
  margin: clamp(10px, 1.5vw, 14px) 0;
}

.category-filter-list .category-tree-row {
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 4px;
}

.category-tree-row__text {
  flex: 1;
  min-width: 0;
  text-align: left;
}

.category-filter-row__num {
  color: #888;
  font-size: clamp(11px, 0.95vw, 13px);
  font-variant-numeric: tabular-nums;
  font-weight: 400;
}

.category-tree-row.is-selected .category-filter-row__num {
  color: var(--color-vue-teal);
}

.category-filter-row.is-disabled {
  opacity: 0.45;
  cursor: not-allowed;
  color: #666;
  font-weight: 400;
}

.category-filter-row.is-disabled:hover {
  color: #666;
  background: transparent;
}

.category-filter-row:not(.is-disabled) {
  color: #333;
  font-weight: 400;
}

.category-tree {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.category-tree-row {
  display: flex;
  align-items: center;
  gap: 4px;
  width: 100%;
  border: none;
  background: none;
  text-align: left;
  font-size: clamp(12px, 1.05vw, 14px);
  color: #333;
  border-radius: 6px;
  padding: 4px 6px;
  cursor: pointer;
  transition: color 0.15s, background 0.15s;
}

.category-tree-row:hover:not(.is-disabled),
.category-tree-row.is-selected {
  color: var(--color-vue-teal);
  background: rgba(50, 158, 140, 0.1);
}

.category-tree-row.is-selected {
  font-weight: 600;
}

.category-tree-row:focus-visible:not(.is-disabled) {
  outline: 2px solid rgba(50, 158, 140, 0.35);
  outline-offset: 1px;
}

.category-tree-chevron {
  flex-shrink: 0;
  color: #666;
}

.category-tree-chevron--empty {
  width: 14px;
}

.category-tree-item {
  font-size: clamp(12px, 1.05vw, 14px);
  color: #333;
  border-radius: 6px;
  padding: 4px 6px;
  cursor: pointer;
  transition: color 0.15s, background 0.15s;
}

.category-tree-item:hover,
.category-tree-item.is-selected {
  color: var(--color-vue-teal);
  background: rgba(50, 158, 140, 0.1);
}

.category-tree-item.is-selected {
  font-weight: 600;
}

.category-tree-children {
  padding-left: 16px;
}

.category-main {
  flex: 1;
  min-width: 0;
  width: auto;
}

.category-main--full {
  width: 100%;
}

.category-carousel {
  position: relative;
  width: 100%;
  aspect-ratio: 870 / 288;
  min-height: clamp(120px, 22vw, 288px);
  overflow: hidden;
  border-radius: 4px;
}

/* Nest 首页轮播内嵌到分类/搜索页 */
.category-carousel.carousel-page--embedded .carousel-box {
  margin-top: 0;
  padding: 0;
  height: 100%;
}

.category-carousel.carousel-page--embedded .carousel-surface {
  max-width: none;
  width: 100%;
  height: 100%;
  max-height: none;
  aspect-ratio: auto;
  border-radius: 4px;
  box-shadow: none;
}

.category-carousel.carousel-page--embedded .carousel-skeleton,
.category-carousel.carousel-page--embedded .carousel-surface--skeleton {
  height: 100%;
  min-height: clamp(120px, 22vw, 288px);
}

.category-carousel__track {
  position: relative;
  width: 100%;
  height: 100%;
}

.category-carousel__slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.5s;
  pointer-events: none;
}

.category-carousel__slide.is-active {
  opacity: 1;
  pointer-events: auto;
}

.category-carousel__arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: none;
  background: #aaa;
  color: #fff;
  cursor: pointer;
  transition: background 0.3s, left 0.3s, right 0.3s;
}

.category-carousel__arrow:hover {
  background: var(--color-vue-teal);
}

.category-carousel__arrow--left {
  left: clamp(8px, 4vw, 50px);
}

.category-carousel__arrow--right {
  right: clamp(8px, 4vw, 50px);
}

.category-carousel:hover .category-carousel__arrow--left {
  left: 0;
}

.category-carousel:hover .category-carousel__arrow--right {
  right: 0;
}

.category-cards {
  position: relative;
  width: 100%;
  min-height: min(400px, 60vh);
  box-sizing: border-box;
}

.category-cards__items {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(10px, 1.8vw, 16px);
  padding: clamp(16px, 3vw, 32px) 0;
}

.category-cards__items.is-loading {
  opacity: 0.55;
  pointer-events: none;
}

.category-box {
  position: relative;
  display: flex;
  flex-direction: column;
  border: 1px solid #eee;
  min-width: 0;
  height: 100%;
}

.category-box__img {
  position: relative;
  width: 100%;
  aspect-ratio: 210 / 297;
  padding: clamp(6px, 1vw, 10px);
  overflow: hidden;
  flex-shrink: 0;
}

.category-box:hover .category-box__img img {
  transform: scale(1.05);
}

.category-box__img img {
  transition: transform 0.3s;
}

.category-box__quick {
  position: absolute;
  right: -50px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 9;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: right 0.3s;
}

.category-box:hover .category-box__quick {
  right: 12px;
}

.category-box__quick-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  color: #fff;
  background: rgba(0, 0, 0, 0.4);
  cursor: pointer;
  transition: background 0.3s;
}

.category-box__quick-btn:hover {
  background: var(--color-vue-teal);
}

.category-box__cart {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: none;
  background: rgba(0, 0, 0, 0.4);
  color: #fff;
  cursor: pointer;
  transition: bottom 0.3s, background 0.3s;
  z-index: 9;
}

.category-box:hover .category-box__cart {
  bottom: 0;
}

.category-box__cart:hover {
  background: var(--color-vue-teal);
}

.category-box__info {
  padding: 8px 10px 12px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.category-box__name {
  display: block;
  width: 100%;
  text-align: left;
  border: none;
  background: none;
  padding: 0;
  font-size: 13px;
  color: #666;
  cursor: pointer;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.category-box__name--title {
  font-size: 16px;
  color: #333;
  font-weight: 500;
}

.category-box__name:hover {
  color: var(--color-vue-teal);
}

.category-box__price {
  margin-top: auto;
  padding-top: 6px;
  font-size: 15px;
  color: var(--color-vue-teal);
  font-weight: 600;
}

.category-box__price-old {
  margin-left: 8px;
  font-size: 12px;
  color: #999;
  text-decoration: line-through;
  font-weight: 400;
}

.category-box--member:hover .category-box__img img {
  transform: none;
}

.category-box__name--static {
  cursor: default;
}

.category-box__name--static:hover {
  color: inherit;
}

.category-box--member .category-box__name--title.category-box__name--static:hover {
  color: #333;
}

.category-box--member .category-box__info {
  flex-grow: 0;
}

/* 演奏媒介 / 编制各占一行；下载按钮占右侧空白（跨两行居中） */
.category-box__member-meta-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  column-gap: 8px;
  row-gap: 2px;
  align-items: center;
  min-width: 0;
}

.category-box__member-meta-grid .category-box__name {
  width: auto;
  max-width: 100%;
}

.category-box__member-meta-medium {
  grid-column: 1;
  grid-row: 1;
}

.category-box__member-meta-scoring {
  grid-column: 1;
  grid-row: 2;
}

.category-box__member-meta-scoring--first {
  grid-row: 1;
}

.category-box__member-meta-download {
  grid-column: 2;
  grid-row: 1 / -1;
  align-self: center;
  flex-shrink: 0;
}

.category-box__download-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border: 1px solid var(--color-vue-teal);
  border-radius: 4px;
  background: #fff;
  color: var(--color-vue-teal);
  font-size: 13px;
  font-weight: 500;
  line-height: 1;
  padding: 6px 10px;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.category-box__download-btn:hover:not(:disabled) {
  background: var(--color-vue-teal);
  color: #fff;
}

.category-box__download-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.category-box__download-btn--locked {
  border-color: #bbb;
  color: #888;
  background: #f5f5f5;
}

.category-box__download-btn--locked:hover:not(:disabled) {
  background: #f5f5f5;
  color: #888;
}

.category-empty {
  text-align: center;
  color: #888;
  padding: 48px 0;
}

.category-spin {
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.5);
  pointer-events: none;
}

.category-pagination {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding-bottom: 24px;
}

.category-pagination__info {
  margin: 0;
  font-size: 14px;
  color: #666;
}

.category-pagination__total {
  margin: 0;
  font-size: 14px;
  color: #666;
}

.category-pagination__total-count {
  color: var(--color-vue-teal);
  font-weight: 600;
}

.category-pagination__controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.category-pagination__nav,
.category-pagination__page,
.category-pagination__jump-go {
  min-width: 36px;
  height: 36px;
  padding: 0 10px;
  border: 1px solid #e5ebe9;
  background: #fff;
  border-radius: 4px;
  cursor: pointer;
  font-size: 15px;
  line-height: 1;
  color: #333;
}

.category-pagination__page {
  min-width: 36px;
  padding: 0;
}

.category-pagination__nav {
  width: 36px;
  padding: 0;
  font-size: 18px;
}

.category-pagination__nav:disabled,
.category-pagination__page:disabled,
.category-pagination__jump-go:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.category-pagination__nav:not(:disabled):hover,
.category-pagination__page:not(.is-active):hover,
.category-pagination__jump-go:hover {
  border-color: var(--color-vue-teal);
  color: var(--color-vue-teal);
}

.category-pagination__page.is-active {
  border-color: var(--color-vue-teal);
  background: var(--color-vue-teal);
  color: #fff;
}

.category-pagination__jump {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-left: 4px;
}

.category-pagination__jump-label,
.category-pagination__jump-unit {
  font-size: 14px;
  color: #666;
}

.category-pagination__jump-input {
  width: 56px;
  height: 36px;
  border: 1px solid #e5ebe9;
  border-radius: 4px;
  text-align: center;
  font-size: 14px;
  color: #333;
}

.category-pagination__jump-input:focus {
  outline: none;
  border-color: var(--color-vue-teal);
}

.category-pagination__jump-go {
  font-size: 14px;
}

@media (min-width: 1025px) {
  .category-data--sidebar {
    grid-template-columns: minmax(0, 300px) minmax(0, 1fr);
    gap: 30px;
  }

  .category-data--sidebar .category-left--top,
  .category-data--sidebar .category-left--bottom {
    width: 300px;
  }

  .category-data--sidebar .category-main--carousel .category-carousel {
    height: 288px;
    min-height: 288px;
    max-height: 288px;
    aspect-ratio: unset;
  }

  .category-data--sidebar .category-main--products .category-cards__items {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-gap: 16px;
    padding: 0 0 32px;
  }

  .category-data--flagship-sheet-music.category-data--sidebar {
    grid-template-columns: minmax(0, 300px) minmax(0, 1fr);
    column-gap: 30px;
  }

  .category-data--flagship-sheet-music .category-flagship-sidebar-column {
    width: 300px;
  }

  .category-data--flagship-sheet-music .category-flagship-main-column .category-main--carousel .category-carousel {
    height: 288px;
    min-height: 288px;
    max-height: 288px;
    aspect-ratio: unset;
  }

  .category-data--flagship-sheet-music.category-data--sidebar .category-main--products .category-cards__items {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-gap: 16px;
    padding: 0 0 32px;
  }
}

@media (max-width: 1024px) {
  .category-data--sidebar {
    grid-template-columns: minmax(0, 200px) minmax(0, 1fr);
  }
}

@media (max-width: 900px) {
  .category-data:not(.category-data--sidebar) {
    flex-direction: column;
  }

  .category-data--sidebar {
    grid-template-columns: minmax(0, 175px) minmax(0, 1fr);
  }

  .category-left {
    width: 100%;
  }

  .category-cards__items {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 520px) {
  .category-cards__items {
    grid-template-columns: 1fr;
  }
}

