/*
Theme Name: 北方物回
Theme URI: https://www.manzbot.com
Author: BeifangWuhui
Author URI: https://www.manzbot.com
Description: 北方物回——再生资源现货交易平台专用主题。专注不锈钢精铸废料等再生资源品种的挂牌购销与实物交收。
Version: 1.3.0
License: GPL v2 or later
Text Domain: beifang-wuhui
*/

/* ============ CSS Variables from DESIGN.md ============ */
:root {
  /* Primary */
  --c-green: #1A5C2E;
  --c-green-light: #2E7D32;
  --c-green-bright: #4CAF50;
  /* Accent */
  --c-gold: #C99A2E;
  --c-gold-light: #D4AD4F;
  /* Surface */
  --c-ink-black: #0D1A0D;
  --c-dark-card: #1A2E1A;
  --c-cream: #F4F4EF;
  --c-white: #FFFFFF;
  /* Text */
  --c-text: #1A1A1A;
  --c-text-light: #E8E4DD;
  --c-muted: #6B7280;
  --c-muted-dark: #9A9590;
  /* Borders */
  --c-border-light: #E0DDD5;
  --c-border-dark: #2A3A2A;
  /* Semantic */
  --c-up: #E74C3C;
  --c-down: #2ECC71;
  /* Typography */
  --font-display: 'Noto Serif SC', serif;
  --font-body: 'Noto Sans SC', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  /* Spacing (8pt grid) */
  --space-1: 8px;
  --space-2: 16px;
  --space-3: 24px;
  --space-4: 32px;
  --space-5: 48px;
  --space-6: 80px;
  --space-7: 120px;
  /* Layout */
  --max-width: 1200px;
  --gutter: 32px;
  /* Radius */
  --radius-btn: 8px;
  --radius-card: 12px;
  /* Transition */
  --transition: 300ms ease;
}

/* ============ Reset & Base ============ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  color: var(--c-text);
  background: var(--c-cream);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }

/* ============ Container ============ */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* ============ Navigation ============ */
.nav {
  position: sticky; top: 0; z-index: 100;
  background: var(--c-green);
  height: 64px;
  backdrop-filter: blur(12px);
}
.nav-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--gutter);
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav-logo {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 900;
  color: var(--c-white);
  letter-spacing: 4px;
}
.nav-logo span { color: var(--c-gold); }
.nav-links {
  display: flex;
  align-items: center;
  gap: var(--space-4);
}
.nav-links a {
  color: rgba(255,255,255,0.85);
  font-size: 15px;
  font-weight: 500;
  transition: var(--transition);
  padding: 8px 0;
  border-bottom: 2px solid transparent;
}
.nav-links a:hover,
.nav-links a.active {
  color: var(--c-white);
  border-bottom-color: var(--c-gold);
}
.nav-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 24px;
  border-radius: var(--radius-btn);
  background: transparent;
  border: 1px solid rgba(201,154,46,0.4);
  color: var(--c-gold);
  font-size: 14px;
  font-weight: 500;
  font-family: var(--font-body);
  cursor: pointer;
  transition: var(--transition);
}
.nav-cta:hover {
  background: rgba(201,154,46,0.08);
  border-color: var(--c-gold);
}

/* ============ Hero ============ */
.hero {
  background: var(--c-ink-black);
  position: relative;
  overflow: hidden;
  min-height: 600px;
  display: flex;
  align-items: center;
}
.hero::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: radial-gradient(ellipse at 30% 50%, rgba(26,92,46,0.15), transparent 60%);
  pointer-events: none;
}
.hero .container {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-5);
  align-items: center;
  padding-top: var(--space-6);
  padding-bottom: var(--space-6);
}
.hero-eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--c-gold);
  margin-bottom: var(--space-2);
}
.hero-title {
  font-family: var(--font-display);
  font-size: clamp(40px, 5vw, 56px);
  font-weight: 900;
  line-height: 1.2;
  letter-spacing: 4px;
  color: var(--c-text-light);
  margin-bottom: var(--space-3);
}
.hero-title span { color: var(--c-gold); }
.hero-desc {
  font-size: 18px;
  line-height: 1.8;
  color: var(--muted-dark);
  margin-bottom: var(--space-4);
  max-width: 52ch;
}
.hero-actions {
  display: flex;
  gap: var(--space-2);
  flex-wrap: wrap;
}
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 36px;
  border-radius: var(--radius-btn);
  background: linear-gradient(135deg, var(--c-green), var(--c-green-light));
  color: var(--c-white);
  font-size: 14px;
  font-weight: 500;
  font-family: var(--font-body);
  border: none;
  cursor: pointer;
  transition: var(--transition);
}
.btn-primary:hover {
  box-shadow: 0 4px 20px rgba(26,92,46,0.4);
  transform: translateY(-1px);
}
.btn-gold {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 36px;
  border-radius: var(--radius-btn);
  background: transparent;
  border: 1px solid rgba(201,154,46,0.4);
  color: var(--c-gold);
  font-size: 14px;
  font-weight: 500;
  font-family: var(--font-body);
  cursor: pointer;
  transition: var(--transition);
}
.btn-gold:hover {
  background: rgba(201,154,46,0.08);
  border-color: var(--c-gold);
}
.hero-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-3);
  padding: var(--space-4);
  background: var(--c-dark-card);
  border-radius: var(--radius-card);
  border: 1px solid var(--c-border-dark);
}
.stat-item { text-align: center; }
.stat-number {
  font-family: var(--font-display);
  font-size: clamp(28px, 3vw, 42px);
  font-weight: 700;
  line-height: 1;
  color: var(--c-gold);
  margin-bottom: 4px;
}
.stat-label {
  font-size: 13px;
  color: var(--c-muted-dark);
}

/* ============ Ticker ============ */
.ticker-wrap {
  background: var(--c-ink-black);
  border-top: 1px solid var(--c-border-dark);
  border-bottom: 1px solid var(--c-border-dark);
  overflow: hidden;
  padding: 12px 0;
}
.ticker-track {
  display: flex;
  gap: var(--space-4);
  animation: ticker 30s linear infinite;
  width: max-content;
}
.ticker-track:hover { animation-play-state: paused; }
.ticker-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 16px;
  border-right: 1px solid var(--c-border-dark);
  white-space: nowrap;
}
.ticker-code {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--c-muted-dark);
}
.ticker-price {
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 500;
  color: var(--c-gold);
}
.ticker-change {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
}
.ticker-change.up { color: var(--c-up); }
.ticker-change.down { color: var(--c-down); }
@keyframes ticker {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* ============ Sections ============ */
.section { padding: var(--space-6) 0; }
.section-dark {
  background: var(--c-ink-black);
  color: var(--c-text-light);
}
.section-title-wrap {
  text-align: center;
  margin-bottom: var(--space-5);
}
.section-eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--c-gold);
  margin-bottom: var(--space-1);
}
.section-title {
  font-family: var(--font-display);
  font-size: clamp(28px, 3vw, 36px);
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: 2px;
  margin-bottom: var(--space-2);
}
.section-desc {
  color: var(--c-muted);
  font-size: 16px;
  max-width: 600px;
  margin: 0 auto;
}
.section-dark .section-desc { color: var(--c-muted-dark); }

/* ============ Products Grid ============ */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: var(--space-3);
}
.product-card {
  background: var(--c-white);
  border: 1px solid var(--c-border-light);
  border-radius: var(--radius-card);
  padding: var(--space-4);
  transition: var(--transition);
  cursor: pointer;
}
.product-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0,0,0,0.08);
}
.product-card-name {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 600;
  color: var(--c-green);
  margin-bottom: var(--space-1);
}
.product-card-price {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 700;
  color: var(--c-gold);
  margin-bottom: var(--space-1);
}
.product-card-change {
  font-family: var(--font-mono);
  font-size: 14px;
}
.product-card-change.up { color: var(--c-up); }
.product-card-change.down { color: var(--c-down); }
.product-card-spec {
  font-size: 13px;
  color: var(--c-muted);
  margin-top: var(--space-2);
  padding-top: var(--space-2);
  border-top: 1px solid var(--c-border-light);
}

/* ============ Features ============ */
.features-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-4);
}
.feature-item {
  text-align: center;
  padding: var(--space-4);
}
.feature-icon {
  width: 56px; height: 56px;
  margin: 0 auto var(--space-3);
  background: linear-gradient(135deg, var(--c-green), var(--c-green-light));
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
}
.feature-title {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 600;
  margin-bottom: var(--space-2);
  letter-spacing: 1px;
}
.feature-desc {
  font-size: 14px;
  color: var(--c-muted-dark);
  line-height: 1.7;
}

/* ============ Price Table ============ */
.price-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: var(--c-dark-card);
  border-radius: var(--radius-card);
  overflow: hidden;
  border: 1px solid var(--c-border-dark);
}
.price-table th {
  background: rgba(255,255,255,0.05);
  color: var(--c-muted-dark);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
  padding: 14px var(--space-3);
  text-align: left;
  border-bottom: 1px solid var(--c-border-dark);
  font-weight: 500;
}
.price-table td {
  padding: 14px var(--space-3);
  border-bottom: 1px solid var(--c-border-dark);
  font-size: 14px;
}
.price-table tr:last-child td { border-bottom: none; }
.price-table td:first-child {
  font-family: var(--font-body);
  font-weight: 500;
  color: rgba(255,255,255,0.9);
}
.price-table td:nth-child(2) { font-family: var(--font-mono); color: var(--c-muted-dark); }
.price-table td:nth-child(3) {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  color: var(--c-gold);
}
.price-table td:nth-child(4) { font-family: var(--font-mono); }
.price-table .up { color: var(--c-up); }
.price-table .down { color: var(--c-down); }

/* ============ News ============ */
.news-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-3);
}
.news-card {
  background: var(--c-white);
  border: 1px solid var(--c-border-light);
  border-radius: var(--radius-card);
  padding: var(--space-4);
  transition: var(--transition);
}
.news-card:hover {
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}
.news-date {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--c-muted);
  margin-bottom: var(--space-1);
}
.news-title {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 600;
  color: var(--c-green);
  margin-bottom: var(--space-1);
  line-height: 1.4;
}
.news-excerpt {
  font-size: 14px;
  color: var(--c-muted);
  line-height: 1.7;
}

/* ============ CTA Band ============ */
.cta-band {
  text-align: center;
  padding: var(--space-6) 0;
  background: linear-gradient(135deg, var(--c-ink-black), var(--c-dark-card));
  position: relative;
  overflow: hidden;
}
.cta-band::before {
  content: '';
  position: absolute;
  top: 50%; left: 50%;
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(26,92,46,0.12), transparent 70%);
  transform: translate(-50%, -50%);
  pointer-events: none;
}
.cta-band .container { position: relative; z-index: 1; }
.cta-title {
  font-family: var(--font-display);
  font-size: clamp(28px, 3vw, 36px);
  font-weight: 700;
  color: var(--c-text-light);
  letter-spacing: 2px;
  margin-bottom: var(--space-2);
}
.cta-desc {
  color: var(--c-muted-dark);
  font-size: 16px;
  margin-bottom: var(--space-4);
}
.cta-actions {
  display: flex;
  gap: var(--space-2);
  justify-content: center;
  flex-wrap: wrap;
}

/* ============ Footer ============ */
.footer {
  background: var(--c-ink-black);
  border-top: 1px solid var(--c-border-dark);
  padding: var(--space-5) 0 var(--space-4);
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: var(--space-4);
  margin-bottom: var(--space-4);
}
.footer-brand {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 900;
  color: var(--c-white);
  letter-spacing: 4px;
  margin-bottom: var(--space-2);
}
.footer-brand span { color: var(--c-gold); }
.footer-desc {
  font-size: 14px;
  color: var(--c-muted-dark);
  line-height: 1.8;
}
.footer-col-title {
  font-size: 14px;
  font-weight: 500;
  color: var(--c-text-light);
  margin-bottom: var(--space-2);
  letter-spacing: 1px;
}
.footer-links { list-style: none; }
.footer-links li { margin-bottom: 8px; }
.footer-links a {
  color: var(--c-muted-dark);
  font-size: 14px;
  transition: var(--transition);
}
.footer-links a:hover { color: var(--c-gold); }
.footer-bottom {
  border-top: 1px solid var(--c-border-dark);
  padding-top: var(--space-3);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  color: var(--c-muted-dark);
}
.footer-phone {
  font-family: var(--font-mono);
  color: var(--c-gold);
  font-weight: 500;
}

/* ============ Responsive ============ */
/* ============ Dropdown Navigation ============ */
.nav-menu {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-menu > li { position: relative; }
.nav-menu a {
  color: rgba(255,255,255,0.85);
  font-size: 15px;
  font-weight: 500;
  transition: var(--transition);
  padding: 8px 0;
  border-bottom: 2px solid transparent;
  display: inline-block;
  white-space: nowrap;
}
.nav-menu a:hover,
.nav-menu > li.current-menu-item > a,
.nav-menu > li.current_page_item > a {
  color: var(--c-white);
  border-bottom-color: var(--c-gold);
}

/* Dropdown submenu */
.nav-menu .sub-menu {
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--c-green-light);
  min-width: 200px;
  list-style: none;
  margin: 0;
  padding: 8px 0;
  border-radius: 0 0 var(--radius-btn) var(--radius-btn);
  box-shadow: 0 8px 24px rgba(0,0,0,0.2);
  opacity: 0;
  visibility: hidden;
  transform: translateY(4px);
  transition: all var(--transition);
  z-index: 200;
}
.nav-menu .menu-item-has-children:hover > .sub-menu,
.nav-menu .page_item_has_children:hover > .sub-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.nav-menu .sub-menu a {
  display: block;
  padding: 10px 20px;
  color: rgba(255,255,255,0.85);
  border-bottom: none;
  font-size: 14px;
}
.nav-menu .sub-menu a:hover {
  color: var(--c-white);
  background: rgba(255,255,255,0.08);
  border-bottom: none;
}
.nav-menu .sub-menu .sub-menu {
  top: 0;
  left: 100%;
  margin-left: 2px;
  border-radius: var(--radius-btn);
}

/* Hamburger toggle */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}
.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--c-white);
  border-radius: 2px;
  transition: var(--transition);
}

/* ============ Floating Action Buttons ============ */
.float-bar {
  position: fixed;
  right: 24px;
  bottom: 120px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  z-index: 99999;
}
.float-btn {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border: none;
  box-shadow: 0 4px 16px rgba(0,0,0,.25);
  transition: all .25s ease;
  position: relative;
  color: #fff;
  text-decoration: none;
}
.float-btn:hover { transform: scale(1.1); box-shadow: 0 6px 24px rgba(0,0,0,.3); }
.float-btn:active { transform: scale(.95); }
.float-btn-phone { background: linear-gradient(135deg, #27ae60, #2ecc71); }
.float-btn-wechat { background: linear-gradient(135deg, #07c160, #06ad56); }
.float-tooltip {
  position: absolute;
  right: 66px;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0,0,0,.8);
  color: #fff;
  padding: 6px 14px;
  border-radius: 6px;
  font-size: 13px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s;
}
.float-tooltip::after {
  content: '';
  position: absolute;
  right: -6px;
  top: 50%;
  transform: translateY(-50%);
  border: 6px solid transparent;
  border-left-color: rgba(0,0,0,.8);
}
.float-btn:hover .float-tooltip { opacity: 1; }
@media (max-width: 768px) {
  .float-bar { right: 14px; bottom: 90px; gap: 12px; }
  .float-btn { width: 48px; height: 48px; }
  .float-btn svg { width: 22px; height: 22px; }
}

/* ============ QR Code Modal ============ */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.55);
  z-index: 999999;
  align-items: center;
  justify-content: center;
}
.modal-overlay.active { display: flex; }
.modal-box {
  background: #fff;
  border-radius: 16px;
  padding: 40px 36px 32px;
  width: 340px;
  max-width: 90vw;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0,0,0,.3);
  animation: modalIn .3s ease;
  position: relative;
}
@keyframes modalIn {
  from { opacity: 0; transform: translateY(24px) scale(.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.modal-close {
  position: absolute;
  top: 12px;
  right: 16px;
  background: none;
  border: none;
  font-size: 26px;
  color: #999;
  cursor: pointer;
  line-height: 1;
  padding: 4px;
}
.modal-close:hover { color: #333; }
.modal-icon {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: linear-gradient(135deg, #07c160, #06ad56);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  color: #fff;
}
.modal-box h3 {
  font-size: 18px;
  font-weight: 700;
  color: #1a1a1a;
  margin-bottom: 6px;
}
.modal-box p {
  font-size: 14px;
  color: #666;
  margin-bottom: 20px;
}
.modal-qr-wrap {
  width: 200px;
  height: 200px;
  margin: 0 auto 16px;
  border-radius: 12px;
  overflow: hidden;
  border: 2px solid #f0f0f0;
}
.modal-qr-wrap img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}
.modal-tip {
  font-size: 12px;
  color: #bbb;
  margin-top: 4px;
}

/* ============ Page with Sidebar ============ */
.page-with-sidebar {
  display: flex;
  gap: var(--space-4);
  align-items: flex-start;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: var(--space-5) var(--gutter);
}
.page-sidebar {
  width: 260px;
  flex-shrink: 0;
  order: 2;
  background: var(--c-white);
  border: 1px solid var(--c-border-light);
  border-radius: var(--radius-card);
  overflow: hidden;
  position: sticky;
  top: 80px;
}
.page-sidebar-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--c-white);
  background: var(--c-green);
  padding: 14px 20px;
  letter-spacing: 1px;
}
.page-sidebar ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.page-sidebar li { border-bottom: 1px solid var(--c-border-light); }
.page-sidebar li:last-child { border-bottom: none; }
.page-sidebar a {
  display: block;
  padding: 12px 20px;
  font-size: 14px;
  color: var(--c-text);
  transition: var(--transition);
}
.page-sidebar a:hover,
.page-sidebar li.current_page_item a,
.page-sidebar li.current_page_parent a {
  color: var(--c-green);
  background: rgba(26,92,46,0.04);
  font-weight: 500;
}
.page-sidebar .children { display: none; }
.page-sidebar li.current_page_parent .children,
.page-sidebar li.current_page_item .children { display: block; }
.page-sidebar .children a { padding-left: 36px; font-size: 13px; }

/* ============ Sidebar Blocks (Modules) ============ */
.sb-block { border-bottom: 1px solid var(--c-border-light); }
.sb-block:last-child { border-bottom: none; }
.sb-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--c-white);
  background: var(--c-green);
  padding: 12px 20px;
  letter-spacing: 0.5px;
}
/* Hot Articles */
.sb-hot-list { list-style: none; margin: 0; padding: 0; }
.sb-hot-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 20px;
  border-bottom: 1px solid var(--c-border-light);
}
.sb-hot-item:last-child { border-bottom: none; }
.sb-hot-rank {
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--c-border-light);
  color: var(--c-muted);
  font-size: 11px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.sb-hot-rank.r1 { background: #E74C3C; color: #fff; }
.sb-hot-rank.r2 { background: #E67E22; color: #fff; }
.sb-hot-rank.r3 { background: #F1C40F; color: #fff; }
.sb-hot-link {
  font-size: 13px;
  color: var(--c-text);
  line-height: 1.5;
  transition: var(--transition);
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.sb-hot-link:hover { color: var(--c-green); }
/* Tag Cloud */
.sb-tagcloud { padding: 14px 16px; display: flex; flex-wrap: wrap; gap: 6px; }
.sb-tag {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 4px;
  background: #f0f0eb;
  color: var(--c-muted);
  transition: var(--transition);
  line-height: 1.4;
}
.sb-tag:hover { background: var(--c-green); color: #fff; }
.sb-tag.tag-xl { font-size: 14px; font-weight: 600; color: var(--c-green); }
.sb-tag.tag-l { font-size: 13px; font-weight: 500; color: var(--c-green-light); }
.sb-tag.tag-m { font-size: 12px; font-weight: 400; }
.sb-tag.tag-s { font-size: 11px; font-weight: 300; color: var(--c-muted-dark); }
/* Contact */
.sb-contact { padding: 14px 20px; }
.sb-contact-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--c-text);
  padding: 6px 0;
}
.sb-contact-icon { font-size: 18px; }
.sb-contact-divider {
  height: 1px;
  background: var(--c-border-light);
  margin: 10px 0;
}
.sb-contact-qr { text-align: center; padding: 10px 0; }
.sb-qr-placeholder {
  width: 120px; height: 120px;
  margin: 0 auto;
  background: #f0f0eb;
  border: 1px dashed var(--c-border-light);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  color: var(--c-muted);
}
.sb-contact-links { display: flex; flex-direction: column; gap: 6px; }
.page-sidebar .sb-contact-btn,
.sb-contact-btn {
  display: block;
  padding: 8px 16px;
  border-radius: var(--radius-btn);
  background: var(--c-green);
  color: var(--c-white);
  font-size: 13px;
  text-align: center;
  transition: var(--transition);
}
.page-sidebar .sb-contact-btn:hover,
.sb-contact-btn:hover { background: var(--c-green-light); }
/* Qualifications */
.sb-qual { padding: 14px 20px; display: flex; flex-direction: column; gap: 12px; }
.sb-qual-item {
  display: flex;
  align-items: center;
  gap: 10px;
}
.sb-qual-icon { font-size: 20px; }
.sb-qual-name {
  font-size: 13px;
  font-weight: 500;
  color: var(--c-text);
}

.page-main {
  flex: 1;
  min-width: 0;
  background: var(--c-white);
  border: 1px solid var(--c-border-light);
  border-radius: var(--radius-card);
  padding: var(--space-4);
}
.page-main-title {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 700;
  color: var(--c-green);
  letter-spacing: 1px;
  margin-bottom: var(--space-3);
  padding-bottom: var(--space-2);
  border-bottom: 2px solid var(--c-border-light);
}
.page-main-content {
  font-size: 15px;
  line-height: 2;
  color: var(--c-text);
}

/* ============ Pagination ============ */
.pagination {
  margin-top: var(--space-3);
  text-align: center;
  display: flex;
  justify-content: center;
  gap: 6px;
  flex-wrap: wrap;
}
.pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  padding: 0 10px;
  border: 1px solid var(--c-border-light);
  border-radius: var(--radius-btn);
  background: var(--c-white);
  color: var(--c-text);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  transition: var(--transition);
}
.pagination .page-numbers:hover {
  border-color: var(--c-green);
  color: var(--c-green);
  background: rgba(26,92,46,0.04);
}
.pagination .page-numbers.current {
  background: var(--c-green);
  border-color: var(--c-green);
  color: var(--c-white);
  font-weight: 600;
}
.pagination .page-numbers.prev,
.pagination .page-numbers.next {
  border-color: transparent;
  background: transparent;
  color: var(--c-green);
  font-weight: 500;
}
.pagination .page-numbers.prev:hover,
.pagination .page-numbers.next:hover {
  background: rgba(26,92,46,0.04);
}

/* ============ Content Blocks (rule-*) ============ */
.rule-section {
  margin-bottom: var(--space-4);
}
.rule-section h2 {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  color: var(--c-green);
  margin-bottom: var(--space-2);
  padding-bottom: 8px;
  border-bottom: 2px solid var(--c-gold);
}
.rule-section h3 {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 600;
  color: var(--c-text);
  margin: var(--space-3) 0 var(--space-2);
}
.rule-card {
  background: #f8f9f6;
  border: 1px solid var(--c-border-light);
  border-radius: var(--radius-btn);
  padding: var(--space-3);
  margin-bottom: var(--space-2);
}
.rule-card p { margin-bottom: 8px; }
.rule-card p:last-child { margin-bottom: 0; }

.rule-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: var(--space-3);
  font-size: 14px;
}
.rule-table th {
  background: var(--c-green);
  color: var(--c-white);
  padding: 10px 16px;
  text-align: left;
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.5px;
}
.rule-table td {
  padding: 10px 16px;
  border-bottom: 1px solid var(--c-border-light);
}
.rule-table tr:nth-child(even) td {
  background: #f8f9f6;
}
.rule-table tr:last-child td { border-bottom: none; }

.highlight-card {
  background: linear-gradient(135deg, var(--c-green), var(--c-green-light));
  color: var(--c-white);
  border-radius: var(--radius-btn);
  padding: var(--space-3);
  margin-bottom: var(--space-2);
}
.highlight-card p {
  margin-bottom: 8px;
  font-size: 15px;
  line-height: 1.8;
}
.highlight-card p:last-child { margin-bottom: 0; }
.highlight-card strong { color: var(--c-gold); }

/* ============ Download Page ============ */
.download-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--space-3);
  margin-bottom: var(--space-4);
}
.download-category {
  border: 1px solid var(--c-border-light);
  border-radius: var(--radius-card);
  padding: var(--space-3);
  background: #f8f9f6;
}
.download-category h3 {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 600;
  color: var(--c-green);
  margin-bottom: var(--space-2);
  padding-bottom: 8px;
  border-bottom: 2px solid var(--c-gold);
}
.download-btn-group {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.download-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 20px;
  border-radius: var(--radius-btn);
  background: var(--c-green);
  color: var(--c-white);
  font-size: 13px;
  font-weight: 500;
  border: none;
  cursor: pointer;
  transition: var(--transition);
}
.download-btn:hover {
  background: var(--c-green-light);
  transform: translateY(-1px);
}
.download-steps {
  list-style: none;
  counter-reset: step;
}
.download-steps li {
  counter-increment: step;
  padding: 12px 0 12px 40px;
  position: relative;
  font-size: 14px;
  line-height: 1.8;
  border-bottom: 1px solid var(--c-border-light);
}
.download-steps li:last-child { border-bottom: none; }
.download-steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 12px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--c-gold);
  color: var(--c-white);
  font-size: 13px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ============ Variety Detail Page ============ */
.variety-hero {
  background: linear-gradient(135deg, var(--c-green), var(--c-ink-black));
  color: var(--c-white);
  padding: var(--space-4);
  border-radius: var(--radius-btn);
  margin-bottom: var(--space-3);
  text-align: center;
}
.variety-hero h2 {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 4px;
  letter-spacing: 2px;
}
.variety-hero .variety-code {
  font-family: var(--font-mono);
  font-size: 48px;
  font-weight: 700;
  color: var(--c-gold);
  line-height: 1.2;
}
.variety-hero p {
  font-size: 14px;
  color: var(--c-muted-dark);
  margin-top: 8px;
}

/* ============ Responsive ============ */
@media (max-width: 768px) {
  :root { --gutter: 16px; }
  .hero .container {
    grid-template-columns: 1fr;
    padding-top: var(--space-4);
    padding-bottom: var(--space-4);
  }
  .hero-stats { grid-template-columns: 1fr 1fr; }

  /* Mobile nav */
  .nav-toggle { display: flex; }
  .nav-links {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--c-green);
    padding: var(--space-2) var(--gutter);
    box-shadow: 0 8px 24px rgba(0,0,0,0.2);
    z-index: 200;
  }
  .nav-links.open { display: block; }
  .nav-menu {
    flex-direction: column;
    gap: 0;
    align-items: stretch;
  }
  .nav-menu a { padding: 12px 0; border-bottom: none; }
  .nav-menu .sub-menu {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    background: rgba(0,0,0,0.1);
    border-radius: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 300ms ease;
    padding: 0;
  }
  .nav-menu .sub-open > .sub-menu {
    max-height: 600px;
    padding: 8px 0;
  }
  .nav-menu .sub-menu a { padding-left: 24px; }

  .features-list { grid-template-columns: 1fr; }
  .news-list { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .product-grid { grid-template-columns: 1fr 1fr; }
  .price-table { font-size: 12px; }
  .footer-bottom { flex-direction: column; gap: var(--space-2); text-align: center; }

  .page-with-sidebar { flex-direction: column; padding: var(--space-3) var(--gutter); }
  .page-sidebar { width: 100%; position: static; }
  .download-grid { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  .product-grid { grid-template-columns: 1fr; }
  .hero-stats { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
}