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

/* ─── Tokens ─────────────────────────────────────────────────────────────────── */
:root {
  --white:  #ffffff;
  --black:  #000000;
  --yellow: #FFE100;
  --font:   'Times New Roman', Times, serif;
  --size:   16px;
  --gutter: 20px;
  --max:    760px;
}

/* ─── Base ───────────────────────────────────────────────────────────────────── */
html { font-size: var(--size); -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font);
  background: var(--white);
  color: var(--black);
  font-size: var(--size);
  line-height: 1.4;
  text-align: left;
  min-height: 100vh;
}

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

p { margin: 0 0 1em; }
h1, h2, h3, h4, h5, h6 { font-size: var(--size); font-weight: normal; }

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

.site-header a       { color: var(--yellow); text-decoration: none; }
.site-header a:hover { color: var(--yellow); text-decoration: none; }

/* ─── Page wrap ──────────────────────────────────────────────────────────────── */
.wrap, .home, .show-page, .info-page, .checkout-page, .result-page {
  max-width: var(--max);
  margin: 0;
  padding: 0 var(--gutter) var(--gutter);
}

/* ─── Homepage ───────────────────────────────────────────────────────────────── */
.home { text-align: center; margin: 0 auto; }

.home-poster { margin-bottom: 12px; }

.home-poster a {
  position: relative;
  display: inline-block;
  line-height: 0;
}

.home-poster img {
  display: block;
  max-width: 100%;
  max-height: 80vh;
  width: auto;
  height: auto;
  margin: 0 auto;
}

.home-poster-overlay {
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.35) url('/assets/log-overlay.png') center/contain no-repeat;
  transition: opacity 0.35s ease;
  pointer-events: none;
}

.home-poster a:hover .home-poster-overlay,
.home-poster a:focus-visible .home-poster-overlay {
  opacity: 0;
}

@media (hover: none) {
  .home-poster-overlay { display: none; }
}

.home-nav { text-align: center; }

/* ─── Shows index (text-only list) ───────────────────────────────────────────── */
.shows-list {
  list-style: none;
  padding: 0;
  font-style: italic;
}
.shows-list li { margin: 0 0 16px 0; padding: 0; }
.shows-list a {
  color: var(--black);
  text-decoration: none;
  display: block;
}
.shows-list a:hover { color: var(--yellow); }
.shows-list a div { display: block; }

/* ─── Show page ──────────────────────────────────────────────────────────────── */
.show-meta { margin-bottom: 16px; }
.show-meta div { display: block; }

.show-description {
  margin-bottom: 20px;
  white-space: pre-wrap;
}

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

.show-poster-img {
  display: block;
  max-width: 100%;
  max-height: 90vh;
  width: auto;
  height: auto;
}

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

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

/* ─── Zine section (on show page) ────────────────────────────────────────────── */
.zine-section { margin-bottom: 20px; }

.zine-info-desc {
  margin-bottom: 12px;
  white-space: pre-wrap;
}

.zine-info-price { margin-bottom: 12px; }

.shipping-select-wrap { margin-bottom: 12px; }
.shipping-select-wrap label { display: inline; margin-right: 6px; }

.shipping-select {
  padding: 2px 4px;
  border: 1px solid var(--black);
  background: var(--white);
}

.shipping-total { margin-bottom: 12px; }

.btn {
  display: inline;
  padding: 0;
  background: none;
  border: none;
  color: var(--yellow);
  text-decoration: underline;
  cursor: pointer;
}
.btn:hover { text-decoration: none; }

.back-link { display: inline-block; margin-top: 20px; }

/* ─── Info page ──────────────────────────────────────────────────────────────── */
.info-page p { margin: 0 0 1em; }

/* ─── Checkout ───────────────────────────────────────────────────────────────── */
.checkout-summary { margin-bottom: 20px; }
.checkout-summary-item { display: flex; justify-content: space-between; margin-bottom: 4px; }
.checkout-total { margin-top: 6px; }

.form-group { margin-bottom: 12px; }
.form-group label { display: block; margin-bottom: 4px; }
.form-group input, .form-group select {
  width: 100%;
  border: 1px solid var(--black);
  padding: 4px 6px;
  background: var(--white);
}
.form-group input:focus, .form-group select:focus {
  outline: 1px solid var(--yellow);
  border-color: var(--yellow);
}

#payment-element { margin-bottom: 16px; }
#payment-message { color: #c0392b; margin-bottom: 12px; }

.checkout-sep { border: none; border-top: 1px solid var(--black); margin: 20px 0; }

/* ─── Result pages ───────────────────────────────────────────────────────────── */
.result-page p { margin: 0 0 1em; }

/* ─── 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;
  color: var(--white);
  cursor: pointer;
  background: none;
  border: none;
}

/* ─── Admin (kept structurally; inherits Times New Roman via --font) ─────────── */
.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: 14px var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 32px;
}

.admin-header a { color: var(--white); }
.admin-header .admin-title { color: var(--white); }

.admin-nav { display: flex; gap: 20px; }
.admin-nav a { color: #aaa; }
.admin-nav a.active { color: var(--yellow); }

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

.admin-card-title { color: #aaa; margin-bottom: 16px; }

.admin-table { width: 100%; border-collapse: collapse; }
.admin-table th {
  text-align: left;
  color: #aaa;
  padding-bottom: 8px;
  border-bottom: 1px solid #e0e0e0;
  font-weight: normal;
}
.admin-table td {
  padding: 10px 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 { background: #e8f8ee; color: #27ae60; padding: 2px 6px; }
.draft-badge     { background: #f5f5f5; color: #aaa; padding: 2px 6px; }

.admin-form-group { margin-bottom: 16px; }
.admin-form-group label { display: block; margin-bottom: 4px; 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: 6px 8px;
  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: 1px solid var(--yellow);
  border-color: var(--yellow);
}

.upload-zone {
  border: 1px dashed #ddd;
  padding: 24px;
  text-align: center;
  cursor: pointer;
}
.upload-zone:hover, .upload-zone.drag-over { border-color: var(--yellow); }

.image-previews { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }

.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,
.image-preview-item .cover-img {
  position: absolute; top: 2px;
  background: rgba(0,0,0,0.6); color: #fff;
  border: none; width: 22px; height: 22px;
  cursor: pointer; line-height: 1;
  display: flex; align-items: center; justify-content: center;
}
.image-preview-item .remove-img { right: 2px; }
.image-preview-item .cover-img  { left: 2px; color: #999; }
.image-preview-item .cover-img.active { color: var(--yellow); }
.image-preview-item.is-cover { outline: 2px solid var(--yellow); }

.flash { padding: 10px 14px; margin-bottom: 16px; }
.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: 40px;
  width: 100%;
  max-width: 380px;
}
.login-logo { text-align: center; margin-bottom: 28px; }

/* ─── Responsive ─────────────────────────────────────────────────────────────── */
@media (max-width: 720px) {
  :root { --gutter: 14px; }
}
