/* templet3 内页 — 与 site.css 配套，全部 t3- 前缀 */
.t3-crumb {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  margin: 14px 0;
  font-size: 13px;
  color: var(--t3-muted);
}
.t3-crumb a:hover { color: var(--t3-brand); }
.t3-crumb i { font-style: normal; opacity: .45; }
.t3-crumb-here {
  color: var(--t3-ink);
  max-width: 42%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.t3-page-nav {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 18px;
}
.t3-page-link {
  min-width: 34px;
  height: 34px;
  padding: 0 10px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  border: 1px solid var(--t3-line);
  background: var(--t3-card);
  font-size: 13px;
}
.t3-page-link.is-on,
.t3-page-link:hover {
  background: var(--t3-brand);
  color: #fff;
  border-color: var(--t3-brand);
}

.t3-notice {
  padding: 10px 12px;
  border-radius: 8px;
  margin-bottom: 12px;
  font-size: 14px;
}
.t3-notice-error { background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca; }
.t3-notice-ok { background: #ecfdf5; color: #047857; border: 1px solid #a7f3d0; }

.t3-field { margin-bottom: 14px; }
.t3-field label {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
  font-weight: 600;
}
.t3-field input,
.t3-field select,
.t3-field textarea {
  width: 100%;
  border: 1px solid var(--t3-line);
  border-radius: 8px;
  padding: 10px 12px;
  background: var(--t3-card);
}
.t3-field input:focus,
.t3-field select:focus,
.t3-field textarea:focus {
  outline: 2px solid rgba(31, 157, 85, .28);
  border-color: var(--t3-brand);
}

/* 商品列表 */
.t3-mall { padding-bottom: 8px; }
.t3-mall-panel {
  background: var(--t3-card);
  border: 1px solid var(--t3-line);
  border-radius: var(--t3-radius);
  padding: 14px 16px;
  margin-bottom: 14px;
}
.t3-mall-row {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin-bottom: 10px;
}
.t3-mall-row:last-child { margin-bottom: 0; }
.t3-mall-label {
  flex: 0 0 48px;
  font-size: 13px;
  color: var(--t3-muted);
  padding-top: 6px;
}
.t3-mall-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.t3-mall-chip {
  padding: 5px 12px;
  border-radius: 999px;
  border: 1px solid var(--t3-line);
  background: var(--t3-card);
  font-size: 13px;
}
.t3-mall-chip.is-on,
.t3-mall-chip:hover {
  border-color: var(--t3-brand);
  color: var(--t3-brand);
  background: var(--t3-brand-soft);
}
.t3-mall-meta {
  margin: 10px 0 0;
  font-size: 13px;
  color: var(--t3-muted);
}
.t3-mall-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.t3-mall-card {
  display: block;
  background: var(--t3-card);
  border: 1px solid var(--t3-line);
  border-radius: 8px;
  overflow: hidden;
  transition: .15s ease;
  color: inherit;
}
.t3-mall-card:hover {
  border-color: #7ae898;
  box-shadow: var(--t3-shadow);
  transform: translateY(-2px);
}
.t3-mall-cover {
  display: block;
  aspect-ratio: 1;
  background: var(--t3-surface);
  overflow: hidden;
}
.t3-mall-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.t3-mall-cover em {
  display: grid;
  place-items: center;
  height: 100%;
  font-style: normal;
  color: var(--t3-muted);
  font-size: 13px;
}
.t3-mall-body { display: block; padding: 10px 12px 12px; }
.t3-mall-name {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.8em;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
}
.t3-mall-foot {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  margin-top: 8px;
}
.t3-mall-price {
  color: var(--t3-danger);
  font-weight: 800;
  font-size: 16px;
  font-style: normal;
}
.t3-mall-sales {
  font-style: normal;
  font-size: 12px;
  color: var(--t3-muted);
}

/* 商品详情 */
.t3-pd {
  display: grid;
  grid-template-columns: 420px 1fr;
  gap: 20px;
  background: var(--t3-card);
  border: 1px solid var(--t3-line);
  border-radius: var(--t3-radius);
  padding: 18px;
  margin-bottom: 16px;
}
.t3-pd-stage {
  aspect-ratio: 1;
  background: var(--t3-surface);
  border-radius: 8px;
  overflow: hidden;
}
.t3-pd-stage img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.t3-pd-thumbs {
  display: flex;
  gap: 8px;
  margin-top: 10px;
  flex-wrap: wrap;
}
.t3-pd-thumbs button {
  width: 64px;
  height: 64px;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 6px;
  overflow: hidden;
  cursor: pointer;
  background: var(--t3-surface);
}
.t3-pd-thumbs button.is-on { border-color: var(--t3-brand); }
.t3-pd-thumbs img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.t3-pd-title {
  margin: 0 0 10px;
  font-size: 22px;
  line-height: 1.35;
}
.t3-pd-price-box {
  background: var(--t3-brand-soft);
  border-radius: 8px;
  padding: 14px;
  margin-bottom: 14px;
}
.t3-pd-price {
  color: var(--t3-danger);
  font-size: 28px;
  font-weight: 800;
}
.t3-pd-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  font-size: 13px;
  color: var(--t3-muted);
  margin-bottom: 16px;
}
.t3-qty {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--t3-line);
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 16px;
}
.t3-qty button {
  width: 36px;
  height: 36px;
  border: 0;
  background: var(--t3-surface);
  cursor: pointer;
}
.t3-qty input {
  width: 56px;
  height: 36px;
  border: 0;
  border-left: 1px solid var(--t3-line);
  border-right: 1px solid var(--t3-line);
  text-align: center;
}
.t3-pd-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.t3-pd-panel {
  background: var(--t3-card);
  border: 1px solid var(--t3-line);
  border-radius: var(--t3-radius);
  padding: 16px;
  margin-bottom: 16px;
}
.t3-pd-panel h2 {
  margin: 0 0 12px;
  font-size: 17px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--t3-line);
}
.t3-rich { line-height: 1.7; word-break: break-word; }
.t3-rich img { max-width: 100%; height: auto; }

/* 信息列表 */
.t3-posts-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 14px;
  align-items: start;
}
.t3-side-panel {
  background: var(--t3-card);
  border: 1px solid var(--t3-line);
  border-radius: var(--t3-radius);
  padding: 12px;
}
.t3-side-panel h2 {
  margin: 0 0 10px;
  font-size: 15px;
}
.t3-side-link {
  display: block;
  padding: 8px 10px;
  border-radius: 6px;
  font-size: 13px;
}
.t3-side-link.is-on,
.t3-side-link:hover {
  background: var(--t3-brand-soft);
  color: var(--t3-brand);
}
.t3-media-list {
  margin: 0;
  padding: 0;
  list-style: none;
  background: var(--t3-card);
  border: 1px solid var(--t3-line);
  border-radius: var(--t3-radius);
}
.t3-media-item {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 14px;
  padding: 14px;
  border-bottom: 1px solid var(--t3-line);
}
.t3-media-item:last-child { border-bottom: 0; }
.t3-media-thumb {
  aspect-ratio: 4/3;
  border-radius: 8px;
  overflow: hidden;
  background: var(--t3-surface);
}
.t3-media-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.t3-media-body h3 {
  margin: 0 0 6px;
  font-size: 16px;
}
.t3-media-body h3 a:hover { color: var(--t3-brand); }
.t3-media-body p {
  margin: 0 0 8px;
  font-size: 13px;
  color: var(--t3-muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.t3-media-meta {
  font-size: 12px;
  color: var(--t3-muted);
}

/* 信息详情 */
.t3-article {
  background: var(--t3-card);
  border: 1px solid var(--t3-line);
  border-radius: var(--t3-radius);
  padding: 20px;
}
.t3-article h1 {
  margin: 0 0 10px;
  font-size: 24px;
}
.t3-article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 13px;
  color: var(--t3-muted);
  margin-bottom: 16px;
}
.t3-article-gallery {
  position: relative;
  margin-bottom: 16px;
  border-radius: 8px;
  overflow: hidden;
  background: #111827;
  min-height: 280px;
}
.t3-article-slide {
  display: none;
}
.t3-article-slide.is-on { display: block; }
.t3-article-slide img {
  width: 100%;
  max-height: 420px;
  object-fit: contain;
  margin: 0 auto;
}
.t3-article-dots {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-top: 10px;
}
.t3-article-dots button {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: 0;
  background: #d1d5db;
  cursor: pointer;
  padding: 0;
}
.t3-article-dots button.is-on { background: var(--t3-brand); width: 16px; border-radius: 999px; }
.t3-related {
  margin-top: 16px;
  background: var(--t3-card);
  border: 1px solid var(--t3-line);
  border-radius: var(--t3-radius);
  padding: 16px;
}
.t3-related h2 { margin: 0; font-size: 16px; }
.t3-related-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}
.t3-related-head a {
  font-size: 13px;
  color: var(--t3-brand);
  font-weight: 600;
}
.t3-related-head a:hover { text-decoration: underline; }
.t3-related-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
.t3-mall-grid.t3-related-goods {
  margin: 0;
  grid-template-columns: repeat(6, minmax(0, 1fr));
}
.t3-mall-grid.t3-related-goods > li:nth-child(n+7) {
  display: none;
}
.t3-related-card {
  display: block;
  border: 1px solid var(--t3-line);
  border-radius: 8px;
  overflow: hidden;
  color: inherit;
}
.t3-related-card:hover { border-color: #7ae898; }
.t3-related-card img {
  width: 100%;
  aspect-ratio: 16/10;
  object-fit: cover;
  background: var(--t3-surface);
}
.t3-related-card strong {
  display: block;
  padding: 8px 10px;
  font-size: 13px;
  line-height: 1.4;
}

/* 商家 */
.t3-merchant-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}
.t3-merchant-card {
  background: var(--t3-card);
  border: 1px solid var(--t3-line);
  border-radius: var(--t3-radius);
  overflow: hidden;
  color: inherit;
  transition: .15s ease;
}
.t3-merchant-card:hover {
  box-shadow: var(--t3-shadow);
  transform: translateY(-2px);
}
.t3-merchant-cover {
  height: 100px;
  background: linear-gradient(120deg, #14532d, #1f9d55);
}
.t3-merchant-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.t3-merchant-body {
  padding: 12px;
  display: flex;
  gap: 10px;
  align-items: center;
}
.t3-merchant-logo {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  background: var(--t3-surface);
  display: grid;
  place-items: center;
  overflow: hidden;
  font-weight: 800;
  flex-shrink: 0;
}
.t3-merchant-logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.t3-merchant-body strong { display: block; font-size: 14px; }
.t3-merchant-body span { font-size: 12px; color: var(--t3-muted); }

/* 店铺 */
.t3-shop-head {
  position: relative;
  border-radius: var(--t3-radius);
  overflow: hidden;
  background: #14532d;
  min-height: 180px;
  margin-bottom: 14px;
  color: #fff;
}
.t3-shop-banner {
  position: absolute;
  inset: 0;
}
.t3-shop-banner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: .55;
}
.t3-shop-head-inner {
  position: relative;
  z-index: 1;
  display: flex;
  gap: 14px;
  align-items: flex-end;
  padding: 24px 18px 18px;
  min-height: 180px;
}
.t3-shop-logo {
  width: 72px;
  height: 72px;
  border-radius: 12px;
  background: var(--t3-card);
  overflow: hidden;
  display: grid;
  place-items: center;
  color: var(--t3-brand);
  font-weight: 800;
  font-size: 22px;
  flex-shrink: 0;
  box-shadow: var(--t3-shadow);
}
.t3-shop-logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.t3-shop-head h1 { margin: 0 0 6px; font-size: 22px; }
.t3-shop-stats {
  display: flex;
  gap: 14px;
  font-size: 13px;
  opacity: .9;
}
.t3-shop-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 14px;
  align-items: start;
}
.t3-shop-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}
.t3-shop-tab {
  padding: 8px 16px;
  border-radius: 999px;
  background: var(--t3-card);
  border: 1px solid var(--t3-line);
  font-weight: 600;
  font-size: 13px;
}
.t3-shop-tab.is-on {
  background: var(--t3-brand);
  border-color: var(--t3-brand);
  color: #fff;
}

/* 登录注册 */
.t3-auth {
  max-width: 420px;
  margin: 28px auto;
  background: var(--t3-card);
  border: 1px solid var(--t3-line);
  border-radius: var(--t3-radius);
  padding: 24px;
  box-shadow: var(--t3-shadow);
}
.t3-auth h1 {
  margin: 0 0 16px;
  font-size: 22px;
  text-align: center;
}
.t3-auth-foot {
  margin: 14px 0 0;
  text-align: center;
  font-size: 13px;
  color: var(--t3-muted);
}
.t3-auth-foot a { color: var(--t3-brand); font-weight: 700; }

/* 购物车 / 结算 */
.t3-cart-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--t3-card);
  border: 1px solid var(--t3-line);
  border-radius: var(--t3-radius);
  overflow: hidden;
}
.t3-cart-table th,
.t3-cart-table td {
  padding: 12px;
  border-bottom: 1px solid var(--t3-line);
  text-align: left;
  font-size: 14px;
  vertical-align: middle;
}
.t3-cart-table th {
  background: var(--t3-surface);
  font-size: 13px;
  color: var(--t3-muted);
}
.t3-cart-prod {
  display: flex;
  gap: 10px;
  align-items: center;
}
.t3-cart-prod img {
  width: 64px;
  height: 64px;
  object-fit: cover;
  border-radius: 6px;
  background: var(--t3-surface);
}
.t3-cart-bar {
  margin-top: 14px;
  background: var(--t3-card);
  border: 1px solid var(--t3-line);
  border-radius: var(--t3-radius);
  padding: 14px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.t3-cart-total {
  color: var(--t3-danger);
  font-size: 22px;
  font-weight: 800;
}

/* 会员中心 */
.t3-dash {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 14px;
  margin-top: 14px;
  align-items: start;
}
.t3-dash-side {
  background: var(--t3-card);
  border: 1px solid var(--t3-line);
  border-radius: var(--t3-radius);
  padding: 12px;
}
.t3-dash-side a {
  display: block;
  padding: 9px 10px;
  border-radius: 6px;
  font-size: 13px;
  margin-bottom: 2px;
}
.t3-dash-side a.is-on,
.t3-dash-side a:hover {
  background: var(--t3-brand-soft);
  color: var(--t3-brand);
}
.t3-dash-main {
  background: var(--t3-card);
  border: 1px solid var(--t3-line);
  border-radius: var(--t3-radius);
  padding: 16px;
  min-height: 280px;
}
.t3-dash-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 16px;
}
.t3-dash-card {
  background: var(--t3-brand-soft);
  border-radius: 8px;
  padding: 14px;
}
.t3-dash-card strong {
  display: block;
  font-size: 22px;
  color: var(--t3-brand);
}
.t3-dash-card span {
  font-size: 12px;
  color: var(--t3-muted);
}

/* 首页区块补充 */
.t3-info-cols {
  display: grid;
  grid-template-columns: repeat(var(--t3-cols, 3), 1fr);
  gap: 16px;
}
.t3-info-col h3 {
  margin: 0 0 8px;
  font-size: 15px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--t3-brand);
  display: inline-block;
}
.t3-post-cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}
.t3-post-card {
  border: 1px solid var(--t3-line);
  border-radius: 8px;
  overflow: hidden;
  color: inherit;
}
.t3-post-card:hover { border-color: #7ae898; }
.t3-post-card-cover {
  aspect-ratio: 16/10;
  background: var(--t3-surface);
  overflow: hidden;
}
.t3-post-card-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.t3-post-card h3 {
  margin: 0;
  padding: 10px;
  font-size: 14px;
  line-height: 1.4;
}
.t3-housing-grid {
  display: grid;
  grid-template-columns: repeat(var(--t3-cols, 2), 1fr);
  gap: 12px;
}
.t3-housing-card {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 12px;
  border: 1px solid var(--t3-line);
  border-radius: 8px;
  overflow: hidden;
  color: inherit;
}
.t3-housing-card:hover { border-color: #7ae898; }
.t3-housing-thumb {
  background: var(--t3-surface);
  min-height: 100px;
}
.t3-housing-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.t3-housing-body { padding: 10px 10px 10px 0; }
.t3-housing-body h3 { margin: 0 0 6px; font-size: 15px; }
.t3-housing-body p {
  margin: 0 0 8px;
  font-size: 12px;
  color: var(--t3-muted);
}
.t3-housing-meta {
  font-size: 12px;
  color: var(--t3-muted);
  display: flex;
  gap: 10px;
}
.t3-shop-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}
.t3-shop-card {
  border: 1px solid var(--t3-line);
  border-radius: 8px;
  overflow: hidden;
  color: inherit;
}
.t3-shop-card:hover { box-shadow: var(--t3-shadow); }
.t3-shop-card .t3-shop-cover {
  height: 90px;
  background: #166534;
}
.t3-shop-card .t3-shop-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.t3-shop-card-meta {
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 10px;
}
.t3-shop-avatar {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background: var(--t3-surface);
  display: grid;
  place-items: center;
  overflow: hidden;
  font-weight: 800;
  flex-shrink: 0;
}
.t3-shop-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.t3-shop-card-meta strong { display: block; font-size: 13px; }
.t3-shop-card-meta span { font-size: 12px; color: var(--t3-muted); }
.t3-shop-logos {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 10px;
}
.t3-shop-logo-cell {
  aspect-ratio: 1;
  border: 1px solid var(--t3-line);
  border-radius: 8px;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: var(--t3-card);
  color: inherit;
  font-weight: 800;
}
.t3-shop-logo-cell img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.t3-ad {
  display: block;
  color: inherit;
}
.t3-ad-media img {
  width: 100%;
  border-radius: 8px;
}
.t3-ad-body { padding: 8px 0; }
.t3-ad-body h2 { margin: 0 0 6px; font-size: 18px; }
.t3-ad-body p { margin: 0; color: var(--t3-muted); }

@media (max-width: 980px) {
  .t3-mall-grid { grid-template-columns: repeat(3, 1fr); }
  .t3-mall-grid.t3-related-goods { grid-template-columns: repeat(3, 1fr); }
  .t3-pd { grid-template-columns: 1fr; }
  .t3-posts-layout,
  .t3-shop-layout,
  .t3-dash { grid-template-columns: 1fr; }
  .t3-merchant-grid,
  .t3-post-cards,
  .t3-shop-grid { grid-template-columns: repeat(2, 1fr); }
  .t3-related-list { grid-template-columns: 1fr; }
  .t3-info-cols { grid-template-columns: 1fr; }
  .t3-dash-cards { grid-template-columns: 1fr; }
  .t3-shop-logos { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 560px) {
  .t3-mall-grid { grid-template-columns: repeat(2, 1fr); }
  .t3-mall-grid.t3-related-goods { grid-template-columns: repeat(2, 1fr); }
  .t3-media-item { grid-template-columns: 88px 1fr; }
  .t3-housing-card { grid-template-columns: 1fr; }
}
