/* templet4 — 独立工业商城壳层（t4- 前缀），不依赖其他模板 */
:root {
  --t4-ink: #1a2332;
  --t4-muted: #64748b;
  --t4-line: #d8e0ea;
  --t4-paper: #eef2f6;
  --t4-card: #ffffff;
  --t4-surface: #e4ebf3;
  --t4-brand: #0c4a6e;
  --t4-brand-dark: #082f49;
  --t4-accent: #ea580c;
  --t4-accent-dark: #c2410c;
  --t4-soft: #e0f2fe;
  --t4-danger: #dc2626;
  --t4-radius: 8px;
  --t4-shadow: 0 6px 20px rgba(15, 40, 70, .08);
  --t4-max: 1200px;
  --t4-font: "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body.t4-body {
  margin: 0;
  font-family: var(--t4-font);
  color: var(--t4-ink);
  background: var(--t4-paper);
  line-height: 1.5;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; }
.t4-wrap {
  width: min(100% - 28px, var(--t4-max));
  margin-inline: auto;
}
.t4-main { min-height: 48vh; padding-bottom: 28px; }

.t4-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 0;
  border-radius: 6px;
  padding: 9px 16px;
  font-weight: 700;
  cursor: pointer;
  transition: .15s ease;
}
.t4-btn-brand { background: var(--t4-brand); color: #fff; }
.t4-btn-brand:hover { background: var(--t4-brand-dark); color: #fff; }
.t4-btn-accent { background: var(--t4-accent); color: #fff; }
.t4-btn-accent:hover { background: var(--t4-accent-dark); color: #fff; }
.t4-btn-outline {
  background: #fff;
  border: 1px solid var(--t4-brand);
  color: var(--t4-brand);
}
.t4-btn-outline:hover { background: var(--t4-soft); }
.t4-btn-dark { background: #0f172a; color: #fff; }
.t4-btn-full { width: 100%; }
.t4-btn-muted { background: #e2e8f0; color: #64748b; cursor: not-allowed; }

/* top */
.t4-top {
  background: #f8fafc;
  border-bottom: 1px solid var(--t4-line);
  font-size: 12px;
  color: var(--t4-muted);
}
.t4-top-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 34px;
  gap: 12px;
}
.t4-top-links { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.t4-top-links a:hover { color: var(--t4-brand); }

/* header */
.t4-header {
  background: #fff;
  border-bottom: 1px solid var(--t4-line);
}
.t4-header-row {
  display: grid;
  grid-template-columns: minmax(150px, 220px) 1fr auto;
  gap: 18px;
  align-items: center;
  padding: 14px 0;
}
.t4-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.t4-brand img {
  max-height: 46px;
  width: auto;
  object-fit: contain;
  flex-shrink: 0;
}
.t4-brand-name {
  font-size: 20px;
  font-weight: 800;
  color: var(--t4-brand);
  line-height: 1.2;
}
.t4-search-wrap { max-width: 580px; margin-inline: auto; width: 100%; }
.t4-search {
  display: flex;
  border: 2px solid var(--t4-brand);
  border-radius: 6px;
  overflow: hidden;
  background: #fff;
}
.t4-search input {
  flex: 1;
  border: 0;
  padding: 11px 14px;
  outline: none;
  min-width: 0;
}
.t4-search button {
  border: 0;
  background: var(--t4-brand);
  color: #fff;
  padding: 0 22px;
  font-weight: 700;
  cursor: pointer;
}
.t4-search button:hover { background: var(--t4-brand-dark); }
.t4-hot {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  margin-top: 6px;
  font-size: 12px;
  color: var(--t4-muted);
}
.t4-hot a:hover { color: var(--t4-accent); }
.t4-header-cart {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border: 1px solid var(--t4-line);
  border-radius: 6px;
  background: #fff;
  font-weight: 700;
  color: var(--t4-brand);
  white-space: nowrap;
}
.t4-header-cart:hover { border-color: var(--t4-brand); background: var(--t4-soft); }
.t4-badge {
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--t4-accent);
  color: #fff;
  font-size: 11px;
  display: inline-grid;
  place-items: center;
  line-height: 1;
}

/* nav */
.t4-nav {
  background: #fff;
  border-bottom: 1px solid var(--t4-line);
}
.t4-nav-inner {
  display: flex;
  align-items: center;
  gap: 4px;
  min-height: 44px;
  overflow-x: auto;
}
.t4-nav-link {
  padding: 12px 14px;
  font-weight: 600;
  font-size: 14px;
  white-space: nowrap;
}
.t4-nav-link:hover,
.t4-nav-link.is-on { color: var(--t4-accent); }
.t4-nav-drop { position: relative; }
.t4-nav-drop-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 160px;
  background: #fff;
  border: 1px solid var(--t4-line);
  border-radius: 8px;
  box-shadow: var(--t4-shadow);
  z-index: 40;
  padding: 6px;
}
.t4-nav-drop:hover .t4-nav-drop-menu { display: block; }
.t4-nav-drop-menu a {
  display: block;
  padding: 8px 10px;
  border-radius: 6px;
  font-size: 13px;
}
.t4-nav-drop-menu a:hover { background: var(--t4-soft); color: var(--t4-brand); }

/* hero board */
.t4-board {
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr) 250px;
  gap: 12px;
  margin: 14px auto 16px;
}
.t4-cats {
  background: #dfe8f2;
  border-radius: var(--t4-radius);
  overflow: hidden;
  border: 1px solid #c9d6e5;
}
.t4-cats-title {
  margin: 0;
  padding: 12px 14px;
  background: var(--t4-brand);
  color: #fff;
  font-size: 14px;
}
.t4-cat {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-bottom: 1px solid rgba(255,255,255,.45);
  font-size: 13px;
  font-weight: 600;
}
.t4-cat:hover { background: rgba(255,255,255,.55); color: var(--t4-brand); }
.t4-cat i {
  width: 22px;
  height: 22px;
  border-radius: 5px;
  background: #fff;
  color: var(--t4-brand);
  display: grid;
  place-items: center;
  font-style: normal;
  font-size: 11px;
  font-weight: 800;
  flex-shrink: 0;
}

.t4-board-mid {
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 10px;
  min-height: 320px;
}
.t4-feature-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}
.t4-feature {
  border-radius: 8px;
  padding: 14px;
  color: #fff;
  min-height: 72px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  background: linear-gradient(135deg, #0c4a6e, #0369a1);
}
.t4-feature:nth-child(2) { background: linear-gradient(135deg, #1e3a5f, #334155); }
.t4-feature:nth-child(3) { background: linear-gradient(135deg, #0f766e, #14b8a6); }
.t4-feature:nth-child(4) { background: linear-gradient(135deg, #9a3412, #ea580c); }
.t4-feature:nth-child(5) { background: linear-gradient(135deg, #1e40af, #3b82f6); }
.t4-feature:nth-child(6) { background: linear-gradient(135deg, #365314, #84cc16); }
.t4-feature strong { font-size: 15px; }
.t4-feature span { font-size: 12px; opacity: .88; margin-top: 2px; }

.t4-hero {
  position: relative;
  border-radius: var(--t4-radius);
  overflow: hidden;
  background: #0f172a;
  min-height: 180px;
}
.t4-hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity .35s ease;
  pointer-events: none;
}
.t4-hero-slide.is-on {
  opacity: 1;
  pointer-events: auto;
}
.t4-hero-slide a { display: block; height: 100%; }
.t4-hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.t4-hero-fallback {
  display: grid;
  place-items: center;
  height: 100%;
  padding: 20px;
  background: linear-gradient(135deg, #0c4a6e, #0369a1 55%, #ea580c);
  color: #fff;
  text-align: center;
}
.t4-hero-fallback strong {
  font-size: 22px;
  display: block;
  margin-bottom: 6px;
}
.t4-hero-dots {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 10px;
  display: flex;
  justify-content: center;
  gap: 6px;
  z-index: 2;
}
.t4-hero-dots button {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: 0;
  background: rgba(255,255,255,.45);
  cursor: pointer;
  padding: 0;
}
.t4-hero-dots button.is-on {
  background: #fff;
  width: 16px;
  border-radius: 999px;
}

.t4-board-side {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.t4-panel {
  background: #fff;
  border: 1px solid var(--t4-line);
  border-radius: var(--t4-radius);
  padding: 12px;
}
.t4-user-box {
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.t4-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--t4-surface);
  color: var(--t4-muted);
  display: grid;
  place-items: center;
  font-weight: 800;
  margin: 0 auto;
}
.t4-user-box p {
  margin: 0;
  font-size: 13px;
  color: var(--t4-muted);
}
.t4-user-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.t4-panel h3 {
  margin: 0 0 8px;
  font-size: 14px;
  padding-bottom: 6px;
  border-bottom: 2px solid var(--t4-accent);
  display: inline-block;
}
.t4-news {
  margin: 0;
  padding: 0;
  list-style: none;
}
.t4-news li {
  padding: 6px 0;
  border-bottom: 1px dashed #eef2f6;
  font-size: 12px;
}
.t4-news li:last-child { border-bottom: 0; }
.t4-news a {
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.t4-news a:hover { color: var(--t4-brand); }
.t4-hotline {
  background: linear-gradient(120deg, #0c4a6e, #0369a1);
  color: #fff;
  border: 0;
  text-align: center;
}
.t4-hotline strong {
  display: block;
  font-size: 18px;
  letter-spacing: .5px;
}
.t4-hotline span { font-size: 12px; opacity: .9; }

/* floors */
.t4-floor {
  background: #fff;
  border: 1px solid var(--t4-line);
  border-radius: var(--t4-radius);
  margin: 0 auto 14px;
  overflow: hidden;
}
.t4-floor-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--t4-line);
}
.t4-floor-title {
  margin: 0;
  font-size: 17px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.t4-floor-title i {
  width: 4px;
  height: 16px;
  background: var(--t4-accent);
  border-radius: 2px;
  display: inline-block;
}
.t4-floor-more {
  display: flex;
  gap: 12px;
  font-size: 13px;
  color: var(--t4-muted);
}
.t4-floor-more a:hover { color: var(--t4-accent); }
.t4-floor-body { padding: 12px; }

.t4-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 0;
  border-bottom: 1px solid var(--t4-line);
  padding: 0 8px;
  background: #fff;
  border-radius: var(--t4-radius) var(--t4-radius) 0 0;
}
.t4-tab {
  padding: 12px 16px;
  font-weight: 700;
  font-size: 14px;
  color: var(--t4-muted);
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}
.t4-tab.is-on,
.t4-tab:hover {
  color: var(--t4-accent);
  border-bottom-color: var(--t4-accent);
}

.t4-goods-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.t4-goods {
  border: 1px solid transparent;
  border-radius: 6px;
  overflow: hidden;
  background: #fff;
  color: inherit;
  transition: .15s ease;
}
.t4-goods:hover {
  border-color: var(--t4-line);
  box-shadow: var(--t4-shadow);
  transform: translateY(-2px);
}
.t4-goods-cover {
  aspect-ratio: 1;
  background: #f8fafc;
  overflow: hidden;
}
.t4-goods-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.t4-goods-body { padding: 8px 10px 10px; }
.t4-goods-body h3 {
  margin: 0 0 6px;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.8em;
}
.t4-goods-price {
  color: var(--t4-danger);
  font-weight: 800;
  font-size: 15px;
}
.t4-goods-meta {
  margin-top: 2px;
  font-size: 12px;
  color: var(--t4-muted);
}

.t4-post-list {
  margin: 0;
  padding: 0;
  list-style: none;
}
.t4-post-list li {
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px dashed var(--t4-line);
  font-size: 13px;
}
.t4-post-list li:last-child { border-bottom: 0; }
.t4-post-list a {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.t4-post-list a:hover { color: var(--t4-brand); }
.t4-post-list time {
  color: var(--t4-muted);
  font-size: 12px;
  white-space: nowrap;
}

.t4-trust {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
  margin: 8px auto 18px;
  background: #fff;
  border: 1px solid var(--t4-line);
  border-radius: var(--t4-radius);
  padding: 14px 10px;
  text-align: center;
}
.t4-trust span {
  font-size: 13px;
  color: var(--t4-muted);
}
.t4-trust b {
  width: 34px;
  height: 34px;
  margin: 0 auto 6px;
  border-radius: 50%;
  background: var(--t4-soft);
  color: var(--t4-brand);
  display: grid;
  place-items: center;
  font-size: 12px;
}

.t4-footer {
  background: #0b1c2d;
  color: #94a3b8;
  padding: 28px 0 16px;
  margin-top: 10px;
  font-size: 13px;
}
.t4-footer a:hover { color: #fff; }
.t4-footer-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  margin-bottom: 16px;
}
.t4-footer h4 {
  margin: 0 0 10px;
  color: #fff;
  font-size: 14px;
}
.t4-footer ul { margin: 0; padding: 0; list-style: none; }
.t4-footer li { margin: 6px 0; }
.t4-footer-copy {
  border-top: 1px solid #1e3348;
  padding-top: 12px;
  text-align: center;
  font-size: 12px;
}

.t4-state-empty {
  padding: 40px 16px;
  text-align: center;
  color: var(--t4-muted);
  background: #fff;
  border: 1px dashed var(--t4-line);
  border-radius: var(--t4-radius);
}

@media (max-width: 980px) {
  .t4-header-row { grid-template-columns: 1fr; }
  .t4-board { grid-template-columns: 1fr; }
  .t4-cats { display: none; }
  .t4-goods-grid { grid-template-columns: repeat(3, 1fr); }
  .t4-trust { grid-template-columns: repeat(3, 1fr); }
  .t4-footer-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .t4-goods-grid { grid-template-columns: repeat(2, 1fr); }
  .t4-feature-grid { grid-template-columns: 1fr; }
  .t4-header-cart span:not(.t4-badge) { display: none; }
  .t4-trust { grid-template-columns: repeat(2, 1fr); }
}
