:root {
  color-scheme: light;
  --accent: #0077b6;
  --dark: #03045e;
  --accent-2: #0096c7;
  --accent-light: #48cae4;
  --glow: #72efdd;
  --bg: #f8fbff;
  --surface: #ffffff;
  --surface-soft: #e8f5fb;
  --text: #0f172a;
  --muted: #64748b;
  --border: #d9eef5;
  --shadow: 0 18px 50px rgba(0, 119, 182, 0.10);
  --radius: 12px;
  --container: 1160px;
}

[data-theme="dark"] {
  color-scheme: dark;
  --bg: #020c1a;
  --surface: #061428;
  --surface-soft: #0a1e3a;
  --text: #e8f4fb;
  --muted: #94b8cc;
  --border: rgba(72, 202, 228, 0.15);
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.32);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: "Inter", system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

body.nav-open { overflow: hidden; }

img, svg { display: block; max-width: 100%; }

a { color: inherit; text-decoration: none; }

button, input, textarea, select { font: inherit; }

.container {
  width: min(100% - 32px, var(--container));
  margin-inline: auto;
}

.narrow { max-width: 760px; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(16px);
}

.nav-shell {
  width: min(100% - 24px, 1240px);
  min-height: 72px;
  margin-inline: auto;
  display: grid;
  grid-template-columns: auto auto 1fr;
  align-items: center;
  gap: 12px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
  color: var(--accent);
  font-size: 1.2rem;
}

[data-theme="dark"] .brand { color: #e8f4fb; }

.brand-mark {
  display: block;
  flex: 0 0 42px;
  width: 42px;
  height: 42px;
  min-width: 42px;
  max-width: 42px;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  object-position: center;
  border-radius: 12px;
}

.nav-panel {
  position: fixed;
  inset: 72px 0 auto 0;
  display: none;
  flex-direction: column;
  gap: 2px;
  padding: 16px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.nav-panel.is-open { display: flex; }

.nav-panel a {
  padding: 12px 10px;
  border-radius: 10px;
  color: var(--muted);
  font-weight: 700;
}

.nav-panel a.active,
.nav-panel a:hover {
  color: var(--accent);
  background: var(--surface-soft);
}

[data-theme="dark"] .nav-panel a.active,
[data-theme="dark"] .nav-panel a:hover { color: var(--accent-light); }

.nav-actions {
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 8px;
}

.lang-switch {
  display: flex;
  padding: 4px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface-soft);
  position: relative;
  overflow: visible;
  width: 50px;
  height: 37px;
  flex: 0 0 50px;
  z-index: 20;
  transform-origin: right center;
}

.lang-switch::before {
  content: "";
  position: absolute;
  inset: -1px -1px auto auto;
  width: 50px;
  height: 37px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface-soft);
  box-shadow: var(--shadow-soft);
  opacity: 0;
  transform-origin: right center;
  transition: width .22s ease, opacity .18s ease, background-color .2s ease, border-color .2s ease;
}

.lang-switch button,
.category-row button {
  border: 0;
  background: transparent;
  color: var(--muted);
  border-radius: 999px;
  cursor: pointer;
  font-weight: 800;
  transition: opacity .18s ease, transform .18s ease, width .22s ease, padding .22s ease, background-color .18s ease, color .18s ease;
}

.lang-switch button {
  position: absolute;
  top: 4px;
  right: 4px;
  z-index: 1;
  flex: 0 0 40px;
  width: 40px;
  padding: 6px 0;
  font-size: .78rem;
}

.lang-switch.is-open {
  border-color: transparent;
  background: transparent;
  z-index: 50;
}

.lang-switch.is-open::before {
  width: 176px;
  opacity: 1;
}

.lang-switch.is-open button:nth-of-type(1) { right: 130px; }
.lang-switch.is-open button:nth-of-type(2) { right: 88px; }
.lang-switch.is-open button:nth-of-type(3) { right: 46px; }
.lang-switch.is-open button:nth-of-type(4) { right: 4px; }

.lang-switch:not(.is-open) button.active {
  right: 4px;
}

.lang-switch:not(.is-open) button:not(.active) {
  opacity: 0;
  pointer-events: none;
  transform: translateX(-6px) scale(.92);
}

.lang-switch button.active,
.category-row button.active {
  background: var(--accent);
  color: white;
}

.icon-button {
  width: 42px;
  height: 42px;
  display: inline-grid;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
}

.icon-button svg { width: 20px; height: 20px; }

.cart-nav-link {
  position: relative;
}

.cart-count {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 18px;
  height: 18px;
  display: inline-grid;
  place-items: center;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--accent);
  color: white;
  font-size: .7rem;
  font-weight: 900;
  line-height: 1;
}

.hero,
.page-hero {
  position: relative;
  min-height: 620px;
  display: grid;
  align-items: end;
  padding: 120px 0 64px;
  color: white;
  background-size: cover;
  background-position: center;
  isolation: isolate;
}

.page-hero { min-height: 420px; }

.hero-overlay {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(90deg, rgba(3, 4, 94, .92), rgba(3, 4, 94, .52) 60%, rgba(3, 4, 94, .18)),
    linear-gradient(0deg, rgba(3, 4, 94, .55), transparent 42%);
}

.hero-home {
  background:
    radial-gradient(circle at 78% 36%, color-mix(in srgb, var(--accent-2) 24%, transparent), transparent 34%),
    linear-gradient(110deg, rgba(3, 4, 94, .96), rgba(3, 4, 94, .82) 48%, rgba(0, 119, 182, .42));
}
.hero-packages { background-image: url("https://images.unsplash.com/photo-1558618666-fcd25c85cd64?auto=format&fit=crop&w=1800&q=80"); }
.hero-cameras { background-image: url("https://images.unsplash.com/photo-1557324232-b8917d3c3dcb?auto=format&fit=crop&w=1800&q=80"); }
.hero-solar { background-image: url("https://images.unsplash.com/photo-1509391366360-2e959784a276?auto=format&fit=crop&w=1800&q=80"); }
.hero-about { background-image: url("https://images.unsplash.com/photo-1497366754035-f200968a6e72?auto=format&fit=crop&w=1800&q=80"); }
.hero-contact { background-image: url("https://images.unsplash.com/photo-1518005020951-eccb494ad742?auto=format&fit=crop&w=1800&q=80"); }
.hero-blog { background-image: url("https://images.unsplash.com/photo-1450101499163-c8848c66ca85?auto=format&fit=crop&w=1800&q=80"); }

.hero-content {
  max-width: 760px;
}

.hero-interactive .hero-content {
  max-width: 620px;
  min-width: 0;
}

.hero-game-layout {
  display: grid;
  align-items: center;
  gap: 26px;
  min-width: 0;
}

.hero-interactive {
  min-height: calc(100vh - 72px);
  padding: 58px 0 38px;
  overflow: hidden;
}

.hero-interactive h1 {
  max-width: 10.5em;
  margin: 8px 0 16px;
  font-size: clamp(2.75rem, 8.6vw, 4.7rem);
}

.hero-interactive .hero-content > p:not(.eyebrow) {
  max-width: 620px;
  font-size: clamp(1rem, 1.55vw, 1.18rem);
}

.hero-interactive .button-row {
  margin-top: 24px;
}

.home-game {
  width: min(100%, 720px);
  justify-self: center;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .24);
  border-radius: 18px;
  background: rgba(248, 251, 255, .12);
  box-shadow: 0 24px 80px rgba(0, 0, 0, .28);
  backdrop-filter: blur(18px);
}

.home-game-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
  color: white;
  background: linear-gradient(90deg, rgba(3, 4, 94, .74), rgba(0, 119, 182, .32));
  border-bottom: 1px solid rgba(255, 255, 255, .16);
}

.home-game-top strong {
  display: block;
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.05rem;
  line-height: 1.1;
}

.home-game .mini-game-kicker {
  color: var(--glow);
}

.home-game-stats {
  display: flex;
  gap: 8px;
  flex: 0 0 auto;
}

.home-game-stats span {
  min-width: 82px;
  padding: 8px 10px;
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 12px;
  background: rgba(255, 255, 255, .12);
  text-align: center;
}

.home-game-stats b {
  display: block;
  color: var(--glow);
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.15rem;
  line-height: 1;
}

.home-game-stats small {
  display: block;
  margin-top: 4px;
  color: rgba(255, 255, 255, .76);
  font-size: .68rem;
  line-height: 1.1;
}

.home-game-scene {
  position: relative;
  overflow: hidden;
  aspect-ratio: 1.34 / 1;
  background: var(--dark);
  isolation: isolate;
}

.home-game-scene img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.05) contrast(1.04);
}

.home-device {
  position: absolute;
  left: var(--x);
  top: var(--y);
  z-index: 5;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 2px solid rgba(255, 255, 255, .72);
  border-radius: 50%;
  background: rgba(3, 4, 94, .78);
  color: white;
  cursor: pointer;
  transform: translate(-50%, -50%);
  box-shadow: 0 0 0 0 rgba(72, 239, 221, .24), 0 10px 28px rgba(0, 0, 0, .26);
  transition: background .18s ease, color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.home-device.camera {
  overflow: visible;
}

.home-device:hover {
  transform: translate(-50%, -50%) scale(1.08);
}

.home-device svg {
  position: relative;
  z-index: 4;
  width: 18px;
  height: 18px;
}

.home-device.is-on {
  background: var(--glow);
  color: var(--dark);
  box-shadow: 0 0 0 10px rgba(72, 239, 221, .16), 0 10px 28px rgba(0, 0, 0, .24);
}

.home-device.solar {
  width: 48px;
  height: 48px;
  background: #ffd166;
  color: #1a2944;
  animation: solarPulse 2.4s ease-in-out infinite;
}

.home-device.camera .camera-cone {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 1;
  width: 186px;
  height: 130px;
  border-left: 2px solid rgba(114, 239, 221, .78);
  background:
    radial-gradient(circle at 0% 50%, rgba(114, 239, 221, .42), rgba(114, 239, 221, .18) 36%, transparent 74%),
    linear-gradient(90deg, rgba(114, 239, 221, .32), rgba(114, 239, 221, .03));
  clip-path: polygon(0 50%, 100% 4%, 100% 96%);
  transform: rotate(calc(var(--angle, 0deg) + var(--sweep, 0deg)));
  transform-origin: 0 50%;
  opacity: 0;
  transition: opacity .2s ease, transform .35s ease;
  pointer-events: none;
  mix-blend-mode: screen;
}

.home-device.camera.is-on .camera-cone {
  opacity: 1;
}

.home-device.light.is-on::after,
.home-device.sensor.is-on::after,
.home-device.lock.is-on::after {
  content: "";
  position: absolute;
  inset: -12px;
  border: 2px solid rgba(72, 239, 221, .28);
  border-radius: 50%;
  animation: deviceRipple 1.9s ease-out infinite;
}

.home-device.is-alert {
  animation: deviceAlert .72s ease-in-out;
}

.activity-dot {
  position: absolute;
  z-index: 4;
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255, 255, 255, .78);
  border-radius: 50%;
  background: var(--glow);
  box-shadow: 0 0 0 0 rgba(114, 239, 221, .34), 0 0 18px rgba(114, 239, 221, .5);
  animation: activityPulse 2.4s ease-out infinite;
}

.activity-dot::after {
  content: "";
  position: absolute;
  inset: 3px;
  border-radius: inherit;
  background: white;
}

.dot-door { left: 48.5%; top: 82%; animation-delay: .2s; }
.dot-window { left: 66%; top: 39%; animation-delay: .75s; }
.dot-driveway { left: 87%; top: 75%; animation-delay: 1.25s; }
.dot-garden { left: 23%; top: 27%; animation-delay: 1.7s; }


.home-game-controls {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 12px 14px 14px;
  color: rgba(255, 255, 255, .8);
  background: rgba(3, 4, 94, .7);
}

.home-game-controls span {
  font-size: .86rem;
  line-height: 1.3;
}

.home-game .mini-game-restart {
  background: var(--glow);
  color: var(--dark);
  border-color: transparent;
}

.home-game.is-low-energy .home-game-stats b {
  color: #ffd166;
}

@keyframes solarPulse {
  0%, 100% { box-shadow: 0 0 0 8px rgba(255, 209, 102, .16), 0 10px 28px rgba(0, 0, 0, .24); }
  50% { box-shadow: 0 0 0 16px rgba(255, 209, 102, .08), 0 10px 28px rgba(0, 0, 0, .24); }
}

@keyframes deviceRipple {
  0% { opacity: .75; transform: scale(.65); }
  100% { opacity: 0; transform: scale(1.55); }
}

@keyframes deviceAlert {
  0%, 100% { transform: translate(-50%, -50%) scale(1); }
  50% { transform: translate(-50%, -50%) scale(1.18); }
}

/* Danger state — color driven by CSS custom props set per sensor type */
.home-device.is-danger {
  background: var(--dc, #ef4444);
  color: white;
  border-color: rgba(255, 255, 255, .92);
  box-shadow: 0 0 0 8px var(--dg, rgba(239, 68, 68, .28)), 0 0 30px var(--dg, rgba(239, 68, 68, .55));
  animation: deviceDanger .52s ease-in-out infinite alternate;
  z-index: 6;
}

@keyframes deviceDanger {
  from { transform: translate(-50%, -50%) scale(1); }
  to   { transform: translate(-50%, -50%) scale(1.18); }
}

/* Countdown bar that shrinks over 5 s */
.countdown-bar {
  position: absolute;
  bottom: -7px; left: 0; right: 0;
  height: 3px; border-radius: 2px;
  background: var(--dc, #ef4444);
  transform-origin: left center;
  animation: countdownShrink 5s linear forwards;
  pointer-events: none; z-index: 8;
}

@keyframes countdownShrink {
  from { transform: scaleX(1); }
  to   { transform: scaleX(0); }
}

/* Scene toast: appears near the alerting device */
.scene-toast {
  position: absolute; z-index: 20;
  transform: translate(-50%, calc(-100% - 14px));
  background: rgba(0, 0, 0, .82);
  font-size: 11px; font-weight: 700;
  padding: 4px 10px; border-radius: 6px;
  border: 1px solid currentColor;
  pointer-events: none; white-space: nowrap;
  animation: toastIn .22s ease, toastOut .32s ease 2.08s forwards;
}

@keyframes toastIn {
  from { opacity: 0; transform: translate(-50%, calc(-100% - 22px)); }
  to   { opacity: 1; transform: translate(-50%, calc(-100% - 14px)); }
}
@keyframes toastOut {
  from { opacity: 1; }
  to   { opacity: 0; transform: translate(-50%, calc(-100% - 22px)); }
}

/* +Score / MISSED float */
.score-float {
  position: absolute; z-index: 22;
  transform: translate(-50%, -50%);
  font-family: "Space Grotesk", sans-serif;
  font-size: 14px; font-weight: 800;
  color: #72efdd;
  text-shadow: 0 0 14px rgba(114, 239, 221, .9);
  pointer-events: none; white-space: nowrap;
  animation: scoreRise 1.1s ease forwards;
}
.score-float.is-miss {
  color: #ef4444;
  text-shadow: 0 0 14px rgba(239, 68, 68, .9);
}

@keyframes scoreRise {
  0%   { opacity: 1; transform: translate(-50%, -50%); }
  65%  { opacity: 1; }
  100% { opacity: 0; transform: translate(-50%, calc(-50% - 46px)); }
}

.home-game.is-low-security [data-game-security] {
  color: #ef4444;
}

@keyframes activityPulse {
  0% { opacity: .95; box-shadow: 0 0 0 0 rgba(114, 239, 221, .36), 0 0 18px rgba(114, 239, 221, .5); }
  80% { opacity: .6; box-shadow: 0 0 0 18px rgba(114, 239, 221, 0), 0 0 18px rgba(114, 239, 221, .5); }
  100% { opacity: .95; box-shadow: 0 0 0 0 rgba(114, 239, 221, 0), 0 0 18px rgba(114, 239, 221, .5); }
}


h1, h2, h3 {
  font-family: "Space Grotesk", sans-serif;
  line-height: 1.08;
  letter-spacing: 0;
}

h1 { margin: 10px 0 18px; font-size: clamp(2.35rem, 12vw, 4.8rem); }
h2 { margin: 6px 0 0; font-size: clamp(1.9rem, 8vw, 3.1rem); }
h3 { margin: 12px 0 10px; font-size: 1.25rem; }

p { margin: 0; color: var(--muted); }
.hero p, .page-hero p { color: rgba(255, 255, 255, .86); }

.eyebrow {
  text-transform: uppercase;
  letter-spacing: .12em;
  font-size: .76rem;
  font-weight: 900;
  color: var(--accent-2);
}

.hero .eyebrow,
.page-hero .eyebrow { color: var(--glow); }

.section { padding: 72px 0; }
.band { background: var(--surface-soft); }

.section-heading {
  margin-bottom: 28px;
}

.section-heading.split {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.btn {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 20px;
  border-radius: 999px;
  font-weight: 900;
  border: 1px solid transparent;
  cursor: pointer;
}

.btn-primary {
  background: var(--accent);
  color: white;
  box-shadow: 0 14px 28px rgba(0, 119, 182, .22);
}

.btn-outline {
  border-color: currentColor;
  color: white;
  background: rgba(255, 255, 255, .08);
}

.section .btn-outline { color: var(--accent); background: transparent; }

.card-grid {
  display: grid;
  gap: 18px;
}

.card {
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  transition: transform .2s ease, box-shadow .2s ease;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 22px 60px rgba(0, 119, 182, .14);
}

.card > svg {
  width: 34px;
  height: 34px;
  color: var(--accent-2);
}

.feature-list,
.icon-grid,
.stats-grid {
  display: grid;
  gap: 14px;
}

.feature-list div,
.icon-grid div,
.stats-grid div {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--border);
  font-weight: 800;
}

.feature-list svg,
.icon-grid svg {
  flex: 0 0 auto;
  color: var(--accent-2);
}

.promo-card span,
.badge,
.post-card > span {
  display: inline-flex;
  width: fit-content;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(0, 150, 199, .12);
  color: var(--accent-2);
  font-size: .76rem;
  font-weight: 900;
}

.meta {
  color: var(--accent-2);
  font-size: .86rem;
  font-weight: 800;
}

.text-link {
  color: var(--accent);
  font-weight: 900;
}

.price-card {
  display: flex;
  flex-direction: column;
  min-height: 360px;
}

.price-card h3 {
  min-height: 2.6em;
}

.price-card.featured {
  border-color: color-mix(in srgb, var(--accent-2) 60%, var(--border));
}

.price {
  margin: 10px 0 14px;
  color: var(--accent);
  font-size: 2rem;
  font-weight: 900;
}

[data-theme="dark"] .price,
[data-theme="dark"] .text-link { color: var(--accent-light); }

.price-card ul {
  padding-left: 20px;
  margin: 0 0 22px;
  color: var(--muted);
}

.price-card .pkg-detail-toggle {
  margin-top: auto;
  margin-bottom: 12px;
}

.price-card .btn-primary {
  width: 100%;
  margin-top: auto;
}

.solar-starter-grid .price-card p:not(.price) {
  min-height: 4.8em;
  overflow: hidden;
}

.calculator-layout {
  display: grid;
  gap: 18px;
}

.calculator-panel,
.calculator-summary,
.form-card,
.contact-info {
  padding: 22px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

fieldset {
  border: 0;
  padding: 0;
  margin: 0 0 20px;
}

legend {
  margin-bottom: 10px;
  font-weight: 900;
  font-family: "Space Grotesk", sans-serif;
}

.object-types {
  display: grid;
  gap: 10px;
}

.object-types label {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
}

.counter-list {
  display: grid;
  gap: 12px;
  max-height: 680px;
  overflow: auto;
  padding-right: 4px;
}

.counter-row {
  display: grid;
  grid-template-columns: 1fr 38px 36px 38px;
  align-items: center;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: color-mix(in srgb, var(--surface) 72%, transparent);
}

.counter-row div {
  display: grid;
}

.counter-row span {
  color: var(--muted);
  font-size: .9rem;
}

.calc-device-row {
  min-height: 86px;
}

.calc-device-copy {
  min-width: 0;
  gap: 3px;
}

.calc-item-name {
  line-height: 1.25;
}

.calc-item-requires {
  min-height: 1.15rem;
  color: var(--accent);
  font-size: .78rem;
  font-weight: 800;
}

.counter-row.is-required-added {
  border-color: color-mix(in srgb, var(--accent) 58%, var(--border));
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 12%, transparent);
}

.counter-row button {
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--surface-soft);
  color: var(--text);
  cursor: pointer;
}

.counter-row output {
  text-align: center;
  font-weight: 900;
}

.calculator-summary {
  align-self: start;
  position: sticky;
  top: 92px;
}

.calculator-summary h3 {
  margin-top: 0;
  font-size: 1.05rem;
}

.calc-selected-list {
  display: grid;
  gap: 10px;
  margin: 14px 0 18px;
  max-height: 360px;
  overflow: auto;
  padding-right: 4px;
}

.calc-selected-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: start;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}

.calc-selected-object {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface-soft);
}

.calc-selected-object span {
  color: var(--muted);
  font-size: .86rem;
}

.calc-selected-item strong {
  display: block;
  line-height: 1.25;
}

.calc-selected-item span,
.calc-selected-empty {
  color: var(--muted);
  font-size: .86rem;
}

.calc-selected-item b {
  white-space: nowrap;
  color: var(--accent);
}

.note {
  margin-bottom: 18px;
  padding: 12px;
  border-radius: 10px;
  background: rgba(72, 202, 228, .14);
  color: var(--text);
  font-weight: 800;
}

dl { margin: 0 0 20px; }

dl div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}

dt { color: var(--muted); }
dd { margin: 0; font-weight: 900; }

.total {
  font-size: 1.3rem;
  color: var(--accent);
}

[data-theme="dark"] .total { color: var(--accent-light); }

.modal {
  width: min(94vw, 480px);
  border: 0;
  padding: 0;
  background: transparent;
}

.modal::backdrop {
  background: rgba(3, 4, 94, .72);
  backdrop-filter: blur(6px);
}

.modal-card { position: relative; }
.modal-close { position: absolute; top: 14px; right: 14px; }

.package-inspector {
  width: min(94vw, 560px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 28px 90px rgba(3, 4, 94, .28);
}

.package-inspector::backdrop {
  background: rgba(3, 4, 94, .5);
  backdrop-filter: blur(5px);
}

.package-inspector-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.package-inspector-head span {
  color: var(--accent);
  font-size: .78rem;
  font-weight: 900;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.package-inspector h2 {
  margin: 10px 48px 10px 0;
  font-size: 1.7rem;
}

.package-inspector .modal-close {
  position: static;
  flex: 0 0 auto;
}

.package-inspector-grid {
  display: grid;
  gap: 12px;
  margin: 18px 0;
}

.package-inspector-grid div {
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface-soft);
}

.package-inspector strong {
  display: block;
  margin-bottom: 6px;
  font-family: "Space Grotesk", sans-serif;
}

.package-inspector ul {
  margin: 8px 0 18px;
  padding-left: 20px;
  color: var(--muted);
}

.package-inspector-order {
  width: 100%;
}

.steps {
  display: grid;
  gap: 16px;
}

.steps div {
  padding: 22px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--border);
}

.steps span {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--accent);
  color: white;
  font-weight: 900;
}

.faq-list {
  display: grid;
  gap: 10px;
}

details {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 16px 18px;
}

summary {
  cursor: pointer;
  font-weight: 900;
}

details p { margin-top: 10px; }

.stats-grid div {
  flex-direction: column;
  align-items: flex-start;
}

.stats-grid strong {
  color: var(--accent);
  font-family: "Space Grotesk", sans-serif;
  font-size: 2.2rem;
  line-height: 1;
}

[data-theme="dark"] .stats-grid strong { color: var(--accent-light); }

.team-card { padding: 0; overflow: hidden; }
.team-card img { width: 100%; aspect-ratio: 1.25; object-fit: cover; }
.team-card h3, .team-card p { padding-inline: 20px; }
.team-card p { padding-bottom: 22px; }

.text-block p + p { margin-top: 16px; }

.contact-layout {
  display: grid;
  gap: 18px;
}

.contact-info {
  display: grid;
  gap: 18px;
}

.info-row {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.info-row svg {
  color: var(--accent-2);
  flex: 0 0 auto;
}

.info-row span {
  display: block;
  color: var(--muted);
  font-size: .9rem;
}

.info-row strong,
.site-footer p {
  white-space: pre-line;
}

.map-grid {
  display: grid;
  gap: 12px;
}

.map-section iframe {
  width: 100%;
  min-height: 420px;
  border: 0;
  display: block;
}

.form-card {
  display: grid;
  gap: 14px;
}

.form-card label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-weight: 800;
}

.form-card input,
.form-card textarea,
.form-card select {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
  background: var(--bg);
  color: var(--text);
  outline: none;
  transition: border-color .18s ease, box-shadow .18s ease;
}

.form-card input:focus,
.form-card textarea:focus,
.form-card select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(0, 119, 182, .14);
}

.form-success-panel {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-top: 4px;
  padding: 14px 16px;
  border: 1px solid rgba(0, 119, 182, .22);
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(0, 119, 182, .12), rgba(72, 202, 228, .12));
  color: var(--text);
  box-shadow: 0 14px 34px rgba(0, 119, 182, .12);
}

.form-success-panel[hidden] {
  display: none;
}

.form-success-panel svg {
  width: 22px;
  height: 22px;
  color: var(--accent);
  flex: 0 0 auto;
  margin-top: 1px;
}

.form-success-panel strong,
.form-success-panel span {
  display: block;
}

.form-success-panel strong {
  font-family: "Space Grotesk", sans-serif;
  font-size: 1rem;
  margin-bottom: 2px;
}

.form-success-panel span {
  color: var(--muted);
  font-size: .92rem;
}

.category-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 24px;
}

.category-row button {
  padding: 10px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
}

.post-card.is-hidden { display: none; }

.blog-card-button {
  width: 100%;
  text-align: left;
  color: inherit;
}

.post-card-image {
  width: calc(100% + 40px);
  max-width: none;
  height: 170px;
  margin: -20px -20px 16px;
  object-fit: cover;
}

.blog-modal-image {
  width: 100%;
  max-height: 320px;
  object-fit: cover;
  border-radius: 10px;
  margin: 0 0 18px;
}

.blog-modal {
  width: min(94vw, 720px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 28px 90px rgba(3, 4, 94, .28);
}

.blog-modal::backdrop {
  background: rgba(3, 4, 94, .55);
  backdrop-filter: blur(5px);
}

.blog-modal > span {
  display: inline-flex;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(0, 150, 199, .12);
  color: var(--accent-2);
  font-size: .76rem;
  font-weight: 900;
}

.blog-modal h2 {
  margin: 12px 52px 18px 0;
  font-size: 2rem;
}

.blog-modal .modal-close {
  position: absolute;
  top: 18px;
  right: 18px;
}

.blog-modal #blogModalBody {
  display: grid;
  gap: 14px;
}

.site-footer {
  padding: 56px 0 24px;
  background: var(--dark);
  color: white;
}

.site-footer p,
.site-footer a,
.site-footer span {
  color: rgba(255, 255, 255, .72);
}

.footer-grid {
  display: grid;
  gap: 28px;
}

.footer-brand { color: white; margin-bottom: 12px; }

.footer-brand .brand-mark {
  flex-basis: 40px;
  width: 40px;
  height: 40px;
  min-width: 40px;
  max-width: 40px;
  border-radius: 11px;
}

.site-footer h3 {
  margin: 0 0 12px;
  font-size: 1rem;
}

.site-footer a {
  display: block;
  margin: 7px 0;
}

.footer-bottom {
  margin-top: 34px;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, .16);
}

.whatsapp-float {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 45;
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #25d366;
  color: white;
  box-shadow: 0 14px 30px rgba(0, 0, 0, .24);
}

.mini-game-panel {
  position: fixed;
  left: 18px;
  bottom: 18px;
  z-index: 44;
  width: min(310px, calc(100vw - 36px));
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  color: var(--text);
  box-shadow: 0 18px 48px color-mix(in srgb, var(--dark) 18%, transparent);
  backdrop-filter: blur(18px);
  transform: translateY(14px);
  opacity: 0;
  animation: miniGameIn .45s ease forwards .25s;
}

.mini-game-panel.is-hidden { display: none; }

.mini-game-head {
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 12px 10px 14px;
  border-bottom: 1px solid var(--border);
}

.mini-game-kicker {
  display: block;
  margin-bottom: 1px;
  color: var(--accent);
  font-size: .68rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.mini-game-head strong {
  display: block;
  font-family: "Space Grotesk", sans-serif;
  font-size: 1rem;
  line-height: 1.1;
}

.mini-game-actions {
  display: flex;
  gap: 6px;
}

.mini-game-icon,
.mini-game-restart {
  border: 1px solid var(--border);
  background: var(--surface-soft);
  color: var(--text);
  cursor: pointer;
}

.mini-game-icon {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 50%;
}

.mini-game-icon svg {
  width: 15px;
  height: 15px;
}

.mini-game-body {
  display: grid;
  gap: 10px;
  padding: 12px;
}

.mini-game-panel.is-collapsed .mini-game-body { display: none; }

.mini-game-meta {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.mini-game-meta span {
  min-width: 0;
  padding: 8px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface-soft);
  text-align: center;
}

.mini-game-meta b {
  display: block;
  font-size: 1rem;
  line-height: 1;
}

.mini-game-meta small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: .68rem;
  line-height: 1.1;
  overflow-wrap: anywhere;
}

.mini-game-field {
  position: relative;
  width: 100%;
  height: 156px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 14px;
  background:
    linear-gradient(90deg, color-mix(in srgb, var(--accent-2) 8%, transparent) 1px, transparent 1px),
    linear-gradient(color-mix(in srgb, var(--accent-2) 8%, transparent) 1px, transparent 1px),
    radial-gradient(circle at 50% 50%, color-mix(in srgb, var(--accent-light) 18%, transparent), transparent 64%),
    var(--surface-soft);
  background-size: 28px 28px, 28px 28px, auto, auto;
  cursor: crosshair;
}

.mini-game-house {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 60px;
  height: 60px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--surface);
  color: var(--accent);
  transform: translate(-50%, -50%);
  box-shadow: 0 12px 30px color-mix(in srgb, var(--accent) 18%, transparent);
}

.mini-game-house svg {
  width: 30px;
  height: 30px;
}

.mini-game-scan {
  position: absolute;
  inset: -16px;
  border: 2px solid color-mix(in srgb, var(--accent-2) 34%, transparent);
  border-radius: 50%;
  animation: miniGameScan 1.8s ease-out infinite;
}

.mini-game-target {
  position: absolute;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: var(--accent);
  color: white;
  box-shadow: 0 0 0 8px color-mix(in srgb, var(--accent) 14%, transparent);
  transform: translate(-50%, -50%);
  animation: miniGamePulse .8s ease-in-out infinite alternate;
}

.mini-game-target[hidden] { display: none; }

.mini-game-target.is-hit {
  background: var(--glow);
  color: var(--dark);
  animation: miniGameHit .18s ease forwards;
}

.mini-game-target svg {
  width: 17px;
  height: 17px;
}

.mini-game-footer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
}

.mini-game-footer span {
  color: var(--muted);
  font-size: .8rem;
  line-height: 1.25;
}

.mini-game-restart {
  min-height: 34px;
  padding: 6px 11px;
  border-radius: 999px;
  font-size: .78rem;
  font-weight: 700;
}

@keyframes miniGameIn {
  to { opacity: 1; transform: translateY(0); }
}

@keyframes miniGameScan {
  0% { opacity: .72; transform: scale(.55); }
  100% { opacity: 0; transform: scale(1.45); }
}

@keyframes miniGamePulse {
  from { transform: translate(-50%, -50%) scale(.92); }
  to { transform: translate(-50%, -50%) scale(1.06); }
}

@keyframes miniGameHit {
  to { opacity: 0; transform: translate(-50%, -50%) scale(1.45); }
}

@media (max-width: 520px) {
  .hero-interactive {
    min-height: auto;
    padding: 52px 0 34px;
  }

  .hero-interactive h1 {
    font-size: clamp(2.35rem, 13vw, 3.55rem);
  }

  .hero-game-layout {
    gap: 22px;
  }

  .home-game-top,
  .home-game-controls {
    grid-template-columns: 1fr;
  }

  .home-game-top {
    display: grid;
  }

  .home-game-stats {
    width: 100%;
  }

  .home-game-stats span {
    flex: 1;
  }

  .home-device {
    width: 32px;
    height: 32px;
  }

  .home-device.solar {
    width: 40px;
    height: 40px;
  }

  .home-device.camera .camera-cone {
    width: 126px;
    height: 88px;
  }

  .mini-game-panel {
    left: 12px;
    right: 12px;
    bottom: 86px;
    width: auto;
  }

  .mini-game-field {
    height: 138px;
  }
}

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .65s ease, transform .65s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── Shop page ── */
.search-filter-bar {
  position: sticky;
  top: 72px;
  z-index: 30;
  background: color-mix(in srgb, var(--surface) 95%, transparent);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
  padding: 14px 0;
}

.search-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
}

.search-input-wrap {
  position: relative;
  flex: 1 1 220px;
}

.search-input-wrap svg {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  color: var(--muted);
  pointer-events: none;
}

.search-input {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 10px 14px 10px 40px;
  background: var(--bg);
  color: var(--text);
  outline: none;
  transition: border-color .18s, box-shadow .18s;
}

.search-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(0, 119, 182, .12);
}

.sort-select {
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 10px 16px;
  background: var(--bg);
  color: var(--text);
  cursor: pointer;
  outline: none;
}

.cat-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  padding: 10px 0 0;
}

.cat-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  cursor: pointer;
  font-size: .84rem;
  font-weight: 700;
  transition: background .18s, color .18s, border-color .18s;
}

.cat-tab:hover { background: var(--surface-soft); color: var(--text); }

.cat-tab.active {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
}

.cat-tab svg { width: 15px; height: 15px; }

.products-count {
  color: var(--muted);
  font-size: .86rem;
  margin-bottom: 18px;
}

/* Glass product card */
.product-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 520px;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 4px 24px rgba(0, 119, 182, 0.07);
  transition: transform .28s ease, box-shadow .28s ease;
  position: relative;
}

[data-theme="dark"] .product-card {
  background: rgba(6, 20, 40, 0.88);
  border-color: rgba(72, 202, 228, 0.14);
}

.product-card:hover {
  transform: translateY(-6px) scale(1.01);
  box-shadow: 0 20px 48px rgba(0, 119, 182, .18);
}

.product-card-img {
  width: 100%;
  aspect-ratio: 16/10;
  object-fit: cover;
  display: block;
  transition: transform .4s ease;
}

.product-card:hover .product-card-img { transform: scale(1.04); }

.product-card-img-wrap { overflow: hidden; position: relative; }

.product-card-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: .72rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: white;
}

.product-card-badge.bestseller { background: #e74c3c; }
.product-card-badge.new { background: var(--accent-2); }
.product-card-badge.sale { background: #f39c12; }
.product-card-badge.featured { background: var(--dark); }

.product-card-body {
  padding: 18px 20px 20px;
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 8px;
}

.product-card-cat {
  font-size: .72rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--accent-2);
}

.product-card-name {
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
  font-size: 1rem;
  color: var(--text);
  margin: 0;
  line-height: 1.3;
  min-height: 2.6em;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-card-desc {
  font-size: .86rem;
  color: var(--muted);
  margin: 0;
  flex: 1;
  min-height: 5.2em;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-card-pricing {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-top: 6px;
  min-height: 58px;
}

.product-card-price {
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--accent);
}

.product-card-install {
  font-size: .78rem;
  color: var(--muted);
}

.product-card-footer {
  padding: 0 20px 20px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  min-height: 86px;
  margin-top: auto;
}

.product-card-footer .btn {
  flex: 1 1 130px;
  min-width: 0;
  white-space: normal;
  text-align: center;
}

#solarProductGrid,
#cameraProductGrid {
  align-items: stretch !important;
}

.btn-sm {
  min-height: 38px;
  padding: 8px 16px;
  font-size: .86rem;
}

.no-results {
  grid-column: 1 / -1;
  text-align: center;
  padding: 56px 0;
  color: var(--muted);
}

.no-results svg {
  width: 48px;
  height: 48px;
  margin: 0 auto 16px;
  opacity: .4;
}

.cart-layout {
  display: grid;
  gap: 22px;
  align-items: start;
}

.cart-panel,
.cart-summary,
.cart-item {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.cart-panel,
.cart-summary {
  padding: 22px;
}

.cart-summary {
  position: sticky;
  top: 92px;
  display: grid;
  gap: 14px;
}

.cart-summary h2 {
  margin: 0;
  font-family: "Space Grotesk", sans-serif;
}

.cart-total-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}

.cart-total-row.grand {
  border-bottom: 0;
  font-size: 1.1rem;
}

.cart-total-row.grand strong {
  color: var(--accent);
}

.cart-item {
  display: grid;
  grid-template-columns: 92px 1fr;
  gap: 14px;
  padding: 14px;
  margin-bottom: 12px;
}

.cart-item img {
  width: 92px;
  height: 76px;
  object-fit: cover;
  border-radius: 10px;
}

.cart-item h3 {
  margin: 0 0 4px;
  font-family: "Space Grotesk", sans-serif;
  font-size: 1rem;
}

.cart-item p,
.cart-empty,
.muted {
  color: var(--muted);
}

.cart-item > strong {
  grid-column: 1 / -1;
  color: var(--accent);
}

.cart-qty {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.cart-qty button {
  min-width: 34px;
  min-height: 34px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface-soft);
  color: var(--text);
  cursor: pointer;
  font-weight: 900;
}

.cart-remove {
  padding: 0 12px;
  color: var(--accent);
}

.cart-message {
  color: var(--accent);
  font-weight: 800;
}

/* Enhanced calculator - category tabs */
.calc-cat-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.calc-cat-tab {
  padding: 6px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--muted);
  cursor: pointer;
  font-size: .8rem;
  font-weight: 700;
  transition: all .18s;
}

.calc-cat-tab.active {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
}

.calc-search {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 14px;
  background: var(--bg);
  color: var(--text);
  margin-bottom: 14px;
  outline: none;
  transition: border-color .18s, box-shadow .18s;
}

.calc-search:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(0, 119, 182, .12);
}

.counter-row.is-hidden-calc { display: none; }

@media (min-width: 720px) {
  .card-grid.three,
  .feature-list,
  .icon-grid,
  .stats-grid,
  .steps {
    grid-template-columns: repeat(2, 1fr);
  }

  .contact-layout,
  .calculator-layout {
    grid-template-columns: 1.25fr .75fr;
    align-items: start;
  }

  .package-inspector-grid {
    grid-template-columns: 1fr 1fr;
  }

  .map-grid {
    grid-template-columns: 1fr 1fr;
  }

  .cart-layout {
    grid-template-columns: minmax(0, 1fr) 360px;
  }

  .cart-item {
    grid-template-columns: 116px 1fr auto;
  }

  .cart-item img {
    width: 116px;
    height: 88px;
  }

  .cart-item > strong {
    grid-column: auto;
  }

  .footer-grid {
    grid-template-columns: 1.5fr 1fr 1fr;
  }
}

@media (min-width: 1040px) {
  .nav-shell {
    grid-template-columns: auto 1fr auto;
  }

  .nav-toggle { display: none; }

  .nav-panel {
    position: static;
    display: flex;
    flex-direction: row;
    justify-content: center;
    padding: 0;
    background: transparent;
    border: 0;
    box-shadow: none;
  }

  .nav-panel a {
    padding: 9px 10px;
    font-size: .92rem;
  }

  .card-grid.three,
  .pricing-grid,
  .team-grid,
  .blog-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .steps.four { grid-template-columns: repeat(4, 1fr); }

  .hero,
  .page-hero {
    align-items: center;
  }

  .hero-game-layout {
    grid-template-columns: minmax(0, .78fr) minmax(560px, 1.08fr);
    gap: 34px;
  }

  .hero-interactive h1 {
    font-size: clamp(3rem, 4.35vw, 4.55rem);
  }
}

/* ── Admin Panel ──────────────────────────────────── */
[data-page="admin"] body, body[data-page="admin"] { background: var(--bg); }

.admin-shell {
  display: flex;
  min-height: 100vh;
}

.admin-sidebar {
  width: 220px;
  flex-shrink: 0;
  background: var(--dark);
  color: #e8f4fb;
  display: flex;
  flex-direction: column;
  padding: 24px 0;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}

.admin-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 20px 24px;
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
  font-size: 1.05rem;
  color: white;
  border-bottom: 1px solid rgba(255,255,255,.1);
  margin-bottom: 12px;
}

.admin-brand .brand-mark {
  flex-basis: 30px;
  width: 30px;
  height: 30px;
  min-width: 30px;
  max-width: 30px;
  border-radius: 9px;
}

.admin-nav { display: flex; flex-direction: column; gap: 2px; padding: 0 12px; }

.admin-nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 8px;
  color: rgba(255,255,255,.65);
  font-size: .88rem;
  font-weight: 500;
  text-decoration: none;
  transition: background .15s, color .15s;
  cursor: pointer;
  border: none;
  background: transparent;
  width: 100%;
  text-align: left;
}

.admin-nav-item:hover { background: rgba(255,255,255,.08); color: white; }
.admin-nav-item.active { background: var(--accent); color: white; }
.admin-nav-item svg { width: 16px; height: 16px; flex-shrink: 0; }
.admin-nav-separator { height: 1px; background: rgba(255,255,255,.08); margin: 8px 12px; }

.admin-main {
  flex: 1;
  padding: 32px;
  min-width: 0;
  overflow-x: hidden;
}

.admin-section { display: none; }
.admin-section.active { display: block; }

.admin-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 12px;
}

.admin-section-header h1, .admin-main > .admin-section > h1 {
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.6rem;
  color: var(--text);
  margin: 0 0 20px;
}

.admin-section-header h1 { margin: 0; }

.admin-section-subtitle {
  max-width: 760px;
  margin: 6px 0 0;
  color: var(--muted);
  font-size: .92rem;
}

.admin-notice code {
  padding: 2px 6px;
  border-radius: 6px;
  background: var(--surface);
  border: 1px solid var(--border);
}

.admin-stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 16px;
  margin-bottom: 32px;
}

.admin-stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 22px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.admin-stat-card strong {
  font-family: "Space Grotesk", sans-serif;
  font-size: 2rem;
  font-weight: 700;
  color: var(--accent);
}

.admin-stat-card span { font-size: .82rem; color: var(--muted); font-weight: 500; }

.admin-toolbar {
  display: flex;
  gap: 10px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.admin-search, .admin-select {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 12px;
  background: var(--surface);
  color: var(--text);
  font-size: .88rem;
  outline: none;
  transition: border-color .18s, box-shadow .18s;
}

.admin-search { flex: 1; min-width: 200px; }
.admin-select { min-width: 160px; }

.admin-search:focus, .admin-select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(0, 119, 182, .12);
}

.admin-table-wrap {
  overflow-x: auto;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .88rem;
}

.admin-table th {
  background: var(--surface-soft);
  padding: 10px 14px;
  text-align: left;
  font-weight: 700;
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--muted);
  white-space: nowrap;
}

.admin-table td {
  padding: 10px 14px;
  border-top: 1px solid var(--border);
  color: var(--text);
  vertical-align: middle;
}

.admin-table td:first-child {
  min-width: 220px;
}

.admin-table tr:hover td { background: var(--surface-soft); }

.admin-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  background: var(--surface-soft);
  color: var(--muted);
}

.admin-badge.bestseller { background: #fde8e8; color: #c0392b; }
.admin-badge.new { background: #e8f5fb; color: var(--accent-2); }
.admin-badge.sale { background: #fef3e2; color: #e67e22; }

.admin-toggle {
  appearance: none;
  width: 36px;
  height: 20px;
  border-radius: 999px;
  background: var(--border);
  position: relative;
  cursor: pointer;
  transition: background .18s;
  flex-shrink: 0;
}

.admin-toggle::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: white;
  transition: transform .18s;
}

.admin-toggle:checked { background: var(--accent); }
.admin-toggle:checked::after { transform: translateX(16px); }

.admin-action-row { display: flex; gap: 6px; align-items: center; }

.btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--muted);
  cursor: pointer;
  transition: all .15s;
  padding: 0;
}

.btn-icon:hover { border-color: var(--accent); color: var(--accent); }
.btn-icon.danger:hover { border-color: #e74c3c; color: #e74c3c; }
.btn-icon svg { width: 14px; height: 14px; }

.admin-modal {
  padding: 0;
  border: none;
  border-radius: var(--radius);
  box-shadow: 0 32px 80px rgba(0,0,0,.3);
  background: var(--surface);
  max-width: 820px;
  width: 90vw;
  max-height: 90vh;
  overflow-y: auto;
}

.admin-modal::backdrop { background: rgba(3, 4, 94, .45); backdrop-filter: blur(4px); }

.admin-modal-inner { padding: 28px; }

.admin-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 22px;
}

.admin-modal-header h2 {
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.25rem;
  color: var(--text);
  margin: 0;
}

.admin-form { display: flex; flex-direction: column; gap: 14px; }

.admin-form-group { display: flex; flex-direction: column; gap: 5px; }

.admin-form-group label {
  font-size: .8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--muted);
}

.admin-form-group input, .admin-form-group select, .admin-form-group textarea {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 9px 12px;
  background: var(--bg);
  color: var(--text);
  font-size: .9rem;
  outline: none;
  transition: border-color .18s, box-shadow .18s;
  font-family: inherit;
}

.admin-form-group input:focus, .admin-form-group select:focus, .admin-form-group textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(0, 119, 182, .12);
}

.admin-form-group textarea { resize: vertical; min-height: 76px; line-height: 1.45; }

#blogModal .admin-modal-inner,
#productModal .admin-modal-inner {
  display: grid;
  gap: 18px;
}

.admin-form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.admin-form-actions { display: flex; gap: 10px; padding-top: 8px; }

.admin-export-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

@media (max-width: 760px) {
  .admin-shell { flex-direction: column; }
  .admin-sidebar {
    position: static;
    width: auto;
    height: auto;
  }
  .admin-nav {
    flex-direction: row;
    overflow-x: auto;
    padding-bottom: 8px;
  }
  .admin-nav-item { white-space: nowrap; }
  .admin-main { padding: 20px; }
  .admin-form-row { grid-template-columns: 1fr; }
  .admin-modal { width: 96vw; }
}

.admin-cat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
}

.admin-cat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.admin-cat-card svg { width: 28px; height: 28px; color: var(--accent); }
.admin-cat-card h3 { font-size: 1rem; margin: 0; color: var(--text); }
.admin-cat-card span { font-size: .82rem; color: var(--muted); }

.admin-notice {
  background: rgba(0, 119, 182, .08);
  border: 1px solid rgba(0, 119, 182, .2);
  border-radius: 8px;
  padding: 10px 14px;
  font-size: .84rem;
  color: var(--accent);
  margin-bottom: 16px;
}

[data-theme="dark"] .admin-badge.bestseller { background: rgba(231,76,60,.2); }
[data-theme="dark"] .admin-badge.new { background: rgba(0,150,199,.2); }
[data-theme="dark"] .admin-badge.sale { background: rgba(243,156,18,.2); }
