/* ====== CSS RESET (minimal) ====== */
*,
*::before,
*::after {
  box-sizing: border-box;
}
body,
h1,
h2,
h3,
h4,
p,
ul,
ol,
figure {
  margin: 0;
}
img {
  max-width: 100%;
  display: block;
}
button,
input,
select,
textarea {
  font: inherit;
}

/* ====== THEME ====== */
:root {
  --bg: #0b1020;
  --surface: #0f1630;
  --card: #121b3a;
  --elev: #121a2a;
  --line: #223056;
  --muted: #8da2c6;
  --text: #eef3ff;
  --primary: #59d0c0; /* teal */
  --primary-2: #28a6c3; /* cyan */
  --accent: #9dd2ff; /* light */
  --danger: #ff6470;
  --warning: #ffd166;
  --success: #54d17e;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  --radius: 18px;
}
html,
body {
  height: 100%;
}
body {
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto,
    Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
  background: radial-gradient(
      1200px 600px at 10% -20%,
      #1a244a 0%,
      transparent 60%
    ),
    radial-gradient(900px 500px at 90% -10%, #103458 0%, transparent 60%),
    var(--bg);
  color: var(--text);
  line-height: 1.55;
}

a {
  color: var(--accent);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}

.container {
  width: min(1120px, 92vw);
  margin-inline: auto;
}

/* ====== NAVBAR ====== */
header {
  position: sticky;
  top: 0;
  z-index: 60;
  backdrop-filter: blur(10px);
  background: linear-gradient(
    180deg,
    rgba(5, 10, 20, 0.9),
    rgba(5, 10, 20, 0.6)
  );
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
}
.logo {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  background: linear-gradient(145deg, var(--primary), var(--primary-2));
  box-shadow: var(--shadow);
}
.brand h1 {
  font-size: 18px;
  letter-spacing: 0.4px;
}
.navlinks {
  display: flex;
  gap: 18px;
  align-items: center;
}
.navlinks a {
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid transparent;
}
.navlinks a:hover {
  border-color: rgba(255, 255, 255, 0.14);
  text-decoration: none;
}
.cta {
  display: flex;
  gap: 10px;
}
.btn {
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: transparent;
  color: var(--text);
  cursor: pointer;
}
.btn.primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  color: #00131a;
  border: none;
  font-weight: 700;
}
.btn.ghost:hover {
  background: rgba(255, 255, 255, 0.06);
}

/* mobile nav */
.hamburger {
  display: none;
}
@media (max-width: 880px) {
  .navlinks {
    display: none;
  }
  .hamburger {
    display: block;
  }
}

/* ====== HERO ====== */
.hero {
  position: relative;
  padding: 56px 0 24px;
}
.hero .grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 28px;
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--muted);
  font-size: 13px;
}
.title {
  font-size: 40px;
  line-height: 1.12;
  margin: 14px 0 12px;
}
.subtitle {
  color: var(--muted);
}
.hero-cta {
  display: flex;
  gap: 12px;
  margin-top: 16px;
}
.card {
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.04),
    rgba(255, 255, 255, 0.02)
  );
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow);
}
.statbar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-top: 18px;
}
.stat {
  padding: 14px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
  text-align: center;
}
.stat h3 {
  font-size: 18px;
}
.stat p {
  font-size: 12px;
  color: var(--muted);
}
.callout {
  margin-top: 14px;
  font-size: 13px;
  color: var(--muted);
}

@media (max-width: 920px) {
  .hero .grid {
    grid-template-columns: 1fr;
  }
  .title {
    font-size: 32px;
  }
}

/* ====== TABS ====== */
.tabs {
  display: flex;
  gap: 10px;
  margin: 18px 0;
}
.tab {
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.03);
  cursor: pointer;
}
.tab.active {
  background: linear-gradient(
    135deg,
    rgba(89, 208, 192, 0.18),
    rgba(40, 166, 195, 0.18)
  );
  border-color: rgba(89, 208, 192, 0.35);
}

/* ====== FILTER BAR ====== */
.filterbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.03);
}
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.chip {
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  cursor: pointer;
  font-size: 13px;
}
.chip.active {
  background: linear-gradient(
    135deg,
    rgba(89, 208, 192, 0.2),
    rgba(40, 166, 195, 0.2)
  );
  border-color: rgba(89, 208, 192, 0.45);
}
.search {
  display: flex;
  align-items: center;
  gap: 8px;
}
.search input {
  width: 240px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
}
@media (max-width: 720px) {
  .search input {
    width: 100%;
  }
}

/* ====== CARDS GRID ====== */
.grid {
  display: grid;
  gap: 16px;
}
.products {
  grid-template-columns: repeat(3, 1fr);
}
@media (max-width: 980px) {
  .products {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 640px) {
  .products {
    grid-template-columns: 1fr;
  }
}

.p-card {
  position: relative;
  overflow: hidden;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.04),
    rgba(255, 255, 255, 0.02)
  );
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.p-card:hover {
  border-color: rgba(255, 255, 255, 0.18);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.25);
}
.p-media {
  height: 160px;
  background: radial-gradient(
      160px 80px at 20% -20%,
      rgba(89, 208, 192, 0.5),
      transparent 30%
    ),
    linear-gradient(135deg, #1b2d56, #112043);
  display: flex;
  align-items: center;
  justify-content: center;
}
.p-media svg {
  opacity: 0.9;
}
.p-body {
  padding: 14px;
}
.p-title {
  font-weight: 700;
  margin-bottom: 6px;
}
.p-desc {
  color: var(--muted);
  font-size: 13px;
  min-height: 40px;
}
.p-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 12px;
}
.price {
  font-weight: 800;
}
.lease {
  font-size: 12px;
  color: var(--muted);
}
.p-actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}

/* ====== BADGE BAR ====== */
.pillbar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 12px;
}
.pill {
  font-size: 12px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--muted);
}

/* ====== SECTIONS ====== */
section {
  padding: 26px 0;
}
h2.section-title {
  font-size: 22px;
  margin-bottom: 10px;
}

/* ====== TUTORIALS ====== */
.tutorials-embed {
  position: relative;
  padding-top: 56.25%;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.tutorials-embed iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

/* ====== FOOTER ====== */
footer {
  margin-top: 40px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 22px 0;
  color: var(--muted);
}

/* ====== MODALS & DRAWERS ====== */
.overlay {
  position: fixed;
  inset: 0;
  background: rgba(3, 6, 14, 0.6);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 100;
}
.overlay.show {
  display: flex;
}
.modal {
  width: min(720px, 92vw);
  background: linear-gradient(180deg, #0f1630, #0d1428);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 18px;
  box-shadow: var(--shadow);
}
.modal header {
  position: sticky;
  top: 0;
  background: transparent;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding: 14px 16px;
}
.modal .content {
  padding: 16px;
}
.modal .footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.row {
  display: grid;
  gap: 12px;
  grid-template-columns: 1fr 1fr;
}
.row-3 {
  grid-template-columns: repeat(3, 1fr);
}
@media (max-width: 720px) {
  .row,
  .row-3 {
    grid-template-columns: 1fr;
  }
}

label {
  font-size: 12px;
  color: var(--muted);
}
input[type="text"],
input[type="email"],
input[type="tel"],
select {
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
}

.stepper {
  display: flex;
  gap: 10px;
  margin-bottom: 10px;
}
.step {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  color: var(--muted);
}
.dot {
  width: 20px;
  height: 20px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.2);
}
.step.active .dot {
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  color: #011;
}

/* Toast */
.toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  background: #0d1426;
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--text);
  padding: 12px 14px;
  border-radius: 12px;
  display: none;
  z-index: 200;
}
.toast.show {
  display: block;
}

/* Small helper classes */
.muted {
  color: var(--muted);
}
.note {
  font-size: 12px;
  color: var(--muted);
}
.spacer {
  height: 10px;
}
/* ====== LIGHT THEME OVERRIDES ====== */
[data-theme="light"] {
  --bg: #f7f9fc;
  --surface: #ffffff;
  --card: #ffffff;
  --elev: #f3f6fc;
  --line: #d6e3f8;
  --muted: #5f6e8a;
  --text: #0b1426;
  --accent: #0b74b8;
  --shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}
[data-theme="light"] body {
  background: radial-gradient(
      1200px 600px at 10% -20%,
      #e7efff 0%,
      transparent 60%
    ),
    radial-gradient(900px 500px at 90% -10%, #e8fbff 0%, transparent 60%),
    var(--bg);
  color: var(--text);
}
[data-theme="light"] header {
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.9),
    rgba(255, 255, 255, 0.6)
  );
  border-bottom: 1px solid rgba(10, 19, 36, 0.08);
}
[data-theme="light"] .navlinks a:hover {
  border-color: rgba(10, 19, 36, 0.14);
}
[data-theme="light"] .btn.ghost:hover {
  background: rgba(0, 0, 0, 0.04);
}
[data-theme="light"] .badge {
  background: rgba(0, 0, 0, 0.06);
  border-color: rgba(0, 0, 0, 0.12);
  color: var(--muted);
}
[data-theme="light"] .card,
[data-theme="light"] .p-card,
[data-theme="light"] .stat,
[data-theme="light"] .filterbar {
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.02), rgba(0, 0, 0, 0.01));
  border: 1px solid rgba(10, 19, 36, 0.1);
  box-shadow: var(--shadow);
}
[data-theme="light"] .p-media {
  background: radial-gradient(
      160px 80px at 20% -20%,
      rgba(89, 208, 192, 0.35),
      transparent 30%
    ),
    linear-gradient(135deg, #eaf4ff, #f7fbff);
}
[data-theme="light"] .tutorials-embed {
  border-color: rgba(10, 19, 36, 0.1);
}
[data-theme="light"] footer {
  border-top-color: rgba(10, 19, 36, 0.1);
}
[data-theme="light"] input[type="text"],
[data-theme="light"] input[type="email"],
[data-theme="light"] input[type="tel"],
[data-theme="light"] select {
  background: #fff;
  border-color: rgba(10, 19, 36, 0.2);
  color: var(--text);
}
[data-theme="light"] .modal {
  background: linear-gradient(180deg, #ffffff, #f7f9fc);
  border-color: rgba(10, 19, 36, 0.12);
}
[data-theme="light"] .toast {
  background: #ffffff;
  color: var(--text);
  border-color: rgba(10, 19, 36, 0.12);
}
/* ICON BUTTONS */
.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.icon {
  width: 18px;
  height: 18px;
  display: inline-block;
}
.icon path,
.icon circle,
.icon line {
  stroke: currentColor;
}
[data-theme="dark"] .icon-sun {
  display: none;
}
[data-theme="light"] .icon-moon {
  display: none;
}

/* ======== PRODUCT MODAL ======== */
.product-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 998;
  visibility: hidden;
}
.product-modal-overlay.show {
  visibility: visible;
}
.product-modal-overlay-bg {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  opacity: 0;
  transition: opacity 0.25s;
}
.product-modal-overlay.show .product-modal-overlay-bg {
  opacity: 1;
}
.product-modal {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.92);
  width: min(92vw, 680px);
  max-height: 88vh;
  background: var(--card-bg, #1e2330);
  border-radius: 16px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
  display: flex;
  flex-direction: column;
  opacity: 0;
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.25s;
  overflow: hidden;
}
.product-modal-overlay.show .product-modal {
  transform: translate(-50%, -50%) scale(1);
  opacity: 1;
}
.product-modal-header {
  display: flex;
  justify-content: flex-end;
  padding: 14px 16px 0;
}
.product-modal-close {
  background: none;
  border: none;
  color: var(--muted);
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
  transition: color 0.2s, background 0.2s;
}
.product-modal-close:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
}
.product-modal-body {
  padding: 0 24px 20px;
  overflow-y: auto;
  flex: 1;
}
.product-modal-img {
  width: 100%;
  height: 260px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  margin-bottom: 20px;
}
.product-modal-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.product-modal-gallery {
  display: flex;
  gap: 8px;
  margin-top: -12px;
  margin-bottom: 16px;
}
.product-modal-gallery img {
  width: 56px;
  height: 56px;
  border-radius: 8px;
  object-fit: cover;
  cursor: pointer;
  border: 2px solid transparent;
  opacity: 0.6;
  transition: opacity 0.2s, border-color 0.2s;
}
.product-modal-gallery img:hover,
.product-modal-gallery img.active {
  opacity: 1;
  border-color: var(--primary);
}
.product-modal-title {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
}
.product-modal-desc {
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.5;
  margin-bottom: 12px;
}
.product-modal-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 16px;
}
.product-modal-price {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 4px;
}
.product-modal-lease {
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 4px;
}
.product-modal-stock {
  font-size: 0.82rem;
  color: var(--muted);
  margin-bottom: 20px;
}
.product-modal-footer {
  display: flex;
  gap: 10px;
  padding: 16px 24px 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.product-modal-footer .btn {
  flex: 1;
  justify-content: center;
  display: flex;
  align-items: center;
  text-decoration: none;
}