/* ============================================================
   闪得 模板展示（Tab + 产品网格）- 作用域样式
   句柄: shande-templates
   复刻首页「从模板开始」：ppt-showcase 标签 + templates 卡片网格。
   ============================================================ */

.shande-templates {
  --tpl-cols: 4;
  --tpl-gap: 18px;
}

.shande-templates .templates-title {
  font-size: 22px;
  font-weight: 700;
  color: #111827;
  margin: 0 0 18px;
  letter-spacing: 0.5px;
}

/* 标签 */
.shande-templates .ppt-showcase__tabs {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 36px;
}
.shande-templates .ppt-showcase__tab {
  background: #f4f5f7;
  border: 1px solid transparent;
  border-radius: 20px;
  padding: 6px 16px;
  font-size: 13.5px;
  font-weight: 500;
  color: #4e5969;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.22, 1, 0.36, 1);
  outline: none;
}
.shande-templates .ppt-showcase__tab:hover {
  background: #e5e6eb;
  color: #1d2129;
}
.shande-templates .ppt-showcase__tab.active {
  background: linear-gradient(135deg, var(--gradient-end, #49c9e9) 0%, var(--gradient-start, #096ddd) 100%);
  color: #fff;
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(9, 109, 221, 0.25);
}
/* 当标签设置了跳转链接时用 <a> 渲染：抹平与 <button> 的差异
   （去下划线、统一行高与对齐，hover/active 颜色沿用上面的规则） */
.shande-templates a.ppt-showcase__tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  text-decoration: none;
}
.shande-templates a.ppt-showcase__tab:hover,
.shande-templates a.ppt-showcase__tab:focus {
  text-decoration: none;
}
.shande-templates a.ppt-showcase__tab.active {
  color: #fff;
}

/* 面板切换 */
.shande-templates .shande-tpl-pane { display: none; }
.shande-templates .shande-tpl-pane.is-active { display: block; }

/* 网格 */
.shande-templates .templates-grid {
  display: flex;
  flex-wrap: wrap;
  gap: var(--tpl-gap);
  width: 100%;
}
/* 每个面板单独的每行数量：桌面用 --cols-pc，手机用 --cols-m */
.shande-templates .shande-tpl-pane { --cols: var(--cols-pc, 4); }
.shande-templates .templates-col {
  flex: 0 0 calc((100% - (var(--cols) - 1) * var(--tpl-gap)) / var(--cols));
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: var(--tpl-gap);
}

/* 卡片 */
.shande-templates .template-card {
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: transform;
  text-decoration: none;
}
.shop-image-card.shande-templates { min-width: 0; }
.shop-image-card.shande-templates > .templates-col { height: 100%; }
.shande-templates .template-card:hover { transform: translateY(-8px); }

/* 竖版产品使用完整白色卡片容器：封面、标题和价格共用同一层内边距。 */
.shande-templates .template-card--vertical {
  width: 100%;
  height: 100%;
  box-sizing: border-box;
  padding: var(--tpl-card-padding, var(--tpl-ppt-card-padding, 8px 8px 12px));
  border: 1px solid rgba(226, 232, 240, .58);
  border-radius: 18px;
  background: #fff;
  box-shadow: none;
  overflow: visible;
}
.shande-templates .template-card--vertical:hover {
  box-shadow: none;
}

.shande-templates .template-thumb {
  position: relative;
  width: 100%;
  aspect-ratio: var(--tpl-card-ratio, 1 / 1);
  border-radius: 10px;
  overflow: hidden;
  background: #f7f9fc center/contain no-repeat;
  box-shadow: none;
  transition: box-shadow 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}
.shande-templates .template-card:hover .template-thumb {
  box-shadow: none;
}
.shande-templates .template-thumb::before {
  content: '';
  position: absolute;
  inset: 0;
  background: inherit;
  background-size: contain;
  background-position: center;
  transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}
.shande-templates .template-card:hover .template-thumb::before { transform: none; }

.shande-templates .template-thumb__overlay,
.shande-templates .template-thumb__btn { position: relative; z-index: 2; }
.shande-templates .template-thumb .vip-badge { z-index: 3; }

/* 不显示悬停「立即下载」按钮（与源码一致） */
.shande-templates .template-thumb__overlay {
  display: none;
}
.shande-templates .template-thumb__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  color: #1d2129;
  font-size: 12px;
  font-weight: 600;
  height: 32px;
  padding: 0 14px;
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18), 0 0 0 1px rgba(0, 0, 0, 0.04);
  cursor: pointer;
  opacity: 0;
  transform: translateY(14px) scale(0.95);
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.35s ease, background 0.25s ease, box-shadow 0.25s ease, color 0.25s ease;
  line-height: 1;
}
.shande-templates .template-card:hover .template-thumb__btn {
  opacity: 1;
  transform: translateY(0) scale(1);
}
.shande-templates .template-thumb__btn:hover {
  background: linear-gradient(135deg, #49c9e9 0%, #096ddd 100%);
  color: #fff;
  box-shadow: 0 6px 16px rgba(9, 109, 221, 0.35);
}
.shande-templates .template-download-icon { color: #096ddd; flex-shrink: 0; transition: all 0.25s ease; }
.shande-templates .template-thumb__btn:hover .template-download-icon { color: #fff; }

/* Shared product information: all preview types use the same title/summary/pricing markup. */
.shande-templates .template-name {
  min-width: 0;
  max-width: 100%;
  font-family: inherit;
  margin-top: 5px;
  margin-bottom: 1px;
  font-size: 14px;
  color: #17243b;
  font-weight: 600;
  line-height: 1.55;
  white-space: normal;
  overflow: visible;
  overflow-wrap: anywhere;
  text-overflow: clip;
  transition: color 0.3s ease;
}
.shande-templates .template-card:hover .template-name { color: var(--primary, #096ddd); }
/* Font tryout lists retain their full title and their existing column alignment. */
.shande-templates:not([data-zg-current-view="list"]) :is(.template-card--vertical, .sd-product-card) .template-name {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  min-height: 3.1em;
  max-height: 3.1em;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Real format/size/license or category-specific facts share the same summary layout. */
.shande-templates .template-summary {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 2px 10px;
  min-width: 0;
  overflow: visible;
  color: #8390a5;
  font-size: 11px;
  margin-bottom: 3px;
  line-height: 1.55;
  white-space: normal;
}
.shande-templates .template-summary > span {
  min-width: 0;
  max-width: 100%;
  overflow: visible;
  overflow-wrap: anywhere;
  text-overflow: clip;
}
.shande-templates .template-summary > span + span::before { content: none; }

/* 会员折扣角标 */
.shande-templates .vip-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #fff;
  font-size: 10px;
  font-weight: 600;
  padding: 3px 6px;
  border-radius: 4px;
  z-index: 5;
  line-height: 1;
  pointer-events: none;
}
.shande-templates .template-card--vertical .vip-badge {
  background: linear-gradient(135deg, #36bce5 0%, #096ddd 100%);
}
.shande-templates .vip-badge--free,
.shande-templates .template-card--vertical .vip-badge--free {
  background: #096ddd;
  color: #fff;
}
.shande-templates .template-badges {
  position: absolute;
  top: 8px;
  right: 8px;
  left: 8px;
  z-index: 3;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
  gap: 4px;
  pointer-events: none;
}
.shande-templates .template-badges > .sd-shop-label,
.shande-templates .template-badges > .vip-badge {
  position: static;
  display: inline-flex;
  align-items: center;
  margin: 0;
  padding: 3px 6px;
  font-size: 10px;
  line-height: 1.2;
  white-space: nowrap;
}

/* 卡片价格：固定最小高度，免费/单价/双行会员价切换时网格不跳动。 */
.shande-templates .template-pricing {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: auto;
  min-height: 48px;
  color: #13213a;
  font-size: 13px;
  line-height: 1.35;
}
.shande-templates .template-pricing > strong {
  font-size: 18px;
  font-weight: 600;
}
.shande-templates .template-pricing > small,
.shande-templates .template-pricing__hint {
  color: #8c97a9;
  font-size: 10px;
  font-weight: 400;
  line-height: 1.35;
}
.shande-templates .template-pricing--free,
.shande-templates .template-pricing--normal {
  align-items: flex-start;
  justify-content: center;
  flex-direction: column;
  gap: 3px;
}
.shande-templates .template-pricing--free > strong { color: #1769d2; }
.shande-templates .template-pricing--preview {
  justify-content: space-between;
  flex-wrap: wrap;
}
.shande-templates .template-pricing--preview .template-pricing__hint {
  flex: 0 0 100%;
}
.shande-templates .template-member-preview {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 29px;
  padding: 0 10px;
  border-radius: 999px;
  background: #eaf4ff;
  color: #096ddd;
  font-size: 11px;
  white-space: nowrap;
  cursor: pointer;
  outline: none;
}
.shande-templates .template-member-preview:focus-visible {
  box-shadow: 0 0 0 3px rgba(9, 109, 221, .2);
}
.shande-templates .template-member-popover {
  position: absolute;
  z-index: 20;
  right: var(--tpl-member-popover-shift, 0px);
  left: auto;
  bottom: calc(100% + 9px);
  display: none;
  width: max-content;
  max-width: min(var(--tpl-member-popover-width, 220px), calc(100vw - 24px));
  grid-template-columns: minmax(0, max-content) max-content max-content;
  column-gap: 12px;
  box-sizing: border-box;
  padding: 8px 10px;
  border: 1px solid #dceafb;
  border-radius: 12px;
  background: rgba(255, 255, 255, .98);
  color: #516078;
  box-shadow: 0 18px 45px rgba(9, 67, 132, .17);
  cursor: default;
}
.shande-templates .template-member-popover::after {
  content: '';
  position: absolute;
  right: var(--tpl-member-popover-arrow, 24px);
  bottom: -6px;
  width: 11px;
  height: 11px;
  border-right: 1px solid #dceafb;
  border-bottom: 1px solid #dceafb;
  background: #fff;
  transform: rotate(45deg);
}
.shande-templates .template-member-popover > b {
  grid-column: 1 / -1;
  margin-bottom: 3px;
  color: #18243a;
  font-size: 13px;
}
.shande-templates .template-member-popover > span { display: contents; }
.shande-templates .template-member-popover > span > * {
  align-self: center;
  padding: 5px 0;
}
.shande-templates .template-member-popover i {
  min-width: 0;
  font-style: normal;
  white-space: normal;
  word-break: normal;
  overflow-wrap: break-word;
}
.shande-templates .template-member-popover small { color: #77849a; white-space: nowrap; }
.shande-templates .template-member-popover strong { color: #096ddd; text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.shande-templates .template-member-preview.is-open .template-member-popover { display: grid; }
.shande-templates .is-member-price-open { position: relative; z-index: 30; overflow: visible; }
.shande-templates .template-member-popover.is-below { bottom: auto; top: calc(100% + 9px); }
.shande-templates .template-member-popover.is-below::after {
  bottom: auto;
  top: -6px;
  transform: rotate(225deg);
}
.shande-templates .template-pricing--member {
  align-items: flex-start;
  justify-content: center;
  flex-direction: column;
  gap: 3px;
}
.shande-templates .template-pricing--member del {
  color: #8b97aa;
  font-size: 13px;
  line-height: 1.45;
}
.shande-templates .template-pricing__member-line { display: flex; align-items: center; gap: 8px; width: 100%; }
.shande-templates .template-pricing__member-line strong { color: #096ddd; font-size: 15px; font-weight: 600; }
.shande-templates .template-pricing__member-line em {
  margin-left: auto;
  padding: 3px 8px;
  border-radius: 999px;
  background: #096ddd;
  color: #fff;
  font-size: 10px;
  font-style: normal;
  white-space: nowrap;
}

/* 加载更多 */
.shande-templates .templates-more {
  display: flex;
  justify-content: center;
  margin-top: 36px;
}
.shande-templates .btn-load-more {
  position: relative;
  appearance: none;
  border: 0;
  background: #fff;
  color: #111827;
  font-size: 14px;
  font-weight: 500;
  padding: 12px 40px;
  border-radius: 999px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  box-shadow: 0 0 0 1px rgba(17, 24, 39, 0.08), 0 1px 2px rgba(15, 23, 42, 0.04);
  transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1),
              box-shadow 0.25s cubic-bezier(0.22, 1, 0.36, 1),
              color 0.2s ease;
  overflow: hidden;
  isolation: isolate;
}
/* 渐变底层（hover 时淡入） */
.shande-templates .btn-load-more::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, #096ddd 0%, #096ddd 50%, #49c9e9 100%);
  opacity: 0;
  transition: opacity 0.25s ease;
  z-index: -1;
}
.shande-templates .btn-load-more:hover {
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 0 0 1px rgba(9, 109, 221, 0.4),
              0 10px 24px -8px rgba(9, 109, 221, 0.45),
              0 4px 8px -2px rgba(9, 109, 221, 0.25);
}
.shande-templates .btn-load-more:hover::before { opacity: 1; }
.shande-templates .btn-load-more:active { transform: translateY(0); }
/* 箭头微动效 */
.shande-templates .btn-load-more__icon {
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}
.shande-templates .btn-load-more:hover .btn-load-more__icon {
  transform: translateY(2px);
}

/* 平板端（768–1024px）：每行数量用 --cols-t。
   起点必须是 768 而不是 769：Elementor 的平板预览视口正好 768px，iPad 竖屏也是
   768px。若把 768 留给手机段，平板预览下取到的是手机列数，平板设置看起来「不生效」。
   手机段相应收敛到 ≤767px。 */
@media (min-width: 768px) and (max-width: 1024px) {
  .shande-templates .shande-tpl-pane { --cols: var(--cols-t, 3); }
}

@media (max-width: 767px) {
  .shande-templates .shande-tpl-pane { --cols: var(--cols-m, 2); }
  .shande-templates .template-card { will-change: auto; }
  .shande-templates .template-card:hover { transform: none; }
  .shande-templates .template-card--vertical { padding: var(--tpl-card-padding, var(--tpl-ppt-card-padding, 6px 6px 6px)); border-radius: 14px; }
  .shande-templates .template-name { margin-top: 3px; }
  .shande-templates .template-summary { margin-bottom: 1px; }
  .shande-templates .templates-title { font-size: 20px; }
  .shande-templates .ppt-showcase__tabs { flex-wrap: nowrap; overflow-x: auto; }
  .shande-templates .ppt-showcase__tabs::-webkit-scrollbar { display: none; }
  .shande-templates .ppt-showcase__tab { flex-shrink: 0; white-space: nowrap; }
  .shande-templates .template-pricing { min-height: 48px; align-items: flex-start; flex-direction: column; gap: 4px; }
  .shande-templates .template-pricing--preview { justify-content: center; }
  .shande-templates .template-member-preview { min-height: 26px; padding: 0 8px; }
  .shande-templates .template-pricing__member-line { align-items: flex-start; flex-direction: column; gap: 4px; }
  .shande-templates .template-pricing__member-line em { margin-left: 0; }

  /* 手机两列：列表与店铺共用换行规则；店铺封面尺寸仍由原配置控制。 */
  .shande-templates .template-card--vertical .template-summary {
    flex-wrap: wrap;
    gap: 2px 6px;
    white-space: normal;
    overflow: visible;
  }
  .shande-templates .template-card--vertical .template-summary > span {
    flex: 0 1 auto;
    max-width: 100%;
    white-space: normal;
    overflow: visible;
    overflow-wrap: anywhere;
    text-overflow: clip;
  }
  .shande-templates .template-card--vertical .template-summary > span + span::before { content: none; }
  .shande-templates .template-card--vertical .template-pricing {
    min-width: 0;
    max-width: 100%;
  }
  .shande-templates .template-card--vertical .template-member-preview {
    max-width: 100%;
    box-sizing: border-box;
    flex-wrap: wrap;
    row-gap: 2px;
    padding: 4px 8px;
    white-space: normal;
  }
  .shande-templates .template-card--vertical .template-pricing__label {
    min-width: 0;
    max-width: 100%;
    white-space: normal;
    overflow-wrap: anywhere;
  }
  .shande-templates .template-card--vertical .template-pricing__amount {
    flex: 0 0 auto;
    white-space: nowrap;
  }
  .shande-templates .template-card--vertical .template-pricing__hint {
    flex: 0 1 auto;
    max-width: 100%;
    white-space: normal;
    overflow-wrap: anywhere;
  }
  .shande-templates .template-card--vertical .template-pricing__member-line > strong,
  .shande-templates .template-card--vertical .template-pricing__member-line > em {
    max-width: 100%;
    box-sizing: border-box;
    white-space: normal;
    overflow-wrap: anywhere;
  }
}

/* ============================================================
   不同卡片样式（复刻源码各分类页）
   通过标签的「卡片样式」选项切换：image / icon / video / audio
   ============================================================ */

/* ---------- 图标卡：灰底方格 12px 圆角 + 1px 边框（1:1 复刻 js/templates.js tpl-icon-preview） ---------- */
.shande-templates .templates-grid--icon {
  display: grid;
  grid-template-columns: repeat(var(--cols, 16), 1fr);
  gap: 12px;
}
/* 图标卡桌面/手机每行数量：复用面板的 --cols-pc / --cols-m（源码为 16 列） */
.shande-templates .shande-tpl-pane[data-card-style="icon"] { --cols: var(--cols-pc, 16); }

.shande-templates .templates-grid--icon .template-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  border-radius: 12px;
  overflow: hidden;
  /* 图标卡不使用图片卡的上浮位移动效，改由 preview 缩放 */
  transition: none;
}
.shande-templates .templates-grid--icon .template-card:hover {
  transform: none;
}
.shande-templates .tpl-icon-preview {
  width: 100%;
  aspect-ratio: 1 / 1;
  background: #f5f7fa;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.2s, transform 0.3s;
}
.shande-templates .template-card:hover .tpl-icon-preview {
  border-color: var(--primary, #096ddd);
  transform: scale(1.05);
}
.shande-templates .tpl-icon-preview svg {
  stroke: #4b5563;
  transition: stroke 0.2s;
}
.shande-templates .template-card:hover .tpl-icon-preview svg {
  stroke: var(--primary, #096ddd);
}
/* 上传的 SVG/图片图标：等比缩放在方格内居中 */
.shande-templates .sd-icon-img {
  width: 56%;
  height: 56%;
  object-fit: contain;
  display: block;
}
.shande-templates .tpl-icon-name {
  font-size: 11px;
  color: #4b5563;
  margin-top: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
  transition: color 0.2s;
}
.shande-templates .template-card:hover .tpl-icon-name {
  color: var(--primary, #096ddd);
}

/* ---------- 视频卡：16:10 封面 + 角标 + 悬停播放（1:1 复刻 video.css .video-template-card） ---------- */
.shande-templates .templates-grid--video {
  display: grid;
  grid-template-columns: repeat(var(--cols, 4), minmax(0, 1fr));
  gap: 22px;
}
.shande-templates .shande-tpl-pane[data-card-style="video"] { --cols: var(--cols-pc, 4); }

.shande-templates .video-template-card {
  display: flex;
  flex-direction: column;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}
.shande-templates .video-template-card:hover {
  transform: translateY(-6px);
}
.shande-templates .video-template-card__preview {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  border-radius: 10px;
  overflow: hidden;
  background: #0f172a;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.12);
}
.shande-templates .video-template-card__media {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background: #0f172a center/cover no-repeat;
  display: block;
  transition: transform 0.6s ease;
}
.shande-templates .video-template-card:hover .video-template-card__media {
  transform: scale(1.05);
}
.shande-templates .video-template-card__duration,
.shande-templates .video-template-card__quality {
  position: absolute;
  z-index: 3;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.5px;
  padding: 3px 8px;
  border-radius: 4px;
  color: #fff;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.shande-templates .video-template-card__duration {
  bottom: 10px;
  right: 10px;
  background: rgba(0, 0, 0, 0.65);
}
.shande-templates .video-template-card__quality {
  top: 10px;
  left: 10px;
  background: rgba(34, 211, 238, 0.85);
  color: #052e36;
}
.shande-templates .video-template-card__overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  background: linear-gradient(180deg, transparent 30%, rgba(0, 0, 0, 0.55) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.25s ease;
}
.shande-templates .video-template-card:hover .video-template-card__overlay {
  opacity: 1;
}
.shande-templates .video-template-card__play {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  color: #0f172a;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
  transform: scale(0.8);
  transition: transform 0.25s ease;
}
.shande-templates .video-template-card:hover .video-template-card__play {
  transform: scale(1);
}
.shande-templates .video-template-card__info {
  padding: 12px 4px 0;
}
.shande-templates .video-template-card__title {
  font-size: 14px;
  font-weight: 600;
  color: #1d2129;
  margin: 0 0 4px;
  line-height: 1.4;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.shande-templates .video-template-card__meta {
  font-size: 12px;
  color: #94a3b8;
}

/* 平板端：旧图标/视频列数收敛。
   这些卡片样式用的是带属性选择器的规则（优先级 0,3,0），比上面按面板设的
   通用规则（0,2,0）高，所以平板段必须在这里同样按样式各写一条，否则
   旧图标/视频面板在平板下会继续沿用电脑端列数。 */
@media (min-width: 768px) and (max-width: 1024px) {
  .shande-templates .shande-tpl-pane[data-card-style="icon"] { --cols: var(--cols-t, 10); }
  .shande-templates .shande-tpl-pane[data-card-style="video"] { --cols: var(--cols-t, 3); }
}

/* 手机端：旧图标/视频列数收敛 */
@media (max-width: 767px) {
  .shande-templates .shande-tpl-pane[data-card-style="icon"] { --cols: var(--cols-m, 6); }
  .shande-templates .shande-tpl-pane[data-card-style="video"] { --cols: var(--cols-m, 2); }
}

/* Card price alignment — 2026-10-12 */
/* Native cover cards: a second row is reserved only for actual regular prices.
   The font tryout list keeps its price below the product attributes. */
.shande-templates:not([data-zg-current-view="list"]) :is(.template-card--vertical, .music-track-info, .video-template-card__info) > .template-pricing {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, auto);
  grid-template-rows: minmax(29px, auto);
  gap: 6px 8px;
  align-items: center;
  align-content: start;
  justify-content: normal;
  min-width: 0;
  min-height: 29px;
  max-width: 100%;
}
.shande-templates:not([data-zg-current-view="list"]):has(.template-pricing--member) :is(.template-card--vertical, .music-track-info, .video-template-card__info) > .template-pricing {
  grid-template-rows: minmax(29px, auto) minmax(14px, auto);
  min-height: 49px;
}
/* Store cards have individual component wrappers; align the whole product group. */
.shop-grid:has(.template-pricing--member) .shande-templates :is(.template-card--vertical, .music-track-info, .video-template-card__info) > .template-pricing {
  grid-template-rows: minmax(52px, auto) minmax(14px, auto);
  min-height: 72px;
  align-items: start;
}
.shande-templates:not([data-zg-current-view="list"]) :is(.template-card--vertical, .music-track-info, .video-template-card__info) > .template-pricing > strong {
  grid-column: 1;
  grid-row: 1;
  min-width: 0;
}
.shande-templates:not([data-zg-current-view="list"]) :is(.template-card--vertical, .music-track-info, .video-template-card__info) > .template-pricing > .template-member-preview {
  grid-column: 2;
  grid-row: 1;
  justify-self: end;
  min-width: 0;
  min-height: 29px;
  max-width: 100%;
  box-sizing: border-box;
  flex-wrap: wrap;
  row-gap: 2px;
  white-space: normal;
}
.shande-templates:not([data-zg-current-view="list"]) :is(.template-card--vertical, .music-track-info, .video-template-card__info) > .template-pricing > .template-member-preview > .template-pricing__label {
  min-width: 0;
  max-width: 100%;
  overflow-wrap: anywhere;
  white-space: normal;
}
.shande-templates:not([data-zg-current-view="list"]) :is(.template-card--vertical, .music-track-info, .video-template-card__info) > .template-pricing > .template-member-preview > .template-pricing__amount {
  flex: 0 0 auto;
  white-space: nowrap;
}
.shande-templates:not([data-zg-current-view="list"]) :is(.template-card--vertical, .music-track-info, .video-template-card__info) > .template-pricing--member > del {
  grid-column: 1 / -1;
  grid-row: 2;
  align-self: start;
  min-width: 0;
  max-width: 100%;
  margin: 0;
  font-size: 10px;
  line-height: 1.4;
  overflow-wrap: anywhere;
  white-space: normal;
}
.shande-templates:not([data-zg-current-view="list"]) :is(.template-card--vertical, .music-track-info, .video-template-card__info) > .template-pricing--member > .template-pricing__member-line {
  grid-column: 1 / -1;
  grid-row: 1;
  min-width: 0;
  max-width: 100%;
  flex-direction: row;
  align-items: center;
  flex-wrap: wrap;
}
.shande-templates:not([data-zg-current-view="list"]) :is(.template-card--vertical, .music-track-info, .video-template-card__info) > .template-pricing--member > .template-pricing__member-line > strong {
  font-size: 18px;
  line-height: 1.35;
}

/* A single visible row should stretch its card wrappers equally. Multiple
   masonry rows keep their existing flow and do not inherit full-column height. */
.shande-cat-products:not([data-zg-current-view="list"]) .products-grid:not(:has(> .products-col > :nth-child(2))) > .products-col > .templates-col:only-child {
  flex: 1 1 auto;
}


/* Shared cover rows — 2026-10-12.
   Keep the native column nodes and font-list behavior, but let ordinary cover
   cards share real grid rows. Wrapped attributes then grow the whole row and
   the existing auto top margin keeps every price against the same lower edge.
   Font cover grids use these same rows; dedicated lists retain their layout. */
.shande-cat-products.shande-templates.sd-cat-responsive-columns:not([data-zg-current-view="list"]) .products-grid {
  display: grid;
  grid-template-columns: repeat(var(--sd-card-cols, 2), minmax(0, 1fr));
  align-items: stretch;
}
.shande-cat-products.shande-templates.sd-cat-responsive-columns:not([data-zg-current-view="list"]) .products-grid > .products-col {
  display: contents;
}
.shande-cat-products.shande-templates.sd-cat-responsive-columns:not([data-zg-current-view="list"]) .products-grid > .products-col > * {
  order: var(--sd-card-order, 0);
  align-self: stretch;
  min-width: 0;
  width: 100%;
}

/* Shared gallery controls. Column counts remain in the existing Elementor settings. */
.shande-templates .templates-col.has-zipget-card-preview { position: relative; }
.shande-templates .has-zipget-card-preview > .template-card:hover { transform: none; }
.shande-templates .template-thumb--custom::before { content: none; }
.shande-templates .template-thumb > .zipget-card-preview__image {
  position: absolute;
  z-index: 1;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: contain;
  background: #f7f9fc;
  -webkit-user-drag: none;
  -webkit-touch-callout: none;
}
.zipget-card-preview[hidden] { display: none !important; }
.zipget-card-preview {
  position: absolute;
  z-index: 4;
  width: max-content;
  pointer-events: none;
  opacity: 0;
  transition: opacity .16s ease;
  font-family: inherit;
}
.shande-templates .has-zipget-card-preview:hover > .zipget-card-preview,
.shande-templates .has-zipget-card-preview:focus-within > .zipget-card-preview { opacity: 1; }
.zipget-card-preview__actions {
  display: flex;
  width: max-content;
  gap: 4px;
  padding: 0;
  border: 0;
  background: none;
}
.zipget-card-preview__actions button {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 32px;
  width: 32px;
  height: 32px;
  min-width: 32px;
  min-height: 32px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 8px;
  color: #475569;
  background: transparent;
  font: inherit;
  line-height: 1;
  cursor: pointer;
  pointer-events: none;
}
.shande-templates .has-zipget-card-preview:hover > .zipget-card-preview button,
.shande-templates .has-zipget-card-preview:focus-within > .zipget-card-preview button { pointer-events: auto; }
.zipget-card-preview__actions button::before {
  content: '';
  position: absolute;
  inset: 0;
  border: 1px solid rgba(226, 232, 240, .9);
  border-radius: 8px;
  background: rgba(255, 255, 255, .94);
  box-shadow: 0 2px 6px rgba(15, 23, 42, .1);
  pointer-events: none;
}
.zipget-card-preview__actions button svg { position: relative; display: block; flex: 0 0 auto; width: 18px; height: 18px; pointer-events: none; }
.zipget-card-preview__actions button[aria-pressed="true"],
.zipget-card-preview__actions button:hover { color: #075cb5; }
.zipget-card-preview__actions button[aria-pressed="true"]::before { background: #eaf4ff; }
.zipget-card-preview__actions button:hover::before { background: #f0f6fd; }
.zipget-card-preview__actions button:focus-visible,
.zipget-card-preview-dialog button:focus-visible,
.zipget-card-preview-dialog select:focus-visible { outline: 2px solid #096ddd; outline-offset: 2px; }
.zipget-card-preview__status {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
html.zipget-card-preview-open { overflow: hidden; }
.zipget-card-preview-dialog {
  box-sizing: border-box;
  width: min(1100px, calc(100vw - 32px));
  max-width: none;
  max-height: calc(100vh - 32px);
  max-height: calc(100dvh - 32px);
  margin: auto;
  padding: 0;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  background: #fff;
  color: #17243b;
  font-family: inherit;
  box-shadow: 0 20px 80px rgba(15, 23, 42, .24);
}
.zipget-card-preview-dialog[open] { display: flex; flex-direction: column; }
.zipget-card-preview-dialog::backdrop { background: rgba(15, 23, 42, .7); }
.zipget-card-preview-dialog__header {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 10px 12px 10px 20px;
  border-bottom: 1px solid #e2e8f0;
}
.zipget-card-preview-dialog__header strong {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}
.zipget-card-preview-dialog button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  padding: 0;
  margin: 0;
  border: 0;
  border-radius: 8px;
  color: #334155;
  background: #f1f5f9;
  font: inherit;
  cursor: pointer;
}
.zipget-card-preview-dialog button:hover { color: #096ddd; background: #eaf4ff; }
.zipget-card-preview-dialog__stage {
  position: relative;
  min-height: 0;
  height: min(72vh, 760px);
  height: min(72dvh, 760px);
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1 1 auto;
  padding: 12px;
  background: #f5f7fa;
  overflow: auto;
}
.zipget-card-preview-dialog__stage img {
  display: block;
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  -webkit-user-drag: none;
  -webkit-touch-callout: none;
}
.zipget-card-preview-dialog__stage [hidden] { display: none !important; }
.zipget-card-preview-dialog__message { padding: 24px; text-align: center; font-size: 14px; line-height: 1.6; }
.zipget-card-preview-dialog__footer {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
  gap: 10px;
  padding: 10px 16px;
  border-top: 1px solid #e2e8f0;
}
.zipget-card-preview-dialog__select {
  flex: 1 1 auto;
  width: 0;
  min-width: 0;
  height: 44px;
  margin: 0;
  padding: 8px 28px 8px 12px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  color: #334155;
  background-color: #fff;
  font: inherit;
  font-size: 13px;
  line-height: 1.4;
  text-overflow: ellipsis;
}
@media (max-width: 768px) {
  .zipget-card-preview { opacity: 1; }
  .zipget-card-preview__actions { gap: 0; }
  .zipget-card-preview__actions button { flex-basis: 44px; width: 44px; height: 44px; min-width: 44px; min-height: 44px; pointer-events: auto; }
  .zipget-card-preview__actions button::before { inset: 6px; }
  .zipget-card-preview-dialog { width: calc(100vw - 16px); max-height: calc(100vh - 16px); max-height: calc(100dvh - 16px); border-radius: 12px; }
  .zipget-card-preview-dialog__header { gap: 8px; padding: 8px 8px 8px 12px; }
  .zipget-card-preview-dialog__header strong { font-size: 13px; }
  .zipget-card-preview-dialog__stage { height: 68vh; height: 68dvh; padding: 6px; }
  .zipget-card-preview-dialog__footer { gap: 6px; padding: 8px; }
  .zipget-card-preview-dialog__select { padding-left: 8px; font-size: 12px; }
}

/* Shared visual-card gallery: the same arrows and thumbnail rail as product details. */
.zipget-card-preview-dialog--gallery { width: min(900px, calc(100vw - 32px)); }
.zipget-card-preview-dialog--gallery .zipget-card-preview-dialog__counter {
  flex: 0 0 auto;
  color: #64748b;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.zipget-card-preview-dialog--gallery .zipget-card-preview-dialog__stage {
  height: min(58vh, 520px);
  height: min(58dvh, 520px);
  margin: 12px 12px 0;
  padding: 8px;
  border-radius: 8px;
  background: #e5e7eb;
  overflow: hidden;
  touch-action: pan-y pinch-zoom;
}
.zipget-card-preview-dialog--gallery .zipget-card-preview-dialog__stage-nav {
  position: absolute;
  z-index: 2;
  top: 50%;
  transform: translateY(-50%);
  border-radius: 50%;
  color: #fff;
  background: rgba(15, 23, 42, .48);
  box-shadow: 0 1px 4px rgba(15, 23, 42, .12);
}
.zipget-card-preview-dialog--gallery .zipget-card-preview-dialog__stage-nav:hover {
  color: #fff;
  background: rgba(15, 23, 42, .68);
}
.zipget-card-preview-dialog--gallery .zipget-card-preview-dialog__stage-nav--previous { left: 12px; }
.zipget-card-preview-dialog--gallery .zipget-card-preview-dialog__stage-nav--next { right: 12px; }
.zipget-card-preview-dialog--gallery .zipget-card-preview-dialog__footer {
  gap: 8px;
  padding: 12px;
  border-top: 0;
}
.zipget-card-preview-dialog--gallery .zipget-card-preview-dialog__thumbs {
  display: flex;
  flex: 1 1 auto;
  align-items: center;
  gap: 8px;
  min-width: 0;
  padding: 3px;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  overscroll-behavior-x: contain;
  scroll-snap-type: x proximity;
}
.zipget-card-preview-dialog--gallery .zipget-card-preview-dialog__thumbs::-webkit-scrollbar { display: none; }
.zipget-card-preview-dialog--gallery .zipget-card-preview-dialog__thumb {
  box-sizing: border-box;
  flex: 0 0 100px;
  width: 100px;
  height: 70px;
  overflow: hidden;
  border: 2px solid transparent;
  border-radius: 6px;
  background: #f1f5f9;
  opacity: .65;
  scroll-snap-align: center;
}
.zipget-card-preview-dialog--gallery .zipget-card-preview-dialog__thumb:hover { opacity: 1; }
.zipget-card-preview-dialog--gallery .zipget-card-preview-dialog__thumb.is-active {
  border-color: #096ddd;
  background: #eff6ff;
  opacity: 1;
}
.zipget-card-preview-dialog--gallery .zipget-card-preview-dialog__thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  -webkit-user-drag: none;
  -webkit-touch-callout: none;
}
.zipget-card-preview-dialog--gallery .zipget-card-preview-dialog__thumb-scroll {
  border: 1px solid #e5e7eb;
  border-radius: 50%;
  background: #fff;
  color: #4b5563;
}
.zipget-card-preview-dialog--gallery .zipget-card-preview-dialog__thumb-scroll:hover:not(:disabled) {
  border-color: #096ddd;
  color: #096ddd;
  background: #eff6ff;
}
.zipget-card-preview-dialog--gallery .zipget-card-preview-dialog__thumb-scroll:disabled { opacity: .3; cursor: default; }
.zipget-card-preview-dialog--gallery .zipget-card-preview-dialog__stage-nav svg,
.zipget-card-preview-dialog--gallery .zipget-card-preview-dialog__thumb-scroll svg { width: 20px; height: 20px; pointer-events: none; }
@media (max-width: 768px) {
  .zipget-card-preview-dialog--gallery { width: calc(100vw - 24px); max-height: calc(100vh - 24px); max-height: calc(100dvh - 24px); }
  .zipget-card-preview-dialog--gallery .zipget-card-preview-dialog__stage { height: min(60vh, 520px); height: min(60dvh, 520px); margin: 8px 8px 0; padding: 4px; }
  .zipget-card-preview-dialog--gallery .zipget-card-preview-dialog__stage-nav--previous { left: 6px; }
  .zipget-card-preview-dialog--gallery .zipget-card-preview-dialog__stage-nav--next { right: 6px; }
  .zipget-card-preview-dialog--gallery .zipget-card-preview-dialog__footer { gap: 4px; padding: 8px; }
  .zipget-card-preview-dialog--gallery .zipget-card-preview-dialog__thumbs { gap: 6px; }
  .zipget-card-preview-dialog--gallery .zipget-card-preview-dialog__thumb { flex-basis: 84px; width: 84px; height: 62px; }
  .zipget-card-preview-dialog--gallery .zipget-card-preview-dialog__counter { font-size: 12px; }
}

/* Verified single-icon catalogue art. Shared cards supply the near-square frame. */
.zgoa-icon-card {
	position: absolute;
	inset: 0;
	box-sizing: border-box;
	width: 100%;
	height: 100%;
	padding: 31px 5% 4%;
	display: flex;
	flex-direction: column;
	gap: 3%;
	container-type: inline-size;
	font-family: inherit;
	color: #202124;
	background: #f8fafc;
	overflow: hidden;
	pointer-events: none;
}
.zgoa-icon-card *, .zgoa-icon-card *::before, .zgoa-icon-card *::after { box-sizing: border-box; }
.zgoa-icon-card__rows {
	flex: 1;
	min-height: 0;
	display: flex;
	flex-direction: column;
	gap: 5%;
}
.zgoa-icon-card__row { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 3%; }
.zgoa-icon-card__kind {
	flex: 0 0 auto;
	font-size: 11px;
	font-size: clamp(9px, 3cqw, 12px);
	font-weight: 500;
	line-height: 1.15;
	color: #64748b;
}
.zgoa-icon-card__variants { flex: 1; min-height: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: 6%; }
.zgoa-icon-card__variants--1 { grid-template-columns: minmax(0, 1fr); }
.zgoa-icon-card__variants--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.zgoa-icon-card__variant { min-width: 0; min-height: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3%; }
.zgoa-icon-card .zgoa-icon-card__svg { display: block; width: 100%; height: 100%; min-height: 0; flex: 1; max-width: 100%; max-height: 100%; overflow: visible; fill: currentColor; }
.zgoa-icon-card__row--filled .zgoa-icon-card__svg { color: #E75B71; }
.zgoa-icon-card__style {
	flex: 0 0 auto;
	font-size: 11px;
	font-size: clamp(9px, 3cqw, 12px);
	font-weight: 500;
	line-height: 1.15;
	color: #475569;
	white-space: nowrap;
}
.zgoa-icon-card__palette {
	flex: 0 0 auto;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 5%;
	min-width: 0;
	font-size: 11px;
	font-size: clamp(9px, 2.8cqw, 12px);
	line-height: 1.2;
	font-weight: 500;
	color: #64748b;
	white-space: nowrap;
}
.zgoa-icon-card__swatches { display: flex; align-items: center; gap: 4px; }
.zgoa-icon-card__swatches i { display: block; width: 8px; height: 8px; width: clamp(5px, 2.4cqw, 10px); height: clamp(5px, 2.4cqw, 10px); border: 1px solid #cbd5e1; border-radius: 50%; background: var(--zgoa-card-color); }
@container (max-width: 220px) {
	.zgoa-icon-card__swatches { gap: 3px; }
}

/* Actual font names inside native mixed-grid covers; independent tryout is unchanged. */
.shande-templates .zgft-card-cover {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: flex;
  align-items: stretch;
  justify-content: center;
  box-sizing: border-box;
  padding: 8%;
  container-type: inline-size;
  overflow: hidden;
  background: #f4f7fe;
  color: #193753;
  font-weight: 400;
  font-style: normal;
  font-synthesis: none;
  pointer-events: none;
}
.shande-templates .zgft-card-cover[hidden] { display: none !important; }
.shande-templates .zgft-card-cover__panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(5px, 6cqw, 16px);
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  padding: 10% 6%;
  border-radius: clamp(8px, 6cqw, 18px);
  background: #fff;
}
.shande-templates .zgft-card-cover__main {
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 100%;
  font-family: inherit;
  /* cqw already measures the cover's content width after its outer padding. */
  font-size: clamp(16px, min(28cqw, calc(80cqw / var(--zgft-name-chars, 3))), 76px);
  font-weight: inherit;
  line-height: 1.12;
  letter-spacing: 0;
  white-space: nowrap;
}
.shande-templates .zgft-card-cover__minor {
  max-width: 100%;
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: clamp(10px, 8cqw, 17px);
  font-weight: 400;
  line-height: 1.3;
  letter-spacing: 0;
  text-align: center;
  color: #2563eb;
  overflow-wrap: anywhere;
}
.shande-templates .zgft-card-cover__main > span { font-family: inherit; font-weight: inherit; }

/* Touch laptops and tablets also keep preview controls discoverable. */
@media (hover: none), (pointer: coarse) {
  .zipget-card-preview { opacity: 1; }
  .zipget-card-preview__actions { gap: 0; }
  .zipget-card-preview__actions button { flex-basis: 44px; width: 44px; height: 44px; min-width: 44px; min-height: 44px; pointer-events: auto; }
  .zipget-card-preview__actions button::before { inset: 6px; }
}
@media (prefers-reduced-motion: reduce) {
  .zipget-card-preview { transition: none; }
}

/* Music cover: extend the existing protected image, retain the complete foreground.
   No stacking context on .template-thumb: playback (4) must stay above card link (2). */
.shande-templates .template-card--audio-preview .template-thumb {
    --zgoa-cover-player-reserve: 61px;
    background-size: 0 0;
    /* Keep focus on playback controls from scrolling the clipped cover. */
    overflow: clip;
}
.shande-templates .template-card--audio-preview .template-thumb::before,
.shande-templates .template-card--audio-preview .template-thumb::after {
    content: '';
    position: absolute;
    background-image: inherit;
    background-repeat: no-repeat;
    background-position: center;
    pointer-events: none;
    transition: none;
}
.shande-templates .template-card--audio-preview .template-thumb::before {
    inset: -18px;
    z-index: 0;
    background-size: cover;
    filter: blur(18px) saturate(.85);
    opacity: .88;
    transform: none;
}
.shande-templates .template-card--audio-preview .template-thumb::after {
    inset: 0 0 var(--zgoa-cover-player-reserve);
    z-index: 1;
    background-size: contain;
    filter: none;
    opacity: 1;
}
@media (max-width: 767px) {
    .shande-templates .template-card--audio-preview .template-thumb {
        --zgoa-cover-player-reserve: 55px;
    }
}
/* Identical upstream shapes share one preview; no empty third column. */
.zgoa-icon-card__variants--1 { grid-template-columns: minmax(0, 1fr); }
.zgoa-icon-card__variants--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.zgoa-icon-card__style { max-width: 100%; white-space: normal; text-align: center; }

/* Shared card geometry. Preview type may choose a column count; content never chooses width. */
.shande-templates .sd-product-card {
  box-sizing: border-box;
  position: relative;
  min-width: 0;
  width: 100%;
  max-width: 100%;
  border: 1px solid rgba(226,232,240,.72);
  border-radius: 18px;
  background: #fff;
  overflow: visible;
  font-family: inherit;
}
.shande-templates .template-name > a { color: inherit; font: inherit; text-decoration: none; }
.shande-templates .template-name > a:hover { color: #1769d2; }
.shande-templates .template-name > a:focus-visible { outline: 2px solid #1769d2; outline-offset: 2px; }
.shande-templates .sd-product-card .template-member-preview { max-width: 100%; box-sizing: border-box; white-space: normal; }
.shande-templates .sd-product-card .template-pricing { min-width: 0; max-width: 100%; }
.shande-templates .video-template-card.sd-product-card { padding: 8px 8px 12px; }
.shande-templates .video-template-card.sd-product-card .video-template-card__info { display: flex; flex-direction: column; flex: 1; gap: 10px; padding: 0; }
.shande-templates .video-template-card.sd-product-card .video-template-card__preview { box-shadow: none; }
.shande-cat-products.shande-templates .products-grid.cat-grid > * { min-width: 0; width: 100%; box-sizing: border-box; }
.shande-cat-products.shande-templates .products-grid.cat-grid--video { grid-template-columns: repeat(var(--cat-cols, 4), minmax(0, 1fr)); }
@media (max-width: 767px) {
  .shande-templates .sd-product-card { border-radius: 14px; }
}


/* Font grid facts occupy two predictable rows; list tryout retains complete values. */
.shande-templates .template-summary--font .template-summary__compact { display: none; }
.shande-templates:not([data-zg-current-view="list"]) .template-summary--font .template-summary__compact { display: inline; }
.shande-templates:not([data-zg-current-view="list"]) .template-summary--font .template-summary__full { display: none; }
.shande-templates:not([data-zg-current-view="list"]) .template-card.template-card--font > .template-name {
  height: 3.1em;
  min-height: 3.1em;
  max-height: 3.1em;
  flex: 0 0 3.1em;
}
.shande-templates:not([data-zg-current-view="list"]) .template-card.template-card--font > .template-summary--font {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  grid-template-rows: 1.55em 1.55em;
  gap: 2px 8px;
  align-items: start;
  height: calc(3.1em + 2px);
  min-height: calc(3.1em + 2px);
  max-height: calc(3.1em + 2px);
  flex: 0 0 calc(3.1em + 2px);
  overflow: hidden;
}
.shande-templates:not([data-zg-current-view="list"]) .template-card.template-card--font > .template-summary--font > .template-summary__field {
  min-width: 0;
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  overflow-wrap: normal;
  text-overflow: ellipsis;
}
.shande-templates:not([data-zg-current-view="list"]) .template-summary--font > .template-summary__field--format { grid-column: 1; grid-row: 1; }
.shande-templates:not([data-zg-current-view="list"]) .template-summary--font > .template-summary__field--language { grid-column: 2; grid-row: 1; }
.shande-templates:not([data-zg-current-view="list"]) .template-summary--font > .template-summary__field--weight { grid-column: 1 / -1; grid-row: 2; }
