/*
 * Mall 首页 Figma 布局（node 35:133）
 * 仅 home/index/index.blade.php 引入
 */
:root {
  --mall-primary: #327FDB;
  --mall-topbar: #062D54;
  --mall-hotline: #FDC429;
  --mall-price: #FF3C00;
  --mall-text-muted: #999;
  --mall-content-width: 1200px;
}

/* ============ 首页 main 顶距：对齐 nav-cate-title 底边 y=169（Figma 37:328 h=38 → banner/左栏自 y=171 起） ============ */
.mall-index-main {
  padding-top: calc(2.125rem + 6.0625rem + 38px);
}

/* ============ Hero（全宽 banner + 左分类，见 index-aside.css） ============ */
.index-hero-wrap {
  margin-bottom: 0;
}

/* ============ 服务承诺条（Figma 37:526） ============ */
.index-service-bar {
  position: relative;
  z-index: 1;
  background: linear-gradient(180deg, #EBF4FF 0%, #FFFFFF 100%);
  margin-bottom: 0.5rem;
}

.index-service-bar .layui-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 4.875rem;
  padding-top: 0.5625rem;
  padding-bottom: 0.5625rem;
}

.index-service-bar .service-item {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  min-height: 3.75rem;
  padding: 0.375rem 1rem;
  border-radius: 7px;
  box-sizing: border-box;
  cursor: default;
  transition: background 0.2s ease, color 0.2s ease;
}

.index-service-bar .service-item:hover {
  background: linear-gradient(90deg, #639EF7 0%, #327FDB 100%);
}

.index-service-bar .service-item:hover .service-text {
  color: #FFFFFF;
}

.index-service-bar .service-item:hover .service-icon {
  filter: brightness(0) invert(1);
}

.index-service-bar .service-item:hover::before,
.index-service-bar .service-item:hover + .service-item::before {
  opacity: 0;
}

.index-service-bar .service-item + .service-item::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 1px;
  height: 3.75rem;
  background-color: #DAE5F2;
  transition: opacity 0.2s ease;
}

.index-service-bar .service-icon-wrap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  margin-right: 1.0625rem;
  flex-shrink: 0;
}

.index-service-bar .service-icon {
  width: 3rem;
  height: 3rem;
  display: block;
  flex-shrink: 0;
  transition: filter 0.2s ease;
}

.index-service-bar .service-text {
  font-size: 1.125rem;
  font-weight: bold;
  color: var(--mall-primary);
  line-height: 1.125rem;
  white-space: nowrap;
  transition: color 0.2s ease;
}

/* ============ 商品楼层 v2 ============ */
.mall-index-main .floor-v2 {
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
}

.mall-index-main .floor-v2 .floor-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid #AFC9E8;
}

.mall-index-main .floor-v2 .floor-head-left {
  display: flex;
  align-items: center;
}

.mall-index-main .floor-v2 .floor-badge {
  width: 1.9375rem;
  height: 1.6875rem;
  margin-right: 0.5rem;
  flex-shrink: 0;
}

.mall-index-main .floor-v2 .floor-title {
  margin: 0;
  font-size: 1.375rem;
  font-weight: 900;
  color: var(--mall-primary);
  line-height: 1.2;
}

.mall-index-main .floor-v2 .floor-more {
  display: inline-flex;
  align-items: center;
  font-size: 0.875rem;
  color: #A3A3A3;
  text-decoration: none;
}

.mall-index-main .floor-v2 .floor-more:hover {
  color: var(--mall-primary);
}

.mall-index-main .floor-v2 .floor-more-icon {
  width: 0.9375rem;
  height: 0.9375rem;
  margin-left: 0.25rem;
}

.mall-index-main .floor-v2 .floor-body {
  display: flex;
  align-items: stretch;
  gap: 1.25rem;
}

.mall-index-main .floor-v2 .floor-promo {
  flex-shrink: 0;
  width: 17.875rem;
  display: block;
  overflow: hidden;
  border-radius: 0.25rem;
}

.mall-index-main .floor-v2 .floor-promo img {
  width: 100%;
  height: 100%;
  min-height: 35.25rem;
  object-fit: cover;
  display: block;
}

.mall-index-main .floor-v2 .products-list {
  flex: 1;
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
  align-items: start;
}

.mall-index-main .floor-v2 .products-list .products-item {
  width: 100%;
  background-color: #fff;
  border-radius: 0.25rem;
  overflow: hidden;
  box-sizing: border-box;
  padding-bottom: 0.75rem;
  margin-right: 0;
  margin-top: 0;
}

.mall-index-main .floor-v2 .products-item .item-img {
  width: 100%;
  height: 0;
  position: relative;
  padding-bottom: 72%;
  background-color: #fff;
}

.mall-index-main .floor-v2 .products-item .item-img img {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  object-fit: contain;
}

.mall-index-main .floor-v2 .products-item .item-title {
  padding: 0.75rem 0.75rem 0.375rem;
  font-size: 1rem;
  line-height: 1.25rem;
  color: #000;
}

.mall-index-main .floor-v2 .products-item .item-title span {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.5rem;
}

.mall-index-main .floor-v2 .products-item .item-info {
  padding: 0 0.75rem;
}

.mall-index-main .floor-v2 .products-item .item-info .price {
  margin: 0;
  font-size: 1.25rem;
  font-weight: bold;
  color: var(--mall-price);
  line-height: 1.2;
}

.mall-index-main .floor-v2 .products-item .item-info .price .symbol {
  font-size: 1rem;
}

@media screen and (max-width: 1400px) {
  .mall-index-main .floor-v2 .floor-promo {
    width: 14rem;
  }

  .mall-index-main .floor-v2 .floor-promo img {
    min-height: 28rem;
  }
}
