/* ═══ Theme Variables ═══ */
:root, [data-theme="light"] {
  --bg: #ffffff;
  --bg-alt: #f7f8fa;
  --bg-card: #ffffff;
  --bg-nav: rgba(255,255,255,0.92);
  --text: #374151;
  --text-h: #111827;
  --text-muted: #6b7280;
  --border: #e5e7eb;
  --primary: #10b981;
  --primary-dark: #059669;
  --primary-light: rgba(16,185,129,0.1);
  --accent: #0ea5e9;
  --shadow: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-lg: 0 10px 40px rgba(0,0,0,0.08);
  --hero-gradient: linear-gradient(135deg, #ecfdf5 0%, #f0fdf4 30%, #f0f9ff 70%, #ecfdf5 100%);
}

[data-theme="dark"] {
  --bg: #0f1117;
  --bg-alt: #161922;
  --bg-card: #1a1d28;
  --bg-nav: rgba(15,17,23,0.92);
  --text: #9ca3af;
  --text-h: #f3f4f6;
  --text-muted: #6b7280;
  --border: #2a2d3a;
  --primary: #34d399;
  --primary-dark: #10b981;
  --primary-light: rgba(52,211,153,0.1);
  --accent: #38bdf8;
  --shadow: 0 1px 3px rgba(0,0,0,0.2);
  --shadow-lg: 0 10px 40px rgba(0,0,0,0.3);
  --hero-gradient: linear-gradient(135deg, #0a1510 0%, #0f1717 50%, #101520 100%);
}

/* ═══ Reset & Base ═══ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body { font-family: 'Inter', system-ui, -apple-system, sans-serif; background: var(--bg); color: var(--text); line-height: 1.6; transition: background 0.3s, color 0.3s; }
a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }

/* ═══ Navigation ═══ */
.nav { position: fixed; top: 0; left: 0; right: 0; z-index: 1000; background: var(--bg-nav); backdrop-filter: blur(12px); border-bottom: 1px solid var(--border); transition: all 0.3s; }
.nav.scrolled { box-shadow: var(--shadow-lg); }
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.nav-logo { display: flex; align-items: center; gap: 10px; font-size: 20px; color: var(--text-h); }
.nav-logo i { color: var(--primary); font-size: 24px; }
.nav-logo strong { color: var(--primary); }
.nav-links { display: flex; gap: 32px; }
.nav-links a { font-size: 14px; font-weight: 500; color: var(--text); transition: color 0.2s; }
.nav-links a:hover { color: var(--primary); }
.nav-right { display: flex; align-items: center; gap: 12px; }
.theme-toggle { background: var(--bg-alt); border: 1px solid var(--border); width: 38px; height: 38px; border-radius: 50%; display: flex; align-items: center; justify-content: center; cursor: pointer; color: var(--text); font-size: 16px; transition: all 0.2s; }
.theme-toggle:hover { color: var(--primary); border-color: var(--primary); }
[data-theme="dark"] .theme-toggle i::before { content: "\f185"; }
.nav-hamburger { display: none; background: none; border: none; color: var(--text-h); font-size: 20px; cursor: pointer; }

/* ═══ Buttons ═══ */
.btn { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; border-radius: 10px; cursor: pointer; transition: all 0.2s; border: none; font-family: inherit; }
.btn-sm { padding: 8px 18px; font-size: 13px; }
.btn-lg { padding: 14px 28px; font-size: 15px; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); transform: translateY(-1px); box-shadow: 0 4px 14px rgba(16,185,129,0.3); }
.btn-outline { background: transparent; border: 2px solid var(--border); color: var(--text-h); }
.btn-outline:hover { border-color: var(--primary); color: var(--primary); }
.btn-white { background: #fff; color: var(--primary-dark); }
.btn-white:hover { transform: translateY(-1px); box-shadow: 0 4px 14px rgba(255,255,255,0.3); }

/* ═══ Hero ═══ */
.hero { position: relative; padding: 120px 0 80px; overflow: hidden; }
.hero-bg { position: absolute; inset: 0; background: var(--hero-gradient); z-index: 0; }
.hero-inner { position: relative; z-index: 1; display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center; }
.hero-badge { display: inline-flex; align-items: center; gap: 8px; background: var(--primary-light); color: var(--primary); font-size: 13px; font-weight: 600; padding: 8px 16px; border-radius: 50px; margin-bottom: 20px; }
.hero h1 { font-size: 48px; font-weight: 800; color: var(--text-h); line-height: 1.15; margin-bottom: 20px; }
.gradient-text { background: linear-gradient(135deg, var(--primary), var(--accent)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.hero p { font-size: 18px; color: var(--text); line-height: 1.7; margin-bottom: 32px; max-width: 520px; }
.hero-actions { display: flex; gap: 14px; margin-bottom: 48px; }
.hero-stats { display: flex; gap: 40px; }
.hero-stat { text-align: center; }
.hero-stat-num { display: block; font-size: 28px; font-weight: 800; color: var(--text-h); }
.hero-stat-label { font-size: 13px; color: var(--text-muted); font-weight: 500; }
.hero-visual { position: relative; }
.hero-visual img { border-radius: 20px; box-shadow: var(--shadow-lg); width: 100%; height: 400px; object-fit: cover; }

/* ═══ Sections ═══ */
.section { padding: 100px 0; }
.section-alt { background: var(--bg-alt); }
.section-header { text-align: center; margin-bottom: 56px; }
.section-badge { display: inline-flex; align-items: center; gap: 6px; background: var(--primary-light); color: var(--primary); font-size: 13px; font-weight: 600; padding: 6px 14px; border-radius: 50px; margin-bottom: 14px; }
.section-header h2 { font-size: 36px; font-weight: 800; color: var(--text-h); margin-bottom: 12px; }
.section-header p { font-size: 16px; color: var(--text-muted); max-width: 560px; margin: 0 auto; }

/* ═══ Brand Cards ═══ */
.brands-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.brand-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: 16px; padding: 28px; transition: all 0.2s; }
.brand-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: var(--primary); }
.brand-logo { display: inline-block; padding: 8px 18px; border-radius: 8px; color: #fff; font-weight: 800; font-size: 14px; margin-bottom: 16px; }
.brand-card h3 { font-size: 20px; font-weight: 700; color: var(--text-h); margin-bottom: 10px; }
.brand-card p { font-size: 14px; color: var(--text); line-height: 1.6; margin-bottom: 16px; }
.brand-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.brand-tags span { font-size: 11px; font-weight: 600; padding: 4px 10px; border-radius: 6px; background: var(--bg-alt); color: var(--text-muted); border: 1px solid var(--border); }
.brand-range { font-size: 13px; font-weight: 700; color: var(--primary); }

/* ═══ Product Cards ═══ */
.product-filters { display: flex; justify-content: center; gap: 8px; margin-bottom: 36px; flex-wrap: wrap; }
.pf-btn { padding: 8px 20px; border-radius: 50px; border: 1px solid var(--border); background: var(--bg-card); color: var(--text); font-size: 13px; font-weight: 600; cursor: pointer; transition: all 0.2s; font-family: inherit; }
.pf-btn:hover { border-color: var(--primary); color: var(--primary); }
.pf-btn.active { background: var(--primary); color: #fff; border-color: var(--primary); }

.products-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.product-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: 16px; padding: 24px; position: relative; transition: all 0.2s; display: flex; flex-direction: column; }
.product-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.product-card.hidden { display: none; }
.product-badge { position: absolute; top: 16px; right: 16px; font-size: 11px; font-weight: 700; padding: 4px 10px; border-radius: 6px; background: var(--primary); color: #fff; }
.product-badge.hot { background: #ef4444; }
.product-img { width: 60px; height: 60px; border-radius: 14px; background: var(--primary-light); display: flex; align-items: center; justify-content: center; font-size: 24px; color: var(--primary); margin-bottom: 16px; }
.product-brand { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 6px; }
.product-brand.deye { color: #e53e3e; }
.product-brand.growatt { color: #f6a609; }
.product-brand.luxpower { color: #2b6cb0; }
.product-brand.solax { color: #38a169; }
.product-brand.sungrow { color: #805ad5; }
.product-brand.dongjing { color: #d69e2e; }
.product-card h4 { font-size: 16px; font-weight: 700; color: var(--text-h); margin-bottom: 8px; }
.product-desc { font-size: 13px; color: var(--text); line-height: 1.6; margin-bottom: 16px; flex: 1; }
.product-specs { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-bottom: 16px; }
.product-specs div { font-size: 12px; color: var(--text-muted); display: flex; align-items: center; gap: 6px; }
.product-specs i { color: var(--primary); font-size: 11px; }
.product-footer { display: flex; align-items: center; justify-content: space-between; padding-top: 16px; border-top: 1px solid var(--border); }
.product-price { font-size: 13px; font-weight: 600; color: var(--text-muted); }

/* ═══ Why Cards ═══ */
.why-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.why-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: 16px; padding: 32px; text-align: center; transition: all 0.2s; }
.why-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.why-icon { width: 56px; height: 56px; border-radius: 14px; background: var(--primary-light); display: flex; align-items: center; justify-content: center; margin: 0 auto 16px; font-size: 22px; color: var(--primary); }
.why-card h3 { font-size: 17px; font-weight: 700; color: var(--text-h); margin-bottom: 10px; }
.why-card p { font-size: 14px; color: var(--text); line-height: 1.6; }

/* ═══ CTA ═══ */
.cta-section { background: linear-gradient(135deg, #059669, #10b981, #0d9488); padding: 80px 0; }
.cta-inner { display: flex; align-items: center; justify-content: space-between; gap: 40px; }
.cta-inner h2 { font-size: 32px; font-weight: 800; color: #fff; margin-bottom: 8px; }
.cta-inner p { font-size: 16px; color: rgba(255,255,255,0.85); max-width: 480px; }

/* ═══ Contact ═══ */
.contact-grid { display: grid; grid-template-columns: 1fr 1.5fr; gap: 40px; }
.contact-info { display: flex; flex-direction: column; gap: 24px; }
.contact-item { display: flex; align-items: flex-start; gap: 14px; }
.contact-item i { width: 42px; height: 42px; border-radius: 10px; background: var(--primary-light); color: var(--primary); display: flex; align-items: center; justify-content: center; font-size: 16px; flex-shrink: 0; }
.contact-item h4 { font-size: 14px; font-weight: 600; color: var(--text-h); }
.contact-item p { font-size: 14px; color: var(--text); }
.contact-socials { display: flex; gap: 10px; margin-top: 8px; }
.contact-socials a { width: 42px; height: 42px; border-radius: 10px; background: var(--bg-alt); border: 1px solid var(--border); display: flex; align-items: center; justify-content: center; color: var(--text); font-size: 18px; transition: all 0.2s; }
.contact-socials a:hover { background: var(--primary); color: #fff; border-color: var(--primary); }

.contact-form { display: flex; flex-direction: column; gap: 12px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.contact-form input, .contact-form select, .contact-form textarea {
  padding: 14px 16px; background: var(--bg-card); border: 1px solid var(--border); border-radius: 10px;
  color: var(--text-h); font-size: 14px; font-family: inherit; outline: none; transition: border-color 0.2s; resize: vertical;
}
.contact-form input:focus, .contact-form select:focus, .contact-form textarea:focus { border-color: var(--primary); }
.contact-form input::placeholder, .contact-form textarea::placeholder { color: var(--text-muted); }

/* ═══ Footer ═══ */
.footer { background: var(--bg-alt); border-top: 1px solid var(--border); padding: 60px 0 24px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px; margin-bottom: 40px; }
.footer-logo { font-size: 20px; color: var(--text-h); margin-bottom: 12px; display: flex; align-items: center; gap: 8px; }
.footer-logo i { color: var(--primary); }
.footer-logo strong { color: var(--primary); }
.footer-about p { font-size: 14px; color: var(--text); line-height: 1.7; }
.footer-grid h4 { font-size: 14px; font-weight: 700; color: var(--text-h); margin-bottom: 14px; }
.footer-grid a { display: block; font-size: 13px; color: var(--text); padding: 4px 0; transition: color 0.2s; }
.footer-grid a:hover { color: var(--primary); }
.footer-bottom { border-top: 1px solid var(--border); padding-top: 20px; text-align: center; font-size: 13px; color: var(--text-muted); }

/* ═══ Responsive ═══ */
@media (max-width: 1024px) {
  .hero-inner { grid-template-columns: 1fr; text-align: center; }
  .hero p { margin: 0 auto 32px; }
  .hero-actions { justify-content: center; }
  .hero-stats { justify-content: center; }
  .hero-visual { display: none; }
  .brands-grid, .products-grid, .why-grid { grid-template-columns: repeat(2, 1fr); }
  .contact-grid { grid-template-columns: 1fr; }
  .cta-inner { flex-direction: column; text-align: center; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  .nav-links { display: none; position: fixed; top: 68px; left: 0; right: 0; background: var(--bg-nav); backdrop-filter: blur(12px); flex-direction: column; padding: 24px; gap: 20px; border-bottom: 1px solid var(--border); }
  .nav-links.open { display: flex; }
  .nav-hamburger { display: block; }
  .hero h1 { font-size: 32px; }
  .hero-stats { gap: 20px; }
  .hero-stat-num { font-size: 22px; }
  .section { padding: 64px 0; }
  .section-header h2 { font-size: 28px; }
  .brands-grid, .products-grid, .why-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 24px; }
}
