/* =====================================================================
 * RiPro-V5 专题合集小工具（home-series）
 * ===================================================================== */
.luxury-topic-section {
  max-width: 1300px;
  margin: 50px auto;
  padding: 0 24px;
  box-sizing: border-box;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* ================= 标题栏 ================= */
.luxury-topic-section .section-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 30px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  padding-bottom: 15px;
}
.luxury-topic-section .title-left { flex-shrink: 0; }
.luxury-topic-section .sub-title {
  display: block;
  font-size: 11px;
  color: #999;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 4px;
}
.luxury-topic-section .main-title {
  font-size: 26px !important;
  font-weight: 700 !important;
  color: #1a1a1a !important;
  margin: 0 !important;
  line-height: 1.2;
}
.luxury-topic-section .title-more-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #666 !important;
  font-size: 14px !important;
  font-weight: 500;
  text-decoration: none !important;
  transition: all 0.3s ease;
  padding: 4px 0;
}
.luxury-topic-section .more-icon {
  width: 16px;
  height: 16px;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.luxury-topic-section .title-more-link:hover { color: #000 !important; }
.luxury-topic-section .title-more-link:hover .more-icon { transform: translateX(4px); }

/* ================= 多排网格 ================= */
.luxury-topic-section .luxury-topic-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 20px;
}

/* ================= 单排静态一行（≤5 个专题） ================= */
.luxury-topic-section .luxury-topic-row {
  display: flex;
  gap: 20px;
}
.luxury-topic-section .luxury-topic-row .lx-card {
  flex: 1 1 0;
  min-width: 0;
}

/* ================= 单排：可滑动 + 自动滚动（>5 个专题） ================= */
.luxury-topic-section .luxury-topic-scroller {
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;                 /* Firefox 隐藏滚动条 */
  cursor: grab;
  transform: translateZ(0);
  container-type: inline-size;           /* 启用容器查询单位 cqw，用于对齐“一排5个”宽度 */
  /* 两侧渐隐 24px；想完全去掉“发光”把下面两行 mask 删掉即可 */
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 24px, #000 calc(100% - 24px), transparent 100%);
          mask-image: linear-gradient(90deg, transparent 0, #000 24px, #000 calc(100% - 24px), transparent 100%);
}
.luxury-topic-section .luxury-topic-scroller::-webkit-scrollbar { display: none; } /* Chrome/Safari 隐藏滚动条 */
.luxury-topic-section .luxury-topic-scroller.lx-dragging {
  cursor: grabbing;
  user-select: none;
}
.luxury-topic-section .lx-scroll-track {
  display: flex;
  width: max-content;
}
.luxury-topic-section .lx-scroll-track .lx-card {
  /* 回退值（不支持容器查询的浏览器）：约等于桌面一排5个 */
  flex: 0 0 234px;
  width: 234px;
  margin-right: 20px;
}
/* 桌面：按容器宽度算“一排5个”，与网格/静态行卡片同宽 */
@container (min-width: 700px) {
  .luxury-topic-section .lx-scroll-track .lx-card {
    flex-basis: calc((100cqw - 80px) / 5);
    width: calc((100cqw - 80px) / 5);
  }
}

/* ================= 卡片 ================= */
.luxury-topic-section .lx-card {
  position: relative;
  display: block;
  height: 240px;
  border-radius: 14px;
  overflow: hidden;
  text-decoration: none !important;
  background-image: var(--card-bg);
  background-size: cover;
  background-position: center;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
  transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1), box-shadow 0.4s cubic-bezier(0.25, 1, 0.5, 1);
}
.luxury-topic-section .lx-glass-layer {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to bottom,
    rgba(0, 0, 0, 0) 0%,
    rgba(0, 0, 0, 0.1) 40%,
    rgba(0, 0, 0, 0.45) 70%,
    rgba(0, 0, 0, 0.8) 100%
  );
  display: flex;
  align-items: flex-end;
  justify-content: flex-start;
  padding: 20px;
  box-sizing: border-box;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 14px;
  transition: all 0.4s cubic-bezier(0.25, 1, 0.5, 1);
}
.luxury-topic-section .lx-context { text-align: left; width: 100%; }
.luxury-topic-section .lx-title {
  color: #ffffff !important;
  font-size: 21px !important;
  font-weight: 700 !important;
  margin: 0 0 8px 0 !important;
  letter-spacing: 0.5px;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.6);
}
.luxury-topic-section .lx-desc {
  color: rgba(255, 255, 255, 0.7) !important;
  font-size: 11px;
  font-weight: 400;
  margin: 0;
  display: inline-block;
  background: rgba(0, 0, 0, 0.35);
  padding: 4px 10px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-sizing: border-box;
  transition: all 0.4s ease;
}

/* ================= Hover ================= */
.luxury-topic-section .lx-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.25);
}
.luxury-topic-section .lx-card:hover .lx-glass-layer {
  background: linear-gradient(to bottom,
    rgba(0, 0, 0, 0.05) 0%,
    rgba(0, 0, 0, 0.2) 40%,
    rgba(0, 0, 0, 0.5) 70%,
    rgba(0, 0, 0, 0.75) 100%
  );
  border-color: rgba(255, 255, 255, 0.35);
}
.luxury-topic-section .lx-card:hover .lx-desc {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.3);
  color: rgba(255, 255, 255, 0.95) !important;
}

/* ================= 响应式 ================= */
@media (max-width: 1200px) {
  .luxury-topic-section .luxury-topic-grid { grid-template-columns: repeat(5, 1fr); gap: 12px; }
  .luxury-topic-section .lx-card { height: 190px; }
}
@media (max-width: 768px) {
  .luxury-topic-section { padding: 0 16px; margin: 30px auto; }
  .luxury-topic-section .section-header { margin-bottom: 16px; padding-bottom: 10px; }
  .luxury-topic-section .main-title { font-size: 20px !important; }
  .luxury-topic-section .title-more-link { font-size: 13px !important; }

  /* 多排模式：移动端转为流式横向滚动 */
  .luxury-topic-section .luxury-topic-grid {
    display: flex;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    gap: 12px;
    padding-bottom: 15px;
  }
  .luxury-topic-section .luxury-topic-grid::-webkit-scrollbar { display: none; }
  .luxury-topic-section .luxury-topic-grid .lx-card { flex: 0 0 145px; scroll-snap-align: start; }

  /* 单排静态一行：移动端横向滚动 */
  .luxury-topic-section .luxury-topic-row {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x mandatory;
    gap: 12px;
    padding-bottom: 12px;
  }
  .luxury-topic-section .luxury-topic-row::-webkit-scrollbar { display: none; }
  .luxury-topic-section .luxury-topic-row .lx-card { flex: 0 0 145px; scroll-snap-align: start; }

  /* 单排自动滚动：移动端卡片尺寸（覆盖桌面容器查询值） */
  .luxury-topic-section .lx-scroll-track .lx-card {
    flex-basis: 150px;
    width: 150px;
    margin-right: 12px;
  }

  .luxury-topic-section .lx-card { height: 160px; border-radius: 12px; }
  .luxury-topic-section .lx-glass-layer { padding: 12px; border-radius: 12px; }
  .luxury-topic-section .lx-title { font-size: 16px !important; }
  .luxury-topic-section .lx-desc { display: none; }
}