@import url('https://fonts.googleapis.com/css2?family=Share+Tech+Mono&display=swap');

:root {
  --bg: #060606;
  --surface: #0a0a0a;
  --surface2: #111111;
  --text: #e8e8e8;
  --muted: #6b6b6b;
  --accent: #00ff41;
  --accent-dim: #00cc34;
  --accent-hover: #33ff66;
  --kali-blue: #557aff;
  --border: rgba(0, 255, 65, 0.2);
  --glow: rgba(0, 255, 65, 0.45);
  --radius: 6px;
  --font: 'Outfit', 'DM Sans', system-ui, sans-serif;
  --font-mono: 'Share Tech Mono', 'Consolas', monospace;
}

@keyframes glow-pulse {
  0%, 100% { opacity: 1; filter: brightness(1); }
  50% { opacity: 0.92; filter: brightness(1.08); }
}

@keyframes scan-line {
  0% { transform: translateY(-100%); }
  100% { transform: translateY(100vh); }
}

@keyframes glitch {
  0% { transform: translate(0); }
  20% { transform: translate(-1px, 1px); }
  40% { transform: translate(1px, -1px); }
  60% { transform: translate(-1px, -1px); }
  80% { transform: translate(1px, 1px); }
  100% { transform: translate(0); }
}

@keyframes cursor-blink {
  0%, 50% { opacity: 1; }
  51%, 100% { opacity: 0; }
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

/* Skip link – only visible when focused (keyboard nav) */
.skip-link {
  position: absolute;
  top: -100px;
  left: 20px;
  z-index: 1000;
  padding: 12px 20px;
  background: var(--accent);
  color: var(--bg);
  font-weight: 600;
  text-decoration: none;
  border-radius: var(--radius);
  transition: top 0.2s;
}
.skip-link:focus {
  top: 16px;
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  box-shadow: 0 0 20px var(--glow);
}

/* Current page in nav */
.nav a.current {
  color: var(--text);
}
.nav a[aria-current="page"] {
  color: var(--accent);
  text-shadow: 0 0 8px var(--glow);
}

body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  position: relative;
}

/* Matrix scan-line overlay */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0, 0, 0, 0.12) 2px,
    rgba(0, 0, 0, 0.12) 4px
  );
  pointer-events: none;
  z-index: 1;
  opacity: 0.6;
}


/* Subtle grid background */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(0, 255, 65, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 255, 65, 0.03) 1px, transparent 1px);
  background-size: 24px 24px;
  pointer-events: none;
  z-index: 0;
}

a {
  color: var(--accent);
  text-decoration: none;
  text-shadow: 0 0 8px var(--glow);
}

a:hover {
  color: var(--accent-hover);
  text-decoration: underline;
  text-shadow: 0 0 12px var(--glow);
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
}

main {
  position: relative;
  z-index: 2;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10, 10, 10, 0.95);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(10px);
  box-shadow: 0 0 30px rgba(0, 255, 65, 0.08);
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 1.35rem;
  color: var(--accent);
  text-decoration: none;
  letter-spacing: 0.05em;
  text-shadow: 0 0 10px var(--glow);
}

.logo:hover {
  text-decoration: none;
  color: var(--accent-hover);
  text-shadow: 0 0 16px var(--glow);
  animation: glow-pulse 1.5s ease-in-out infinite;
}

.nav {
  display: flex;
  align-items: center;
  gap: 24px;
}

.nav a {
  color: var(--muted);
  text-decoration: none;
  font-weight: 500;
}

.nav a:hover {
  color: var(--text);
  text-decoration: none;
}

.nav-cart {
  color: var(--accent) !important;
  text-shadow: 0 0 8px var(--glow);
  font-family: var(--font-mono);
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text);
  font-size: 1.5rem;
  cursor: pointer;
}

@media (max-width: 768px) {
  .nav {
    display: none;
  }
  .nav.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--surface);
    padding: 20px;
    border-bottom: 1px solid var(--border);
  }
  .menu-toggle {
    display: block;
  }
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 12px 24px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  border: none;
  transition: transform 0.15s, background 0.15s;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background: var(--accent);
  color: #000;
  border: 1px solid var(--accent);
  font-family: var(--font-mono);
  letter-spacing: 0.05em;
  box-shadow: 0 0 20px var(--glow), inset 0 0 20px rgba(0, 255, 65, 0.1);
}

.btn-primary:hover {
  background: var(--accent-hover);
  color: #000;
  text-decoration: none;
  box-shadow: 0 0 28px var(--glow), inset 0 0 20px rgba(0, 255, 65, 0.15);
}

.btn-primary:focus-visible,
.btn-secondary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.btn-secondary {
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--accent);
  font-family: var(--font-mono);
  letter-spacing: 0.05em;
  box-shadow: 0 0 15px rgba(0, 255, 65, 0.2);
}

.btn-secondary:hover {
  background: rgba(0, 255, 65, 0.1);
  text-decoration: none;
  color: var(--accent-hover);
  box-shadow: 0 0 25px var(--glow);
}

/* Hero */
.hero {
  padding: 80px 20px 100px;
  text-align: center;
  background: linear-gradient(180deg, rgba(0, 255, 65, 0.03) 0%, transparent 50%, var(--bg) 100%);
}

.hero h1 {
  font-family: var(--font-mono);
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  margin: 0 0 16px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
  color: var(--accent);
  text-shadow: 0 0 20px var(--glow);
  letter-spacing: 0.05em;
}

.hero h1:hover {
  animation: glow-pulse 2s ease-in-out infinite;
}

.hero p {
  color: var(--muted);
  font-size: 1.1rem;
  max-width: 500px;
  margin: 0 auto 28px;
}

/* Browse ideas – links to Printables, Maker World, Thingiverse */
.browse-ideas {
  padding: 48px 20px 32px;
  background: var(--surface);
  border-top: 1px solid var(--border);
}

.browse-ideas h2 {
  text-align: center;
  margin-bottom: 8px;
  font-size: 1.5rem;
  font-family: var(--font-mono);
  color: var(--accent);
  text-shadow: 0 0 12px var(--glow);
  letter-spacing: 0.05em;
}

.browse-ideas-intro {
  text-align: center;
  color: var(--muted);
  font-size: 0.95rem;
  max-width: 560px;
  margin: 0 auto 12px;
  line-height: 1.5;
}

.browse-ideas-note {
  text-align: center;
  color: var(--accent);
  font-size: 0.9rem;
  max-width: 560px;
  margin: 0 auto 24px;
  line-height: 1.5;
}

.browse-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

.browse-links a {
  display: inline-flex;
  align-items: center;
  padding: 12px 20px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
  font-family: var(--font-mono);
  letter-spacing: 0.03em;
  transition: border-color 0.2s, box-shadow 0.2s, color 0.2s;
}

.browse-links a:hover {
  border-color: var(--accent);
  color: var(--accent);
  box-shadow: 0 0 15px var(--glow);
  text-decoration: none;
}

.browse-links a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Featured */
.featured {
  padding: 60px 0 40px;
}

.featured h2 {
  text-align: center;
  margin-bottom: 32px;
  font-size: 1.5rem;
  font-family: var(--font-mono);
  color: var(--accent);
  text-shadow: 0 0 12px var(--glow);
  letter-spacing: 0.05em;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 24px;
}

.product-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
}

.product-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 0 25px var(--glow), inset 0 0 30px rgba(0, 255, 65, 0.03);
  transition: border-color 0.2s, transform 0.2s, box-shadow 0.25s;
}

.product-card:focus-within {
  outline: 1px solid var(--accent);
  outline-offset: 2px;
  box-shadow: 0 0 20px var(--glow);
}

.product-card .thumb {
  aspect-ratio: 1;
  background: var(--surface2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  color: var(--muted);
  overflow: hidden;
}

.product-card .thumb img,
.product-card .thumb video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-card .thumb .product-thumb-video {
  display: block;
}

.thumb-video-wrap {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 100%;
}

.thumb-video-wrap video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.drag-hint {
  position: absolute;
  bottom: 8px;
  left: 50%;
  -webkit-transform: translateX(-50%);
  transform: translateX(-50%);
  font-size: 0.75rem;
  color: var(--muted);
  background: rgba(0, 0, 0, 0.7);
  padding: 4px 8px;
  border-radius: 4px;
  pointer-events: none;
  font-family: var(--font-mono);
}

.modal .modal-thumb .thumb-video-wrap {
  width: 100%;
  height: 100%;
  min-height: 200px;
}

.modal .modal-thumb .thumb-video-wrap video {
  border-radius: 8px;
}

.product-thumb-video,
.modal-thumb-video {
  cursor: grab;
  -webkit-user-select: none;
  user-select: none;
}

.product-thumb-video.video-dragging,
.modal-thumb-video.video-dragging {
  cursor: grabbing;
}

.product-card .info {
  padding: 16px;
}

.product-card .name {
  font-weight: 700;
  margin: 0 0 4px;
  font-size: 1.05rem;
}

.product-card .tag {
  font-size: 0.75rem;
  color: var(--muted);
  margin-bottom: 8px;
}

.product-card .price {
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 12px;
  text-shadow: 0 0 8px var(--glow);
  font-family: var(--font-mono);
}

.product-card .quick-add {
  width: 100%;
  padding: 10px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-weight: 600;
  cursor: pointer;
  font-family: var(--font-mono);
  letter-spacing: 0.03em;
  transition: box-shadow 0.2s;
}

.product-card .quick-add:hover {
  background: var(--accent);
  color: #000;
  border-color: var(--accent);
  box-shadow: 0 0 15px var(--glow);
}

.featured-cta {
  text-align: center;
  margin-top: 32px;
}

.featured-cta a {
  font-weight: 600;
  text-shadow: 0 0 8px var(--glow);
}

/* About preview */
.about-preview {
  padding: 60px 0;
  background: var(--surface);
}

.about-preview h2 {
  text-align: center;
  margin-bottom: 16px;
  font-size: 1.5rem;
  font-family: var(--font-mono);
  color: var(--accent);
  text-shadow: 0 0 12px var(--glow);
  letter-spacing: 0.05em;
}

.about-preview .about-intro {
  text-align: center;
  max-width: 560px;
  margin: 0 auto 32px;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.5;
}

.about-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
}

.about-card {
  text-align: center;
  padding: 24px;
  background: var(--bg);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.about-card:hover {
  border-color: rgba(0, 255, 65, 0.3);
  box-shadow: 0 0 20px rgba(0, 255, 65, 0.08);
}

.about-icon {
  font-size: 2rem;
  display: block;
  margin-bottom: 12px;
}

.about-card h3 {
  margin: 0 0 8px;
  font-size: 1.1rem;
}

.about-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.cta {
  padding: 48px 20px;
  text-align: center;
}

.cta p {
  margin-bottom: 16px;
  color: var(--muted);
}

.muted {
  color: var(--muted);
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 32px 20px;
  text-align: center;
  color: var(--muted);
  font-size: 0.9rem;
}

.site-footer p {
  margin: 8px 0;
}

.site-footer a {
  color: var(--muted);
  text-shadow: none;
}

.site-footer a:hover {
  color: var(--accent);
  text-shadow: 0 0 8px var(--glow);
}

.footer-contact {
  display: inline-block;
  margin-top: 12px;
}

/* Products page */
.page-title {
  padding: 40px 20px 24px;
  text-align: center;
}

.page-title h1 {
  margin: 0 0 8px;
  font-size: 1.75rem;
  font-family: var(--font-mono);
  color: var(--accent);
  text-shadow: 0 0 12px var(--glow);
  letter-spacing: 0.05em;
}

.page-title p {
  color: var(--muted);
  margin: 0;
}

.filters {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 0 20px 24px;
}

.filters button {
  padding: 8px 16px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  font-family: inherit;
  font-weight: 500;
}

.filters button:hover,
.filters button.active {
  background: var(--accent);
  color: #000;
  border-color: var(--accent);
  box-shadow: 0 0 15px var(--glow);
  font-family: var(--font-mono);
}

.products-section {
  padding: 0 20px 60px;
}

/* Cart page */
.cart-page {
  max-width: 700px;
  margin: 0 auto;
  padding: 40px 20px 80px;
}

.cart-page h1 {
  margin-bottom: 24px;
  font-family: var(--font-mono);
  color: var(--accent);
  text-shadow: 0 0 12px var(--glow);
  letter-spacing: 0.05em;
}

.cart-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
}

.cart-item .thumb {
  width: 64px;
  height: 64px;
  background: var(--surface2);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  overflow: hidden;
  flex-shrink: 0;
}

.cart-item .thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cart-item .details {
  flex: 1;
}

.cart-item .name {
  font-weight: 600;
  margin: 0 0 4px;
}

.cart-item .variant {
  font-size: 0.9rem;
  color: var(--muted);
  margin: 0;
}

.cart-item .qty {
  width: 48px;
  padding: 6px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-family: inherit;
  text-align: center;
}

.cart-item .price {
  font-weight: 700;
  min-width: 80px;
  text-align: right;
}

.cart-item .remove {
  background: none;
  border: none;
  color: var(--muted);
  cursor: pointer;
  padding: 4px;
  font-size: 1.2rem;
}

.cart-item .remove:hover {
  color: #ef4444;
}

.cart-summary {
  margin-top: 32px;
  padding: 24px;
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: 0 0 30px rgba(0, 255, 65, 0.06);
}

.cart-summary .row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 12px;
}

.cart-summary .total {
  font-size: 1.25rem;
  font-weight: 700;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

#paypal-button-container {
  margin-top: 24px;
  min-height: 45px;
}

.direct-paypal-wrap {
  margin-top: 20px;
}

.direct-paypal-wrap .checkout-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 16px;
  margin-bottom: 16px;
  max-width: 360px;
}

.direct-paypal-wrap .checkout-fields label {
  display: block;
  font-weight: 500;
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 4px;
}

.direct-paypal-wrap .checkout-fields input {
  width: 100%;
  padding: 10px 12px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--surface2);
  color: var(--text);
  font-size: 1rem;
}

.direct-paypal-wrap .paypal-qr-wrap {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 12px;
}

.direct-paypal-wrap .paypal-qr-wrap .qr-label {
  font-size: 0.85rem;
  color: var(--muted);
}

.direct-paypal-wrap .paypal-qr-wrap img {
  max-width: 120px;
  height: auto;
  display: block;
}

.direct-paypal-wrap #pay-direct-btn {
  margin-top: 4px;
}

.cart-empty {
  text-align: center;
  padding: 60px 20px;
  color: var(--muted);
}

.cart-empty a {
  display: inline-block;
  margin-top: 16px;
}

/* Contact */
.contact-page {
  max-width: 560px;
  margin: 0 auto;
  padding: 40px 20px 80px;
}

.contact-page h1 {
  margin-bottom: 8px;
  font-family: var(--font-mono);
  color: var(--accent);
  text-shadow: 0 0 12px var(--glow);
  letter-spacing: 0.05em;
}

.contact-page .subtitle {
  color: var(--muted);
  margin-bottom: 32px;
}

.contact-form label {
  display: block;
  margin-bottom: 6px;
  font-weight: 600;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 12px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-family: inherit;
  margin-bottom: 16px;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 12px var(--glow);
}

.contact-form textarea {
  min-height: 140px;
  resize: vertical;
}

.contact-form button {
  padding: 12px 24px;
  background: var(--accent);
  color: #000;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  font-family: var(--font-mono);
  letter-spacing: 0.05em;
  box-shadow: 0 0 15px rgba(0, 255, 65, 0.2);
}

.contact-form button:hover {
  background: var(--accent-hover);
  box-shadow: 0 0 25px var(--glow);
}

/* Info page */
.info-page {
  max-width: 720px;
  margin: 0 auto;
  padding: 40px 20px 80px;
}

.info-page h1 {
  margin-bottom: 32px;
  font-family: var(--font-mono);
  color: var(--accent);
  text-shadow: 0 0 12px var(--glow);
  letter-spacing: 0.05em;
}

.info-page h2 {
  font-size: 1.25rem;
  margin-top: 40px;
  margin-bottom: 12px;
  font-family: var(--font-mono);
  color: var(--accent-dim);
  letter-spacing: 0.03em;
}

.info-page p,
.info-page ul {
  color: var(--muted);
  margin-bottom: 16px;
}

.info-page ul {
  padding-left: 24px;
}

/* Gallery */
.gallery-page {
  padding: 40px 20px 80px;
}

.gallery-page .container {
  max-width: 1100px;
  margin: 0 auto;
}

.gallery-page h1 {
  margin-bottom: 12px;
  font-family: var(--font-mono);
  color: var(--accent);
  text-shadow: 0 0 12px var(--glow);
  letter-spacing: 0.05em;
  text-align: center;
}

.gallery-intro {
  color: var(--muted);
  text-align: center;
  max-width: 560px;
  margin: 0 auto 40px;
  font-size: 1.05rem;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 24px;
  margin-bottom: 48px;
}

.gallery-cell {
  display: block;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
}

.gallery-cell:hover {
  border-color: var(--accent);
  box-shadow: 0 0 24px var(--glow);
  transform: translateY(-2px);
  text-decoration: none;
  color: inherit;
}

.gallery-cell-thumb {
  aspect-ratio: 1;
  background: var(--surface2);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.gallery-cell-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gallery-cell-emoji {
  font-size: 3rem;
  color: var(--muted);
}

.gallery-cell-name {
  display: block;
  padding: 14px 16px;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text);
  text-align: center;
  border-top: 1px solid var(--border);
}

.gallery-cell:hover .gallery-cell-name {
  color: var(--accent);
}

.gallery-cta {
  text-align: center;
  margin: 0;
}

.gallery-item {
  margin: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
  cursor: pointer;
}

.gallery-item:hover {
  border-color: var(--accent);
  box-shadow: 0 0 20px var(--glow);
  transform: translateY(-2px);
}

.gallery-item img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  display: block;
  background: var(--surface2);
}

.gallery-item figcaption {
  padding: 12px 16px;
  font-size: 0.9rem;
  color: var(--muted);
  border-top: 1px solid var(--border);
}

.gallery-item:hover figcaption {
  color: var(--accent-dim);
}

.gallery-empty {
  text-align: center;
  padding: 2rem 1rem;
  font-size: 1rem;
}

.gallery-page .page-title .subtitle {
  color: var(--muted);
  font-size: 0.95rem;
  margin-top: 0.5rem;
}

.gallery-page .page-title code {
  background: var(--surface2);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.85em;
}

/* Gallery lightbox */
.gallery-lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.9);
  z-index: 300;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.gallery-lightbox.open {
  display: flex;
}

.gallery-lightbox img {
  max-width: 100%;
  max-height: 90vh;
  object-fit: contain;
  border-radius: var(--radius);
  box-shadow: 0 0 40px var(--glow);
}

.gallery-lightbox-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 44px;
  height: 44px;
  border: none;
  background: var(--surface);
  color: var(--text);
  font-size: 1.5rem;
  cursor: pointer;
  border-radius: var(--radius);
  line-height: 1;
  transition: background 0.2s, color 0.2s;
}

.gallery-lightbox-close:hover {
  background: var(--accent);
  color: var(--bg);
}

.gallery-lightbox-prev,
.gallery-lightbox-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  border: none;
  background: var(--surface);
  color: var(--accent);
  font-size: 1.5rem;
  cursor: pointer;
  border-radius: var(--radius);
  line-height: 1;
  transition: background 0.2s, color 0.2s, box-shadow 0.2s;
}

.gallery-lightbox-prev { left: 1rem; }
.gallery-lightbox-next { right: 1rem; }

.gallery-lightbox-prev:hover,
.gallery-lightbox-next:hover {
  background: var(--accent);
  color: var(--bg);
  box-shadow: 0 0 20px var(--glow);
}

.gallery-lightbox-counter {
  position: absolute;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.9rem;
  color: var(--muted);
  font-family: var(--font-mono);
}

/* Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  z-index: 200;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-overlay.open {
  display: -webkit-box;
  display: -webkit-flex;
  display: flex;
}

.modal {
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid var(--accent);
  max-width: 480px;
  width: 100%;
  max-height: 90vh;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  box-shadow: 0 0 40px var(--glow), inset 0 0 60px rgba(0, 255, 65, 0.03);
}

.modal .modal-body {
  padding: 24px;
}

.modal .modal-thumb {
  aspect-ratio: 1;
  background: var(--surface2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 4rem;
  color: var(--muted);
  overflow: hidden;
}

.modal .modal-thumb img,
.modal .modal-thumb video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 8px;
}

.modal .modal-thumb .modal-thumb-video {
  display: block;
}

.modal h2 {
  margin: 16px 0 8px;
  font-size: 1.25rem;
}

.modal .modal-price {
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 4px;
  text-shadow: 0 0 8px var(--glow);
  font-family: var(--font-mono);
}

.modal .modal-afterpay {
  color: var(--muted);
  font-size: 0.9rem;
  margin-bottom: 16px;
  line-height: 1.4;
}

.modal .modal-afterpay-link {
  color: var(--accent);
  text-decoration: underline;
}

.modal .modal-afterpay-link:hover {
  color: var(--accent-hover);
}

.modal .modal-desc {
  color: var(--muted);
  font-size: 0.95rem;
  margin-bottom: 16px;
  line-height: 1.4;
}

.modal .modal-order-instructions {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 16px;
  margin-bottom: 16px;
  font-size: 0.85rem;
}

.modal .modal-instructions-title {
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--accent);
  margin: 0 0 8px;
  font-size: 0.9rem;
  letter-spacing: 0.03em;
}

.modal .modal-instructions-list {
  margin: 0;
  padding-left: 20px;
  color: var(--muted);
  line-height: 1.5;
}

.modal .modal-instructions-list li {
  margin-bottom: 6px;
}

.modal .modal-swatches {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 6px;
}

.modal .modal-swatch {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid var(--border);
  cursor: pointer;
  flex-shrink: 0;
  -webkit-tap-highlight-color: transparent;
}

.modal .modal-swatch:hover {
  border-color: var(--accent);
  box-shadow: 0 0 8px var(--glow);
}

.modal .modal-swatch-selected {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--bg), 0 0 12px var(--glow);
}

.modal .modal-swatch:focus {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.modal .modal-textarea-inline {
  min-height: 52px;
  resize: vertical;
}

.modal .modal-options-box {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 20px;
}

.modal .modal-option-row {
  margin-bottom: 16px;
}

.modal .modal-option-row:last-child {
  margin-bottom: 0;
}

.modal .modal-option-row label {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--text);
  font-family: var(--font-mono);
  letter-spacing: 0.02em;
}

.modal .modal-select,
.modal .modal-input,
.modal .modal-textarea {
  width: 100%;
  padding: 10px 12px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--surface2);
  color: var(--text);
  font-family: inherit;
  font-size: 0.95rem;
}

.modal .modal-select:focus,
.modal .modal-input:focus,
.modal .modal-textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 10px var(--glow);
}

.modal .modal-select {
  cursor: pointer;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%2300ff41' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10l-5 5z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 32px;
}

.modal .modal-textarea {
  resize: vertical;
  min-height: 72px;
}

.modal .modal-char-count {
  display: block;
  font-size: 0.8rem;
  color: var(--muted);
  margin-top: 4px;
  text-align: right;
}

.modal .modal-custom-hint {
  font-size: 0.9rem;
  color: var(--muted);
  margin-bottom: 16px;
  line-height: 1.4;
}

.modal .browse-link-inline {
  text-decoration: underline;
  color: var(--accent);
}

.modal .browse-link-inline:hover {
  color: var(--accent-hover);
}

.modal .modal-custom-after {
  margin-top: 12px;
  font-size: 0.9rem;
  color: var(--accent);
  font-weight: 500;
}

.modal .modal-qty-row {
  margin-bottom: 0;
  display: flex;
  align-items: center;
  gap: 12px;
}

.modal .modal-qty-row label {
  margin-bottom: 0;
}

.modal .modal-qty-row .modal-qty {
  width: 64px;
  text-align: center;
}

.modal .modal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.modal .modal-qty-label {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
  margin: 0;
}

.modal .modal-actions input {
  width: 64px;
  padding: 10px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font-family: inherit;
  text-align: center;
}

.modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  background: none;
  border: none;
  color: var(--muted);
  font-size: 1.5rem;
  cursor: pointer;
}

.modal-close:hover {
  color: var(--accent);
  text-shadow: 0 0 8px var(--glow);
}

.modal {
  position: relative;
}

/* Admin page – Matrix accent */
.admin-page h1 {
  font-family: var(--font-mono);
  color: var(--accent);
  text-shadow: 0 0 12px var(--glow);
  letter-spacing: 0.05em;
}

.admin-page h2 {
  font-family: var(--font-mono);
  color: var(--accent-dim);
  letter-spacing: 0.03em;
}

.cart-summary .total {
  color: var(--accent);
  text-shadow: 0 0 8px var(--glow);
}

.cart-personal-uploads {
  margin-top: 24px;
  padding: 20px;
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.cart-personal-uploads h2 {
  font-size: 1.1rem;
  margin: 0 0 8px;
  font-family: var(--font-mono);
  color: var(--accent-dim);
}

.cart-personal-uploads .muted {
  margin-bottom: 12px;
  font-size: 0.9rem;
}

.cart-personal-uploads input[type="file"] {
  width: 100%;
  padding: 8px;
  border: 1px dashed var(--border);
  border-radius: 8px;
  background: var(--bg);
  color: var(--text);
}

.cart-personal-uploads .small {
  font-size: 0.85rem;
  margin-top: 8px;
}

/* Analytics page */
.analytics-page {
  max-width: 900px;
  margin: 0 auto;
  padding: 2rem 1rem;
}

.analytics-login {
  max-width: 360px;
  margin: 4rem auto;
  padding: 2rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 0 30px rgba(0, 255, 65, 0.08);
}

.analytics-login h1 {
  margin: 0 0 1.5rem;
  font-family: var(--font-mono);
  font-size: 1.25rem;
  color: var(--accent);
  text-shadow: 0 0 10px var(--glow);
}

.analytics-login label {
  display: block;
  margin-bottom: 6px;
  font-weight: 600;
  font-size: 0.9rem;
}

.analytics-login input {
  width: 100%;
  padding: 12px;
  margin-bottom: 16px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font-family: inherit;
}

.analytics-login input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 12px var(--glow);
}

.analytics-login .error {
  color: #ef4444;
  font-size: 0.9rem;
  margin-bottom: 12px;
}

.analytics-dashboard h1 {
  font-family: var(--font-mono);
  color: var(--accent);
  text-shadow: 0 0 12px var(--glow);
  margin-bottom: 0.5rem;
}

.analytics-dashboard .muted {
  margin-bottom: 2rem;
}

.analytics-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.analytics-card {
  padding: 1.25rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-align: center;
}

.analytics-card .value {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--accent);
  font-family: var(--font-mono);
  text-shadow: 0 0 10px var(--glow);
}

.analytics-card .label {
  font-size: 0.9rem;
  color: var(--muted);
  margin-top: 4px;
}
