:root {
  --bg: #05080d;
  --bg-soft: #0c121a;
  --paper: #0f1720;
  --paper-2: #14202d;
  --ink: #e9edf3;
  --muted: #93a4b8;
  --line: #253446;
  --line-soft: #1a2634;
  --brand: #8ea8bf;
  --brand-strong: #c7d9ea;
  --radius: 16px;
  --shadow: 0 20px 44px rgba(0, 0, 0, 0.46);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  background:
    radial-gradient(circle at 12% 0%, rgba(130, 152, 173, 0.15), transparent 36%),
    radial-gradient(circle at 86% 12%, rgba(100, 128, 153, 0.16), transparent 35%),
    linear-gradient(150deg, #03060a 0%, #081018 50%, #05080d 100%);
  color: var(--ink);
  font-family: "Sora", "Manrope", "Avenir Next", "Segoe UI", sans-serif;
}

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

.container {
  width: min(1140px, 92%);
  margin: 0 auto;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(6, 10, 15, 0.84);
  border-bottom: 1px solid var(--line-soft);
  backdrop-filter: blur(10px);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 74px;
  gap: 1rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.32px;
}

.brand-logo {
  width: 28px;
  height: 28px;
  filter: drop-shadow(0 0 10px rgba(138, 164, 187, 0.28));
}

.menu {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.menu a:not(.btn) {
  color: var(--muted);
}

.menu a:not(.btn):hover {
  color: var(--brand-strong);
}

.menu-link-btn {
  border: none;
  background: transparent;
  color: var(--muted);
  font: inherit;
  cursor: pointer;
  padding: 0;
}

.menu-link-btn:hover {
  color: var(--brand-strong);
}

.menu-toggle {
  display: none;
  border: 1px solid var(--line);
  color: var(--ink);
  background: var(--paper);
  border-radius: 10px;
  padding: 0.44rem 0.7rem;
}

.hero {
  padding: 5rem 0 2.4rem;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 1.2rem;
}

.eyebrow {
  margin-top: 0;
  color: var(--brand-strong);
  letter-spacing: 0.11em;
  text-transform: uppercase;
  font-size: 0.76rem;
  font-weight: 700;
}

h1,
h2,
h3 {
  margin-top: 0;
}

h1 {
  font-size: clamp(2rem, 3.4vw, 3.2rem);
  line-height: 1.08;
  margin-bottom: 0.9rem;
}

.lead {
  max-width: 58ch;
  color: var(--muted);
}

.hero-actions {
  display: flex;
  gap: 0.8rem;
  margin-top: 1.15rem;
  flex-wrap: wrap;
}

.hero-card,
.card,
.contact-form,
.login-card,
.product-modal-content {
  background: linear-gradient(145deg, rgba(18, 28, 39, 0.92), rgba(11, 18, 27, 0.94));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.card,
.hero-card {
  padding: 1rem;
}

.hero-logo-card {
  display: grid;
  place-items: center;
}

.hero-badge {
  width: min(100%, 420px);
  border-radius: 14px;
}

.accent {
  color: #3eb7ff;
}

.section {
  padding: 3.2rem 0;
}

.section.alt {
  background: linear-gradient(180deg, rgba(20, 31, 44, 0.25), rgba(8, 13, 20, 0));
}

.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

label {
  display: grid;
  gap: 0.35rem;
  color: var(--muted);
  font-size: 0.94rem;
}

input,
textarea,
select {
  border: 1px solid var(--line);
  color: var(--ink);
  background: var(--bg-soft);
  border-radius: 10px;
  padding: 0.62rem 0.72rem;
  font: inherit;
}

input:focus,
textarea:focus,
select:focus {
  border-color: var(--brand);
  outline: 1px solid rgba(142, 168, 191, 0.18);
}

.btn {
  border: 1px solid transparent;
  background: linear-gradient(145deg, #89a2b8, #68849c);
  color: #03101c;
  border-radius: 10px;
  padding: 0.62rem 0.95rem;
  font-weight: 700;
  cursor: pointer;
}

.btn:hover {
  filter: brightness(1.05);
}

.btn.ghost {
  color: var(--ink);
  background: linear-gradient(145deg, rgba(18, 28, 39, 0.82), rgba(11, 18, 27, 0.95));
  border: 1px solid var(--line);
}

.form-feedback {
  min-height: 1.2rem;
  margin: 0;
  color: var(--brand-strong);
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.contact-form {
  padding: 1rem;
  display: grid;
  gap: 0.75rem;
}

.contact-info {
  color: var(--muted);
  padding-left: 1.1rem;
}

.store-toolbar {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.8rem;
  margin-bottom: 1rem;
}

.promo-banner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
  border: 1px solid rgba(69, 137, 198, 0.38);
  background:
    radial-gradient(circle at 80% 50%, rgba(39, 138, 219, 0.34), transparent 42%),
    linear-gradient(130deg, rgba(10, 18, 31, 0.96), rgba(12, 24, 42, 0.9));
}

.promo-banner h2 {
  margin-bottom: 0.35rem;
}

.promo-banner p {
  color: var(--muted);
}

.promo-visual {
  min-height: 180px;
  border-radius: 14px;
  background:
    radial-gradient(circle at 65% 42%, rgba(62, 183, 255, 0.42), rgba(62, 183, 255, 0.06) 35%, transparent 65%),
    radial-gradient(circle at 40% 60%, rgba(161, 205, 237, 0.25), transparent 48%),
    linear-gradient(140deg, rgba(17, 27, 40, 0.93), rgba(8, 13, 20, 0.98));
  border: 1px solid rgba(125, 175, 218, 0.35);
}

.category-pills {
  display: block;
  margin-bottom: 1rem;
}

.category-pills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 0.7rem;
}

.pill {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: linear-gradient(145deg, rgba(17, 27, 40, 0.94), rgba(8, 14, 23, 0.96));
  color: var(--ink);
  padding: 0.62rem 0.8rem;
  font-weight: 600;
  cursor: pointer;
}

.pill.is-active {
  border-color: rgba(73, 153, 224, 0.5);
  box-shadow: 0 0 0 1px rgba(73, 153, 224, 0.28) inset;
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.section-head h2 {
  margin: 0.3rem 0 1rem;
}

.field-group {
  display: grid;
  gap: 0.35rem;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.product-card {
  display: grid;
  gap: 0.65rem;
  border: 1px solid rgba(90, 133, 169, 0.28);
}

.product-preview,
.modal-preview {
  background:
    radial-gradient(circle at 28% 18%, rgba(255, 255, 255, 0.16), transparent 38%),
    linear-gradient(145deg, color-mix(in srgb, var(--preview) 74%, #111827), #080c12);
  border: 1px solid var(--line);
  border-radius: 12px;
}

.product-preview {
  height: 138px;
}

.modal-preview {
  height: 220px;
}

.product-image {
  width: 100%;
  height: 138px;
  border-radius: 12px;
  object-fit: cover;
  border: 1px solid var(--line);
}

.stl-preview {
  height: 138px;
  border-radius: 12px;
  border: 1px solid rgba(101, 175, 236, 0.35);
  background:
    radial-gradient(circle at 75% 20%, rgba(60, 164, 239, 0.28), transparent 44%),
    linear-gradient(145deg, rgba(12, 21, 34, 0.95), rgba(7, 12, 20, 0.97));
  display: grid;
  place-items: center;
  text-align: center;
}

.stl-preview span {
  font-weight: 800;
  letter-spacing: 0.08em;
}

.stl-preview small {
  color: var(--muted);
}

.modal-main-image {
  width: 100%;
  height: 220px;
  border-radius: 12px;
  object-fit: cover;
  border: 1px solid var(--line);
}

.stl-main {
  width: 100%;
  min-height: 220px;
  border-radius: 12px;
  border: 1px solid rgba(101, 175, 236, 0.35);
  background:
    radial-gradient(circle at 70% 28%, rgba(62, 183, 255, 0.34), transparent 48%),
    linear-gradient(145deg, rgba(13, 21, 32, 0.96), rgba(8, 13, 20, 0.98));
  display: grid;
  grid-template-rows: 1fr auto;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem;
  text-align: center;
}

.stl-main span {
  font-weight: 800;
  letter-spacing: 0.1em;
}

.stl-main small {
  color: var(--muted);
}

.stl-controls {
  display: flex;
  gap: 0.45rem;
  justify-content: center;
}

.stl-controls .btn {
  min-width: 78px;
  padding: 0.4rem 0.6rem;
}

.stl-canvas {
  width: 100%;
  min-height: 220px;
  height: clamp(220px, 36vh, 360px);
  border-radius: 10px;
  border: 1px solid rgba(138, 186, 224, 0.28);
  background:
    radial-gradient(circle at 72% 25%, rgba(62, 183, 255, 0.24), transparent 42%),
    linear-gradient(145deg, rgba(12, 20, 31, 0.95), rgba(7, 12, 20, 0.98));
  touch-action: none;
  cursor: grab;
}

.stl-canvas:active {
  cursor: grabbing;
}

.thumb-grid {
  margin-top: 0.55rem;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.4rem;
}

.thumb-btn {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0;
  background: transparent;
  overflow: hidden;
  cursor: pointer;
}

.thumb-btn img {
  width: 100%;
  height: 52px;
  object-fit: cover;
  display: block;
}

.thumb-tile {
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
}

.thumb-tile img {
  width: 100%;
  height: 52px;
  object-fit: cover;
  display: block;
}

.thumb-btn.is-active {
  border-color: var(--brand);
  box-shadow: 0 0 0 1px rgba(142, 168, 191, 0.28) inset;
}

.product-cat {
  color: var(--brand-strong);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin: 0;
}

.product-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.6rem;
}

.color-row,
.color-picks {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.color-dot {
  width: 14px;
  height: 14px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.4);
  display: inline-block;
}

.product-modal {
  border: none;
  background: transparent;
  width: min(760px, 94vw);
}

.product-modal::backdrop {
  background: rgba(0, 0, 0, 0.55);
}

.product-modal-content {
  padding: 1rem;
  color: var(--ink);
}

.product-modal-content p,
.product-modal-content h3,
.product-modal-content label,
.product-modal-content legend {
  color: var(--ink);
}

.product-modal-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.8rem;
}

.modal-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.modal-details {
  display: grid;
  gap: 0.7rem;
}

.color-pick {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  padding: 0.35rem 0.55rem;
  background: rgba(14, 21, 31, 0.92);
  color: var(--ink);
  cursor: pointer;
}

.color-pick.is-active {
  border-color: var(--brand);
  box-shadow: 0 0 0 1px rgba(142, 168, 191, 0.28) inset;
}

.modal-actions {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.chip {
  display: inline-block;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.32rem 0.55rem;
  color: var(--muted);
  font-size: 0.84rem;
}

.cart-drawer {
  position: fixed;
  right: 0;
  top: 0;
  height: 100vh;
  width: min(420px, 96vw);
  background: linear-gradient(180deg, rgba(8, 13, 20, 0.98), rgba(6, 10, 15, 0.98));
  border-left: 1px solid var(--line);
  box-shadow: -20px 0 42px rgba(0, 0, 0, 0.4);
  transform: translateX(104%);
  transition: transform 0.22s ease;
  z-index: 60;
  display: grid;
  grid-template-rows: auto 1fr auto;
}

.cart-drawer.is-open {
  transform: translateX(0);
}

.cart-header,
.cart-footer {
  padding: 1rem;
  border-bottom: 1px solid var(--line-soft);
}

.cart-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.cart-items {
  padding: 1rem;
  overflow: auto;
  display: grid;
  gap: 0.7rem;
}

.cart-item {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.7rem;
  display: flex;
  justify-content: space-between;
  gap: 0.8rem;
}

.cart-item p {
  margin: 0.2rem 0;
  color: var(--muted);
}

.checkout-form {
  display: grid;
  gap: 0.6rem;
}

.pay-wrap {
  display: grid;
  place-items: center;
}

.pay-card {
  width: min(640px, 100%);
}

.pay-summary {
  display: grid;
  gap: 0.25rem;
  margin: 0.7rem 0 1rem;
  padding: 0.75rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(9, 15, 24, 0.6);
}

.pay-summary p {
  margin: 0;
}

.footer {
  border-top: 1px solid var(--line-soft);
  padding: 1.4rem 0;
  color: var(--muted);
}

@media (max-width: 980px) {
  .hero-grid,
  .contact-grid,
  .modal-layout,
  .two-col {
    grid-template-columns: 1fr;
  }

  .promo-banner {
    grid-template-columns: 1fr;
  }

  .product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .menu {
    position: absolute;
    inset: 74px 0 auto 0;
    background: rgba(8, 13, 20, 0.97);
    border-bottom: 1px solid var(--line);
    padding: 0.8rem 1rem;
    display: none;
    flex-direction: column;
    align-items: flex-start;
  }

  .menu.is-open {
    display: flex;
  }

  .menu-toggle {
    display: block;
  }

  .store-toolbar,
  .product-grid {
    grid-template-columns: 1fr;
  }
}
