/* 订购页 — 朝晞式左栏+右卡，红链品牌色 */
@import url("https://fonts.googleapis.com/css2?family=Manrope:wght@600;700;800&family=Noto+Sans+SC:wght@400;500;700&display=swap");

:root {
  --zx-accent: #2563eb;
  --zx-accent-hover: #1d4ed8;
  --zx-ink: #0b1f3a;
  --zx-muted: #5b6b7c;
  --zx-line: #e5eaf2;
  --zx-bg: #f4f7fb;
  --zx-surface: #fff;
  --zx-hot: #dc2626;
  --zx-radius: 12px;
  --zx-font: "Noto Sans SC", "Manrope", sans-serif;
  --zx-display: "Manrope", "Noto Sans SC", sans-serif;
}

.zx-cart-wrap {
  max-width: 1240px !important; /* 与顶栏 .container 同宽，左右对齐 */
  margin: 0 auto;
  padding: 12px 15px 48px !important;
  background: var(--zx-bg);
  font-family: var(--zx-font);
  color: var(--zx-ink);
}

.zx-cart-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 20px;
  align-items: start;
}

.zx-sidebar {
  background: var(--zx-surface);
  border: 1px solid var(--zx-line);
  border-radius: var(--zx-radius);
  padding: 12px 0 14px;
  position: sticky;
  top: 76px; /* 跟实际顶栏高度对齐，避免比右侧内容更靠下 */
  align-self: start;
  max-height: calc(100vh - 92px);
  overflow-x: hidden;
  overflow-y: auto;
}

.zx-side-title {
  font-family: var(--zx-display);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--zx-muted);
  padding: 6px 16px 10px;
  text-transform: uppercase;
}

/* 一级手风琴 */
.zx-acc {
  border-bottom: 1px solid var(--zx-line);
}

.zx-acc:last-child {
  border-bottom: none;
}

.zx-acc-l1 {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  border: 0;
  background: transparent;
  padding: 12px 16px;
  cursor: pointer;
  color: var(--zx-ink);
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  text-align: left;
}

.zx-acc-l1:hover {
  color: var(--zx-accent);
  background: #f8fafc;
}

.zx-acc.is-open > .zx-acc-l1,
.zx-acc.is-current > .zx-acc-l1 {
  color: var(--zx-accent);
}

.zx-acc-arrow {
  width: 8px;
  height: 8px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  transition: transform 0.2s ease;
  opacity: 0.55;
  flex-shrink: 0;
  margin-left: 8px;
}

.zx-acc.is-open .zx-acc-arrow {
  transform: rotate(-135deg);
  opacity: 0.9;
}

.zx-acc-l2 {
  display: none;
  padding: 0 8px 10px;
}

.zx-acc.is-open > .zx-acc-l2 {
  display: block;
}

.zx-acc-l2-item {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 2px 0;
  padding: 8px 10px;
  border-radius: 8px;
  color: var(--zx-ink) !important;
  text-decoration: none !important;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.3;
  min-height: 38px;
}

.zx-acc-l2-item:hover {
  background: #eef3fb;
  color: var(--zx-accent) !important;
}

.zx-acc-l2-item.is-active {
  background: rgba(37, 99, 235, 0.1);
  color: var(--zx-accent) !important;
  font-weight: 700;
}

.zx-acc-l2-name {
  flex: 1 1 auto;
  min-width: 0;
  overflow: visible;
  white-space: normal;
  line-height: 1.3;
}

.zx-nav-item .country-flag,
.zx-acc-l2-item .country-flag {
  width: 20px;
  height: 14px;
  object-fit: cover;
  border-radius: 2px;
  border: 1px solid var(--zx-line);
  flex-shrink: 0;
  display: block;
}

.zx-pill {
  margin-left: auto;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  background: #e8f0fe;
  color: var(--zx-accent);
  white-space: nowrap;
  flex-shrink: 0;
  line-height: 1.3;
}

.zx-acc-l2-item.is-active .zx-pill {
  background: var(--zx-accent);
  color: #fff;
}

.zx-main {
  min-width: 0;
}

.zx-region-head {
  background: var(--zx-surface);
  border: 1px solid var(--zx-line);
  border-radius: var(--zx-radius);
  padding: 22px 24px;
  margin-bottom: 16px;
}

.zx-region-head h1 {
  font-family: var(--zx-display);
  font-size: clamp(1.35rem, 2.2vw, 1.75rem);
  font-weight: 800;
  margin: 0 0 8px;
  color: var(--zx-ink);
}

.zx-region-head .zx-lead {
  margin: 0;
  color: var(--zx-muted);
  font-size: 14px;
  line-height: 1.6;
}

.zx-tagline {
  margin-top: 12px;
  padding: 10px 12px;
  background: #eef3fb;
  border-radius: 8px;
  font-size: 13px;
  color: var(--zx-ink);
  line-height: 1.6;
}

.zx-region-notice {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-top: 14px;
  padding: 14px 16px;
  background: #e8f5e9;
  border: 1px solid #c8e6c9;
  border-radius: 10px;
  color: #2e7d32;
  font-size: 13px;
  line-height: 1.65;
}

.zx-region-notice-icon {
  flex: 0 0 22px;
  width: 22px;
  height: 22px;
  margin-top: 0;
  border-radius: 50%;
  background: #43a047;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.zx-region-notice-body {
  min-width: 0;
  flex: 1;
  text-align: left;
}

.zx-region-notice-body p {
  margin: 0 0 4px;
  padding: 0;
  text-indent: 0;
  text-align: left;
}

.zx-region-notice-body p:last-child {
  margin-bottom: 0;
}

.zx-region-notice .zx-em {
  color: #d32f2f;
  font-weight: 700;
}

.zx-region-notice a {
  color: #1565c0 !important;
  text-decoration: none !important;
  word-break: break-all;
}

.zx-region-notice a:hover {
  text-decoration: underline !important;
}

.zx-login-hint {
  margin-top: 10px;
  font-size: 13px;
  color: var(--zx-muted);
}

.zx-login-hint a {
  color: var(--zx-accent);
  font-weight: 600;
}

.zx-product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 14px;
}

.zx-product-card {
  background: var(--zx-surface);
  border: 1px solid var(--zx-line);
  border-radius: var(--zx-radius);
  padding: 14px 14px 12px;
  display: flex;
  flex-direction: column;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
  position: relative;
  overflow: hidden;
}

.zx-product-card:hover {
  border-color: rgba(37, 99, 235, 0.45);
  box-shadow: 0 10px 28px rgba(11, 31, 58, 0.08);
  transform: translateY(-2px);
}

.zx-product-card h3 {
  font-family: var(--zx-display);
  font-size: 0.98rem;
  font-weight: 800;
  margin: 0 0 8px;
  color: var(--zx-ink);
  line-height: 1.3;
}

/* 规格列表：标签固定列宽，数值完整显示可换行 */
.zx-desc {
  font-size: 12.5px;
  color: var(--zx-ink);
  line-height: 1.45;
  margin: 0 0 10px;
  white-space: normal;
  word-break: break-word;
  overflow-wrap: anywhere;
  flex: 1;
}

.zx-desc ul,
.zx-desc ol {
  list-style: none;
  margin: 0;
  padding: 0;
}

.zx-desc li {
  display: grid;
  grid-template-columns: 3.75em minmax(0, 1fr);
  column-gap: 10px;
  align-items: baseline;
  margin: 0;
  padding: 3px 0;
  list-style: none;
  border-bottom: 1px solid #eef2f7;
  line-height: 1.45;
  white-space: normal;
  overflow: visible;
}

.zx-desc li:last-child {
  border-bottom: none;
}

.zx-desc li::marker {
  content: none;
}

.zx-desc li .zx-spec-k,
.zx-desc li strong.zx-spec-k {
  font-weight: 500;
  color: var(--zx-muted);
  white-space: nowrap;
  overflow: visible;
  text-overflow: unset;
}

.zx-desc li .zx-spec-v {
  font-weight: 600;
  color: var(--zx-ink);
  min-width: 0;
  white-space: normal;
  overflow: visible;
  word-break: break-word;
}

.zx-desc li strong:not(.zx-spec-k) {
  font-weight: 500;
  color: var(--zx-muted);
  white-space: normal;
  overflow: visible;
  text-overflow: unset;
}

.zx-desc p {
  margin: 0 0 4px;
}

.zx-price {
  margin: 2px 0 10px;
}

.zx-price .zx-now {
  font-family: var(--zx-display);
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--zx-accent);
}

.zx-price .zx-unit {
  font-size: 13px;
  color: var(--zx-muted);
  font-weight: 500;
}

.zx-price .zx-origin {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  color: #94a3b8;
  text-decoration: line-through;
}

.zx-buy {
  display: block;
  text-align: center;
  height: 40px;
  line-height: 40px;
  border-radius: 8px;
  background: var(--zx-accent);
  color: #fff !important;
  font-weight: 700;
  font-size: 14px;
  text-decoration: none !important;
  margin-top: auto;
  transition: background 0.15s ease;
}

.zx-buy:hover {
  background: var(--zx-accent-hover);
  color: #fff !important;
}

.zx-buy.is-disabled,
.zx-product-card.stock-out .zx-buy {
  background: #e2e8f0 !important;
  color: #64748b !important;
  cursor: not-allowed;
  pointer-events: none;
  box-shadow: none;
}

.zx-product-card.stock-out {
  opacity: 0.9;
  position: relative;
}

.zx-product-card.stock-out::after {
  content: "已售罄";
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 2px 8px;
  border-radius: 999px;
  background: #fee2e2;
  color: #b91c1c;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.4;
}

.zx-notice {
  margin-top: 20px;
  padding: 14px 16px;
  border: 1px solid #fecaca;
  border-radius: 8px;
  background: #fef2f2;
  color: #991b1b;
  font-size: 13px;
  line-height: 1.75;
}

.zx-pager {
  display: flex;
  justify-content: center;
  margin-top: 20px;
}

@media (max-width: 991.98px) {
  .zx-cart-layout {
    grid-template-columns: 1fr;
  }
  .zx-sidebar {
    position: static;
    max-height: none;
    overflow: visible;
    display: block;
    padding: 10px 0;
  }
  .zx-side-title {
    width: 100%;
  }
}
