/**

 * ======= sanxio store-front home blocks start ===========

 * 与主站 unified 区块同款：依赖 home-sections.css + home-premium.css（body.sanxio-home-premium-page）

 */

body.sx-store-advanced--home .sca-viewport {

  padding-top: var(--sanxio-gap-sm, 8px);

}

@media (max-width: 767px) {
  body.sx-store-advanced--home .sca-viewport {
    padding-top: 6px;
  }
  body.sx-store-advanced--home .sca-home,
  body.sx-store-advanced--home .sca-feed {
    gap: 10px;
  }
}

body.sx-store-advanced--home .sca-home {

  display: flex;

  flex-direction: column;

  gap: var(--sanxio-gap-md, 16px);

  min-width: 0;

  width: 100%;

  max-width: 100%;

  box-sizing: border-box;

}

body.sx-store-advanced--home .sca-feed {

  display: flex;

  flex-direction: column;

  gap: var(--sanxio-gap-md, 16px);

  width: 100%;

  max-width: 100%;

  box-sizing: border-box;

  margin: 0;

  padding: 0;

}



body.sx-store-advanced--home .sca-block:not(.sanxio-home-section-card--unified-list):not(.sanxio-home-section-card--unified-carousel) {
  width: 100%;
  max-width: 100%;
  margin-inline: 0;
  box-sizing: border-box;
  background: var(--md3-color-surface);
  border-radius: var(--md3-shape-lg, 16px);
  border: 1px solid var(--md3-color-outline-variant);
  overflow: hidden;
  box-shadow: 0 1px 4px color-mix(in srgb, var(--md3-color-on-surface) 4%, transparent);
}



body.sx-store-advanced--home .sca-block:not(.sanxio-home-section-card--unified-list):not(.sanxio-home-section-card--unified-carousel) .sca-block__head {

  display: flex;

  align-items: center;

  justify-content: space-between;

  gap: var(--sanxio-gap-md);

  padding: var(--sanxio-gap-md) var(--sanxio-card-px);

  border-bottom: none;

  background: var(--md3-color-surface-container-low);

}



/* unified 组头由 home-premium 绘制顶线/竖条；勿用旧 sca 头底与胶囊「更多」 */

body.sx-store-advanced--home .sca-block.sanxio-home-section-card--unified-list .sca-block__head,

body.sx-store-advanced--home .sca-block.sanxio-home-section-card--unified-carousel .sca-block__head {

  margin-bottom: 0;

}



body.sx-store-advanced--home .sanxio-home-section-card--unified-list .sca-block__more,

body.sx-store-advanced--home .sanxio-home-section-card--unified-carousel .sca-block__more {

  display: none;

}



body.sx-store-advanced--home .sca-block__title {

  margin: 0;

  font-size: 17px;

  font-weight: 700;

  letter-spacing: -0.02em;

  line-height: 1.3;

}



body.sx-store-advanced--home .sanxio-home-section-card--unified-list .sca-block__title,

body.sx-store-advanced--home .sanxio-home-section-card--unified-carousel .sca-block__title {

  font-size: var(--text-lg, 16px);

  font-weight: 700;

  letter-spacing: 0;

}



body.sx-store-advanced--home .sca-block__more {

  flex-shrink: 0;

  font-size: 13px;

  font-weight: 600;

  color: var(--md3-color-primary);

  text-decoration: none;

  white-space: nowrap;

  padding: 6px 12px;

  border-radius: 999px;

  background: color-mix(in srgb, var(--md3-color-primary) 10%, transparent);

  transition: background 0.2s ease, color 0.2s ease;

}

body.sx-store-advanced--home .sca-block__more:hover {

  background: color-mix(in srgb, var(--md3-color-primary) 16%, transparent);

}



/* unified 内容轨：与主站组头下缘对齐 */

body.sx-store-advanced--home .sca-block.sanxio-home-section-card--unified-list .sca-block__body,

body.sx-store-advanced--home .sca-block.sanxio-home-section-card--unified-carousel .sca-block__body {

  padding: 0 var(--sx-home-rail-end, 0) var(--sanxio-gap-sm, 8px) var(--sx-home-rail-start, 0);

  margin-top: 0;

  box-sizing: border-box;

}



body.sx-store-advanced--home .sca-block--story.sanxio-home-section-card--unified-list .sca-block__body {

  padding: var(--sanxio-gap-sm, 8px) var(--sanxio-card-px, 12px) var(--sanxio-gap-sm, 8px);

}



body.sx-store-advanced--home .sanxio-home-section-card--unified-list .sca-list,

body.sx-store-advanced--home .sanxio-home-section-card--unified-list .sca-block__grid {

  padding-left: 0;

  padding-right: 0;

  box-sizing: border-box;

}



body.sx-store-advanced--home .sanxio-home-section-card--unified-list .sca-rail-scroll {

  padding-left: 0;

  padding-right: 0;

  margin-left: 0;

  margin-right: 0;

}



body.sx-store-advanced--home .sca-block:not(.sanxio-home-section-card--unified-list):not(.sanxio-home-section-card--unified-carousel) .sca-block__body {

  padding: var(--sanxio-card-py) var(--sanxio-card-px);

}



body.sx-store-advanced--home .sca-block--products .sca-block__empty {

  padding: var(--sanxio-content-gap) var(--sanxio-card-px);

}



body.sx-store-advanced--home .sca-rail-scroll {

  display: flex;

  gap: var(--sanxio-gap-sm);

  overflow-x: auto;

  scroll-snap-type: x mandatory;

  padding-bottom: 4px;

  margin: 0 calc(-1 * var(--sanxio-gap-sm));

  padding-left: var(--sanxio-gap-sm);

  padding-right: var(--sanxio-gap-sm);

  -webkit-overflow-scrolling: touch;

}

body.sx-store-advanced--home .sca-rail-scroll .sca-card {

  flex: 0 0 min(72vw, 220px);

  scroll-snap-align: start;

}

@media (min-width: 768px) {

  body.sx-store-advanced--home .sca-block__grid {

    display: grid;

    grid-template-columns: repeat(2, 1fr);

    gap: var(--sanxio-gap-md);

  }

  body.sx-store-advanced--home .sca-block--story .sca-block__body {

    padding: var(--sanxio-content-gap) var(--sanxio-card-px);

  }

}

@media (min-width: 1024px) {

  body.sx-store-advanced--home .sca-block__grid {

    grid-template-columns: repeat(4, 1fr);

  }

}

body.sx-store-advanced--home .sca-story {

  display: flex;

  flex-direction: row;

  align-items: center;

  gap: 12px;

}

@media (min-width: 768px) {

  body.sx-store-advanced--home .sca-story {

    grid-template-columns: none;

    align-items: center;

    gap: 14px;

  }

}

body.sx-store-advanced--home .sca-story__media {

  flex: 0 0 72px;

  width: 72px;

  height: 72px;

  border-radius: var(--md3-shape-sm, 8px);

  overflow: hidden;

  border: none;

  background: var(--md3-color-surface-container-high, #e8eaed);

  display: block;

  text-decoration: none;

}

body.sx-store-advanced--home .sca-story__media img {

  width: 100%;

  height: 100%;

  border-radius: 0;

  object-fit: cover;

  aspect-ratio: auto;

  max-height: none;

  display: block;

}

@media (min-width: 768px) {

  body.sx-store-advanced--home .sca-story__media {

    flex-basis: 88px;

    width: 88px;

    height: 88px;

  }

  body.sx-store-advanced--home .sca-story__media img {

    aspect-ratio: auto;

    min-height: 0;

  }

}

body.sx-store-advanced--home .sca-story__copy {

  flex: 1 1 auto;

  min-width: 0;

  display: flex;

  flex-direction: column;

  align-items: flex-start;

  gap: 6px;

}

body.sx-store-advanced--home .sca-story__intro {

  margin: 0;

  color: var(--md3-color-on-surface-variant);

  font-size: 13px;

  line-height: 1.4;

  display: -webkit-box;

  -webkit-line-clamp: 2;

  -webkit-box-orient: vertical;

  overflow: hidden;

}

body.sx-store-advanced--home .sca-story__intro--name {

  color: var(--md3-color-on-surface);

  font-weight: 600;

}

body.sx-store-advanced--home .sca-story__link {

  display: inline-flex;

  align-items: center;

  gap: 2px;

  font-size: 13px;

  font-weight: 650;

  color: var(--md3-color-primary);

  text-decoration: none;

}

body.sx-store-advanced--home .sca-story__link .material-symbols-outlined {

  font-size: 16px;

  line-height: 1;

}

body.sx-store-advanced--home .sca-story__copy .md3-btn {

  display: none;

}

/* 无商品时首页快捷入口 */
body.sx-store-advanced--home .sca-home-quick {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 0;
  padding: 0;
}
body.sx-store-advanced--home .sca-home-quick__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 64px;
  padding: 10px 8px;
  border-radius: var(--md3-shape-md, 12px);
  background: var(--md3-color-surface, #fff);
  color: var(--md3-color-on-surface, #1a1c1e);
  text-decoration: none;
  box-shadow: none;
  transition: background 0.15s ease;
}
body.sx-store-advanced--home .sca-home-quick__item:active {
  background: color-mix(in srgb, var(--md3-color-primary) 8%, var(--md3-color-surface));
}
body.sx-store-advanced--home .sca-home-quick__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: color-mix(in srgb, var(--md3-color-primary, #005fb8) 12%, transparent);
  color: var(--md3-color-primary, #005fb8);
}
body.sx-store-advanced--home .sca-home-quick__icon .material-symbols-outlined {
  font-size: 18px;
}
body.sx-store-advanced--home .sca-home-quick__label {
  font-size: 12px;
  font-weight: 650;
  line-height: 1.2;
  text-align: center;
}

body.sx-store-advanced--home .sca-block__empty {

  display: flex;

  flex-direction: column;

  align-items: center;

  justify-content: center;

  gap: var(--sanxio-gap-sm);

  padding: var(--sanxio-content-gap) var(--sanxio-card-px);

  text-align: center;

  color: var(--md3-color-on-surface-variant);

  font-size: 14px;

}

body.sx-store-advanced--home .sca-block__empty .material-symbols-outlined {

  font-size: 36px;

  opacity: 0.55;

}

body.sx-store-advanced--home .sca-block__empty p {

  margin: 0;

}

body.sx-store-advanced--home .sca-feed-empty {
  width: 100%;
  max-width: 100%;
  margin: 0;
  text-align: center;
  padding: var(--sanxio-card-py, 20px) var(--sanxio-card-px, 20px);
  background: var(--md3-color-surface, #fff);
  border-radius: var(--md3-shape-md, 12px);
  border: 1px solid var(--md3-color-outline-variant);
  box-shadow: none;
  box-sizing: border-box;
}
body.sx-store-advanced--home .sca-feed-empty__icon,
body.sx-store-advanced--home .sca-feed-empty .material-symbols-outlined {
  font-size: 28px;
  color: var(--md3-color-on-surface-variant, #43474e);
  margin-bottom: 2px;
}
body.sx-store-advanced--home .sca-feed-empty__title,
body.sx-store-advanced--home .sca-feed-empty > p:first-of-type {
  margin: 0;
  font-size: 14px;
  font-weight: 650;
  color: var(--md3-color-on-surface, #1a1c1e);
}
body.sx-store-advanced--home .sca-feed-empty__hint {
  margin: 4px 0 0;
  font-size: 12px;
  line-height: 1.35;
  color: var(--md3-color-on-surface-variant, #43474e);
}
body.sx-store-advanced--home .sca-feed-empty__actions {
  display: flex;
  justify-content: center;
  margin: 10px 0 0;
  padding: 0;
}
body.sx-store-advanced--home .sca-feed-empty__actions .md3-btn {
  min-height: 36px;
  min-width: 120px;
}

/**

 * ======= sanxio store-front home blocks end ===========

 */

