/* ============ 基础 ============ */
* { margin: 0; padding: 0; box-sizing: border-box; }
:root {
  --primary: #178f3e;
  --primary-dark: #0f7230;
  --accent: #ff5722;
  --ink: #26332b;
  --muted: #8a9a90;
  --bg: #f6f8f4;
  --card: #ffffff;
  --line: #e6ece7;
  --radius: 14px;
  --shadow: 0 4px 18px rgba(23, 143, 62, .08);
}
html { scroll-behavior: smooth; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; }
.container { max-width: 1120px; margin: 0 auto; padding: 0 20px; }
.muted { color: var(--muted); font-size: 13px; }

/* ============ 顶部导航 ============ */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.92); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; gap: 28px; height: 64px; }
.logo { font-size: 22px; font-weight: 800; letter-spacing: 1px; color: var(--primary-dark); }
.logo-icon { margin-right: 6px; }
.nav { display: flex; gap: 22px; margin-left: auto; }
.nav a { font-size: 15px; color: #4a5a50; padding: 4px 2px; }
.nav a.active, .nav a:hover { color: var(--primary); font-weight: 600; }
.cart-btn {
  position: relative; background: var(--primary); color: #fff;
  padding: 8px 16px; border-radius: 999px; font-size: 14px;
}
.cart-badge {
  position: absolute; top: -6px; right: -4px;
  background: var(--accent); color: #fff; font-size: 11px;
  min-width: 18px; height: 18px; line-height: 18px; text-align: center;
  border-radius: 999px; padding: 0 4px;
}

/* ============ 首页 Hero ============ */
.hero { background: linear-gradient(135deg, #e8f6ea 0%, #f4faf0 55%, #fdf6e9 100%); overflow: hidden; }
.hero-inner {
  display: flex; align-items: center; justify-content: space-between;
  padding: 64px 20px; gap: 30px;
}
.hero-tag {
  display: inline-block; background: #fff; color: var(--primary-dark);
  border: 1px solid #cfe8d4; border-radius: 999px;
  padding: 4px 14px; font-size: 13px; margin-bottom: 16px;
}
.hero h1 { font-size: 40px; line-height: 1.3; font-weight: 800; }
.hero-sub { color: #5c6f63; margin: 14px 0 26px; font-size: 16px; }
.hero-fruits { position: relative; width: 380px; height: 260px; flex-shrink: 0; }
.fruit { position: absolute; font-size: 54px; filter: drop-shadow(0 10px 14px rgba(0,0,0,.12)); animation: float 4.5s ease-in-out infinite; }
.f1 { top: 10px; left: 40px; } .f2 { top: 0; left: 180px; animation-delay: .6s; }
.f3 { top: 30px; right: 10px; animation-delay: 1.2s; } .f4 { bottom: 60px; left: 0; animation-delay: 1.8s; }
.f5 { bottom: 10px; left: 140px; animation-delay: 2.4s; } .f6 { bottom: 40px; right: 40px; animation-delay: 3s; }
@keyframes float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-14px); } }

/* ============ 区块与商品卡 ============ */
.section { padding: 44px 20px 10px; }
.section-head { margin-bottom: 20px; }
.section-head h2 { font-size: 24px; font-weight: 800; }
.section-head p { color: var(--muted); font-size: 14px; }
.grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 18px;
}
.card {
  background: var(--card); border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow); transition: transform .2s, box-shadow .2s;
  display: block;
}
.card:hover { transform: translateY(-4px); box-shadow: 0 10px 24px rgba(23,143,62,.14); }
.card-img {
  height: 170px; display: flex; align-items: center; justify-content: center;
  font-size: 76px;
}
.card-body { padding: 14px 16px 16px; }
.card-body h3 { font-size: 16px; font-weight: 700; }
.origin { color: var(--muted); font-size: 13px; margin: 4px 0 10px; }
.card-row { display: flex; align-items: baseline; justify-content: space-between; }
.price { color: var(--accent); font-weight: 800; font-size: 19px; }
.price::before { content: "¥"; font-size: 13px; }
.sales { color: var(--muted); font-size: 12px; }

/* 水果卡片底色 */
.bg-red    { background: linear-gradient(135deg,#ffe3e0,#ffd0ca); }
.bg-pink   { background: linear-gradient(135deg,#ffe0ec,#ffd1e1); }
.bg-green  { background: linear-gradient(135deg,#e2f3d8,#d0ecc1); }
.bg-orange { background: linear-gradient(135deg,#ffedd6,#ffe0b8); }
.bg-purple { background: linear-gradient(135deg,#efe1ff,#e2ccff); }
.bg-peach  { background: linear-gradient(135deg,#ffe9dc,#ffd9c4); }
.bg-yellow { background: linear-gradient(135deg,#fff6d6,#ffefb0); }
.bg-melon  { background: linear-gradient(135deg,#dff5e1,#c9eed0); }

/* ============ 礼盒 Banner ============ */
.banner {
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  background: linear-gradient(120deg, #178f3e, #23b158);
  color: #fff; border-radius: var(--radius);
  padding: 30px 36px; margin: 40px 0 10px;
}
.banner h2 { font-size: 22px; margin-bottom: 6px; }
.banner p { opacity: .9; font-size: 14px; }

/* ============ 按钮 ============ */
.btn {
  display: inline-block; text-align: center; cursor: pointer; border: none;
  border-radius: 999px; font-size: 15px; font-weight: 600; padding: 10px 26px;
  transition: opacity .2s, transform .2s;
}
.btn:hover { opacity: .88; transform: translateY(-1px); }
.btn-primary { background: var(--primary); color: #fff; }
.btn-ghost { background: #fff; color: var(--primary); border: 1.5px solid var(--primary); }
.btn-white { background: #fff; color: var(--primary-dark); }
.btn-lg { padding: 13px 38px; font-size: 16px; }
.btn-block { width: 100%; }

/* ============ 面包屑 ============ */
.crumbs { padding: 18px 0 4px; font-size: 13px; color: var(--muted); }
.crumbs a:hover { color: var(--primary); }

/* ============ 商品详情 ============ */
.detail {
  display: grid; grid-template-columns: 430px 1fr; gap: 34px;
  background: var(--card); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 28px; margin-top: 12px;
}
.detail-img {
  border-radius: 12px; height: 380px;
  display: flex; align-items: center; justify-content: center;
}
.detail-img span { font-size: 170px; filter: drop-shadow(0 16px 20px rgba(0,0,0,.15)); }
.detail-info h1 { font-size: 24px; font-weight: 800; }
.detail-sub { color: var(--muted); margin: 8px 0 16px; font-size: 14px; }
.detail-price {
  background: #fff4ef; border-radius: 10px; padding: 14px 16px; margin-bottom: 20px;
  display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap;
}
.price-lg { color: var(--accent); font-weight: 800; font-size: 30px; }
.price-lg::before { content: "¥"; font-size: 16px; }
.price-note { color: #c07a5b; font-size: 13px; }
.option-group { margin-bottom: 18px; }
.option-label { font-size: 14px; color: #5c6f63; margin-bottom: 8px; }
.specs { display: flex; gap: 10px; flex-wrap: wrap; }
.spec {
  border: 1.5px solid var(--line); background: #fff; color: var(--ink);
  border-radius: 8px; padding: 8px 18px; font-size: 14px; cursor: pointer;
  transition: all .15s;
}
.spec:hover { border-color: var(--primary); }
.spec.active {
  border-color: var(--primary); color: var(--primary); font-weight: 700;
  background: #eef9f0;
}
.stepper { display: inline-flex; align-items: center; border: 1.5px solid var(--line); border-radius: 8px; overflow: hidden; }
.stepper button {
  width: 38px; height: 36px; border: none; background: #f3f7f3;
  font-size: 18px; cursor: pointer; color: var(--primary-dark);
}
.stepper button:hover { background: #e4efe6; }
.stepper input {
  width: 52px; height: 36px; text-align: center; border: none;
  font-size: 15px; font-weight: 600; background: #fff;
}
.buy-row { display: flex; gap: 14px; margin: 26px 0 14px; }
.service { font-size: 13px; color: var(--muted); }

/* ============ 详情 Tabs ============ */
.tabs { margin: 26px 0 10px; background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.tab-bar { display: flex; border-bottom: 1px solid var(--line); }
.tab {
  padding: 14px 26px; border: none; background: none; cursor: pointer;
  font-size: 15px; color: #5c6f63; position: relative;
}
.tab.active { color: var(--primary); font-weight: 700; }
.tab.active::after {
  content: ""; position: absolute; left: 26px; right: 26px; bottom: 0;
  height: 3px; border-radius: 3px; background: var(--primary);
}
.tab-panel { display: none; padding: 22px 28px 28px; }
.tab-panel.active { display: block; }
.feature-list { list-style: none; }
.feature-list li { padding: 10px 0; border-bottom: 1px dashed var(--line); font-size: 14px; color: #44544a; }
.feature-list b { color: var(--primary-dark); }
.review { padding: 14px 0; border-bottom: 1px dashed var(--line); }
.review-meta { color: var(--muted); font-size: 13px; margin-bottom: 4px; }

/* ============ 下单页 ============ */
.checkout-grid {
  display: grid; grid-template-columns: 1fr 330px; gap: 20px;
  align-items: start; margin-top: 12px; padding-bottom: 30px;
}
.panel {
  background: var(--card); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 20px 24px; margin-bottom: 18px;
}
.panel h2 { font-size: 17px; margin-bottom: 14px; }
.form-row { display: flex; align-items: center; gap: 14px; margin-bottom: 12px; flex-wrap: wrap; }
.form-row label { width: 70px; font-size: 14px; color: #5c6f63; flex-shrink: 0; }
.form-row input[type="text"] {
  flex: 1; min-width: 200px; border: 1.5px solid var(--line); border-radius: 8px;
  padding: 9px 14px; font-size: 14px; outline: none; background: #fbfdfb;
}
.form-row input[type="text"]:focus { border-color: var(--primary); }
.order-item { display: flex; align-items: center; gap: 14px; }
.order-thumb {
  width: 72px; height: 72px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center; font-size: 38px; flex-shrink: 0;
}
.order-info { flex: 1; }
.order-name { font-weight: 700; font-size: 15px; }
.order-spec { color: var(--muted); font-size: 13px; }
.order-right { text-align: right; }
.order-qty { color: var(--muted); font-size: 13px; display: block; }
.pay-methods { display: flex; gap: 14px; flex-wrap: wrap; }
.pay-method {
  display: flex; align-items: center; gap: 10px;
  border: 1.5px solid var(--line); border-radius: 10px;
  padding: 12px 18px; cursor: pointer; font-size: 14px; position: relative;
  transition: all .15s;
}
.pay-method input { display: none; }
.pay-method.selected { border-color: var(--primary); background: #eef9f0; }
.pay-method.selected::after {
  content: "✓"; position: absolute; top: -9px; right: -9px;
  width: 20px; height: 20px; border-radius: 50%;
  background: var(--primary); color: #fff; font-size: 12px;
  line-height: 20px; text-align: center;
}
.pay-icon {
  width: 26px; height: 26px; border-radius: 6px; color: #fff;
  display: inline-flex; align-items: center; justify-content: center; font-size: 14px;
}
.pay-icon.alipay { background: #1677ff; }
.pay-icon.wechat { background: #07c160; }
.pay-desc { color: var(--muted); font-size: 12px; }
.pay-tip { margin-top: 12px; }
.summary { position: sticky; top: 84px; }
.sum-row { display: flex; justify-content: space-between; font-size: 14px; color: #44544a; padding: 6px 0; }
.free { color: var(--primary); }
.discount { color: var(--accent); }
.sum-total {
  display: flex; justify-content: space-between; align-items: baseline;
  border-top: 1px solid var(--line); margin-top: 10px; padding-top: 12px;
  font-weight: 700;
}
.sum-note { text-align: center; margin-top: 10px; }

/* ============ Toast ============ */
.toast {
  position: fixed; left: 50%; bottom: 40px; transform: translateX(-50%) translateY(20px);
  background: rgba(28, 40, 32, .92); color: #fff;
  padding: 12px 26px; border-radius: 999px; font-size: 14px;
  opacity: 0; pointer-events: none; transition: all .3s; z-index: 99;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ============ 页脚 ============ */
.site-footer { background: #223428; color: #cfdcd3; padding: 28px 0; margin-top: 30px; text-align: center; }
.site-footer a { color: #9fc7ab; }
.site-footer a:hover { color: #fff; }

/* ============ 响应式 ============ */
@media (max-width: 960px) {
  .hero-inner { flex-direction: column; text-align: center; }
  .hero-fruits { width: 100%; height: 200px; }
  .detail { grid-template-columns: 1fr; padding: 18px; }
  .detail-img { height: 260px; }
  .detail-img span { font-size: 110px; }
  .checkout-grid { grid-template-columns: 1fr; }
  .nav { display: none; }
}
