/* ============================================================
   精选产品展示 - Section 容器
   ============================================================ */

.rix-featured-products {
  background-color: var(--color-bg-primary, #ffffff);
  overflow: hidden;
}

.rix-featured-products__inner {
  display: flex;
  flex-direction: column;
  width: 100%;
}

/* ============================================================
   Header 标题区
   ============================================================ */

.rix-featured-products__header {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  margin-bottom: 40px;
}

.rix-featured-products__heading {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(36px, 5vw, 64px);
  font-weight: 800;
  letter-spacing: 2px;
  color: var(--color-text-primary, #1A1A2E);
  text-transform: uppercase;
  margin: 0;
  text-align: center !important;
}

@media (max-width: 959px) {
  .rix-featured-products__header {
    margin-bottom: 24px;
  }
}

/* ============================================================
   Product Grid 产品网格
   ============================================================ */

.rix-featured-products__grid {
  display: grid;
  grid-template-columns: repeat(var(--desktop-columns, 4), 1fr);
  gap: 20px;
  list-style: none;
  padding: 0;
  margin: 0;
  width: 100%;
}

@media (max-width: 959px) {
  .rix-featured-products__grid {
    grid-template-columns: repeat(var(--mobile-columns, 1), 1fr);
    gap: 16px;
  }
}

/* ============================================================
   首卡放大（Bento 错落布局）
   ============================================================ */

@media (min-width: 960px) {
  .rix-featured-products__grid.featured-first li:first-child {
    grid-column: span 2;
    grid-row: span 2;
  }
}

/* ============================================================
   产品卡片包裹层
   ============================================================ */

.rix-featured-products__grid > li {
  list-style: none;
}

.rix-featured-products__grid > li .product-card-shadow-space,
.rix-featured-products__grid > li .block-product-card {
  height: 100%;
}

/* ============================================================
   产品卡片暗色主题样式覆盖
   ============================================================ */

.rix-featured-products__grid .block-product-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background-color: #ffffff;
  border-radius: 10px;
  overflow: hidden;
  transition: transform 0.4s ease, box-shadow 0.4s ease;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  height: 100%;
  border: none;
}

.rix-featured-products__grid .block-product-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.1);
}

/* ============================================================
   产品图片区域
   ============================================================ */

/* 图片区域 1:1 */
.rix-featured-products__grid .block-product-card .custom-image__wrapper {
  position: relative;
  width: 85% !important;
  aspect-ratio: 4/3 !important;
  overflow: hidden;
  margin: 50px auto 0;
}

.rix-featured-products__grid .block-product-card .custom-image__wrapper > a {
  display: block;
  width: 100%;
  height: 100%;
}

.rix-featured-products__grid .block-product-card .custom-image__wrapper .custom-image__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ============================================================
   产品信息区域（暗色主题）
   ============================================================ */

/* 信息区撑满卡片剩余高度 */
.rix-featured-products__grid .block-product-card .block-product-card-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 16px 20px 20px;
}

/* 标题 */
.rix-featured-products__grid .block-product-card .block-product-title {
  font-size: 15px;
  font-weight: 600;
  color: #1A1A2E !important;
  margin: 0;
  line-height: 1.4;
  transition: color 0.3s ease;
}

.rix-featured-products__grid .block-product-card .block-product-title span {
  -webkit-line-clamp: 2 !important;
}

.rix-featured-products__grid .block-product-card:hover .block-product-title {
  color: #ff6b35 !important;
}

/* 价格沉底 + 紧贴购买按钮 */
.rix-featured-products__grid .block-product-card .block-product-price {
  font-size: 16px;
  font-weight: 700;
  color: #e8760a !important;
  margin-top: auto;
}

.rix-featured-products__grid .block-product-card .block-product-price .price--original {
  font-size: 13px;
  font-weight: 400;
  color: #777 !important;
  text-decoration: line-through;
}

/* 购买按钮容器紧贴价格 */
.rix-featured-products__grid .block-product-card .block-product-buy-button-wrapper {
  margin-top: 8px;
}

/* 购买按钮 */
.rix-featured-products__grid .block-product-card .block-product-buy-button-wrapper .button,
.rix-featured-products__grid .block-product-card .block-product-buy-button-wrapper button {
  width: 100%;
  padding: 12px 16px;
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  border-radius: 4px;
  background: transparent;
  color: #000000;
  border: 1px solid rgba(255, 255, 255, 0.2);
  cursor: pointer;
  transition: all 0.3s ease;
  line-height: 1;
}

.rix-featured-products__grid .block-product-card:hover .block-product-buy-button-wrapper .button,
.rix-featured-products__grid .block-product-card:hover .block-product-buy-button-wrapper button {
  background: #e8760a;
  color: #fff;
  border-color: #e8760a;
  box-shadow: 0 0 12px rgba(232, 118, 10, 0.4), inset 0 0 0 1px rgba(255, 255, 255, 0.15);
}

/* 首卡放大后的信息区适配 */
@media (min-width: 960px) {
  .rix-featured-products__grid.featured-first li:first-child .block-product-card-info {
    padding: 24px 28px 28px;
    gap: 12px;
  }

  .rix-featured-products__grid.featured-first li:first-child .block-product-title {
    font-size: 20px;
  }

  .rix-featured-products__grid.featured-first li:first-child .block-product-price {
    font-size: 20px;
  }
}

/* ============================================================
   折扣标签暗色样式
   ============================================================ */

.rix-featured-products__grid .block-product-card .product-card-discount-tag,
.rix-featured-products__grid .block-product-card .discount-tag {
  background: #e8760a;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 4px;
  z-index: 3;
}

/* ============================================================
   Footer 按钮行
   ============================================================ */

.rix-featured-products__footer {
  display: flex;
  justify-content: center;
  margin-top: 36px;
}

@media (max-width: 959px) {
  .rix-featured-products__footer {
    margin-top: 24px;
  }
}

/* ============================================================
   空状态
   ============================================================ */

.rix-featured-products__empty {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 200px;
  color: #666;
  font-size: 14px;
  background: #f5f5f5;
  border-radius: 10px;
  border: 1px dashed #ccc;
}

/* ============================================================
   光束扫过效果
   ============================================================ */

.rix-featured-products__beam-wrapper[data-beam-trigger] .block-product-card .custom-image__wrapper::after {
  content: '';
  position: absolute;
  top: 0;
  left: -70%;
  width: var(--beam-size, 60%);
  height: 100%;
  background: linear-gradient(
    calc(var(--beam-angle, -15deg) + 110deg),
    transparent 0%,
    rgba(var(--beam-color-rgb, 255, 255, 255), 0) 25%,
    rgba(var(--beam-color-rgb, 255, 255, 255), var(--beam-opacity, 0.28)) 50%,
    rgba(var(--beam-color-rgb, 255, 255, 255), 0) 75%,
    transparent 100%
  );
  transform: skewX(var(--beam-angle, -15deg));
  filter: blur(6px);
  pointer-events: none;
  z-index: 2;
}

.rix-featured-products__beam-wrapper[data-beam-style="soft-light"] .block-product-card .custom-image__wrapper::after {
  mix-blend-mode: soft-light;
}
.rix-featured-products__beam-wrapper[data-beam-style="screen"] .block-product-card .custom-image__wrapper::after {
  mix-blend-mode: screen;
}
.rix-featured-products__beam-wrapper[data-beam-style="overlay"] .block-product-card .custom-image__wrapper::after {
  mix-blend-mode: overlay;
}
.rix-featured-products__beam-wrapper[data-beam-style="none"] .block-product-card .custom-image__wrapper::after {
  mix-blend-mode: normal;
}

/* 悬停触发 */
.rix-featured-products__beam-wrapper[data-beam-trigger="hover"][data-beam-direction="left-to-right"] .block-product-card:hover .custom-image__wrapper::after {
  left: 110%;
  transition: left var(--beam-speed, 1.4s) cubic-bezier(0.22, 0.61, 0.36, 1);
}

.rix-featured-products__beam-wrapper[data-beam-trigger="hover"][data-beam-direction="right-to-left"] .block-product-card .custom-image__wrapper::after {
  left: auto;
  right: -70%;
}
.rix-featured-products__beam-wrapper[data-beam-trigger="hover"][data-beam-direction="right-to-left"] .block-product-card:hover .custom-image__wrapper::after {
  right: 110%;
  transition: right var(--beam-speed, 1.4s) cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* 扫回来 */
.rix-featured-products__beam-wrapper[data-beam-trigger="hover"][data-beam-sweep-back="true"] .block-product-card .custom-image__wrapper::after {
  transition: left var(--beam-speed, 1.4s) cubic-bezier(0.22, 0.61, 0.36, 1);
}
.rix-featured-products__beam-wrapper[data-beam-trigger="hover"][data-beam-sweep-back="true"][data-beam-direction="right-to-left"] .block-product-card .custom-image__wrapper::after {
  transition: right var(--beam-speed, 1.4s) cubic-bezier(0.22, 0.61, 0.36, 1);
}

.rix-featured-products__beam-wrapper[data-beam-trigger="hover"][data-beam-sweep-back="false"] .block-product-card .custom-image__wrapper::after {
  transition: left 0s;
}
.rix-featured-products__beam-wrapper[data-beam-trigger="hover"][data-beam-sweep-back="false"][data-beam-direction="right-to-left"] .block-product-card .custom-image__wrapper::after {
  transition: right 0s;
}

/* 自动触发 */
.rix-featured-products__beam-wrapper[data-beam-trigger="auto"] .block-product-card .custom-image__wrapper::after {
  left: -70%;
  transition: none;
}
.rix-featured-products__beam-wrapper[data-beam-trigger="auto"][data-beam-direction="right-to-left"] .block-product-card .custom-image__wrapper::after {
  left: auto;
  right: -70%;
}

/* JS class-toggle 触发的同步扫光 */
.rix-featured-products__beam-wrapper[data-beam-trigger="auto"].beam-flash .block-product-card .custom-image__wrapper::after {
  left: 110%;
  transition: left var(--beam-speed, 1.4s) ease-in-out;
}
.rix-featured-products__beam-wrapper[data-beam-trigger="auto"][data-beam-direction="right-to-left"].beam-flash .block-product-card .custom-image__wrapper::after {
  left: auto;
  right: 110%;
  transition: right var(--beam-speed, 1.4s) ease-in-out;
}
