/* ============ 基础重置 ============ */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary: #ff6a00;
  --primary-dark: #e85d00;
  --primary-light: #fff4ec;
  --accent: #ffb400;
  --text: #333;
  --text-light: #999;
  --bg: #f5f5f5;
  --card-shadow: 0 4px 15px rgba(0, 0, 0, 0.06);
  --radius: 12px;
  --header-h: 72px;
  --header-h-shrink: 56px;
}

html {
  scroll-behavior: smooth;
}

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

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

ul {
  list-style: none;
}

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

button {
  font-family: inherit;
  cursor: pointer;
}

input {
  font-family: inherit;
}

.container {
  width: 1200px;
  max-width: 94%;
  margin: 0 auto;
}

/* ============ 顶部导航 ============ */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 999;
  background: #fff;
  height: var(--header-h);
  display: flex;
  align-items: center;
  transition: height 0.35s ease, box-shadow 0.35s ease;
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.06);
}

.header.scrolled {
  height: var(--header-h-shrink);
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.12);
}

.header-inner {
  width: 1200px;
  max-width: 94%;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 30px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 24px;
  font-weight: 800;
  color: var(--primary);
  white-space: nowrap;
  transition: transform 0.35s ease;
}

.header.scrolled .logo {
  transform: scale(0.9);
}

.logo img {
  width: 38px;
  height: 38px;
  transition: width 0.35s ease, height 0.35s ease;
}

.header.scrolled .logo img {
  width: 32px;
  height: 32px;
}

.logo span b {
  color: #222;
  font-weight: 800;
}

.search-box {
  flex: 1;
  max-width: 440px;
  display: flex;
  align-items: center;
  background: var(--primary-light);
  border: 2px solid transparent;
  border-radius: 50px;
  overflow: hidden;
  transition: border-color 0.3s ease;
}

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

.search-box input {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  padding: 10px 18px;
  font-size: 14px;
  color: var(--text);
}

.search-box button {
  border: none;
  background: var(--primary);
  color: #fff;
  padding: 10px 22px;
  font-size: 14px;
  font-weight: 600;
  border-radius: 0 50px 50px 0;
  transition: background 0.3s ease;
}

.search-box button:hover {
  background: var(--primary-dark);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
}

.nav-links a {
  padding: 8px 14px;
  font-size: 15px;
  font-weight: 500;
  border-radius: 8px;
  transition: color 0.3s ease, background 0.3s ease;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--primary);
  background: var(--primary-light);
}

.nav-links .nav-btn {
  padding: 7px 20px;
  border-radius: 50px;
  border: 1px solid var(--primary);
  color: var(--primary);
  margin-left: 8px;
}

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

.nav-links .nav-btn.solid {
  background: var(--primary);
  color: #fff;
}

.nav-links .nav-btn.solid:hover {
  background: var(--primary-dark);
}

/* 商城登录态：已登录只显示用户名，悬停显示退出下拉栏 */
.shop-auth { display: inline-flex; align-items: center; }
.user-menu { position: relative; margin-left: 8px; }
.user-chip {
  display: inline-block;
  padding: 7px 18px;
  border-radius: 50px;
  background: var(--primary);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
}
.user-menu:hover .user-dropdown { display: block; }
.user-dropdown {
  position: absolute;
  right: 0;
  top: 115%;
  min-width: 120px;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.14);
  padding: 6px 0;
  display: none;
  z-index: 500;
  overflow: hidden;
}
.user-dropdown a {
  display: block;
  padding: 10px 18px;
  font-size: 14px;
  color: #555;
  text-align: center;
  transition: all 0.2s ease;
}
.user-dropdown a:hover { background: var(--primary); color: #fff; }

/* 页面占位(顶开固定头部) */
.page-top {
  height: var(--header-h);
}

/* ============ 首页轮播 ============ */
.hero {
  margin-top: var(--header-h);
  background: linear-gradient(120deg, #fff3e6 0%, #ffe3c2 50%, #ffd6a8 100%);
  overflow: hidden;
}

.hero-inner {
  width: 1200px;
  max-width: 94%;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  align-items: center;
  gap: 40px;
  padding: 56px 0;
}

.hero-text h1 {
  font-size: 46px;
  font-weight: 800;
  color: #222;
  line-height: 1.25;
}

.hero-text h1 b {
  color: var(--primary);
}

.hero-text p {
  margin: 18px 0 30px;
  font-size: 16px;
  color: #777;
  max-width: 420px;
}

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

.btn {
  display: inline-block;
  padding: 12px 32px;
  border-radius: 50px;
  font-size: 15px;
  font-weight: 600;
  border: none;
  transition: all 0.3s ease;
}

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

.btn-primary:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(255, 106, 0, 0.35);
}

.btn-ghost {
  background: #fff;
  color: var(--primary);
  border: 1px solid var(--primary);
}

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

.hero-visual {
  position: relative;
  display: flex;
  justify-content: center;
}

.hero-visual img {
  width: 460px;
  border-radius: 24px;
  box-shadow: 0 20px 50px rgba(255, 106, 0, 0.25);
}

.hero-badge {
  position: absolute;
  background: #fff;
  border-radius: 14px;
  padding: 10px 16px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  font-size: 13px;
  animation: float 3.5s ease-in-out infinite;
}

.hero-badge b {
  display: block;
  color: var(--primary);
  font-size: 18px;
}

.hero-badge.b1 {
  top: 12%;
  left: -8%;
}

.hero-badge.b2 {
  bottom: 14%;
  right: -4%;
  animation-delay: 1.2s;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}

/* ============ 服务条 ============ */
.service-bar {
  background: #fff;
  padding: 22px 0;
  border-bottom: 1px solid #eee;
}

.service-bar ul {
  display: flex;
  justify-content: space-around;
}

.service-bar li {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  color: #555;
}

.service-bar li .icon {
  font-size: 26px;
}

.service-bar li b {
  display: block;
  font-size: 15px;
  color: #222;
}

/* ============ 通用区块标题 ============ */
.section {
  padding: 44px 0 10px;
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 22px;
}

.section-head h2 {
  font-size: 26px;
  font-weight: 800;
  color: #222;
  display: flex;
  align-items: center;
  gap: 10px;
}

.section-head h2::before {
  content: "";
  width: 5px;
  height: 24px;
  background: var(--primary);
  border-radius: 4px;
}

.section-head h2 small {
  font-size: 14px;
  font-weight: 400;
  color: var(--text-light);
}

.section-head .more {
  font-size: 14px;
  color: var(--primary);
}

.section-head .more:hover {
  text-decoration: underline;
}

/* ============ 分类入口 ============ */
.cat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  background: #fff;
  border-radius: var(--radius);
  padding: 22px 16px;
  box-shadow: var(--card-shadow);
}

.cat-item {
  text-align: center;
  cursor: pointer;
  transition: transform 0.3s ease;
}

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

.cat-item .cat-icon {
  width: 58px;
  height: 58px;
  margin: 0 auto 10px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  background: var(--primary-light);
  transition: background 0.3s ease;
}

.cat-item:hover .cat-icon {
  background: var(--primary);
  color: #fff;
}

.cat-item span {
  font-size: 13px;
  color: #555;
}

/* ============ 商品卡片 ============ */
.product-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}

.product-card {
  background: #fff;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--card-shadow);
  transition: transform 0.35s ease, box-shadow 0.35s ease;
  position: relative;
}

.product-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.12);
}

.product-card .img-wrap {
  position: relative;
  overflow: hidden;
  aspect-ratio: 1;
  background: #fafafa;
  display: block;
}

.product-card .img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.product-card:hover .img-wrap img {
  transform: scale(1.08);
}

.product-card .tag {
  position: absolute;
  top: 12px;
  left: 12px;
  background: var(--primary);
  color: #fff;
  font-size: 12px;
  padding: 3px 10px;
  border-radius: 20px;
}

.product-card .sale-num {
  position: absolute;
  top: 12px;
  right: 12px;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  font-size: 12px;
  padding: 3px 10px;
  border-radius: 20px;
}

.product-info {
  padding: 14px 16px 16px;
}

.product-info h3 {
  font-size: 15px;
  font-weight: 600;
  color: #222;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 46px;
  line-height: 1.45;
}

.product-info h3 a:hover {
  color: var(--primary);
}

.product-info .shop {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 8px 0 10px;
  font-size: 12px;
  color: var(--text-light);
}

.product-info .shop::before {
  content: "店";
  width: 18px;
  height: 18px;
  border-radius: 5px;
  background: var(--accent);
  color: #fff;
  font-size: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.price-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.price {
  color: var(--primary);
  font-size: 20px;
  font-weight: 800;
}

.price small {
  font-size: 13px;
}

.price em {
  font-style: normal;
  color: var(--text-light);
  font-size: 12px;
  font-weight: 400;
  text-decoration: line-through;
  margin-left: 6px;
}

.cart-btn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: none;
  background: var(--primary-light);
  color: var(--primary);
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

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

/* ============ 大促横幅 ============ */
.promo-banner {
  margin: 40px auto;
  border-radius: 18px;
  overflow: hidden;
  background: linear-gradient(90deg, var(--primary) 0%, #ff9a3c 100%);
  padding: 34px 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #fff;
}

.promo-banner h3 {
  font-size: 26px;
  font-weight: 800;
}

.promo-banner p {
  opacity: 0.9;
  margin-top: 6px;
}

.promo-banner .btn {
  background: #fff;
  color: var(--primary);
}

.promo-banner .btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(255, 255, 255, 0.3);
}

/* ============ 商品筛选(goods页) ============ */
.filter-bar {
  background: #fff;
  border-radius: var(--radius);
  padding: 18px 22px;
  margin-bottom: 24px;
  box-shadow: var(--card-shadow);
  display: flex;
  align-items: center;
  gap: 26px;
  flex-wrap: wrap;
}

.filter-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.filter-group label {
  font-size: 14px;
  color: var(--text-light);
  white-space: nowrap;
}

.filter-group button {
  border: 1px solid #eee;
  background: #fff;
  padding: 7px 16px;
  border-radius: 50px;
  font-size: 13px;
  color: #555;
  transition: all 0.3s ease;
}

.filter-group button:hover,
.filter-group button.on {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

/* ============ 店铺街 ============ */
.shop-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.shop-card {
  background: #fff;
  border-radius: var(--radius);
  padding: 26px;
  box-shadow: var(--card-shadow);
  display: flex;
  gap: 20px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  text-decoration: none;
  color: inherit;
}

.shop-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.1);
}

.shop-card h3 {
  color: #222;
}

.shop-logo {
  width: 76px;
  height: 76px;
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 34px;
  color: #fff;
  flex-shrink: 0;
}

.shop-card h3 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 6px;
}

.shop-card .desc {
  font-size: 13px;
  color: var(--text-light);
  margin-bottom: 8px;
}

.shop-meta {
  display: flex;
  gap: 18px;
  font-size: 13px;
  color: #666;
  margin-bottom: 12px;
}

.shop-meta b {
  color: var(--primary);
}

.shop-card .shop-enter {
  font-size: 13px;
  color: var(--primary);
  font-weight: 600;
}

/* ============ 店铺详情 ============ */
.shop-detail-head {
  background: #fff;
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--card-shadow);
  display: flex;
  align-items: center;
  gap: 22px;
  margin-bottom: 26px;
}

.sd-info {
  flex: 1;
}

.sd-info h2 {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 6px;
  color: #222;
}

.sd-desc {
  font-size: 13px;
  color: var(--text-light);
  margin-bottom: 10px;
}

.sd-goods-title h3 {
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: #222;
}

.sd-goods-title h3::before {
  content: "";
  width: 4px;
  height: 18px;
  background: var(--primary);
  border-radius: 4px;
}

.sd-goods-title small {
  font-size: 13px;
  font-weight: 400;
  color: var(--text-light);
}

/* ============ 商家入驻 / 关于我们 ============ */
.page-banner {
  background: linear-gradient(120deg, var(--primary), #ff9a3c);
  color: #fff;
  text-align: center;
  padding: 60px 20px;
  margin-top: var(--header-h);
}

.page-banner h1 {
  font-size: 34px;
  font-weight: 800;
}

.page-banner p {
  opacity: 0.92;
  margin-top: 10px;
}

.page-body {
  padding: 40px 0;
}

.info-panel {
  background: #fff;
  border-radius: var(--radius);
  padding: 34px;
  box-shadow: var(--card-shadow);
  margin-bottom: 24px;
}

.info-panel h2 {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 14px;
  color: #222;
  display: flex;
  align-items: center;
  gap: 8px;
}

.info-panel h2::before {
  content: "";
  width: 4px;
  height: 20px;
  background: var(--primary);
  border-radius: 4px;
}

.info-panel p {
  color: #555;
  margin-bottom: 10px;
  font-size: 15px;
}

/* 用户协议 / 隐私政策 */
.policy-doc .info-panel h2 {
  font-size: 24px;
}

.policy-doc h3 {
  font-size: 17px;
  font-weight: 700;
  color: #333;
  margin: 22px 0 10px;
}

.policy-doc p {
  line-height: 1.9;
  margin-bottom: 10px;
}

.policy-doc ol,
.policy-doc ul {
  padding-left: 24px;
  margin: 8px 0 14px;
}

.policy-doc li {
  color: #555;
  line-height: 1.9;
  margin-bottom: 6px;
  font-size: 15px;
}

.policy-doc .update-time {
  color: var(--text-light);
  font-size: 13px;
  margin-bottom: 4px;
}

.policy-doc .intro {
  color: #555;
  line-height: 1.9;
  font-size: 15px;
  margin-bottom: 12px;
}

.policy-doc a {
  color: var(--primary);
}

.step-list {
  counter-reset: step;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}.step-list li {
  background: #fff;
  border-radius: var(--radius);
  padding: 26px 20px;
  text-align: center;
  box-shadow: var(--card-shadow);
  position: relative;
}

.step-list li::before {
  counter-increment: step;
  content: counter(step);
  width: 44px;
  height: 44px;
  margin: 0 auto 14px;
  border-radius: 50%;
  background: var(--primary-light);
  color: var(--primary);
  font-size: 20px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
}

.step-list li h3 {
  font-size: 16px;
  margin-bottom: 8px;
}

.step-list li p {
  font-size: 13px;
  color: var(--text-light);
  margin: 0;
}

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

.value-item {
  text-align: center;
  padding: 26px 16px;
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--card-shadow);
}

.value-item .icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 14px;
  border-radius: 50%;
  background: var(--primary-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
}

.value-item h3 {
  font-size: 16px;
  margin-bottom: 6px;
}

.value-item p {
  font-size: 13px;
  color: var(--text-light);
  margin: 0;
}

/* ============ 登录/注册 ============ */
.auth-wrap {
  min-height: calc(100vh - var(--header-h));
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  background: linear-gradient(135deg, #fff4ec, #ffe3c2 60%, #ffd6a8);
}

.auth-card {
  width: 420px;
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 20px 60px rgba(255, 106, 0, 0.18);
  padding: 40px 40px 34px;
}

.auth-card .logo {
  justify-content: center;
  margin-bottom: 8px;
  font-size: 22px;
}

.auth-card h2 {
  text-align: center;
  font-size: 22px;
  margin-bottom: 26px;
  color: #222;
}

.form-item {
  margin-bottom: 18px;
}

.form-item input {
  width: 100%;
  padding: 13px 18px;
  border: 1px solid #e5e5e5;
  border-radius: 10px;
  font-size: 14px;
  outline: none;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
  background: #fafafa;
}

.form-item input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(255, 106, 0, 0.12);
  background: #fff;
}

.form-item .code-row {
  display: flex;
  gap: 10px;
}

.form-item .code-row input {
  flex: 1;
}

.form-item .code-row button {
  width: 116px;
  border: 1px solid var(--primary);
  background: #fff;
  color: var(--primary);
  border-radius: 10px;
  font-size: 13px;
  white-space: nowrap;
}

.form-item .code-row button:hover {
  background: var(--primary);
  color: #fff;
}

.form-item .code-row button:disabled {
  border-color: #ccc;
  color: #999;
  background: #f5f5f5;
  cursor: not-allowed;
}

.auth-submit {
  width: 100%;
  padding: 13px;
  border: none;
  border-radius: 10px;
  background: var(--primary);
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  transition: background 0.3s ease, transform 0.2s ease;
}

.auth-submit:hover {
  background: var(--primary-dark);
}

.auth-submit:active {
  transform: scale(0.98);
}

.auth-extra {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  color: var(--text-light);
  margin: 12px 0 20px;
}

.auth-extra a {
  color: var(--primary);
}

.auth-switch {
  text-align: center;
  font-size: 14px;
  color: #666;
  padding-top: 18px;
  border-top: 1px solid #f0f0f0;
}

.auth-switch a {
  color: var(--primary);
  font-weight: 600;
}

/* ============ 页脚 ============ */
.footer {
  background: #222;
  color: #aaa;
  margin-top: 50px;
  padding: 44px 0 0;
}

.footer-main {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
  gap: 36px;
  padding-bottom: 34px;
}

.footer h4 {
  color: #fff;
  font-size: 16px;
  margin-bottom: 16px;
}

.footer .f-logo {
  font-size: 22px;
  font-weight: 800;
  color: var(--primary);
  margin-bottom: 12px;
}

.footer p {
  font-size: 13px;
  line-height: 2;
}

.footer ul li a {
  font-size: 13px;
  display: inline-block;
  padding: 4px 0;
  transition: color 0.3s ease;
}

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

.footer-bottom {
  border-top: 1px solid #333;
  padding: 18px 0;
  text-align: center;
  font-size: 12px;
  color: #666;
}

/* ============ 返回顶部 ============ */
#toTop {
  position: fixed;
  right: 26px;
  bottom: 34px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  background: var(--primary);
  color: #fff;
  font-size: 20px;
  box-shadow: 0 6px 18px rgba(255, 106, 0, 0.4);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease;
  z-index: 99;
}

#toTop.show {
  opacity: 1;
  pointer-events: auto;
}

#toTop:hover {
  transform: translateY(-4px);
}

/* ============ 商品详情页 ============ */
.detail-wrap {
  padding: 36px 0 0;
}

.breadcrumb {
  font-size: 13px;
  color: var(--text-light);
  margin-bottom: 18px;
}

.breadcrumb a {
  color: var(--text-light);
}

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

.breadcrumb .sep {
  margin: 0 8px;
}

.breadcrumb .cur {
  color: var(--primary);
}

.detail-main {
  display: grid;
  grid-template-columns: 460px 1fr;
  gap: 36px;
  background: #fff;
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--card-shadow);
}

.gallery {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.gallery-main {
  border-radius: var(--radius);
  overflow: hidden;
  background: #fafafa;
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.gallery-main img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.gallery-thumbs {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.gallery-thumbs img {
  width: 64px;
  height: 64px;
  object-fit: cover;
  border-radius: 8px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: border-color 0.3s ease;
}

.gallery-thumbs img.on {
  border-color: var(--primary);
}

.detail-info h1 {
  font-size: 22px;
  line-height: 1.45;
  color: #222;
  font-weight: 700;
  margin-bottom: 14px;
}

.detail-price-box {
  background: var(--primary-light);
  border-radius: var(--radius);
  padding: 20px 22px;
  display: flex;
  align-items: baseline;
  gap: 16px;
  margin-bottom: 18px;
}

.detail-price-box .price {
  font-size: 30px;
  color: var(--primary);
  font-weight: 800;
}

.detail-price-box .price small {
  font-size: 16px;
}

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

.detail-price-box .promo {
  margin-left: auto;
  background: var(--primary);
  color: #fff;
  font-size: 12px;
  padding: 4px 12px;
  border-radius: 20px;
}

.detail-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 26px;
  font-size: 14px;
  color: #555;
  margin-bottom: 18px;
  padding: 16px 0;
  border-top: 1px dashed #eee;
  border-bottom: 1px dashed #eee;
}

.detail-meta b {
  color: var(--primary);
}

.detail-buy {
  display: flex;
  align-items: center;
  gap: 16px;
}

.num-ctrl {
  display: flex;
  align-items: center;
  border: 1px solid #e5e5e5;
  border-radius: 10px;
  overflow: hidden;
}

.num-ctrl button {
  width: 38px;
  height: 40px;
  border: none;
  background: #fafafa;
  font-size: 18px;
  color: #666;
  transition: background 0.3s ease;
}

.num-ctrl button:hover {
  background: var(--primary-light);
  color: var(--primary);
}

.num-ctrl input {
  width: 56px;
  height: 40px;
  border: none;
  border-left: 1px solid #e5e5e5;
  border-right: 1px solid #e5e5e5;
  text-align: center;
  font-size: 15px;
  outline: none;
}

.detail-buy .btn {
  border-radius: 10px;
  padding: 12px 30px;
}

.detail-buy .btn-outline {
  background: #fff;
  color: var(--primary);
  border: 1px solid var(--primary);
}

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

.detail-tags {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 16px;
  font-size: 12px;
  color: #888;
}

.detail-tags span {
  border: 1px solid #eee;
  padding: 3px 12px;
  border-radius: 20px;
}

.detail-desc {
  margin-top: 26px;
  background: #fff;
  border-radius: var(--radius);
  padding: 26px;
  box-shadow: var(--card-shadow);
}

.detail-desc h2 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.detail-desc h2::before {
  content: "";
  width: 4px;
  height: 18px;
  background: var(--primary);
  border-radius: 4px;
}

.detail-desc .desc-imgs {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: center;
}

.detail-desc .desc-imgs img {
  width: 100%;
  max-width: 860px;
  border-radius: 8px;
}

.related {
  margin-top: 26px;
}

.related .section-head {
  margin-bottom: 18px;
}

/* ============ 弹窗提示 ============ */
.toast {
  position: fixed;
  top: 90px;
  left: 50%;
  transform: translate(-50%, -20px);
  background: rgba(0, 0, 0, 0.82);
  color: #fff;
  padding: 10px 26px;
  border-radius: 50px;
  font-size: 14px;
  opacity: 0;
  pointer-events: none;
  transition: all 0.35s ease;
  z-index: 9999;
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* ============ 弹窗(商家入驻) ============ */
.modal-mask {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
}

.modal-mask.show {
  display: flex;
}

.modal {
  background: #fff;
  border-radius: 16px;
  width: 100%;
  max-width: 660px;
  max-height: 88vh;
  overflow: auto;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
  animation: modalIn 0.25s ease;
}

@keyframes modalIn {
  from { opacity: 0; transform: translateY(30px) scale(0.97); }
  to { opacity: 1; transform: none; }
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 26px;
  border-bottom: 1px solid #f0f0f0;
  position: sticky;
  top: 0;
  background: #fff;
  z-index: 1;
}

.modal-header h2 {
  font-size: 18px;
  color: #222;
}

.modal-close {
  border: none;
  background: #f5f5f5;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-size: 15px;
  cursor: pointer;
  color: #666;
  transition: background 0.3s ease, color 0.3s ease;
}

.modal-close:hover {
  background: var(--primary-light);
  color: var(--primary);
}

.modal-body {
  padding: 20px 26px 6px;
}

.modal-footer {
  padding: 16px 26px;
  border-top: 1px solid #f0f0f0;
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

.modal-form h3 {
  font-size: 15px;
  font-weight: 700;
  margin: 4px 0 14px;
  color: #333;
  display: flex;
  align-items: center;
  gap: 8px;
}

.modal-form h3::before {
  content: "";
  width: 4px;
  height: 16px;
  background: var(--primary);
  border-radius: 4px;
}

.modal-form .form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 14px;
}

.modal-form .form-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 14px;
}

.modal-form .form-item.full {
  grid-column: 1 / -1;
}

.modal-form .form-item label {
  font-size: 13px;
  color: #666;
}

.modal-form .form-item label em {
  color: var(--primary);
  font-style: normal;
}

.modal-form .form-item input,
.modal-form .form-item select,
.modal-form .form-item textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #e5e5e5;
  border-radius: 10px;
  font-size: 14px;
  outline: none;
  background: #fff;
  transition: border-color 0.3s ease;
}

.modal-form .form-item input:focus,
.modal-form .form-item select:focus,
.modal-form .form-item textarea:focus {
  border-color: var(--primary);
}

.modal-form .form-item textarea {
  resize: vertical;
  min-height: 64px;
}

.upload-box {
  border: 1px dashed #ccc;
  border-radius: 10px;
  padding: 16px;
  text-align: center;
  color: #999;
  font-size: 13px;
  cursor: pointer;
  transition: border-color 0.3s ease, color 0.3s ease;
}

.upload-box:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.upload-box input {
  display: none;
}

@media (max-width: 640px) {
  .modal-form .form-row {
    grid-template-columns: 1fr;
  }
}

/* ============ 响应式 ============ */
@media (max-width: 1024px) {
  .hero-inner {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .hero-text p {
    margin-left: auto;
    margin-right: auto;
  }
  .hero-btns {
    justify-content: center;
  }
  .cat-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
  }
  .cat-item .cat-icon {
    width: 64px;
    height: 64px;
  }
  .product-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .shop-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .value-grid,
  .step-list {
    grid-template-columns: repeat(2, 1fr);
  }
  .search-box {
    display: none;
  }
  .detail-main {
    grid-template-columns: 1fr;
  }
  .detail-price-box .promo {
    display: none;
  }
  .footer-main {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .logo {
    font-size: 17px;
  }
  .logo img {
    width: 26px;
    height: 26px;
  }
  .nav-links a {
    padding: 6px 8px;
    font-size: 13px;
  }
  .product-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .cat-grid {
    grid-template-columns: repeat(4, 1fr);
  }
  .shop-grid {
    grid-template-columns: 1fr;
  }
  .hero-text h1 {
    font-size: 30px;
  }
  .service-bar ul {
    flex-wrap: wrap;
    gap: 12px;
  }
  .service-bar li {
    width: 46%;
  }
}

/* ============ 顶部购物车入口 ============ */
.nav-cart {
  position: relative;
  font-size: 20px;
  margin-left: 10px;
  padding: 4px 6px;
  color: #555;
  transition: color 0.2s ease;
}
.nav-cart:hover { color: var(--primary); }
.cart-badge {
  position: absolute;
  top: -4px;
  right: -8px;
  min-width: 18px;
  height: 18px;
  line-height: 18px;
  padding: 0 5px;
  border-radius: 10px;
  background: var(--primary);
  color: #fff;
  font-size: 11px;
  text-align: center;
  font-weight: 700;
  box-sizing: border-box;
}

/* ============ 购物车页 ============ */
.cart-wrap {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--card-shadow);
  padding: 28px 30px 30px;
  margin: 24px 0 50px;
}
.cart-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 18px;
  border-bottom: 1px solid #f0f0f0;
}
.cart-head h1 { font-size: 22px; color: #222; }
.cart-head .continue { color: var(--primary); font-size: 14px; }
.cart-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid #f3f3f3;
}
.cart-item.sel { background: #fff8f0; }
.cart-select { position: relative; cursor: pointer; }
.cart-select input { display: none; }
.cart-select .radio-box {
  width: 20px; height: 20px;
  border: 2px solid #ccc;
  border-radius: 50%;
  display: inline-block;
  vertical-align: middle;
}
.cart-select input:checked + .radio-box { border-color: var(--primary); background: var(--primary); box-shadow: inset 0 0 0 4px #fff; }
.ci-img { width: 90px; height: 70px; border-radius: 8px; overflow: hidden; background: #f5f5f5; flex-shrink: 0; }
.ci-img img { width: 100%; height: 100%; object-fit: cover; }
.ci-body { flex: 1; min-width: 0; }
.ci-name { font-size: 15px; font-weight: 600; color: #222; margin-bottom: 6px; }
.ci-price { color: var(--primary); font-weight: 700; }
.ci-qty { display: flex; align-items: center; gap: 6px; }
.ci-qty button {
  width: 28px; height: 28px;
  border: 1px solid #e5e5e5;
  background: #fff;
  border-radius: 6px;
  font-size: 15px;
  color: #555;
}
.ci-qty button:hover { border-color: var(--primary); color: var(--primary); }
.ci-qty span { width: 40px; text-align: center; font-weight: 600; }
.ci-sub { width: 110px; text-align: right; font-weight: 700; color: var(--primary); }
.ci-del { border: none; background: none; color: #999; font-size: 13px; }
.ci-del:hover { color: #ff4d4f; }
.cart-empty { text-align: center; color: #999; padding: 60px 0; }
.cart-foot {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 20px;
  padding-top: 20px;
}
.cart-total b { font-size: 20px; color: var(--primary); }
#cartCheckout:disabled { opacity: 0.5; cursor: not-allowed; }

/* ============ 结算页 ============ */
.checkout-wrap {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--card-shadow);
  padding: 28px 34px 34px;
  margin: 24px 0 50px;
}
.checkout-title { font-size: 22px; color: #222; padding-bottom: 18px; border-bottom: 1px solid #f0f0f0; }
.checkout-goods { margin: 18px 0; }
.cg-item { display: flex; align-items: center; gap: 16px; padding: 14px; background: #fafafa; border-radius: 10px; }
.cg-img { width: 80px; height: 62px; border-radius: 8px; overflow: hidden; background: #fff; flex-shrink: 0; }
.cg-img img { width: 100%; height: 100%; object-fit: cover; }
.cg-info { flex: 1; min-width: 0; }
.cg-name { font-size: 15px; font-weight: 600; color: #222; margin-bottom: 6px; }
.cg-price { color: var(--primary); font-weight: 700; }
.cg-qty { color: #888; font-size: 14px; }
.cg-sub { font-size: 18px; font-weight: 700; color: var(--primary); }
.checkout-panel { margin-top: 10px; }
.checkout-panel h2 { font-size: 18px; margin-bottom: 18px; color: #222; }
.checkout-panel .co-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.checkout-panel .form-item label { display: block; margin-bottom: 8px; font-size: 14px; color: #555; }
.checkout-panel .form-item label em { color: #ff4d4f; font-style: normal; }
.checkout-panel .form-item input,
.checkout-panel .form-item select {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid #e5e5e5;
  border-radius: 10px;
  font-size: 14px;
  outline: none;
  background: #fafafa;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}
.checkout-panel .form-item input:focus,
.checkout-panel .form-item select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(255, 106, 0, 0.12);
  background: #fff;
}
.co-submit { margin-top: 10px; padding: 13px 44px; font-size: 15px; }

/* ============ 企业微信收款弹窗 ============ */
.wc-modal { max-width: 400px; overflow: hidden; border-radius: 16px; }
.wc-head {
  background: #07c160;
  border-bottom: none;
  color: #fff;
}
.wc-head .wc-brand { display: flex; align-items: center; gap: 10px; }
.wc-head .wc-logo {
  width: 30px; height: 30px;
  background: #fff;
  color: #07c160;
  border-radius: 8px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
}
.wc-head .wc-name { font-size: 17px; font-weight: 700; }
.wc-head .close { font-size: 24px; color: #fff; cursor: pointer; line-height: 1; }
.wc-body { padding: 26px 28px 24px; text-align: center; }
.wc-tip { color: #999; font-size: 13px; margin-bottom: 16px; }
.wc-qr {
  width: 200px; height: 200px;
  margin: 0 auto 14px;
  border: 1px solid #eee;
  border-radius: 10px;
  padding: 8px;
  background: #fff;
}
.wc-qr img { width: 100%; height: 100%; object-fit: contain; }
.wc-amount { font-size: 30px; font-weight: 800; color: #222; margin-bottom: 16px; }
.wc-amount b { color: #07c160; }
.wc-order { background: #f7f8fa; border-radius: 10px; padding: 12px 16px; text-align: left; font-size: 13px; color: #888; margin-bottom: 18px; }
.wc-row { display: flex; justify-content: space-between; padding: 5px 0; }
.wc-row b { color: #333; }
.wc-done {
  width: 100%;
  padding: 12px;
  border: none;
  border-radius: 24px;
  background: #07c160;
  color: #fff;
  font-size: 15px;
  cursor: pointer;
}
.wc-done:hover { background: #06ad56; }

@media (max-width: 640px) {
  .checkout-panel .co-row { grid-template-columns: 1fr; }
  .cart-item { flex-wrap: wrap; }
  .ci-sub { width: auto; }
}
