/* C 端商城详情预览（对齐小程序 pages/mall/detail） */
.mdp-shell {
  border: 1px solid #e8e4dc;
  border-radius: 12px;
  background: #f5f5f5;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(43, 51, 46, 0.08);
}

.mdp-device-label {
  padding: 8px 12px;
  font-size: 11px;
  font-weight: 600;
  color: #2f6b4f;
  background: #e4efeb;
  border-bottom: 1px solid #dce8e2;
  text-align: center;
}

.mdp-page {
  max-height: min(78vh, 720px);
  overflow-y: auto;
  background: #f5f5f5;
}

/* SPU/商详弹层：主图区占满预览视口高度（分销 / 货盘共用） */
.mall-detail-preview-host .mdp-page {
  height: min(78vh, 720px);
}

.mdp-empty {
  padding: 32px 20px;
  text-align: center;
}

.mdp-empty-title {
  margin: 0 0 6px;
  font-size: 15px;
  font-weight: 600;
  color: #2f6b4f;
}

.mdp-empty-hint {
  margin: 0;
  font-size: 12px;
  line-height: 1.5;
}

.mdp-gallery-host {
  position: relative;
  background: #ececec;
  overflow: hidden;
  width: 100%;
  /* 默认方图占位；JS 按当前帧原图比例改高度（对齐小程序 widthFix，可至约 1:2 竖版） */
  height: auto;
  min-height: 220px;
  max-height: min(85vh, 1200px);
}

.mdp-gallery-track {
  display: flex;
  align-items: flex-start;
  box-sizing: border-box;
  width: 100%;
  height: 100%;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}

.mdp-gallery-track::-webkit-scrollbar {
  display: none;
}

.mdp-gallery-slide {
  box-sizing: border-box;
  flex: 0 0 100%;
  scroll-snap-align: start;
  width: 100%;
  height: auto;
  overflow: hidden;
  background: #ececec;
}

/* 与小程序 mode=widthFix 同口径：整图按宽铺满，高度随比例，禁止 cover 裁掉下半截 */
.mdp-gallery-img {
  width: 100%;
  height: auto;
  display: block;
  border: 0;
  vertical-align: top;
}

.mdp-gallery-swatch,
.mdp-gallery-ph {
  width: 100%;
  height: 100%;
  min-height: 220px;
  display: flex;
  align-items: flex-end;
  padding: 14px;
  box-sizing: border-box;
  color: rgba(255, 255, 255, 0.95);
  font-size: 13px;
}

.mdp-gallery-dots {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 10px;
  display: flex;
  justify-content: center;
  gap: 6px;
}

.mdp-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.55);
}

.mdp-dot.on {
  background: #fff;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.15);
}

.mdp-price-bar {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 12px 14px 4px;
  background: #fff;
}

.mdp-price {
  color: #e02e24;
  font-size: 26px;
  font-weight: 700;
  line-height: 1;
}

.mdp-yen {
  font-size: 14px;
  margin-right: 2px;
}

.mdp-stock {
  font-size: 12px;
  color: #7a847c;
}

.mdp-title-block {
  padding: 4px 14px 14px;
  background: #fff;
  margin-bottom: 8px;
}

.mdp-title {
  font-size: 15px;
  line-height: 1.45;
  font-weight: 600;
  color: #2b332e;
}

.mdp-sell-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.mdp-sell-tag {
  font-size: 11px;
  color: #2f6b4f;
  background: #e4efeb;
  border: 1px solid rgba(47, 107, 79, 0.25);
  padding: 2px 8px;
  border-radius: 6px;
}

.mdp-shop {
  margin-top: 8px;
  font-size: 12px;
}

.mdp-sku-panel,
.mdp-prop-panel,
.mdp-desc-panel {
  background: #fff;
  padding: 12px 14px 14px;
  margin-bottom: 8px;
}

.mdp-sku-hint {
  font-size: 12px;
  color: #7a847c;
  margin-bottom: 10px;
}

.mdp-sku-label,
.mdp-section-title {
  font-size: 13px;
  font-weight: 600;
  color: #2b332e;
  margin: 10px 0 8px;
}

.mdp-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.mdp-chip {
  border: 1px solid #e8e4dc;
  background: #fff;
  color: #2b332e;
  border-radius: 6px;
  padding: 5px 12px;
  font-size: 12px;
  cursor: pointer;
}

.mdp-chip.has-thumb {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px 4px 4px;
}

.mdp-chip-thumb {
  width: 22px;
  height: 22px;
  border-radius: 4px;
  object-fit: cover;
  flex: 0 0 auto;
  background: #f0eeea;
}

.mdp-chip.on {
  border-color: #2f6b4f;
  color: #2f6b4f;
  background: #e4efeb;
}

.mdp-tryon-ref {
  margin-top: 12px;
}

.mdp-tryon-img {
  width: 100%;
  max-height: 200px;
  object-fit: contain;
  border-radius: 8px;
  background: #faf9f7;
}

.mdp-tryon-links {
  margin-top: 10px;
  font-size: 12px;
}

.mdp-prop-row {
  display: flex;
  gap: 10px;
  padding: 6px 0;
  border-bottom: 1px solid #f0ede6;
  font-size: 12px;
}

.mdp-prop-k {
  flex: 0 0 72px;
  color: #7a847c;
}

.mdp-prop-v {
  flex: 1;
  color: #2b332e;
}

.mdp-desc-text {
  font-size: 12px;
  line-height: 1.6;
  color: #2b332e;
  margin-bottom: 8px;
}

.mdp-desc-swatch {
  min-height: 80px;
  border-radius: 8px;
  display: flex;
  align-items: flex-end;
  padding: 10px;
  margin-bottom: 8px;
  color: #fff;
  font-size: 12px;
}

.mdp-desc-img {
  width: 100%;
  height: auto;
  object-fit: contain;
  border-radius: 8px;
  margin-bottom: 8px;
  display: block;
}

.mdp-desc-html img {
  max-width: 100%;
  height: auto;
  width: auto;
  display: inline-block;
  vertical-align: middle;
}

/* HTML 保真：不把小图标强制拉成全宽大图 */
.mdp-desc-html-fidelity {
  font-size: 14px;
  line-height: 1.5;
  word-break: break-word;
}
.mdp-desc-html-fidelity img {
  max-width: 100%;
  width: auto;
  height: auto;
}

.mdp-icon-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
  align-items: center;
}
.mdp-icon-thumb {
  width: auto;
  max-width: 72px;
  max-height: 72px;
  height: auto;
  object-fit: contain;
  display: block;
}

.mdp-footer {
  position: sticky;
  bottom: 0;
  background: #fff;
  border-top: 1px solid #e8e4dc;
  padding: 8px 10px;
}

.mdp-footer-static {
  pointer-events: none;
  user-select: none;
}

.mdp-footer-inner {
  display: flex;
  align-items: center;
  gap: 8px;
}

.mdp-footer-cart {
  flex: 0 0 auto;
  font-size: 11px;
  padding: 0 6px;
}

.mdp-btn-cart,
.mdp-btn-buy {
  flex: 1;
  display: block;
  text-align: center;
  border: none;
  border-radius: 20px;
  padding: 10px 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: default;
}

.mdp-btn-cart {
  background: #fff3e8;
  color: #9a6b1a;
}

.mdp-btn-buy {
  background: linear-gradient(90deg, #ff6034, #ee0a24);
  color: #fff;
}

.mdp-btn-cart.is-disabled,
.mdp-btn-buy.is-disabled {
  opacity: 0.45;
}
