/* ===== 首页专属样式 ===== */

/* Hero */
.hero-section {
  position: relative; overflow: hidden;
  background: linear-gradient(135deg, #FFF8F2 0%, #FFE8D6 40%, #FFD4B8 100%);
  padding: 60px 20px 50px; text-align: center;
}
.hero-bg {
  position: absolute; inset: 0; opacity: 0.06;
  background: radial-gradient(circle at 20% 50%, var(--color-primary) 0%, transparent 60%),
              radial-gradient(circle at 80% 30%, var(--color-accent) 0%, transparent 50%);
}
.hero-content { position: relative; z-index: 1; max-width: 680px; margin: 0 auto; }
.hero-title { font-size: 36px; font-weight: 700; color: var(--color-text); margin-bottom: 12px; letter-spacing: -0.5px; }
.hero-title .highlight { color: var(--color-primary); position: relative; }
.hero-title .highlight::after { content: ''; position: absolute; bottom: 2px; left: 0; right: 0; height: 8px; background: rgba(232,117,50,0.2); border-radius: 4px; z-index: -1; }
.hero-desc { font-size: 16px; color: var(--color-text-light); margin-bottom: 28px; }
.hero-search { display: flex; max-width: 480px; margin: 0 auto; box-shadow: var(--shadow-lg); border-radius: var(--radius-xl); overflow: hidden; }
.search-input { flex: 1; padding: 14px 20px; border: none; font-size: 15px; outline: none; }
.search-btn { padding: 14px 28px; background: var(--color-primary); color: #fff; font-size: 15px; font-weight: 600; white-space: nowrap; }
.search-btn:hover { background: var(--color-primary-dark); }

/* 服务入口网格 */
.service-grid {
  max-width: var(--max-width); margin: -30px auto 0; padding: 0 20px;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px;
  position: relative; z-index: 2;
}
.service-card {
  background: var(--color-surface); border-radius: var(--radius-lg);
  padding: 28px 24px; text-align: center;
  box-shadow: var(--shadow-sm); transition: all 0.3s ease;
  border: 1px solid transparent;
  text-decoration: none; color: inherit; display: block;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
.service-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: var(--color-border); }
.card-icon { font-size: 40px; margin-bottom: 12px; }
.service-card h3 { font-size: 17px; font-weight: 700; margin-bottom: 6px; }
.service-card p { font-size: 13px; color: var(--color-text-light); }
.card-mall:hover { border-color: #E87532; }
.card-housekeeping:hover { border-color: #2D5F5D; }
.card-secondhand:hover { border-color: #27AE60; }
.card-video:hover { border-color: #8E44AD; }
.card-errand:hover { border-color: #F39C12; }
.card-ride:hover { border-color: #2980B9; }

/* 热门推荐 */
.hot-section { max-width: var(--max-width); margin: 48px auto 0; padding: 0 20px; }
.section-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.section-header h2 { font-size: 22px; font-weight: 700; }
.more-link { font-size: 14px; color: var(--color-primary); font-weight: 500; }
.more-link:hover { text-decoration: underline; }
.hot-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.hot-card {
  background: var(--color-surface); border-radius: var(--radius-md);
  overflow: hidden; box-shadow: var(--shadow-sm); transition: all 0.3s;
}
.hot-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.hot-img { height: 160px; }
.hot-img.placeholder {
  background: linear-gradient(135deg, var(--color-bg), var(--color-border));
  display: flex; align-items: center; justify-content: center; font-size: 36px;
}
.hot-info { padding: 14px; }
.hot-info h4 { font-size: 14px; font-weight: 600; margin-bottom: 4px; }
.hot-price { font-size: 16px; font-weight: 700; color: var(--color-primary); }

/* 移动端下拉菜单 */
.mobile-dropdown-wrapper { position: relative; display: inline-block; }
.mobile-dropdown-menu {
  display: none;
  position: absolute; top: 100%; right: 0; margin-top: 6px;
  background: var(--color-surface); border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg); min-width: 140px; overflow: hidden; z-index: 100;
}
.mobile-dropdown-wrapper:hover .mobile-dropdown-menu,
.mobile-dropdown-menu:hover { display: block; }
.mobile-dropdown-menu .dropdown-item {
  display: block; padding: 10px 16px; font-size: 14px;
  transition: background 0.15s; cursor: pointer;
}
.mobile-dropdown-menu .dropdown-item:hover {
  background: var(--color-primary-light); color: var(--color-primary);
}

/* 二维码弹窗 */
.qr-modal-box { width: 380px; }
.qr-modal-box .modal-body { padding: 20px 24px 24px; }

/* 响应式 */
@media (max-width: 900px) {
  .service-grid { grid-template-columns: repeat(2, 1fr); }
  .hot-grid { grid-template-columns: repeat(2, 1fr); }
  .hero-title { font-size: 26px; }
  .hero-section { padding: 40px 16px 32px; }
  .hero-desc { font-size: 14px; }
  .hero-search { max-width: 100%; }
  .search-input { padding: 12px 14px; font-size: 14px; }
  .search-btn { padding: 12px 20px; font-size: 14px; }
}
@media (max-width: 520px) {
  .service-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; padding: 0 12px; }
  .hot-grid { grid-template-columns: 1fr 1fr; }
  .hero-title { font-size: 22px; }
  .hero-section { padding: 32px 12px 24px; }
  .hero-desc { font-size: 13px; }
  .service-card { padding: 18px 12px; min-height: 120px; display: flex; flex-direction: column; align-items: center; justify-content: center; }
  .card-icon { font-size: 32px; margin-bottom: 8px; }
  .service-card h3 { font-size: 15px; }
  .service-card p { font-size: 12px; line-height: 1.4; }
  .hot-img { height: 120px; }
  .hot-info { padding: 10px; }
  .hot-info h4 { font-size: 13px; }
  .hot-price { font-size: 14px; }
  .category-nav-section { padding: 0 12px !important; }
  .section-header h2 { font-size: 18px; }
  .section-header { margin-bottom: 12px; }
}

/* ===== 触摸点击区域优化（移动端） ===== */
@media (max-width: 768px) {
  /* 所有可点击元素最小触摸区域 44px，避免误触 */
  .service-card,
  .dropdown-item,
  .top-nav .nav-item,
  .btn,
  .more-link,
  .footer-col a {
    min-height: 44px;
    display: flex;
    align-items: center;
  }
  .service-card { flex-direction: column; justify-content: center; }
  .dropdown-item { padding: 12px 16px; }
  .btn { padding: 10px 16px; }
  .more-link { display: inline-flex; }
  .footer-col a { display: flex; }

  /* 移除点击高亮闪烁 */
  a, button { -webkit-tap-highlight-color: transparent; }

  /* 图片自适应 */
  img { max-width: 100%; height: auto; }

  /* 禁止横向滚动（双保险） */
  html, body { overflow-x: hidden; max-width: 100%; }
  #main-content, #main-header, #main-footer { overflow-x: hidden; }
}

@media (max-width: 480px) {
  .service-grid { gap: 8px; padding: 0 10px; }
  .service-card { min-height: 110px; padding: 14px 8px; }
  .card-icon { font-size: 28px; }
  .service-card h3 { font-size: 14px; }
  .service-card p { font-size: 11px; }
}
