:root {
  --bg: #0d0c0b;
  --bg-2: #161412;
  --bg-3: #1e1b18;
  --sand: #e7d3b0;
  --sand-dim: #c4b08a;
  --rust: #c45c26;
  --rust-2: #e07838;
  --cream: #f6f1e8;
  --mute: #8f877c;
  --line: rgba(231, 211, 176, 0.14);
  --ok: #c9e3b8;
  --shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--cream);
  min-height: 100vh;
  line-height: 1.45;
}

img { max-width: 100%; display: block; }
button, input, select { font: inherit; }
a { color: inherit; }

.wrap {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
}

/* header */
.nav {
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(16px);
  background: rgba(13, 12, 11, 0.82);
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 78px;
}
.brand {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}
.brand-cactus {
  height: 40px;
  width: auto;
  display: block;
}
.brand-logo {
  height: 42px;
  width: auto;
  max-width: 220px;
  object-fit: contain;
  display: block;
}
.hero-cactus {
  width: 88px;
  height: auto;
  display: block;
  margin: 0 0 2px;
  filter: drop-shadow(0 0 10px rgba(92, 255, 122, 0.45));
}
.hero-logo {
  width: min(520px, 100%);
  height: auto;
  display: block;
  margin: 8px 0 6px;
}
.brand-mark {
  font-weight: 800;
  letter-spacing: 0.08em;
  font-size: 13px;
}
.brand-sub {
  font-size: 10px;
  letter-spacing: 0.22em;
  color: var(--mute);
  text-transform: uppercase;
}
.nav-actions { display: flex; gap: 10px; align-items: center; }
.nav a.nav-link {
  color: var(--sand-dim);
  text-decoration: none;
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.cart-btn {
  background: var(--sand);
  color: #1a1612;
  border: 0;
  border-radius: 999px;
  padding: 9px 14px;
  font-weight: 700;
  cursor: pointer;
  letter-spacing: 0.04em;
}
.cart-btn span { opacity: 0.7; margin-left: 6px; }

/* hero */
.hero {
  padding: 56px 0 36px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
  align-items: center;
}
.hero-copy { display: grid; gap: 18px; }
.hero-collage {
  position: relative;
  min-height: 340px;
  margin: 8px 0 12px;
}
.collage-card {
  position: absolute;
  display: block;
  overflow: hidden;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: #111;
  box-shadow: var(--shadow);
}
.collage-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.collage-main {
  width: 62%;
  height: 100%;
  right: 0;
  top: 0;
  z-index: 1;
}
.collage-offset {
  width: 46%;
  height: 72%;
  left: 0;
  bottom: 0;
  z-index: 2;
  transform: rotate(-4deg);
}
.collage-chip {
  position: absolute;
  left: 8%;
  top: 14%;
  z-index: 3;
  background: var(--sand);
  color: #1a1612;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 8px 12px;
  border-radius: 999px;
}
@media (min-width: 860px) {
  .hero {
    grid-template-columns: 1.05fr 0.95fr;
    gap: 36px;
    min-height: 520px;
  }
  .hero-collage { min-height: 480px; }
}
.kicker {
  color: var(--rust-2);
  letter-spacing: 0.22em;
  font-size: 11px;
  text-transform: uppercase;
}
.hero h1 {
  font-size: clamp(34px, 8vw, 72px);
  line-height: 0.92;
  letter-spacing: -0.04em;
  max-width: 14ch;
}
.hero p {
  max-width: 46ch;
  color: var(--sand-dim);
  font-size: 16px;
}
.hero-row { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 8px; }
.btn {
  border: 0;
  border-radius: 999px;
  padding: 12px 18px;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
}
.btn-primary { background: var(--rust); color: white; }
.btn-ghost {
  background: transparent;
  color: var(--sand);
  border: 1px solid var(--line);
}

/* shop */
.section { padding: 28px 0 64px; }
.section-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  margin-bottom: 18px;
  gap: 12px;
}
.section-head h2 { font-size: 22px; letter-spacing: -0.03em; }
.section-head p { color: var(--mute); font-size: 13px; }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 14px;
}
.card {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.2s ease, border-color 0.2s ease;
}
.card:hover { transform: translateY(-3px); border-color: rgba(231,211,176,0.3); }
.card-img {
  aspect-ratio: 3 / 4;
  background: #111;
  overflow: hidden;
}
.card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.card-body { padding: 12px 14px 16px; }
.card-body h3 { font-size: 16px; }
.card-meta {
  display: flex;
  justify-content: space-between;
  color: var(--mute);
  font-size: 13px;
  margin-top: 4px;
}
.price { color: var(--sand); font-weight: 700; }

/* modal + drawers */
.overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.62);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  z-index: 50;
}
.overlay.show { opacity: 1; pointer-events: auto; }

.modal, .drawer {
  position: fixed;
  z-index: 60;
  background: var(--bg-2);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}
.modal {
  left: 50%;
  top: 50%;
  transform: translate(-50%, -46%) scale(0.98);
  width: min(860px, calc(100% - 20px));
  max-height: calc(100vh - 24px);
  overflow: auto;
  border-radius: 22px;
  opacity: 0;
  pointer-events: none;
  transition: 0.2s ease;
}
.modal.show {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, -50%) scale(1);
}
.modal-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
}
.modal-img { background: #0a0a0a; position: relative; }
.modal-img > img { width: 100%; height: 100%; object-fit: cover; min-height: 320px; }
.shots {
  position: absolute;
  left: 10px;
  bottom: 10px;
  display: flex;
  gap: 8px;
}
.shot {
  width: 54px;
  height: 68px;
  padding: 0;
  border: 2px solid rgba(255,255,255,.25);
  border-radius: 8px;
  overflow: hidden;
  background: #111;
  cursor: pointer;
}
.shot.active { border-color: var(--sand); }
.shot img { width: 100%; height: 100%; object-fit: cover; }
.colors { display: flex; gap: 10px; margin: 8px 0 16px; }
.swatch {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid var(--line);
  background: var(--sw);
  cursor: pointer;
  padding: 0;
}
.swatch.active { outline: 2px solid var(--sand); outline-offset: 2px; }
.modal-info { padding: 22px; }
.modal-info h2 { font-size: 28px; letter-spacing: -0.03em; }
.modal-info .desc { color: var(--sand-dim); margin: 10px 0 16px; }
.sizes { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 16px; }
.size {
  min-width: 46px;
  height: 40px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--bg-3);
  color: var(--cream);
  cursor: pointer;
}
.size.active { background: var(--sand); color: #1a1612; border-color: var(--sand); }
.qty-row { display: flex; gap: 10px; align-items: center; margin-bottom: 16px; }
.qty-row button {
  width: 40px; height: 40px; border-radius: 10px;
  border: 1px solid var(--line); background: var(--bg-3); color: var(--cream); cursor: pointer;
}
.close-x {
  position: absolute;
  top: 12px; right: 12px;
  width: 36px; height: 36px;
  border-radius: 50%;
  border: 0;
  background: rgba(0,0,0,0.45);
  color: white;
  cursor: pointer;
}

.drawer {
  top: 0; right: 0; height: 100%;
  width: min(420px, 100%);
  transform: translateX(110%);
  transition: transform 0.25s ease;
  display: flex;
  flex-direction: column;
}
.drawer.show { transform: translateX(0); }
.drawer-head, .drawer-foot { padding: 18px; border-bottom: 1px solid var(--line); }
.drawer-foot { border-bottom: 0; border-top: 1px solid var(--line); }
.drawer-body { padding: 18px; overflow: auto; flex: 1; }
.line {
  display: grid;
  grid-template-columns: 64px 1fr auto;
  gap: 10px;
  margin-bottom: 14px;
  align-items: center;
}
.line img { width: 64px; height: 80px; object-fit: cover; border-radius: 8px; }
.line button.remove {
  background: none; border: 0; color: var(--mute); cursor: pointer; font-size: 12px;
}
.totals { display: flex; justify-content: space-between; margin-bottom: 12px; font-weight: 700; }
.field { display: grid; gap: 6px; margin-bottom: 10px; }
.field label { font-size: 12px; color: var(--mute); letter-spacing: 0.08em; text-transform: uppercase; }
.field input, .field textarea, .field select {
  background: var(--bg-3);
  border: 1px solid var(--line);
  color: var(--cream);
  border-radius: 10px;
  padding: 10px 12px;
}
.note { color: var(--mute); font-size: 12px; margin-top: 8px; }
.ship-opts { display: grid; gap: 8px; margin: 12px 0; }
.ship-opt {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 12px;
  cursor: pointer;
}
.ship-opt input { margin-top: 3px; }
#ship-fields { display: none; }
.success { color: var(--ok); }
#paypal-wrap { margin-top: 14px; min-height: 48px; }
#paypal-btn { min-height: 42px; }

footer {
  border-top: 1px solid var(--line);
  padding: 28px 0 48px;
  color: var(--mute);
  font-size: 13px;
}
.foot-grid {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 16px;
  align-items: center;
}
.foot-grid > div:last-child {
  text-align: right;
  max-width: 28ch;
  justify-self: end;
}
.foot-mark {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 6px;
}
.foot-cactus {
  width: 42px;
  height: auto;
  filter: drop-shadow(0 0 10px rgba(92, 255, 122, 0.45));
}
.foot-line {
  color: var(--sand);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-size: 11px;
  font-weight: 700;
}
.foot-sub {
  letter-spacing: 0.2em;
  text-transform: uppercase;
  font-size: 10px;
}

@media (max-width: 720px) {
  .modal-grid { grid-template-columns: 1fr; }
  .nav a.nav-link { display: none; }
  .hero { padding-top: 32px; }
  .foot-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .foot-grid > div:last-child {
    text-align: center;
    justify-self: center;
  }
}

#paypal-wrap { margin-top: 14px; min-height: 48px; }
#applepay-btn { margin-bottom: 8px; }

.admin-card {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 16px;
  margin: 16px 0;
  display: grid;
  gap: 10px;
}
.order-top { display: flex; justify-content: space-between; gap: 10px; align-items: center; }
.tag {
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid var(--line);
}
.tag.paid, .tag.ready { color: var(--ok); }
.tag.done { color: var(--mute); }
.order-card pre {
  white-space: pre-wrap;
  font: inherit;
  color: var(--sand);
}

.designer { max-width: 980px; }
.designer-stage { background: #0a0a0a; display: grid; place-items: center; }
#d-canvas {
  width: 100%;
  max-width: 360px;
  height: auto;
  touch-action: none;
  cursor: grab;
  background: #111;
}
#d-scale { width: 100%; accent-color: var(--rust-2); }
