/* ==========================================================================
   SolarMaster 5 Distinct Homepage Themes & Visual CMS Customizer Tokens
   Style 1: forest-classic     (深森绿暖金经典风 — 延续并升级之前设计的深绿款)
   Style 2: nordic-clean       (欧式极简纯白建筑风 — 欧洲高端暖通热泵感)
   Style 3: deeptech-dark      (深空黑金储能旗舰风 — Tesla / 华为数字能源科技感)
   Style 4: industrial-epc     (德系硬朗工商业工程风 — 大型 EPC 与批发商门户感)
   Style 5: mediterranean-warm (澳洲阳光暖沙大地风 — 亲和自然可持续能源风)
   ========================================================================== */

:root {
  --btn-pad-y: 12px;
  --btn-pad-x: 22px;
  --btn-radius: 10px;
  --font-scale: 1;
  --section-py: 76px;
}

.section {
  padding: var(--section-py) 0;
}

.btn {
  padding: var(--btn-pad-y) var(--btn-pad-x);
  border-radius: var(--btn-radius);
}

.hero h1 {
  font-size: calc(clamp(32px, 4.4vw, 52px) * var(--font-scale));
}

.section-title {
  font-size: calc(clamp(25px, 2.8vw, 35px) * var(--font-scale));
}

/* Structural Hero Variants (toggled by data-theme on <body>) */
.hero-inner-grid {
  position: relative;
  z-index: 2;
}

.hero-split-card,
.hero-epc-panel,
.hero-warm-frame {
  display: none;
  position: relative;
  z-index: 2;
}

/* --------------------------------------------------------------------------
   STYLE 1: forest-classic (深森绿暖金经典风 — Upgraded Signature Forest Green)
   -------------------------------------------------------------------------- */
body[data-theme="forest-classic"] {
  --forest-950: #0f291c;
  --forest-900: #163826;
  --forest-800: #1f4d35;
  --forest-700: #315d3a;
  --leaf-500: #5ea352;
  --leaf-100: #e8f4e5;
  --solar-gold: #e9b949;
  --bg-page: #f7faf7;
  --bg-card: #ffffff;
  --ink-900: #0f172a;
  --ink-700: #334155;
  --ink-500: #64748b;
  --line-200: #dce6dd;
}

/* --------------------------------------------------------------------------
   STYLE 2: nordic-clean (欧式极简纯白建筑风 — Asymmetric Split Architectural Hero)
   -------------------------------------------------------------------------- */
body[data-theme="nordic-clean"] {
  --forest-950: #0f172a;
  --forest-900: #0f172a;
  --forest-800: #0369a1;
  --forest-700: #0284c7;
  --leaf-500: #0284c7;
  --leaf-100: #e0f2fe;
  --solar-gold: #f59e0b;
  --bg-page: #ffffff;
  --bg-card: #ffffff;
  --ink-900: #0f172a;
  --ink-700: #334155;
  --ink-500: #64748b;
  --line-200: #e2e8f0;
  --radius-lg: 14px;
}

body[data-theme="nordic-clean"] .announcement-bar {
  background: #f1f5f9;
  color: #0f172a;
  border-bottom: 1px solid #e2e8f0;
}
body[data-theme="nordic-clean"] .announcement-bar a { color: #0284c7 !important; }
body[data-theme="nordic-clean"] .cms-pill { background: #e0f2fe; color: #0369a1; border-color: #bae6fd; }

body[data-theme="nordic-clean"] .hero {
  background: linear-gradient(180deg, #f8fafc 0%, #ffffff 100%);
  color: #0f172a;
  min-height: 600px;
  border-bottom: 1px solid #e2e8f0;
}
body[data-theme="nordic-clean"] .hero-bg,
body[data-theme="nordic-clean"] .hero-overlay { display: none; }
body[data-theme="nordic-clean"] .hero-inner-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 44px;
  align-items: center;
  padding: 64px 0 56px;
}
body[data-theme="nordic-clean"] .hero-content { padding: 0; max-width: none; }
body[data-theme="nordic-clean"] .hero-badge {
  background: #e0f2fe;
  color: #0369a1;
  border-color: #bae6fd;
}
body[data-theme="nordic-clean"] .hero h1 { color: #0f172a; letter-spacing: -0.035em; }
body[data-theme="nordic-clean"] .hero p { color: #475569; }
body[data-theme="nordic-clean"] .btn-gold { background: #0284c7; color: #ffffff; }
body[data-theme="nordic-clean"] .btn-gold:hover { background: #0369a1; }
body[data-theme="nordic-clean"] .btn-outline-light {
  color: #0f172a;
  border-color: #cbd5e1;
  background: #ffffff;
}
body[data-theme="nordic-clean"] .btn-outline-light:hover { background: #f8fafc; border-color: #0284c7; }
body[data-theme="nordic-clean"] .stat-item {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
}
body[data-theme="nordic-clean"] .stat-item strong { color: #0284c7; }
body[data-theme="nordic-clean"] .stat-item span { color: #475569; }

body[data-theme="nordic-clean"] .hero-split-card {
  display: block;
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid #e2e8f0;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.12);
  background: #ffffff;
}
body[data-theme="nordic-clean"] .hero-split-card img {
  width: 100%;
  height: 360px;
  object-fit: cover;
}
body[data-theme="nordic-clean"] .hero-split-caption {
  padding: 18px 20px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  background: #ffffff;
}
body[data-theme="nordic-clean"] .hero-split-metric strong {
  display: block;
  font-size: 18px;
  color: #0f172a;
}
body[data-theme="nordic-clean"] .hero-split-metric span {
  font-size: 12px;
  color: #64748b;
}
body[data-theme="nordic-clean"] .section-alt { background: #f8fafc; }
body[data-theme="nordic-clean"] .product-card {
  box-shadow: none;
  border: 1px solid #e2e8f0;
}
body[data-theme="nordic-clean"] .stock-toolbar { background: #0f172a; }
body[data-theme="nordic-clean"] .contact-panel { background: #0f172a; }

/* --------------------------------------------------------------------------
   STYLE 3: deeptech-dark (深空黑金储能旗舰风 — Tesla / Enphase Midnight Flagship)
   -------------------------------------------------------------------------- */
body[data-theme="deeptech-dark"] {
  --forest-950: #050811;
  --forest-900: #0b1120;
  --forest-800: #111c33;
  --forest-700: #10b981;
  --leaf-500: #34d399;
  --leaf-100: rgba(16, 185, 129, 0.16);
  --solar-gold: #fbbf24;
  --bg-page: #070b14;
  --bg-card: #0f172a;
  --ink-900: #f8fafc;
  --ink-700: #cbd5e1;
  --ink-500: #94a3b8;
  --line-200: #1e293b;
}

body[data-theme="deeptech-dark"] .site-header {
  background: rgba(7, 11, 20, 0.88);
  border-bottom: 1px solid #1e293b;
}
body[data-theme="deeptech-dark"] .brand-logo,
body[data-theme="deeptech-dark"] .nav-links a { color: #e2e8f0; }
body[data-theme="deeptech-dark"] .nav-links a:hover { color: #34d399; }
body[data-theme="deeptech-dark"] .hero {
  background: radial-gradient(circle at 50% 18%, rgba(16, 185, 129, 0.22), transparent 52%), #050811;
  text-align: center;
}
body[data-theme="deeptech-dark"] .hero-bg { opacity: 0.22; }
body[data-theme="deeptech-dark"] .hero-overlay {
  background: linear-gradient(180deg, rgba(5, 8, 17, 0.65) 0%, rgba(7, 11, 20, 0.96) 100%);
}
body[data-theme="deeptech-dark"] .hero-content {
  margin: 0 auto;
  max-width: 900px;
}
body[data-theme="deeptech-dark"] .hero p { margin-left: auto; margin-right: auto; }
body[data-theme="deeptech-dark"] .hero-actions { justify-content: center; }
body[data-theme="deeptech-dark"] .stat-item {
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid rgba(52, 211, 153, 0.25);
}
body[data-theme="deeptech-dark"] .stat-item strong { color: #34d399; }
body[data-theme="deeptech-dark"] .trust-strip {
  background: #0b1120;
  border-color: #1e293b;
}
body[data-theme="deeptech-dark"] .cert-pill {
  background: rgba(255, 255, 255, 0.04);
  border-color: #1e293b;
  color: #cbd5e1;
}
body[data-theme="deeptech-dark"] .section-alt { background: #0b1120; }
body[data-theme="deeptech-dark"] .stock-card,
body[data-theme="deeptech-dark"] .product-card,
body[data-theme="deeptech-dark"] .article-card,
body[data-theme="deeptech-dark"] .feature-box,
body[data-theme="deeptech-dark"] .rfq-form,
body[data-theme="deeptech-dark"] .hp-banner-card {
  background: #0f172a;
  border-color: #1e293b;
  color: #f8fafc;
}
body[data-theme="deeptech-dark"] .stock-toolbar {
  background: linear-gradient(90deg, #064e3b, #0f172a);
}
body[data-theme="deeptech-dark"] .stock-table th {
  background: #0b1120;
  color: #94a3b8;
  border-color: #1e293b;
}
body[data-theme="deeptech-dark"] .stock-table td {
  border-color: #1e293b;
  color: #e2e8f0;
}
body[data-theme="deeptech-dark"] .stock-table td div { color: #f8fafc; }
body[data-theme="deeptech-dark"] .product-title,
body[data-theme="deeptech-dark"] .article-card h3,
body[data-theme="deeptech-dark"] .feature-box strong,
body[data-theme="deeptech-dark"] .rfq-form h3 { color: #ffffff !important; }
body[data-theme="deeptech-dark"] .form-group input,
body[data-theme="deeptech-dark"] .form-group select,
body[data-theme="deeptech-dark"] .form-group textarea {
  background: #070b14;
  border-color: #334155;
  color: #f8fafc;
}
body[data-theme="deeptech-dark"] .filter-tab {
  background: #0f172a;
  border-color: #334155;
  color: #cbd5e1;
}
body[data-theme="deeptech-dark"] .filter-tab.active {
  background: #10b981;
  border-color: #10b981;
  color: #050811;
}
body[data-theme="deeptech-dark"] .section-title { color: #f8fafc; }
body[data-theme="deeptech-dark"] .section-desc { color: #94a3b8; }
body[data-theme="deeptech-dark"] .btn-outline {
  color: #34d399;
  border-color: #34d399;
  background: transparent;
}
body[data-theme="deeptech-dark"] .contact-panel {
  background: linear-gradient(145deg, #064e3b 0%, #0b1120 100%);
  border: 1px solid #1e293b;
}

/* --------------------------------------------------------------------------
   STYLE 4: industrial-epc (德系硬朗工商业工程风 — Precision Navy + Solar Orange)
   -------------------------------------------------------------------------- */
body[data-theme="industrial-epc"] {
  --forest-950: #0b1f3a;
  --forest-900: #0f294a;
  --forest-800: #163b6b;
  --forest-700: #ea580c;
  --leaf-500: #f97316;
  --leaf-100: #ffedd5;
  --solar-gold: #ea580c;
  --bg-page: #f1f5f9;
  --bg-card: #ffffff;
  --ink-900: #0b1f3a;
  --ink-700: #334155;
  --ink-500: #64748b;
  --line-200: #cbd5e1;
  --radius-lg: 4px;
  --radius-md: 4px;
  --btn-radius: 4px;
}

body[data-theme="industrial-epc"] .hero {
  background: #0b1f3a;
  min-height: 590px;
}
body[data-theme="industrial-epc"] .hero-overlay {
  background: linear-gradient(100deg, rgba(11, 31, 58, 0.96) 0%, rgba(11, 31, 58, 0.86) 55%, rgba(11, 31, 58, 0.65) 100%);
}
body[data-theme="industrial-epc"] .hero-inner-grid {
  display: grid;
  grid-template-columns: 1.25fr 0.75fr;
  gap: 36px;
  align-items: center;
  padding: 58px 0;
}
body[data-theme="industrial-epc"] .hero-content { padding: 0; max-width: none; }
body[data-theme="industrial-epc"] .hero-badge {
  border-radius: 3px;
  background: rgba(234, 88, 12, 0.18);
  border-color: rgba(234, 88, 12, 0.55);
  color: #fdba74;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
body[data-theme="industrial-epc"] .btn-gold {
  background: #ea580c;
  color: #ffffff;
}
body[data-theme="industrial-epc"] .btn-gold:hover { background: #c2410c; }
body[data-theme="industrial-epc"] .hero-epc-panel {
  display: block;
  background: #ffffff;
  color: #0b1f3a;
  padding: 24px;
  border-top: 4px solid #ea580c;
  border-radius: 4px;
  box-shadow: 0 24px 50px rgba(0, 0, 0, 0.35);
}
body[data-theme="industrial-epc"] .epc-panel-title {
  font-size: 16px;
  font-weight: 800;
  margin: 0 0 6px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
body[data-theme="industrial-epc"] .epc-quick-list {
  display: grid;
  gap: 9px;
  margin: 14px 0 18px;
}
body[data-theme="industrial-epc"] .epc-quick-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 12px;
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  border-left: 3px solid #0b1f3a;
  font-size: 13px;
  font-weight: 700;
  transition: all 0.15s ease;
}
body[data-theme="industrial-epc"] .epc-quick-item:hover {
  border-left-color: #ea580c;
  background: #fff7ed;
}
body[data-theme="industrial-epc"] .product-card,
body[data-theme="industrial-epc"] .stock-card,
body[data-theme="industrial-epc"] .article-card,
body[data-theme="industrial-epc"] .rfq-form,
body[data-theme="industrial-epc"] .contact-panel {
  border-radius: 4px;
}
body[data-theme="industrial-epc"] .stock-toolbar { background: #0b1f3a; }
body[data-theme="industrial-epc"] .contact-panel { background: #0b1f3a; }

/* --------------------------------------------------------------------------
   STYLE 5: mediterranean-warm (澳洲阳光暖沙大地风 — Organic Warm Sand & Cypress)
   -------------------------------------------------------------------------- */
body[data-theme="mediterranean-warm"] {
  --forest-950: #1e3a2f;
  --forest-900: #244639;
  --forest-800: #2f5a4a;
  --forest-700: #c2410c;
  --leaf-500: #d97706;
  --leaf-100: #fef3c7;
  --solar-gold: #d97706;
  --bg-page: #faf7f2;
  --bg-card: #ffffff;
  --ink-900: #1c2420;
  --ink-700: #444d47;
  --ink-500: #6b726d;
  --line-200: #e7dfd3;
  --radius-lg: 24px;
  --radius-md: 16px;
  --btn-radius: 999px;
}

body[data-theme="mediterranean-warm"] .announcement-bar {
  background: #1e3a2f;
  color: #fef3c7;
}
body[data-theme="mediterranean-warm"] .hero {
  background: linear-gradient(160deg, #f3ede2 0%, #faf7f2 100%);
  color: #1c2420;
  min-height: 580px;
}
body[data-theme="mediterranean-warm"] .hero-bg,
body[data-theme="mediterranean-warm"] .hero-overlay { display: none; }
body[data-theme="mediterranean-warm"] .hero-inner-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 40px;
  align-items: center;
  padding: 58px 0;
}
body[data-theme="mediterranean-warm"] .hero-content { padding: 0; max-width: none; }
body[data-theme="mediterranean-warm"] .hero-badge {
  background: #fef3c7;
  color: #92400e;
  border-color: #fde68a;
}
body[data-theme="mediterranean-warm"] .hero h1 { color: #1e3a2f; }
body[data-theme="mediterranean-warm"] .hero p { color: #444d47; }
body[data-theme="mediterranean-warm"] .btn-gold { background: #c2410c; color: #ffffff; }
body[data-theme="mediterranean-warm"] .btn-gold:hover { background: #9a3412; }
body[data-theme="mediterranean-warm"] .btn-outline-light {
  color: #1e3a2f;
  border-color: #1e3a2f;
  background: transparent;
}
body[data-theme="mediterranean-warm"] .stat-item {
  background: #ffffff;
  border: 1px solid #e7dfd3;
  border-radius: 18px;
}
body[data-theme="mediterranean-warm"] .stat-item strong { color: #c2410c; }
body[data-theme="mediterranean-warm"] .stat-item span { color: #444d47; }
body[data-theme="mediterranean-warm"] .hero-warm-frame {
  display: block;
  position: relative;
}
body[data-theme="mediterranean-warm"] .hero-warm-frame img {
  width: 100%;
  height: 410px;
  object-fit: cover;
  border-radius: 28px;
  box-shadow: 0 24px 60px rgba(30, 58, 47, 0.16);
}
body[data-theme="mediterranean-warm"] .warm-float-pill {
  position: absolute;
  bottom: 18px;
  left: 18px;
  right: 18px;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(8px);
  padding: 14px 18px;
  border-radius: 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  color: #1e3a2f;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}
body[data-theme="mediterranean-warm"] .section-alt { background: #f3ede2; }
body[data-theme="mediterranean-warm"] .stock-toolbar { background: #1e3a2f; }
body[data-theme="mediterranean-warm"] .contact-panel { background: #1e3a2f; }

/* Heat Pumps Banner Section */
.hp-banner-card {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 32px;
  align-items: center;
  background: var(--bg-card);
  border: 1px solid var(--line-200);
  border-radius: var(--radius-lg);
  padding: 36px;
  box-shadow: var(--shadow-md);
}
.hp-kpi-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin: 20px 0 24px;
}
.hp-kpi-mini {
  background: var(--leaf-100);
  padding: 12px 14px;
  border-radius: 10px;
}
.hp-kpi-mini strong { display: block; font-size: 18px; color: var(--forest-900); }
.hp-kpi-mini span { font-size: 12px; color: var(--ink-700); }

/* Floating 5-Style Preview Switcher Bar */
.sm-switcher-bar {
  position: fixed;
  bottom: 18px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 120;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: nowrap;
  max-width: calc(100vw - 24px);
  overflow-x: auto;
  background: rgba(15, 23, 42, 0.94);
  backdrop-filter: blur(12px);
  color: #f8fafc;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.32);
  font-size: 12.5px;
}
.sm-switcher-label {
  font-weight: 700;
  color: #fde68a;
  white-space: nowrap;
  padding: 0 6px;
}
.sm-style-btn {
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.06);
  color: #e2e8f0;
  padding: 5px 11px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.18s ease;
}
.sm-style-btn:hover { background: rgba(255, 255, 255, 0.18); color: #fff; }
.sm-style-btn.active {
  background: #10b981;
  color: #052e16;
  border-color: #34d399;
}
.sm-switcher-sep {
  width: 1px;
  height: 18px;
  background: rgba(255, 255, 255, 0.2);
  flex-shrink: 0;
}
.sm-switcher-link {
  color: #93c5fd;
  font-weight: 600;
  white-space: nowrap;
  padding: 4px 8px;
  border-radius: 999px;
}
.sm-switcher-link:hover { background: rgba(255, 255, 255, 0.12); color: #fff; }
.sm-switcher-close {
  border: none;
  background: transparent;
  color: #94a3b8;
  cursor: pointer;
  font-size: 14px;
  padding: 2px 6px;
}

/* Responsive Overrides for Split Themes */
@media (max-width: 960px) {
  body[data-theme="nordic-clean"] .hero-inner-grid,
  body[data-theme="industrial-epc"] .hero-inner-grid,
  body[data-theme="mediterranean-warm"] .hero-inner-grid,
  .hp-banner-card {
    grid-template-columns: 1fr;
  }
  .hp-kpi-row { grid-template-columns: 1fr; }
}
