/* ── Custom fonts ───────────────────────────────────────────────────────────── */
@font-face {
  font-family: 'Grafmassa';
  src: url('/Cageroll-Standard.otf') format('opentype');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'LTWave';
  src: url('/LTWave-Regular.otf') format('opentype');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

/* ── Variables ──────────────────────────────────────────────────────────────── */
:root {
  --bg:          #060810;
  --bg-card:     #080e1e;
  --bg-card-h:   #0a1226;
  --bg-input:    #070a18;
  --border:      #0e1838;
  --border-h:    #162048;
  --text:        #9ab0cc;
  --text-muted:  #5c78a0;
  --text-dim:    #7898bc;
  --accent:      #a8dcf0;
  --accent-dim:  #183050;
  --glyph1:      #e0245a;
  --glyph2:      #30b8e0;
  --white:       #d0eef8;
  --font-mono:   'Space Mono', 'Courier New', monospace;
  --font-body:   'LTWave', system-ui, sans-serif;
  --font-display: 'Grafmassa', sans-serif;
  --radius:      3px;
  --nav-h:       62px;
}

/* ── Reset ──────────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 20px; }

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
  font-size: 1rem;
  line-height: 1.65;
  -webkit-tap-highlight-color: transparent;
}

a, button { touch-action: manipulation; }

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--white); }
img { display: block; max-width: 100%; }
button, input, select, textarea { font-family: inherit; font-size: inherit; }

/* ── Scanlines - subtle ─────────────────────────────────────────────────────── */

/* ── CRT vignette - subtle ──────────────────────────────────────────────────── */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background: radial-gradient(ellipse at center, transparent 55%, rgba(0,0,0,0.4) 100%);
  pointer-events: none;
  z-index: 9997;
}

/* ── Typography ─────────────────────────────────────────────────────────────── */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: normal;
  line-height: 1.15;
  letter-spacing: 0em;
}
.mono { font-family: var(--font-mono); }

/* ── Navigation ─────────────────────────────────────────────────────────────── */
.nav {
  position: sticky;
  top: 0;
  z-index: 1000;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2.5rem;
  background: var(--bg-card);
}

.nav-logo {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: normal;
  color: var(--accent);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
}
.nav-logo:hover { color: var(--accent); opacity: 0.82; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 2.5rem;
  list-style: none;
}

/* Each li is a flex box so text-only links and the badge-bearing cart link
   compute the same height and line up on one row */
.nav-links li { display: flex; align-items: center; }

.nav-links a {
  font-family: var(--font-display);
  font-size: 1.2rem;
  color: var(--text);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  transition: color 0.15s;
  text-decoration: none;
}
.nav-links a:hover,
.nav-links a.active { color: var(--accent); }

.cart-link { display: flex; align-items: center; gap: 0.5rem; }

/* ── Mobile nav drawer (elements injected by js/app.js) ─────────────────────── */
.nav-toggle {
  display: none; /* shown ≤640px */
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 42px;
  height: 42px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
}

.nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--accent);
  transition: transform 0.25s, opacity 0.25s;
}

body.nav-open .nav-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
body.nav-open .nav-toggle span:nth-child(2) { opacity: 0; }
body.nav-open .nav-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.nav-drawer {
  display: none; /* shown ≤640px */
  position: fixed;
  top: var(--nav-h);
  right: 0;
  bottom: 0;
  width: min(75vw, 300px);
  background: var(--bg-card);
  border-left: 1px solid var(--border);
  padding: 1rem 1.5rem;
  transform: translateX(100%);
  transition: transform 0.25s ease;
  z-index: 1500;
}

.nav-drawer ul { list-style: none; }

.nav-drawer li { border-bottom: 1px solid var(--border); }

.nav-drawer a {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-display);
  font-size: 0.85rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text);
  padding: 1.05rem 0.25rem;
  text-decoration: none;
}
.nav-drawer a.active { color: var(--accent); }

.nav-backdrop {
  display: none; /* shown ≤640px */
  position: fixed;
  inset: var(--nav-h) 0 0 0;
  background: rgba(0, 0, 0, 0.55);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s;
  z-index: 1400;
}

.cart-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--accent);
  color: #000;
  font-family: var(--font-mono);
  font-size: 0.6rem;
  font-weight: 700;
  width: 17px;
  height: 17px;
  border-radius: 50%;
}
.cart-count:empty,
.cart-count[data-count="0"] { display: none; }

/* ── Glitch title ───────────────────────────────────────────────────────────── */
.glitch {
  display: inline-block;
  color: var(--accent);
}

/* ── Hero ───────────────────────────────────────────────────────────────────── */
.hero {
  min-height: 90vh;
  min-height: 90svh; /* mobile browsers: exclude the collapsing URL bar */
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 4rem 2.5rem;
  position: relative;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}


.hero-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(6, 8, 16, 0.55);
}

.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.85;
  filter: saturate(1.2) contrast(1.1);
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 720px;
  width: 100%;
}

.hero-eyebrow {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.28em;
  color: var(--text-dim);
  text-transform: uppercase;
  margin-bottom: 1.8rem;
  text-shadow: 0 1px 4px rgba(0,0,0,1), 0 0 16px rgba(0,0,0,1), 0 0 40px rgba(0,0,0,0.9);
}

.hero-eyebrow span {
  color: var(--accent);
  animation: blink 1.2s step-end infinite;
}

@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }

.hero h1 {
  font-size: clamp(3.2rem, 9vw, 6.5rem);
  line-height: 0.92;
  margin-bottom: 1rem;
  color: #ffffff;
  text-shadow: 0 2px 32px rgba(0,0,0,0.9), 0 0 80px rgba(0,0,0,0.5);
}

.hero-title-img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 0 auto;
  filter: drop-shadow(0 2px 8px rgba(0,0,0,0.8));
}

.hero-sub {
  color: #c8d8e8;
  font-size: 0.95rem;
  max-width: 440px;
  line-height: 1.75;
  margin: 0 auto 1.2rem;
  text-shadow:
    0 0 4px #000,
    0 0 8px #000,
    0 0 16px #000,
    1px 1px 0 #000,
    -1px -1px 0 #000,
    1px -1px 0 #000,
    -1px 1px 0 #000;
}

.hero-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  justify-content: center;
}

/* ── Buttons ────────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 1.4rem;
  font-family: var(--font-display);
  font-size: 0.9rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  border: none;
  cursor: pointer;
  border-radius: var(--radius);
  transition: background 0.15s, color 0.15s, box-shadow 0.15s;
  font-weight: 700;
}

.btn-primary {
  background: var(--accent);
  color: #04121e;
}
.btn-primary:hover {
  background: var(--white);
  color: #04121e;
}

.btn-ghost {
  background: rgba(6,8,16,0.55);
  backdrop-filter: blur(6px);
  color: var(--text);
}
.btn-ghost:hover {
  color: var(--white);
  background: rgba(6,8,16,0.75);
}

.btn-danger {
  background: transparent;
  color: var(--glyph1);
  border-color: transparent;
  padding: 0.3rem 0.6rem;
  font-size: 0.75rem;
}
.btn-danger:hover { border-color: var(--glyph1); }

/* ── Section layout ─────────────────────────────────────────────────────────── */
.section {
  padding: 5rem 2.5rem;
  max-width: 1440px;
  margin: 0 auto;
}

.section-label {
  font-family: var(--font-display);
  font-size: 0.8rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.6rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.section-label::before {
  content: '';
  display: inline-block;
  width: 18px;
  height: 1px;
  background: var(--accent);
}

.section-title {
  display: block;
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  color: var(--white);
  text-align: center;
}

.section-desc {
  margin: 0.75rem 0 0;
  color: var(--text-dim);
  max-width: 660px;
  font-size: 0.875rem;
}

.divider {
  border: none;
}

/* ── Camera shop cross-link ─────────────────────────────────────────────────── */
.camera-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 0.6rem;
}

.camera-header-left {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.camera-shop-link { white-space: nowrap; font-size: 0.85rem; padding: 0.35rem 0.75rem; }

/* ── Product page layout ─────────────────────────────────────────────────────── */
.pd-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: calc(100vh - var(--nav-h));
  border-bottom: 1px solid var(--border);
}

.pd-viewer {
  position: sticky;
  top: var(--nav-h);
  align-self: start;
  height: calc(100vh - var(--nav-h));
  display: flex;
  flex-direction: column;
  background: var(--bg);
  overflow: hidden;
}

.pd-main-img {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  cursor: zoom-in;
  position: relative;
}

.pd-main-img img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: opacity 0.2s;
}

.card-img-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  padding: 0.4rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  filter:
    drop-shadow(3px 0 0 #000)
    drop-shadow(-3px 0 0 #000)
    drop-shadow(0 3px 0 #000)
    drop-shadow(0 -3px 0 #000)
    drop-shadow(2px 2px 0 #000)
    drop-shadow(-2px -2px 0 #000)
    drop-shadow(2px -2px 0 #000)
    drop-shadow(-2px 2px 0 #000);
  z-index: 2;
}
.card-img-prev { left: 0.5rem; }
.card-img-next { right: 0.5rem; }

@media (hover: hover) {
  .card-img-nav { opacity: 0; transition: opacity 0.2s; }
  .product-img-wrap:hover .card-img-nav { opacity: 1; }
  .product-img-wrap:hover .card-img-nav:hover { opacity: 0.7; }
}
@media (hover: none) {
  .card-img-nav { display: none; }
  .pd-img-nav { display: none; }
}

.pd-img-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  padding: 0.5rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  filter:
    drop-shadow(3px 0 0 #000)
    drop-shadow(-3px 0 0 #000)
    drop-shadow(0 3px 0 #000)
    drop-shadow(0 -3px 0 #000)
    drop-shadow(2px 2px 0 #000)
    drop-shadow(-2px -2px 0 #000)
    drop-shadow(2px -2px 0 #000)
    drop-shadow(-2px 2px 0 #000);
  opacity: 0;
  transition: opacity 0.2s;
  z-index: 2;
}
.pd-main-img:hover .pd-img-nav { opacity: 1; }
.pd-main-img:hover .pd-img-nav:hover { opacity: 0.7; }
.pd-img-prev { left: 1rem; }
.pd-img-next { right: 1rem; }

.pd-thumb-wrap {
  position: relative;
  display: flex;
  align-items: stretch;
  background: var(--bg);
  flex-shrink: 0;
}

.pd-thumb-nav {
  flex-shrink: 0;
  width: 2rem;
  background: var(--bg-card);
  border: none;
  color: var(--text-dim);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.15s, background 0.15s;
  z-index: 1;
}
.pd-thumb-nav:hover { color: var(--text); background: var(--border); }
.pd-thumb-wrap.at-start .pd-thumb-prev { opacity: 0.25; pointer-events: none; }
.pd-thumb-wrap.at-end .pd-thumb-next { opacity: 0.25; pointer-events: none; }

.pd-thumb-strip {
  display: flex;
  gap: 2px;
  padding: 6px;
  background: var(--bg);
  overflow-x: auto;
  scroll-behavior: smooth;
  scrollbar-width: none;
  flex-shrink: 0;
  height: clamp(100px, 14vw, 160px);
  flex: 1;
}
.pd-thumb-strip::-webkit-scrollbar { display: none; }

.pd-thumb-strip img {
  width: auto;
  height: 100%;
  object-fit: cover;
  opacity: 0.45;
  cursor: pointer;
  transition: opacity 0.15s;
  flex-shrink: 0;
  border: 1px solid transparent;
}
.pd-thumb-strip img:hover { opacity: 0.8; }
.pd-thumb-strip img.active { opacity: 1; border-color: var(--accent); }

.pd-thumb-gallery-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  aspect-ratio: 1;
  flex-shrink: 0;
  border: 1px solid var(--border);
  color: var(--text-dim);
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.08em;
  text-align: center;
  gap: 0.4rem;
  opacity: 0.6;
  transition: opacity 0.15s, border-color 0.15s, color 0.15s;
  padding: 0.5rem;
  text-decoration: none;
}
.pd-thumb-gallery-link:hover { opacity: 1; border-color: var(--accent); color: var(--accent); }

.pd-info {
  padding: 3rem 3rem 4rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 1.4rem;
}

.pd-back {
  display: inline-flex;
  align-items: center;
  gap: 0.35em;
  font-family: var(--font-mono);
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  color: var(--accent);
  text-decoration: none;
  transition: color 0.15s;
}
.pd-back svg { flex-shrink: 0; }
.pd-back:hover { color: var(--white); }

.pd-name {
  font-size: clamp(1.3rem, 2.5vw, 1.9rem);
  color: var(--white);
  line-height: 1.2;
}

.pd-price-row {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.pd-price {
  font-family: var(--font-mono);
  font-size: 2rem;
  font-weight: 700;
  color: var(--accent);
}

.pd-desc {
  color: var(--text);
  font-size: 0.9rem;
  line-height: 1.75;
  white-space: pre-line;
}

.pd-mods-label {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.65rem;
}

.pd-mods-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.mod-tag {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--text-dim);
  border: 1px solid var(--border-h);
  padding: 0.3rem 0.65rem;
  border-radius: var(--radius);
  letter-spacing: 0.02em;
}

.pd-condition {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--text-muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.pd-lead-time {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin: 1.25rem 0;
  padding: 0.7rem 0.9rem;
  font-size: 0.8rem;
  line-height: 1.5;
  color: var(--text);
  border: 1px solid var(--border-h);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.03);
}

.pd-lead-time-icon {
  font-size: 1rem;
  flex-shrink: 0;
}


.pd-included-list {
  list-style: none;
  padding: 0;
  margin-top: 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.pd-included-list li {
  font-size: 0.82rem;
  color: var(--text-dim);
  padding-left: 1rem;
  position: relative;
}

.pd-included-list li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--accent);
  font-size: 0.75rem;
}

/* ── Customisation options ───────────────────────────────────────────────────── */
.pd-customisations {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.pd-custom-group {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.pd-custom-label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  color: var(--text-dim);
  white-space: nowrap;
  min-width: 14rem;
}

.pd-custom-select {
  flex: 1;
  background: var(--bg-input);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 0.45rem 0.7rem;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  border-radius: var(--radius);
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' fill='none' stroke='%236a6a90' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='1 1 5 5 9 1'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.65rem center;
  padding-right: 2rem;
  transition: border-color 0.15s;
}
.pd-custom-select:focus {
  outline: none;
  border-color: var(--accent);
}
.pd-custom-select option { background: var(--bg-card); }

.pd-custom-note {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
  letter-spacing: 0.04em;
}

/* Cart customisation lines */
.cart-item-customs {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  margin-top: 0.2rem;
  margin-bottom: 0.15rem;
}

.cart-item-custom {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--text-muted);
  letter-spacing: 0.04em;
}

.btn-buy {
  display: block;
  margin: 0 auto;
  padding: 0.75rem 2rem;
}
.btn-buy.added { background: var(--bg-card-h); color: var(--text-dim); cursor: default; border: 1px solid var(--border-h); }

.pd-cart-link {
  display: block;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-dim);
  letter-spacing: 0.08em;
  text-decoration: none;
  transition: color 0.15s;
  margin-top: -0.6rem;
}
.pd-cart-link:hover { color: var(--accent); }

/* ── Waitlist ────────────────────────────────────────────────────────────────── */
.pd-waitlist {
  padding: 1.2rem;
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.pd-waitlist-msg {
  font-size: 0.855rem;
  color: var(--text-dim);
  line-height: 1.65;
}

.pd-waitlist-row {
  display: flex;
  gap: 0.5rem;
}

.pd-waitlist-input {
  flex: 1;
  background: var(--bg-input);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 0.55rem 0.8rem;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  border-radius: var(--radius);
  outline: none;
  transition: border-color 0.15s;
}
.pd-waitlist-input:focus { border-color: var(--accent); }
.pd-waitlist-input::placeholder { color: var(--text-muted); }

.pd-waitlist-btn {
  background: transparent;
  color: var(--accent);
  padding: 0.55rem 1rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  border-radius: var(--radius);
  transition: background 0.15s, color 0.15s;
  white-space: nowrap;
}
.pd-waitlist-btn:hover { background: var(--accent); color: #000; }

.pd-waitlist-confirm {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--accent);
  letter-spacing: 0.06em;
}

.pd-coming-soon-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.25rem;
  padding: 0.5rem 0 1rem;
}

.pd-coming-soon-banner {
  font-family: var(--font-display);
  font-size: 2.2rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
}

.pd-coming-soon-section .pd-waitlist {
  width: 100%;
  align-items: center;
  padding-top: 0;
}

.pd-coming-soon-section .pd-waitlist-msg {
  text-align: center;
  max-width: 26rem;
  margin: 0 auto;
}

.pd-coming-soon-section .pd-waitlist-row {
  justify-content: center;
}

.pd-coming-soon-section .pd-waitlist-confirm {
  text-align: center;
}

/* ── Product gallery link ────────────────────────────────────────────────────── */
.pd-gallery-inline {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  color: var(--text-dim);
  text-decoration: none;
  margin-bottom: 0.5rem;
  transition: color 0.15s;
}
.pd-gallery-inline:hover { color: var(--accent); }

/* ── Shop card product link ──────────────────────────────────────────────────── */
.product-img-link { display: block; }
.product-name a { color: var(--white); text-decoration: none; }
.product-name a:hover { color: var(--accent); }

/* ── Responsive: product page ───────────────────────────────────────────────── */
@media (max-width: 860px) {
  .pd-layout {
    grid-template-columns: 1fr;
  }
  .pd-viewer {
    position: static;
    height: 60vw;
    max-height: 420px;
    border-right: none;
    border-bottom: 1px solid var(--border);
  }
  .pd-info { padding: 2rem 1.25rem 3rem; }
  .pd-gallery-link { padding: 2rem 1.25rem 3rem; }
}

/* ── Gallery sections ───────────────────────────────────────────────────────── */
#gallery,
.camera-section {
  scroll-margin-top: calc(var(--nav-h) + 8px);
}

.camera-section {
  padding: 4.5rem 2.5rem;
  max-width: 1440px;
  margin: 0 auto;
}

.camera-name {
  font-family: var(--font-display);
  font-size: clamp(1.3rem, 2.2vw, 1.8rem);
  color: var(--white);
}

.camera-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 0.2rem;
}

.camera-count {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-muted);
  letter-spacing: 0.08em;
}

.camera-mp {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--accent);
  letter-spacing: 0.08em;
  opacity: 0.7;
}

.camera-desc {
  color: var(--text-dim);
  font-size: 0.855rem;
  max-width: 560px;
  margin: 0.7rem 0 1.8rem 0;
  line-height: 1.7;
}

/* ── Photo grid ─────────────────────────────────────────────────────────────── */
.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 4px;
}

.photo-item {
  aspect-ratio: 4/3;
  overflow: hidden;
  cursor: pointer;
  position: relative;
  background: var(--bg-card);
}

.photo-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
  will-change: transform;
}

.photo-item::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(159,255,110,0.06), transparent 60%);
  opacity: 0;
  transition: opacity 0.25s;
  pointer-events: none;
}

.photo-item:hover::after { opacity: 1; }
.photo-item:hover img {
  transform: scale(1.05);
}

@keyframes img-glitch {
  0%   { filter: none; }
  30%  { filter: hue-rotate(40deg) saturate(2) contrast(1.15); transform: scale(1.05) translateX(2px); }
  60%  { filter: hue-rotate(160deg) saturate(1.6); transform: scale(1.05) translateX(-1px) skewX(-0.8deg); }
  100% { filter: saturate(1.05) contrast(1.02); transform: scale(1.05); }
}

.load-more-wrap {
  text-align: center;
  margin-top: 1.8rem;
}

.load-more {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-dim);
  display: inline-flex;
  padding: 0.5rem;
  transition: color 0.15s, transform 0.15s;
}
.load-more:hover { color: var(--white); transform: translateY(3px); }

/* ── Lightbox ───────────────────────────────────────────────────────────────── */
#lightbox {
  position: fixed;
  inset: 0;
  z-index: 5000;
  background: rgba(0, 0, 0, 0.96);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
  touch-action: pan-y pinch-zoom; /* horizontal gestures are ours (swipe nav) */
}

#lightbox.open { opacity: 1; pointer-events: all; }

.lb-inner {
  position: relative;
  max-width: 90vw;
  max-height: 90vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

#lightbox img {
  max-width: 90vw;
  max-height: 86vh;
  object-fit: contain;
  box-shadow: 0 0 80px rgba(0,0,0,0.9);
  transition: opacity 0.15s;
}

/* Offscreen neighbour image that slides in during swipe gestures */
.lb-ghost {
  position: absolute;
  inset: 0;
  margin: auto;
  visibility: hidden;
  pointer-events: none;
}

/* ── Loading spinner ─────────────────────────────────────────────────────────── */
@keyframes spin { to { transform: rotate(360deg); } }

.pd-main-img.is-loading > img,
.lb-inner.is-loading > img,
.product-img-wrap.is-loading > img {
  opacity: 0.25;
}

.pd-main-img.is-loading::after,
.lb-inner.is-loading::after,
.product-img-wrap.is-loading::after {
  content: '';
  position: absolute;
  top: calc(50% - 14px);
  left: calc(50% - 14px);
  width: 28px;
  height: 28px;
  border: 2px solid rgba(240, 240, 248, 0.12);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.65s linear infinite;
  pointer-events: none;
  z-index: 5;
}

.lb-close {
  position: fixed;
  top: 1.25rem;
  right: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  color: var(--white);
  cursor: pointer;
  filter:
    drop-shadow(3px 0 0 #000)
    drop-shadow(-3px 0 0 #000)
    drop-shadow(0 3px 0 #000)
    drop-shadow(0 -3px 0 #000)
    drop-shadow(2px 2px 0 #000)
    drop-shadow(-2px -2px 0 #000)
    drop-shadow(2px -2px 0 #000)
    drop-shadow(-2px 2px 0 #000);
  opacity: 0.7;
  transition: opacity 0.15s;
  z-index: 5001;
}
.lb-close:hover { opacity: 1; }

.lb-nav {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  color: var(--white);
  cursor: pointer;
  filter:
    drop-shadow(3px 0 0 #000)
    drop-shadow(-3px 0 0 #000)
    drop-shadow(0 3px 0 #000)
    drop-shadow(0 -3px 0 #000)
    drop-shadow(2px 2px 0 #000)
    drop-shadow(-2px -2px 0 #000)
    drop-shadow(2px -2px 0 #000)
    drop-shadow(-2px 2px 0 #000);
  opacity: 0.7;
  transition: opacity 0.15s;
  z-index: 5001;
}
.lb-nav:hover { opacity: 1; }
.lb-prev { left: 1.25rem; }
.lb-next { right: 1.25rem; }

.lb-counter {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--text-muted);
  letter-spacing: 0.15em;
  z-index: 5001;
}

/* ── Page hero ──────────────────────────────────────────────────────────────── */
.page-hero {
  padding: 3rem 2.5rem 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.page-hero-inner {
  width: min(660px, 100%);
}

/* ── Shop grid ──────────────────────────────────────────────────────────────── */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(400px, 520px));
  justify-content: center;
  gap: 1.5rem;
  padding: 0.75rem 2.5rem 0.75rem;
  max-width: 1440px;
  margin: 0 auto;
}

.product-card {
  background: var(--bg-card);
  display: flex;
  flex-direction: column;
  transition: background 0.2s;
}

.product-card:hover { background: var(--bg-card-h); }
.product-card:hover .product-sample-strip { background: var(--bg-card-h); }

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

.product-img-wrap {
  aspect-ratio: 4/3;
  overflow: hidden;
  position: relative;
  background: var(--bg);
  cursor: pointer;
}

.product-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s;
}

/* ── Thumbnail strip ────────────────────────────────────────────────────────── */
.product-sample-strip {
  display: flex;
  gap: 1px;
  background: var(--bg-card);
}

.product-sample-strip img {
  aspect-ratio: 1;
  flex: 1;
  min-width: 0;
  object-fit: cover;
  opacity: 0.5;
  transition: opacity 0.15s;
  cursor: pointer;
}

.product-sample-strip img:hover { opacity: 0.85; }

.product-sample-strip img.active {
  opacity: 1;
  box-shadow: inset 0 0 0 2px var(--accent);
}

/* ── Product card body ──────────────────────────────────────────────────────── */
.product-body {
  padding: 1.5rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.product-name {
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: var(--white);
  line-height: 1.35;
}

.product-desc {
  font-size: 0.845rem;
  color: var(--text-dim);
  line-height: 1.7;
  flex: 1;
}

.product-mods {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--text-muted);
  border-left: 2px solid var(--accent-dim);
  padding-left: 0.75rem;
  line-height: 1.7;
  letter-spacing: 0.01em;
}

.product-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.product-footer {
  padding: 1rem 1.5rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  border-top: 1px solid var(--border);
}

.product-price {
  font-family: var(--font-mono);
  font-size: 1.35rem;
  color: var(--accent);
  font-weight: 700;
}

.product-condition {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  color: var(--text-muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  display: block;
  margin-top: 0.25rem;
}

.stock-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  color: var(--accent);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.stock-badge::before {
  content: '';
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 5px var(--accent);
  animation: pulse 2.5s ease-in-out infinite;
}

.stock-badge.out::before { background: var(--text-muted); box-shadow: none; animation: none; }
.stock-badge.out { color: var(--text-muted); }
.stock-badge.soon::before { background: var(--accent); box-shadow: 0 0 5px var(--accent); }
.stock-badge.soon { color: var(--accent); }

@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }

.btn-add.added {
  background: var(--bg-card-h);
  color: var(--text-dim);
  cursor: default;
  border: 1px solid var(--border-h);
}

/* ── Cart ───────────────────────────────────────────────────────────────────── */
.cart-layout {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 2rem;
  max-width: 1100px;
  margin: 3rem auto;
  padding: 0 2.5rem;
  align-items: start;
}

.cart-items-wrap {
  border: 1px solid var(--border);
}

.cart-items-header {
  padding: 1rem 1.4rem;
  border-bottom: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.cart-items {
  background: var(--bg-card);
}

.cart-item {
  display: grid;
  grid-template-columns: 120px 1fr auto;
  gap: 1.25rem;
  padding: 1.4rem;
  border-bottom: 1px solid var(--border);
  align-items: center;
  background: var(--bg-card);
}
.cart-item:last-child { border-bottom: none; }

.cart-item-img {
  width: 120px;
  height: 90px;
  object-fit: cover;
  border: 1px solid var(--border);
}

.cart-item-name {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  color: var(--white);
  margin-bottom: 0.3rem;
}

.cart-item-price {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  color: var(--accent);
  margin-top: 0.4rem;
}

.cart-empty {
  padding: 4rem;
  text-align: center;
  font-family: var(--font-mono);
  color: var(--text-muted);
  font-size: 0.8rem;
  letter-spacing: 0.1em;
}
.cart-empty a {
  display: block;
  margin-top: 1rem;
  color: var(--accent);
}

/* ── Checkout panel ─────────────────────────────────────────────────────────── */
.checkout-panel {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-top: 2px solid var(--accent);
  position: sticky;
  top: calc(var(--nav-h) + 1.5rem);
}

.panel-header {
  padding: 1rem 1.4rem;
  border-bottom: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.panel-body { padding: 1.4rem; }

.summary-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.84rem;
  color: var(--text-dim);
  margin-bottom: 0.6rem;
}

.summary-row.total {
  font-family: var(--font-mono);
  font-size: 1.05rem;
  color: var(--white);
  border-top: 1px solid var(--border);
  padding-top: 0.85rem;
  margin-top: 0.4rem;
}
.summary-row.total .val { color: var(--accent); }

/* ── Form ───────────────────────────────────────────────────────────────────── */
.form-section {
  margin-top: 1.5rem;
  border-top: 1px solid var(--border);
  padding-top: 1.25rem;
}

.form-section-title {
  font-family: var(--font-display);
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.form-group { margin-bottom: 0.85rem; }

.form-group label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-bottom: 0.35rem;
}

.form-group input {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 0.55rem 0.8rem;
  font-family: var(--font-mono);
  font-size: 0.84rem;
  border-radius: var(--radius);
  transition: border-color 0.15s;
  outline: none;
}
.form-group input:focus { border-color: var(--accent); }
.form-group input::placeholder { color: var(--text-muted); }

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.checkout-note {
  font-size: 0.78rem;
  color: var(--text-dim);
  border: 1px solid var(--accent-dim);
  padding: 0.75rem 0.9rem;
  letter-spacing: 0.02em;
  line-height: 1.65;
  border-radius: var(--radius);
}

.btn-checkout {
  width: 100%;
  background: var(--accent);
  color: #04121e;
  border: none;
  padding: 0.85rem;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
  border-radius: var(--radius);
  transition: all 0.15s;
  margin-top: 1rem;
}
.btn-checkout:hover { background: var(--white); }
.btn-checkout:disabled { opacity: 0.4; cursor: not-allowed; }

/* ── Order success ──────────────────────────────────────────────────────────── */
.order-success { display: none; text-align: center; padding: 3rem 1.5rem; }
.order-success.visible { display: block; }

.success-icon {
  font-size: 2rem;
  margin-bottom: 1rem;
  color: var(--accent);
  animation: success-pop 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes success-pop {
  from { transform: scale(0); opacity: 0; }
  to   { transform: scale(1); opacity: 1; }
}

.success-order-id {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--accent);
  letter-spacing: 0.2em;
  margin-top: 0.5rem;
}

.success-title {
  font-family: var(--font-mono);
  color: var(--white);
  font-size: 1rem;
}

.success-msg {
  color: var(--text-dim);
  font-size: 0.82rem;
  margin-top: 1rem;
  line-height: 1.6;
}

.success-back {
  margin-top: 1.5rem;
  display: inline-flex;
}

/* ── Loading skeleton ───────────────────────────────────────────────────────── */
.skeleton {
  background: linear-gradient(90deg, var(--bg-card) 25%, var(--bg-card-h) 50%, var(--bg-card) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.6s infinite;
}

@keyframes shimmer {
  from { background-position: 200% 0; }
  to   { background-position: -200% 0; }
}

/* ── Toast ──────────────────────────────────────────────────────────────────── */
#toast-container {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 8000;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.toast {
  background: var(--bg-card);
  border: 1px solid var(--border-h);
  border-left: 2px solid var(--accent);
  color: var(--text);
  padding: 0.7rem 1rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  min-width: 220px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.5);
  animation: slide-in 0.2s ease;
  border-radius: var(--radius);
}

@keyframes slide-in {
  from { transform: translateX(16px); opacity: 0; }
  to   { transform: none; opacity: 1; }
}

/* ── Footer ─────────────────────────────────────────────────────────────────── */
.footer {
  padding: 2.5rem 2.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
  margin-top: 2rem;
}

.footer-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  width: 100%;
  max-width: 660px;
}

.footer-logo {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--accent);
  letter-spacing: 0.12em;
}

.footer-social {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-dim);
  letter-spacing: 0.06em;
  text-decoration: none;
  transition: color 0.15s;
}
.footer-social:hover { color: var(--white); }

.footer-copy {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--text-muted);
  letter-spacing: 0.06em;
}

/* ── About page ─────────────────────────────────────────────────────────────── */
.about-page {
  max-width: 720px;
  margin: 0 auto;
  padding: 1.5rem 2.5rem 1rem;
}

.about-section {
  margin-bottom: 3rem;
}

.about-section h2 {
  font-size: 1.8rem;
  color: var(--white);
  margin-bottom: 0.9rem;
}

.about-section p {
  color: var(--text);
  font-size: 0.9rem;
  line-height: 1.8;
}

.about-section p + p { margin-top: 0.9rem; }

.about-steps {
  margin-top: 1.1rem;
  padding-left: 1.4rem;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.about-steps li {
  font-size: 0.85rem;
  color: var(--text-dim);
  line-height: 1.7;
  padding-left: 0.4rem;
}

.about-steps li::marker {
  font-family: var(--font-mono);
  color: var(--accent);
  font-size: 0.75rem;
}

.about-section--split {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 2rem;
  align-items: center;
}

.about-split-img img {
  width: 220px;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border: 1px solid var(--border);
  display: block;
}

@media (max-width: 560px) {
  .about-section--split {
    grid-template-columns: 1fr;
  }
  .about-split-img img {
    width: 100%;
    aspect-ratio: 3 / 2;
  }
}

.about-section--centered {
  text-align: center;
}

.about-contact-list {
  list-style: none;
  padding: 0;
  margin: 1rem auto 0;
  display: table;
  border-spacing: 0 0.6rem;
}

.about-contact-list li {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  font-size: 0.9rem;
}

.about-contact-label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  min-width: 80px;
}

.about-cta {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  justify-content: center;
  margin: 3.5rem 0 1rem;
}

@media (max-width: 640px) {
  .about-page { padding-left: 1.25rem; padding-right: 1.25rem; }
}

/* ── New-camera notify signup ───────────────────────────────────────────────── */
.notify-section {
  max-width: 660px;
  width: 100%;
  padding: 0;
  text-align: center;
}

.notify-section .section-label { justify-content: center; }

.notify-title {
  font-size: clamp(1.4rem, 2.5vw, 1.9rem);
  color: var(--white);
  margin-bottom: 0.75rem;
}

.notify-desc {
  color: var(--text-dim);
  font-size: 0.875rem;
  margin-bottom: 1.5rem;
}

.notify-row {
  display: flex;
  gap: 0.5rem;
  max-width: 480px;
  margin: 0 auto 0.75rem;
}
.notify-row .btn { white-space: nowrap; }

/* ── Loading / status messages ──────────────────────────────────────────────── */
.gallery-status {
  padding: 4rem 2.5rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  color: var(--text-muted);
}

/* ── Utilities ──────────────────────────────────────────────────────────────── */
.sr-only { position:absolute;width:1px;height:1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0; }
.hidden { display: none !important; }

/* ── Responsive ─────────────────────────────────────────────────────────────── */
@media (max-width: 900px) {
  .cart-layout { grid-template-columns: 1fr; gap: 1rem; }
  .checkout-panel { position: static; }
}

@media (max-width: 640px) {
  /* Nav collapses to logo + hamburger; links live in the slide-out drawer */
  .nav { padding: 0 0.75rem 0 1.25rem; }
  .nav-logo { font-size: 1rem; letter-spacing: 0.08em; }
  .nav-links { display: none; }
  .nav-toggle { display: flex; }
  .nav-drawer, .nav-backdrop { display: block; }
  body.nav-open { overflow: hidden; }
  body.nav-open .nav-drawer { transform: translateX(0); }
  body.nav-open .nav-backdrop { opacity: 1; pointer-events: auto; }

  .hero { padding: 0 1.25rem 3.5rem; }
  .hero h1 { font-size: 2.8rem; }
  .camera-section, .section { padding: 3rem 1.25rem; }
  .page-hero { padding: 3.5rem 1.25rem 2.5rem; }
  .cart-layout { padding: 0 1.25rem; }
  .photo-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
  .products-grid { grid-template-columns: 1fr; padding: 0.75rem 0.75rem; }
  .notify-section { padding: 3.5rem 1.25rem 1rem; }
  .footer { padding: 2rem 1.25rem; flex-direction: column; text-align: center; }
  .footer-bar { flex-direction: column; align-items: center; gap: 0.5rem; }
  .pd-viewer { height: 100vw; max-height: none; }

  /* iOS Safari zooms into focused inputs below 16px - keep them at 16px */
  .form-group input, .pd-waitlist-input { font-size: 16px; }

  /* Lightbox: full-bleed image, smaller chrome; swipe is the primary navigation */
  #lightbox img { max-width: 100vw; max-height: 80vh; }
  .lb-nav { display: none; }
  .lb-close { top: 0.9rem; right: 0.9rem; }
  .lb-counter { bottom: 1.1rem; }

  /* Toasts span the bottom of the screen instead of hugging one corner */
  #toast-container { left: 1rem; right: 1rem; bottom: 1rem; }
  .toast { min-width: 0; }
}

@media (max-width: 420px) {
  /* Email signup rows stack so the button stays comfortably tappable */
  .notify-row, .pd-waitlist-row { flex-direction: column; align-items: center; }
  .notify-row .btn-primary { white-space: nowrap; }
  .pd-waitlist-btn { padding: 0.7rem 1rem; }

  /* Customisation label + select stack vertically on very small screens */
  .pd-custom-group { flex-direction: column; align-items: flex-start; gap: 0.35rem; }
  .pd-custom-label { min-width: unset; }
  .pd-custom-select { width: 100%; }
}
