/*
Theme Name: Underground VHS
Theme URI: https://undergroundvhs.com
Author: Underground VHS
Description: A minimal, one-column WordPress theme built for the Underground VHS collection plugin. Retro 8-bit-inspired details with readable typography and a mobile-first layout.
Version: 1.0.2
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: underground-vhs-theme
*/

:root {
  --uvt-bg: #eee9dc;
  --uvt-paper: #fffdf6;
  --uvt-ink: #11110f;
  --uvt-muted: #625e54;
  --uvt-line: #171713;
  --uvt-soft-line: #cfc8b8;
  --uvt-accent: #b6ff3b;
  --uvt-accent-ink: #11110f;
  --uvt-sale: #9d2d24;
  --uvt-max: 760px;
  --uvt-pixel: ui-monospace, "SFMono-Regular", Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  --uvt-body: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--uvt-bg);
  color: var(--uvt-ink);
  font-family: var(--uvt-body);
  font-size: 17px;
  line-height: 1.6;
}
a { color: inherit; text-decoration-thickness: 2px; text-underline-offset: 3px; }
a:hover { text-decoration-style: double; }
img { max-width: 100%; height: auto; }
button, input, select, textarea { font: inherit; }

.screen-reader-text {
  position: absolute !important;
  width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
.screen-reader-text:focus {
  clip: auto !important; width: auto; height: auto; margin: 8px; padding: 10px 14px;
  background: var(--uvt-paper); border: 2px solid var(--uvt-ink); z-index: 100000;
}

.uvt-site { min-height: 100%; }
.uvt-shell { width: min(calc(100% - 32px), var(--uvt-max)); margin-inline: auto; }

.uvt-header { padding: 28px 0 18px; }
.uvt-brand-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.uvt-brand { display: inline-flex; align-items: center; gap: 10px; min-width: 0; text-decoration: none; }
.uvt-logo-mark {
  flex: 0 0 auto; width: 34px; height: 26px; position: relative;
  background: var(--uvt-ink); border: 3px solid var(--uvt-ink);
  box-shadow: 4px 4px 0 var(--uvt-accent);
}
.uvt-logo-mark::before, .uvt-logo-mark::after {
  content: ""; position: absolute; background: var(--uvt-bg);
}
.uvt-logo-mark::before { width: 7px; height: 7px; border-radius: 50%; left: 4px; top: 6px; box-shadow: 13px 0 0 var(--uvt-bg); }
.uvt-logo-mark::after { width: 12px; height: 3px; left: 8px; bottom: 3px; }
.uvt-site-title {
  font-family: var(--uvt-pixel); font-size: clamp(1.25rem, 6vw, 1.7rem); font-weight: 900;
  letter-spacing: -.06em; line-height: 1; text-transform: uppercase; white-space: nowrap;
}
.uvt-site-tagline { margin: 9px 0 0 44px; color: var(--uvt-muted); font-size: .82rem; }

.uvt-menu-toggle {
  display: none; min-width: 44px; min-height: 44px; padding: 8px 10px;
  border: 2px solid var(--uvt-ink); background: var(--uvt-paper); color: var(--uvt-ink);
  font-family: var(--uvt-pixel); font-weight: 800; box-shadow: 3px 3px 0 var(--uvt-ink); cursor: pointer;
}
.uvt-nav { margin-top: 22px; border-block: 2px solid var(--uvt-ink); }
.uvt-nav ul { list-style: none; margin: 0; padding: 0; display: flex; align-items: stretch; }
.uvt-nav li { flex: 1 1 0; margin: 0; }
.uvt-nav a {
  display: flex; align-items: center; justify-content: center; min-height: 48px; padding: 8px 10px;
  font-family: var(--uvt-pixel); font-size: .78rem; font-weight: 800; text-transform: uppercase;
  text-decoration: none; text-align: center; border-right: 1px solid var(--uvt-soft-line);
}
.uvt-nav li:last-child a { border-right: 0; }
.uvt-nav a:hover, .uvt-nav .current-menu-item > a, .uvt-nav .current_page_item > a { background: var(--uvt-accent); }

.uvt-main { padding: 30px 0 64px; }
/* Extra breathing room for desktop content without changing the compact mobile layout. */
.uvt-main > .uvt-shell { padding-inline: 24px; }
.uvt-content { width: 100%; }
.uvt-page-header { margin-bottom: 28px; }
.uvt-page-title, .uvt-entry-title {
  margin: 0 0 10px; font-family: var(--uvt-pixel); font-weight: 900; font-size: clamp(2rem, 9vw, 3.8rem);
  line-height: .98; letter-spacing: -.075em; text-wrap: balance;
}
.uvt-entry-meta { color: var(--uvt-muted); font-size: .82rem; }
.uvt-entry-content > *:first-child { margin-top: 0; }
.uvt-entry-content h2, .uvt-entry-content h3, .uvt-entry-content h4 {
  font-family: var(--uvt-pixel); line-height: 1.15; letter-spacing: -.04em; margin-top: 2rem;
}
.uvt-entry-content blockquote { margin: 1.8rem 0; padding: 12px 18px; border-left: 6px solid var(--uvt-ink); background: var(--uvt-paper); }
.uvt-entry-content pre { overflow-x: auto; padding: 16px; background: var(--uvt-ink); color: var(--uvt-paper); }
.uvt-entry-content table { width: 100%; border-collapse: collapse; }
.uvt-entry-content th, .uvt-entry-content td { padding: 10px; border: 1px solid var(--uvt-soft-line); text-align: left; }

.uvt-post-card { padding: 0 0 28px; margin-bottom: 28px; border-bottom: 2px solid var(--uvt-ink); }
.uvt-post-card .uvt-entry-title { font-size: clamp(1.7rem, 6vw, 2.7rem); }
.uvt-post-card .uvt-entry-title a { text-decoration: none; }

.uvt-footer { border-top: 2px solid var(--uvt-ink); padding: 22px 0 34px; color: var(--uvt-muted); font-size: .78rem; }
.uvt-footer-inner { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.uvt-footer strong { color: var(--uvt-ink); font-family: var(--uvt-pixel); text-transform: uppercase; }

/* Underground VHS plugin skin */
.uvhs-front {
  --uvhs-ink: var(--uvt-ink) !important;
  --uvhs-muted: var(--uvt-muted) !important;
  --uvhs-paper: var(--uvt-paper) !important;
  --uvhs-line: var(--uvt-soft-line) !important;
  --uvhs-gold: #6b6a1f !important;
  --uvhs-sale: var(--uvt-sale) !important;
  max-width: none !important;
  font-family: var(--uvt-body) !important;
}
.uvhs-front .uvhs-kicker,
.uvhs-front .uvhs-hero h2,
.uvhs-front .uvhs-hunt-head h2,
.uvhs-front .uvhs-detail-main h2,
.uvhs-front .uvhs-card-body h3,
.uvhs-front .uvhs-hunt-result h3,
.uvhs-front .uvhs-public-copies h3 {
  font-family: var(--uvt-pixel) !important;
}
.uvhs-front .uvhs-kicker { color: var(--uvt-muted) !important; letter-spacing: .12em !important; }
.uvhs-front .uvhs-hero { padding-top: 0 !important; border-bottom: 2px solid var(--uvt-ink) !important; }
.uvhs-front .uvhs-hero h2,
.uvhs-front .uvhs-hunt-head h2,
.uvhs-front .uvhs-detail-main h2 { letter-spacing: -.075em !important; }

.uvhs-front .uvhs-search-form { gap: 10px !important; }
.uvhs-front .uvhs-search-form input,
.uvhs-front .uvhs-hunt-search input {
  border: 2px solid var(--uvt-ink) !important; border-radius: 0 !important;
  background: var(--uvt-paper) !important; min-height: 50px;
  box-shadow: 4px 4px 0 var(--uvt-ink) !important;
}
.uvhs-front .uvhs-search-form input:focus,
.uvhs-front .uvhs-hunt-search input:focus {
  outline: 3px solid var(--uvt-accent) !important; outline-offset: 2px; box-shadow: 4px 4px 0 var(--uvt-ink) !important;
}
.uvhs-front .uvhs-search-form button,
.uvhs-front .uvhs-button {
  min-height: 50px; border: 2px solid var(--uvt-ink) !important; border-radius: 0 !important;
  background: var(--uvt-ink) !important; font-family: var(--uvt-pixel); text-transform: uppercase;
  box-shadow: 4px 4px 0 var(--uvt-accent); transition: transform .08s ease, box-shadow .08s ease;
}
.uvhs-front .uvhs-search-form button:active,
.uvhs-front .uvhs-button:active { transform: translate(3px,3px); box-shadow: 1px 1px 0 var(--uvt-accent); }

/* Single-column tape list */
.uvhs-front .uvhs-grid { display: grid !important; grid-template-columns: 1fr !important; gap: 0 !important; border-top: 2px solid var(--uvt-ink); }
.uvhs-front .uvhs-tape-card {
  display: grid !important; grid-template-columns: 104px minmax(0,1fr); gap: 18px;
  padding: 18px 0; border-bottom: 2px solid var(--uvt-ink);
}
.uvhs-front .uvhs-cover { width: 104px; aspect-ratio: 2/3; border-radius: 0 !important; border: 2px solid var(--uvt-ink); box-shadow: 4px 4px 0 #9d988a; }
.uvhs-front .uvhs-card-body { padding: 0 !important; align-self: center; min-width: 0; }
.uvhs-front .uvhs-card-body h3 { font-size: 1.25rem !important; margin: 4px 0 8px !important; }
.uvhs-front .uvhs-meta, .uvhs-front .uvhs-copyline { font-size: .92rem !important; }
.uvhs-front .uvhs-badge-sale, .uvhs-front .uvhs-collection-badge {
  border-radius: 0 !important; padding: 5px 7px !important; font-family: var(--uvt-pixel); border: 1px solid currentColor;
}
.uvhs-front .uvhs-badge-sale { background: #fff0ec !important; }
.uvhs-front .uvhs-collection-badge { background: var(--uvt-paper) !important; }
.uvhs-front .uvhs-empty, .uvhs-front .uvhs-hunt-none {
  border: 2px dashed var(--uvt-ink) !important; border-radius: 0 !important; background: var(--uvt-paper) !important;
}

.uvhs-front .uvhs-detail { grid-template-columns: 180px minmax(0,1fr) !important; gap: 26px !important; }
.uvhs-front .uvhs-detail-cover img, .uvhs-front .uvhs-cover-placeholder {
  border-radius: 0 !important; border: 2px solid var(--uvt-ink); box-shadow: 5px 5px 0 #9d988a;
}
.uvhs-front .uvhs-facts { border-color: var(--uvt-ink) !important; }
.uvhs-front .uvhs-value-box { border: 2px solid var(--uvt-ink) !important; border-radius: 0 !important; box-shadow: 4px 4px 0 var(--uvt-accent); }
.uvhs-front .uvhs-public-copy { border-color: var(--uvt-ink) !important; }

/* Hunt Mode: app-like and extremely touch friendly */
.uvhs-hunt { max-width: none !important; }
.uvhs-hunt .uvhs-hunt-head { border-bottom: 2px solid var(--uvt-ink); margin-bottom: 18px; }
.uvhs-hunt .uvhs-hunt-search input { min-height: 60px; padding: 16px !important; font-size: 18px !important; }
.uvhs-hunt .uvhs-hunt-help { padding-top: 10px !important; }
.uvhs-hunt .uvhs-hunt-result {
  grid-template-columns: minmax(0,1fr) auto !important; gap: 16px !important;
  padding: 20px 0 !important; border-top: 2px solid var(--uvt-ink) !important;
}
.uvhs-hunt .uvhs-owned { display: inline-block; padding: 3px 5px; background: var(--uvt-accent); color: var(--uvt-ink) !important; font-family: var(--uvt-pixel); }
.uvhs-hunt .uvhs-hunt-result h3 { font-size: 1.45rem !important; }

/* Minimal page chrome on Hunt Mode */
body.page-vhs-hunt .uvt-header { padding-bottom: 8px; }
body.page-vhs-hunt .uvt-site-tagline { display: none; }
body.page-vhs-hunt .uvt-main { padding-top: 18px; }
body.page-vhs-hunt .uvt-entry-content > p:empty { display: none; }


/* Landing page */
.uvt-home { padding: 8px 0 10px; }
.uvt-home-kicker { display:block; font-family:var(--uvt-pixel); font-size:.72rem; font-weight:900; letter-spacing:.14em; color:var(--uvt-muted); }
.uvt-home h1 { margin:8px 0 12px; font-family:var(--uvt-pixel); font-size:clamp(2.7rem,10vw,5.2rem); line-height:.9; letter-spacing:-.085em; text-transform:uppercase; }
.uvt-home-lead { max-width:620px; margin:0 0 28px; font-size:1.08rem; color:var(--uvt-muted); }
.uvt-home-actions { display:grid; grid-template-columns:1fr 1fr; gap:12px; margin:26px 0; }
.uvt-home-action { display:flex; min-height:86px; padding:16px; border:2px solid var(--uvt-ink); background:var(--uvt-paper); text-decoration:none; box-shadow:4px 4px 0 var(--uvt-ink); flex-direction:column; justify-content:center; }
.uvt-home-action strong { font-family:var(--uvt-pixel); font-size:1rem; text-transform:uppercase; }
.uvt-home-action span { margin-top:3px; font-size:.82rem; color:var(--uvt-muted); }
.uvt-home-action:hover { background:var(--uvt-accent); text-decoration:none; }
.uvt-home-stats { display:grid; grid-template-columns:repeat(3,1fr); border-block:2px solid var(--uvt-ink); margin-top:34px; }
.uvt-home-stat { padding:14px 8px; text-align:center; border-right:1px solid var(--uvt-soft-line); }
.uvt-home-stat:last-child { border-right:0; }
.uvt-home-stat strong { display:block; font-family:var(--uvt-pixel); font-size:1.5rem; line-height:1; }
.uvt-home-stat span { display:block; margin-top:5px; color:var(--uvt-muted); font-size:.72rem; text-transform:uppercase; letter-spacing:.06em; }

/* Wishlist */
.uvhs-front .uvhs-wishlist-list { border-top:2px solid var(--uvt-ink) !important; }
.uvhs-front .uvhs-wishlist-item { border-bottom:2px solid var(--uvt-ink) !important; padding:18px 0 !important; }
.uvhs-front .uvhs-wishlist-main h3 { font-family:var(--uvt-pixel) !important; font-size:1.25rem !important; margin:5px 0 !important; }
.uvhs-front .uvhs-wish-star, .uvhs-front .uvhs-wishlist-hit { background:var(--uvt-accent); color:var(--uvt-ink) !important; padding:3px 5px; font-family:var(--uvt-pixel); }
.uvhs-front .uvhs-wishlist-price strong { font-family:var(--uvt-pixel); }
.uvhs-hunt .uvhs-hunt-result-wishlist { background:transparent !important; }

@media (max-width: 640px) {
  body { font-size: 16px; }
  .uvt-shell { width: min(calc(100% - 24px), var(--uvt-max)); }
  .uvt-header { padding-top: 18px; }
  .uvt-site-tagline { margin-left: 0; margin-top: 10px; }
  .uvt-menu-toggle { display: inline-block; }
  .uvt-nav { display: none; margin-top: 16px; }
  .uvt-nav.is-open { display: block; }
  .uvt-nav ul { display: grid; grid-template-columns: 1fr; }
  .uvt-nav a { justify-content: flex-start; min-height: 52px; border-right: 0; border-bottom: 1px solid var(--uvt-soft-line); }
  .uvt-nav li:last-child a { border-bottom: 0; }
  .uvt-main { padding-top: 22px; }
  .uvt-main > .uvt-shell { padding-inline: 0; }
  .uvt-page-title { font-size: 2.35rem; }

  .uvhs-front .uvhs-search-form { display: grid !important; grid-template-columns: 1fr !important; }
  .uvhs-front .uvhs-search-form input, .uvhs-front .uvhs-search-form button { width: 100%; }
  .uvhs-front .uvhs-search-form > a { text-align: center; }
  .uvhs-front .uvhs-tape-card { grid-template-columns: 78px minmax(0,1fr); gap: 14px; padding: 16px 0; }
  .uvhs-front .uvhs-cover { width: 78px; box-shadow: 3px 3px 0 #9d988a; }
  .uvhs-front .uvhs-card-body h3 { font-size: 1.08rem !important; }
  .uvhs-front .uvhs-meta, .uvhs-front .uvhs-copyline { font-size: .82rem !important; }
  .uvhs-front .uvhs-detail { grid-template-columns: 1fr !important; }
  .uvhs-front .uvhs-detail-cover { max-width: 190px !important; }
  .uvhs-hunt .uvhs-hunt-result { grid-template-columns: 1fr !important; }
  .uvhs-hunt .uvhs-hunt-comp { text-align: left !important; min-width: 0 !important; display: flex !important; flex-wrap: wrap; gap: 5px 7px; align-items: baseline; }
  .uvhs-hunt .uvhs-hunt-comp span, .uvhs-hunt .uvhs-hunt-comp strong, .uvhs-hunt .uvhs-hunt-comp small { display: inline !important; }
  .uvt-home-actions { grid-template-columns:1fr; }
  .uvt-home-stats { grid-template-columns:1fr; }
  .uvt-home-stat { border-right:0; border-bottom:1px solid var(--uvt-soft-line); }
  .uvt-home-stat:last-child { border-bottom:0; }
  body.page-vhs-hunt .uvt-nav { display: none !important; }
  body.page-vhs-hunt .uvt-menu-toggle { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
.uvt-custom-logo img { display: block; max-width: 260px; max-height: 60px; width: auto; height: auto; }
