/* ========== 全局重置与基础样式 ========== */
*, *::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;
  color: #333; background: #f5f7fa; line-height: 1.6; min-width: 320px;
}
a { color: inherit; text-decoration: none; transition: color .2s; }
ul, ol { list-style: none; }
img { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; border: none; outline: none; }
.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* ========== Header ========== */
.header {
  background: #fff; position: sticky; top: 0; z-index: 1000;
  box-shadow: 0 1px 6px rgba(0,0,0,.08);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between; height: 64px;
}
.logo {
  font-size: 22px; font-weight: 700; color: #2d7d9a; display: flex;
  align-items: center; gap: 8px; flex-shrink: 0;
}
.logo-icon {
  width: 36px; height: 36px; background: linear-gradient(135deg, #2d7d9a, #38a3b5);
  border-radius: 8px; display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 18px; font-weight: 700;
}
.nav { display: flex; align-items: center; gap: 4px; }
.nav a {
  padding: 8px 16px; border-radius: 6px; font-size: 15px; color: #555;
  transition: all .2s; font-weight: 500;
}
.nav a:hover, .nav a.active { color: #2d7d9a; background: #e6f7fb; }
.nav .nav-merchant {
  background: linear-gradient(135deg, #c0392b, #e74c3c); color: #fff !important;
  padding: 7px 18px; border-radius: 20px; font-weight: 600;
  box-shadow: 0 2px 8px rgba(231,76,60,.3);
}
.nav .nav-merchant:hover { opacity: .9; background: linear-gradient(135deg, #a93226, #c0392b); }
.nav-right { display: flex; align-items: center; gap: 12px; }
.nav-right a { font-size: 14px; color: #666; padding: 6px 12px; }
.nav-right a:hover { color: #2d7d9a; }
.nav-toggle { display: none; background: none; font-size: 24px; color: #333; cursor: pointer; padding: 8px; }

/* ========== Hero ========== */
.hero {
  background: linear-gradient(135deg, #1a3c4e 0%, #2d7d9a 50%, #38a3b5 100%);
  padding: 80px 0 70px; color: #fff; position: relative; overflow: hidden;
}
.hero::before {
  content: ''; position: absolute; top: -100px; right: -100px;
  width: 400px; height: 400px; border-radius: 50%; background: rgba(255,255,255,.05);
}
.hero::after {
  content: ''; position: absolute; bottom: -80px; left: -50px;
  width: 300px; height: 300px; border-radius: 50%; background: rgba(255,255,255,.04);
}
.hero h1 { font-size: 38px; font-weight: 700; margin-bottom: 16px; position: relative; }
.hero p { font-size: 18px; opacity: .85; margin-bottom: 32px; max-width: 520px; position: relative; }
.hero-btns { display: flex; gap: 16px; position: relative; flex-wrap: wrap; }
.btn {
  display: inline-flex; align-items: center; gap: 8px; padding: 12px 28px;
  border-radius: 8px; font-size: 15px; font-weight: 600; cursor: pointer;
  transition: all .25s; border: none;
}
.btn-primary { background: #fff; color: #2d7d9a; }
.btn-primary:hover { background: #e6f7fb; transform: translateY(-1px); box-shadow: 0 4px 12px rgba(0,0,0,.15); }
.btn-outline { background: transparent; color: #fff; border: 2px solid rgba(255,255,255,.5); }
.btn-outline:hover { background: rgba(255,255,255,.1); border-color: #fff; }
.btn-red { background: linear-gradient(135deg, #c0392b, #e74c3c); color: #fff; }
.btn-red:hover { opacity: .9; transform: translateY(-1px); box-shadow: 0 4px 12px rgba(192,57,43,.3); }
.btn-teal { background: linear-gradient(135deg, #2d7d9a, #38a3b5); color: #fff; }
.btn-teal:hover { opacity: .9; transform: translateY(-1px); box-shadow: 0 4px 12px rgba(45,125,154,.3); }
.btn-block { width: 100%; justify-content: center; }
.btn-sm { padding: 8px 18px; font-size: 13px; }

/* ========== Section 通用 ========== */
.section { padding: 60px 0; }
.section-header { text-align: center; margin-bottom: 40px; }
.section-header h2 { font-size: 28px; font-weight: 700; color: #1a202c; margin-bottom: 8px; }
.section-header p { font-size: 15px; color: #888; }
.section-header .line { width: 40px; height: 3px; background: #2d7d9a; border-radius: 2px; margin: 12px auto 0; }

/* ========== 分类 ========== */
.category-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 20px; }
.category-card {
  background: #fff; border-radius: 12px; padding: 28px 16px; text-align: center;
  box-shadow: 0 2px 8px rgba(0,0,0,.06); transition: all .3s; cursor: pointer;
}
.category-card:hover { transform: translateY(-4px); box-shadow: 0 8px 24px rgba(0,0,0,.1); }
.category-icon {
  width: 56px; height: 56px; border-radius: 14px; margin: 0 auto 12px;
  display: flex; align-items: center; justify-content: center; font-size: 26px; color: #fff;
}
.category-card h4 { font-size: 15px; color: #333; margin-bottom: 4px; }
.category-card span { font-size: 13px; color: #aaa; }

/* ========== 商品网格 ========== */
.product-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.product-card {
  background: #fff; border-radius: 12px; overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,.06); transition: all .3s; cursor: pointer;
}
.product-card:hover { transform: translateY(-4px); box-shadow: 0 8px 24px rgba(0,0,0,.1); }
.product-img {
  height: 200px; display: flex; align-items: center; justify-content: center;
  font-size: 48px; color: #fff; position: relative;
}
.product-img .tag {
  position: absolute; top: 10px; left: 10px; padding: 3px 10px;
  border-radius: 4px; font-size: 12px; font-weight: 600; color: #fff;
}
.product-info { padding: 14px 16px 18px; }
.product-merchant { font-size: 12px; color: #2d7d9a; margin-bottom: 6px; display: flex; align-items: center; gap: 4px; }
.product-merchant .shop-badge { background: #e6f7fb; padding: 1px 6px; border-radius: 3px; font-size: 11px; color: #2d7d9a; font-weight: 500; }
.product-name {
  font-size: 14px; color: #333; margin-bottom: 8px; line-height: 1.5;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.product-bottom { display: flex; align-items: baseline; justify-content: space-between; }
.product-price { font-size: 20px; font-weight: 700; color: #e53e3e; }
.product-price small { font-size: 13px; }
.product-sales { font-size: 12px; color: #aaa; }

/* ========== 商品详情 ========== */
.detail-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: start; }
.detail-img {
  background: #e2e8f0; border-radius: 12px; height: 420px;
  display: flex; align-items: center; justify-content: center;
  font-size: 80px; color: #a0aec0; position: sticky; top: 84px;
}
.detail-main h1 { font-size: 22px; font-weight: 700; color: #1a202c; margin-bottom: 16px; line-height: 1.4; }
.detail-merchant-bar {
  display: flex; align-items: center; gap: 12px; padding: 12px 16px;
  background: #e6f7fb; border-radius: 8px; margin-bottom: 20px;
}
.detail-merchant-bar .shop-icon { width: 36px; height: 36px; background: #2d7d9a; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 16px; }
.detail-merchant-bar .shop-name { font-size: 14px; font-weight: 600; color: #2d7d9a; }
.detail-merchant-bar .shop-desc { font-size: 12px; color: #718096; }
.detail-price-box { background: #fff5f5; border-radius: 8px; padding: 20px; margin-bottom: 20px; }
.detail-price { font-size: 32px; font-weight: 700; color: #e53e3e; }
.detail-price small { font-size: 16px; }
.detail-price-orig { font-size: 14px; color: #aaa; text-decoration: line-through; margin-left: 12px; }
.detail-specs { margin-bottom: 24px; }
.detail-spec-row { display: flex; padding: 10px 0; border-bottom: 1px solid #f0f0f0; font-size: 14px; }
.detail-spec-row .label { width: 80px; color: #888; flex-shrink: 0; }
.detail-spec-row .value { color: #333; }
.detail-desc { margin-bottom: 24px; }
.detail-desc h3 { font-size: 16px; font-weight: 600; color: #1a202c; margin-bottom: 12px; }
.detail-desc p { font-size: 14px; color: #666; line-height: 1.8; }

/* ========== 优势 ========== */
.advantage-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.advantage-card {
  background: #fff; border-radius: 12px; padding: 32px 24px; text-align: center;
  box-shadow: 0 2px 8px rgba(0,0,0,.05);
}
.advantage-card .adv-icon {
  width: 60px; height: 60px; border-radius: 16px; margin: 0 auto 16px;
  display: flex; align-items: center; justify-content: center; font-size: 26px;
}
.advantage-card h4 { font-size: 16px; font-weight: 600; color: #1a202c; margin-bottom: 8px; }
.advantage-card p { font-size: 13px; color: #888; line-height: 1.6; }

/* ========== 付费专区 ========== */
.paid-list { max-width: 800px; margin: 0 auto; }
.paid-item {
  background: #fff; border-radius: 10px; padding: 20px 24px; margin-bottom: 12px;
  display: flex; align-items: center; justify-content: space-between;
  box-shadow: 0 1px 4px rgba(0,0,0,.06); cursor: pointer; transition: all .2s;
}
.paid-item:hover { box-shadow: 0 4px 12px rgba(0,0,0,.1); transform: translateX(4px); }
.paid-item-left { display: flex; align-items: center; gap: 14px; flex: 1; }
.paid-item-left .paid-icon {
  width: 40px; height: 40px; background: linear-gradient(135deg, #8e44ad, #9b59b6);
  border-radius: 10px; display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 16px; flex-shrink: 0;
}
.paid-item-left .paid-title { font-size: 15px; color: #333; font-weight: 500; }
.paid-item-left .paid-meta { font-size: 12px; color: #aaa; margin-top: 2px; }
.paid-item-right { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.paid-tag { background: #fff5f5; color: #e53e3e; padding: 4px 10px; border-radius: 4px; font-size: 12px; font-weight: 600; }
.paid-price-tag { color: #e53e3e; font-size: 14px; font-weight: 600; }

/* ========== 商家入驻 ========== */
.merchant-hero { background: linear-gradient(135deg, #922b21, #c0392b, #e74c3c); padding: 60px 0; color: #fff; text-align: center; }
.merchant-hero h1 { font-size: 32px; font-weight: 700; margin-bottom: 12px; }
.merchant-hero p { font-size: 16px; opacity: .85; }
.merchant-benefits { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.benefit-card {
  background: #fff; border-radius: 12px; padding: 32px 24px; text-align: center;
  box-shadow: 0 2px 8px rgba(0,0,0,.06);
}
.benefit-card .ben-icon {
  width: 56px; height: 56px; border-radius: 14px; margin: 0 auto 16px;
  display: flex; align-items: center; justify-content: center; font-size: 24px;
}
.benefit-card h4 { font-size: 16px; font-weight: 600; margin-bottom: 8px; color: #1a202c; }
.benefit-card p { font-size: 13px; color: #888; line-height: 1.6; }

/* ========== 表单 ========== */
.form-card {
  background: #fff; border-radius: 12px; padding: 32px; max-width: 520px;
  margin: 0 auto; box-shadow: 0 2px 12px rgba(0,0,0,.08);
}
.form-card h3 { font-size: 22px; font-weight: 700; color: #1a202c; margin-bottom: 24px; text-align: center; }
.form-tabs { display: flex; border-bottom: 2px solid #edf2f7; margin-bottom: 24px; }
.form-tab {
  flex: 1; text-align: center; padding: 12px; font-size: 15px; font-weight: 500;
  color: #888; cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -2px;
  transition: all .2s;
}
.form-tab.active { color: #2d7d9a; border-bottom-color: #2d7d9a; }
.form-tab:hover { color: #2d7d9a; }
.form-group { margin-bottom: 18px; }
.form-group label { display: block; font-size: 14px; font-weight: 500; color: #4a5568; margin-bottom: 6px; }
.form-group label .req { color: #e53e3e; margin-left: 2px; }
.form-input {
  width: 100%; padding: 10px 14px; border: 1px solid #e2e8f0; border-radius: 8px;
  font-size: 14px; color: #333; transition: border-color .2s, box-shadow .2s; background: #fff;
}
.form-input:focus { border-color: #2d7d9a; box-shadow: 0 0 0 3px rgba(45,125,154,.1); }
.form-input::placeholder { color: #cbd5e0; }
select.form-input { cursor: pointer; }
textarea.form-input { resize: vertical; min-height: 80px; font-family: inherit; }
.form-row { display: flex; gap: 16px; }
.form-row .form-group { flex: 1; }

/* ========== Modal ========== */
.modal-overlay {
  display: none; position: fixed; top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,.5); z-index: 2000; justify-content: center; align-items: center;
}
.modal-overlay.active { display: flex; }
.modal {
  background: #fff; border-radius: 16px; width: 440px; max-width: 92vw;
  animation: modalIn .3s ease; box-shadow: 0 20px 60px rgba(0,0,0,.2); overflow: hidden;
}
@keyframes modalIn { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: translateY(0); } }
.modal-header { background: linear-gradient(135deg, #8e44ad, #9b59b6); padding: 24px 28px; color: #fff; position: relative; }
.modal-header h3 { font-size: 18px; font-weight: 700; margin-bottom: 4px; }
.modal-header p { font-size: 13px; opacity: .85; }
.modal-close {
  position: absolute; top: 16px; right: 16px; background: rgba(255,255,255,.2);
  border: none; color: #fff; width: 30px; height: 30px; border-radius: 50%;
  font-size: 18px; cursor: pointer; display: flex; align-items: center; justify-content: center;
}
.modal-close:hover { background: rgba(255,255,255,.35); }
.modal-body { padding: 28px; }
.modal-body .lock-icon { text-align: center; margin-bottom: 16px; }
.modal-body .lock-icon i { font-size: 40px; color: #e67e22; }
.modal-body .pay-info { text-align: center; margin-bottom: 20px; }
.modal-body .pay-info .pay-price { font-size: 28px; font-weight: 700; color: #e53e3e; }
.modal-body .pay-info .pay-desc { font-size: 14px; color: #666; margin-top: 8px; }
.modal-footer { padding: 0 28px 28px; display: flex; gap: 12px; }
.modal-footer .btn { flex: 1; justify-content: center; }

/* ========== 联系客服卡片 ========== */
.contact-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.contact-card { background: #f7fafc; border-radius: 10px; padding: 20px; text-align: center; }
.contact-card .cc-icon {
  width: 44px; height: 44px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 10px; font-size: 18px;
}
.contact-card .cc-label { font-size: 12px; color: #a0aec0; margin-bottom: 4px; }
.contact-card .cc-value { font-size: 14px; font-weight: 600; color: #2d3748; }

/* ========== Footer ========== */
.footer { background: #1a202c; color: #a0aec0; padding: 48px 0 0; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 40px; padding-bottom: 36px; border-bottom: 1px solid #2d3748; }
.footer h4 { color: #fff; font-size: 16px; margin-bottom: 16px; }
.footer p { font-size: 13px; line-height: 1.8; }
.footer a { color: #a0aec0; font-size: 13px; display: block; padding: 4px 0; }
.footer a:hover { color: #38a3b5; }
.footer-bottom { padding: 20px 0; text-align: center; font-size: 12px; color: #718096; }
.footer-bottom a { display: inline; font-size: 12px; }
.footer-bottom a:hover { color: #38a3b5; }
.footer-bottom .sep { margin: 0 12px; color: #4a5568; }

/* ========== 面包屑 ========== */
.breadcrumb { padding: 16px 0; font-size: 13px; color: #888; }
.breadcrumb a { color: #888; }
.breadcrumb a:hover { color: #2d7d9a; }
.breadcrumb span { margin: 0 6px; color: #cbd5e0; }

/* ========== 响应式 ========== */
@media (max-width: 1024px) {
  .category-grid { grid-template-columns: repeat(5, 1fr); gap: 12px; }
  .product-grid { grid-template-columns: repeat(3, 1fr); gap: 16px; }
  .advantage-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .detail-layout { gap: 24px; }
}
@media (max-width: 768px) {
  .hero h1 { font-size: 26px; }
  .hero p { font-size: 15px; }
  .nav { display: none; }
  .nav-toggle { display: block; }
  .nav.open {
    display: flex; flex-direction: column; position: absolute; top: 64px; left: 0; right: 0;
    background: #fff; box-shadow: 0 4px 12px rgba(0,0,0,.1); padding: 12px 20px; z-index: 999;
  }
  .category-grid { grid-template-columns: repeat(3, 1fr); }
  .product-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .product-img { height: 150px; font-size: 36px; }
  .detail-layout { grid-template-columns: 1fr; }
  .detail-img { height: 260px; position: static; }
  .advantage-grid { grid-template-columns: 1fr; }
  .merchant-benefits { grid-template-columns: 1fr; }
  .form-row { flex-direction: column; gap: 0; }
  .footer-grid { grid-template-columns: 1fr; gap: 24px; }
  .contact-cards { grid-template-columns: 1fr; }
  .section { padding: 40px 0; }
  .modal { width: 95vw; }
  .section-header h2 { font-size: 22px; }
  .hero-btns { flex-direction: column; }
}
