/* ============================================================
   基础重置与全站排版
   ============================================================ */
* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB",
               "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  font-size: 15px;
  line-height: 1.65;
  color: #222;
  background: #f6f7f9;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: #0b5fff; text-decoration: none; }
img { max-width: 100%; display: block; }

/* ============================================================
   顶部导航
   ============================================================ */
.site-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 20px;
  background: #fff;
  border-bottom: 1px solid #e5e7eb;
  position: sticky;
  top: 0;
  z-index: 10;
}
.logo { font-size: 17px; font-weight: 600; letter-spacing: .2px; color: #111; }
.nav { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 18px; }
.nav a { font-size: 14px; color: #555; margin: 0; transition: color .15s; }
.nav a:hover { color: #0b5fff; }

/* ============================================================
   主容器
   ============================================================ */
.container { max-width: 1200px; margin: 0 auto; padding: 16px; }

/* ============================================================
   首页滚动广告条
   ============================================================ */
.ad-bar {
  background: linear-gradient(90deg, #ff6b35, #f7931e);
  color: #fff;
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 16px;
  box-shadow: 0 2px 8px rgba(255,107,53,.25);
}
.ad-track {
  display: flex;
  align-items: center;
  white-space: nowrap;
  animation: ad-scroll 18s linear infinite;
  padding: 10px 0;
}
.ad-bar:hover .ad-track { animation-play-state: paused; }
.ad-content { color: #fff; font-size: 15px; font-weight: 600; text-decoration: none; padding: 0 8px; }
.ad-content:hover { text-decoration: underline; }
.ad-sep { color: rgba(255,255,255,.7); margin: 0 4px; }
@keyframes ad-scroll {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* ============================================================
   前台搜索与筛选
   ============================================================ */
.search-bar { display: flex; gap: 8px; margin-bottom: 12px; }
.search-bar input[type=text] {
  flex: 1;
  padding: 10px 12px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-size: 16px;
  font-family: inherit;
}
.search-bar input[type=text]:focus {
  outline: none;
  border-color: #0b5fff;
  box-shadow: 0 0 0 3px rgba(11,95,255,.1);
}
.search-bar button {
  background: #0b5fff;
  color: #fff;
  border: 0;
  border-radius: 8px;
  padding: 10px 16px;
  font-size: 15px;
  font-family: inherit;
  cursor: pointer;
}
.search-bar button:hover { background: #0a4fd6; }
.search-tip { color: #666; font-size: 14px; margin: 0 0 12px; }

.filter-bar { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.filter-bar a {
  padding: 6px 14px;
  font-size: 13px;
  color: #555;
  background: #fff;
  border: 1px solid #e0e3e8;
  border-radius: 999px;
  text-decoration: none;
  transition: all .15s;
}
.filter-bar a:hover { border-color: #d6e2ff; color: #0b5fff; }
.filter-bar a.active { background: #0b5fff; color: #fff; border-color: #0b5fff; }

/* 热门产品区块 */
.hot-section { margin-bottom: 24px; }
.hot-section h2 { font-size: 16px; font-weight: 600; margin: 0 0 12px; }

/* ============================================================
   前台产品列表
   ============================================================ */
.grid { display: grid; gap: 12px; grid-template-columns: repeat(2, 1fr); }
@media (min-width: 768px) { .grid { gap: 16px; grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1200px) { .grid { grid-template-columns: repeat(4, 1fr); } }

.card {
  background: #fff;
  border-radius: 10px;
  overflow: hidden;
  color: inherit;
  box-shadow: 0 1px 4px rgba(0,0,0,.06);
  transition: transform .15s;
}
.card:hover { transform: translateY(-2px); }
.card-thumb { aspect-ratio: 4/3; background: #eee; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.card-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.no-img { color: #aaa; font-size: 14px; }
.card-body { padding: 12px; }
.card-body h3 {
  margin: 0 0 6px;
  font-size: 16px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.params-preview { margin: 0 0 6px; font-size: 13px; color: #666; }
.price { color: #e63946; font-weight: 700; margin: 0; }

/* 布局主题 */
body.layout-compact .grid { grid-template-columns: repeat(4, 1fr); gap: 8px; }
body.layout-magazine .grid { grid-template-columns: 1fr 1fr; }
body.layout-magazine .card:first-child { grid-column: span 2; }

/* 手机双列微调 */
@media (max-width: 480px) {
  .card-body { padding: 8px; }
  .card-body h3 { font-size: 14px; line-height: 1.3; margin-bottom: 4px; }
  .params-preview { font-size: 12px; margin-bottom: 4px; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
  .price { font-size: 14px; }
}

/* ============================================================
   前台产品详情
   ============================================================ */
.detail h1 { font-size: 22px; margin: 8px 0; font-weight: 600; }

/* 轮播 */
.slider {
  position: relative;
  overflow: hidden;
  border-radius: 10px;
  background: #f0f0f0;
  margin: 12px 0 16px;
  aspect-ratio: 4 / 3;
  width: 100%;
}
.slider-track { display: flex; height: 100%; transition: transform .4s ease; }
.slider-slide { min-width: 100%; height: 100%; overflow: hidden; }
.slider-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}
.slider-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 0;
  background: rgba(0,0,0,.4);
  color: #fff;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .15s;
  z-index: 2;
}
.slider-btn:hover { background: rgba(0,0,0,.6); }
.slider-prev { left: 10px; }
.slider-next { right: 10px; }
.slider-dots {
  position: absolute;
  bottom: 10px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  gap: 6px;
  z-index: 2;
}
.slider-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: 0;
  background: rgba(255,255,255,.5);
  cursor: pointer;
  padding: 0;
  transition: background .15s, transform .15s;
}
.slider-dot.active { background: #fff; transform: scale(1.3); }

/* 视频区块：和图片轮播同宽 */
.video-block {
  margin: 12px 0 16px;
  padding: 0;
  background: transparent;
  overflow: hidden;
}
.video-block h2 {
  font-size: 16px;
  font-weight: 600;
  margin: 0 0 10px;
  padding: 0;
}
.video-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  border-radius: 10px;
  overflow: hidden;
}
.video-wrap iframe,
.video-wrap video {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

.params-block, .desc, .address-block {
  background: #fff;
  padding: 16px;
  border-radius: 10px;
  margin: 16px 0;
}
.params-block h2, .desc h2, .address-block h2 {
  font-size: 16px;
  font-weight: 600;
  margin: 0 0 8px;
}
.nav-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 10px; }
.contact-actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 16px 0; }
.btn-nav, .btn-call, .btn-wechat {
  display: inline-block;
  padding: 10px 16px;
  border-radius: 8px;
  border: 0;
  background: #0b5fff;
  color: #fff;
  font-size: 15px;
  font-family: inherit;
  text-decoration: none;
  cursor: pointer;
}
.btn-call { background: #e63946; }
.btn-wechat { background: #07c160; }

/* 复制链接按钮 */
.btn-share {
  display: inline-block;
  padding: 10px 16px;
  border-radius: 8px;
  border: 0;
  background: #6b7280;
  color: #fff;
  font-size: 15px;
  font-family: inherit;
  cursor: pointer;
  transition: background .15s;
}
.btn-share:hover { background: #4b5563; }

/* 二维码按钮 */
.btn-qr {
  display: inline-block;
  padding: 10px 16px;
  border-radius: 8px;
  border: 0;
  background: #0ea5e9;
  color: #fff;
  font-size: 15px;
  font-family: inherit;
  cursor: pointer;
  transition: background .15s;
}
.btn-qr:hover { background: #0284c7; }

/* 参数折叠 */
.params-content.collapsed {
  max-height: 180px;
  overflow: hidden;
  position: relative;
}
.params-content.collapsed::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 40px;
  background: linear-gradient(transparent, #fff);
}
.params-toggle {
  margin-top: 8px;
  background: transparent;
  border: 0;
  color: #0b5fff;
  font-size: 14px;
  cursor: pointer;
  padding: 0;
}

/* 底部返回按钮 */
.detail-back-bottom {
  margin: 32px 0 8px;
  text-align: center;
}
.back-link {
  display: inline-block;
  font-family: inherit;
  font-size: 15px;
  font-weight: 500;
  color: #fff;
  background: #0b5fff;
  padding: 10px 28px;
  border-radius: 8px;
  transition: background .15s;
  box-shadow: 0 2px 6px rgba(11,95,255,.2);
}
.back-link:hover { background: #0a4fd6; }

/* 二维码弹层 */
.qr-modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.5);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 20px;
}
.qr-modal.open { display: flex; }
.qr-box {
  background: #fff;
  border-radius: 14px;
  padding: 24px;
  text-align: center;
  max-width: 280px;
  width: 100%;
}
.qr-title { font-size: 15px; font-weight: 600; margin-bottom: 14px; color: #111; }
#qrCanvasWrap { display: flex; justify-content: center; margin-bottom: 16px; }
#qrCanvasWrap img, #qrCanvasWrap canvas { display: block; border-radius: 6px; }
.qr-close {
  background: #f0f4ff;
  color: #0b5fff;
  border: 1px solid #d6e2ff;
  border-radius: 8px;
  padding: 8px 20px;
  font-size: 14px;
  cursor: pointer;
}
.qr-close:hover { background: #e3ecff; }

/* 类似产品 */
.related-section { margin-top: 32px; }
.related-section h2 { font-size: 16px; font-weight: 600; margin: 0 0 12px; }

/* ============================================================
   页脚
   ============================================================ */
.site-footer {
  text-align: center;
  padding: 24px 16px;
  color: #8a8f99;
  font-size: 13px;
  background: #fff;
  border-top: 1px solid #eef0f3;
  margin-top: 32px;
}
.footer-inner { max-width: 720px; margin: 0 auto; }
.footer-call {
  display: inline-block;
  margin-bottom: 10px;
  color: #e63946;
  font-weight: 600;
  font-size: 15px;
  text-decoration: none;
}
.footer-address { margin: 8px 0 12px; font-size: 13px; color: #666; line-height: 1.8; }
.footer-address .addr-text { display: block; margin-bottom: 6px; }
.footer-address .addr-links { display: inline-flex; gap: 12px; flex-wrap: wrap; justify-content: center; }
.addr-link {
  color: #0b5fff;
  text-decoration: none;
  padding: 4px 10px;
  border: 1px solid #d6e2ff;
  border-radius: 6px;
  background: #f0f4ff;
  font-size: 12px;
}
.addr-link:hover { background: #e3ecff; }

/* 页脚二维码 */
.footer-qrcode { margin: 16px auto 12px; text-align: center; }
.footer-qrcode img {
  width: 120px;
  height: 120px;
  object-fit: contain;
  margin: 0 auto 8px;
  border-radius: 6px;
  background: #fff;
  padding: 2px;
  box-shadow: 0 1px 3px rgba(0,0,0,.06);
}
.qrcode-text { font-size: 13px; color: #666; margin: 0; }
.copyright { margin: 8px 0 0; font-size: 12px; color: #aaa; }

/* ============================================================
   后台页面通用标题
   ============================================================ */
.admin-page { max-width: 960px; margin: 0 auto; padding: 4px 0 32px; }
.admin-page-head {
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid #eef0f3;
}
.admin-page-head h1 {
  font-size: 20px;
  font-weight: 600;
  color: #111;
  margin: 0 0 6px;
  line-height: 1.3;
  letter-spacing: -.2px;
}
.page-sub { font-size: 13px; color: #8a8f99; margin: 0; line-height: 1.5; }

/* 后台页面顶部返回按钮 */
.admin-page > .btn-back {
  display: inline-block;
  margin-bottom: 12px;
  padding: 8px 16px;
  font-size: 14px;
  font-weight: 500;
  color: #333;
  background: #f0f4ff;
  border: 1px solid #d6e2ff;
  border-radius: 8px;
  text-decoration: none;
  transition: background .15s, border-color .15s, color .15s;
}
.admin-page > .btn-back:hover {
  background: #e3ecff;
  border-color: #0b5fff;
  color: #0b5fff;
}

/* ============================================================
   后台搜索栏
   ============================================================ */
.admin-search {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
  background: #fff;
  padding: 12px;
  border-radius: 10px;
  box-shadow: 0 1px 3px rgba(0,0,0,.05);
}
.admin-search input[type=text] {
  flex: 1;
  min-width: 180px;
  padding: 9px 12px;
  border: 1px solid #dfe3e8;
  border-radius: 8px;
  font-size: 15px;
  font-family: inherit;
  background: #fafbfc;
}
.admin-search select {
  padding: 9px 12px;
  border: 1px solid #dfe3e8;
  border-radius: 8px;
  font-size: 14px;
  font-family: inherit;
  background: #fafbfc;
}
.admin-search input:focus,
.admin-search select:focus {
  outline: none;
  border-color: #0b5fff;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(11,95,255,.1);
}
.admin-search .btn-primary { padding: 9px 18px; }
.admin-search .btn-ghost { padding: 9px 14px; }

/* ============================================================
   后台表单
   ============================================================ */
.form { background: #fff; padding: 20px; border-radius: 12px; max-width: 760px; }
.settings-form { background: transparent; padding: 0; max-width: none; }
.product-form { max-width: 760px; }

.form-section {
  background: #fff;
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 16px;
  box-shadow: 0 1px 3px rgba(0,0,0,.05);
}
.form-section h2 {
  font-size: 14px;
  font-weight: 600;
  color: #333;
  margin: 0 0 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid #f0f0f0;
  letter-spacing: .2px;
}
.form-row { display: grid; grid-template-columns: 1fr; gap: 12px; }
@media (min-width: 640px) { .form-row { grid-template-columns: 1fr 1fr; } }

.form label,
.settings-form label,
.product-form label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: #444;
  margin-bottom: 14px;
}
.form input[type=text],
.form input[type=password],
.form input[type=number],
.form input[type=file],
.form textarea,
.form select,
.settings-form input,
.settings-form select,
.settings-form textarea,
.product-form input,
.product-form textarea {
  width: 100%;
  font-family: inherit;
  font-size: 15px;
  color: #111;
  padding: 10px 12px;
  border: 1px solid #dfe3e8;
  border-radius: 8px;
  margin-top: 6px;
  background: #fafbfc;
  transition: border-color .15s, background .15s, box-shadow .15s;
}
.form input:focus,
.form textarea:focus,
.form select:focus,
.settings-form input:focus,
.settings-form select:focus,
.settings-form textarea:focus,
.product-form input:focus,
.product-form textarea:focus {
  outline: none;
  border-color: #0b5fff;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(11,95,255,.1);
}
.form textarea, .product-form textarea { resize: vertical; }

.form .check,
.product-form .check {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: #333;
}
.form .check input[type=checkbox],
.product-form .check input[type=checkbox] {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: #0b5fff;
}

/* 语音录入块 */
.voice-section { background: #f0f7ff; border: 1px solid #dbe8ff; }
.voice-section h2 { color: #0b5fff; border-bottom-color: #dbe8ff; }
.section-tip { font-size: 12.5px; color: #6b7a90; margin: 0 0 10px; line-height: 1.5; }
.voice-section textarea {
  width: 100%;
  padding: 12px;
  border: 1px solid #cfe0ff;
  border-radius: 8px;
  font-size: 15px;
  font-family: inherit;
  background: #fff;
  resize: vertical;
}
.section-actions { margin-top: 10px; }

/* 地址定位工具条 */
.addr-tools { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 4px; }
.hint { font-size: 12.5px; color: #8a8f99; line-height: 1.5; }

/* 二维码预览 */
.qrcode-preview {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 14px;
  padding: 12px;
  background: #fafbfc;
  border-radius: 8px;
}
.qrcode-preview img {
  width: 100px;
  height: 100px;
  object-fit: contain;
  border-radius: 6px;
  background: #fff;
  padding: 2px;
}

/* 上传前预览 */
.preview-box { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0; }
.preview-thumb {
  width: 72px;
  height: 72px;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid #e0e3e8;
}

/* 上传进度 */
.upload-status {
  margin: 10px 0;
  font-size: 13px;
  color: #0b5fff;
  display: flex;
  align-items: center;
  gap: 8px;
}
.spinner {
  width: 16px;
  height: 16px;
  border: 2px solid #d6e2ff;
  border-top-color: #0b5fff;
  border-radius: 50%;
  animation: spin .8s linear infinite;
  display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* 错误 / 成功提示 */
.error, .ok {
  font-size: 13.5px;
  line-height: 1.5;
  margin-bottom: 16px;
  padding: 10px 14px;
  border-radius: 8px;
}
.error { background: #ffeaea; color: #c1121f; }
.ok { background: #e6f7ea; color: #146c2e; }

/* 按钮 */
.btn-primary, .form button, .btn {
  font-family: inherit;
  font-size: 15px;
  font-weight: 500;
  padding: 10px 20px;
  border-radius: 8px;
  border: 0;
  background: #0b5fff;
  color: #fff;
  cursor: pointer;
  transition: background .15s;
  display: inline-block;
  text-align: center;
}
.btn-primary:hover, .form button:hover, .btn:hover { background: #0a4fd6; }
.btn-ghost {
  font-family: inherit;
  font-size: 14px;
  padding: 8px 14px;
  border-radius: 8px;
  border: 1px solid #d6e2ff;
  background: #f0f4ff;
  color: #0b5fff;
  cursor: pointer;
  transition: background .15s;
  display: inline-block;
  text-align: center;
}
.btn-ghost:hover { background: #e3ecff; }
.form-actions { display: flex; justify-content: flex-end; margin-top: 8px; }

/* ============================================================
   后台列表
   ============================================================ */
.list-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; }
.badge { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 500; white-space: nowrap; }
.badge-on { background: #e6f7ea; color: #146c2e; }
.badge-off { background: #ffeaea; color: #c1121f; }

.cell-price { color: #e63946; font-weight: 600; white-space: nowrap; }
.price-nego { color: #8a8f99; font-weight: 400; }

.cell-actions { white-space: nowrap; }
.act-link { display: inline-block; margin-right: 10px; color: #0b5fff; font-size: 13px; }
.act-link:hover { text-decoration: underline; }
.inline-form { display: inline; }
.act-btn { border: 0; border-radius: 6px; padding: 5px 10px; font-size: 12px; cursor: pointer; margin-left: 4px; }
.act-publish { background: #e6f7ea; color: #146c2e; }
.act-publish:hover { background: #d4f0dc; }
.act-unpublish { background: #fff4e5; color: #b45309; }
.act-unpublish:hover { background: #ffe8cc; }
.act-delete { background: #ffeaea; color: #c1121f; }
.act-delete:hover { background: #ffd6d6; }

.empty { text-align: center; color: #888; padding: 40px 0; }
.empty-card { background: #fff; border-radius: 12px; padding: 48px 20px; text-align: center; color: #888; font-size: 14px; }

/* 缩略图与排序 */
.thumb { width: 56px; height: 42px; object-fit: cover; border-radius: 6px; display: block; background: #f0f0f0; }
.thumb-empty { display: flex; align-items: center; justify-content: center; font-size: 11px; color: #bbb; }
.sort-btns { display: flex; flex-direction: column; gap: 2px; }
.sort-btn {
  width: 24px;
  height: 18px;
  line-height: 16px;
  text-align: center;
  border: 1px solid #e0e3e8;
  background: #fff;
  border-radius: 4px;
  font-size: 9px;
  color: #888;
  cursor: pointer;
  padding: 0;
}
.sort-btn:hover { background: #f0f4ff; color: #0b5fff; border-color: #d6e2ff; }

/* 分页 */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  margin-top: 16px;
  font-size: 14px;
}
.pagination a {
  padding: 6px 14px;
  background: #fff;
  border: 1px solid #e0e3e8;
  border-radius: 8px;
  color: #0b5fff;
  text-decoration: none;
}
.pagination a:hover { background: #f0f4ff; border-color: #d6e2ff; }
.pagination span { color: #888; }

/* ============================================================
   后台图片管理
   ============================================================ */
.img-grid { display: grid; gap: 12px; grid-template-columns: repeat(2, 1fr); margin-top: 16px; }
@media (min-width: 640px) { .img-grid { grid-template-columns: repeat(4, 1fr); } }
.img-item { background: #fff; padding: 8px; border-radius: 8px; }
.img-item img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 6px;
  display: block;
  background: #f0f0f0;
}
.img-item button {
  margin-top: 6px;
  background: #ffe0e0;
  color: #c1121f;
  border: 0;
  padding: 6px 10px;
  border-radius: 6px;
  cursor: pointer;
  width: 100%;
}
.btn-cover {
  margin-top: 6px;
  background: #f0f4ff;
  color: #0b5fff;
  border: 1px solid #d6e2ff;
  padding: 6px 10px;
  border-radius: 6px;
  cursor: pointer;
  width: 100%;
  font-size: 12px;
}
.btn-cover:hover { background: #e3ecff; }

/* ============================================================
   后台表格（桌面端）
   ============================================================ */
.admin-bar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.admin-table { width: 100%; border-collapse: collapse; background: #fff; border-radius: 10px; overflow: hidden; }
.admin-table th, .admin-table td { padding: 10px 12px; border-bottom: 1px solid #eee; text-align: left; font-size: 14px; }
.admin-table .actions form { display: inline; }
.admin-table button { background: #eee; border: 0; padding: 6px 10px; border-radius: 6px; cursor: pointer; font-size: 13px; }

/* ============================================================
   手机端适配
   ============================================================ */
@media (max-width: 720px) {
  .ad-content { font-size: 14px; }
  .ad-track { animation-duration: 14s; }

  .admin-search { flex-direction: column; align-items: stretch; }
  .admin-search input[type=text],
  .admin-search select,
  .admin-search .btn-primary,
  .admin-search .btn-ghost { width: 100%; }

  .admin-table-wrap { background: transparent; }
  .admin-table { display: block; background: transparent; }
  .admin-table thead { display: none; }
  .admin-table tbody { display: block; }
  .admin-table tr {
    display: block;
    background: #fff;
    border-radius: 12px;
    padding: 10px 12px;
    margin-bottom: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,.05);
  }
  .admin-table td {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 4px 0;
    border: 0;
    font-size: 13px;
  }
  .admin-table td::before {
    content: attr(data-label);
    color: #999;
    font-size: 13px;
    flex-shrink: 0;
  }
  .admin-table td.cell-name { font-weight: 600; }
  .admin-table td.cell-name::before { font-weight: 400; }
  .admin-table td.cell-addr { color: #666; word-break: break-all; }
  .admin-table td.cell-actions {
    display: block;
    padding-top: 8px;
    margin-top: 4px;
    border-top: 1px solid #f0f0f0;
  }
  .admin-table td.cell-actions::before { display: none; }
  .admin-table td.cell-actions .act-link,
  .admin-table td.cell-actions .act-btn {
    display: inline-block;
    padding: 4px 10px;
    font-size: 12px;
    border-radius: 6px;
    margin: 0 4px 4px 0;
  }
  .admin-table td.cell-actions .act-link { background: #f0f4ff; }
  .admin-table td.cell-actions .inline-form { display: inline-block; }

  .admin-table td[data-label="排序"] { padding-bottom: 6px; }
  .admin-table td[data-label="排序"]::before { content: '排序'; }
  .sort-btns { flex-direction: row; }
  .sort-btn { width: 32px; height: 26px; font-size: 11px; }
  .thumb { width: 48px; height: 36px; }

  .admin-page { padding: 0; }
  .admin-page-head h1 { font-size: 19px; }
  .page-sub { font-size: 12.5px; }
  .form-section { border-radius: 10px; padding: 16px; margin-bottom: 12px; }
  .form-section h2 { font-size: 14px; }
  .settings-form input,
  .settings-form select,
  .settings-form textarea,
  .product-form input,
  .product-form textarea,
  .form input,
  .form textarea { font-size: 16px; padding: 12px; }
  .form-actions { position: sticky; bottom: 0; background: #f6f7f9; padding: 10px 0; }
  .form-actions .btn-primary { width: 100%; padding: 14px; font-size: 16px; }
  .addr-tools { flex-direction: column; align-items: stretch; }
  .addr-tools .btn-ghost { width: 100%; padding: 12px; font-size: 15px; }

  .slider-btn { width: 32px; height: 32px; font-size: 20px; }
  .slider-prev { left: 6px; }
  .slider-next { right: 6px; }
  .slider-dot { width: 7px; height: 7px; }

  /* 手机端详情页操作按钮三等分一行 */
  .contact-actions {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
  }
  .contact-actions .btn-call,
  .contact-actions .btn-wechat,
  .contact-actions .btn-share,
  .contact-actions .btn-qr {
    padding: 10px 6px;
    font-size: 13px;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
}

/* 回到顶部按钮 */
.back-to-top {
  position: fixed;
  right: 20px;
  bottom: 24px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 0;
  background: #0b5fff;
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(11,95,255,.35);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity .25s, visibility .25s, transform .25s, background .15s;
  z-index: 50;
}
.back-to-top.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.back-to-top:hover { background: #0a4fd6; }
.back-to-top:active { transform: translateY(0) scale(.95); }

@media (max-width: 640px) {
  .back-to-top {
    right: 14px;
    bottom: 20px;
    width: 40px;
    height: 40px;
  }
}

/* 二维码弹层（带边框卡片） */
.qr-modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.5);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 20px;
}
.qr-modal.open { display: flex; }

.qr-box {
  background: #fff;
  border-radius: 16px;
  padding: 24px;
  text-align: center;
  max-width: 300px;
  width: 100%;
  box-shadow: 0 12px 40px rgba(0,0,0,.2);
  border: 1px solid #eef0f3;
}

.qr-site {
  font-size: 16px;
  font-weight: 600;
  color: #111;
  margin-bottom: 16px;
  line-height: 1.3;
  word-break: break-all;
}

.qr-canvas-wrap {
  display: inline-flex;
  padding: 12px;
  background: #fff;
  border-radius: 10px;
  border: 1px solid #eef0f3;
}
.qr-canvas-wrap img,
.qr-canvas-wrap canvas {
  display: block;
  border-radius: 4px;
}

.qr-sub {
  margin-top: 12px;
  font-size: 13px;
  color: #888;
}

.qr-actions {
  margin-top: 20px;
  display: flex;
  gap: 10px;
  justify-content: center;
}
.qr-download {
  background: #0b5fff;
  color: #fff;
  border: 0;
  border-radius: 8px;
  padding: 9px 18px;
  font-size: 14px;
  cursor: pointer;
  transition: background .15s;
}
.qr-download:hover { background: #0a4fd6; }
.qr-close {
  background: #f0f4ff;
  color: #0b5fff;
  border: 1px solid #d6e2ff;
  border-radius: 8px;
  padding: 9px 18px;
  font-size: 14px;
  cursor: pointer;
  transition: background .15s;
}
.qr-close:hover { background: #e3ecff; }

@media (max-width: 640px) {
  .qr-box { padding: 20px; max-width: 280px; }
  .qr-canvas-wrap { padding: 10px; }
  .qr-canvas-wrap img,
  .qr-canvas-wrap canvas { width: 200px; height: 200px; }
}
/* 全屏图片预览 */
.fs-modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.95);
  display: none;
  z-index: 200;
  overflow: hidden;
}
.fs-modal.open { display: block; }

.fs-track {
  display: flex;
  height: 100%;
  transition: transform .3s ease;
}
.fs-slide {
  min-width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.fs-slide img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  display: block;
}

.fs-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 0;
  background: rgba(255,255,255,.15);
  color: #fff;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
}
.fs-close:hover { background: rgba(255,255,255,.25); }