html { scroll-behavior: smooth; }

:root {
  --bg: #ffffff;
  --fg: #121212;
  --muted: #5f6b7a;
  --accent: #1b2a4a;
  --accent-soft: #9bc4e2;
  --accent-fg: #ffffff;
  --border: #dfe7ef;
  --danger: #c0392b;
  --success: #1f7a3d;
  --radius: 8px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--fg);
  background: var(--bg);
  line-height: 1.55;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a { color: inherit; }

.container { max-width: 1080px; margin: 0 auto; padding: 0 20px; }

header.site-header {
  border-bottom: 1px solid var(--border);
  padding: 16px 0;
}
header.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.brand-block {
  display: flex; flex-direction: column; align-items: flex-start;
  text-decoration: none; line-height: 1.15; flex-shrink: 0;
}
.brand { font-size: 1.35rem; font-weight: 700; letter-spacing: 0.02em; text-decoration: none; }
.brand-slogan { margin-top: 3px; font-size: 0.72rem; color: var(--muted); letter-spacing: 0.02em; }
.header-nav { flex: 1; display: flex; align-items: center; justify-content: center; gap: 24px; flex-wrap: wrap; }
.header-nav a { text-decoration: none; font-size: 0.95rem; }
.header-nav a:hover { color: var(--accent); }
.header-actions { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.admin-top-actions { gap: 18px; font-size: 0.9rem; flex-wrap: wrap; justify-content: flex-end; }
.admin-top-actions a { text-decoration: none; white-space: nowrap; }
.admin-top-actions a:hover, .admin-top-actions a.active { color: var(--accent); font-weight: 600; }
.lang-switch { display: inline-flex; align-items: center; }
.lang-select {
  font: inherit; font-size: 0.85rem; padding: 4px 6px;
  border: 1px solid var(--border); border-radius: 8px;
  background: var(--bg, #fff); color: inherit; cursor: pointer;
}
.lang-select:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.cart-link {
  position: relative; display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; border-radius: 50%; text-decoration: none; color: var(--fg);
}
.cart-link:hover { background: #eef4fa; }
.cart-link svg { display: block; }
.cart-badge {
  position: absolute; top: 1px; right: 1px;
  background: var(--accent); color: var(--accent-fg);
  border-radius: 999px; font-size: 0.68rem; min-width: 17px; height: 17px;
  display: inline-flex; align-items: center; justify-content: center; padding: 0 4px;
}
.cart-badge:empty { display: none; }
@media (max-width: 820px) {
  header.site-header .container { flex-wrap: wrap; gap: 10px; }
  .header-nav { order: 3; width: 100%; justify-content: flex-start; gap: 16px; }
  .header-actions { margin-left: auto; }
}

.promo-marquee {
  min-height: 44px;
  padding: 7px 16px;
  background: linear-gradient(100deg, #f26a1b 0%, #e9500b 55%, #cf3f05 100%);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-size: 0.9rem;
  box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.12), 0 2px 10px rgba(242, 106, 27, 0.2);
  overflow: hidden;
}
.promo-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  white-space: nowrap;
}
.promo-icon { flex: 0 0 auto; }
.promo-title {
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.14);
}
.promo-tiers { display: flex; align-items: center; gap: 8px; }
.promo-tier {
  padding: 2px 10px;
  border: 1px solid rgba(255, 255, 255, 0.36);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.17);
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  white-space: nowrap;
}
@media (max-width: 820px) {
  .promo-marquee { padding: 8px 12px; }
  .promo-inner { flex-wrap: wrap; justify-content: center; white-space: normal; gap: 6px 10px; }
  .promo-title { font-size: 0.92rem; }
  .promo-tiers { flex-wrap: wrap; justify-content: center; gap: 6px; }
  .promo-tier { padding: 2px 8px; font-size: 0.8rem; }
}

main { flex: 1; padding: 32px 0 64px; }

.product-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: start; }
@media (max-width: 820px) {
  .product-layout { grid-template-columns: 1fr; }
}

.gallery {
  display: flex; flex-direction: column; align-self: start;
  position: sticky; top: 24px;
}
@media (max-width: 820px) { .gallery { position: static; top: auto; } }
.gallery-main { position: relative; overflow: hidden; border-radius: var(--radius); }
.gallery-main img {
  display: block; width: 100%; aspect-ratio: 1; object-fit: cover;
  border-radius: var(--radius); border: 1px solid var(--border);
  transform-origin: center;
}
.gallery-main.zoomed img { transform: scale(1.9); }
.gallery-main[hidden], .gallery-nav[hidden], .gallery-thumbs[hidden] { display: none !important; }
.gallery-nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 42px; height: 42px; border-radius: 50%;
  border: 1px solid rgba(27, 42, 74, 0.15);
  background: rgba(255, 255, 255, 0.78); color: var(--accent);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; z-index: 2;
  box-shadow: 0 1px 5px rgba(0, 0, 0, 0.18);
  transition: background 0.2s, box-shadow 0.2s;
}
.gallery-nav:hover { background: #fff; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.24); }
.gallery-nav.prev { left: 12px; }
.gallery-nav.next { right: 12px; }
.gallery-thumbs { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.gallery-thumbs button {
  width: 64px; height: 64px; padding: 0; border: 1px solid var(--border); border-radius: 6px;
  cursor: pointer; overflow: hidden; background: none;
}
.gallery-thumbs button.active { border-color: var(--accent); border-width: 2px; }
.gallery-thumbs img { width: 100%; height: 100%; object-fit: cover; }

.product-info h1 { font-size: 1.7rem; margin: 0 0 8px; }
.product-subtitle { margin: 0 0 10px; color: var(--muted); font-size: 1rem; }
.rating { display: flex; align-items: center; gap: 6px; margin: 8px 0 12px; width: fit-content; text-decoration: none; }
.rating:hover .rating-score { text-decoration: underline; }
.stars { display: inline-flex; gap: 2px; color: #f0a500; }
.rating-score { font-weight: 600; font-size: 0.95rem; }
.rating-count { color: var(--muted); font-size: 0.88rem; }
.price-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 10px 0 18px; }
.discount-badge {
  background: #e8f2fa; color: var(--accent); font-size: 0.78rem; font-weight: 600;
  padding: 3px 8px; border-radius: 999px;
}
.price { font-size: 1.4rem; font-weight: 700; }
.compare-at { color: var(--muted); text-decoration: line-through; margin-left: 10px; font-weight: 400; font-size: 1.1rem; }
.vendor { color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; font-size: 0.8rem; margin-bottom: 8px; }

.product-description { margin: 22px 0; font-size: 0.95rem; color: #333; }
.product-description p { margin: 0 0 12px; }
/* 详情描述为 Markdown 渲染结果 */
.product-description h2,
.product-description h3,
.product-description h4,
.product-description h5 { margin: 18px 0 8px; font-size: 1rem; }
.product-description ul,
.product-description ol { margin: 0 0 12px; padding-left: 1.3em; }
.product-description li { margin-bottom: 4px; }
.product-description blockquote {
  margin: 0 0 12px; padding: 6px 12px; border-left: 3px solid var(--border); color: #555;
}
.product-description code {
  background: #f3f3f3; padding: 1px 4px; border-radius: 4px; font-size: 0.9em;
}
.product-description pre {
  background: #f6f6f6; padding: 10px 12px; border-radius: var(--radius); overflow-x: auto;
}
.product-description pre code { background: none; padding: 0; }
.product-description hr { border: 0; border-top: 1px solid var(--border); margin: 16px 0; }
.product-description a { text-decoration: underline; }
.product-description > :last-child { margin-bottom: 0; }

.option-row { margin: 20px 0; }
.option-row label { display: block; font-size: 0.9rem; margin-bottom: 8px; }
.swatches { display: flex; gap: 10px; flex-wrap: wrap; }
.swatch {
  width: 34px; height: 34px; border-radius: 50%; cursor: pointer;
  border: 2px solid var(--border); padding: 0;
}
.swatch.active { border-color: var(--accent); box-shadow: 0 0 0 2px #fff inset; }

/* 颜色图标列表 */
.swatch-thumb {
  display: flex; flex-direction: column; align-items: center; gap: 5px;
  background: none; border: 2px solid transparent; border-radius: 10px;
  padding: 4px 6px; cursor: pointer;
}
.swatch-thumb .swatch-dot {
  width: 30px; height: 30px; border-radius: 50%;
  border: 1px solid var(--border); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.06);
}
.swatch-thumb .swatch-label { font-size: 0.72rem; color: var(--muted); line-height: 1.2; }
.swatch-thumb.active { border-color: var(--accent); }
.swatch-thumb.active .swatch-label { color: var(--fg); }

.qty-row { display: flex; align-items: center; gap: 12px; margin: 20px 0; }
.qty-row input { width: 64px; padding: 8px; border: 1px solid var(--border); border-radius: var(--radius); }

.buy-row { display: flex; align-items: center; gap: 10px; margin: 20px 0 10px; }
.qty-inline { font-size: 0.9rem; }
.buy-row input {
  width: 72px; padding: 10px; border: 1px solid var(--border);
  border-radius: var(--radius); font: inherit;
}
.btn-grow { flex: 1; }
.btn-block { display: block; width: 100%; text-align: center; }

.product-accordions { margin-top: 24px; border-top: 1px solid var(--border); }
.accordion { border-bottom: 1px solid var(--border); }
.accordion summary {
  list-style: none; cursor: pointer; padding: 14px 0; font-weight: 600;
  display: flex; align-items: center; justify-content: space-between;
}
.accordion summary::-webkit-details-marker { display: none; }
.accordion summary::after { content: "+"; font-size: 1.2rem; color: var(--muted); }
.accordion[open] summary::after { content: "−"; }
.accordion-body { padding: 0 0 16px; font-size: 0.95rem; color: #333; }
.accordion-body p { margin: 0 0 10px; }
.accordion-body > :last-child { margin-bottom: 0; }

.btn.status-on { background: var(--success); }
.btn.status-off { background: var(--danger); }
.preview-box { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--border); }
.faq-list { max-width: 820px; }
.faq-intro { margin-bottom: 24px; }

.btn {
  display: inline-block; background: var(--accent); color: var(--accent-fg);
  border: none; border-radius: var(--radius); padding: 12px 22px;
  font-size: 1rem; cursor: pointer; text-decoration: none;
}
.btn:hover { opacity: 0.9; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-secondary { background: #fff; color: var(--accent); border: 1px solid var(--accent); }
.btn-secondary.active { background: var(--accent); color: var(--accent-fg); }
.btn-buy {
  background: #f26a1b; color: #fff;
  box-shadow: 0 4px 12px rgba(242, 106, 27, 0.28);
}
.btn-buy:hover { background: #dc5a0d; opacity: 1; box-shadow: 0 5px 14px rgba(242, 106, 27, 0.34); }
.btn-sm { padding: 6px 12px; font-size: 0.85rem; }
.btn-danger { background: #fff; color: var(--danger); border: 1px solid var(--danger); }
.payment-switch {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 16px; border: 1px solid var(--border); border-radius: var(--radius);
}
.payment-switch-label { font-size: 0.9rem; color: var(--muted); }
.payment-switch .btn { background: var(--success); }
.payment-switch .btn.is-off { background: var(--danger); }
.payment-switch .btn.is-busy { opacity: 0.5; }

.info-sections { margin-top: 56px; }
.info-sections figure { position: relative; margin: 0; }
.info-sections img { display: block; width: 100%; height: auto; border: 0; border-radius: 0; }
.info-banner { aspect-ratio: 3 / 1; overflow: hidden; }
.info-banner img { height: 100%; object-fit: cover; }
.info-full { aspect-ratio: 2 / 1; overflow: hidden; }
.info-full img { height: 100%; object-fit: cover; }
.info-columns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.info-columns figure { aspect-ratio: 1 / 1; overflow: hidden; }
.info-columns img { height: 100%; object-fit: cover; }
.info-size {
  position: absolute; left: 10px; top: 10px;
  padding: 3px 8px; border-radius: 999px;
  background: rgba(18, 18, 18, 0.62); color: #fff;
  font-size: 0.72rem; letter-spacing: 0.03em;
  pointer-events: none;
}
.info-buy { display: flex; justify-content: center; margin-top: 32px; }
.info-buy .btn { min-width: 280px; }
@media (max-width: 480px) {
  .info-buy .btn { width: 100%; }
}
@media (max-width: 640px) {
  .info-banner { aspect-ratio: 16 / 7; }
}

.info-sections[hidden],
.info-buy[hidden] { display: none !important; }

.reviews-section { margin-top: 64px; padding-top: 40px; border-top: 1px solid var(--border); scroll-margin-top: 20px; }
.reviews-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; margin-bottom: 22px; }
.reviews-intro h2 { margin: 0 0 6px; font-size: 1.5rem; }
.reviews-intro .line-meta { margin: 0; }
.reviews-summary {
  display: flex; align-items: center; gap: 12px; min-width: 220px;
  padding: 12px 18px; background: #f7f9fc;
  border: 1px solid var(--border); border-radius: 12px;
}
.review-score { font-size: 2.2rem; line-height: 1; }
.review-stars { color: #f0a500; font-size: 1rem; letter-spacing: 1px; white-space: nowrap; }
.review-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.review-card {
  padding: 18px 20px; background: #fff;
  border: 1px solid var(--border); border-radius: 12px;
}
.review-card-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.review-avatar {
  display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; border-radius: 50%;
  background: #e7eef6; color: var(--accent); font-size: 0.76rem; font-weight: 700;
}
.review-author { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.review-author .line-meta { font-size: 0.78rem; }
.review-card-head .review-stars { margin-left: auto; }
.review-card h3 { margin: 0 0 6px; font-size: 1rem; }
.review-card p { margin: 0; color: #333; font-size: 0.92rem; line-height: 1.55; }
@media (max-width: 820px) {
  .reviews-section { margin-top: 44px; padding-top: 28px; }
  .reviews-head { flex-direction: column; gap: 14px; }
  .reviews-summary { width: 100%; }
  .review-list { grid-template-columns: 1fr; }
}

.notice { background: #f6f6f6; border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 16px; margin: 16px 0; }
.notice.error { background: #fdf1f0; border-color: #f2c4c0; color: var(--danger); }
.notice.success { background: #eef8f1; border-color: #c4e6cf; color: var(--success); }

form .field { margin-bottom: 16px; }
form label { display: block; font-size: 0.9rem; margin-bottom: 6px; }
form input, form select, form textarea,
.field input, .field select, .field textarea {
  width: 100%; padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--radius); font-size: 1rem;
}
form textarea, .field textarea { font: inherit; resize: vertical; }

.cart-lines { border-top: 1px solid var(--border); }
.cart-line {
  display: grid; grid-template-columns: 64px 1fr auto auto; gap: 14px; align-items: center;
  padding: 14px 0; border-bottom: 1px solid var(--border);
}
.cart-line img { width: 64px; height: 64px; object-fit: cover; border-radius: 6px; border: 1px solid var(--border); }
.cart-line .line-title { font-weight: 600; }
.cart-line .line-meta { color: var(--muted); font-size: 0.85rem; }

.totals { margin: 20px 0; border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; }
.totals .row { display: flex; justify-content: space-between; padding: 6px 0; }
.totals .row[hidden] { display: none; }
.totals .row.total { border-top: 1px solid var(--border); margin-top: 8px; padding-top: 12px; font-weight: 700; font-size: 1.1rem; }

.section-title { font-size: 1rem; margin: 24px 0 6px; }
.ship-address { border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 14px; margin: 8px 0; }
.ship-address .line-title { font-weight: 600; }
.ship-address .line-meta { color: var(--muted); font-size: 0.9rem; line-height: 1.5; }
.return-item { display: flex; align-items: center; gap: 10px; padding: 6px 0; }
.return-item span:first-child { min-width: 80px; font-weight: 500; }

.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; }
@media (max-width: 820px) { .two-col { grid-template-columns: 1fr; } }

/* 结算页 */
.checkout-page { background: #f5f7fa; }
.checkout-head {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 16px;
  margin-bottom: 20px;
}
.checkout-head .page-title { margin: 0; }
.checkout-secure { margin: 0; color: var(--muted); font-size: 0.85rem; }
.checkout-layout {
  display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 36px; align-items: start;
}
.checkout-main { min-width: 0; }
.checkout-card {
  background: #fff; border: 1px solid var(--border); border-radius: 12px;
  padding: 22px; margin-bottom: 16px;
  box-shadow: 0 1px 3px rgba(18, 18, 18, 0.04);
}
.checkout-card-head { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; }
.checkout-card-head h2 { margin: 0; font-size: 1.1rem; }
.checkout-step {
  display: inline-flex; align-items: center; justify-content: center;
  width: 24px; height: 24px; border-radius: 50%;
  background: var(--accent); color: var(--accent-fg);
  font-size: 0.75rem; font-weight: 600;
}
.checkout-card .field { margin-bottom: 14px; }
.checkout-card .field:last-child { margin-bottom: 0; }
.checkout-card label { font-size: 0.85rem; color: var(--muted); }
.checkout-card input, .checkout-card select { background: #fff; color: inherit; }
.field-hint { margin: 6px 0 0; color: var(--muted); font-size: 0.78rem; }
.checkout-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.checkout-aside { position: sticky; top: 20px; }
.checkout-summary { margin-bottom: 0; }
.checkout-summary .cart-lines { border-top: 0; }
.checkout-summary .cart-line {
  grid-template-columns: 56px minmax(0, 1fr) auto; gap: 12px;
  padding: 12px 0;
}
.checkout-summary .cart-line img { width: 56px; height: 56px; }
.checkout-summary .line-title { font-size: 0.9rem; line-height: 1.35; }
.checkout-summary .line-meta { font-size: 0.78rem; }
.cart-line-info { min-width: 0; }
.cart-line-price { text-align: right; font-size: 0.9rem; font-weight: 600; white-space: nowrap; }
.cart-remove {
  display: block; margin: 6px 0 0 auto; padding: 0;
  border: 0; background: none; color: var(--muted);
  font: inherit; font-size: 0.78rem; text-decoration: underline; cursor: pointer;
}
.cart-remove:hover { color: var(--danger); }
.checkout-summary .totals {
  margin: 8px 0 0; padding: 14px 0 0;
  border: 0; border-top: 1px solid var(--border); border-radius: 0;
}
.checkout-summary .totals .row.total { font-size: 1.05rem; }
.checkout-actions { margin-top: 4px; }
.checkout-actions .btn { width: 100%; padding: 14px 22px; }
@media (max-width: 900px) {
  .checkout-layout { grid-template-columns: 1fr; gap: 18px; }
  .checkout-aside { position: static; order: -1; }
  .checkout-card { padding: 18px; }
}
@media (max-width: 560px) {
  .checkout-head { align-items: flex-start; flex-direction: column; gap: 6px; }
  .checkout-row { grid-template-columns: 1fr; gap: 0; }
}

/* 后台「工」字布局 */
.container.admin-layout { max-width: 1360px; }
.admin-layout {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  column-gap: 36px;
  row-gap: 0;
  align-items: start;
}
.admin-layout > :not(.admin-sidebar) { grid-column: 2; }
.admin-sidebar {
  grid-column: 1;
  grid-row: 1 / span 100;
  position: sticky;
  top: 20px;
  align-self: start;
  padding: 4px 0;
  border-right: 1px solid var(--border);
}
.admin-sidebar nav { display: flex; flex-direction: column; gap: 4px; padding-right: 18px; }
.admin-sidebar a {
  padding: 10px 12px;
  border-radius: 8px;
  color: var(--fg);
  text-decoration: none;
  font-size: 0.94rem;
}
.admin-sidebar a:hover { background: #f1f5f9; }
.admin-sidebar a.active { background: var(--accent); color: var(--accent-fg); font-weight: 600; }
@media (max-width: 820px) {
  .admin-layout { grid-template-columns: 1fr; column-gap: 0; row-gap: 0; }
  .admin-layout > :not(.admin-sidebar) { grid-column: 1; }
  .admin-sidebar {
    grid-column: 1;
    grid-row: auto;
    position: static;
    border-right: 0;
    border-bottom: 1px solid var(--border);
    padding-bottom: 12px;
    margin-bottom: 18px;
  }
  .admin-sidebar nav { flex-direction: row; gap: 6px; overflow-x: auto; padding-right: 0; }
  .admin-sidebar a { white-space: nowrap; padding: 8px 12px; }
}

.page-title { font-size: 1.6rem; margin: 0 0 24px; }
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.page-head .page-title { margin: 0; }
.settings-layout h2 { font-size: 1.6rem; }
.settings-layout .panel-title { margin: 0 0 24px; }

.timeline { list-style: none; padding: 0; margin: 24px 0; }
.timeline li { display: flex; gap: 12px; align-items: center; padding: 10px 0; color: var(--muted); }
.timeline li .dot {
  width: 14px; height: 14px; border-radius: 50%; background: var(--border); flex: none;
}
.timeline li.done { color: var(--fg); }
.timeline li.done .dot { background: var(--success); }

table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--border); font-size: 0.92rem; }
th { font-weight: 600; }
tr.clickable { cursor: pointer; }
tr.clickable:hover { background: #fafafa; }
tr.selected { background: #eef4fa; }
tr.selected:hover { background: #e7f0f8; }

.admin-toolbar { display: flex; gap: 12px; align-items: center; margin-bottom: 20px; }
.badge-status { font-size: 0.75rem; padding: 2px 8px; border-radius: 999px; border: 1px solid var(--border); white-space: nowrap; }
.badge-status.paid { background: #eef8f1; color: var(--success); border-color: #c4e6cf; }
.badge-status.shipped { background: #eef4fd; color: #1d5f9e; border-color: #c4ddf2; }
.badge-status.delivered { background: #f0f0f0; color: #444; }
.badge-status.pending { background: #fdf6e3; color: #8a6d1a; border-color: #f0e2b6; }

/* 状态类别 */
.badge-status.normal { background: #eef8f1; color: var(--success); border-color: #c4e6cf; }
.badge-status.warning { background: #fdf6e3; color: #8a6d1a; border-color: #f0e2b6; }
.badge-status.danger { background: #fdf1f0; color: var(--danger); border-color: #f2c4c0; }
.badge-status.muted { background: #f2f2f2; color: #666; border-color: #e0e0e0; }

.item-status { font-size: 0.85rem; color: var(--muted); }
.order-head { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
.order-head .page-title { margin: 0; }

.notice.warning { background: #fdf6e3; border-color: #f0e2b6; color: #8a6d1a; }

/* 筛选与操作 */
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.chip {
  border: 1px solid var(--border); background: #fff; border-radius: 999px;
  padding: 6px 14px; font-size: 0.85rem; cursor: pointer;
}
.chip.active { background: var(--accent); color: var(--accent-fg); border-color: var(--accent); }

.action-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 12px 0; }
.action-panel { display: flex; flex-wrap: wrap; gap: 8px; }

/* 退货 */
.return-list { display: flex; flex-direction: column; gap: 10px; }
.return-line {
  display: flex; align-items: center; gap: 12px;
  border: 1px solid var(--border); border-radius: var(--radius); padding: 12px;
  cursor: pointer;
}
.return-line .return-qty { margin-left: auto; font-size: 0.85rem; color: var(--muted); }
.return-line .return-qty input { width: 60px; padding: 4px 6px; margin-left: 4px; }

.return-card {
  border: 1px solid var(--border); border-radius: var(--radius);
  padding: 14px 16px; margin-bottom: 12px;
}
.return-head { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.return-review { margin-top: 12px; }
.return-review label { display: block; font-size: 0.86rem; color: var(--muted); margin-bottom: 6px; }
.return-review textarea {
  width: 100%; padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--radius);
  font: inherit; font-size: 0.95rem; resize: vertical;
}

/* A+ 管理 */
.aplus-table-actions { justify-content: flex-end; margin: 0; }
.check-col { width: 118px; }
.check-inline { display: inline-flex; align-items: center; gap: 6px; font-size: 0.9rem; }
.sku-options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.sku-check { display: flex; align-items: flex-start; gap: 8px; font-size: 0.9rem; cursor: pointer; }
.sku-check input { width: auto; margin: 3px 0 0; padding: 0; flex: none; }
.multi-select { position: relative; }
.multi-select-control {
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px;
  min-height: 48px; padding: 6px 10px;
  border: 1px solid var(--border); border-radius: var(--radius);
  background: #fff; cursor: text;
}
.multi-select-control:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(27, 42, 74, 0.12);
}
.multi-select-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.sku-tag {
  display: inline-flex; align-items: center; gap: 4px; max-width: 100%;
  padding: 3px 6px 3px 10px; border-radius: 999px;
  color: #fff; font-size: 0.82rem; font-weight: 600; white-space: nowrap;
}
.sku-tag-remove {
  border: 0; padding: 0 2px; background: transparent; color: inherit;
  font-size: 14px; line-height: 1; cursor: pointer; opacity: 0.8;
}
.sku-tag-remove:hover { opacity: 1; }
.multi-select-control input {
  flex: 1 1 180px; width: auto; min-width: 120px;
  border: 0; padding: 4px 0; outline: none; background: transparent;
  font: inherit; font-size: 0.9rem;
}
.multi-select-menu {
  position: absolute; z-index: 20; left: 0; right: 0; top: calc(100% + 4px);
  max-height: 260px; overflow-y: auto; padding: 6px;
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: 0 10px 28px rgba(18, 18, 18, 0.14);
}
.multi-select-option {
  display: flex; align-items: flex-start; gap: 8px;
  padding: 8px; border-radius: 6px; font-size: 0.9rem; cursor: pointer;
}
.multi-select-option:hover { background: #f5f8fb; }
.multi-select-option input { width: auto; margin: 3px 0 0; padding: 0; flex: none; }
.multi-select-empty { padding: 10px; color: var(--muted); font-size: 0.88rem; }
#upload-hint { margin: 8px 0 10px; }
.aplus-upload-buttons { align-items: center; }
.aplus-admin-list {
  display: flex; flex-direction: column; gap: 0; margin-top: 14px;
  border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden; background: #fff;
}
.aplus-admin-list > .line-meta { margin: 0; padding: 16px; }
.aplus-block { padding: 0; margin: 0; background: #fff; cursor: grab; line-height: 0; }
.aplus-block.dragging { opacity: 0.45; }
.aplus-block-images { display: grid; gap: 0; }
.aplus-block-images.single { grid-template-columns: 1fr; }
.aplus-block-images.columns { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.aplus-block-images figure { position: relative; margin: 0; min-width: 0; }
.aplus-block-images img { display: block; width: 100%; height: auto; }
.aplus-remove {
  position: absolute; top: 8px; right: 8px;
  width: 30px; height: 30px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, 0.7);
  background: rgba(18, 18, 18, 0.5); color: #fff;
  font-size: 20px; line-height: 1; cursor: pointer;
  opacity: 0; transition: opacity 0.15s, background 0.15s;
}
.aplus-block-images figure:hover .aplus-remove,
.aplus-remove:focus-visible { opacity: 1; }
.aplus-remove:hover { background: rgba(192, 57, 43, 0.9); }
@media (max-width: 640px) {
  .aplus-table-actions { justify-content: flex-start; }
  .check-col { width: 82px; }
  .aplus-block-head { align-items: flex-start; flex-direction: column; gap: 2px; }
}

/* 弹窗 */
.modal-backdrop {
  position: fixed; inset: 0; background: rgba(0, 0, 0, 0.35);
  display: flex; align-items: center; justify-content: center; padding: 20px; z-index: 50;
}
.modal {
  background: #fff; border-radius: var(--radius); padding: 24px;
  width: 100%; max-width: 460px; box-shadow: 0 12px 40px rgba(0, 0, 0, 0.18);
}
.modal h3 { margin-top: 0; }

/* 邮件记录 */
.mail-item {
  border: 1px solid var(--border); border-radius: var(--radius);
  padding: 10px 14px; margin-bottom: 8px;
}
.mail-item summary { cursor: pointer; }
.mail-body {
  margin-top: 10px; padding: 12px; background: #fafafa;
  border-radius: 6px; font-size: 0.9rem; overflow-x: auto;
}

/* 商品 / SKU 编辑 */
.thumb {
  width: 40px; height: 40px; object-fit: cover;
  border-radius: 4px; border: 1px solid var(--border); vertical-align: middle;
}
.cell-input {
  width: 100%; padding: 6px 8px; border: 1px solid var(--border);
  border-radius: 6px; font: inherit; font-size: 0.88rem;
}
.cell-input[readonly] { background: #f7f7f7; color: var(--muted); }
.image-gallery { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 12px; }
.image-card {
  width: 132px; border: 1px solid var(--border); border-radius: var(--radius);
  padding: 8px; text-align: center;
}
.image-card img {
  width: 100%; height: 96px; object-fit: cover;
  border-radius: 4px; border: 1px solid var(--border); margin-bottom: 6px;
}
.image-card .line-meta { font-size: 0.72rem; word-break: break-all; }
.image-card .btn { margin-top: 6px; }
#sku-table td { vertical-align: middle; }
#sku-table code { font-size: 0.82rem; }
#images-table td:last-child { white-space: nowrap; }
.th-sub { display: inline-block; margin-top: 2px; font-size: 0.72rem; font-weight: 400; color: var(--muted); white-space: nowrap; }

/* 导航未读角标 */
.nav-badge {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 16px; height: 16px; padding: 0 4px; margin-left: 4px;
  background: #c0392b; color: #fff; border-radius: 999px;
  font-size: 0.68rem; line-height: 1;
}

/* 收件箱 */
.inbox-list { display: flex; flex-direction: column; gap: 12px; margin-top: 12px; }
.inbox-card {
  border: 1px solid var(--border); border-radius: var(--radius);
  padding: 12px 16px; background: #fff;
}
.inbox-card.unread { border-left: 3px solid #d68a1e; background: #fffdf7; }
.inbox-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.inbox-body { white-space: pre-wrap; word-break: break-word; font-size: 0.94rem; margin-bottom: 8px; }
.reply-box { margin-top: 8px; }

/* 沟通记录 */
.message-list { display: flex; flex-direction: column; gap: 10px; margin: 12px 0 20px; }
.message-item {
  border: 1px solid var(--border); border-radius: var(--radius);
  padding: 10px 14px; background: #fff;
}
.message-item.inbound { background: #f7fbf8; border-color: #d6ead9; }
.message-item.outbound { background: #fafafa; }
.message-head { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; flex-wrap: wrap; }
.message-body { font-size: 0.92rem; white-space: pre-wrap; word-break: break-word; }

footer.site-footer {
  margin-top: auto;
  min-height: 72px;
  display: flex;
  align-items: center;
  background: var(--accent);
  color: rgba(255, 255, 255, 0.9);
  border-top: 0;
  padding: 0;
  font-size: 0.85rem;
}
.footer-inner { width: 100%; min-height: 72px; display: flex; align-items: center; justify-content: center; gap: 16px; flex-wrap: wrap; }
.footer-nav { display: flex; align-items: center; justify-content: center; gap: 24px; flex-wrap: wrap; }
.footer-link { color: rgba(255, 255, 255, 0.85); text-decoration: none; }
.footer-link:hover { color: #fff; text-decoration: underline; }
@media (max-width: 640px) {
  .footer-nav { gap: 14px; font-size: 0.78rem; }
}

.policy-toc { display: flex; flex-wrap: wrap; gap: 8px 20px; margin: 0 0 24px; }
.policy-toc a {
  color: var(--accent); text-decoration: none; font-size: 0.9rem;
  border-bottom: 1px solid transparent; padding-bottom: 2px;
}
.policy-toc a:hover { border-bottom-color: currentColor; }
.policy-copy h2 { margin-top: 32px; scroll-margin-top: 20px; }
.policy-copy h2:first-child { margin-top: 0; }
.policy-copy ul { padding-left: 20px; }
.policy-copy li { margin: 8px 0; }

.contact-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: start; }
.contact-form {
  background: #fafafa; border: 1px solid var(--border); border-radius: var(--radius); padding: 20px;
}
.contact-form .field { margin-bottom: 14px; }
.contact-form label { display: block; font-size: 0.9rem; margin-bottom: 6px; }
.contact-form input, .contact-form textarea {
  width: 100%; padding: 10px 12px; border: 1px solid var(--border);
  border-radius: var(--radius); font: inherit;
}
.contact-form textarea { resize: vertical; }
@media (max-width: 820px) { .contact-layout { grid-template-columns: 1fr; gap: 28px; } }

.page-copy { max-width: 760px; font-size: 0.95rem; line-height: 1.7; color: #333; }
.page-copy h2 { font-size: 1.1rem; margin: 28px 0 10px; }
.page-copy p { margin: 0 0 12px; }
.page-copy ul { margin: 0 0 12px; padding-left: 1.3em; }
.page-copy li { margin-bottom: 6px; }
.page-copy a { text-decoration: underline; }

