/**
 * ======== sanxio 首页高端实用版（Premium Home） start ===========
 * 依赖：md3-design-tokens、home-sections.css、homepage.css
 */

body.sanxio-home-premium-page {
  background: var(--md3-color-surface-container-low, #f3f5f9);
  --sanxio-block-px: 12px;
  --sanxio-card-px: 12px;
  --sanxio-content-gap: 12px;
  --sanxio-gap-md: 12px;
  --sanxio-gap-sm: 8px;
}

@media (min-width: 768px) {
  body.sanxio-home-premium-page {
    --sanxio-block-px: 20px;
    --sanxio-card-px: 20px;
    --sanxio-content-gap: 20px;
    --sanxio-gap-md: 16px;
  }
}

/* ---------- 统一对齐轨：整页只保留一层水平 gutter ---------- */
body.sanxio-home-premium-page .sx-home-page {
  --sx-home-gutter: var(--sanxio-block-px, 12px);
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding-left: var(--sx-home-gutter);
  padding-right: var(--sx-home-gutter);
  box-sizing: border-box;
}

@media (min-width: 768px) {
  body.sanxio-home-premium-page .sx-home-page {
    --sx-home-gutter: var(--sanxio-block-px, 20px);
  }
}

body.sanxio-home-premium-page .sx-home-page__body {
  padding-left: 0;
  padding-right: 0;
  padding-top: 0;
  padding-bottom: var(--sanxio-content-gap, 12px);
}

body.sanxio-home-premium-page .sanxio-home-section {
  width: 100% !important;
  max-width: 100% !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  margin-bottom: 0 !important;
  margin-top: var(--sanxio-gap-sm, 8px) !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
  box-sizing: border-box;
}

body.sanxio-home-premium-page .sanxio-home-section-card,
body.sanxio-home-premium-page .sanxio-home-section-card--container,
body.sanxio-home-premium-page .sanxio-home-section-card.sanxio-home-coupon-card:not(.sanxio-home-section-card--unified-carousel),
body.sanxio-home-premium-page .sanxio-home-section-card.sanxio-home-seckill-card:not(.sanxio-home-section-card--unified-carousel),
body.sanxio-home-premium-page .sanxio-home-section-card.sanxio-home-products-carousel:not(.sanxio-home-section-card--unified-carousel) {
  width: 100%;
  box-sizing: border-box;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  padding: 0 !important;
  border-radius: 0 !important;
  overflow: visible;
}

body.sanxio-home-premium-page .sanxio-home-section-card.sanxio-home-coupon-card:not(.sanxio-home-section-card--unified-carousel) .sanxio-home-section__head {
  padding-right: var(--sanxio-card-px, var(--sanxio-block-px, 16px)) !important;
}

body.sanxio-home-premium-page .sanxio-home-section__head {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sanxio-gap-md, 12px);
  min-height: 44px;
  padding: var(--sanxio-gap-sm, 8px) var(--sanxio-block-px, 12px) var(--sanxio-gap-sm, 8px) calc(4px + var(--sanxio-gap-md, 12px)) !important;
  margin-left: 0;
  margin-right: 0;
  margin-bottom: var(--sanxio-content-gap, 12px);
  box-sizing: border-box;
  background-color: var(--md3-color-surface, #fff) !important;
  background-image:
    linear-gradient(var(--md3-color-outline-variant, #c3c6cf), var(--md3-color-outline-variant, #c3c6cf)),
    linear-gradient(var(--md3-color-primary, #005fb8), var(--md3-color-primary, #005fb8));
  background-size: 100% 1px, 4px 100%;
  background-position: 0 0, 0 0;
  background-repeat: no-repeat;
  border-top: none;
  border-right: none;
  border-left: none;
  border-bottom: none;
  border-radius: var(--md3-shape-sm, 8px);
}

body.sanxio-home-premium-page .sanxio-home-section__head .sanxio-home-section__title {
  flex: 1;
  min-width: 0;
  margin: 0;
  font-size: var(--text-lg, 16px);
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: 0;
  color: var(--md3-color-on-surface, #1a1c1e);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.sanxio-home-premium-page .sanxio-home-section__head-actions {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: var(--sanxio-gap-sm, 8px);
}

body.sanxio-home-premium-page .sanxio-home-section__title-link {
  flex-shrink: 0;
  margin-left: 0;
  padding: 4px var(--sanxio-gap-sm, 8px) 4px 8px;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.2;
  color: var(--md3-color-primary, #005fb8);
}

body.sanxio-home-premium-page .sanxio-home-section__title-link::after {
  margin-left: 2px;
  font-weight: 600;
  color: var(--md3-color-primary, #005fb8);
}

body.sanxio-home-premium-page .sanxio-home-seckill__head {
  flex-wrap: nowrap;
  gap: var(--sanxio-gap-sm, 8px);
}

body.sanxio-home-premium-page .sanxio-home-seckill__head .sanxio-home-seckill__countdown {
  margin-right: 0;
}

body.sanxio-home-premium-page .sanxio-home-seckill__head .sanxio-home-section__title {
  flex: 1 1 auto;
}

@media (max-width: 767px) {
  body.sanxio-home-premium-page .sanxio-home-section__head {
    gap: var(--sanxio-gap-sm, 8px);
    padding-top: var(--sanxio-gap-sm, 8px) !important;
    padding-bottom: var(--sanxio-gap-sm, 8px) !important;
    padding-left: calc(4px + var(--sanxio-gap-md, 12px)) !important;
    padding-right: var(--sanxio-block-px, 12px) !important;
  }

  body.sanxio-home-premium-page .sanxio-home-section-card--unified-list .sanxio-home-section__head,
  body.sanxio-home-premium-page .sanxio-home-section-card--unified-carousel .sanxio-home-section__head {
    padding: 10px var(--sx-home-rail-inset, 8px) 10px var(--sx-home-head-title-pl, 12px) !important;
  }

  body.sanxio-home-premium-page .sanxio-home-section__title-link {
    font-size: 12px;
    padding: 4px var(--sanxio-gap-sm, 8px) 4px 4px;
  }

  body.sanxio-home-premium-page .sanxio-home-section-card--unified-list .sanxio-home-section__title-link,
  body.sanxio-home-premium-page .sanxio-home-section-card--unified-carousel .sanxio-home-section__title-link {
    padding: 4px 0;
  }
}

/* ---------- Hero ---------- */
.sx-home-hero {
  position: relative;
  width: 100%;
  margin: var(--sanxio-content-gap, 12px) 0;
  padding: var(--sanxio-card-py, 16px) var(--sanxio-card-px, 16px);
  border-radius: var(--md3-shape-lg, 16px);
  overflow: hidden;
  background: linear-gradient(
    135deg,
    var(--md3-color-primary-container, #d0e8ff) 0%,
    var(--md3-color-surface, #fff) 42%,
    var(--md3-color-surface-container-high, #e7e9ed) 100%
  );
  border: 1px solid var(--md3-color-outline-variant, #c3c6cf);
  box-shadow: var(--md3-elevation-2, 0 2px 8px rgba(0, 0, 0, 0.08));
}

@media (min-width: 768px) {
  .sx-home-hero {
    padding: var(--sanxio-card-py, 20px) var(--sanxio-card-px, 20px);
  }
}

.sx-home-hero__glow {
  position: absolute;
  top: -40%;
  right: -20%;
  width: 70%;
  height: 120%;
  background: radial-gradient(circle, rgba(0, 95, 184, 0.12) 0%, transparent 70%);
  pointer-events: none;
}

.sx-home-hero__inner {
  position: relative;
  z-index: 1;
  max-width: 720px;
  margin: 0 auto;
  text-align: center;
}

.sx-home-hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--sanxio-gap-sm, 8px);
  margin: 0 0 var(--sanxio-gap-sm, 8px);
  padding: 4px 12px;
  font-size: var(--text-sm, 12px);
  font-weight: 600;
  color: var(--md3-color-primary, #005fb8);
  background: rgba(255, 255, 255, 0.65);
  border-radius: var(--md3-shape-full, 9999px);
  border: 1px solid var(--md3-color-outline-variant, #c3c6cf);
}

.sx-home-hero__eyebrow .material-symbols-outlined {
  font-size: 18px;
}

.sx-home-hero__title {
  margin: 0 0 var(--sanxio-gap-sm, 8px);
  font-size: clamp(1.5rem, 4vw, 2rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--md3-color-on-surface, #1a1c1e);
  line-height: 1.2;
}

.sx-home-hero__desc {
  margin: 0 0 var(--sanxio-content-gap, 12px);
  font-size: var(--text-md, 14px);
  line-height: 1.55;
  color: var(--md3-color-on-surface-variant, #43474e);
}

.sx-home-hero__search {
  display: flex;
  flex-direction: column;
  gap: var(--sanxio-gap-sm, 8px);
  margin-bottom: var(--sanxio-content-gap, 12px);
}

@media (min-width: 600px) {
  .sx-home-hero__search {
    flex-direction: row;
    align-items: stretch;
  }
}

.sx-home-hero__search-field {
  flex: 1;
  display: flex;
  align-items: center;
  gap: var(--sanxio-gap-sm, 8px);
  min-height: 48px;
  padding: 0 var(--sanxio-card-px, 12px);
  background: var(--md3-color-surface, #fff);
  border: 1px solid var(--md3-color-outline-variant, #c3c6cf);
  border-radius: var(--md3-shape-full, 9999px);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.sx-home-hero__search-field:focus-within {
  border-color: var(--md3-color-primary, #005fb8);
  box-shadow: 0 0 0 3px rgba(0, 95, 184, 0.15);
}

.sx-home-hero__search-icon {
  color: var(--md3-color-on-surface-variant, #43474e);
  font-size: 22px;
}

.sx-home-hero__search-input {
  flex: 1;
  min-width: 0;
  border: none;
  background: transparent;
  font-size: var(--text-md, 14px);
  color: var(--md3-color-on-surface, #1a1c1e);
  outline: none;
}

.sx-home-hero__search-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-height: 48px;
  padding: 0 var(--sanxio-card-px, 16px);
  border-radius: var(--md3-shape-full, 9999px);
  white-space: nowrap;
}

.sx-home-hero__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--sanxio-gap-sm, 8px);
  margin-bottom: var(--sanxio-content-gap, 12px);
}

.sx-home-hero__cta {
  min-height: 40px;
  padding: 0 var(--sanxio-card-px, 16px);
  border-radius: var(--md3-shape-full, 9999px);
  font-size: var(--text-md, 14px);
  text-decoration: none;
}

.sx-home-hero__trust {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--sanxio-gap-md, 12px) var(--sanxio-content-gap, 12px);
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: var(--text-sm, 12px);
  color: var(--md3-color-on-surface-variant, #43474e);
}

.sx-home-hero__trust li {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.sx-home-hero__trust .material-symbols-outlined {
  font-size: 18px;
  color: var(--md3-color-primary, #005fb8);
}

@media (max-width: 767px) {
  .sx-home-hero__trust--hide-mobile {
    display: none;
  }
}

/* ---------- 快捷入口：仅移动端显示（桌面与模块导航重复） ---------- */
body.sanxio-home-premium-page .sanxio-home-entry-grid {
  display: none !important;
}

@media (max-width: 767px) {
  body.sanxio-home-premium-page .sanxio-home-entry-grid {
    display: flex !important;
    flex-wrap: nowrap;
    align-items: flex-start;
    overflow-x: auto;
    overflow-y: hidden;
    gap: var(--sanxio-gap-sm, 8px);
    margin: 0 0 var(--sanxio-content-gap, 12px);
    padding: var(--sanxio-card-py, 12px) var(--sanxio-card-px, 12px);
    background: var(--md3-color-surface, #fff);
    border-radius: var(--md3-shape-md, 12px);
    border: 1px solid var(--md3-color-outline-variant, #c3c6cf);
    box-shadow: var(--md3-elevation-1, 0 1px 4px rgba(0, 0, 0, 0.06));
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x proximity;
    scrollbar-width: none;
  }

  body.sanxio-home-premium-page .sanxio-home-entry-grid::-webkit-scrollbar {
    display: none;
  }

  body.sanxio-home-premium-page .sanxio-home-entry-item {
    flex: 0 0 calc((100% - 3 * var(--sanxio-gap-sm, 8px)) / 4);
    min-width: 64px;
    scroll-snap-align: start;
  }

  body.sanxio-home-premium-page .sanxio-home-entry-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--md3-shape-md, 12px);
    background: var(--md3-color-surface-container-high, #e7e9ed);
    color: var(--md3-color-primary, #005fb8);
  }
}

/* ---------- 公告条对齐壳层（与金刚区/区块同白卡片） ---------- */
body.sanxio-home-premium-page .sanxio-home-notice-bar {
  margin: 0 0 var(--sanxio-content-gap, 12px);
  padding: var(--sanxio-card-py, 12px) var(--sanxio-card-px, 12px);
  background: var(--md3-color-surface, #fff);
  border-radius: var(--md3-shape-md, 12px);
  border: 1px solid var(--md3-color-outline-variant, #c3c6cf);
  box-shadow: var(--md3-elevation-1, 0 1px 4px rgba(0, 0, 0, 0.06));
}

/* ---------- Premium 下 Banner：与页头/模块导航拉开间距 ---------- */
body.sanxio-home-premium-page .sanxio-home-banner {
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  margin-top: var(--sanxio-content-gap, 12px) !important;
  margin-bottom: var(--sanxio-content-gap, 12px) !important;
  border-radius: var(--md3-shape-md, 12px) !important;
}

@media (min-width: 768px) {
  body.sanxio-home-premium-page .sanxio-home-banner,
  body.sanxio-home-premium-page .sx-home-page__body .sanxio-home-banner {
    margin-top: var(--sanxio-block-px, 20px) !important;
    margin-bottom: var(--sanxio-content-gap, 12px) !important;
  }
}

/* ---------- B2B 双栏（供应 + 求购） ---------- */
.sx-home-bento {
  display: grid;
  gap: var(--sanxio-content-gap, 12px);
  margin-bottom: var(--sanxio-content-gap, 12px);
}

@media (min-width: 992px) {
  .sx-home-bento {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    align-items: start;
  }
  /*======= sanxio 双栏仅剩一列（求购为空隐藏 / 模块未开）时铺满 start ===========*/
  .sx-home-bento.sx-home-bento--single,
  .sx-home-bento:has(> .sanxio-home-section:only-child),
  .sx-home-bento:has(> .sanxio-home-section.sanxio-home-section--hidden) {
    grid-template-columns: minmax(0, 1fr);
  }
  .sx-home-bento.sx-home-bento--single .sx-home-offer-grid--in-bento,
  .sx-home-bento:has(> .sanxio-home-section:only-child) .sx-home-offer-grid--in-bento,
  .sx-home-bento:has(> .sanxio-home-section.sanxio-home-section--hidden) .sx-home-offer-grid--in-bento {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  /*======= sanxio 双栏仅剩一列时铺满 end ===========*/
}

.sx-home-bento > .sanxio-home-section {
  min-width: 0;
}

.sx-home-bento .sanxio-home-section {
  margin-top: 0 !important;
  padding-left: 0;
  padding-right: 0;
}

/* 双栏内供应网格：最多 2 列，避免在半宽栏里挤 3～4 列 */
.sx-home-bento .sx-home-offer-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--sanxio-gap-md, 12px);
}

.sx-home-offer-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--sanxio-gap-md, 12px);
}

@media (min-width: 600px) {
  .sx-home-offer-grid:not(.sx-home-offer-grid--in-bento) {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 992px) {
  .sx-home-offer-grid:not(.sx-home-offer-grid--in-bento) {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.sx-home-offer-card {
  margin: 0;
  min-width: 0;
}

.sx-home-offer-card__link {
  display: flex;
  flex-direction: column;
  height: 100%;
  text-decoration: none;
  color: inherit;
  background: var(--md3-color-surface-container-low, #f3f5f9);
  border-radius: var(--md3-shape-sm, 8px);
  border: 1px solid var(--md3-color-outline-variant, #c3c6cf);
  overflow: hidden;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.sx-home-offer-card__link:hover {
  box-shadow: var(--md3-elevation-2, 0 2px 8px rgba(0, 0, 0, 0.08));
  transform: translateY(-2px);
}

.sx-home-offer-card__media {
  display: block;
  aspect-ratio: 1;
  overflow: hidden;
  background: var(--md3-color-surface-container, #e9ecf1);
}

.sx-home-offer-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.sx-home-offer-card__body {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: var(--sanxio-gap-sm, 8px);
}

.sx-home-offer-card__title {
  font-size: var(--text-sm, 12px);
  font-weight: 500;
  line-height: 1.35;
  color: var(--md3-color-on-surface, #1a1c1e);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.sx-home-offer-card__price {
  font-size: var(--text-md, 14px);
  font-weight: 700;
  color: var(--md3-color-error, #ba1a1a);
}

.sx-home-offer-card__price small {
  font-size: var(--text-xs, 11px);
  font-weight: 500;
  color: var(--md3-color-on-surface-variant, #43474e);
}

.sx-home-offer-card__meta {
  font-size: var(--text-xs, 11px);
  color: var(--md3-color-on-surface-variant, #43474e);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* 求购列表 */
.sx-home-demand-stack {
  display: flex;
  flex-direction: column;
  gap: var(--sanxio-gap-sm, 8px);
}

.sx-home-demand-card {
  margin: 0;
}

.sx-home-demand-card__link {
  display: block;
  padding: var(--sanxio-gap-md, 12px);
  text-decoration: none;
  color: inherit;
  background: var(--md3-color-surface-container-low, #f3f5f9);
  border-radius: var(--md3-shape-sm, 8px);
  border: 1px solid var(--md3-color-outline-variant, #c3c6cf);
  transition: border-color 0.2s ease, background 0.2s ease;
}

.sx-home-demand-card__link:hover {
  border-color: var(--md3-color-primary, #005fb8);
  background: var(--md3-color-primary-container, #d0e8ff);
}

.sx-home-demand-card__badge {
  display: inline-block;
  margin-bottom: 4px;
  padding: 2px 8px;
  font-size: 10px;
  font-weight: 700;
  color: var(--md3-color-on-tertiary-container, #001f25);
  background: var(--md3-color-tertiary-container, #b8eaee);
  border-radius: var(--md3-shape-full, 9999px);
}

.sx-home-demand-card__title {
  display: block;
  font-size: var(--text-md, 14px);
  font-weight: 600;
  line-height: 1.4;
  color: var(--md3-color-on-surface, #1a1c1e);
  margin-bottom: 4px;
}

.sx-home-demand-card__intro {
  display: block;
  font-size: var(--text-sm, 12px);
  color: var(--md3-color-on-surface-variant, #43474e);
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 6px;
}

.sx-home-demand-card__foot {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: var(--text-xs, 11px);
  color: var(--md3-color-on-surface-variant, #43474e);
}

/* ======== sanxio Premium unified 大区块：浅底 + 组头圆角闭合蓝边 start =========== */
body.sanxio-home-premium-page .sanxio-home-section-card--unified-list,
body.sanxio-home-premium-page .sanxio-home-section-card--unified-carousel {
  background: var(--md3-color-surface-container-low, #f3f5f9) !important;
  border: none !important;
  border-radius: var(--md3-shape-md, 12px) !important;
  box-shadow: none !important;
  overflow: hidden !important;
  padding: 0 !important;
  --sx-home-rail-inset: var(--sanxio-gap-sm, 8px);
  --sx-home-head-rail-gap: var(--sanxio-gap-sm, 8px);
  --sx-home-head-rail-width: 4px;
  /* border 已占蓝条宽，组头内边距只留内容间隙 */
  --sx-home-head-title-pl: var(--sanxio-gap-md, 12px);
  --sx-home-rail-inline: var(--sanxio-card-px, var(--sanxio-block-px, 16px));
  --sx-home-rail-start: 0;
  --sx-home-rail-end: 0;
}

@media (max-width: 767px) {
  body.sanxio-home-premium-page .sanxio-home-section-card--unified-list,
  body.sanxio-home-premium-page .sanxio-home-section-card--unified-carousel {
    --sx-home-rail-inline: var(--sanxio-block-px, 12px);
  }
}

body.sanxio-home-premium-page .sanxio-home-section-card--unified-list .sanxio-home-section__head,
body.sanxio-home-premium-page .sanxio-home-section-card--unified-carousel .sanxio-home-section__head {
  margin-bottom: var(--sx-home-head-rail-gap, var(--sanxio-gap-sm, 8px)) !important;
  border-radius: var(--md3-shape-md, 12px) var(--md3-shape-md, 12px) 0 0 !important;
  border-style: solid !important;
  border-color: var(--md3-color-primary, #005fb8) !important;
  border-width: 1px var(--sx-home-head-rail-width, 4px) 0 !important;
  background-color: var(--md3-color-surface, #fff) !important;
  background-image: none !important;
  box-shadow: none !important;
  padding: 10px var(--sx-home-rail-inset, var(--sanxio-gap-sm, 8px)) 10px var(--sx-home-head-title-pl, 12px) !important;
  box-sizing: border-box;
}

body.sanxio-home-premium-page .sanxio-home-section-card--unified-list .sanxio-home-section__head-actions,
body.sanxio-home-premium-page .sanxio-home-section-card--unified-carousel .sanxio-home-section__head-actions {
  gap: var(--sanxio-gap-sm, 8px);
  max-width: 100%;
  box-sizing: border-box;
}

/* 标题行 ◀▶ 胶囊 + More：右内边距与组头一致（蓝条已由 border 承担） */
body.sanxio-home-premium-page .sanxio-home-section-card--unified-carousel .sanxio-home-section__head:has(.sanxio-home-section__nav) {
  padding-right: var(--sx-home-rail-inset, var(--sanxio-gap-sm, 8px)) !important;
}

body.sanxio-home-premium-page .sanxio-home-section-card--unified-carousel .sanxio-home-section__head-actions .sanxio-home-section__title-link {
  padding: 4px 0;
  margin-inline-end: 0;
}

body.sanxio-home-premium-page .sanxio-home-section-card--unified-list .sanxio-home-section__title-link,
body.sanxio-home-premium-page .sanxio-home-section-card--unified-carousel .sanxio-home-section__title-link {
  padding: 4px 0;
}

/* 组头 → 内容轨：左右与组头外缘对齐（0 inset） */
body.sanxio-home-premium-page .sanxio-home-section-card--unified-list .sx-home-company-grid,
body.sanxio-home-premium-page .sanxio-home-section-card--unified-carousel .sanxio-home-carousel-wrap,
body.sanxio-home-premium-page .sanxio-home-section-card--unified-carousel .sanxio-home-coupon-list-wrap {
  margin-top: 0 !important;
  padding: 0 var(--sx-home-rail-end, 0) var(--sanxio-gap-sm, 8px) var(--sx-home-rail-start, 0) !important;
  box-sizing: border-box;
}

body.sanxio-home-premium-page .sanxio-home-section-card--unified-carousel .sanxio-home-coupon-list {
  margin: 0 !important;
  padding: 0 !important;
}

body.sanxio-home-premium-page .sanxio-home-section-card--unified-carousel .sanxio-home-products-carousel__inner,
body.sanxio-home-premium-page .sanxio-home-section-card--unified-carousel .sanxio-home-coupon-list,
body.sanxio-home-premium-page .sanxio-home-section-card--unified-carousel .sanxio-home-coupon-list__track {
  margin: 0 !important;
  padding: 0 !important;
  min-height: 0;
}

body.sanxio-home-premium-page .sanxio-home-section-card--unified-list .sx-home-company-grid {
  display: flex !important;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: stretch;
  gap: var(--sanxio-gap-sm, 8px);
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x proximity;
  scrollbar-width: none;
  grid-template-columns: unset !important;
}

body.sanxio-home-premium-page .sanxio-home-section-card--unified-list .sx-home-company-grid::-webkit-scrollbar {
  display: none;
}

body.sanxio-home-premium-page .sanxio-home-section-card--unified-list .sx-home-company-card {
  flex: 0 0 auto;
  min-width: 0;
  width: min(100%, 280px);
  scroll-snap-align: start;
}

/* 仅一条时铺满内容轨，避免只占网格第一列留下大块空白 */
body.sanxio-home-premium-page .sanxio-home-section-card--unified-list .sx-home-company-card:first-child:last-child {
  flex: 1 1 100%;
  width: 100%;
  max-width: 100%;
}

body.sanxio-home-premium-page .sanxio-home-section-card--unified-list .sx-home-company-card__link {
  padding: var(--sanxio-gap-sm, 8px);
  gap: var(--sanxio-gap-sm, 8px);
  min-height: 56px;
  align-items: center;
  border: 1px solid var(--md3-color-outline-variant, #c3c6cf);
  border-radius: var(--md3-shape-sm, 8px);
  background: var(--md3-color-surface, #fff);
  box-shadow: none;
  transition: box-shadow 0.15s ease, background-color 0.15s ease;
}

body.sanxio-home-premium-page .sanxio-home-section-card--unified-list .sx-home-company-card__link:hover {
  box-shadow: var(--md3-elevation-1, 0 1px 4px rgba(0, 0, 0, 0.06));
  background: var(--md3-color-surface, #fff);
}

body.sanxio-home-premium-page .sanxio-home-section-card--unified-list .sx-home-company-card__logo-wrap {
  width: 48px;
  height: 48px;
  border: none;
  background: var(--md3-color-surface, #fff);
  box-shadow: inset 0 0 0 1px var(--md3-color-outline-variant, #c3c6cf);
}

body.sanxio-home-premium-page .sanxio-home-section-card--unified-list .sx-home-company-card__logo {
  object-fit: contain;
  padding: 4px;
  box-sizing: border-box;
}

body.sanxio-home-premium-page .sanxio-home-section-card--unified-list .sx-home-company-card__chev {
  font-size: 20px;
  color: var(--md3-color-on-surface-variant, #43474e);
  opacity: 0.72;
}

body.sanxio-home-premium-page .sanxio-home-section-card--unified-list .sx-home-company-card__link:hover .sx-home-company-card__chev {
  color: var(--md3-color-primary, #005fb8);
  opacity: 1;
}

/* 横向商品 tile（rail 内边距已统一到 .sx-home-unified-rail 选择器） */

/* ======== sanxio Premium unified 内层商品/券卡（保留小卡，无外层套卡）start =========== */
body.sanxio-home-premium-page .sanxio-home-section-card--unified-carousel .sanxio-home-product-card {
  background: var(--md3-color-surface, #fff) !important;
  border: 1px solid var(--md3-color-outline-variant, #c3c6cf) !important;
  box-shadow: none !important;
  border-radius: var(--md3-shape-sm, 8px);
  overflow: hidden;
  transition: box-shadow 0.15s ease, background-color 0.15s ease;
}

body.sanxio-home-premium-page .sanxio-home-section-card--unified-carousel .sanxio-home-product-card__link {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 100%;
}

body.sanxio-home-premium-page .sanxio-home-section-card--unified-carousel .sanxio-home-product-card__img-wrap {
  background: var(--md3-color-surface-container, #e9ecf1);
  box-shadow: none;
  border-radius: 0;
}

body.sanxio-home-premium-page .sanxio-home-section-card--unified-carousel .sanxio-home-product-card__title {
  padding: 8px 10px 0;
}

body.sanxio-home-premium-page .sanxio-home-section-card--unified-carousel .sanxio-home-product-card__meta {
  padding: 6px 10px 8px;
}

body.sanxio-home-premium-page .sanxio-home-section-card--unified-carousel .sanxio-home-product-card:hover {
  box-shadow: var(--md3-elevation-1, 0 1px 4px rgba(0, 0, 0, 0.06)) !important;
}

body.sanxio-home-premium-page .sanxio-home-section-card--unified-carousel.sanxio-home-coupon-card .sanxio-home-coupon-item {
  background: var(--md3-color-surface, #fff);
  border: 1px solid var(--md3-color-outline-variant, #c3c6cf);
  border-left: 4px solid var(--md3-color-primary, #005fb8);
  border-radius: var(--md3-shape-sm, 8px);
  box-shadow: none;
}

body.sanxio-home-premium-page .sanxio-home-section-card--unified-carousel.sanxio-home-coupon-card .sanxio-home-coupon-item:hover {
  box-shadow: var(--md3-elevation-1, 0 1px 4px rgba(0, 0, 0, 0.06));
  border-color: var(--md3-color-primary, #005fb8);
}

body.sanxio-home-premium-page .sanxio-home-section-card--unified-carousel.sanxio-home-coupon-card .sanxio-home-coupon-item.is-got {
  border-left-color: var(--md3-color-outline, #74777f);
  opacity: 0.88;
}

body.sanxio-home-premium-page .sanxio-home-section-card--unified-carousel .sanxio-home-product-card:active,
body.sanxio-home-premium-page .sanxio-home-section-card--unified-carousel .sanxio-home-product-card:focus-within {
  background: var(--md3-color-surface-container-low, #f3f5f9) !important;
}
/* ======== sanxio Premium unified 内层商品/券卡 end =========== */

/* 明星企业 */
.sx-home-company-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sanxio-gap-sm, 8px);
}

@media (min-width: 600px) {
  .sx-home-company-grid:not(.sx-home-company-grid--home-rail) {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 992px) {
  .sx-home-company-grid:not(.sx-home-company-grid--home-rail) {
    grid-template-columns: repeat(3, 1fr);
  }
}

.sx-home-company-card__link {
  display: flex;
  align-items: center;
  gap: var(--sanxio-gap-md, 12px);
  padding: var(--sanxio-gap-md, 12px);
  text-decoration: none;
  color: inherit;
  background: var(--md3-color-surface, #fff);
  border: 1px solid var(--md3-color-outline-variant, #c3c6cf);
  border-radius: var(--md3-shape-sm, 8px);
  transition: box-shadow 0.2s ease;
}

.sx-home-company-card__link:hover {
  box-shadow: var(--md3-elevation-1, 0 1px 4px rgba(0, 0, 0, 0.06));
}

.sx-home-company-card__logo-wrap {
  flex-shrink: 0;
  width: 56px;
  height: 56px;
  border-radius: var(--md3-shape-sm, 8px);
  overflow: hidden;
  border: 1px solid var(--md3-color-outline-variant, #c3c6cf);
  background: var(--md3-color-surface-container-low, #f3f5f9);
}

.sx-home-company-card__logo {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.sx-home-company-card__body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.sx-home-company-card__name {
  font-size: var(--text-md, 14px);
  font-weight: 600;
  color: var(--md3-color-on-surface, #1a1c1e);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sx-home-company-card__vip {
  display: inline-block;
  margin-right: 4px;
  padding: 0 4px;
  font-size: 10px;
  font-weight: 700;
  color: var(--md3-color-on-primary, #fff);
  background: linear-gradient(135deg, #c9a227, #e8c547);
  border-radius: 4px;
  vertical-align: middle;
}

.sx-home-company-card__biz,
.sx-home-company-card__area {
  font-size: var(--text-xs, 11px);
  color: var(--md3-color-on-surface-variant, #43474e);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sx-home-company-card__chev {
  flex-shrink: 0;
  color: var(--md3-color-outline, #747775);
}

/* ======== sanxio 首页高端实用版 end =========== */
