/* Reset & Base */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary: #16a34a;
  --primary-dark: #15803d;
  --primary-light: #dcfce7;
  --secondary: #f97316;
  --text: #1f2937;
  --text-light: #6b7280;
  --bg: #f9fafb;
  --white: #ffffff;
  --border: #e5e7eb;
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Header */
.header {
  background: var(--white);
  box-shadow: var(--shadow);
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
}

.header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: 70px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--primary);
  font-size: 1.02rem;
  font-weight: 700;
  white-space: nowrap;
  flex: none;
}

.logo-mark {
  width: 40px;
  height: 40px;
  flex: none;
  display: block;
}

.logo i {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
}

.nav {
  display: flex;
  gap: 20px;
  margin-left: auto;
}

.nav-link {
  text-decoration: none;
  color: var(--text);
  font-size: 14px;
  font-weight: 500;
  padding: 8px 0;
  position: relative;
  white-space: nowrap;
  transition: color 0.3s;
}

.nav-link:hover,
.nav-link.active {
  color: var(--primary);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary);
  transition: width 0.3s;
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  flex: none;
}

.cart-btn,
.login-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: var(--text);
  font-weight: 500;
  position: relative;
}

/* 返回嘉谷万禾信息服务平台 */
.platform-entry {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border: 1px solid rgba(22, 163, 74, 0.35);
  border-radius: 999px;
  background: var(--primary-light);
  color: var(--primary-dark);
  font-size: 13.5px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  transition: all 0.3s;
}

.platform-entry:hover {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--white);
}

/* 窄屏自适应：先收成图标，再让位给手机菜单里的入口 */
@media (max-width: 768px) {
  .platform-entry {
    padding: 8px 10px;
  }

  .platform-entry span {
    display: none;
  }
}

@media (max-width: 640px) {
  .platform-entry {
    display: none;
  }

  .header-content {
    gap: 12px;
  }

  .logo {
    font-size: 0.82rem;
    gap: 7px;
  }

  .logo i {
    width: 32px;
    height: 32px;
    font-size: 0.95rem;
  }

  .header-actions {
    gap: 10px;
  }
}

/* 超窄屏：公司全称压到最小可读字号，登录收为图标，保住汉堡按钮 */
@media (max-width: 480px) {
  .logo {
    font-size: 0.75rem;
    gap: 6px;
  }

  .header-actions {
    gap: 9px;
  }

  .login-btn span {
    display: none;
  }
}

.cart-count {
  position: absolute;
  top: -8px;
  right: -8px;
  width: 20px;
  height: 20px;
  background: #ef4444;
  color: var(--white);
  border-radius: 50%;
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
}

.mobile-menu {
  display: none;
  position: fixed;
  top: 70px;
  left: 0;
  right: 0;
  background: var(--white);
  box-shadow: var(--shadow);
  padding: 20px;
  flex-direction: column;
  gap: 15px;
}

.mobile-menu a {
  text-decoration: none;
  color: var(--text);
  padding: 10px;
  border-radius: 8px;
  transition: background 0.3s;
}

.mobile-menu a:hover {
  background: var(--primary-light);
  color: var(--primary);
}

/* Buttons */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: var(--white);
  padding: 12px 30px;
  border-radius: 25px;
  text-decoration: none;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all 0.3s;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 20px -10px rgba(22, 163, 74, 0.5);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--primary-light);
  color: var(--primary);
  padding: 12px 30px;
  border-radius: 25px;
  text-decoration: none;
  font-weight: 600;
  border: 2px solid var(--primary);
  cursor: pointer;
  transition: all 0.3s;
}

.btn-secondary:hover {
  background: var(--primary);
  color: var(--white);
}

.btn-full {
  width: 100%;
}

/* Hero */
.hero {
  position: relative;
  height: 500px;
  overflow: hidden;
}

.hero-slide {
  position: relative;
  height: 100%;
}

.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-content {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  color: var(--white);
  z-index: 2;
}

.hero-content::before {
  content: '';
  position: absolute;
  inset: -40px;
  background: rgba(0, 0, 0, 0.4);
  border-radius: 20px;
  z-index: -1;
}

.hero-content h1 {
  font-size: 3.5rem;
  margin-bottom: 15px;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.hero-content p {
  font-size: 1.3rem;
  margin-bottom: 30px;
  opacity: 0.95;
}

/* Features */
.features {
  padding: 60px 0;
  background: var(--white);
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px;
}

.feature-item {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 25px;
  background: var(--bg);
  border-radius: 15px;
  transition: all 0.3s;
}

.feature-item:hover {
  background: var(--primary-light);
}

.feature-item i {
  width: 50px;
  height: 50px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-size: 1.3rem;
}

.feature-item h3 {
  font-size: 1.1rem;
  margin-bottom: 5px;
}

.feature-item p {
  color: var(--text-light);
  font-size: 0.9rem;
}

/* Categories */
.categories {
  padding: 80px 0;
}

.section-title {
  text-align: center;
  font-size: 2.5rem;
  margin-bottom: 50px;
  color: var(--text);
}

.categories-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
}

.category-card {
  background: var(--white);
  border-radius: 20px;
  padding: 40px;
  text-align: center;
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: all 0.3s;
  border: 1px solid var(--border);
}

.category-card:hover {
  transform: translateY(-10px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary);
}

.category-icon {
  width: 80px;
  height: 80px;
  background: var(--primary-light);
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
}

.category-icon i {
  font-size: 2.5rem;
  color: var(--primary);
}

.category-card h3 {
  font-size: 1.5rem;
  margin-bottom: 10px;
}

.category-card p {
  color: var(--text-light);
  margin-bottom: 20px;
}

.category-link {
  color: var(--primary);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

/* Products */
.products {
  padding: 80px 0;
  background: var(--white);
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 25px;
}

.product-card {
  background: var(--white);
  border-radius: 15px;
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: all 0.3s;
  border: 1px solid var(--border);
}

.product-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
}

.product-image {
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
}

.product-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s;
}

.product-card:hover .product-image img {
  transform: scale(1.05);
}

.product-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  background: #ef4444;
  color: var(--white);
  padding: 5px 10px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
}

.product-discount {
  position: absolute;
  top: 10px;
  right: 10px;
  background: #fef3c7;
  color: #92400e;
  padding: 5px 10px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
}

.product-info {
  padding: 20px;
}

.product-info h3 {
  font-size: 1.1rem;
  margin-bottom: 8px;
  cursor: pointer;
}

.product-info h3:hover {
  color: var(--primary);
}

.product-info p {
  color: var(--text-light);
  font-size: 0.9rem;
  margin-bottom: 15px;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-price-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.product-price {
  display: flex;
  align-items: center;
  gap: 10px;
}

.price {
  font-size: 1.3rem;
  font-weight: 700;
  color: #ef4444;
}

.original-price {
  font-size: 0.9rem;
  color: var(--text-light);
  text-decoration: line-through;
}

.add-cart-btn {
  width: 40px;
  height: 40px;
  background: var(--primary);
  color: var(--white);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.3s;
}

.add-cart-btn:hover {
  background: var(--primary-dark);
  transform: scale(1.1);
}

/* CTA */
.cta {
  padding: 100px 0;
  background: linear-gradient(135deg, #f0fdf4, #dcfce7);
  text-align: center;
}

.cta h2 {
  font-size: 2.5rem;
  margin-bottom: 20px;
}

.cta p {
  font-size: 1.2rem;
  color: var(--text-light);
  margin-bottom: 30px;
}

/* Category Page */
.category-header {
  background: var(--white);
  padding: 40px 0;
  border-bottom: 1px solid var(--border);
}

.category-info {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 30px;
}

.category-icon-large {
  width: 80px;
  height: 80px;
  background: var(--primary-light);
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.category-icon-large i {
  font-size: 2.5rem;
  color: var(--primary);
}

.category-info h1 {
  font-size: 2rem;
  margin-bottom: 5px;
}

.category-info p {
  color: var(--text-light);
}

.category-tabs {
  display: flex;
  gap: 15px;
}

.tab {
  padding: 10px 25px;
  border-radius: 25px;
  text-decoration: none;
  color: var(--text);
  background: var(--bg);
  transition: all 0.3s;
}

.tab:hover,
.tab.active {
  background: var(--primary);
  color: var(--white);
}

/* Product Detail */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 20px 0;
  color: var(--text-light);
}

.breadcrumb a {
  color: var(--text-light);
  text-decoration: none;
}

.breadcrumb a:hover {
  color: var(--primary);
}

.product-detail {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 50px;
  background: var(--white);
  padding: 40px;
  border-radius: 20px;
  margin-bottom: 40px;
}

.product-main-image {
  aspect-ratio: 1;
  border-radius: 15px;
  overflow: hidden;
  background: var(--bg);
}

.product-main-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-info h1 {
  font-size: 2rem;
  margin-bottom: 10px;
}

.product-rating {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 20px;
}

.stars {
  color: #fbbf24;
}

.product-price-box {
  background: var(--bg);
  padding: 25px;
  border-radius: 15px;
  margin-bottom: 25px;
}

.product-price-box .price {
  font-size: 2.5rem;
}

.product-meta {
  display: grid;
  /* grid-template-columns: 1fr 1fr; */
  gap: 15px;
  margin-bottom: 25px;
  color: var(--text-light);
}

.product-meta i {
  color: var(--primary);
  margin-right: 5px;
}

/* 商品详情页：对应店铺联系电话 */
.product-meta .product-shop-phone {
  color: var(--primary);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-decoration: none;
}

.product-meta .product-shop-phone:hover {
  color: var(--primary-dark);
  text-decoration: underline;
}

.product-quantity {
  margin-bottom: 25px;
}

.product-quantity > span {
  display: block;
  margin-bottom: 10px;
  font-weight: 600;
}

.quantity-selector {
  display: flex;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 8px;
  width: fit-content;
}

.quantity-selector button {
  width: 40px;
  height: 40px;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1.2rem;
}

.quantity-selector input {
  width: 60px;
  height: 40px;
  border: none;
  text-align: center;
  font-weight: 600;
}

.product-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  margin-bottom: 25px;
}

.product-actions button {
  flex: 1 1 46%;
  padding: 15px 24px;
  white-space: nowrap;
}

.product-service {
  display: flex;
  gap: 30px;
  color: var(--text-light);
}

.product-service i {
  color: var(--primary);
  margin-right: 5px;
}

.product-detail-section {
  background: var(--white);
  padding: 40px;
  border-radius: 20px;
}

.product-detail-section h2 {
  font-size: 1.5rem;
  margin-bottom: 30px;
  padding-bottom: 15px;
  border-bottom: 2px solid var(--border);
}

.detail-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
}

.detail-content img {
  width: 100%;
  border-radius: 15px;
}

.detail-text h3 {
  font-size: 1.3rem;
  margin-bottom: 15px;
}

.detail-text p {
  color: var(--text-light);
  line-height: 1.8;
  margin-bottom: 25px;
}

.nutrition-info {
  background: var(--primary-light);
  padding: 25px;
  border-radius: 15px;
}

.nutrition-info h4 {
  color: var(--primary-dark);
  margin-bottom: 15px;
}

.nutrition-info ul {
  list-style: none;
}

.nutrition-info li {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  color: var(--primary-dark);
}

.nutrition-info i {
  color: var(--primary);
}

/* Cart */
.page-title {
  font-size: 2rem;
  margin: 40px 0;
}

.cart-empty {
  text-align: center;
  padding: 80px 20px;
}

.cart-empty i {
  font-size: 5rem;
  color: var(--border);
  margin-bottom: 20px;
}

.cart-empty h2 {
  font-size: 1.5rem;
  margin-bottom: 10px;
}

.cart-empty p {
  color: var(--text-light);
  margin-bottom: 30px;
}

.cart-content {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 30px;
}

.cart-items {
  background: var(--white);
  border-radius: 15px;
  padding: 20px;
}

.cart-item {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 20px 0;
  border-bottom: 1px solid var(--border);
}

.cart-item:last-child {
  border-bottom: none;
}

.cart-item img {
  width: 100px;
  height: 100px;
  border-radius: 10px;
  object-fit: cover;
}

.cart-item-info {
  flex: 1;
}

.cart-item-info h3 {
  font-size: 1.1rem;
  margin-bottom: 5px;
}

.cart-item-info p {
  color: var(--text-light);
  font-size: 0.9rem;
}

.cart-item-price {
  text-align: right;
}

.cart-item-price .price {
  font-size: 1.2rem;
  color: #ef4444;
}

.cart-item-price .unit {
  color: var(--text-light);
  font-size: 0.85rem;
}

.cart-summary {
  background: var(--white);
  border-radius: 15px;
  padding: 30px;
  position: sticky;
  top: 100px;
}

.cart-summary h3 {
  font-size: 1.3rem;
  margin-bottom: 25px;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 15px;
  color: var(--text-light);
}

.summary-row.total {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text);
  padding-top: 15px;
  border-top: 1px solid var(--border);
}

.summary-row .free {
  color: var(--primary);
}

.summary-row .total-price {
  font-size: 1.5rem;
  color: #ef4444;
}

.continue-shopping {
  display: block;
  text-align: center;
  margin-top: 20px;
  color: var(--primary);
  text-decoration: none;
}

/* Checkout */
.checkout-steps {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 30px 0;
  color: var(--text-light);
}

.checkout-steps .active {
  color: var(--text);
  font-weight: 600;
}

.checkout-content {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 30px;
}

.checkout-section {
  background: var(--white);
  border-radius: 15px;
  padding: 30px;
  margin-bottom: 20px;
}

.checkout-section h3 {
  font-size: 1.2rem;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.checkout-section h3 i {
  color: var(--primary);
}

.address-list {
  margin-bottom: 20px;
}

.address-item {
  border: 2px solid var(--border);
  border-radius: 10px;
  padding: 20px;
  margin-bottom: 15px;
  cursor: pointer;
  transition: all 0.3s;
}

.address-item:hover,
.address-item.selected {
  border-color: var(--primary);
  background: var(--primary-light);
}

.address-item-header {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 10px;
}

.address-item-header .name {
  font-weight: 600;
}

.address-item-header .phone {
  color: var(--text-light);
}

.address-item-header .default {
  background: var(--primary);
  color: var(--white);
  padding: 3px 10px;
  border-radius: 15px;
  font-size: 0.75rem;
}

.btn-add-address {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 15px;
  border: 1px dashed var(--border);
  border-radius: 10px;
  background: none;
  color: var(--primary);
  cursor: pointer;
  transition: all 0.3s;
}

.btn-add-address:hover {
  border-color: var(--primary);
  background: var(--primary-light);
}

.checkout-items {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.checkout-item {
  display: flex;
  gap: 20px;
}

.checkout-item img {
  width: 80px;
  height: 80px;
  border-radius: 10px;
  object-fit: cover;
}

.checkout-item-info {
  flex: 1;
}

.checkout-item-info h4 {
  font-size: 1rem;
  margin-bottom: 5px;
}

.checkout-item-info p {
  color: var(--text-light);
  font-size: 0.9rem;
}

.checkout-item-price {
  text-align: right;
}

.checkout-item-price .price {
  font-size: 1.1rem;
  color: #ef4444;
}

.checkout-summary {
  background: var(--white);
  border-radius: 15px;
  padding: 30px;
  position: sticky;
  top: 100px;
}

/* Auth Pages */
.auth-container {
  min-height: calc(100vh - 70px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  background: linear-gradient(135deg, #f0fdf4, #dcfce7);
}

.auth-box {
  background: var(--white);
  border-radius: 20px;
  padding: 50px;
  width: 100%;
  max-width: 450px;
  box-shadow: var(--shadow-lg);
}

.auth-header {
  text-align: center;
  margin-bottom: 40px;
}

.auth-header i {
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  border-radius: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-size: 1.5rem;
  margin: 0 auto 20px;
}

.auth-header h2 {
  font-size: 1.8rem;
  margin-bottom: 10px;
}

.auth-header p {
  color: var(--text-light);
}

.register-steps {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  margin-bottom: 40px;
}

.register-steps .step {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  color: var(--text-light);
}

.register-steps .step.active {
  background: var(--primary);
  color: var(--white);
}

.register-steps .step-line {
  width: 60px;
  height: 2px;
  background: var(--border);
}

.auth-form {
  margin-bottom: 30px;
}

/* 登录页补充提示（结算前跳转登录时显示） */
.auth-tip {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 22px;
  padding: 11px 14px;
  background: var(--primary-light);
  color: var(--primary-dark);
  border-radius: 10px;
  font-size: 0.86rem;
  line-height: 1.5;
  text-align: left;
}

.auth-tip i {
  margin-top: 3px;
  color: var(--primary);
  flex-shrink: 0;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
}

.input-with-icon {
  position: relative;
}

.input-with-icon i:first-child {
  position: absolute;
  left: 15px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-light);
}

.input-with-icon input,
.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 12px 15px;
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 1rem;
  transition: all 0.3s;
}

.input-with-icon input {
  padding-left: 45px;
}

.input-with-icon input:focus,
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-light);
}

.toggle-password {
  position: absolute;
  right: 15px;
  top: 50%;
  transform: translateY(-50%);
  cursor: pointer;
  color: var(--text-light);
}

.form-options {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 25px;
}

.form-options a {
  color: var(--primary);
  text-decoration: none;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}

.checkbox-label input {
  width: auto;
}

.form-actions {
  display: flex;
  gap: 15px;
}

.form-actions button {
  flex: 1;
}

.auth-footer {
  text-align: center;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

.auth-footer a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
}

/* Merchant Page */
.merchant-hero {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: var(--white);
  padding: 80px 0;
  text-align: center;
}

.merchant-hero h1 {
  font-size: 2.5rem;
  margin-bottom: 15px;
}

.merchant-hero p {
  font-size: 1.1rem;
  opacity: 0.9;
}

.merchant-process {
  padding: 60px 0;
}

.merchant-process h2 {
  text-align: center;
  font-size: 2rem;
  margin-bottom: 50px;
}

.process-steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px;
}

.process-step {
  text-align: center;
  position: relative;
}

.process-step::after {
  content: '';
  position: absolute;
  top: 25px;
  left: 60%;
  width: 80%;
  height: 2px;
  background: var(--border);
}

.process-step:last-child::after {
  display: none;
}

.step-num {
  width: 50px;
  height: 50px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: var(--white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  font-weight: 700;
  margin: 0 auto 20px;
}

.process-step h3 {
  font-size: 1.2rem;
  margin-bottom: 5px;
}

.process-step p {
  color: var(--text-light);
}

.merchant-form-section {
  background: var(--white);
  border-radius: 20px;
  padding: 50px;
  margin-bottom: 60px;
}

.merchant-form-section h2 {
  text-align: center;
  font-size: 1.8rem;
  margin-bottom: 40px;
}

.merchant-form {
  max-width: 800px;
  margin: 0 auto;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.upload-area {
  border: 2px dashed var(--border);
  border-radius: 15px;
  padding: 40px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s;
}

.upload-area:hover {
  border-color: var(--primary);
  background: var(--primary-light);
}

.upload-area i {
  font-size: 3rem;
  color: var(--primary);
  margin-bottom: 15px;
}

.upload-area p {
  font-weight: 600;
  margin-bottom: 5px;
}

.upload-area span {
  color: var(--text-light);
  font-size: 0.9rem;
}

.merchant-success {
  text-align: center;
  padding: 60px 20px;
}

.merchant-success i {
  font-size: 4rem;
  color: var(--primary);
  margin-bottom: 20px;
}

.merchant-success h3 {
  font-size: 1.5rem;
  margin-bottom: 10px;
}

.merchant-success p {
  color: var(--text-light);
  margin-bottom: 30px;
}

/* About Page */
.about-hero {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: var(--white);
  padding: 80px 0;
  text-align: center;
}

.about-hero h1 {
  font-size: 2.5rem;
  margin-bottom: 15px;
}

.about-hero p {
  font-size: 1.1rem;
  opacity: 0.9;
}

.about-mission {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  padding: 80px 0;
  align-items: center;
}

.about-mission h2 {
  font-size: 2rem;
  margin-bottom: 25px;
}

.about-mission p {
  color: var(--text-light);
  line-height: 1.8;
  margin-bottom: 20px;
}

.mission-image img {
  width: 100%;
  border-radius: 20px;
  box-shadow: var(--shadow-lg);
}

.about-values {
  padding: 60px 0;
}

.about-values h2 {
  text-align: center;
  font-size: 2rem;
  margin-bottom: 50px;
}

.values-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px;
}

.value-item {
  text-align: center;
  padding: 40px 30px;
  background: var(--white);
  border-radius: 20px;
  box-shadow: var(--shadow);
  transition: all 0.3s;
}

.value-item:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

.value-item i {
  width: 60px;
  height: 60px;
  background: var(--primary-light);
  border-radius: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  font-size: 1.5rem;
  margin: 0 auto 20px;
}

.value-item h3 {
  font-size: 1.2rem;
  margin-bottom: 10px;
}

.value-item p {
  color: var(--text-light);
}

.about-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px;
  padding: 60px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  border-radius: 20px;
  margin-bottom: 60px;
}

.stat-item {
  text-align: center;
  color: var(--white);
}

.stat-num {
  font-size: 2.5rem;
  font-weight: 700;
  display: block;
  margin-bottom: 10px;
}

.stat-label {
  opacity: 0.9;
}

/* Contact Page */
.contact-hero {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: var(--white);
  padding: 80px 0;
  text-align: center;
}

.contact-hero h1 {
  font-size: 2.5rem;
  margin-bottom: 15px;
}

.contact-hero p {
  font-size: 1.1rem;
  opacity: 0.9;
}

.contact-info-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px;
  padding: 60px 0;
}

.contact-info-item {
  text-align: center;
  padding: 40px 30px;
  background: var(--white);
  border-radius: 20px;
  box-shadow: var(--shadow);
}

.contact-info-item i {
  width: 60px;
  height: 60px;
  background: var(--primary-light);
  border-radius: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  font-size: 1.5rem;
  margin: 0 auto 20px;
}

.contact-info-item h3 {
  font-size: 1.1rem;
  margin-bottom: 10px;
}

.contact-info-item p {
  color: var(--primary);
  font-weight: 600;
  margin-bottom: 5px;
}

.contact-info-item span {
  color: var(--text-light);
  font-size: 0.9rem;
}

.contact-form-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  padding-bottom: 60px;
}

.contact-form-wrapper {
  background: var(--white);
  border-radius: 20px;
  padding: 40px;
}

.contact-form-wrapper h2 {
  font-size: 1.5rem;
  margin-bottom: 30px;
}

.contact-form .form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.contact-map {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
}

.contact-map img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.map-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.7));
  color: var(--white);
  padding: 40px;
}

.contact-success {
  text-align: center;
  padding: 60px 20px;
}

.contact-success i {
  font-size: 4rem;
  color: var(--primary);
  margin-bottom: 20px;
}

.contact-success h3 {
  font-size: 1.5rem;
  margin-bottom: 10px;
}

.contact-success p {
  color: var(--text-light);
}

/* Footer */
.footer {
  background: #1f2937;
  color: var(--white);
  padding: 60px 0 30px;
}

.footer-content {
  display: grid;
  grid-template-columns: 2fr 3fr;
  gap: 60px;
  margin-bottom: 40px;
}

.footer-brand .logo {
  color: var(--white);
  margin-bottom: 20px;
}

.footer-brand p {
  color: #9ca3af;
  margin-bottom: 20px;
  line-height: 1.8;
}

.footer-contact {
  display: flex;
  flex-direction: column;
  gap: 10px;
  color: #9ca3af;
}

.footer-contact i {
  color: var(--primary);
  margin-right: 10px;
}

.footer-links {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
}

.footer-column h4 {
  font-size: 1.1rem;
  margin-bottom: 20px;
}

.footer-column a {
  display: block;
  color: #9ca3af;
  text-decoration: none;
  margin-bottom: 10px;
  transition: color 0.3s;
}

.footer-column a:hover {
  color: var(--primary);
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 30px;
  border-top: 1px solid #374151;
  color: #9ca3af;
}

.footer-social {
  display: flex;
  gap: 20px;
}

.footer-social a {
  color: #9ca3af;
  font-size: 1.3rem;
  transition: color 0.3s;
}

.footer-social a:hover {
  color: var(--primary);
}

/* Modal */
.modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 2000;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal.active {
  display: flex;
}

.modal-content {
  background: var(--white);
  border-radius: 20px;
  width: 100%;
  max-width: 500px;
  max-height: 90vh;
  overflow-y: auto;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 25px;
  border-bottom: 1px solid var(--border);
}

.modal-header h3 {
  font-size: 1.3rem;
}

.modal-close {
  background: none;
  border: none;
  font-size: 1.3rem;
  cursor: pointer;
  color: var(--text-light);
}

.address-form {
  padding: 25px;
}

.payment-modal {
  text-align: center;
  padding: 40px;
}

.payment-header i {
  font-size: 3rem;
  color: var(--primary);
  margin-bottom: 15px;
}

.payment-header h3 {
  font-size: 1.5rem;
  margin-bottom: 10px;
}

.payment-amount {
  font-size: 2rem;
  font-weight: 700;
  color: #ef4444;
  margin-bottom: 30px;
}

.qr-code {
  background: var(--bg);
  border-radius: 15px;
  padding: 40px;
  margin-bottom: 30px;
}

.qr-code i {
  font-size: 8rem;
  color: var(--text);
}

.qr-code p {
  color: var(--text-light);
  margin-top: 15px;
}

.payment-success-modal {
  text-align: center;
  padding: 50px;
}

.success-icon {
  font-size: 4rem;
  color: var(--primary);
  margin-bottom: 20px;
}

/* 轻提示（加购反馈） */
.toast-tip {
  position: fixed;
  left: 50%;
  bottom: 40px;
  transform: translate(-50%, 16px);
  background: rgba(17, 24, 39, 0.92);
  color: #fff;
  padding: 12px 24px;
  border-radius: 30px;
  font-size: 0.95rem;
  line-height: 1;
  white-space: nowrap;
  box-shadow: 0 10px 28px rgba(17, 24, 39, 0.22);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s, transform 0.25s;
  z-index: 9999;
}

.toast-tip.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* Utilities */
.hidden {
  display: none !important;
}

.page {
  min-height: calc(100vh - 70px);
  padding-top: 70px;
  padding-bottom: 40px;
}

/* Responsive */
@media (max-width: 1024px) {
  .nav {
    display: none;
  }

  .mobile-menu-btn {
    display: block;
  }

  .mobile-menu.active {
    display: flex;
  }

  .features-grid,
  .categories-grid,
  .products-grid,
  .values-grid,
  .about-stats,
  .contact-info-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .process-steps {
    grid-template-columns: repeat(2, 1fr);
  }

  .process-step::after {
    display: none;
  }

  .cart-content,
  .checkout-content,
  .about-mission,
  .contact-form-section {
    grid-template-columns: 1fr;
  }

  .product-detail {
    grid-template-columns: 1fr;
  }

  .detail-content {
    grid-template-columns: 1fr;
  }

  .footer-content {
    grid-template-columns: 1fr;
  }

  .footer-links {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 640px) {
  .features-grid,
  .categories-grid,
  .products-grid,
  .values-grid,
  .about-stats,
  .contact-info-grid,
  .process-steps,
  .footer-links {
    grid-template-columns: 1fr;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .hero-content h1 {
    font-size: 2rem;
  }

  .section-title {
    font-size: 1.8rem;
  }

  .auth-box {
    padding: 30px;
  }

  .merchant-form-section {
    padding: 30px;
  }
}

/* 地址中的园区名不拆行 */
.nowrap {
  white-space: nowrap;
}

.item-link {
  color: #c9d6e3;
  text-decoration: none;
  transition: color 0.3s;
}

.item-link:hover {
  color: #ffffff;
  text-decoration: underline;
}

/* ===== 店铺列表 / 店铺详情 ===== */
/* 店铺页头无分类标签，取消标题块的下留白 */
.shops-header .category-info {
  margin-bottom: 0;
}

.shop-list-wrap {
  padding-top: 45px;
  padding-bottom: 40px;
}

.shops-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 25px;
}

.shop-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 22px;
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: all 0.3s;
  display: flex;
  flex-direction: column;
}

.shop-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary);
}

.shop-card-top {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
}

.shop-avatar {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  flex: none;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: var(--white);
  font-size: 1.35rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.shop-card-top h3 {
  font-size: 1rem;
  line-height: 1.4;
  margin-bottom: 4px;
}

.shop-cats {
  font-size: 0.82rem;
  color: var(--text-light);
}

.shop-thumbs {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  gap: 8px;
  margin-bottom: 14px;
}

.shop-thumbs img {
  width: 100%;
  height: 96px;
  object-fit: cover;
  border-radius: 10px;
  display: block;
  background: var(--bg);
  cursor: pointer;
  transition: opacity 0.3s;
}

.shop-thumbs img:hover {
  opacity: 0.85;
}

.shop-highlight {
  font-size: 0.85rem;
  color: var(--text-light);
  line-height: 1.6;
  margin-bottom: 14px;
  min-height: 2.7em;
}

.shop-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  font-size: 0.82rem;
  color: var(--text-light);
  padding-bottom: 14px;
  border-bottom: 1px dashed var(--border);
  margin-top: auto;
}

.shop-card-meta i {
  color: var(--primary);
  margin-right: 3px;
}

.shop-card-foot {
  padding-top: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

/* 店铺联系电话 */
.shop-phone {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
  letter-spacing: 0.02em;
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.2s;
}

.shop-phone i {
  color: var(--primary);
  font-size: 0.9rem;
}

.shop-phone:hover {
  color: var(--primary);
}

.shop-enter {
  color: var(--primary);
  font-weight: 600;
  font-size: 0.9rem;
}

/* 单店页联系方式 */
.shop-contact {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px dashed var(--border);
  font-size: 0.88rem;
}

.shop-contact-label {
  color: var(--text-light);
}

.shop-contact-label i {
  color: var(--primary);
  margin-right: 4px;
}

.shop-contact-phone {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--primary);
  letter-spacing: 0.03em;
  text-decoration: none;
}

.shop-contact-phone:hover {
  color: var(--primary-dark);
  text-decoration: underline;
}

.shop-contact-tip {
  color: var(--text-light);
  font-size: 0.82rem;
}

/* 单店页 */
.shop-banner {
  display: flex;
  align-items: center;
  gap: 20px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 26px;
  box-shadow: var(--shadow);
}

.shop-avatar-lg {
  width: 72px;
  height: 72px;
  border-radius: 18px;
  font-size: 1.8rem;
}

.shop-banner-main {
  flex: 1;
  min-width: 0;
}

.shop-banner-main h1 {
  font-size: 1.55rem;
  margin-bottom: 6px;
  word-break: break-word;
}

.shop-banner-main > p {
  color: var(--text-light);
  font-size: 0.92rem;
  line-height: 1.6;
  margin-bottom: 10px;
}

.shop-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 20px;
  font-size: 0.88rem;
  color: var(--text-light);
}

.shop-stats strong {
  color: var(--primary);
}

.shop-stats i {
  color: var(--primary);
  margin-right: 4px;
}

.shop-back-btn {
  flex: none;
}

.shop-products-title {
  font-size: 1.5rem;
  text-align: left;
  margin: 40px 0 25px;
}

/* 商品详情页里的店铺名可点击 */
.shop-link {
  color: var(--primary);
  font-weight: 600;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.shop-link i {
  font-size: 0.7rem;
}

.shop-link:hover {
  text-decoration: underline;
}

@media (max-width: 1024px) {
  .shops-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .shops-grid {
    grid-template-columns: 1fr;
  }

  .shop-list-wrap {
    padding-top: 28px;
  }

  .shop-banner {
    flex-wrap: wrap;
    padding: 20px;
  }

  .shop-banner-main h1 {
    font-size: 1.2rem;
  }

  .shop-back-btn {
    width: 100%;
    justify-content: center;
  }

  .shop-contact {
    gap: 6px 10px;
  }

  .shop-contact-phone {
    font-size: 1rem;
  }

  .shop-contact-tip {
    flex-basis: 100%;
  }
}
