/* ========================================
   两粒米团餐 - 全局样式文件
   ======================================== */

/* CSS Variables */
:root {
  /* 主色调 */
  --primary: #FF7D29;
  --primary-light: #FF9F5C;
  --primary-dark: #E56A1A;
  
  /* 辅助色 */
  --secondary: #165DFF;
  --secondary-light: #4B8BFF;
  --accent: #36D399;
  
  /* 中性色 */
  --white: #FFFFFF;
  --gray-light: #F5F7FA;
  --gray: #E5E7EB;
  --gray-dark: #666666;
  --text-dark: #333333;
  --text-black: #1A1A1A;
  
  /* 阴影 */
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.08);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.1);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.12);
  
  /* 圆角 */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
}

/* Reset & Base */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-dark);
  background-color: var(--white);
}

a {
  text-decoration: none;
  color: inherit;
  transition: color 0.3s ease;
}

a:hover {
  color: var(--primary);
}

ul, ol {
  list-style: none;
}

img {
  max-width: 100%;
  height: auto;
}

button {
  cursor: pointer;
  border: none;
  outline: none;
  font-family: inherit;
}

/* ========================================
   布局容器
   ======================================== */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.section {
  padding: 80px 0;
}

.section-title {
  text-align: center;
  margin-bottom: 50px;
}

.section-title h2 {
  font-size: 36px;
  font-weight: 700;
  color: var(--text-black);
  margin-bottom: 16px;
}

.section-title p {
  font-size: 18px;
  color: var(--gray-dark);
}

/* ========================================
   头部导航
   ======================================== */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: var(--white);
  box-shadow: var(--shadow-sm);
  z-index: 1000;
  transition: all 0.3s ease;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo-img {
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-size: 20px;
  font-weight: bold;
}

.logo-text {
  font-size: 22px;
  font-weight: 700;
  color: var(--text-black);
}

.logo-text span {
  color: var(--primary);
}

.nav {
  display: flex;
  align-items: center;
  gap: 40px;
}

.nav-link {
  font-size: 16px;
  font-weight: 500;
  color: var(--text-dark);
  padding: 8px 0;
  position: relative;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary);
  transition: width 0.3s ease;
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

.nav-link:hover,
.nav-link.active {
  color: var(--primary);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 24px;
  border-radius: var(--radius-md);
  font-size: 15px;
  font-weight: 600;
  transition: all 0.3s ease;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: var(--white);
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(255,125,41,0.4);
  color: var(--white);
}

.btn-secondary {
  background: var(--secondary);
  color: var(--white);
}

.btn-secondary:hover {
  background: var(--secondary-light);
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(22,93,255,0.4);
  color: var(--white);
}

.btn-outline {
  border: 2px solid var(--primary);
  color: var(--primary);
  background: transparent;
}

.btn-outline:hover {
  background: var(--primary);
  color: var(--white);
}

.btn-sm {
  padding: 8px 16px;
  font-size: 14px;
}

.btn-lg {
  padding: 14px 32px;
  font-size: 16px;
}

/* Mobile Menu */
.mobile-menu-btn {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
  background: none;
}

.mobile-menu-btn span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text-dark);
  transition: all 0.3s ease;
}

/* ========================================
   页面内容区
   ======================================== */
.main-content {
  padding-top: 72px;
}

/* ========================================
   Hero 区域
   ======================================== */
.hero {
  background: linear-gradient(135deg, #FFF5F0 0%, #FFF 100%);
  padding: 100px 0 80px;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(255,125,41,0.1) 0%, transparent 70%);
  border-radius: 50%;
}

.hero-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.hero-content h1 {
  font-size: 48px;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 24px;
  color: var(--text-black);
}

.hero-content h1 span {
  color: var(--primary);
}

.hero-content p {
  font-size: 18px;
  color: var(--gray-dark);
  margin-bottom: 32px;
  line-height: 1.8;
}

.hero-badges {
  display: flex;
  gap: 16px;
  margin-bottom: 32px;
}

.hero-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  font-size: 14px;
  color: var(--text-dark);
}

.hero-badge i {
  color: var(--primary);
}

.hero-buttons {
  display: flex;
  gap: 16px;
}

.hero-image {
  position: relative;
}

.hero-image-main {
  width: 100%;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
}

/* ========================================
   功能卡片
   ======================================== */
.features-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.feature-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 32px 24px;
  text-align: center;
  box-shadow: var(--shadow-sm);
  transition: all 0.3s ease;
  border: 1px solid var(--gray);
}

.feature-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-md);
  border-color: var(--primary);
}

.feature-icon {
  width: 72px;
  height: 72px;
  margin: 0 auto 20px;
  background: linear-gradient(135deg, #FFF5F0, #FFF);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
}

.feature-card h3 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 12px;
  color: var(--text-black);
}

.feature-card p {
  font-size: 14px;
  color: var(--gray-dark);
  line-height: 1.6;
}

/* ========================================
   场景卡片
   ======================================== */
.scenarios-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 32px;
}

.scenario-card {
  display: flex;
  background: var(--white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: all 0.3s ease;
  border: 1px solid var(--gray);
}

.scenario-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--secondary);
}

.scenario-icon {
  width: 120px;
  min-height: 200px;
  background: linear-gradient(135deg, var(--secondary), var(--secondary-light));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 48px;
  color: var(--white);
}

.scenario-content {
  padding: 28px;
  flex: 1;
}

.scenario-content h3 {
  font-size: 22px;
  font-weight: 600;
  margin-bottom: 12px;
  color: var(--text-black);
}

.scenario-content p {
  font-size: 15px;
  color: var(--gray-dark);
  margin-bottom: 16px;
  line-height: 1.7;
}

.scenario-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.scenario-tag {
  padding: 4px 12px;
  background: var(--gray-light);
  border-radius: var(--radius-sm);
  font-size: 12px;
  color: var(--text-dark);
}

/* ========================================
   服务区块
   ======================================== */
.services-section {
  background: var(--gray-light);
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.service-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 32px;
  transition: all 0.3s ease;
  border: 1px solid transparent;
}

.service-card:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-md);
}

.service-icon {
  width: 64px;
  height: 64px;
  background: linear-gradient(135deg, #E8FFF5, #F0FFFC);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  margin-bottom: 20px;
}

.service-card h3 {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 12px;
  color: var(--text-black);
}

.service-card p {
  font-size: 15px;
  color: var(--gray-dark);
  line-height: 1.7;
}

/* ========================================
   合作伙伴 / 品牌展示
   ======================================== */
.brands-section {
  background: var(--white);
  padding: 60px 0;
}

.brands-grid {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 48px;
}

.brand-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  opacity: 0.7;
  transition: opacity 0.3s ease;
}

.brand-item:hover {
  opacity: 1;
}

.brand-logo {
  width: 80px;
  height: 80px;
  background: var(--gray-light);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  font-weight: bold;
  color: var(--text-dark);
}

.brand-name {
  font-size: 14px;
  color: var(--gray-dark);
}

/* ========================================
   配送优势
   ======================================== */
.delivery-advantages {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.advantage-item {
  display: flex;
  gap: 16px;
  padding: 24px;
  background: var(--white);
  border-radius: var(--radius-md);
  border: 1px solid var(--gray);
  transition: all 0.3s ease;
}

.advantage-item:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-sm);
}

.advantage-icon {
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, #FFF5F0, #FFF);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  flex-shrink: 0;
}

.advantage-content h4 {
  font-size: 17px;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--text-black);
}

.advantage-content p {
  font-size: 14px;
  color: var(--gray-dark);
  line-height: 1.6;
}

/* ========================================
   底部
   ======================================== */
.footer {
  background: var(--text-black);
  color: var(--white);
  padding: 60px 0 30px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 48px;
}

.footer-brand h3 {
  font-size: 24px;
  margin-bottom: 16px;
}

.footer-brand p {
  font-size: 14px;
  color: rgba(255,255,255,0.7);
  line-height: 1.8;
  margin-bottom: 20px;
}

.footer-social {
  display: flex;
  gap: 12px;
}

.footer-social a {
  width: 40px;
  height: 40px;
  background: rgba(255,255,255,0.1);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  transition: all 0.3s ease;
}

.footer-social a:hover {
  background: var(--primary);
}

.footer-column h4 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 20px;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-links a {
  font-size: 14px;
  color: rgba(255,255,255,0.7);
  transition: color 0.3s ease;
}

.footer-links a:hover {
  color: var(--primary);
}

.footer-bottom {
  padding-top: 30px;
  border-top: 1px solid rgba(255,255,255,0.1);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-bottom p {
  font-size: 14px;
  color: rgba(255,255,255,0.5);
}

.footer-bottom a {
  color: rgba(255,255,255,0.7);
}

.footer-bottom a:hover {
  color: var(--primary);
}

/* ========================================
   页面标题区
   ======================================== */
.page-header {
  background: linear-gradient(135deg, var(--secondary), var(--secondary-light));
  padding: 100px 0 60px;
  text-align: center;
  color: var(--white);
}

.page-header h1 {
  font-size: 42px;
  font-weight: 700;
  margin-bottom: 16px;
}

.page-header p {
  font-size: 18px;
  opacity: 0.9;
}

.page-header.orange {
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
}

/* ========================================
   表单样式
   ======================================== */
.form-group {
  margin-bottom: 20px;
}

.form-label {
  display: block;
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 8px;
  color: var(--text-dark);
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--gray);
  border-radius: var(--radius-md);
  font-size: 15px;
  font-family: inherit;
  transition: all 0.3s ease;
  background: var(--white);
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(255,125,41,0.1);
}

.form-textarea {
  resize: vertical;
  min-height: 120px;
}

/* ========================================
   卡片组件
   ======================================== */
.card {
  background: var(--white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--gray);
  transition: all 0.3s ease;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.card-image {
  width: 100%;
  height: 200px;
  background: var(--gray-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 48px;
  color: var(--gray);
}

.card-content {
  padding: 24px;
}

.card-title {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 12px;
  color: var(--text-black);
}

.card-text {
  font-size: 14px;
  color: var(--gray-dark);
  line-height: 1.7;
}

.card-price {
  font-size: 24px;
  font-weight: 700;
  color: var(--primary);
  margin-top: 12px;
}

/* ========================================
   流程步骤
   ======================================== */
.steps {
  display: flex;
  justify-content: space-between;
  position: relative;
}

.steps::before {
  content: '';
  position: absolute;
  top: 40px;
  left: 10%;
  right: 10%;
  height: 3px;
  background: var(--gray);
  z-index: 0;
}

.step {
  flex: 1;
  text-align: center;
  position: relative;
  z-index: 1;
}

.step-number {
  width: 80px;
  height: 80px;
  margin: 0 auto 20px;
  background: var(--primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  font-weight: 700;
  color: var(--white);
}

.step h4 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text-black);
}

.step p {
  font-size: 14px;
  color: var(--gray-dark);
  padding: 0 20px;
}

/* ========================================
   响应式设计
   ======================================== */
@media (max-width: 1024px) {
  .hero-inner {
    grid-template-columns: 1fr;
    text-align: center;
  }
  
  .hero-badges {
    justify-content: center;
  }
  
  .hero-buttons {
    justify-content: center;
  }
  
  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .scenarios-grid {
    grid-template-columns: 1fr;
  }
  
  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .nav {
    display: none;
  }
  
  .mobile-menu-btn {
    display: flex;
  }
  
  .hero {
    padding: 80px 0 60px;
  }
  
  .hero-content h1 {
    font-size: 32px;
  }
  
  .section {
    padding: 60px 0;
  }
  
  .section-title h2 {
    font-size: 28px;
  }
  
  .features-grid {
    grid-template-columns: 1fr;
  }
  
  .services-grid {
    grid-template-columns: 1fr;
  }
  
  .footer-grid {
    grid-template-columns: 1fr;
  }
  
  .steps {
    flex-direction: column;
    gap: 32px;
  }
  
  .steps::before {
    display: none;
  }
}

/* ========================================
   工具类
   ======================================== */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mt-4 { margin-top: 32px; }
.mt-5 { margin-top: 48px; }

.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.mb-4 { margin-bottom: 32px; }
.mb-5 { margin-bottom: 48px; }

.bg-light { background: var(--gray-light); }
.bg-white { background: var(--white); }

/* 悬浮弹窗 */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal {
  background: var(--white);
  border-radius: var(--radius-xl);
  padding: 40px;
  max-width: 500px;
  width: 90%;
  transform: translateY(20px);
  transition: transform 0.3s ease;
}

.modal-overlay.active .modal {
  transform: translateY(0);
}

.modal-close {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 40px;
  height: 40px;
  background: var(--gray-light);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.modal-close:hover {
  background: var(--primary);
  color: var(--white);
}

/* 商家入驻悬浮按钮 */
.float-buttons {
  position: fixed;
  right: 20px;
  bottom: 100px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  z-index: 999;
}

.float-btn {
  width: 56px;
  height: 56px;
  background: var(--primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-size: 24px;
  box-shadow: var(--shadow-md);
  transition: all 0.3s ease;
}

.float-btn:hover {
  transform: scale(1.1);
  background: var(--primary-dark);
  color: var(--white);
}

/* 商城产品卡片 */
.product-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.product-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--gray);
  transition: all 0.3s ease;
}

.product-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--primary);
}

.product-image {
  width: 100%;
  height: 180px;
  background: var(--gray-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 48px;
}

.product-info {
  padding: 20px;
}

.product-title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text-black);
}

.product-desc {
  font-size: 13px;
  color: var(--gray-dark);
  margin-bottom: 12px;
}

.product-price {
  font-size: 22px;
  font-weight: 700;
  color: var(--primary);
}

.product-price small {
  font-size: 14px;
  font-weight: 400;
  color: var(--gray-dark);
  text-decoration: line-through;
  margin-left: 8px;
}

/* 市场信息卡片 */
.info-card {
  background: var(--white);
  border-radius: var(--radius-md);
  padding: 24px;
  border: 1px solid var(--gray);
  transition: all 0.3s ease;
}

.info-card:hover {
  border-color: var(--secondary);
  box-shadow: var(--shadow-sm);
}

.info-card h4 {
  font-size: 17px;
  font-weight: 600;
  margin-bottom: 10px;
  color: var(--text-black);
}

.info-card p {
  font-size: 14px;
  color: var(--gray-dark);
  line-height: 1.7;
}

.info-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.info-tag {
  padding: 4px 10px;
  background: var(--gray-light);
  border-radius: var(--radius-sm);
  font-size: 12px;
  color: var(--secondary);
}

/* FAQ 手风琴 */
.faq-list {
  max-width: 800px;
  margin: 0 auto;
}

.faq-item {
  background: var(--white);
  border-radius: var(--radius-md);
  margin-bottom: 16px;
  border: 1px solid var(--gray);
  overflow: hidden;
}

.faq-question {
  width: 100%;
  padding: 20px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: none;
  font-size: 16px;
  font-weight: 600;
  color: var(--text-dark);
  text-align: left;
  transition: all 0.3s ease;
}

.faq-question:hover {
  background: var(--gray-light);
}

.faq-icon {
  font-size: 20px;
  transition: transform 0.3s ease;
}

.faq-item.active .faq-icon {
  transform: rotate(45deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.faq-item.active .faq-answer {
  max-height: 300px;
}

.faq-answer-content {
  padding: 0 24px 20px;
  font-size: 15px;
  color: var(--gray-dark);
  line-height: 1.8;
}

/* 筛选标签 */
.filter-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 32px;
}

.filter-tag {
  padding: 8px 20px;
  background: var(--gray-light);
  border-radius: var(--radius-lg);
  font-size: 14px;
  color: var(--text-dark);
  cursor: pointer;
  transition: all 0.3s ease;
  border: 1px solid transparent;
}

.filter-tag:hover,
.filter-tag.active {
  background: var(--white);
  border-color: var(--primary);
  color: var(--primary);
}
