/* =========================================================
   Grace of God Solar System — main stylesheet
   Mobile-first. Brand: green + white/light backgrounds + dark text.
   ========================================================= */

:root {
  --green-900: #0f2f1d;
  --green-800: #14532d;
  --green-700: #166534;
  --green-600: #15803d;
  --green-500: #16a34a;
  --green-400: #22c55e;
  --green-100: #dcfce7;
  --green-50: #eafcf1;
  --yellow: #facc15;

  --text-dark: #172018;
  --text-muted: #52685b;
  --bg-light: #ffffff;
  --bg-alt: var(--green-50);
  --border: #e1efe4;
  --surface: #ffffff;
  --tint-1: var(--green-50);
  color-scheme: light;

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;
  --radius-pill: 999px;

  --space-1: 0.5rem;
  --space-2: 1rem;
  --space-3: 1.5rem;
  --space-4: 2rem;
  --space-5: 3rem;
  --space-6: 4.5rem;

  --shadow-sm: 0 2px 8px rgba(15, 47, 29, 0.06);
  --shadow-md: 0 8px 24px rgba(15, 47, 29, 0.1);
  --shadow-lg: 0 16px 40px rgba(15, 47, 29, 0.14);

  --max-width: 1200px;
  --header-h: 72px;
}

/* -------- Reset -------- */
* , *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Segoe UI", system-ui, -apple-system, Roboto, Helvetica, Arial, sans-serif;
  color: var(--text-dark);
  background: var(--bg-light);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; margin: 0; padding: 0; }
h1, h2, h3, h4, p { margin: 0 0 var(--space-2); }
button { font: inherit; cursor: pointer; }
input, textarea { font: inherit; }

.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-3);
}

.section {
  padding: var(--space-6) 0;
}
.section--alt { background: var(--bg-alt); }

.section-head {
  max-width: 640px;
  margin: 0 auto var(--space-5);
  text-align: center;
}
.eyebrow {
  display: inline-block;
  color: var(--green-600);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-size: 0.8rem;
  margin-bottom: var(--space-1);
}
h1 { font-size: clamp(2rem, 5vw, 3rem); line-height: 1.15; font-weight: 800; }
h2 { font-size: clamp(1.5rem, 3.5vw, 2.1rem); font-weight: 800; }
h3 { font-size: 1.25rem; font-weight: 700; }
.lead { font-size: 1.1rem; color: var(--text-muted); }
.muted { color: var(--text-muted); }

/* -------- Buttons -------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.85rem 1.6rem;
  border-radius: var(--radius-pill);
  font-weight: 700;
  font-size: 0.98rem;
  border: 2px solid transparent;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, color 0.15s ease;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }

.btn--primary { background: var(--green-600); color: #fff; box-shadow: var(--shadow-sm); }
.btn--primary:hover { background: var(--green-700); box-shadow: var(--shadow-md); }

.btn--whatsapp { background: #25d366; color: #fff; box-shadow: var(--shadow-sm); }
.btn--whatsapp:hover { background: #1ebe57; box-shadow: var(--shadow-md); }

.btn--outline { background: transparent; color: var(--green-700); border-color: var(--green-600); }
.btn--outline:hover { background: var(--tint-1); }

.btn--light { background: #fff; color: var(--green-700); }
.btn--light:hover { background: var(--green-50); }

.btn--sm { padding: 0.55rem 1.1rem; font-size: 0.88rem; }
.btn--block { width: 100%; }

/* -------- Header -------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-h);
  gap: var(--space-2);
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 800;
  font-size: 1.05rem;
  color: var(--green-800);
  flex-shrink: 0;
}
.brand__mark {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: var(--green-600);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1.2rem;
}
.brand__text-full { display: none; }

.nav {
  position: fixed;
  inset: var(--header-h) 0 0 0;
  background: var(--surface);
  transform: translateX(100%);
  transition: transform 0.25s ease;
  overflow-y: auto;
  padding: var(--space-3);
  border-top: 1px solid var(--border);
}
.nav.is-open { transform: translateX(0); }
.nav__list {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.nav__list a {
  display: block;
  padding: 0.9rem 0.5rem;
  font-weight: 600;
  color: var(--text-dark);
  border-bottom: 1px solid var(--border);
}
.nav__list a.is-active { color: var(--green-700); }
.nav__cta { margin-top: var(--space-3); }

.header-actions { display: flex; align-items: center; gap: 0.6rem; }
.header-actions .btn--whatsapp span.long { display: none; }

.theme-toggle {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  border: none;
  background: var(--tint-1);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  line-height: 1;
  transition: transform 0.15s ease;
}
.theme-toggle:hover { transform: translateY(-2px); }

.hamburger {
  width: 44px;
  height: 44px;
  border: none;
  background: var(--tint-1);
  border-radius: var(--radius-sm);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
}
.hamburger span {
  width: 20px;
  height: 2px;
  background: var(--text-dark);
  border-radius: 2px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.hamburger.is-active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.is-active span:nth-child(2) { opacity: 0; }
.hamburger.is-active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* -------- Hero -------- */
.hero {
  padding: var(--space-5) 0 var(--space-6);
  background: linear-gradient(180deg, var(--tint-1) 0%, var(--bg-light) 100%);
}
.hero__inner {
  display: grid;
  gap: var(--space-4);
  align-items: center;
}
.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--green-100);
  color: var(--green-800);
  font-weight: 700;
  font-size: 0.8rem;
  padding: 0.4rem 0.9rem;
  border-radius: var(--radius-pill);
  margin-bottom: var(--space-2);
}
.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-top: var(--space-3);
}
.hero__image { border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-lg); }
.hero__stats {
  display: flex;
  gap: var(--space-4);
  margin-top: var(--space-4);
  flex-wrap: wrap;
}
.hero__stats strong { display: block; font-size: 1.4rem; color: var(--green-700); }
.hero__stats span { font-size: 0.85rem; color: var(--text-muted); }

/* -------- Cards / grids -------- */
.grid {
  display: grid;
  gap: var(--space-3);
  grid-template-columns: 1fr;
}
.grid--2 { grid-template-columns: 1fr; }
.grid--3 { grid-template-columns: 1fr; }
.grid--4 { grid-template-columns: 1fr; }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--space-3);
  box-shadow: var(--shadow-sm);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.card__icon {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-sm);
  background: var(--tint-1);
  color: var(--green-700);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  margin-bottom: var(--space-2);
}

.category-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.6rem;
  padding: var(--space-3) var(--space-2);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}
.category-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: var(--green-400); }
.category-card img { width: 56px; height: 56px; object-fit: contain; }
.category-card span { font-weight: 700; font-size: 0.92rem; }

/* -------- Why choose us -------- */
.feature {
  display: flex;
  gap: var(--space-2);
  align-items: flex-start;
}
.feature__icon {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--green-600);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
}
.feature h3 { margin-bottom: 0.25rem; font-size: 1.05rem; }
.feature p { margin: 0; color: var(--text-muted); font-size: 0.95rem; }

/* -------- CTA band -------- */
.cta-band {
  background: var(--green-700);
  color: #fff;
  border-radius: var(--radius-lg);
  padding: var(--space-5) var(--space-3);
  text-align: center;
}
.cta-band h2 { color: #fff; }
.cta-band p { color: var(--green-50); }
.cta-band__actions {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-top: var(--space-3);
}

/* -------- Footer -------- */
.site-footer {
  background: var(--green-900);
  color: #cfe6d7;
  padding: var(--space-5) 0 var(--space-3);
}
.footer-grid {
  display: grid;
  gap: var(--space-4);
  grid-template-columns: 1fr;
  padding-bottom: var(--space-4);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.footer-grid h4 {
  color: #fff;
  font-size: 1rem;
  margin-bottom: var(--space-2);
}
.footer-brand { display: flex; align-items: center; gap: 0.6rem; margin-bottom: var(--space-2); }
.footer-brand strong { color: #fff; font-size: 1.05rem; }
.footer-grid a, .footer-grid li { color: #cfe6d7; font-size: 0.95rem; }
.footer-grid ul li { margin-bottom: 0.5rem; }
.footer-grid ul a:hover { color: #fff; }
.footer-social { display: flex; gap: 0.6rem; margin-top: var(--space-2); }
.footer-social a {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
}
.footer-social a:hover { background: var(--green-600); }
.footer-bottom {
  padding-top: var(--space-3);
  font-size: 0.85rem;
  color: #9fc4ad;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem;
}

/* -------- Floating WhatsApp button -------- */
.wa-float {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 200;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: #25d366;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-lg);
  font-size: 1.6rem;
  transition: transform 0.15s ease;
}
.wa-float:hover { transform: scale(1.08); }

/* -------- Products page -------- */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: var(--space-4);
}
.filter-btn {
  border: 2px solid var(--border);
  background: var(--surface);
  color: var(--text-dark);
  padding: 0.5rem 1.1rem;
  border-radius: var(--radius-pill);
  font-weight: 600;
  font-size: 0.9rem;
  transition: all 0.15s ease;
}
.filter-btn:hover { border-color: var(--green-400); }
.filter-btn.is-active { background: var(--green-600); border-color: var(--green-600); color: #fff; }

.product-grid {
  display: grid;
  gap: var(--space-3);
  grid-template-columns: 1fr;
}
.product-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.product-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.product-card__image { aspect-ratio: 4 / 3; background: var(--tint-1); }
.product-card__image img { width: 100%; height: 100%; object-fit: contain; padding: 1rem; }
.product-card__body { padding: var(--space-2) var(--space-3) var(--space-3); display: flex; flex-direction: column; gap: 0.4rem; flex: 1; }
.product-card__category { font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; color: var(--green-600); }
.product-card__name { font-size: 1.05rem; font-weight: 700; margin: 0; }
.product-card__desc { color: var(--text-muted); font-size: 0.92rem; margin: 0; flex: 1; }
.product-card__price { font-weight: 800; color: var(--green-700); }
.product-card__footer { margin-top: 0.4rem; }

.empty-state {
  text-align: center;
  color: var(--text-muted);
  padding: var(--space-5) 0;
}

.appliance-list-card {
  grid-column: 1 / -1;
}
.appliance-list {
  column-width: 220px;
  column-gap: var(--space-4);
  margin: var(--space-2) 0 var(--space-3);
  padding: 0;
}
.appliance-list li {
  list-style: none;
  break-inside: avoid;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.95rem;
}
.appliance-list li::before {
  content: "✓";
  color: var(--green-600);
  font-weight: 800;
  margin-right: 0.5rem;
}

/* Product detail */
.breadcrumb { font-size: 0.9rem; color: var(--text-muted); margin-bottom: var(--space-3); }
.breadcrumb a { color: var(--green-700); font-weight: 600; }

.product-detail {
  display: grid;
  gap: var(--space-4);
  grid-template-columns: 1fr;
}
.product-detail__image {
  background: var(--tint-1);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-4);
}
.product-detail__category {
  display: inline-block;
  background: var(--green-100);
  color: var(--green-800);
  font-weight: 700;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.3rem 0.8rem;
  border-radius: var(--radius-pill);
  margin-bottom: var(--space-2);
}
.product-detail__price {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--green-700);
  margin: var(--space-2) 0;
}
.spec-list {
  margin: var(--space-2) 0 var(--space-3);
  border-top: 1px solid var(--border);
}
.spec-list li {
  padding: 0.65rem 0;
  border-bottom: 1px solid var(--border);
  display: flex;
  gap: 0.5rem;
  font-size: 0.95rem;
}
.spec-list li::before { content: "✓"; color: var(--green-600); font-weight: 800; }
.product-detail__actions { display: flex; flex-wrap: wrap; gap: 0.8rem; }

/* -------- Services page -------- */
.service-card p { color: var(--text-muted); font-size: 0.95rem; }
.service-card .btn { margin-top: var(--space-2); }

/* -------- Contact page -------- */
.contact-grid {
  display: grid;
  gap: var(--space-4);
  grid-template-columns: 1fr;
}
.contact-info-card {
  display: flex;
  gap: var(--space-2);
  align-items: flex-start;
  padding: var(--space-2) 0;
  border-bottom: 1px solid var(--border);
}
.contact-info-card:last-child { border-bottom: none; }
.contact-info-card > div:not(.feature__icon) { flex: 1; min-width: 0; }
.contact-form { display: flex; flex-direction: column; gap: var(--space-2); }
.form-group { display: flex; flex-direction: column; gap: 0.4rem; }
.form-group label { font-weight: 600; font-size: 0.92rem; }
.form-group input, .form-group textarea {
  padding: 0.75rem 0.9rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-alt);
}
.form-group input:focus, .form-group textarea:focus {
  outline: none;
  border-color: var(--green-500);
  background: var(--surface);
}
.map-embed {
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border);
  aspect-ratio: 16/10;
}
.map-embed iframe { width: 100%; height: 100%; border: 0; }
.hours-list { display: flex; flex-direction: column; gap: 0.4rem; }
.hours-list div { display: flex; justify-content: space-between; padding: 0.4rem 0; border-bottom: 1px dashed var(--border); font-size: 0.95rem; }

/* -------- About page -------- */
.about-hero {
  display: grid;
  gap: var(--space-4);
  grid-template-columns: 1fr;
  align-items: center;
}
.commitment-list { display: flex; flex-direction: column; gap: var(--space-3); }

/* -------- Utility -------- */
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }

/* =========================================================
   Breakpoints
   ========================================================= */
@media (min-width: 640px) {
  .grid--2 { grid-template-columns: repeat(2, 1fr); }
  .grid--3 { grid-template-columns: repeat(2, 1fr); }
  .grid--4 { grid-template-columns: repeat(3, 1fr); }
  .product-grid { grid-template-columns: repeat(2, 1fr); }
  .hero__actions { flex-wrap: nowrap; }
}

@media (min-width: 860px) {
  .brand__text-full { display: inline; }
  .hamburger { display: none; }
  .nav {
    position: static;
    inset: auto;
    transform: none;
    background: transparent;
    border-top: none;
    padding: 0;
    overflow: visible;
  }
  .nav__list { flex-direction: row; align-items: center; gap: var(--space-3); }
  .nav__list a { border-bottom: none; padding: 0.4rem 0.1rem; position: relative; }
  .nav__list a.is-active { color: var(--green-700); }
  .nav__list a.is-active::after {
    content: "";
    position: absolute;
    left: 0; right: 0; bottom: -4px;
    height: 2px;
    background: var(--green-600);
  }
  .nav__cta { display: none; }
  .header-actions .btn--whatsapp span.long { display: inline; }

  .hero__inner { grid-template-columns: 1.1fr 0.9fr; }
  .about-hero { grid-template-columns: 1fr 1fr; }
  .grid--3 { grid-template-columns: repeat(3, 1fr); }
  .grid--4 { grid-template-columns: repeat(4, 1fr); }
  .product-grid { grid-template-columns: repeat(3, 1fr); }
  .footer-grid { grid-template-columns: 2fr 1fr 1fr 1.3fr; }
  .product-detail { grid-template-columns: 0.9fr 1.1fr; }
  .contact-grid { grid-template-columns: 1fr 1fr; }
}

@media (min-width: 1100px) {
  .product-grid { grid-template-columns: repeat(4, 1fr); }
}

/* =========================================================
   Dark mode
   Toggled via [data-theme="dark"] on <html> (js/main.js).
   Only redefines neutral surfaces/text; brand greens used as
   solid button fills stay the same across both themes.
   ========================================================= */
[data-theme="dark"] {
  --bg-light: #0c1512;
  --bg-alt: #101c15;
  --surface: #142219;
  --tint-1: #1a2e20;
  --text-dark: #eaf4ee;
  --text-muted: #9db7a8;
  --border: #24392c;
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.35);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.45);
  --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.55);
  color-scheme: dark;
}

/* Green text/icons that sat directly on a now-dark background need a
   brighter shade to stay legible; solid button fills are untouched. */
[data-theme="dark"] .brand,
[data-theme="dark"] .eyebrow,
[data-theme="dark"] .btn--outline,
[data-theme="dark"] .card__icon,
[data-theme="dark"] .hero__stats strong,
[data-theme="dark"] .product-card__category,
[data-theme="dark"] .product-card__price,
[data-theme="dark"] .product-detail__price,
[data-theme="dark"] .breadcrumb a,
[data-theme="dark"] .nav__list a.is-active,
[data-theme="dark"] .spec-list li::before,
[data-theme="dark"] .appliance-list li::before {
  color: var(--green-400);
}
[data-theme="dark"] .btn--outline { border-color: var(--green-500); }
[data-theme="dark"] .nav__list a.is-active::after { background: var(--green-400); }
[data-theme="dark"] .theme-toggle { background: var(--tint-1); }
