/* ========== 凤鸣龙溪强村慧农平台 ========== */
:root {
  --green: #1b7a3d;
  --green-dark: #135c2d;
  --green-light: #e8f4ec;
  --gold: #d4a017;
  --text: #2b2b2b;
  --text-light: #6b7280;
  --bg: #f7f9f5;
  --white: #ffffff;
  --radius: 12px;
  --shadow: 0 4px 16px rgba(27, 122, 61, 0.08);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: "Microsoft YaHei", "PingFang SC", "Helvetica Neue", Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.7;
}

a { text-decoration: none; color: inherit; }
.container { max-width: 1140px; margin: 0 auto; padding: 0 20px; }
.center { text-align: center; margin-top: 36px; }

/* ---------- 头部导航 ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--white);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}
.nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}
.logo { display: flex; align-items: center; gap: 10px; }
.logo-mark {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--green), var(--green-dark));
  color: #fff;
  font-size: 22px;
  font-weight: bold;
  display: flex;
  align-items: center;
  justify-content: center;
}
.logo-text { font-size: 16px; color: var(--text-light); }
.logo-text strong { display: block; font-size: 18px; color: var(--green-dark); }

.main-nav { display: flex; align-items: center; gap: 28px; }
.main-nav a { font-size: 16px; color: var(--text); padding: 6px 2px; }
.main-nav a:hover { color: var(--green); }
.main-nav a.active { color: var(--green); border-bottom: 2px solid var(--green); }
.main-nav .nav-cta {
  background: var(--green);
  color: #fff !important;
  padding: 8px 20px;
  border-radius: 999px;
  border-bottom: none !important;
}
.main-nav .nav-cta:hover { background: var(--green-dark); }

/* ---------- 首屏 ---------- */
.hero {
  background: linear-gradient(120deg, rgba(19, 92, 45, 0.92), rgba(27, 122, 61, 0.75)),
    radial-gradient(circle at 80% 20%, #3fa060 0%, transparent 45%),
    linear-gradient(160deg, #14532d, #1b7a3d);
  color: #fff;
  padding: 110px 0 100px;
}
.hero-inner { max-width: 720px; }
.hero h1 { font-size: 44px; letter-spacing: 2px; margin-bottom: 18px; }
.hero-sub { font-size: 18px; opacity: 0.92; margin-bottom: 34px; }
.hero-actions { display: flex; gap: 16px; flex-wrap: wrap; }

.btn {
  display: inline-block;
  padding: 12px 30px;
  border-radius: 999px;
  font-size: 16px;
  cursor: pointer;
  border: none;
  transition: all 0.2s ease;
}
.btn-primary { background: var(--gold); color: #fff; font-weight: bold; }
.btn-primary:hover { background: #b8890f; transform: translateY(-2px); }
.btn-ghost { background: rgba(255, 255, 255, 0.15); color: #fff; border: 1px solid rgba(255, 255, 255, 0.6); }
.btn-ghost:hover { background: rgba(255, 255, 255, 0.28); }
.btn-block { width: 100%; margin-top: 8px; }

/* ---------- 区块 ---------- */
.section { padding: 72px 0; }
.section-alt { background: var(--green-light); }
.section-title {
  text-align: center;
  font-size: 30px;
  color: var(--green-dark);
  margin-bottom: 12px;
}
.section-title::after {
  content: "";
  display: block;
  width: 56px;
  height: 4px;
  border-radius: 2px;
  background: var(--gold);
  margin: 12px auto 0;
}
.section-desc {
  text-align: center;
  max-width: 760px;
  margin: 18px auto 44px;
  color: var(--text-light);
}

/* ---------- 特性卡片 ---------- */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
}
.feature-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 30px 22px;
  text-align: center;
  box-shadow: var(--shadow);
  transition: transform 0.2s ease;
}
.feature-card:hover { transform: translateY(-6px); }
.feature-icon { font-size: 38px; margin-bottom: 12px; }
.feature-card h3 { color: var(--green-dark); margin-bottom: 8px; }
.feature-card p { font-size: 14px; color: var(--text-light); }

/* ---------- 商品卡片 ---------- */
.product-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
}
.product-card {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.product-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 10px 26px rgba(27, 122, 61, 0.16);
}
.product-thumb {
  height: 150px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 52px;
  color: #fff;
  background: linear-gradient(135deg, var(--green), #4caf6d);
}
.product-thumb.raw { background: linear-gradient(135deg, #6d9c3f, #a5c05a); }
.product-thumb.service { background: linear-gradient(135deg, #b8890f, var(--gold)); }
.product-body { padding: 18px; flex: 1; display: flex; flex-direction: column; }
.product-cat {
  font-size: 12px;
  color: var(--green);
  background: var(--green-light);
  border-radius: 999px;
  padding: 2px 10px;
  align-self: flex-start;
  margin-bottom: 8px;
}
.product-name { display: block; font-size: 17px; font-weight: bold; margin-bottom: 6px; }
.product-name:hover { color: var(--green); }
.product-desc { font-size: 13px; color: var(--text-light); flex: 1; }
.product-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 14px;
}
.product-price-wrap {
  min-width: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.product-price { color: #d43d1a; font-size: 20px; font-weight: bold; line-height: 1.2; }
.product-spec { font-size: 12px; color: var(--text-light); }
.btn-add {
  background: var(--green);
  color: #fff;
  border: none;
  border-radius: 999px;
  padding: 7px 14px;
  font-size: 13px;
  cursor: pointer;
  transition: background 0.2s;
  white-space: nowrap;
  flex-shrink: 0;
}
.btn-add:hover { background: var(--green-dark); }
.btn-add:disabled { opacity: 0.85; cursor: default; }

/* ---------- 页头横幅 ---------- */
.page-banner {
  background: linear-gradient(120deg, var(--green-dark), var(--green));
  color: #fff;
  padding: 56px 0;
}
.page-banner h1 { font-size: 32px; margin-bottom: 6px; }
.page-banner p { opacity: 0.9; }

/* ---------- 分类筛选 ---------- */
.filter-bar {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 40px;
}
.filter-btn {
  border: 1px solid var(--green);
  background: var(--white);
  color: var(--green);
  border-radius: 999px;
  padding: 8px 24px;
  font-size: 15px;
  cursor: pointer;
  transition: all 0.2s;
}
.filter-btn:hover, .filter-btn.active { background: var(--green); color: #fff; }

/* ---------- 下单页 ---------- */
.order-layout {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 36px;
  align-items: start;
}
.order-layout[hidden] { display: none !important; }
.order-h { font-size: 22px; color: var(--green-dark); margin-bottom: 18px; }
.order-products, .order-form-wrap {
  background: var(--white);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow);
}

.order-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid #eee;
}
.order-item:last-child { border-bottom: none; }
.order-item-icon {
  width: 52px;
  height: 52px;
  border-radius: 10px;
  background: var(--green-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  flex-shrink: 0;
}
.order-item-info { flex: 1; }
.order-item-name { font-weight: bold; font-size: 15px; }
.order-item-price { color: #d43d1a; font-size: 14px; }
.qty-ctrl { display: flex; align-items: center; gap: 8px; }
.qty-btn {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid var(--green);
  background: var(--white);
  color: var(--green);
  font-size: 16px;
  cursor: pointer;
  line-height: 1;
}
.qty-btn:hover { background: var(--green); color: #fff; }
.qty-num { min-width: 28px; text-align: center; font-weight: bold; }

.form-row { margin-bottom: 18px; }
.form-row label { display: block; font-size: 15px; margin-bottom: 6px; }
.form-row em { color: #d43d1a; font-style: normal; }
.form-row input, .form-row textarea {
  width: 100%;
  border: 1px solid #d5dbd2;
  border-radius: 8px;
  padding: 11px 14px;
  font-size: 15px;
  font-family: inherit;
  background: #fcfdfb;
}
.form-row input:focus, .form-row textarea:focus {
  outline: none;
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(27, 122, 61, 0.12);
}
.form-row input.error, .form-row textarea.error { border-color: #d43d1a; }
.form-error { color: #d43d1a; font-size: 14px; margin-bottom: 14px; }

.order-summary {
  background: var(--green-light);
  border-radius: 10px;
  padding: 16px 18px;
  margin: 22px 0 18px;
}
.summary-row {
  display: flex;
  justify-content: space-between;
  font-size: 15px;
  padding: 4px 0;
}
.summary-total {
  border-top: 1px dashed #b9d4c1;
  margin-top: 8px;
  padding-top: 10px;
  font-size: 18px;
  font-weight: bold;
  color: #d43d1a;
}
.summary-tip { font-size: 12px; color: var(--text-light); margin-top: 8px; }
.form-tip { font-size: 13px; color: var(--text-light); text-align: center; margin-top: 12px; }

/* ---------- 弹窗 ---------- */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
}
.modal[hidden] { display: none !important; }
.modal-box {
  background: #fff;
  border-radius: var(--radius);
  padding: 36px 40px;
  text-align: center;
  max-width: 420px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
}
.modal-box h3 { color: var(--green-dark); font-size: 22px; margin-bottom: 16px; }
.modal-box p { margin-bottom: 8px; }
.modal-tip { font-size: 13px; color: var(--text-light); margin-bottom: 22px !important; }

/* ---------- 联系 ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}
.contact-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 26px 24px;
  box-shadow: var(--shadow);
  border-top: 4px solid var(--green);
}
.contact-card h3 { color: var(--green-dark); margin-bottom: 8px; }
.contact-card p { font-size: 14px; color: var(--text-light); }

/* ---------- 页脚 ---------- */
.site-footer {
  background: #17321f;
  color: rgba(255, 255, 255, 0.75);
  text-align: center;
  padding: 36px 0 28px;
  font-size: 14px;
}
.footer-name { font-size: 17px; color: #fff; font-weight: bold; margin-bottom: 8px; }
.footer-links { margin-bottom: 10px; }
.footer-links a:hover { color: #fff; }
.footer-icp a { color: rgba(255, 255, 255, 0.55); }
.footer-icp a:hover { color: #fff; }

/* ---------- 响应式 ---------- */
@media (max-width: 960px) {
  .feature-grid, .product-grid { grid-template-columns: repeat(2, 1fr); }
  .order-layout { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .hero { padding: 70px 0; }
  .hero h1 { font-size: 30px; }
  .feature-grid, .product-grid { grid-template-columns: 1fr; }
  .nav-wrap { height: auto; padding: 12px 20px; flex-direction: column; gap: 10px; }
  .main-nav { gap: 18px; }
}

/* ---------- 购物车角标 ---------- */
.nav-cart { position: relative; }
.cart-badge {
  position: absolute;
  top: -8px;
  right: -14px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: #d43d1a;
  color: #fff;
  font-size: 12px;
  line-height: 18px;
  text-align: center;
}

/* ---------- 购物车空状态 ---------- */
.cart-empty {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  text-align: center;
  padding: 80px 20px;
  color: var(--text-light);
}
.cart-empty[hidden] { display: none !important; }
.cart-empty-icon { font-size: 56px; margin-bottom: 12px; }
.cart-empty p { margin-bottom: 20px; }

/* ---------- 删除按钮 ---------- */
.item-remove {
  border: none;
  background: none;
  color: #bbb;
  font-size: 22px;
  cursor: pointer;
  padding: 4px 8px;
  line-height: 1;
}
.item-remove:hover { color: #d43d1a; }

/* ---------- 商品详情页 ---------- */
.detail-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: start;
  margin-bottom: 48px;
}
.detail-info {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 32px;
}
.detail-info h1 { font-size: 26px; color: var(--text); margin: 10px 0 8px; }
.detail-brief { color: var(--text-light); font-size: 15px; margin-bottom: 18px; }
.detail-price {
  color: #d43d1a;
  font-size: 30px;
  font-weight: bold;
  background: #fdf3ef;
  border-radius: 10px;
  padding: 12px 18px;
  margin-bottom: 22px;
}
.detail-price small { font-size: 14px; color: var(--text-light); font-weight: normal; }
.detail-actions { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.qty-lg .qty-btn { width: 36px; height: 36px; font-size: 18px; }
.qty-lg .qty-num { font-size: 18px; min-width: 36px; }
.btn-buy {
  background: var(--green);
  color: #fff;
  font-weight: bold;
}
.btn-buy:hover { background: var(--green-dark); transform: translateY(-2px); }
.btn:disabled, .btn-buy:disabled {
  opacity: 0.85;
  cursor: default;
  transform: none;
}
.detail-points {
  list-style: none;
  margin-top: 24px;
  border-top: 1px solid #eee;
  padding-top: 16px;
}
.detail-points li {
  font-size: 14px;
  color: var(--text-light);
  padding: 3px 0 3px 20px;
  position: relative;
}
.detail-points li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--green);
  font-weight: bold;
}

.detail-body {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 36px;
}
.detail-body h2 {
  font-size: 20px;
  color: var(--green-dark);
  border-left: 4px solid var(--gold);
  padding-left: 12px;
  margin-bottom: 16px;
}
.detail-body h2:not(:first-child) { margin-top: 32px; }
.detail-body p { color: var(--text); font-size: 15px; }
.detail-params {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
}
.detail-params th, .detail-params td {
  border: 1px solid #e5e9e2;
  padding: 12px 16px;
  text-align: left;
}
.detail-params th {
  width: 160px;
  background: var(--green-light);
  color: var(--green-dark);
  font-weight: bold;
}

/* ---------- 轮播图 ---------- */
.carousel {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  background: var(--white);
}
.carousel-track {
  display: flex;
  transition: transform 0.4s ease;
}
.carousel-slide {
  min-width: 100%;
  height: 380px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  color: #fff;
}
.carousel-slide.slide-a { background: linear-gradient(135deg, #1b7a3d, #4caf6d); }
.carousel-slide.slide-b { background: linear-gradient(135deg, #14532d, #6d9c3f); }
.carousel-slide.slide-c { background: linear-gradient(135deg, #3e7d32, #d4a017); }
.slide-icon { font-size: 96px; filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.25)); }
.slide-caption { font-size: 17px; letter-spacing: 1px; opacity: 0.95; }
.carousel-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 42px;
  height: 42px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.85);
  color: var(--green-dark);
  font-size: 24px;
  cursor: pointer;
  line-height: 1;
  transition: background 0.2s;
}
.carousel-arrow:hover { background: #fff; }
.carousel-arrow.prev { left: 14px; }
.carousel-arrow.next { right: 14px; }
.carousel-dots {
  position: absolute;
  bottom: 14px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  gap: 8px;
}
.carousel-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  transition: all 0.2s;
}
.carousel-dot.active { background: #fff; width: 24px; border-radius: 999px; }

/* ---------- 联系电话 ---------- */
.contact-phone { color: var(--green); font-weight: bold; font-size: 17px; }

/* ---------- 详情页响应式 ---------- */
@media (max-width: 860px) {
  .detail-layout { grid-template-columns: 1fr; }
  .carousel-slide { height: 260px; }
  .slide-icon { font-size: 64px; }
  .detail-body { padding: 24px; }
}
