/* ============================================================
   Socket Solar – Main Stylesheet
   Modern "Web 3.0" style: clean, dark-capable, glassmorphism
   ============================================================ */

/* ── CSS Variables ────────────────────────────────────────── */
:root {
  --bg:          #0f1117;
  --bg-card:     rgba(255,255,255,0.04);
  --bg-card-h:   rgba(255,255,255,0.08);
  --border:      rgba(255,255,255,0.10);
  --accent:      #f59e0b;       /* amber – solar energy */
  --accent-2:    #10b981;       /* emerald – eco/green */
  --text:        #e2e8f0;
  --text-muted:  #64748b;
  --text-dark:   #94a3b8;
  --radius:      12px;
  --radius-sm:   6px;
  --shadow:      0 4px 32px rgba(0,0,0,0.4);
  --font:        'Inter', system-ui, -apple-system, sans-serif;
  --transition:  0.2s ease;
}

/* Light mode */
@media (prefers-color-scheme: light) {
  :root {
    --bg:         #f8fafc;
    --bg-card:    #ffffff;
    --bg-card-h:  #f1f5f9;
    --border:     rgba(0,0,0,0.08);
    --text:       #0f172a;
    --text-muted: #64748b;
    --text-dark:  #475569;
    --shadow:     0 4px 32px rgba(0,0,0,0.08);
  }
}

/* ── Reset ────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; }

/* ── Layout ───────────────────────────────────────────────── */
.container { max-width: 1400px; margin: 0 auto; padding: 0 1.5rem; }

/* ── Navigation ───────────────────────────────────────────── */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(15,17,23,0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}
@media (prefers-color-scheme: light) {
  .site-nav { background: rgba(248,250,252,0.90); }
}
.nav-inner {
  display: flex;
  align-items: center;
  gap: 2rem;
  padding: 1rem 1.5rem;
  max-width: 1400px;
  margin: 0 auto;
}
.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
}
.nav-logo svg { color: var(--accent); }
.nav-links { display: flex; gap: 1.5rem; list-style: none; margin-left: auto; }
.nav-links a {
  color: var(--text-dark);
  font-size: 0.9rem;
  font-weight: 500;
  transition: color var(--transition);
}
.nav-links a:hover, .nav-links a.active { color: var(--text); text-decoration: none; }

/* ── Hero ─────────────────────────────────────────────────── */
.hero {
  padding: 4rem 0 3rem;
  text-align: center;
  background: radial-gradient(ellipse 80% 50% at 50% -10%,
              rgba(245,158,11,0.15), transparent 70%);
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(245,158,11,0.12);
  border: 1px solid rgba(245,158,11,0.3);
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.3rem 0.9rem;
  border-radius: 999px;
  margin-bottom: 1.25rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}
.hero h1 {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 1rem;
  letter-spacing: -0.02em;
}
.hero h1 span { color: var(--accent); }
.hero p {
  max-width: 600px;
  margin: 0 auto 2rem;
  color: var(--text-dark);
  font-size: 1.1rem;
}
.hero-stats {
  display: flex;
  justify-content: center;
  gap: 3rem;
  flex-wrap: wrap;
}
.stat-item { text-align: center; }
.stat-num  { font-size: 1.8rem; font-weight: 800; color: var(--accent); line-height: 1; }
.stat-label{ font-size: 0.8rem; color: var(--text-muted); margin-top: 0.25rem; }

/* ── Filter Panel ─────────────────────────────────────────── */
.filter-section { padding: 2rem 0; }
.filter-bar {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: flex-end;
}
.filter-group { display: flex; flex-direction: column; gap: 0.4rem; min-width: 160px; flex: 1; }
.filter-group label { font-size: 0.75rem; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; }
.filter-group input,
.filter-group select {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  padding: 0.55rem 0.75rem;
  font-size: 0.9rem;
  font-family: var(--font);
  outline: none;
  transition: border-color var(--transition);
  width: 100%;
}
.filter-group input:focus,
.filter-group select:focus { border-color: var(--accent); }

.filter-actions { display: flex; gap: 0.75rem; align-items: flex-end; }
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.6rem 1.2rem;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all var(--transition);
  font-family: var(--font);
  white-space: nowrap;
}
.btn-primary { background: var(--accent); color: #000; }
.btn-primary:hover { background: #d97706; }
.btn-ghost {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-dark);
}
.btn-ghost:hover { background: var(--bg-card-h); color: var(--text); }

.filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  background: rgba(245,158,11,0.1);
  border: 1px solid rgba(245,158,11,0.3);
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  cursor: pointer;
}
.chip:hover { background: rgba(245,158,11,0.2); }
.chip .remove { opacity: 0.7; }

/* ── Results bar ──────────────────────────────────────────── */
.results-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 0 0.5rem;
  flex-wrap: wrap;
  gap: 0.75rem;
}
.results-count { color: var(--text-muted); font-size: 0.9rem; }
.results-count strong { color: var(--text); }
.sort-bar { display: flex; align-items: center; gap: 0.75rem; }
.sort-bar label { font-size: 0.85rem; color: var(--text-muted); }
.sort-bar select {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  padding: 0.4rem 0.75rem;
  font-size: 0.85rem;
  font-family: var(--font);
  outline: none;
  cursor: pointer;
}
.view-toggle { display: flex; gap: 0.3rem; }
.view-btn {
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-muted);
  padding: 0.4rem 0.6rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition);
}
.view-btn.active { background: var(--accent); border-color: var(--accent); color: #000; }

/* ── Product Table ────────────────────────────────────────── */
.table-wrap {
  overflow-x: auto;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  margin-bottom: 2rem;
}
.product-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
  min-width: 900px;
}
.product-table thead {
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 64px;
  z-index: 10;
}
.product-table th {
  padding: 0.9rem 1rem;
  text-align: left;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
}
.product-table th:hover { color: var(--text); }
.product-table th.sorted-asc::after  { content: ' ↑'; color: var(--accent); }
.product-table th.sorted-desc::after { content: ' ↓'; color: var(--accent); }

.product-table td {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
.product-table tr:last-child td { border-bottom: none; }
.product-table tbody tr { transition: background var(--transition); }
.product-table tbody tr:hover { background: var(--bg-card-h); }

.product-thumb {
  width: 100px;
  height: 100px;
  max-width: none;
  object-fit: contain;
  border-radius: var(--radius-sm);
  background: rgba(255,255,255,0.05);
}
.product-name { font-weight: 600; color: var(--text); }
.product-name small { display: block; font-weight: 400; color: var(--text-muted); font-size: 0.78rem; }
.product-brand { color: var(--text-muted); font-size: 0.82rem; }

.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.badge-panel    { background: rgba(16,185,129,0.15); color: #10b981; }
.badge-station  { background: rgba(59,130,246,0.15); color: #60a5fa; }
.badge-gen      { background: rgba(245,158,11,0.15); color: #f59e0b; }
.badge-battery  { background: rgba(168,85,247,0.15); color: #c084fc; }
.badge-acc      { background: rgba(100,116,139,0.15); color: #94a3b8; }

.spec-num { font-weight: 700; }
.spec-unit { font-size: 0.75rem; color: var(--text-muted); margin-left: 1px; }
.na { color: var(--text-muted); font-size: 0.8rem; }

.icon-check { color: var(--accent-2); }
.icon-cross { color: var(--text-muted); opacity: 0.4; }

.star-rating { display: flex; align-items: center; gap: 0.3rem; }
.stars { color: var(--accent); font-size: 0.85rem; }
.rating-num { font-size: 0.8rem; color: var(--text-muted); }

.price-cell { font-weight: 700; font-size: 1rem; white-space: nowrap; }
.price-na   { color: var(--text-muted); font-size: 0.8rem; }

.btn-amazon {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  background: var(--accent);
  color: #000;
  padding: 0.35rem 0.8rem;
  border-radius: var(--radius-sm);
  font-size: 0.78rem;
  font-weight: 700;
  white-space: nowrap;
  text-decoration: none;
  transition: background var(--transition);
}
.btn-amazon:hover { background: #d97706; text-decoration: none; }

/* ── Grid view ────────────────────────────────────────────── */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
  margin-bottom: 2rem;
}
.product-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  transition: all var(--transition);
}
.product-card:hover {
  border-color: rgba(245,158,11,0.4);
  background: var(--bg-card-h);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}
.card-header { display: flex; flex-direction: column; gap: 0.3rem; }
.card-img {
  width: 100%;
  height: 180px;
  max-width: none;
  object-fit: contain;
  background: rgba(255,255,255,0.05);
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  display: block;
  margin-bottom: 0.6rem;
}
.card-title { font-weight: 700; font-size: 0.95rem; line-height: 1.3; }
.card-brand { font-size: 0.8rem; color: var(--text-muted); margin-top: 0.2rem; }
.card-specs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
}
.card-spec { font-size: 0.82rem; }
.card-spec-label { color: var(--text-muted); font-size: 0.72rem; display: block; }
.card-spec-val   { font-weight: 700; }
.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
}
.card-price { font-size: 1.2rem; font-weight: 800; }

/* ── Hidden class ─────────────────────────────────────────── */
.hidden { display: none !important; }

/* ── News Section ─────────────────────────────────────────── */
.news-section { padding: 3rem 0; }
.section-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  gap: 1rem;
  flex-wrap: wrap;
}
.section-title {
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.section-title span { color: var(--accent); }
.section-more { font-size: 0.85rem; color: var(--text-muted); }

.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.25rem;
}
.news-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: all var(--transition);
}
.news-card:hover {
  border-color: rgba(245,158,11,0.3);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}
.news-thumb {
  width: 100%;
  height: 180px;
  object-fit: cover;
  background: var(--bg-card-h);
}
.news-thumb-placeholder {
  width: 100%;
  height: 180px;
  background: linear-gradient(135deg, rgba(245,158,11,0.1), rgba(16,185,129,0.1));
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
}
.news-body { padding: 1.25rem; flex: 1; display: flex; flex-direction: column; gap: 0.6rem; }
.news-meta { display: flex; align-items: center; gap: 0.75rem; flex-wrap: wrap; }
.news-source {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--accent-2);
}
.news-date { font-size: 0.75rem; color: var(--text-muted); }
.news-title {
  font-weight: 700;
  font-size: 1rem;
  line-height: 1.35;
  color: var(--text);
}
.news-title a:hover { color: var(--accent); text-decoration: none; }
.news-summary { font-size: 0.87rem; color: var(--text-dark); line-height: 1.55; flex: 1; }
.news-link {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--accent);
  margin-top: 0.5rem;
}
.news-link:hover { text-decoration: none; opacity: 0.8; }

/* ── Loading state ────────────────────────────────────────── */
.loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 4rem;
  gap: 1rem;
  color: var(--text-muted);
}
.spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Empty state ──────────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 4rem 2rem;
  color: var(--text-muted);
}
.empty-icon { font-size: 3rem; margin-bottom: 1rem; }
.empty-state h3 { color: var(--text); margin-bottom: 0.5rem; }

/* ── Footer ───────────────────────────────────────────────── */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 3rem 0;
  margin-top: 4rem;
}
.footer-inner {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 2rem;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 1.5rem;
}
.footer-brand p { font-size: 0.85rem; color: var(--text-muted); margin-top: 0.5rem; max-width: 280px; }
.footer-col h4 { font-size: 0.8rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-muted); margin-bottom: 1rem; }
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 0.5rem; }
.footer-col ul a { font-size: 0.85rem; color: var(--text-muted); }
.footer-col ul a:hover { color: var(--text); text-decoration: none; }
.footer-bottom {
  max-width: 1400px;
  margin: 2rem auto 0;
  padding: 1.5rem 1.5rem 0;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.footer-bottom p { font-size: 0.78rem; color: var(--text-muted); }
.affiliate-notice {
  background: rgba(245,158,11,0.06);
  border: 1px solid rgba(245,158,11,0.15);
  border-radius: var(--radius-sm);
  padding: 0.6rem 1rem;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 2rem;
  text-align: center;
  max-width: 1400px;
  margin-left: auto;
  margin-right: auto;
}

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 900px) {
  .footer-inner { grid-template-columns: 1fr 1fr; }
  .filter-group { min-width: 140px; }
}
@media (max-width: 600px) {
  .hero { padding: 2.5rem 0 2rem; }
  .hero-stats { gap: 1.5rem; }
  .footer-inner { grid-template-columns: 1fr; }
  .nav-links { display: none; }
  .results-bar { flex-direction: column; align-items: flex-start; }
}
