/*!
 * zhc-magic5.css —— 装修「图片魔方」五种效果款式
 * ZHC-MGC5-20261201
 *
 * 款式（props.variant）：
 *   asym     1大4小·左主右辅   —— 3列2行，第1列大图跨两行
 *   banner   通栏大图+双列     —— 2列2行，上排大图跨两列
 *   matrix   三列等高矩阵      —— 3列2行，6 格等宽等高
 *   offset   不规则错位拼贴    —— 2列2行，列宽 3fr/2fr 对角大小
 *   carousel 主图轮播+静态魔方 —— 2列2行，左大图跨两行内部单图轮播
 *   (空/其它) 经典等分宫格      —— 老配置 layout 2x2 等，保持零变化
 *
 * 基准宽 390px；宽度用百分比，格子高度按规格固定，图片 object-fit:cover 不变形。
 * 颜色只读品牌变量，缺省回落到锁定 VI：墨蓝 #0B2A4A / 青蓝 #14B8A6 / 亮青 #2DD4BF /
 * 薄荷 #8FF0E4 / 暖金 #D4AF37 / 边线 #E2EFEC / 浅底 #E7F3F1。
 * 组件内不含价格、等级、收益、绝对化比价等任何敏感文案。
 */

.dz-sec.dz-mgcsec {
  margin: var(--dz-gap) 0 0;
  padding: 0;
  background: transparent;
  border-radius: 0;
  box-shadow: none;
  overflow: visible;
}

.dzm {
  --mgc-ink: var(--dzm-ink, #0B2A4A);
  --mgc-brand: var(--brand, #14B8A6);
  --mgc-brand-2: var(--brand-2, #2DD4BF);
  --mgc-mint: #8FF0E4;
  --mgc-gold: #D4AF37;
  --mgc-line: var(--dzm-line, #E2EFEC);
  --mgc-surface: var(--dzm-surface, #E7F3F1);
  margin: 0 16px;
  padding: 14px;
  border-radius: 22px;
  background: radial-gradient(circle at 1px 1px, rgba(20, 184, 166, .10) 1px, transparent 0) 0 0 / 14px 14px,
              linear-gradient(180deg, #F3FAF9, #EAF5F3);
  color: var(--mgc-ink);
  font-family: "PingFang SC", "Microsoft YaHei", "Source Han Sans SC", sans-serif;
  box-sizing: border-box;
}
.dzm * { box-sizing: border-box; }

/* 深色主题：整块跟随系统 surface，点阵底淡出，避免白底浅字 */
html[data-deco-dark="1"] .dzm {
  background: var(--dz-surface, var(--surface, #101a26));
  border: 1px solid var(--dz-line, var(--border, rgba(255, 255, 255, .12)));
}

.dzm__grid { display: grid; gap: 10px; }
.dzm__grid--asym     { grid-template-columns: 1.15fr 1fr 1fr; grid-template-rows: 1fr 1fr; height: 196px; }
.dzm__grid--banner   { grid-template-columns: 1fr 1fr; grid-template-rows: 1.15fr 1fr; height: 196px; }
.dzm__grid--matrix   { grid-template-columns: repeat(3, 1fr); grid-template-rows: 1fr 1fr; height: 186px; }
.dzm__grid--offset   { grid-template-columns: 3fr 2fr; grid-template-rows: 1fr 1fr; height: 196px; }
.dzm__grid--carousel { grid-template-columns: 1.15fr 1fr; grid-template-rows: 1fr 1fr; height: 196px; }
.dzm__grid--classic  { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 110px; }

.dzm__cell {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  min-height: 0;
  border-radius: 16px;
  overflow: hidden;
  background: var(--mgc-surface);
  box-shadow: 0 6px 14px rgba(11, 42, 74, .08);
  text-decoration: none;
  color: inherit;
  isolation: isolate;
}
.dzm__cell--big { grid-row: span 2; }
.dzm__grid--banner   .dzm__cell--wide { grid-column: span 2; }
.dzm__grid--carousel .dzm__cell--big  { grid-row: span 2; }

.dzm__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.dzm__ph {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, .92);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .5px;
  text-shadow: 0 1px 2px rgba(11, 42, 74, .28);
}
.dzm__ph--t0 { background: linear-gradient(150deg, #2DD4BF, #14B8A6); }
.dzm__ph--t1 { background: linear-gradient(150deg, #8FF0E4, #CFF5EE); color: var(--mgc-ink); text-shadow: none; }
.dzm__ph--t2 { background: linear-gradient(150deg, #0B2A4A, #14507A); }
.dzm__ph--t3 { background: linear-gradient(150deg, #E8C96A, #D4AF37); }
.dzm__ph--t4 { background: linear-gradient(150deg, #14507A, #2DD4BF); }
.dzm__ph--ph { background: var(--mgc-surface); color: var(--mgc-ink); text-shadow: none; }

.dzm__tag {
  position: absolute;
  left: 8px;
  bottom: 8px;
  z-index: 3;
  max-width: calc(100% - 16px);
  padding: 4px 9px;
  border-radius: 9px;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  background: rgba(255, 255, 255, .88);
  color: var(--mgc-ink);
}
.dzm__tag--light { background: rgba(11, 42, 74, .55); color: #FFFFFF; }

/* E 款：左大图内部单图轮播 */
.dzm__mini-view {
  position: absolute;
  inset: 0;
  overflow: hidden;
  border-radius: 16px;
}
.dzm__mini-track {
  display: flex;
  height: 100%;
  transition: transform .45s cubic-bezier(.22, .61, .36, 1);
  will-change: transform;
}
.dzm__mini-slide {
  position: relative;
  flex: 0 0 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.dzm__mini-slide .dzm__img { position: absolute; inset: 0; }
.dzm__mini-dots {
  position: absolute;
  left: 50%;
  bottom: 9px;
  z-index: 4;
  display: flex;
  gap: 5px;
  align-items: center;
  transform: translateX(-50%);
}
.dzm__mdot {
  display: block;
  width: 6px;
  height: 6px;
  border-radius: 6px;
  background: rgba(255, 255, 255, .55);
  border: 0;
  padding: 0;
  transition: width .25s ease, background .25s ease;
}
.dzm__mdot.is-on { width: 16px; background: #FFFFFF; }

@media (prefers-reduced-motion: reduce) {
  .dzm__mini-track { transition: none; }
  .dzm__mdot { transition: none; }
}

/* ZHC-MGC5-MANY-20261203：主图轮播款图片超过 2 张时，
   主图占满一行，其余图片按 3 列（宽屏 4 列）自动换行，张数不限 */
.dzm__grid--carousel-many {
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: none;
  grid-auto-rows: 88px;
  height: auto;
}
.dzm__grid--carousel-many .dzm__cell--big {
  grid-column: 1 / -1;
  grid-row: span 2;
  height: auto;
}