:root {
  --bg: #070b12;
  --panel: rgba(17, 24, 39, 0.84);
  --panel-solid: #111827;
  --ink: #f8fafc;
  --muted: #9ca3af;
  --line: rgba(148, 163, 184, 0.22);
  --brand: #10a37f;
  --brand-dark: #53e0bd;
  --accent: #10a37f;
  --soft: rgba(16, 163, 127, 0.14);
  --danger: #fb923c;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.36);
  color-scheme: dark;
}

[data-theme="light"] {
  --bg: #f4f6fb;
  --panel: rgba(255, 255, 255, 0.84);
  --panel-solid: #ffffff;
  --ink: #111827;
  --muted: #667085;
  --line: #dce3ee;
  --brand: #10a37f;
  --brand-dark: #08745b;
  --accent: #0f172a;
  --soft: #e8fff8;
  --danger: #c2410c;
  --shadow: 0 24px 70px rgba(15, 23, 42, 0.12);
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(16, 163, 127, 0.24), transparent 34rem),
    radial-gradient(circle at bottom right, rgba(59, 130, 246, 0.14), transparent 30rem),
    linear-gradient(135deg, #05070d 0%, #0a101c 55%, #111827 100%);
}

[data-theme="light"] body {
  background:
    radial-gradient(circle at top left, rgba(16, 163, 127, 0.18), transparent 32rem),
    linear-gradient(135deg, #f7f8fb 0%, #eef3f8 55%, #f9fafb 100%);
}

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

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

.app-shell {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  min-height: 100vh;
}

.landing-mode .app-shell {
  display: block;
}

.landing-mode .sidebar,
.landing-mode .toolbar,
.landing-mode #printerSubcategories,
.landing-mode #shop,
.landing-mode #add-product,
.landing-mode #cart,
.landing-mode #checkout {
  display: none;
}

.landing-mode .content {
  width: 100%;
  min-height: 100vh;
  padding: 0;
}

.store-mode .category-hero {
  display: none;
}

.theme-toggle {
  position: fixed;
  top: 22px;
  right: 22px;
  z-index: 20;
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  gap: 8px;
  padding: 0 15px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink);
  background: var(--panel);
  box-shadow: var(--shadow);
  cursor: pointer;
  font-weight: 800;
  backdrop-filter: blur(18px);
}

.theme-icon {
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  border-radius: 999px;
  color: #042017;
  background: var(--brand);
}

.music-toggle {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 25;
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  gap: 8px;
  padding: 0 15px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink);
  background: var(--panel);
  box-shadow: var(--shadow);
  cursor: pointer;
  font-weight: 800;
  backdrop-filter: blur(18px);
}

.music-icon {
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  border-radius: 999px;
  color: #042017;
  background: var(--brand);
}

.music-toggle.muted .music-icon {
  color: var(--ink);
  background: rgba(148, 163, 184, 0.24);
}

.floating-cart-button {
  position: fixed;
  left: 50%;
  bottom: 22px;
  z-index: 24;
  transform: translateX(-50%);
  box-shadow: var(--shadow);
}

.landing-mode .floating-cart-button {
  display: none;
}

.store-transition {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  place-items: center;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  background:
    radial-gradient(circle, rgba(16, 163, 127, 0.2), transparent 26rem),
    rgba(3, 7, 18, 0.94);
  transition: opacity 520ms ease, visibility 0ms linear 520ms;
}

[data-theme="light"] .store-transition {
  background:
    radial-gradient(circle, rgba(16, 163, 127, 0.18), transparent 26rem),
    rgba(248, 250, 252, 0.94);
}

.store-transition.active {
  opacity: 1;
  visibility: visible;
  transition: opacity 520ms ease;
}

.transition-logo {
  display: grid;
  justify-items: center;
  gap: 18px;
  transform: scale(0.94);
  opacity: 0;
}

.store-transition.active .transition-logo {
  animation: logoReveal 3s ease both;
}

.transition-logo .brand-mark {
  width: clamp(92px, 13vw, 150px);
  height: clamp(92px, 13vw, 150px);
  border-radius: 34px;
  font-size: clamp(1.55rem, 3vw, 2.35rem);
}

.transition-logo strong {
  font-size: clamp(2.4rem, 8vw, 7rem);
  letter-spacing: -0.08em;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 28px;
  padding: 26px;
  border-right: 1px solid var(--line);
  background: rgba(7, 11, 18, 0.72);
  backdrop-filter: blur(20px);
}

[data-theme="light"] .sidebar {
  background: rgba(255, 255, 255, 0.72);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border-radius: 16px;
  color: #ffffff;
  font-weight: 800;
  font-size: 13px;
  letter-spacing: 0.5px;
  background: linear-gradient(135deg, var(--brand), #0f766e);
  box-shadow: 0 14px 30px rgba(16, 163, 127, 0.26);
}

.brand strong,
.brand small {
  display: block;
}

.brand small,
.muted {
  color: var(--muted);
}

.nav-list {
  display: grid;
  gap: 8px;
}

.nav-list a {
  padding: 12px 14px;
  border-radius: 14px;
  color: #cbd5e1;
  font-weight: 600;
}

[data-theme="light"] .nav-list a {
  color: #344054;
}

.nav-list a:hover,
.nav-list a.active {
  background: var(--accent);
  color: #042017;
}

[data-theme="light"] .nav-list a:hover,
[data-theme="light"] .nav-list a.active {
  color: #ffffff;
}

.assistant-card {
  margin-top: auto;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--panel-solid);
  box-shadow: 0 16px 50px rgba(0, 0, 0, 0.28);
}

.assistant-card p {
  margin: 12px 0 8px;
  color: var(--muted);
}

.status-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--brand);
  box-shadow: 0 0 0 6px rgba(16, 163, 127, 0.14);
}

.content {
  width: min(1180px, 100%);
  margin: 0 auto;
  padding: 34px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(360px, 1.1fr);
  gap: 26px;
  align-items: stretch;
  margin-bottom: 24px;
}

.category-hero {
  position: relative;
  min-height: min(760px, calc(100vh - 68px));
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 36px;
  padding: clamp(26px, 5vw, 62px);
  background:
    radial-gradient(circle at 72% 42%, rgba(16, 163, 127, 0.24), transparent 22rem),
    radial-gradient(circle at 22% 78%, rgba(59, 130, 246, 0.16), transparent 21rem),
    linear-gradient(135deg, rgba(17, 24, 39, 0.92), rgba(3, 7, 18, 0.78));
  box-shadow: var(--shadow);
  isolation: isolate;
}

.landing-mode .category-hero {
  min-height: 100vh;
  margin: 0;
  border: 0;
  border-radius: 0;
  grid-template-columns: 1fr;
  grid-template-rows: auto auto;
  align-content: center;
  align-items: end;
  justify-items: center;
  gap: clamp(0px, 1vh, 10px);
  padding: clamp(70px, 8vh, 100px) clamp(22px, 5vw, 70px) clamp(54px, 8vh, 88px);
  transition: opacity 520ms ease, transform 520ms ease, filter 520ms ease;
}

.landing-mode.transitioning .category-hero,
.transitioning .theme-toggle,
.transitioning .music-toggle {
  opacity: 0;
  transform: scale(0.96);
  filter: blur(12px);
  pointer-events: none;
}

[data-theme="light"] .category-hero {
  background:
    radial-gradient(circle at 72% 42%, rgba(16, 163, 127, 0.2), transparent 22rem),
    radial-gradient(circle at 22% 78%, rgba(59, 130, 246, 0.13), transparent 21rem),
    linear-gradient(135deg, rgba(255, 255, 255, 0.92), rgba(241, 245, 249, 0.78));
}

.category-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(rgba(148, 163, 184, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 163, 184, 0.08) 1px, transparent 1px);
  background-size: 46px 46px;
  mask-image: radial-gradient(circle at 70% 45%, black, transparent 72%);
}

.category-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  max-width: 620px;
  z-index: 2;
}

.landing-mode .category-copy {
  align-items: center;
  max-width: 860px;
  text-align: center;
}

.landing-mode .hero-actions {
  justify-content: center;
}

.category-copy h1 {
  margin-bottom: 20px;
  text-shadow: 0 18px 56px rgba(0, 0, 0, 0.35);
}

.category-stage {
  position: relative;
  display: grid;
  min-height: 520px;
  place-items: center;
  perspective: 1200px;
}

.landing-mode .category-stage {
  min-height: min(46vh, 460px);
  width: 100%;
  order: -1;
}

.category-stage::before {
  content: "";
  position: absolute;
  width: min(74vw, 560px);
  height: min(74vw, 560px);
  border-radius: 999px;
  background: radial-gradient(circle, rgba(16, 163, 127, 0.2), transparent 64%);
  filter: blur(10px);
}

.orbital-ring {
  position: absolute;
  border: 1px solid rgba(16, 163, 127, 0.28);
  border-radius: 999px;
  transform: rotateX(68deg) rotateZ(-18deg);
}

.ring-one {
  width: min(72vw, 520px);
  height: min(72vw, 520px);
  animation: orbitSpin 18s linear infinite;
}

.ring-two {
  width: min(54vw, 390px);
  height: min(54vw, 390px);
  animation: orbitSpin 12s linear infinite reverse;
}

.floating-icon {
  position: relative;
  --category-image-scale: 1;
  width: min(64vw, 420px);
  height: min(64vw, 420px);
  transform-style: preserve-3d;
  animation: iconFloat 4.6s ease-in-out infinite;
  filter: drop-shadow(0 34px 48px rgba(0, 0, 0, 0.44));
  cursor: pointer;
}

.floating-icon::before {
  content: "";
  position: absolute;
  inset: 11%;
  border-radius: 34px;
  background: linear-gradient(145deg, rgba(16, 163, 127, 0.14), rgba(59, 130, 246, 0.08));
  transform: translateZ(-60px) rotateX(12deg) rotateY(-12deg);
}

.floating-icon span {
  position: absolute;
  display: block;
}

.category-image {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 2;
  width: calc(100% * var(--category-image-scale));
  height: calc(100% * var(--category-image-scale));
  object-fit: contain;
  filter: drop-shadow(0 28px 36px rgba(0, 0, 0, 0.5));
  transform: translate(-50%, -50%);
}

.printer-image-icon::before,
.category-image-icon::before {
  background: radial-gradient(circle, rgba(16, 163, 127, 0.16), transparent 68%);
}

.printer-image-icon {
  --category-image-scale: 1.9;
}

.printer-image-icon .category-image {
  opacity: 1;
}

.accessory-image-icon,
.filament-image-icon,
.laser-image-icon,
.scanner-image-icon {
  --category-image-scale: 1;
}

.laser-image-icon::before {
  background: radial-gradient(circle, rgba(239, 68, 68, 0.16), transparent 68%);
}

.scanner-image-icon::before {
  background: radial-gradient(circle, rgba(59, 130, 246, 0.16), transparent 68%);
}

.printer-frame {
  inset: 16% 12% 18%;
  border: clamp(8px, 1.5vw, 14px) solid #19c99c;
  border-bottom-width: clamp(14px, 2vw, 22px);
  border-radius: 24px;
  transform: rotateY(-12deg) rotateX(8deg) translateZ(42px);
}

.printer-gantry {
  top: 32%;
  left: 20%;
  width: 60%;
  height: 12px;
  border-radius: 999px;
  background: #e5fdf6;
  transform: rotateY(-12deg) rotateX(8deg) translateZ(70px);
}

.printer-bed {
  left: 24%;
  bottom: 22%;
  width: 58%;
  height: 54px;
  border-radius: 14px;
  background: linear-gradient(135deg, #1f2937, #64748b);
  transform: skewX(-18deg) rotateY(-12deg) rotateX(58deg) translateZ(48px);
}

.printer-head {
  top: 36%;
  left: 49%;
  width: 54px;
  height: 70px;
  border-radius: 14px 14px 24px 24px;
  background: linear-gradient(135deg, #f8fafc, #94a3b8);
  transform: rotateY(-12deg) rotateX(8deg) translateZ(96px);
}

.printer-cube {
  left: 42%;
  bottom: 30%;
  width: 86px;
  height: 86px;
  border-radius: 18px;
  background: linear-gradient(135deg, #10a37f, #0f766e);
  transform: rotateY(-28deg) rotateX(18deg) translateZ(84px);
}

.accessory-icon .tool-disc {
  inset: 18%;
  border-radius: 999px;
  border: 18px solid #19c99c;
  transform: rotateY(-18deg) rotateX(10deg) translateZ(54px);
}

.accessory-icon .wrench-handle {
  left: 45%;
  top: 24%;
  width: 42px;
  height: 250px;
  border-radius: 999px;
  background: linear-gradient(180deg, #f8fafc, #94a3b8);
  transform: rotate(44deg) rotateY(-18deg) translateZ(86px);
}

.accessory-icon .wrench-head {
  left: 48%;
  top: 17%;
  width: 112px;
  height: 112px;
  border: 24px solid #f8fafc;
  border-right-color: transparent;
  border-radius: 999px;
  transform: rotate(44deg) rotateY(-18deg) translateZ(100px);
}

.accessory-icon .nozzle {
  left: 20%;
  bottom: 18%;
  width: 96px;
  height: 130px;
  clip-path: polygon(16% 0, 84% 0, 100% 54%, 58% 100%, 42% 100%, 0 54%);
  background: linear-gradient(135deg, #f59e0b, #f97316);
  transform: rotate(-24deg) rotateY(-12deg) translateZ(90px);
}

.filament-icon .spool-outer {
  inset: 10%;
  border-radius: 999px;
  background: conic-gradient(from 120deg, #10a37f, #53e0bd, #1d4ed8, #10a37f);
  transform: rotateY(-18deg) rotateX(10deg) translateZ(58px);
}

.filament-icon .spool-inner {
  inset: 31%;
  border: 28px solid rgba(248, 250, 252, 0.9);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.8);
  transform: rotateY(-18deg) rotateX(10deg) translateZ(88px);
}

.filament-icon .filament-strand {
  right: 3%;
  bottom: 20%;
  width: 46%;
  height: 110px;
  border: 16px solid #53e0bd;
  border-left: 0;
  border-bottom: 0;
  border-radius: 0 999px 0 0;
  transform: rotate(12deg) translateZ(112px);
}

.category-hero.is-switching .floating-icon {
  animation: iconFloat 4.6s ease-in-out infinite, iconSlideOut 280ms ease forwards;
}

.category-hero.is-entering .floating-icon {
  animation: iconFloat 4.6s ease-in-out infinite, iconSlideIn 420ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

.category-arrow {
  position: absolute;
  top: 50%;
  z-index: 4;
  display: grid;
  width: clamp(48px, 6vw, 68px);
  height: clamp(48px, 6vw, 68px);
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.28);
  cursor: pointer;
  font-size: clamp(2.1rem, 4vw, 3.2rem);
  line-height: 1;
  transform: translateY(-50%);
  backdrop-filter: blur(18px);
}

[data-theme="light"] .category-arrow {
  background: rgba(255, 255, 255, 0.72);
}

.category-arrow:hover {
  background: var(--brand);
  color: #042017;
}

.category-arrow-left {
  left: clamp(54px, 8vw, 132px);
}

.category-arrow-right {
  right: clamp(54px, 8vw, 132px);
}

@keyframes logoReveal {
  0% {
    opacity: 0;
    transform: scale(0.9) translateY(18px);
    filter: blur(14px);
  }
  22%, 78% {
    opacity: 1;
    transform: scale(1) translateY(0);
    filter: blur(0);
  }
  100% {
    opacity: 0;
    transform: scale(1.08) translateY(-18px);
    filter: blur(12px);
  }
}

.category-dots {
  position: absolute;
  right: clamp(26px, 4vw, 54px);
  bottom: clamp(24px, 4vw, 42px);
  z-index: 5;
  display: flex;
  gap: 10px;
}

.category-dot {
  width: 12px;
  height: 12px;
  border: 0;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.48);
  cursor: pointer;
}

.category-dot.active {
  width: 34px;
  background: var(--brand);
}

@keyframes iconFloat {
  0%, 100% {
    transform: translateY(0) rotateX(0deg) rotateY(0deg);
  }
  50% {
    transform: translateY(-22px) rotateX(2deg) rotateY(-3deg);
  }
}

@keyframes orbitSpin {
  to {
    transform: rotateX(68deg) rotateZ(342deg);
  }
}

@keyframes iconSlideOut {
  to {
    opacity: 0;
    transform: translateX(var(--slide-out, -80px)) scale(0.86) rotateY(var(--slide-rotate, 18deg));
  }
}

@keyframes iconSlideIn {
  from {
    opacity: 0;
    transform: translateX(var(--slide-in, 90px)) scale(0.86) rotateY(var(--slide-rotate, -18deg));
  }
}

.hero-copy,
.prompt-card,
.section-card,
.toolbar {
  border: 1px solid var(--line);
  border-radius: 30px;
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(20px);
}

.hero-copy {
  padding: clamp(28px, 5vw, 58px);
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--brand-dark);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

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

h1 {
  max-width: 760px;
  margin-bottom: 18px;
  font-size: clamp(2.35rem, 5vw, 5rem);
  line-height: 0.95;
  letter-spacing: -0.06em;
}

h2 {
  margin-bottom: 8px;
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  letter-spacing: -0.04em;
}

.hero-text {
  max-width: 670px;
  color: var(--muted);
  font-size: 1.08rem;
  line-height: 1.7;
}

.hero-actions,
.product-actions,
.cart-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.button {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 18px;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 800;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.button:hover {
  transform: translateY(-1px);
}

.button.primary {
  color: #042017;
  background: var(--accent);
  box-shadow: 0 14px 30px rgba(16, 163, 127, 0.22);
}

[data-theme="light"] .button.primary {
  color: #ffffff;
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.2);
}

.button.secondary {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--line);
}

[data-theme="light"] .button.secondary {
  color: var(--accent);
  background: #ffffff;
}

.button.ghost {
  color: var(--muted);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line);
}

[data-theme="light"] .button.ghost {
  background: #f8fafc;
}

.button.danger {
  color: var(--danger);
  background: rgba(251, 146, 60, 0.12);
}

[data-theme="light"] .button.danger {
  background: #fff7ed;
}

.prompt-card {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 14px;
  padding: 24px;
}

.prompt-header {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}

.prompt-header span {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: #475569;
}

.message {
  max-width: 88%;
  padding: 14px 16px;
  border-radius: 20px;
  line-height: 1.55;
}

.user-message {
  align-self: flex-end;
  color: #042017;
  background: var(--accent);
  border-bottom-right-radius: 6px;
}

[data-theme="light"] .user-message {
  color: #ffffff;
}

.bot-message {
  align-self: flex-start;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid var(--line);
  border-bottom-left-radius: 6px;
}

[data-theme="light"] .bot-message {
  background: #ffffff;
}

.toolbar {
  display: grid;
  grid-template-columns: 1fr 220px;
  gap: 14px;
  margin-bottom: 24px;
  padding: 18px;
}

label {
  display: grid;
  gap: 8px;
  color: #d1d5db;
  font-size: 0.9rem;
  font-weight: 700;
}

[data-theme="light"] label {
  color: #344054;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 13px 14px;
  color: var(--ink);
  background: rgba(3, 7, 18, 0.72);
  outline: none;
}

[data-theme="light"] input,
[data-theme="light"] select,
[data-theme="light"] textarea {
  background: #ffffff;
}

input::placeholder,
textarea::placeholder {
  color: #6b7280;
}

textarea {
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 4px rgba(16, 163, 127, 0.14);
}

.section-card {
  margin-bottom: 24px;
  padding: clamp(20px, 4vw, 32px);
}

.page-hero-card {
  margin-top: 24px;
}

.section-heading {
  display: flex;
  gap: 18px;
  align-items: start;
  justify-content: space-between;
  margin-bottom: 22px;
}

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

.subcategory-deck {
  position: relative;
  overflow: hidden;
  min-height: 520px;
  border: 1px solid var(--line);
  border-radius: 30px;
  background:
    radial-gradient(circle at 68% 45%, rgba(16, 163, 127, 0.2), transparent 22rem),
    linear-gradient(135deg, rgba(15, 23, 42, 0.9), rgba(3, 7, 18, 0.62));
}

[data-theme="light"] .subcategory-deck {
  background:
    radial-gradient(circle at 68% 45%, rgba(16, 163, 127, 0.16), transparent 22rem),
    linear-gradient(135deg, rgba(255, 255, 255, 0.92), rgba(241, 245, 249, 0.74));
}

.subcategory-stage {
  display: grid;
  min-height: 520px;
  grid-template-columns: minmax(0, 0.88fr) minmax(320px, 1.12fr);
  gap: 22px;
  align-items: center;
  padding: clamp(28px, 5vw, 64px);
  animation: subcategorySlideIn 420ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

.subcategory-copy h3 {
  margin: 0 0 14px;
  font-size: clamp(2.1rem, 5vw, 4.6rem);
  line-height: 0.95;
  letter-spacing: -0.06em;
}

.subcategory-copy p:last-child {
  max-width: 560px;
  font-size: 1.08rem;
  line-height: 1.7;
}

.subcategory-floating-icon {
  position: relative;
  display: grid;
  min-height: 360px;
  place-items: center;
  animation: iconFloat 4.6s ease-in-out infinite;
  filter: drop-shadow(0 34px 48px rgba(0, 0, 0, 0.44));
}

.subcategory-floating-icon::before {
  content: "";
  position: absolute;
  width: min(58vw, 420px);
  height: min(58vw, 420px);
  border-radius: 999px;
  background: radial-gradient(circle, rgba(16, 163, 127, 0.2), transparent 66%);
  filter: blur(10px);
}

.subsection-logo {
  position: relative;
  width: min(52vw, 330px);
  height: min(52vw, 330px);
}

.subsection-logo span {
  position: absolute;
  display: block;
}

.printer-shell {
  inset: 12% 18%;
  border: 14px solid #19c99c;
  border-radius: 28px;
  background: rgba(15, 23, 42, 0.52);
}

.printer-window {
  inset: 24% 29% 34%;
  border-radius: 16px;
  background: rgba(248, 250, 252, 0.18);
}

.printer-model {
  left: 36%;
  bottom: 24%;
  width: 28%;
  height: 34%;
  clip-path: polygon(50% 0, 100% 100%, 0 100%);
  background: linear-gradient(135deg, #10a37f, #53e0bd);
}

.printer-subsection-logo.open .printer-shell {
  border-left-color: transparent;
  border-right-color: transparent;
}

.printer-subsection-logo.xxl {
  transform: scale(1.16);
}

.printer-subsection-logo.resin .printer-model {
  border-radius: 999px;
  clip-path: none;
}

.roll-outer {
  inset: 8%;
  border-radius: 999px;
  background: conic-gradient(from 140deg, #10a37f, #53e0bd, #1d4ed8, #10a37f);
}

.roll-inner {
  inset: 32%;
  border: 26px solid rgba(248, 250, 252, 0.88);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.82);
}

.filament-subsection-logo.petg .roll-outer {
  background: conic-gradient(from 140deg, #2563eb, #38bdf8, #10a37f, #2563eb);
}

.filament-subsection-logo.tpu .roll-outer {
  background: conic-gradient(from 140deg, #dc2626, #fb7185, #f97316, #dc2626);
}

.filament-subsection-logo.abs .roll-outer,
.filament-subsection-logo.engineering .roll-outer,
.filament-subsection-logo.composite .roll-outer {
  background: conic-gradient(from 140deg, #111827, #64748b, #94a3b8, #111827);
}

.roll-label,
.printer-label,
.accessory-label {
  left: 50%;
  bottom: 3%;
  min-width: 150px;
  transform: translateX(-50%);
  color: #ffffff;
  font-weight: 800;
  text-align: center;
  text-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.accessory-disc {
  inset: 14%;
  border: 22px solid #19c99c;
  border-radius: 999px;
}

.accessory-stem {
  left: 45%;
  top: 18%;
  width: 42px;
  height: 64%;
  border-radius: 999px;
  background: linear-gradient(180deg, #f8fafc, #94a3b8);
  transform: rotate(42deg);
}

/* Laser subcategory logos - reuse accessory-disc + stem with red/amber accents */
.laser-subsection-logo .accessory-disc {
  border-color: #ef4444;
  background: radial-gradient(circle, rgba(239, 68, 68, 0.18), transparent 70%);
}

.laser-subsection-logo.pro .accessory-disc,
.laser-subsection-logo.t1 .accessory-disc {
  border-color: #f59e0b;
  background: radial-gradient(circle, rgba(245, 158, 11, 0.24), transparent 70%);
}

.laser-subsection-logo.entry .accessory-disc {
  border-color: #06b6d4;
}

.laser-label {
  left: 50%;
  bottom: 3%;
  min-width: 150px;
  transform: translateX(-50%);
  color: #ffffff;
  font-weight: 800;
  text-align: center;
  text-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

/* Scanner subcategory logos - reuse accessory-disc + stem with blue/purple accents */
.scanner-subsection-logo .accessory-disc {
  border-color: #3b82f6;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.18), transparent 70%);
}

.scanner-subsection-logo.pro .accessory-disc {
  border-color: #8b5cf6;
  background: radial-gradient(circle, rgba(139, 92, 246, 0.22), transparent 70%);
}

.scanner-label {
  left: 50%;
  bottom: 3%;
  min-width: 150px;
  transform: translateX(-50%);
  color: #ffffff;
  font-weight: 800;
  text-align: center;
  text-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

/* Resin filament subcategory logo - amber pour */
.filament-subsection-logo.resin .roll-outer {
  background: conic-gradient(from 140deg, #f59e0b, #fbbf24, #f97316, #f59e0b);
}

.subcategory-actions {
  justify-content: center;
  margin-top: 18px;
}

@keyframes subcategorySlideIn {
  from {
    opacity: 0;
    transform: translateX(var(--slide-in, 90px)) scale(0.96);
  }
}

.product-card {
  display: grid;
  gap: 16px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.9);
}

[data-theme="light"] .product-card {
  background: #ffffff;
}

.spool-art {
  position: relative;
  min-height: 160px;
  overflow: hidden;
  border-radius: 20px;
  background: linear-gradient(135deg, var(--swatch), #111827);
}

[data-theme="light"] .spool-art {
  background: linear-gradient(135deg, var(--swatch), #f8fafc);
}

.spool-art::before,
.spool-art::after {
  content: "";
  position: absolute;
  inset: 28px;
  border: 22px solid rgba(255, 255, 255, 0.54);
  border-radius: 999px;
}

[data-theme="light"] .spool-art::before,
[data-theme="light"] .spool-art::after {
  border-color: rgba(255, 255, 255, 0.82);
}

.spool-art::after {
  inset: 64px;
  border-width: 18px;
  background: rgba(15, 23, 42, 0.46);
}

[data-theme="light"] .spool-art::after {
  background: rgba(255, 255, 255, 0.65);
}

.product-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 6px 10px;
  color: #d1fae5;
  background: rgba(16, 163, 127, 0.14);
  font-size: 0.78rem;
  font-weight: 800;
}

[data-theme="light"] .pill {
  color: #344054;
  background: #f2f4f7;
}

.price-line {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
}

.price-line strong {
  font-size: 1.5rem;
}

.two-column {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 28px;
  align-items: start;
}

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

.form-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.cart-list {
  display: grid;
  gap: 12px;
}

.cart-item,
.empty-state {
  display: flex;
  gap: 14px;
  align-items: center;
  justify-content: space-between;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.9);
}

[data-theme="light"] .cart-item,
[data-theme="light"] .empty-state {
  background: #ffffff;
}

.cart-item h3,
.product-card h3 {
  margin: 0 0 6px;
}

.quantity-control {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 999px;
}

.quantity-control button {
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.08);
  font-weight: 800;
}

[data-theme="light"] .quantity-control button {
  background: #eef2f7;
}

.cart-summary {
  display: flex;
  justify-content: space-between;
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  font-size: 1.25rem;
}

.page-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: flex-end;
  margin-top: 22px;
}

.checkout-total-card {
  display: grid;
  gap: 8px;
  margin-top: 22px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(15, 23, 42, 0.74);
}

[data-theme="light"] .checkout-total-card {
  background: #ffffff;
}

.checkout-total-card strong {
  font-size: 1.8rem;
}

.order-message {
  min-height: 24px;
  margin: 0;
  color: var(--brand-dark);
  font-weight: 800;
}

@media (max-width: 980px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    height: auto;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
  }

  .nav-list {
    grid-auto-flow: column;
    overflow-x: auto;
  }

  .assistant-card {
    display: none;
  }

  .hero,
  .two-column,
  .toolbar,
  .subcategory-stage {
    grid-template-columns: 1fr;
  }

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

  .subcategory-stage {
    text-align: center;
  }
}

@media (max-width: 640px) {
  .content,
  .sidebar {
    padding: 18px;
  }

  .brand {
    width: 100%;
  }

  .nav-list {
    width: 100%;
  }

  .hero-copy,
  .prompt-card,
  .section-card,
  .toolbar {
    border-radius: 22px;
  }

  .product-grid,
  .form-row {
    grid-template-columns: 1fr;
  }

  .subcategory-deck,
  .subcategory-stage {
    min-height: 620px;
  }

  .cart-item {
    align-items: stretch;
    flex-direction: column;
  }

  .category-arrow-left {
    left: 18px;
  }

  .category-arrow-right {
    right: 18px;
  }
}
