:root {
  --black: #090a0b;
  --panel: #141618;
  --white: #fff;
  --muted: rgba(255, 255, 255, 0.62);
  --line: rgba(255, 255, 255, 0.16);
  --blue: #acd5e5;
  --pad: clamp(1rem, 4vw, 4.5rem);
  --sans: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  background: var(--black);
}

body {
  min-width: 320px;
  margin: 0;
  color: var(--white);
  background:
    radial-gradient(circle at 18% 12%, rgba(104, 117, 128, 0.22), transparent 35rem),
    radial-gradient(circle at 82% 58%, rgba(60, 71, 82, 0.24), transparent 42rem),
    linear-gradient(145deg, #202429, #101214 48%, #252a30) fixed;
  font-family: var(--sans);
}

body.is-locked {
  overflow: hidden;
}

button,
a {
  color: inherit;
  font: inherit;
}

a {
  text-decoration: none;
}

button {
  cursor: pointer;
}

:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 3px;
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: 0.75rem;
  left: 0.75rem;
  padding: 0.7rem;
  color: var(--black);
  background: var(--white);
  transform: translateY(-200%);
}

.skip-link:focus {
  transform: none;
}

.primary {
  padding: 0.9rem 1.1rem;
  border: 1px solid var(--white);
  color: var(--black);
  background: var(--white);
  font-size: 0.7rem;
  font-weight: 850;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.prints-main {
  min-height: 75svh;
  padding-top: clamp(11.5rem, 14vw, 15rem);
}

.custom-print-entry {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  margin: 0 clamp(0.5rem, 1.4vw, 1.75rem) 1rem;
  padding: clamp(1rem, 2vw, 1.5rem);
  border: 1px solid var(--line);
  background: rgba(5, 6, 7, 0.5);
}

.custom-print-entry > div {
  display: grid;
  gap: 0.25rem;
}

.custom-print-entry strong {
  font-size: clamp(1rem, 1.5vw, 1.35rem);
}

.custom-print-entry span {
  color: var(--muted);
  font-size: 0.9rem;
}

.custom-print-entry a {
  flex: 0 0 auto;
  padding: 0.8rem 1rem;
  border: 1px solid var(--white);
  font-size: 0.68rem;
  font-weight: 850;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.store-gallery {
  padding: 0 clamp(0.5rem, 1.4vw, 1.75rem) clamp(7rem, 12vw, 12rem);
}
.prints-admin-panel[hidden] { display:none!important; }
.prints-admin-panel { display:flex; gap:1.5rem; align-items:center; justify-content:space-between; margin:0 var(--page-pad) 1.5rem; padding:1rem 1.25rem; border:1px solid #9564d8; background:rgba(105,68,156,.14); }
.prints-admin-panel div { min-width:0; }
.prints-admin-panel span { display:block; color:var(--blue); font-size:.72rem; font-weight:850; letter-spacing:.1em; text-transform:uppercase; }
.prints-admin-panel strong { display:block; margin:.2rem 0; font-size:clamp(1.15rem,2vw,1.55rem); }
.prints-admin-panel p { margin:0; color:var(--muted); font-size:.9rem; }
.prints-admin-panel a { flex:0 0 auto; padding:.8rem 1rem; border:1px solid #9564d8; background:#69449c; color:#fff; font-weight:800; }
@media(max-width:650px){.prints-admin-panel{align-items:stretch;flex-direction:column}.prints-admin-panel a{text-align:center}}

.store-grid {
  --gallery-gap: clamp(0.32rem, 0.48vw, 0.55rem);
  --row-height: clamp(360px, 30vw, 480px);
  display: flex;
  gap: var(--gallery-gap);
  flex-wrap: wrap;
}

.store-card {
  position: relative;
  height: var(--row-height);
  aspect-ratio: var(--aspect, 1.5);
  flex: 0 0 auto;
  min-width: 0;
}

.store-card > button {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  padding: 0;
  overflow: hidden;
  border: 0;
  background: transparent;
}

.store-card img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: opacity 180ms ease, transform 300ms ease;
}

.store-card:hover img {
  opacity: 0.82;
  transform: scale(1.01);
}

.selection-mark {
  position: absolute;
  z-index: 2;
  top: 0.8rem;
  right: 0.8rem;
  display: none;
  width: 2rem;
  height: 2rem;
  border: 2px solid var(--white);
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.45);
  place-items: center;
}

body.is-selecting .selection-mark {
  display: grid;
}

.store-card.is-selected .selection-mark {
  color: var(--black);
  background: var(--white);
}

.store-card.is-selected .selection-mark::after {
  content: "✓";
}

.selection-bar {
  position: fixed;
  z-index: 50;
  right: 50%;
  bottom: 1.25rem;
  display: flex;
  width: min(720px, calc(100% - 2rem));
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.8rem 0.9rem 0.8rem 1.2rem;
  border: 1px solid var(--line);
  background: rgba(18, 20, 22, 0.96);
  box-shadow: 0 1rem 3rem rgba(0, 0, 0, 0.45);
  transform: translateX(50%);
  backdrop-filter: blur(14px);
}

.selection-bar > div {
  display: flex;
  gap: 0.6rem;
}

.selection-bar button {
  padding: 0.75rem 0.9rem;
  border: 1px solid var(--line);
  background: transparent;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.selection-bar button.primary {
  color: var(--black);
  background: var(--white);
}

.selection-bar button:disabled {
  cursor: default;
  opacity: 0.45;
}

.store-dialog {
  width: min(1200px, calc(100% - 2rem));
  max-width: none;
  max-height: calc(100svh - 2rem);
  padding: 0;
  overflow-x: hidden;
  overflow-y: auto;
  border: 1px solid var(--line);
  color: var(--white);
  background: var(--panel);
}

.store-dialog::backdrop {
  background: rgba(0, 0, 0, 0.82);
}

.dialog-close {
  position: absolute;
  z-index: 3;
  top: 0.8rem;
  right: 0.8rem;
  display: grid;
  width: 2.7rem;
  height: 2.7rem;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 50%;
  place-items: center;
  color: var(--white);
  background: rgba(0, 0, 0, 0.65);
  font-size: 1.4rem;
}

.lightbox-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(280px, 0.6fr);
  width: 100%;
  min-width: 0;
}

.lightbox-layout > img {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  height: min(84svh, 900px);
  object-fit: contain;
  background: #08090a;
}

.lightbox-layout > div,
.product-dialog-inner {
  padding: clamp(2rem, 5vw, 5rem);
}

.lightbox-layout > div {
  display: flex;
  min-width: 0;
  flex-direction: column;
  justify-content: center;
}

.lightbox-layout > div > p:first-child,
.product-dialog-inner > p:first-child {
  color: var(--blue);
  font-size: 0.65rem;
  font-weight: 850;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.store-dialog h2 {
  margin: 0 0 1rem;
  overflow-wrap: anywhere;
  font-size: clamp(2.5rem, 5vw, 5rem);
  font-weight: 400;
  line-height: 0.95;
  letter-spacing: -0.05em;
}

.lightbox-layout > div > p:not(:first-child),
.product-note {
  color: var(--muted);
  line-height: 1.6;
}

.lightbox-layout .primary {
  align-self: flex-start;
  margin-top: 1rem;
}

.selected-strip {
  display: flex;
  gap: 0.5rem;
  margin: 2rem 0;
  overflow-x: auto;
}

.selected-strip img {
  width: 110px;
  height: 90px;
  flex: 0 0 auto;
  object-fit: cover;
}

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

.product-choices button {
  display: grid;
  gap: 0.6rem;
  min-height: 180px;
  padding: 1.25rem;
  border: 1px solid var(--line);
  color: var(--white);
  text-align: left;
  background: #0e1012;
}

.product-choices button:not(:disabled):hover {
  border-color: var(--white);
}

.product-choices button:disabled {
  cursor: default;
  opacity: 0.42;
}

.product-choices strong {
  font-size: 1.2rem;
}

.product-choices span {
  color: var(--muted);
  line-height: 1.5;
}

.prints-footer {
  display: flex;
  justify-content: space-between;
  padding: 2rem var(--pad);
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.loading {
  grid-column: 1 / -1;
  padding: 4rem 0;
  color: var(--muted);
}

@media (max-width: 900px) {
  .store-grid {
    --row-height: clamp(310px, 46vw, 410px);
  }

  .lightbox-layout {
    grid-template-columns: 1fr;
  }

  .lightbox-layout > img {
    height: 62svh;
  }

  .product-choices {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 620px) {
  .custom-print-entry {
    align-items: stretch;
    flex-direction: column;
  }

  .custom-print-entry a {
    text-align: center;
  }

  .store-gallery {
    padding-inline: 0.35rem;
  }

  .store-grid {
    gap: 0.38rem;
    padding: 0.38rem;
    background: rgba(4, 5, 6, 0.78);
  }

  .store-card {
    height: auto;
    flex: var(--aspect, 1.5) 1 var(--mobile-basis, 225px);
  }

  .selection-bar {
    align-items: stretch;
    flex-direction: column;
  }

  .selection-bar > div,
  .selection-bar button {
    flex: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    transition-duration: 0.01ms !important;
  }
}
