/* ─── Reset ─────────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* ─── Tokens ─────────────────────────────────────────────────────────────────── */
:root {
  --white:  #ffffff;
  --black:  #000000;
  --yellow: #FFE100;
  --font:   'Helvetica Neue', Helvetica, Arial, sans-serif;
  --max:    1200px;
  --gutter: 24px;
}

/* ─── Base ───────────────────────────────────────────────────────────────────── */
html { font-size: 16px; -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font);
  background: var(--white);
  color: var(--black);
  line-height: 1.45;
  min-height: 100vh;
}

a              { color: var(--yellow); text-decoration: none; }
a:hover        { text-decoration: underline; }
img            { display: block; max-width: 100%; height: auto; }
button, select { font-family: var(--font); }

/* ─── Layout ─────────────────────────────────────────────────────────────────── */
.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* ─── Header ─────────────────────────────────────────────────────────────────── */
.site-header {
  padding: 20px var(--gutter);
  display: flex;
  align-items: baseline;
  justify-content: space-between;
}

.site-logo {
  font-size: 1rem;
  font-weight: 400;
  letter-spacing: 0.15em;
  color: var(--yellow);
  text-transform: uppercase;
  transition: color 0.15s;
}

.site-logo:hover { color: var(--black); text-decoration: none; }

/* ─── Homepage ────────────────────────────────────────────────────────────────── */
.home {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0 var(--gutter) 60px;
}

.home-poster {
  width: 100%;
  max-width: 860px;
  margin-bottom: 40px;
  display: flex;
  justify-content: center;
}

.home-poster a { display: contents; }

.home-poster img {
  display: block;
  margin: 0 auto;
  max-width: 100%;
  max-height: calc(100vh - 160px);
  width: auto;
  height: auto;
}

.home-nav {
  display: flex;
  gap: 60px;
}

.home-nav a {
  font-size: 2.2rem;
  font-weight: 400;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--yellow);
  line-height: 1;
}

/* ─── Show Index ──────────────────────────────────────────────────────────────── */
.index-header {
  padding: 32px 0 24px;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.index-title {
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 400;
}

.sort-controls { display: flex; gap: 20px; }

.sort-controls a {
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #aaa;
}

.sort-controls a.active { color: var(--yellow); }

/* ─── Index single-column stacked list ────────────────────────────────────────── */
.index-list {
  list-style: none;
  padding-bottom: 80px;
  max-width: 680px;
  margin: 0 auto;
}

.index-item {
  display: block;
  text-decoration: none;
  color: var(--black);
  margin-bottom: 72px;
}

.index-item-img {
  position: relative;
  overflow: hidden;
  margin-bottom: 14px;
}

.index-item-img img {
  display: block;
  width: 100%;
  height: auto;
  filter: grayscale(1) contrast(1.1);
  transition: filter 0.4s ease;
}

/* Halftone dot overlay */
.index-item-img::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, transparent 44%, rgba(255,255,255,0.78) 45%);
  background-size: 5px 5px;
  pointer-events: none;
  transition: opacity 0.4s ease;
}

.index-item:hover .index-item-img img    { filter: none; }
.index-item:hover .index-item-img::after { opacity: 0; }

.index-item-artist {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #888;
  margin-bottom: 4px;
}

.index-item-title {
  font-size: 1rem;
  color: var(--black);
  transition: color 0.2s;
  margin-bottom: 4px;
}

.index-item:hover .index-item-title { color: var(--yellow); }

.index-item-date { font-size: 0.8rem; color: #bbb; }

/* ─── Show Page ──────────────────────────────────────────────────────────────── */
.show-page {
  max-width: 680px;
  margin: 0 auto;
  padding: 0 var(--gutter) 80px;
}

.show-poster-wrap { margin-bottom: 32px; }

.show-poster-img {
  display: block;
  width: 100%;
  max-height: 90vh;
  object-fit: contain;
  object-position: left top;
}

.show-meta { margin-bottom: 36px; }

.show-meta-artist {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #888;
  margin-bottom: 4px;
}

.show-meta-title { font-size: 1.3rem; font-weight: 400; margin-bottom: 4px; }

.show-meta-date { font-size: 0.8rem; color: #bbb; }

.show-description {
  margin-bottom: 40px;
  line-height: 1.65;
  font-size: 0.95rem;
}

.show-docs { margin-bottom: 64px; }

.doc-img {
  display: block;
  width: 100%;
  max-height: 90vh;
  object-fit: contain;
  object-position: center top;
  margin-bottom: 8px;
}

.back-link {
  display: inline-block;
  margin-top: 48px;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #aaa;
  align-self: flex-start;
}

.back-link:hover { color: var(--black); text-decoration: none; }

.zine-section {
  border-top: 1px solid #e0e0e0;
  padding-top: 48px;
}

.zine-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #aaa;
  margin-bottom: 24px;
}

.zine-inner {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 32px;
  align-items: start;
}

.zine-info-title { font-size: 1rem; margin-bottom: 8px; }
.zine-info-artist { font-size: 0.875rem; color: #555; margin-bottom: 24px; }
.zine-info-price  { font-size: 1.2rem; font-weight: 400; margin-bottom: 24px; }

.shipping-select-wrap { margin-bottom: 20px; }

.shipping-select-wrap label {
  display: block;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 8px;
}

.shipping-select {
  border: 1px solid #ccc;
  padding: 10px 14px;
  font-size: 0.95rem;
  background: var(--white);
  appearance: none;
  width: 100%;
  max-width: 300px;
  cursor: pointer;
}

.shipping-total {
  font-size: 0.9rem;
  color: #555;
  margin-bottom: 24px;
}

.btn {
  display: inline-block;
  padding: 14px 32px;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  cursor: pointer;
  border: none;
  font-family: var(--font);
  transition: opacity 0.15s;
}

.btn:hover { opacity: 0.85; }

.btn-primary { background: var(--yellow); color: var(--black); }
.btn-outline  { background: transparent; border: 1px solid var(--black); color: var(--black); }

/* ─── Zines Page ─────────────────────────────────────────────────────────────── */
.zines-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 40px;
  padding: 40px 0 80px;
}

.zine-card { text-decoration: none; color: var(--black); }
.zine-card img { width: 100%; margin-bottom: 12px; aspect-ratio: 3/4; object-fit: cover; }
.zine-card-artist { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.08em; color: #555; }
.zine-card-title  { font-size: 1rem; margin: 4px 0; }
.zine-card-price  { color: var(--yellow); font-size: 0.9rem; }

/* ─── Checkout ───────────────────────────────────────────────────────────────── */
.checkout-page { max-width: 560px; margin: 0 auto; padding: 60px var(--gutter); }
.checkout-title { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.12em; margin-bottom: 32px; }
.checkout-summary { border-bottom: 1px solid #e0e0e0; padding-bottom: 24px; margin-bottom: 32px; }
.checkout-summary-item { display: flex; justify-content: space-between; margin-bottom: 8px; font-size: 0.9rem; }
.checkout-total { font-size: 1rem; border-top: 1px solid #e0e0e0; padding-top: 12px; margin-top: 12px; }

.form-group { margin-bottom: 20px; }
.form-group label { display: block; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 8px; }
.form-group input, .form-group select {
  width: 100%;
  border: 1px solid #ccc;
  padding: 11px 14px;
  font-size: 0.95rem;
  font-family: var(--font);
  background: var(--white);
  appearance: none;
}
.form-group input:focus, .form-group select:focus { outline: 2px solid var(--yellow); border-color: transparent; }

#payment-element { margin-bottom: 24px; }
#payment-message { color: #c0392b; font-size: 0.875rem; margin-bottom: 16px; }

.checkout-sep { border: none; border-top: 1px solid #e0e0e0; margin: 32px 0; }

/* ─── Success / Error Pages ─────────────────────────────────────────────────── */
.result-page { max-width: 480px; margin: 80px auto; padding: 0 var(--gutter); text-align: center; }
.result-page h1 { font-size: 1.2rem; font-weight: 400; margin-bottom: 16px; }
.result-page p  { font-size: 0.95rem; color: #555; line-height: 1.6; margin-bottom: 24px; }

/* ─── Lightbox ───────────────────────────────────────────────────────────────── */
.lb-overlay {
  display: none;
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.92);
  z-index: 9999;
  align-items: center;
  justify-content: center;
}

.lb-overlay.open { display: flex; }

.lb-img { max-width: 90vw; max-height: 90vh; object-fit: contain; }

.lb-close {
  position: absolute;
  top: 20px; right: 24px;
  font-size: 2rem;
  color: #fff;
  cursor: pointer;
  line-height: 1;
  background: none;
  border: none;
}

/* ─── Admin ──────────────────────────────────────────────────────────────────── */
.admin-body { background: #f7f7f7; }

.admin-wrap { max-width: 900px; margin: 0 auto; padding: 0 var(--gutter); }

.admin-header {
  background: var(--black);
  color: var(--white);
  padding: 16px var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 40px;
}

.admin-header a { color: var(--white); font-size: 0.85rem; }
.admin-header .admin-title { font-size: 0.95rem; letter-spacing: 0.1em; text-transform: uppercase; }

.admin-nav { display: flex; gap: 24px; }
.admin-nav a { color: #aaa; font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.06em; }
.admin-nav a.active { color: var(--yellow); }

.admin-card {
  background: var(--white);
  border: 1px solid #e0e0e0;
  padding: 32px;
  margin-bottom: 24px;
}

.admin-card-title { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.1em; color: #aaa; margin-bottom: 24px; }

.admin-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.admin-table th { text-align: left; font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.08em; color: #aaa; padding-bottom: 12px; border-bottom: 1px solid #e0e0e0; font-weight: 400; }
.admin-table td { padding: 14px 0; border-bottom: 1px solid #f0f0f0; vertical-align: middle; }
.admin-table tr:last-child td { border-bottom: none; }

.admin-table a { color: var(--yellow); }

.status-paid     { color: #27ae60; }
.status-pending  { color: #e67e22; }
.status-shipped  { color: #2980b9; }
.status-cancelled{ color: #aaa; }

.published-badge { font-size: 0.75rem; background: #e8f8ee; color: #27ae60; padding: 2px 8px; }
.draft-badge     { font-size: 0.75rem; background: #f5f5f5; color: #aaa; padding: 2px 8px; }

.admin-form-group { margin-bottom: 20px; }
.admin-form-group label { display: block; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 8px; color: #555; }
.admin-form-group input[type=text],
.admin-form-group input[type=number],
.admin-form-group input[type=email],
.admin-form-group input[type=password],
.admin-form-group select,
.admin-form-group textarea {
  width: 100%;
  border: 1px solid #ddd;
  padding: 10px 12px;
  font-size: 0.95rem;
  font-family: var(--font);
  background: var(--white);
}
.admin-form-group textarea { resize: vertical; min-height: 100px; }

.admin-form-group input:focus,
.admin-form-group select:focus,
.admin-form-group textarea:focus { outline: 2px solid var(--yellow); border-color: transparent; }

.upload-zone {
  border: 2px dashed #ddd;
  padding: 32px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s;
}
.upload-zone:hover, .upload-zone.drag-over { border-color: var(--yellow); }
.upload-zone p { font-size: 0.875rem; color: #aaa; margin-top: 8px; }
.upload-zone input { display: none; }

.image-previews { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }

.image-preview-item {
  position: relative;
  width: 100px;
  height: 100px;
  cursor: grab;
}

.image-preview-item img { width: 100%; height: 100%; object-fit: cover; }

.image-preview-item .remove-img {
  position: absolute; top: 2px; right: 2px;
  background: rgba(0,0,0,0.6);
  color: #fff;
  border: none;
  width: 22px; height: 22px;
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
  display: flex; align-items: center; justify-content: center;
}

.flash { padding: 14px 20px; margin-bottom: 24px; font-size: 0.9rem; }
.flash-success { background: #e8f8ee; color: #27ae60; }
.flash-error   { background: #fdecea; color: #c0392b; }

.admin-actions { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }

/* ─── Login ──────────────────────────────────────────────────────────────────── */
.login-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--black);
}

.login-box {
  background: var(--white);
  padding: 48px;
  width: 100%;
  max-width: 380px;
}

.login-logo {
  font-size: 1.5rem;
  letter-spacing: 0.2em;
  text-align: center;
  margin-bottom: 40px;
  color: var(--black);
}

/* ─── Responsive ─────────────────────────────────────────────────────────────── */
@media (max-width: 720px) {
  :root { --gutter: 16px; }
  .home-nav a    { font-size: 1.5rem; }
  .home-nav      { gap: 32px; }
  .zine-inner    { grid-template-columns: 1fr; }
  .checkout-page { padding: 32px var(--gutter); }
  .admin-card    { padding: 20px; }
  .login-box     { padding: 32px 24px; }
  .admin-nav     { gap: 12px; }
}

@media (max-width: 440px) {
  .home-nav a { font-size: 1.2rem; }
}
