/* shop_c - 首页专有样式 */

/* 轮播图与分类侧栏区域 */
.home-hero-section {
  position: relative;
  margin-bottom: 30px;
}

.hero-container {
  display: flex;
  height: 420px;
  background-color: #ffffff;
  border-radius: 0 0 12px 12px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
}

/* 左侧分类侧导航 */
.hero-category-sidebar {
  width: 220px;
  background-color: #0f172a;
  color: #cbd5e1;
  position: relative;
  z-index: 30;
  flex-shrink: 0;
}

.cat-menu-item {
  padding: 13px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 14px;
  cursor: pointer;
  border-left: 3px solid transparent;
  transition: all 0.2s ease;
}

.cat-menu-item:hover, .cat-menu-item.active {
  background-color: #1e293b;
  color: #ffffff;
  border-left-color: var(--primary);
}

.cat-menu-item .cat-icon {
  width: 24px;
  text-align: center;
  margin-right: 8px;
  color: var(--primary);
}

.cat-menu-item .arrow-icon {
  font-size: 12px;
  color: #64748b;
}

/* 分类二级悬浮展开面板 */
.category-sub-panel {
  position: absolute;
  top: 0;
  left: 220px;
  width: 680px;
  min-height: 420px;
  background: #ffffff;
  box-shadow: 10px 10px 30px rgba(0, 0, 0, 0.12);
  border: 1px solid #e2e8f0;
  border-left: none;
  padding: 24px;
  z-index: 50;
  display: none;
}

.cat-menu-item:hover .category-sub-panel {
  display: block;
}

.sub-cat-group {
  margin-bottom: 20px;
}

.sub-cat-title {
  font-size: 14px;
  font-weight: 700;
  color: #0f172a;
  border-bottom: 1px solid #f1f5f9;
  padding-bottom: 6px;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.sub-cat-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.sub-cat-links a {
  font-size: 13px;
  color: #64748b;
  padding: 2px 8px;
  border-radius: 4px;
  background: #f8fafc;
}

.sub-cat-links a:hover {
  background: #fef3c7;
  color: var(--primary-hover);
}

/* 主轮播图 Carousel */
.hero-slider-box {
  flex-grow: 1;
  position: relative;
  overflow: hidden;
  background-color: #1e293b;
}

.slider-wrapper {
  display: flex;
  width: 100%;
  height: 100%;
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.slider-item {
  min-width: 100%;
  height: 100%;
  position: relative;
}

.slider-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.slider-content {
  position: absolute;
  bottom: 40px;
  left: 40px;
  color: white;
  z-index: 10;
  max-width: 500px;
  text-shadow: 0 2px 8px rgba(0,0,0,0.6);
}

.slider-tag {
  display: inline-block;
  background-color: var(--primary);
  color: white;
  font-size: 12px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 4px;
  margin-bottom: 10px;
}

.slider-title {
  font-size: 32px;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 8px;
}

.slider-desc {
  font-size: 14px;
  opacity: 0.9;
  margin-bottom: 16px;
}

/* 轮播图指示器与左右箭头 */
.slider-dots {
  position: absolute;
  bottom: 16px;
  right: 24px;
  display: flex;
  gap: 8px;
  z-index: 20;
}

.dot-btn {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  transition: all 0.3s;
}

.dot-btn.active {
  width: 24px;
  border-radius: 6px;
  background-color: var(--primary);
}

.slider-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  background-color: rgba(15, 23, 42, 0.5);
  color: white;
  border: none;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 20;
  transition: background-color 0.2s;
}

.slider-arrow:hover {
  background-color: var(--primary);
}

.slider-prev { left: 16px; }
.slider-next { right: 16px; }

/* 右侧侧边资讯与服务 */
.hero-news-sidebar {
  width: 240px;
  background-color: #ffffff;
  border-left: 1px solid #f1f5f9;
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.user-welcome-card {
  text-align: center;
  padding-bottom: 16px;
  border-bottom: 1px solid #f1f5f9;
}

.user-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  margin: 0 auto 10px;
  border: 2px solid var(--primary);
  object-fit: cover;
}

.user-quick-btns {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}

.user-quick-btns a {
  flex: 1;
  padding: 6px 0;
  font-size: 12px;
  font-weight: 600;
  border-radius: 4px;
  text-align: center;
}

.btn-login-small {
  background-color: var(--primary);
  color: white;
}

.btn-reg-small {
  background-color: #f1f5f9;
  color: #334155;
}

.news-box h4 {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.news-list li {
  font-size: 13px;
  margin-bottom: 8px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.news-list li a {
  color: #475569;
}

.news-list li a:hover {
  color: var(--primary);
}

/* 限时秒杀专区 */
.flash-sale-section {
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
  border-radius: 12px;
  padding: 24px;
  color: white;
  margin-bottom: 36px;
}

.flash-sale-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.flash-title {
  display: flex;
  align-items: center;
  gap: 12px;
}

.flash-title h3 {
  font-size: 22px;
  font-weight: 800;
  color: var(--primary);
}

.countdown-box {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: #cbd5e1;
}

.time-num {
  background-color: #e11d48;
  color: white;
  font-weight: 800;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 14px;
}

/* 楼层分类 Block */
.floor-section {
  margin-bottom: 40px;
}

.floor-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 12px;
  border-bottom: 2px solid #e2e8f0;
  margin-bottom: 20px;
}

.floor-title-box {
  display: flex;
  align-items: center;
  gap: 12px;
}

.floor-tag {
  background-color: var(--primary);
  color: white;
  font-weight: 800;
  font-size: 14px;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
}

.floor-title {
  font-size: 22px;
  font-weight: 800;
  color: #0f172a;
}

.floor-nav-tabs {
  display: flex;
  gap: 16px;
}

.floor-tab-btn {
  font-size: 14px;
  font-weight: 600;
  color: #64748b;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 4px;
  transition: all 0.2s;
}

.floor-tab-btn:hover, .floor-tab-btn.active {
  color: var(--primary);
  background-color: #fef3c7;
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
