:root {
  --bg: #0b0f14;
  --card: #10151c;
  --text: #e8eef6;
  --muted: #a6b0c2;
  --brand: #2fbf71;
  --brand-600: #27a55f;
  --accent: #ffd166;
  --border: rgba(255, 255, 255, 0.06);
  --border-strong: rgba(255, 255, 255, 0.14);
  --border-hover: rgba(255, 255, 255, 0.28);
}

/* Light theme variables */
:root.light {
  --bg: #f7fafc;
  --card: #ffffff;
  --text: #10151c;
  --muted: #566073;
  --brand: #2fbf71;
  --brand-600: #249a53;
  --accent: #cc8b00;
  --border: rgba(0, 0, 0, 0.06);
  --border-strong: rgba(0, 0, 0, 0.12);
  --border-hover: rgba(0, 0, 0, 0.28);
}

* {
  box-sizing: border-box;
}
html,
body {
  height: 100%;
}
body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial,
    "Noto Sans", "Liberation Sans", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

img {
  max-width: 100%;
  display: block;
}
.container {
  width: min(1120px, 92%);
  margin: 0 auto;
}
.section {
  padding: 80px 0;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: saturate(1.1) blur(10px);
  background: rgba(11, 15, 20, 0.6);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
  gap: 16px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
}
.logo {
  width: 28px;
  height: 28px;
  filter: drop-shadow(0 2px 8px rgba(47, 191, 113, 0.35));
}
.nav {
  display: flex;
  gap: 18px;
  align-items: center;
}
.nav a {
  color: var(--text);
  text-decoration: none;
  opacity: 0.9;
}
.nav a:hover {
  opacity: 1;
}
.lang-switch {
  display: flex;
  gap: 8px;
}
.lang-switch button {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border-strong);
  padding: 6px 10px;
  border-radius: 8px;
  cursor: pointer;
}
.lang-switch button.active {
  border-color: var(--brand);
  color: #fff;
  background: rgba(47, 191, 113, 0.12);
}

.theme-switch {
  display: flex;
  gap: 8px;
}
.theme-switch button {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border-strong);
  padding: 6px 10px;
  border-radius: 8px;
  cursor: pointer;
}

.hero {
  position: relative;
  min-height: 78vh;
  display: flex;
  align-items: center;
}
.hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0.35;
}
.hero-content {
  position: relative;
  padding: 120px 0 80px;
}
.hero h1 {
  font-size: clamp(28px, 5vw, 48px);
  line-height: 1.1;
  margin: 0 0 12px;
}
.hero p {
  color: var(--muted);
  margin: 0 0 24px;
}

.grid-2 {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 32px;
  align-items: center;
}
.product-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 20px;
}
.feature-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-top: 16px;
}
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-top: 16px;
}

.product-card,
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
}
.product-card img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  object-position: center center;
}
.product-card h3 {
  margin: 12px 12px 4px;
}
.product-card p {
  margin: 0 12px 16px;
  color: var(--muted);
}

.rounded {
  border-radius: 12px;
}
.shadow {
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.25);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 10px;
  padding: 10px 14px;
  border: 1px solid var(--border-strong);
  color: var(--text);
  text-decoration: none;
  cursor: pointer;
  background: transparent;
}
.btn:hover {
  border-color: var(--border-hover);
}
.btn-primary {
  background: var(--brand);
  border-color: var(--brand-600);
  color: #04120a;
  font-weight: 700;
}
.btn-primary:hover {
  background: var(--brand-600);
}

.badge-row {
  display: flex;
  gap: 14px;
  align-items: center;
  justify-content: center;
}
.badge-row img {
  width: 64px;
  height: 64px;
  opacity: 0.8;
}

.feature {
  background: var(--card);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  padding: 14px;
}
.feature h3 {
  margin: 0 0 6px;
  font-size: 18px;
}
.feature p {
  margin: 0;
  color: var(--muted);
}

.form {
  display: grid;
  gap: 12px;
}
.field {
  display: grid;
  gap: 6px;
}
.field label {
  color: var(--muted);
  font-size: 14px;
}
.field input,
.field textarea {
  background: var(--card);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  padding: 10px 12px;
  color: var(--text);
}
.actions {
  margin-top: 6px;
}
.card {
  padding: 16px;
}
.button-row {
  display: flex;
  gap: 10px;
  margin-top: 10px;
}

.site-footer {
  border-top: 1px solid var(--border);
  padding: 20px 0;
  color: var(--muted);
}

/* Auto-detect system preference for initial variables if no override */
@media (prefers-color-scheme: light) {
  :root:not(.dark):not(.light) {
    --bg: #f7fafc;
    --card: #ffffff;
    --text: #10151c;
    --muted: #566073;
    --border: rgba(0, 0, 0, 0.06);
    --border-strong: rgba(0, 0, 0, 0.12);
    --border-hover: rgba(0, 0, 0, 0.28);
  }
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: center;
}

@media (max-width: 960px) {
  .grid-2 {
    grid-template-columns: 1fr;
  }
  .product-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .feature-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .gallery-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .nav {
    display: none;
  }
}
@media (max-width: 640px) {
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .product-card img {
    height: 180px;
  }
}
