:root {
  --bg: #f5f6fa;
  --card: #ffffff;
  --text: #1f2937;
  --muted: #6b7280;
  --accent: #fe2c55;
  --accent-hover: #e0264b;
  --border: #e5e7eb;
  --radius: 10px;
  --shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
  --maxw: 1180px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, 'Segoe UI', Roboto, 'PingFang SC',
    'Microsoft YaHei', sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.5;
}

a {
  color: inherit;
  text-decoration: none;
}

a:hover {
  color: var(--accent);
}

img {
  max-width: 100%;
  vertical-align: middle;
}

.site-wrap {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.site-header {
  background: var(--card);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 50;
}

.site-header__inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand {
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: 0.02em;
}

.brand span {
  color: var(--accent);
}

.main-nav {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  font-size: 0.95rem;
}

.main-nav a.active {
  color: var(--accent);
  font-weight: 600;
}

.site-main {
  flex: 1;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 24px 20px 48px;
  width: 100%;
}

.site-footer {
  border-top: 1px solid var(--border);
  background: var(--card);
  padding: 20px;
  text-align: center;
  font-size: 0.85rem;
  color: var(--muted);
}

.site-footer code {
  font-size: 0.8rem;
  background: var(--bg);
  padding: 2px 6px;
  border-radius: 4px;
}

.panel {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px;
  margin-bottom: 20px;
}

.banner-wrap img {
  width: 100%;
  display: block;
  border-radius: var(--radius);
  max-height: 320px;
  object-fit: cover;
}

.banner-alt {
  margin-top: 10px;
  color: var(--muted);
  font-size: 0.9rem;
}

.swiper-strip {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 14px;
}

.swiper-strip .slide {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--card);
}

.swiper-strip .slide img {
  width: 100%;
  height: 140px;
  object-fit: cover;
}

.nav-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 16px;
  text-align: center;
  font-size: 0.85rem;
}

.nav-grid a {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 10px 6px;
  border-radius: var(--radius);
  transition: background 0.15s;
}

.nav-grid a:hover {
  background: var(--bg);
}

.nav-grid img {
  width: 52px;
  height: 52px;
  object-fit: contain;
}

.notice-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.notice-list a {
  color: var(--muted);
  font-size: 0.92rem;
}

.notice-list a:hover {
  color: var(--accent);
}

.section-title {
  font-size: 1.05rem;
  font-weight: 700;
  margin: 0 0 14px;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 18px;
}

.product-card {
  background: var(--card);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  transition: box-shadow 0.15s, transform 0.15s;
}

.product-card:hover {
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}

.product-card .thumb {
  aspect-ratio: 1;
  background: var(--bg);
}

.product-card .thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-card .meta {
  padding: 12px;
}

.product-card .title {
  font-size: 0.9rem;
  margin: 0 0 8px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.6em;
}

.price-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.price {
  color: var(--accent);
  font-weight: 700;
  font-size: 1.05rem;
}

.origin-price {
  color: var(--muted);
  font-size: 0.85rem;
  text-decoration: line-through;
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin-bottom: 18px;
}

.search-form {
  display: flex;
  gap: 8px;
  flex: 1;
  min-width: 200px;
}

.search-form input[type='text'] {
  flex: 1;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 0.95rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 18px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  font-size: 0.95rem;
  font-weight: 600;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
}

.btn-primary:hover {
  background: var(--accent-hover);
  color: #fff;
}

.btn-ghost {
  background: var(--card);
  border: 1px solid var(--border);
  color: var(--text);
}

.pagination {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-top: 24px;
  font-size: 0.92rem;
  color: var(--muted);
}

.article-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.article-list a {
  padding: 12px 14px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--card);
}

.article-list a:hover {
  border-color: var(--accent);
}

.article-body {
  font-size: 0.98rem;
  color: var(--text);
}

.article-body p {
  margin: 0 0 12px;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
  gap: 28px;
  align-items: start;
}

@media (max-width: 768px) {
  .detail-layout {
    grid-template-columns: 1fr;
  }

  .site-header__inner {
    flex-direction: column;
    align-items: flex-start;
  }
}

.detail-cover {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--bg);
}

.detail-cover img {
  width: 100%;
  display: block;
}

.detail-title {
  margin: 0 0 12px;
  font-size: 1.35rem;
}

.detail-meta {
  color: var(--muted);
  font-size: 0.9rem;
  margin-bottom: 16px;
}

.empty-tip {
  color: var(--muted);
  padding: 40px 16px;
  text-align: center;
}
