/* 好润环保产品手册 - 全局样式 */

:root {
  --primary: #FF5A3C;
  --primary-dark: #E84A2E;
  --primary-light: #FF7A5C;
  --blue: #00B4D8;
  --blue-dark: #0095B8;
  --blue-light: #33D1EF;
  --yellow: #F5B800;
  --cream: #F5EFDF;
  --cream-dark: #EDE5D5;
  --bg: #FAF8F4;
  --white: #ffffff;
  --text: #2C2C2C;
  --text-light: #666666;
  --text-muted: #999999;
  --border: #E8E0D0;
  --shadow: 0 4px 20px rgba(0,0,0,0.08);
  --shadow-hover: 0 8px 30px rgba(0,0,0,0.12);
  --radius: 12px;
  --radius-lg: 20px;
  --transition: all 0.3s ease;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}

a { text-decoration: none; color: inherit; }
button { cursor: pointer; border: none; font-family: inherit; }
img { max-width: 100%; display: block; }

/* ====== 导航栏 ====== */
.navbar {
  background: var(--white);
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
  position: sticky;
  top: 0;
  z-index: 100;
}

.navbar-inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 18px;
  color: var(--text);
}

.logo-img {
  height: 40px;
  width: auto;
  display: block;
}

.logo-icon {
  width: 36px;
  height: 36px;
  background: var(--primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 14px;
}

.nav-links {
  display: flex;
  gap: 8px;
  align-items: center;
}

.nav-link {
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 14px;
  color: var(--text-light);
  transition: var(--transition);
  font-weight: 500;
}

.nav-link:hover, .nav-link.active {
  background: var(--cream);
  color: var(--primary);
}

.nav-btn {
  padding: 8px 20px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  transition: var(--transition);
}

.nav-btn.primary {
  background: var(--primary);
  color: white;
}

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

.nav-btn.ghost {
  background: transparent;
  color: var(--text-light);
  border: 1px solid var(--border);
}

.nav-btn.ghost:hover { background: var(--cream); }

/* ====== 页面容器 ====== */
.page { display: none; animation: fadeIn 0.3s ease; }
.page.active { display: block; }

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 24px;
}

/* ====== Hero 区域 ====== */
.hero {
  background: linear-gradient(135deg, var(--cream) 0%, var(--bg) 100%);
  padding: 60px 24px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -10%;
  width: 500px;
  height: 500px;
  background: var(--blue);
  opacity: 0.08;
  border-radius: 50%;
}

.hero::after {
  content: '';
  position: absolute;
  bottom: -30%;
  left: -5%;
  width: 300px;
  height: 300px;
  background: var(--primary);
  opacity: 0.06;
  border-radius: 50%;
}

.hero h1 {
  font-size: 42px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 12px;
  position: relative;
}

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

.hero p {
  font-size: 16px;
  color: var(--text-light);
  max-width: 600px;
  margin: 0 auto 28px;
  position: relative;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--white);
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 13px;
  color: var(--text-muted);
  box-shadow: var(--shadow);
  position: relative;
}

.hero-badge .dot {
  width: 8px;
  height: 8px;
  background: var(--primary);
  border-radius: 50%;
}

/* ====== 搜索栏 ====== */
.search-bar {
  max-width: 700px;
  margin: 0 auto 32px;
  position: relative;
}

.search-bar input {
  width: 100%;
  padding: 14px 20px 14px 48px;
  border: 2px solid var(--border);
  border-radius: 12px;
  font-size: 15px;
  transition: var(--transition);
  background: var(--white);
}

.search-bar input:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 4px rgba(0, 180, 216, 0.1);
}

.search-bar svg {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
}

/* ====== 分类标签 ====== */
.category-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 32px;
}

.cat-tab {
  padding: 10px 20px;
  border-radius: 24px;
  border: 2px solid var(--border);
  background: var(--white);
  font-size: 14px;
  font-weight: 500;
  color: var(--text-light);
  transition: var(--transition);
  cursor: pointer;
}

.cat-tab:hover {
  border-color: var(--blue);
  color: var(--blue);
}

.cat-tab.active {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
}

/* ====== 子分类 ====== */
.subcategory-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 24px;
  padding: 0 8px;
}

.sub-tab {
  padding: 6px 14px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: var(--white);
  font-size: 13px;
  color: var(--text-muted);
  transition: var(--transition);
  cursor: pointer;
}

.sub-tab:hover {
  border-color: var(--blue);
  color: var(--blue);
}

.sub-tab.active {
  background: var(--blue);
  border-color: var(--blue);
  color: white;
}

/* ====== 产品网格 ====== */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
  margin-bottom: 40px;
}

.product-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: var(--transition);
  cursor: pointer;
  position: relative;
}

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

.product-card .image-wrap {
  position: relative;
  aspect-ratio: 4/3;
  overflow: hidden;
  background: var(--cream);
}

.product-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition);
}

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

.product-card .eco-tag {
  position: absolute;
  top: 12px;
  left: 12px;
  background: var(--blue);
  color: white;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
}

.product-card .card-body {
  padding: 20px;
}

.product-card .category-tag {
  font-size: 12px;
  color: var(--primary);
  font-weight: 600;
  margin-bottom: 6px;
}

.product-card h3 {
  font-size: 17px;
  font-weight: 600;
  margin-bottom: 8px;
  line-height: 1.4;
}

.product-card .desc {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 14px;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-card .card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.product-card .price {
  font-size: 22px;
  font-weight: 700;
  color: var(--primary);
}

.product-card .price-unit {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 400;
}

.product-card .btn-view {
  padding: 8px 18px;
  background: var(--cream);
  color: var(--text);
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  transition: var(--transition);
}

.product-card .btn-view:hover {
  background: var(--primary);
  color: white;
}

/* ====== 产品详情页 ====== */
.product-detail {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px;
}

.back-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: var(--cream);
  border-radius: 8px;
  font-size: 14px;
  color: var(--text-light);
  margin-bottom: 24px;
  transition: var(--transition);
  border: none;
  cursor: pointer;
}

.back-btn:hover {
  background: var(--border);
  color: var(--text);
}

.detail-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  background: var(--white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.detail-images {
  padding: 32px;
  background: var(--cream);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.main-image {
  width: 100%;
  aspect-ratio: 1;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
}

.main-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.thumb-images {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.thumb-images img {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border-radius: 8px;
  cursor: pointer;
  border: 2px solid transparent;
  transition: var(--transition);
}

.thumb-images img:hover, .thumb-images img.active {
  border-color: var(--primary);
}

.detail-info {
  padding: 32px;
}

.detail-info .product-title {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 8px;
}

.detail-info .product-desc {
  font-size: 15px;
  color: var(--text-light);
  margin-bottom: 24px;
}

.detail-section {
  margin-bottom: 24px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border);
}

.detail-section:last-child { border-bottom: none; }

.detail-section h4 {
  font-size: 14px;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.spec-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.spec-item {
  display: flex;
  justify-content: space-between;
  padding: 10px 14px;
  background: var(--bg);
  border-radius: 8px;
  font-size: 14px;
}

.spec-item .label { color: var(--text-muted); }
.spec-item .value { font-weight: 500; color: var(--text); }

.price-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.price-table th, .price-table td {
  padding: 10px 14px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.price-table th {
  font-weight: 600;
  color: var(--text-muted);
  font-size: 12px;
  text-transform: uppercase;
}

.price-table td.price-cell {
  font-weight: 600;
  color: var(--primary);
  font-size: 15px;
}

.color-options {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.color-chip {
  padding: 6px 14px;
  border-radius: 16px;
  border: 1px solid var(--border);
  font-size: 13px;
  background: var(--white);
}

.customization-info {
  background: var(--cream);
  padding: 16px;
  border-radius: 8px;
  font-size: 14px;
  line-height: 1.8;
}

.customization-info p {
  margin-bottom: 4px;
}

/* ====== 管理后台 ====== */
.admin-page { background: #f0f2f5; min-height: 100vh; }

.admin-header {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
}

.admin-header h2 {
  font-size: 18px;
  font-weight: 600;
}

.admin-body {
  max-width: 1400px;
  margin: 0 auto;
  padding: 24px;
}

.admin-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 24px;
  background: var(--white);
  padding: 4px;
  border-radius: 8px;
  width: fit-content;
}

.admin-tab {
  padding: 8px 16px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  border: none;
  background: transparent;
  color: var(--text-light);
}

.admin-tab:hover { background: var(--bg); }
.admin-tab.active { background: var(--primary); color: white; }

.admin-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
  margin-bottom: 24px;
}

.admin-card h3 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 20px;
}

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

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group.full { grid-column: span 2; }

.form-group label {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-light);
}

.form-group input,
.form-group textarea,
.form-group select {
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 14px;
  transition: var(--transition);
  font-family: inherit;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(0, 180, 216, 0.1);
}

.form-group textarea { resize: vertical; min-height: 80px; }

.image-upload-zone {
  border: 2px dashed var(--border);
  border-radius: 8px;
  padding: 24px;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
}

.image-upload-zone:hover {
  border-color: var(--blue);
  background: rgba(0, 180, 216, 0.05);
}

.uploaded-images {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.uploaded-images .img-wrap {
  position: relative;
  width: 100px;
  height: 100px;
}

.uploaded-images img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 8px;
}

.uploaded-images .remove-img {
  position: absolute;
  top: -6px;
  right: -6px;
  width: 22px;
  height: 22px;
  background: var(--primary);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  cursor: pointer;
  border: 2px solid white;
}

.btn {
  padding: 10px 24px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  transition: var(--transition);
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

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

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

.btn-secondary {
  background: var(--blue);
  color: white;
}

.btn-secondary:hover { background: var(--blue-dark); }

.btn-ghost {
  background: transparent;
  color: var(--text-light);
  border: 1px solid var(--border);
}

.btn-ghost:hover { background: var(--bg); }

.btn-danger {
  background: #EF4444;
  color: white;
}

.btn-danger:hover { background: #DC2626; }

.btn-sm { padding: 6px 14px; font-size: 13px; }

/* 产品列表表格 */
.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.admin-table th, .admin-table td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.admin-table th {
  font-weight: 600;
  color: var(--text-muted);
  font-size: 12px;
  text-transform: uppercase;
  background: var(--bg);
}

.admin-table td {
  vertical-align: middle;
}

.admin-table tr:hover { background: var(--bg); }

.admin-table .product-thumb {
  width: 48px;
  height: 48px;
  object-fit: cover;
  border-radius: 6px;
}

.admin-table .actions {
  display: flex;
  gap: 8px;
}

/* 登录页 */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--cream);
}

.login-card {
  background: var(--white);
  padding: 40px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  width: 100%;
  max-width: 400px;
}

.login-card h2 {
  text-align: center;
  margin-bottom: 24px;
  font-size: 22px;
}

.login-card .form-group { margin-bottom: 16px; }
.login-card .btn { width: 100%; justify-content: center; margin-top: 8px; }

/* 弹窗 */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 200;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.modal-overlay.active { display: flex; }

.modal {
  background: var(--white);
  border-radius: var(--radius-lg);
  max-width: 800px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0,0,0,0.2);
  animation: modalIn 0.3s ease;
}

@keyframes modalIn {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

.modal-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-header h3 { font-size: 18px; font-weight: 600; }

.modal-close {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--bg);
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 18px;
  color: var(--text-muted);
}

.modal-close:hover { background: var(--border); color: var(--text); }

.modal-body { padding: 24px; }
.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 12px;
  justify-content: flex-end;
}

/* 空状态 */
.empty-state {
  text-align: center;
  padding: 60px 24px;
  color: var(--text-muted);
}

.empty-state svg {
  width: 64px;
  height: 64px;
  margin-bottom: 16px;
  opacity: 0.5;
}

/* Toast */
.toast-container {
  position: fixed;
  top: 80px;
  right: 24px;
  z-index: 300;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toast {
  padding: 12px 20px;
  border-radius: 8px;
  color: white;
  font-size: 14px;
  font-weight: 500;
  animation: slideIn 0.3s ease;
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  gap: 8px;
}

.toast.success { background: #10B981; }
.toast.error { background: #EF4444; }
.toast.info { background: var(--blue); }

@keyframes slideIn {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* Footer */
.footer {
  background: var(--text);
  color: white;
  padding: 40px 24px;
  margin-top: 60px;
}

.footer-inner {
  max-width: 1400px;
  margin: 0 auto;
  text-align: center;
}

.footer .brand {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 8px;
}

.footer .tagline {
  font-size: 14px;
  opacity: 0.7;
  margin-bottom: 16px;
}

.footer .copyright {
  font-size: 13px;
  opacity: 0.5;
}

.footer .beian {
  margin-top: 14px;
  font-size: 12px;
  opacity: 0.6;
}

.footer .beian a {
  color: inherit;
  text-decoration: none;
  transition: opacity 0.2s;
}

.footer .beian a:hover {
  opacity: 0.85;
  text-decoration: underline;
}

/* ====== 联系我们 ====== */
.contact-section {
  background: var(--white);
  padding: 60px 24px;
  margin-top: 60px;
  border-top: 1px solid var(--border);
}

.contact-header {
  max-width: 1400px;
  margin: 0 auto 36px;
  text-align: center;
}

.section-title {
  font-size: 28px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 10px;
  letter-spacing: 0.5px;
}

.section-title::after {
  content: '';
  display: block;
  width: 48px;
  height: 3px;
  background: var(--primary);
  margin: 14px auto 0;
  border-radius: 2px;
}

.section-subtitle {
  color: var(--text-muted);
  font-size: 14px;
}

.contact-avatar {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  background: var(--bg);
  border: 3px solid var(--cream-dark);
  box-shadow: var(--shadow);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary-light);
  flex-shrink: 0;
}

.contact-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.contact-avatar img ~ .contact-avatar-icon {
  display: none;
}

.contact-avatar-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  color: var(--primary-light);
}

.contact-qr-hint {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: -10px;
}

.contact-grid {
  max-width: 1400px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.contact-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px 20px 22px;
  text-align: center;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.contact-card:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px);
}

.contact-qr {
  width: 160px;
  height: 160px;
  border-radius: 12px;
  overflow: hidden;
  background: var(--cream);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
}

.contact-qr img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.contact-info {
  width: 100%;
}

.contact-name {
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
}

.contact-title {
  font-size: 13px;
  color: var(--primary);
  min-height: 0;
  margin-top: -8px;
}

.contact-meta {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
  color: var(--text-light);
  text-align: left;
  padding-top: 10px;
  border-top: 1px dashed var(--border);
}

.contact-line {
  display: flex;
  align-items: center;
  gap: 6px;
  word-break: break-all;
}

.contact-icon {
  font-size: 13px;
  flex-shrink: 0;
}

.contact-empty {
  color: var(--text-muted);
  font-style: italic;
  justify-content: center;
}

/* ====== 管理后台 - 联系人 ====== */
.admin-contact-row {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px 18px;
  margin-bottom: 16px;
  background: var(--bg);
}

.admin-contact-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.admin-contact-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  background: var(--primary);
  color: white;
  border-radius: 50%;
  font-weight: 700;
  font-size: 13px;
}

.admin-contact-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 150px 150px;
  gap: 16px 20px;
  align-items: start;
}

.admin-contact-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.admin-contact-fields .form-group.full {
  grid-column: span 2;
}

.admin-contact-fields .form-group {
  margin: 0;
}

.admin-contact-fields .form-group label {
  font-size: 12px;
  margin-bottom: 4px;
}

.admin-contact-fields input {
  padding: 8px 10px;
  font-size: 13px;
}

.admin-contact-qr {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.admin-contact-media {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.admin-contact-avatar-preview {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  background: var(--cream);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.admin-contact-avatar-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.admin-contact-qr-preview {
  width: 160px;
  height: 160px;
  border-radius: 12px;
  background: var(--cream);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.admin-contact-qr-preview img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* ====== 响应式 ====== */
@media (max-width: 1100px) {
  .contact-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .navbar-inner { padding: 0 16px; }
  .nav-links { display: none; }
  .hero h1 { font-size: 28px; }
  .hero { padding: 40px 16px; }
  .products-grid { grid-template-columns: repeat(2, 1fr); gap: 16px; }
  .detail-layout { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .form-group.full { grid-column: span 1; }
  .spec-grid { grid-template-columns: 1fr; }
  .container { padding: 16px; }
  .admin-body { padding: 16px; }
  .contact-section { padding: 40px 16px; margin-top: 40px; }
  .contact-grid { grid-template-columns: 1fr; gap: 16px; }
  .contact-card { max-width: 420px; margin: 0 auto; }
  .admin-contact-body { grid-template-columns: 1fr; }
  .admin-contact-fields { grid-template-columns: 1fr; }
  .admin-contact-fields .form-group.full { grid-column: span 1; }
}

@media (max-width: 480px) {
  .products-grid { grid-template-columns: 1fr; }
  .product-card .card-footer { flex-direction: column; align-items: flex-start; gap: 8px; }
  .category-tabs { gap: 6px; }
  .cat-tab { padding: 8px 14px; font-size: 13px; }
}

/* 隐藏类 */
.hidden { display: none !important; }

/* Loading */
.loading-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 40px auto;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* 批量价格输入 */
.price-inputs {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.price-row {
  display: flex;
  gap: 8px;
  align-items: center;
}

.price-row input {
  flex: 1;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 13px;
}

.price-row .remove-row {
  color: var(--primary);
  cursor: pointer;
  font-size: 18px;
  padding: 4px;
}

.add-row-btn {
  padding: 8px 14px;
  background: var(--bg);
  border: 1px dashed var(--border);
  border-radius: 6px;
  font-size: 13px;
  color: var(--text-light);
  cursor: pointer;
  transition: var(--transition);
  width: fit-content;
}

.add-row-btn:hover {
  border-color: var(--blue);
  color: var(--blue);
}

/* ====== 图片上传标签 ====== */
.uploaded-images .img-wrap {
  position: relative;
  width: 100px;
  height: 100px;
}

.uploaded-images .img-wrap.is-cover {
  width: 120px;
  height: 120px;
}

.uploaded-images .img-badge {
  position: absolute;
  top: 4px;
  left: 4px;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 600;
  z-index: 2;
  color: white;
  pointer-events: none;
}

.uploaded-images .badge-cover {
  background: var(--primary);
}

.uploaded-images .badge-stitch {
  background: var(--blue);
}

.stitch-hint {
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
  margin-top: 8px;
  padding: 10px 14px;
  background: rgba(0, 180, 216, 0.08);
  border: 1px dashed var(--blue);
  border-radius: 8px;
  font-size: 12px;
  color: var(--blue-dark);
  line-height: 1.5;
}

.stitch-hint svg {
  flex-shrink: 0;
  color: var(--blue);
}

/* ====== 详情页拼图长图 ====== */
.detail-combined-section {
  margin-top: 32px;
  background: var(--white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.combined-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 32px;
  border-bottom: 1px solid var(--border);
}

.combined-header h4 {
  font-size: 14px;
  font-weight: 600;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.combined-hint {
  font-size: 12px;
  color: var(--text-muted);
  background: var(--cream);
  padding: 4px 12px;
  border-radius: 12px;
}

.combined-image-wrap {
  padding: 24px;
  display: flex;
  justify-content: center;
  background: var(--cream);
}

.combined-image-wrap img {
  width: 100%;
  max-width: 800px;
  height: auto;
  border-radius: var(--radius);
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}

.combined-error {
  text-align: center;
  padding: 40px;
  color: var(--text-muted);
  font-size: 14px;
}

/* 响应式 - 拼图长图 */
@media (max-width: 768px) {
  .combined-header { padding: 16px 20px; }
  .combined-image-wrap { padding: 16px; }
  .combined-image-wrap img { max-width: 100%; }
}
