/* ========================================
   新菜园 H5 落地页样式
   ======================================== */

/* CSS 变量 */
:root {
  --brand-red: #C8102E;
  --brand-red-dark: #A00C24;
  --brand-red-light: #E81C3F;
  --brand-green: #12B347;
  --brand-green-dark: #0D8F37;
  --brand-green-deep: #0A4722;
  --gold: #FFD700;
  --gold-dark: #E6B800;
  --text-dark: #333333;
  --text-gray: #666666;
  --text-light: #888888;
  --bg-white: #FFFFFF;
  --bg-light: #F8FFF9;
  --bg-cream: #F5F9F6;
  --border-light: #E8E8E8;
  --shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  --shadow-hover: 0 8px 30px rgba(0, 0, 0, 0.12);
  --radius: 12px;
  --radius-lg: 16px;
  --container-width: 1200px;
  --header-height: 72px;
}

/* 重置 */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;
  line-height: 1.6;
  color: var(--text-dark);
  background-color: var(--bg-white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  text-decoration: none;
  color: inherit;
}

ul {
  list-style: none;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

button {
  border: none;
  background: none;
  cursor: pointer;
  font-family: inherit;
}

.container {
  width: 100%;
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 20px;
}

/* ========================================
   顶部导航
   ======================================== */

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: var(--header-height);
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(10px);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  transition: box-shadow 0.3s ease;
}

.site-header.scrolled {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.brand-logo {
  width: 44px;
  height: 44px;
  object-fit: contain;
}

.brand-name {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--brand-green-deep);
  letter-spacing: -0.02em;
  white-space: nowrap;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-link {
  position: relative;
  padding: 8px 16px;
  font-size: 0.95rem;
  color: var(--text-dark);
  font-weight: 500;
  border-radius: 20px;
  transition: all 0.3s ease;
}

.nav-link:hover,
.nav-link.active {
  color: var(--brand-red);
  background: rgba(200, 16, 46, 0.06);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 4px;
  left: 50%;
  width: 0;
  height: 2px;
  background: var(--brand-red);
  transition: all 0.3s ease;
  transform: translateX(-50%);
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 24px;
}

.phone-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  background: var(--brand-red);
  color: white;
  border-radius: 24px;
  font-weight: 600;
  font-size: 0.95rem;
  transition: all 0.3s ease;
  flex-shrink: 0;
}

.phone-btn:hover {
  background: var(--brand-red-dark);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(200, 16, 46, 0.3);
}

.phone-icon {
  width: 18px;
  height: 18px;
}

.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 28px;
  height: 22px;
  padding: 0;
}

.menu-bar {
  display: block;
  width: 100%;
  height: 3px;
  background: var(--text-dark);
  border-radius: 2px;
  transition: all 0.3s ease;
}

.menu-toggle.active .menu-bar:nth-child(1) {
  transform: rotate(45deg) translate(6px, 6px);
}

.menu-toggle.active .menu-bar:nth-child(2) {
  opacity: 0;
}

.menu-toggle.active .menu-bar:nth-child(3) {
  transform: rotate(-45deg) translate(7px, -7px);
}

/* ========================================
   Hero Banner
   ======================================== */

.hero {
  position: relative;
  min-height: 620px;
  display: flex;
  align-items: center;
  padding: calc(var(--header-height) + 60px) 0 80px;
  overflow: hidden;
  background: linear-gradient(135deg, #B71C1C 0%, #C8102E 40%, #D32F2F 70%, #B71C1C 100%);
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-bg-img {
  position: absolute;
  right: 0;
  top: 0;
  width: 60%;
  height: 100%;
  object-fit: cover;
  opacity: 0.35;
  mix-blend-mode: overlay;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 20% 20%, rgba(255, 215, 0, 0.25) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 80%, rgba(0, 0, 0, 0.15) 0%, transparent 50%),
    linear-gradient(90deg, rgba(183, 28, 28, 0.95) 0%, rgba(200, 16, 46, 0.85) 45%, rgba(200, 16, 46, 0.6) 100%);
}

.hero-content {
  position: relative;
  z-index: 1;
}

.hero-text {
  max-width: 680px;
  color: white;
}

.hero-title {
  font-size: 3.2rem;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 16px;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.hero-subtitle {
  font-size: 1.6rem;
  font-weight: 600;
  color: var(--gold);
  margin-bottom: 20px;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.hero-desc {
  font-size: 1.1rem;
  line-height: 1.8;
  margin-bottom: 28px;
  opacity: 0.95;
  max-width: 560px;
}

.hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 32px;
}

.tag {
  padding: 8px 20px;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 24px;
  font-size: 0.95rem;
  font-weight: 500;
  backdrop-filter: blur(4px);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 36px;
  border-radius: 28px;
  font-size: 1rem;
  font-weight: 600;
  transition: all 0.3s ease;
  cursor: pointer;
  border: 2px solid transparent;
}

.btn-primary {
  background: var(--brand-green);
  color: white;
  border-color: var(--brand-green);
}

.btn-primary:hover {
  background: var(--brand-green-dark);
  border-color: var(--brand-green-dark);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(18, 179, 71, 0.35);
}

.btn-outline {
  background: transparent;
  color: white;
  border-color: white;
}

.btn-outline:hover {
  background: white;
  color: var(--brand-red);
  transform: translateY(-2px);
}

/* ========================================
   通用区块标题
   ======================================== */

.section-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-bottom: 48px;
}

.section-title {
  font-size: 2rem;
  font-weight: 700;
  color: var(--brand-green-deep);
  white-space: nowrap;
}

.section-line {
  display: block;
  width: 60px;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--brand-green), transparent);
}

/* ========================================
   核心服务能力
   ======================================== */

.services {
  padding: 80px 0;
  background: var(--bg-white);
}

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

.service-card {
  background: var(--bg-white);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 32px 24px;
  text-align: center;
  transition: all 0.3s ease;
  box-shadow: var(--shadow);
}

.service-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-hover);
  border-color: rgba(18, 179, 71, 0.2);
}

.service-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}

.service-icon svg {
  width: 32px;
  height: 32px;
  color: white;
}

.icon-green {
  background: linear-gradient(135deg, var(--brand-green), var(--brand-green-dark));
  box-shadow: 0 6px 16px rgba(18, 179, 71, 0.25);
}

.icon-red {
  background: linear-gradient(135deg, var(--brand-red), var(--brand-red-dark));
  box-shadow: 0 6px 16px rgba(200, 16, 46, 0.25);
}

.icon-gold {
  background: linear-gradient(135deg, var(--gold), var(--gold-dark));
  box-shadow: 0 6px 16px rgba(255, 215, 0, 0.25);
}

.service-title {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 12px;
}

.service-desc {
  font-size: 0.95rem;
  color: var(--text-gray);
  line-height: 1.7;
}

/* ========================================
   党建引领横幅
   ======================================== */

.party-banner {
  position: relative;
  padding: 60px 0;
  background: linear-gradient(90deg, #B71C1C 0%, #C8102E 50%, #B71C1C 100%);
  overflow: hidden;
}

.party-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 15% 50%, rgba(255, 215, 0, 0.15) 0%, transparent 40%),
    radial-gradient(ellipse at 85% 50%, rgba(0, 0, 0, 0.2) 0%, transparent 40%);
}

.party-content {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
}

.party-left {
  flex-shrink: 0;
}

.party-flag {
  width: 80px;
  height: 80px;
  color: var(--gold);
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.2));
}

.party-flag svg {
  width: 100%;
  height: 100%;
}

.party-center {
  flex: 1;
  text-align: center;
  color: white;
}

.party-title {
  font-size: 2.4rem;
  font-weight: 800;
  margin-bottom: 16px;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  letter-spacing: 0.05em;
}

.party-desc {
  font-size: 1.1rem;
  line-height: 1.8;
  opacity: 0.95;
  max-width: 700px;
  margin: 0 auto;
}

.party-right {
  flex-shrink: 0;
}

.party-badge {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 24px;
  background: rgba(255, 215, 0, 0.15);
  border: 2px solid rgba(255, 215, 0, 0.4);
  border-radius: var(--radius-lg);
  color: var(--gold);
}

.party-badge-icon {
  font-size: 2rem;
  line-height: 1;
}

.party-badge-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.party-badge-text strong {
  font-size: 1.1rem;
  font-weight: 700;
}

.party-badge-text span {
  font-size: 0.9rem;
  opacity: 0.9;
}

/* ========================================
   全品类生鲜供应
   ======================================== */

.categories {
  padding: 80px 0;
  background: var(--bg-white);
}

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

.category-card {
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
}

.category-card:hover {
  transform: translateY(-6px);
}

.category-card:hover .category-img {
  transform: scale(1.05);
}

.category-img-wrap {
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 14px;
  box-shadow: var(--shadow);
  background: var(--bg-cream);
}

.category-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.category-name {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-dark);
  position: relative;
  display: inline-block;
}

.category-name::after {
  content: '';
  position: absolute;
  bottom: -6px;
  left: 50%;
  width: 28px;
  height: 3px;
  background: var(--brand-green);
  transform: translateX(-50%);
  border-radius: 2px;
}

/* ========================================
   配送保障流程
   ======================================== */

.delivery-flow {
  padding: 80px 0;
  background: var(--bg-light);
}

.process-grid {
  display: flex;
  align-items: stretch;
  justify-content: center;
  gap: 12px;
  margin-bottom: 48px;
}

.process-step {
  flex: 1;
  max-width: 200px;
  text-align: center;
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  padding: 28px 16px;
  box-shadow: var(--shadow);
  position: relative;
}

.process-number {
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%);
  width: 28px;
  height: 28px;
  background: var(--brand-green);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(18, 179, 71, 0.3);
}

.process-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(18, 179, 71, 0.1);
  color: var(--brand-green);
}

.process-icon svg {
  width: 28px;
  height: 28px;
}

.process-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 8px;
}

.process-desc {
  font-size: 0.9rem;
  color: var(--text-gray);
  line-height: 1.6;
}

.process-arrow {
  display: flex;
  align-items: center;
  color: var(--brand-green);
  font-size: 1.5rem;
  font-weight: 700;
  padding-top: 40px;
}

.quality-tags {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 16px;
}

.quality-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 24px;
  background: var(--bg-white);
  border: 1px solid var(--border-light);
  border-radius: 24px;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-dark);
  box-shadow: var(--shadow);
}

.quality-check {
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--brand-green);
  color: white;
  border-radius: 50%;
  font-size: 0.75rem;
  font-weight: 700;
}

/* ========================================
   页脚
   ======================================== */

.site-footer {
  background: var(--brand-green-deep);
  color: white;
  padding: 50px 0 30px;
}

.footer-content {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1.2fr;
  gap: 40px;
  align-items: start;
}

.footer-title {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 20px;
  color: var(--gold);
}

.contact-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  font-size: 1rem;
}

.contact-list a {
  color: white;
  transition: color 0.3s ease;
}

.contact-list a:hover {
  color: var(--gold);
}

.contact-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  color: var(--gold);
}

.footer-qrcode {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.qrcode-placeholder {
  width: 120px;
  height: 120px;
  background: white;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--brand-green-deep);
  margin-bottom: 12px;
  padding: 12px;
}

.qrcode-placeholder svg {
  width: 100%;
  height: 100%;
}

.qrcode-tip {
  font-size: 0.9rem;
  opacity: 0.9;
}

.footer-legal {
  text-align: right;
  font-size: 0.85rem;
  line-height: 1.8;
  opacity: 0.85;
}

.footer-legal p {
  margin-bottom: 6px;
}

.footer-note {
  font-size: 0.8rem;
  opacity: 0.7;
}

/* ========================================
   响应式适配
   ======================================== */

@media (max-width: 1024px) {
  .hero-title {
    font-size: 2.6rem;
  }

  .hero-subtitle {
    font-size: 1.4rem;
  }

  .service-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .category-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .party-title {
    font-size: 2rem;
  }

  .footer-content {
    grid-template-columns: 1fr 1fr;
  }

  .footer-legal {
    text-align: left;
    grid-column: 1 / -1;
  }
}

@media (max-width: 768px) {
  :root {
    --header-height: 64px;
  }

  .brand-name {
    font-size: 1.05rem;
  }

  .brand-logo {
    width: 38px;
    height: 38px;
  }

  .menu-toggle {
    display: flex;
    order: 3;
    margin-left: 12px;
  }

  .nav-menu {
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;
    flex-direction: column;
    background: white;
    padding: 16px 20px;
    gap: 4px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    transform: translateY(-150%);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 999;
  }

  .nav-menu.active {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }

  .nav-link {
    display: block;
    width: 100%;
    padding: 12px 16px;
    text-align: center;
    border-radius: 8px;
  }

  .phone-btn span {
    display: none;
  }

  .phone-btn {
    padding: 10px;
    order: 2;
  }

  .hero {
    min-height: auto;
    padding: calc(var(--header-height) + 40px) 0 60px;
  }

  .hero-bg-img {
    width: 100%;
    opacity: 0.2;
  }

  .hero-title {
    font-size: 2rem;
  }

  .hero-subtitle {
    font-size: 1.2rem;
  }

  .hero-desc {
    font-size: 1rem;
  }

  .hero-tags {
    gap: 8px;
  }

  .tag {
    padding: 6px 14px;
    font-size: 0.85rem;
  }

  .btn {
    padding: 12px 28px;
    font-size: 0.95rem;
  }

  .section-title {
    font-size: 1.6rem;
  }

  .services,
  .categories,
  .delivery-flow {
    padding: 60px 0;
  }

  .service-grid {
    grid-template-columns: 1fr;
  }

  .category-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }

  .party-content {
    flex-direction: column;
    text-align: center;
    gap: 24px;
  }

  .party-flag {
    width: 60px;
    height: 60px;
  }

  .party-title {
    font-size: 1.6rem;
  }

  .party-desc {
    font-size: 1rem;
  }

  .party-badge {
    padding: 12px 20px;
  }

  .process-grid {
    flex-direction: column;
    align-items: center;
    gap: 24px;
  }

  .process-step {
    max-width: 100%;
    width: 100%;
  }

  .process-arrow {
    transform: rotate(90deg);
    padding: 0;
  }

  .quality-tags {
    gap: 12px;
  }

  .quality-tag {
    padding: 8px 16px;
    font-size: 0.85rem;
  }

  .footer-content {
    grid-template-columns: 1fr;
    gap: 32px;
    text-align: center;
  }

  .contact-list li {
    justify-content: center;
  }

  .footer-legal {
    text-align: center;
  }
}

@media (max-width: 480px) {
  .hero-title {
    font-size: 1.7rem;
  }

  .hero-subtitle {
    font-size: 1.05rem;
  }

  .section-title {
    font-size: 1.4rem;
  }

  .section-line {
    width: 36px;
  }

  .category-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  .category-name {
    font-size: 0.95rem;
  }

  .party-title {
    font-size: 1.4rem;
  }
}

/* ========================================
   无障碍与细节优化
   ======================================== */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

:focus-visible {
  outline: 2px solid var(--brand-green);
  outline-offset: 2px;
}

::selection {
  background: rgba(18, 179, 71, 0.2);
  color: var(--text-dark);
}
