/* 详情页：居中容器 */
.h5-page-detail {
  background: transparent;
  min-height: 100vh;
}

.h5-detail-page {
  max-width: 1108px;
  margin: 0 auto;
  padding: 16px 12px 32px;
  position: relative;
  z-index: 1;
}

/* 内容容器毛玻璃卡片化 */
.h5-page-detail .h5-detail-top,
.h5-page-detail .h5-detail-bottom ,.h5-detail-page .h5-detail-top{
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.55);
  box-shadow: 0 18px 48px rgba(15, 23, 42, 0.18);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  padding: 14px;
}

@media (min-width: 992px) {
  .h5-page-detail .h5-detail-top,
  .h5-page-detail .h5-detail-bottom {
    padding: 18px;
  }
}

/* ========== 上区：主图 + 信息 + 右侧互动 ========== */
.h5-detail-top {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 24px;
}

.h5-detail-hero {
  background: #f6f9fb;
  border-radius: 8px;
  overflow: hidden;
}

.h5-detail-hero img {
  width: 100%;
  display: block;
  aspect-ratio: 1;
  object-fit: contain;
}

.h5-detail-status-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 12px;
}

.h5-pill {
  display: inline-block;
  padding: 2px 10px;
  font-size: 12px;
  color: var(--color-primary);
  border: 1px solid rgba(74, 144, 226, 0.45);
  border-radius: 4px;
  background: rgba(74, 144, 226, 0.08);
}

.h5-status-text {
  font-size: 13px;
  color: var(--color-text-secondary);
}

.h5-detail-title {
  margin: 0 0 10px;
  font-size: 20px;
  font-weight: 600;
  line-height: 1.35;
  color: #0f1111;
}

/* 价格：深红强调 */
.h5-detail-price {
  font-size: 28px;
  font-weight: 700;
  color: #b71c1c;
  margin: 0 0 12px;
  letter-spacing: -0.02em;
}

.h5-detail-price small {
  font-size: 16px;
  font-weight: 600;
  margin-right: 2px;
}

.h5-detail-meta {
  font-size: 13px;
  color: var(--color-text-secondary);
  margin: 0 0 18px;
}

.h5-detail-meta a {
  color: var(--color-primary);
}

.h5-detail-meta a:hover {
  text-decoration: underline;
}

.h5-meta-split {
  margin-left: 1em;
}

.h5-detail-picks {
  margin: 14px 0 14px;
  max-width: 360px;
}

.h5-detail-pick-row {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 14px;
}

.h5-detail-pick-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 700;
  color: var(--color-text);
}

.h5-detail-pick-ic {
  width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  color: var(--color-primary);
  background: rgba(74, 144, 226, 0.12);
}

.h5-detail-specs {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.h5-detail-spec {
  min-width: 78px;
  height: 34px;
  padding: 0 14px;
  border-radius: 10px;
  border: 1px solid rgba(74, 144, 226, 0.25);
  background: rgba(255, 255, 255, 0.8);
  color: #4b5563;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 6px 16px rgba(74, 144, 226, 0.08);
}

.h5-detail-spec:hover {
  border-color: rgba(74, 144, 226, 0.45);
}

.h5-detail-spec.active {
  background: linear-gradient(135deg, #4a90e2 0%, #2d6fd9 100%);
  border-color: rgba(74, 144, 226, 0.55);
  color: #fff;
  box-shadow: 0 10px 22px rgba(74, 144, 226, 0.22);
}

.h5-detail-qty-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.h5-detail-qty {
  width: 120px;
  height: 46px;
  border-radius: 12px;
  border: 2px solid rgba(74, 144, 226, 0.45);
  background: rgba(255, 255, 255, 0.85);
  padding: 0 14px;
  font-size: 15px;
  outline: none;
  box-shadow: 0 10px 24px rgba(74, 144, 226, 0.12);
}

.h5-detail-qty:focus {
  border-color: rgba(74, 144, 226, 0.85);
  box-shadow: 0 10px 24px rgba(74, 144, 226, 0.18);
}

.h5-detail-qty-stock {
  font-size: 13px;
  color: var(--color-text-secondary);
  white-space: nowrap;
}

@media (max-width: 480px) {
  .h5-detail-qty {
    width: 96px;
    height: 44px;
  }
}

.h5-btn-buy {
  width: 100%;
  max-width: 280px;
  height: 44px;
  border: none;
  border-radius: 22px;
  background: var(--color-primary);
  color: #fff;
  font-size: 16px;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.h5-btn-buy:hover {
  filter: brightness(1.06);
}

.h5-btn-buy-plus {
  font-size: 20px;
  font-weight: 400;
  line-height: 1;
}

/* 右侧互动：移动端先横排卡片，再在下文；此处为竖向列表 */
.h5-interact-list {
  border: 1px solid var(--color-border);
  border-radius: 6px;
  overflow: hidden;
  background: #fff;
}

.h5-interact-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 14px 14px;
  border: none;
  border-bottom: 1px solid #e8edf2;
  background: #fff;
  font-size: 14px;
  color: var(--color-text);
  text-align: left;
  cursor: pointer;
}

.h5-interact-row:last-child {
  border-bottom: none;
}

.h5-interact-row:hover {
  background: #fafbfc;
}

.h5-interact-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.h5-interact-icon-wrap {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--color-primary);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.h5-interact-svg {
  color: var(--color-primary);
  flex-shrink: 0;
}

.h5-interact-num {
  font-size: 14px;
  color: var(--color-muted);
  font-variant-numeric: tabular-nums;
}

.h5-weibo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

/* ========== 下区：简介/评论 | 热门推荐 ========== */
.h5-detail-bottom {
  display: flex;
  flex-direction: column;
  gap: 24px;
  align-items: stretch;
}

.h5-content-tabs-wrap {
  min-width: 0;
}

.h5-content-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
  border-bottom: 1px solid var(--color-border);
  margin-bottom: 14px;
}

.h5-content-tabs button {
  border: none;
  background: none;
  padding: 0 0 12px;
  font-size: 15px;
  color: #fff;
  position: relative;
  cursor: pointer;
}

.h5-content-tabs button.active {
  color: var(--color-text);
  font-weight: 600;
}

.h5-content-tabs button.active::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 3px;
  background: var(--color-primary);
  border-radius: 2px 2px 0 0;
}

.h5-tab-panel {
  display: none;
  font-size: 13px;
  color: #5c6b7a;
  line-height: 1.75;
  padding-bottom: 8px;
}

.h5-tab-panel.active {
  display: block;
}

.h5-intro-lead {
  margin: 0 0 12px;
  color: var(--color-text-secondary);
}

.h5-tab-panel ul {
  margin: 0;
  padding-left: 18px;
}

/* ========== 详情描述区（左侧竖条标题 + 图集） ========== */
.h5-desc-body {
  background: #fff;
  border-radius: 8px;
  padding: 20px 18px 24px;
  border: 1px solid #eef1f5;
  box-shadow: 0 1px 3px rgba(15, 17, 17, 0.04);
}

.h5-desc-section + .h5-desc-section {
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid #f0f2f5;
}

.h5-desc-heading {
  margin: 0 0 14px;
  padding-left: 12px;
  font-size: 16px;
  font-weight: 600;
  color: #1a1a1a;
  line-height: 1.35;
  border-left: 4px solid var(--color-primary);
}

.h5-desc-text {
  margin: 0 0 12px;
  font-size: 14px;
  color: #5c6b7a;
  line-height: 1.8;
}

.h5-desc-text:last-child {
  margin-bottom: 0;
}

.h5-desc-list {
  margin: 0;
  padding-left: 20px;
  color: #5c6b7a;
  font-size: 14px;
  line-height: 1.85;
}

.h5-desc-list li + li {
  margin-top: 8px;
}

.h5-desc-gallery {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-top: 4px;
}

@media (min-width: 640px) {
  .h5-desc-gallery {
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
  }
}

@media (min-width: 992px) {
  .h5-desc-gallery {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }

  .h5-desc-gallery--large {
    grid-template-columns: repeat(2, 1fr);
    max-width: 720px;
  }
}

.h5-desc-thumb {
  display: block;
  width: 100%;
  padding: 0;
  margin: 0;
  border: 1px solid #e8ecf0;
  border-radius: 6px;
  overflow: hidden;
  cursor: zoom-in;
  background: #f6f8fa;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.h5-desc-thumb:hover {
  border-color: var(--color-primary);
  box-shadow: 0 4px 14px rgba(74, 144, 226, 0.15);
}

.h5-desc-thumb:focus {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

.h5-desc-thumb img {
  display: block;
  width: 100%;
  height: auto;
  vertical-align: middle;
  aspect-ratio: 480 / 300;
  object-fit: cover;
}

.h5-desc-gallery--large .h5-desc-thumb img {
  aspect-ratio: 600 / 380;
}

/* 大图预览 lightbox */
.h5-lightbox {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.h5-lightbox[hidden] {
  display: none !important;
}

.h5-lightbox-backdrop {
  position: absolute;
  inset: 0;
  border: none;
  padding: 0;
  margin: 0;
  background: rgba(0, 0, 0, 0.72);
  cursor: pointer;
}

.h5-lightbox-inner {
  position: relative;
  z-index: 1;
  max-width: min(96vw, 1400px);
  max-height: 92vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.h5-lightbox-img {
  display: block;
  max-width: 100%;
  max-height: 88vh;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 4px;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.35);
}

.h5-lightbox-close {
  position: absolute;
  top: -12px;
  right: -12px;
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 50%;
  background: #fff;
  color: #333;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.h5-lightbox-close:hover {
  background: #f5f5f5;
}

@media (max-width: 640px) {
  .h5-lightbox-close {
    top: 8px;
    right: 8px;
  }
}

/* ========== 评论区 ========== */
.h5-comment-panel {
  background: #fff;
  border-radius: 8px;
  padding: 20px 18px 8px;
  border: 1px solid #eef1f5;
  box-shadow: 0 1px 3px rgba(15, 17, 17, 0.04);
}

.h5-comment-compose-title {
  margin: 0 0 14px;
  font-size: 16px;
  font-weight: 600;
  color: #0f1111;
}

.h5-comment-compose {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}

@media (max-width: 480px) {
  .h5-comment-send {
    width: 100%;
  }
}

.h5-comment-avatar {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(145deg, #dbeafe, #e0f2fe);
  border: 1px solid #cfe8fc;
}

.h5-comment-avatar--lg {
  width: 44px;
  height: 44px;
}

.h5-comment-input {
  flex: 1;
  min-width: 0;
  height: 40px;
  padding: 0 14px;
  border: 1px solid #e8ecf0;
  border-radius: 4px;
  background: #f5f6f8;
  font-size: 14px;
  color: #333;
  outline: none;
}

.h5-comment-input::placeholder {
  color: #a1a8b3;
}

.h5-comment-input:focus {
  border-color: var(--color-primary);
  background: #fff;
}

.h5-comment-send {
  flex-shrink: 0;
  height: 40px;
  padding: 0 22px;
  border: none;
  border-radius: 4px;
  background: var(--color-primary);
  color: #fff;
  font-size: 14px;
  cursor: pointer;
}

.h5-comment-send:hover {
  filter: brightness(1.05);
}

.h5-comment-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  padding-bottom: 12px;
  border-bottom: 1px solid #e8ecf0;
  margin-bottom: 4px;
}

.h5-comment-total {
  font-size: 14px;
  color: #333;
}

.h5-comment-total strong {
  font-weight: 600;
  color: #0f1111;
}

.h5-comment-sort {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
}

.h5-comment-sort-btn {
  border: none;
  background: none;
  padding: 0;
  cursor: pointer;
  color: #999;
  font-size: 14px;
}

.h5-comment-sort-btn.active {
  color: #333;
  font-weight: 500;
}

.h5-comment-sort-gap {
  color: #d0d5dd;
  user-select: none;
}

.h5-comment-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.h5-comment-item {
  display: flex;
  gap: 12px;
  padding: 18px 0;
  border-bottom: 1px dashed #d8dee6;
}

.h5-comment-item:last-child {
  border-bottom: none;
}

.h5-comment-body {
  flex: 1;
  min-width: 0;
}

.h5-comment-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 8px;
}

.h5-comment-userblock {
  min-width: 0;
}

.h5-comment-user {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: #0f1111;
  word-break: break-all;
}

.h5-comment-time {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  color: #a1a8b3;
}

.h5-comment-recommend {
  flex-shrink: 0;
  font-size: 14px;
  color: var(--color-primary);
  text-decoration: none;
  white-space: nowrap;
  padding-top: 2px;
}

.h5-comment-recommend:hover {
  text-decoration: underline;
}

.h5-comment-rec-num {
  font-weight: 500;
}

.h5-comment-text {
  margin: 0;
  font-size: 14px;
  color: #333;
  line-height: 1.65;
}

/* 热门推荐侧栏 */
.h5-rec-section {
  min-width: 0;
}

.h5-rec-title {
  margin: 0 0 10px;
  font-size: 16px;
  font-weight: 600;
  color: #0f1111;
  padding-bottom: 10px;
  border-bottom: 1px solid #e5e9ef;
}

.h5-rec-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.h5-rec-item {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 10px;
  align-items: center;
  padding: 10px;
  border: 1px solid #eee;
  border-radius: 6px;
  background: #fff;
  text-decoration: none;
  color: inherit;
  transition: box-shadow 0.2s;
}

.h5-rec-item:hover {
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
}

.h5-rec-item .thumb {
  width: 72px;
  height: 72px;
  border-radius: 4px;
  overflow: hidden;
  background: #f0f3f7;
}

.h5-rec-item .thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.h5-rec-item .info {
  min-width: 0;
}

.h5-rec-item .t {
  font-size: 13px;
  color: var(--color-text);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.4;
}

.h5-rec-item .p {
  font-size: 14px;
  color: var(--color-text-secondary);
  margin-top: 6px;
}

/* 移动端：推荐横滑 */
@media (max-width: 991px) {
  .h5-rec-list {
    flex-direction: row;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    gap: 12px;
    padding-bottom: 6px;
    scrollbar-width: none;
  }

  .h5-rec-list::-webkit-scrollbar {
    display: none;
  }

  .h5-rec-item {
    flex: 0 0 200px;
    grid-template-columns: 64px 1fr;
  }

  .h5-rec-item .thumb {
    width: 64px;
    height: 64px;
  }
}

/* ========== PC：上三栏、下两栏 ========== */
@media (min-width: 992px) {
  .h5-detail-page {
    padding: 24px 16px 40px;
  }

  .h5-detail-top {
    display: grid;
    grid-template-columns: minmax(300px, 380px) minmax(280px, 1fr) 220px;
    gap: 28px 32px;
    align-items: start;
    margin-bottom: 32px;
  }

  .h5-detail-col--img {
    position: sticky;
    top: 72px;
  }

  .h5-detail-col--info {
    padding-top: 4px;
    min-width: 0;
  }

  .h5-detail-col--interact {
    padding-top: 4px;
  }

  .h5-detail-bottom {
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 40px;
    align-items: start;
  }

  .h5-detail-content-col {
    min-width: 0;
  }
}
