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

:root {
  --gold:    #dda313;
  --goldhov: #ffffff;
  --bg:      #111010;
  --bg2:     #1a1918;
  --bg3:     #222120;
  --border:  #2e2b28;
  --text:    #ccc9c3;
  --muted:   #808080;
  --white:   #ffffff;
  --sans:    'Arial Narrow', Arial, sans-serif;
  --serif:   Georgia, 'Times New Roman', serif;
}

html { scroll-behavior: smooth; }

body {
  background-color: var(--bg);
  background-image: url('/images/hydrogyn_sides.jpg');
  background-repeat: repeat-y;
  background-position: 50% 0;
  color: var(--text);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.6;
  min-height: 100vh;
}

a { color: var(--gold); text-decoration: none; }
a:hover { color: var(--goldhov); text-decoration: underline; }
img { display: block; }

/* ── Container ─────────────────────────────────────────────── */
#container {
  max-width: 960px;
  margin: 0 auto;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ── Header banner ─────────────────────────────────────────── */
#header {
  width: 100%;
  height: 258px;
  background: url('/images/hydrogyn_header.jpg') center top / cover no-repeat, #0a0909;
  position: relative;
  flex-shrink: 0;
}

#top_btn_holder {
  position: absolute;
  top: 8px;
  right: 10px;
  display: flex;
  gap: 4px;
  align-items: center;
}
#top_btn_holder img { width: 24px; height: 24px; display: inline; }

/* ── Navigation ────────────────────────────────────────────── */
#nav {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  list-style: none;
  display: flex;
  background: rgba(0,0,0,0.75);
  border-top: 1px solid rgba(221,163,19,0.3);
}
#nav li { position: relative; flex: 1; }
#nav a {
  display: block;
  text-align: center;
  color: var(--gold);
  font-family: var(--sans);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.5rem 0.4rem;
  border-right: 1px solid rgba(221,163,19,0.2);
  transition: color 0.15s, background 0.15s;
  text-decoration: none;
}
#nav a:hover, #nav a.on {
  color: var(--white);
  background: rgba(221,163,19,0.12);
  text-decoration: none;
}
#nav li:last-child a { border-right: none; }

/* Mobile nav toggle */
.nav-toggle {
  display: none;
  position: absolute;
  bottom: 6px;
  right: 10px;
  background: rgba(0,0,0,0.6);
  border: 1px solid var(--gold);
  color: var(--gold);
  font-size: 1.1rem;
  padding: 4px 8px;
  cursor: pointer;
  z-index: 10;
}

/* ── Content layout ────────────────────────────────────────── */
.content {
  flex: 1;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  padding: 0;
}
.main {
  width: 580px;
  padding: 0 20px;
  flex-shrink: 0;
}
.secondary {
  width: 300px;
  padding: 0;
  flex-shrink: 0;
}
.tertiary { display: none; }

/* ── Section headings ──────────────────────────────────────── */
.dark_headline {
  padding: 6px 0 2px 10px;
  background: rgba(0,0,0,0.5);
  margin-top: 16px;
  margin-bottom: 10px;
}
.dark_headline h2 {
  font-family: var(--sans);
  font-size: 1.1rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--white);
  padding: 0;
  margin: 0;
}
h2 { color: var(--white); }

/* ── Blog post list (original bloglist_row style) ──────────── */
.blog_container { margin-bottom: 1.5rem; }
.bloglist_row {
  clear: both;
  padding: 23px 0 16px 0;
  overflow: hidden;
  border-top: 1px solid rgba(255,255,255,0.12);
}
.bloglist_row:first-child { border-top: none; }

/* productGrid thumbnail - left-floated, 100x100 clipped box */
ul.productGrid {
  display: block;
  list-style: none;
  margin: 0;
  padding: 0;
}
ul.productGrid li {
  display: block;
  width: 100px;
  height: 100px;
  overflow: hidden;
}
ul.productGrid li a { border: 0; display: block; }
ul.productGrid li img { width: 100%; display: block; }

.itemleft { overflow: hidden; }

.bloglist_row h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.2rem;
  padding: 0;
}
.bloglist_row h3 a { color: var(--gold); text-decoration: none; }
.bloglist_row h3 a:hover { color: var(--white); text-decoration: underline; }

.bloglist_row .post-meta {
  font-family: var(--sans);
  font-size: 0.75rem;
  color: var(--muted);
  margin-bottom: 0.3rem;
}
.bloglist_row .post-meta a { color: var(--gold); text-decoration: none; }
.bloglist_row .post-meta a:hover { color: var(--white); }

.readmore { float: right; }
.readmore a {
  font-family: var(--sans);
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--gold);
  text-decoration: none;
}
.readmore a:hover { color: var(--white); text-decoration: underline; }

/* ── Post list page ────────────────────────────────────────── */
.post-list { display: flex; flex-direction: column; }
.post-row {
  display: flex;
  gap: 1rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--border);
}
.post-row:first-child { padding-top: 0; }
.post-thumb { width: 100px; height: 70px; object-fit: cover; flex-shrink: 0; }
.post-row h3 { font-size: 1rem; font-weight: 700; margin-bottom: 0.2rem; }
.post-row h3 a { color: var(--gold); }
.post-row h3 a:hover { color: var(--white); }
.post-teaser { font-size: 0.875rem; color: var(--text); margin-top: 0.3rem; }
.post-date { font-family: var(--sans); font-size: 0.72rem; color: var(--muted); text-transform: uppercase; }
.post-hero { width: 100%; max-height: 360px; object-fit: cover; margin-bottom: 1.5rem; }

.category-label {
  font-family: var(--sans);
  font-size: 0.72rem;
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.3rem;
}
.category-label a { color: var(--gold); }
.category-label a:hover { color: var(--white); }

/* ── Post full ─────────────────────────────────────────────── */
.post-full h1 { color: var(--gold); font-size: 1.7rem; margin-bottom: 0.4rem; line-height: 1.25; }
.post-full .post-date { margin-bottom: 1.25rem; }

/* ── Page header ───────────────────────────────────────────── */
.page-header {
  margin-top: 16px;
  margin-bottom: 1.5rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
}
.page-header h1 {
  font-family: var(--sans);
  font-size: 1.7rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold);
}
.breadcrumb { font-size: 0.78rem; color: var(--muted); margin-bottom: 0.4rem; }
.breadcrumb a { color: var(--gold); }

/* ── Pager ─────────────────────────────────────────────────── */
.pager { display: flex; align-items: center; gap: 1rem; margin-top: 1.5rem; color: var(--muted); font-size: 0.875rem; font-family: var(--sans); }
.pager a { color: var(--gold); font-weight: 600; }

/* ── Buttons ───────────────────────────────────────────────── */
.btn {
  display: inline-block;
  margin-top: 1.25rem;
  padding: 0.4rem 1.1rem;
  border: 1px solid var(--gold);
  color: var(--gold);
  font-family: var(--sans);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  transition: background 0.15s, color 0.15s;
  text-decoration: none;
}
.btn:hover { background: var(--gold); color: #000; text-decoration: none; }

/* ── Discography ───────────────────────────────────────────── */
.disc-list { padding-left: 12px; }
.light_headline {
  padding: 0 10px;
  background: rgba(255,255,255,0.07);
  margin-bottom: 10px;
  margin-top: 1.25rem;
  overflow: hidden;
  scroll-margin-top: 16px;
}
.light_headline h3 {
  padding: 5px 0;
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  color: var(--white);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.light_headline h3 span {
  font-size: 0.82rem;
  font-weight: normal;
  float: right;
  color: var(--muted);
  text-transform: none;
  letter-spacing: 0;
}

.cols { display: flex; gap: 1rem; align-items: flex-start; margin-bottom: 0.5rem; }
.col { flex: 1; font-size: 0.85rem; line-height: 1.6; }
.col.first { flex: 0 0 160px; }
.col.first img { width: 160px; height: 160px; object-fit: cover; display: block; border: 1px solid var(--border); }
.col h3 {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--white);
  margin: 0 0 0.3rem;
  text-transform: none;
}

.disc-notes {
  font-size: 0.82rem;
  color: var(--muted);
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 0.25rem;
  line-height: 1.6;
}

/* ── Merchandise ───────────────────────────────────────────── */
.merch-grid { padding-left: 12px; }
.merch-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem 0 1rem 12px;
  flex-wrap: wrap;
}
.merch-tagline { font-size: 0.82rem; color: var(--muted); margin: 0; }

.merch-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.merch-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  transition: border-color 0.2s, transform 0.2s;
}
.merch-card:hover { border-color: var(--gold); transform: translateY(-2px); }

/* Product image — square aspect ratio with category-tinted placeholder */
.merch-card__img-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  overflow: hidden;
  background: linear-gradient(135deg, #1a1512 0%, #0d0b09 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}
.merch-card__img-wrap::before {
  content: attr(data-category);
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--sans);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: rgba(221,163,19,0.25);
  padding: 1rem;
  text-align: center;
  word-break: break-word;
}
/* Large icon glyph behind category text */
.merch-card__img-wrap::after {
  content: '♪';
  position: absolute;
  font-size: 5rem;
  color: rgba(221,163,19,0.07);
  pointer-events: none;
}
.merch-card__img-wrap[data-category*="cloth"]::after,
.merch-card__img-wrap[data-category*="shirt"]::after,
.merch-card__img-wrap[data-category*="beanie"]::after { content: '✦'; }
.merch-card__img-wrap[data-category*="book"]::after  { content: '📖'; font-size: 3rem; }
.merch-card__img-wrap[data-category*="dvd"]::after   { content: '▶'; }

.merch-card__img-wrap img {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Badge */
.merch-badge {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 2px 7px;
  border-radius: 2px;
  background: rgba(221,163,19,0.15);
  color: var(--gold);
  border: 1px solid rgba(221,163,19,0.3);
  margin-bottom: 0.5rem;
}

/* Card body */
.merch-card__body {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 0.9rem;
}
.merch-card__name {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--white);
  margin: 0 0 0.5rem;
  line-height: 1.3;
}
.merch-card__desc {
  font-size: 0.8rem;
  color: var(--muted);
  line-height: 1.55;
  flex: 1;
  margin-bottom: 1rem;
}

/* Footer: price + button */
.merch-card__footer {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin-top: auto;
}
.merch-card__price {
  font-family: var(--sans);
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--gold);
}

/* Size selector */
.merch-size-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.4rem;
}
.merch-size-label { font-size: 0.75rem; color: var(--muted); white-space: nowrap; }
.merch-size-select {
  flex: 1;
  background: var(--bg3);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 0.3rem 0.5rem;
  font-size: 0.8rem;
  font-family: var(--sans);
}
.merch-size-select:focus { outline: 1px solid var(--gold); }

/* Buttons */
.merch-add-form { display: flex; flex-direction: column; gap: 0.4rem; }

.merch-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  font-family: var(--sans);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border: none;
  cursor: pointer;
  padding: 0.55rem 1rem;
  transition: background 0.15s, color 0.15s;
  text-decoration: none;
}
.merch-btn--cart {
  background: var(--gold);
  color: #000;
  width: 100%;
}
.merch-btn--cart:hover { background: var(--white); color: #000; }

.merch-btn--viewcart {
  background: transparent;
  border: 1px solid var(--gold);
  color: var(--gold);
  padding: 0.45rem 1rem;
  font-size: 0.75rem;
}
.merch-btn--viewcart:hover { background: var(--gold); color: #000; }

.merch-viewcart-form { display: inline-flex; }
.merch-unavailable { font-size: 0.75rem; color: var(--muted); }

@media (max-width: 600px) {
  .merch-grid { grid-template-columns: 1fr 1fr; gap: 0.75rem; }
}
@media (max-width: 400px) {
  .merch-grid { grid-template-columns: 1fr; }
}

/* ── Gallery ───────────────────────────────────────────────── */
.gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 1rem; }
.gallery-thumb {
  display: flex; flex-direction: column; align-items: center; gap: 0.4rem;
  background: var(--bg2); border: 1px solid var(--border); overflow: hidden;
  color: var(--text); text-align: center; transition: border-color 0.2s;
}
.gallery-thumb:hover { border-color: var(--gold); color: var(--gold); text-decoration: none; }
.gallery-thumb img { width: 100%; height: 150px; object-fit: cover; }
.gallery-thumb span { font-family: var(--sans); font-size: 0.8rem; font-weight: 600; padding: 0.4rem; }
.no-thumb { width: 100%; height: 150px; background: var(--bg3); }
.gallery-coming-soon { color: var(--muted); font-family: var(--sans); padding: 1rem 0 0 10px; }

.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 0.75rem; }
.photo-item { position: relative; overflow: hidden; aspect-ratio: 1 / 1; background: #111; }
.photo-item::before { content: ''; position: absolute; inset: -20px; background-image: var(--bg); background-size: cover; background-position: center; filter: blur(20px) brightness(0.3); }
.photo-item a { position: relative; z-index: 1; display: block; width: 100%; height: 100%; }
.photo-item img { width: 100%; height: 100%; object-fit: contain; display: block; transition: opacity 0.2s; }
.photo-item img:hover { opacity: 0.85; }

/* ── CMS content ───────────────────────────────────────────── */
.page-content { margin: 0; padding: 0 0 0 12px; }
.page-body { margin: 0; padding: 0; }
.cms-content { line-height: 1.8; }
.cms-content h2 {
  color: var(--white);
  font-family: var(--sans);
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin: 0.5rem 0 0.5rem;
  clear: none;
}
/* dark_headline h2 must never inherit cms-content's margin regardless of nesting */
.cms-content .dark_headline h2 { margin: 0; }
.cms-content h3 { color: var(--gold); margin: 1rem 0 0.5rem; font-family: var(--sans); letter-spacing: 0.05em; }
.cms-content p { margin-bottom: 0.75rem; color: var(--text); }
.cms-content a { color: var(--gold); }
.cms-content a:hover { color: var(--white); }
.cms-content img { max-width: 100%; }
.cms-content hr { clear: both; border: none; border-top: 1px solid var(--border); margin: 1.5rem 0; }
.img_left {
  float: left;
  margin: 0 1.25rem 0.75rem 0;
  max-width: 220px;
  display: block;
}
.img_left img { width: 100%; display: block; }
.img_right { float: right; margin: 0 0 0.75rem 1.25rem; max-width: 220px; }

/* ── CMS content images: prevent inline height from distorting aspect ratio */
.page-body img, .cms-content img { height: auto; max-width: 100%; }

/* ── News sidebar (Links page secondary column) ────────────── */
.sidebar-news { padding: 0 8px; }
.sidebar-post { margin-bottom: 0.5rem; }
.sidebar-card {
  display: flex;
  gap: 0.75rem;
  background: #2a2a2a;
  padding: 0.65rem 0.75rem;
  align-items: flex-start;
}
.sidebar-thumb {
  width: 100px;
  height: 100px;
  object-fit: cover;
  flex-shrink: 0;
  display: block;
}
.sidebar-card-body { flex: 1; display: flex; flex-direction: column; }
.sidebar-card-body h4 { font-size: 0.85rem; font-weight: 700; margin: 0 0 0.25rem; line-height: 1.3; }
.sidebar-card-body h4 a { color: var(--gold); text-decoration: none; }
.sidebar-card-body h4 a:hover { color: var(--white); }
.sidebar-teaser { font-size: 0.78rem; color: var(--white); font-weight: 700; line-height: 1.4; flex: 1; margin: 0; }
.sidebar-readmore { font-size: 0.75rem; font-weight: 700; color: var(--gold); text-decoration: none; display: block; text-align: right; margin-top: 0.3rem; }
.sidebar-readmore:hover { color: var(--white); }

/* ── Section title (generic) ───────────────────────────────── */
.section-title {
  font-family: var(--sans);
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--gold);
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.5rem;
  margin-bottom: 1.25rem;
}
.home-section { margin-bottom: 2.5rem; }

/* ── Footer ────────────────────────────────────────────────── */
#footer {
  background: #0a0909;
  border-top: 1px solid var(--border);
  padding: 0.75rem 1rem;
  text-align: center;
  font-family: var(--sans);
  font-size: 0.72rem;
  color: var(--muted);
  letter-spacing: 0.06em;
}
#footer a { color: var(--gold); text-decoration: none; }
#footer a:hover { color: var(--white); }

/* ── Responsive ────────────────────────────────────────────── */
@media (max-width: 960px) {
  #container { width: 100%; }
  .main { width: 100%; }
  .secondary { display: none; }
}
@media (max-width: 700px) {
  .nav-toggle { display: block; }
  #nav {
    display: none;
    position: static;
    flex-direction: column;
    background: #0a0909;
    border-top: 1px solid var(--border);
  }
  #nav.open { display: flex; }
  #nav a { border-right: none; border-bottom: 1px solid var(--border); }
  #header { height: 160px; }
  .album { grid-template-columns: 1fr; }
  .album-cover { max-width: 200px; }
}
/* ── Photo gallery frontend ───────────────────────────────────────────────── */
.photo-gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 1.5rem; padding: 1rem 0; }
.gallery-card { text-decoration: none; display: block; }
.gallery-card__thumb { position: relative; width: 100%; aspect-ratio: 1 / 1; overflow: hidden; border: 1px solid var(--border); background: #111; }
.gallery-card__thumb::before { content: ''; position: absolute; inset: -20px; background-image: var(--bg); background-size: cover; background-position: center; filter: blur(20px) brightness(0.3); }
.gallery-card__thumb img { position: relative; z-index: 1; width: 100%; height: 100%; object-fit: contain; display: block; transition: opacity 0.2s; }
.gallery-card:hover .gallery-card__thumb img { opacity: 0.85; }
.gallery-card__name { color: var(--gold); font-size: 0.9rem; font-weight: 600; margin-top: 0.4rem; text-align: center; }


@media (max-width: 480px) {
  .post-row { flex-direction: column; }
  .post-thumb { width: 100%; height: 160px; }
  ul.productGrid { float: none !important; width: 100% !important; margin: 0 0 0.6rem 0 !important; }
  ul.productGrid li { width: 100% !important; aspect-ratio: 1 / 1; height: auto !important; }
  ul.productGrid li img { width: 100% !important; height: 100% !important; max-height: none !important; object-fit: cover; }

  /* Discography: cover full-width, then tracks + lineup side-by-side below */
  .cols { flex-wrap: wrap; }
  .col.first {
    flex: 0 0 100%;
  }
  .col.first img {
    width: 100%;
    height: auto;
    max-height: 320px;
    object-fit: cover;
  }
}
