:root {
  --primary: #1677ff; /* 支付宝蓝 / 现代电商标准主色 */
  --primary-light: #e6f4ff;
  --primary-dark: #0958d9;
  --accent: #ff4d4f;  /* 价格、特惠红 */
  --accent-light: #fff1f0;
  --text-main: #1f2937;
  --text-sub: #6b7280;
  --text-light: #9ca3af;
  --bg-page: #f4f6f9;
  --bg-card: #ffffff;
  --border-color: #e5e7eb;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.05);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "WenQuanYi Micro Hei", sans-serif;
  background-color: var(--bg-page);
  color: var(--text-main);
  font-size: 14px;
  line-height: 1.5;
  min-height: 100vh;
}

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

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

/* 核心响应式外层容器：
   - 移动端（手机）：100% 占满宽度，具有原生 App 体验；
   - 平板端与 PC 端（桌面屏幕）：最大宽 960px 优雅自适应居中，带有轻阴影与白底卡片质感
*/
.app-container {
  width: 100%;
  max-width: 960px;
  margin: 0 auto;
  background: var(--bg-card);
  min-height: 100vh;
  box-shadow: 0 0 25px rgba(0,0,0,0.06);
  position: relative;
  display: flex;
  flex-direction: column;
}

/* 顶部信任横幅（满足支付宝审核对合规与履约能力的展示） */
.trust-banner {
  background: linear-gradient(90deg, #f0f7ff, #e6f7ff);
  padding: 8px 16px;
  display: flex;
  align-items: center;
  justify-content: space-around;
  font-size: 12px;
  color: #0958d9;
  border-bottom: 1px solid #d6e4ff;
  flex-wrap: wrap;
  gap: 6px;
}

.trust-banner span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

/* 顶部导航栏 */
.top-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border-color);
  padding: 12px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 18px;
  font-weight: 700;
  color: #111827;
}

.brand-logo-icon {
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, #1677ff, #00b96b);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 17px;
  font-weight: bold;
  box-shadow: 0 2px 6px rgba(22, 119, 255, 0.3);
}

.nav-back-btn {
  display: flex;
  align-items: center;
  font-size: 14px;
  color: var(--text-sub);
  cursor: pointer;
  border: none;
  background: none;
  padding: 4px 8px 4px 0;
}

/* PC 端顶部导航链接（大屏显示） */
.pc-nav-links {
  display: none;
  align-items: center;
  gap: 20px;
}

.pc-nav-links a {
  font-size: 14px;
  color: #4b5563;
  font-weight: 500;
}

.pc-nav-links a:hover {
  color: var(--primary);
}

/* 搜索框 */
.search-bar-wrap {
  padding: 10px 20px 14px;
  background: #fff;
}

.search-bar {
  display: flex;
  align-items: center;
  background: #f1f3f5;
  border-radius: 20px;
  padding: 8px 16px;
  color: var(--text-sub);
  font-size: 13px;
  border: 1px solid transparent;
  transition: border-color 0.2s;
}

.search-bar:focus-within {
  border-color: var(--primary);
  background: #fff;
}

.search-bar input {
  border: none;
  background: transparent;
  width: 100%;
  margin-left: 8px;
  outline: none;
  font-size: 13px;
}

/* 焦点推广大 Banner */
.hero-banner {
  margin: 14px 20px;
  background: linear-gradient(135deg, #1677ff 0%, #00b96b 100%);
  border-radius: var(--radius-md);
  padding: 28px 24px;
  color: #fff;
  position: relative;
  overflow: hidden;
  box-shadow: 0 6px 18px rgba(22, 119, 255, 0.22);
}

.hero-banner h2 {
  font-size: 22px;
  margin-bottom: 8px;
  font-weight: 800;
}

.hero-banner p {
  font-size: 13px;
  opacity: 0.95;
  margin-bottom: 16px;
}

.hero-badge {
  display: inline-block;
  background: rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(4px);
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 11.5px;
  font-weight: 600;
}

/* 分类金刚区导航 */
.cat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  padding: 16px 20px;
  background: #fff;
  text-align: center;
}

.cat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  transition: transform 0.2s;
}

.cat-item:hover {
  transform: translateY(-2px);
}

.cat-icon-box {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 8px;
  font-size: 24px;
  box-shadow: var(--shadow-sm);
  background: #f0f7ff;
}

.cat-name {
  font-size: 13px;
  color: var(--text-main);
  font-weight: 500;
}

/* 专区标题 */
.section-header {
  padding: 18px 20px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.section-title {
  font-size: 17px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
}

.section-title::before {
  content: "";
  display: inline-block;
  width: 4px;
  height: 18px;
  background: var(--primary);
  border-radius: 2px;
}

.section-more {
  font-size: 13px;
  color: var(--text-sub);
}

/* 商品瀑布流网格（响应式：手机2列，平板/PC 3-4列） */
.product-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  padding: 0 20px 20px;
}

@media (min-width: 640px) {
  .product-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
  }
}

@media (min-width: 860px) {
  .product-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
  }
}

.product-card {
  background: #fff;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid #f0f0f0;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s, box-shadow 0.2s;
}

.product-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.product-thumb {
  width: 100%;
  aspect-ratio: 1 / 1;
  background: #f8fafc;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.product-thumb svg, .product-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-tag {
  position: absolute;
  top: 8px;
  left: 8px;
  background: rgba(0,0,0,0.65);
  color: #fff;
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 4px;
}

.product-info {
  padding: 12px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.product-name {
  font-size: 13.5px;
  font-weight: 600;
  color: #111827;
  line-height: 1.4;
  height: 38px;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  margin-bottom: 6px;
}

.product-sub {
  font-size: 11.5px;
  color: var(--text-light);
  margin-bottom: 10px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.product-bottom {
  margin-top: auto;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
}

.price-box {
  display: flex;
  align-items: baseline;
  gap: 4px;
}

.price-symbol {
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
}

.price-num {
  color: var(--accent);
  font-size: 18px;
  font-weight: 800;
}

.price-origin {
  font-size: 11.5px;
  color: var(--text-light);
  text-decoration: line-through;
}

.buy-btn-small {
  background: var(--primary-light);
  color: var(--primary);
  border: none;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  cursor: pointer;
  transition: background 0.15s;
}

.buy-btn-small:hover {
  background: var(--primary);
  color: #fff;
}

/* 详情页样式 */
.detail-layout {
  display: flex;
  flex-direction: column;
}

@media (min-width: 768px) {
  .detail-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    padding: 20px;
  }
}

.detail-gallery {
  width: 100%;
  aspect-ratio: 1 / 1;
  background: #fff;
  border-radius: var(--radius-md);
  overflow: hidden;
}

.detail-gallery img, .detail-gallery svg {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.detail-card {
  background: #fff;
  padding: 18px 20px;
  margin-bottom: 12px;
  border-radius: var(--radius-md);
}

.detail-price-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 10px;
}

.detail-price {
  color: var(--accent);
  font-size: 26px;
  font-weight: 800;
}

.detail-origin {
  color: var(--text-light);
  font-size: 14px;
  text-decoration: line-through;
}

.detail-sales {
  margin-left: auto;
  font-size: 12px;
  color: var(--text-sub);
}

.detail-title {
  font-size: 18px;
  font-weight: 700;
  line-height: 1.4;
  color: #111827;
  margin-bottom: 8px;
}

.detail-desc {
  font-size: 13.5px;
  color: var(--text-sub);
  line-height: 1.5;
}

.service-guarantees {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  background: #f9fafb;
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  margin-top: 14px;
  font-size: 12px;
  color: var(--text-sub);
}

.service-guarantees span {
  display: flex;
  align-items: center;
  gap: 4px;
  color: #059669;
}

.detail-section-title {
  font-size: 15px;
  font-weight: 700;
  padding: 14px 20px 10px;
  color: #374151;
  border-bottom: 1px solid #f0f0f0;
}

.specs-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  margin-top: 8px;
}

.specs-table td {
  padding: 9px 14px;
  border-bottom: 1px solid #f3f4f6;
}

.specs-table td:first-child {
  width: 90px;
  color: var(--text-sub);
}

.detail-content-body {
  padding: 18px 20px;
  font-size: 14px;
  line-height: 1.8;
  color: #4b5563;
}

/* 详情页底部吸底操作栏 */
.bottom-actions {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 960px;
  background: #fff;
  border-top: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  padding: 10px 20px;
  gap: 12px;
  z-index: 100;
  box-shadow: 0 -2px 10px rgba(0,0,0,0.05);
}

.action-icon-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  color: var(--text-sub);
  width: 48px;
}

.btn-add-cart, .btn-buy-now {
  flex: 1;
  height: 42px;
  border-radius: 21px;
  font-size: 14.5px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-add-cart {
  background: #e6f4ff;
  color: var(--primary);
}

.btn-buy-now {
  background: linear-gradient(90deg, #ff7875, #ff4d4f);
  color: #fff;
  box-shadow: 0 4px 10px rgba(255, 77, 79, 0.3);
}

/* 底部常驻导航 TabBar（手机端展示，PC端大屏自动隐藏） */
.tab-bar {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 960px;
  background: #fff;
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: space-around;
  padding: 8px 0;
  z-index: 99;
}

.tab-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  font-size: 11px;
  color: var(--text-sub);
  flex: 1;
}

.tab-item.active {
  color: var(--primary);
  font-weight: 600;
}

.tab-icon {
  font-size: 18px;
  margin-bottom: 2px;
}

/* 网站底部资质与合规展示（支付宝审核核心） */
.site-footer {
  margin-top: auto;
  background: #f8fafc;
  padding: 28px 20px 40px;
  font-size: 12.5px;
  color: var(--text-sub);
  border-top: 1px solid #eef2f6;
  text-align: center;
}

.footer-links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 14px;
}

.footer-links a {
  color: #4b5563;
  font-weight: 500;
}

.footer-links a:hover {
  color: var(--primary);
}

.footer-cert-badges {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  margin: 14px 0;
}

.cert-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #fff;
  border: 1px solid #e2e8f0;
  padding: 5px 10px;
  border-radius: 4px;
  font-size: 11.5px;
  color: #475569;
}

.beian-link {
  color: #2563eb;
  text-decoration: underline;
  font-weight: 600;
}

/* 结算与收银台样式 */
.checkout-box {
  padding: 20px;
}

.card-panel {
  background: #fff;
  border-radius: var(--radius-md);
  padding: 18px 20px;
  margin-bottom: 16px;
  border: 1px solid #f0f0f0;
}

.card-title {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.form-group {
  margin-bottom: 14px;
}

.form-group label {
  display: block;
  font-size: 13px;
  color: var(--text-sub);
  margin-bottom: 6px;
}

.form-control {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  font-size: 14px;
  outline: none;
}

.form-control:focus {
  border-color: var(--primary);
}

.pay-option-card {
  border: 2px solid var(--primary);
  background: #f0f7ff;
  border-radius: var(--radius-md);
  padding: 14px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.pay-option-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.pay-logo-ali {
  width: 36px;
  height: 36px;
  background: #1677ff;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: bold;
  font-size: 20px;
}

.btn-primary-block {
  width: 100%;
  background: var(--primary);
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  padding: 13px 0;
  border-radius: 24px;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(22, 119, 255, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: background 0.15s;
}

.btn-primary-block:hover {
  background: var(--primary-dark);
}

/* 提示弹窗 Toast */
.toast-msg {
  position: fixed;
  top: 45%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(0, 0, 0, 0.85);
  color: #fff;
  padding: 10px 22px;
  border-radius: 20px;
  font-size: 13.5px;
  z-index: 9999;
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
}
.toast-msg.show {
  opacity: 1;
}

/* 规范内容排版（条款文章页） */
.article-page {
  padding: 20px 24px 40px;
  background: #fff;
  min-height: 80vh;
}
.article-page h1 {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 18px;
  color: #111827;
  padding-bottom: 12px;
  border-bottom: 1px solid #f0f0f0;
}
.article-page h2 {
  font-size: 16px;
  font-weight: 700;
  margin: 20px 0 10px;
  color: #1f2937;
}
.article-page p {
  font-size: 13.5px;
  color: #4b5563;
  line-height: 1.8;
  margin-bottom: 12px;
}
.article-page ul {
  padding-left: 24px;
  margin-bottom: 14px;
}
.article-page li {
  font-size: 13.5px;
  color: #4b5563;
  line-height: 1.8;
  margin-bottom: 4px;
}

/* 媒体查询：PC/平板端优化响应 */
@media (min-width: 768px) {
  body {
    padding-bottom: 0; /* PC端不需要留出底部Tab高度 */
  }
  .pc-nav-links {
    display: flex;
  }
  .tab-bar {
    display: none; /* PC端隐藏底栏，使用顶部导航 */
  }
}
@media (max-width: 767px) {
  body {
    padding-bottom: 60px; /* 移动端留出底部TabBar空间 */
  }
}
