/* ============================================================
   ARTWORK PORTFOLIO — MAIN STYLESHEET v1.2.0
   ============================================================ */

:root {
  --accent:    #111111;
  --bg:        #ffffff;
  --text:      #111111;
  --muted:     #888888;
  --border:    #e8e8e8;
  --card-bg:   #f4f4f4;
  --font:      -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  --font-heading: var(--font); /* overridden by Typography settings when a heading font is chosen */
  --max-width: 1440px;
  --gap:       12px;
  --radius:    5px;
  --header-h:  58px;
  --filter-h:  52px;
}

/* Apply heading font to titles — inherits --font when no separate heading font is set */
h1, h2, h3, h4,
.site-title,
.taxonomy-title,
.artwork-info h1,
.page-content h1,
.page-404 h1,
.page-404 h2 { font-family: var(--font-heading); }

/* ---- Reset ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html  { font-size: 16px; -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body  { font-family: var(--font); background: var(--bg); color: var(--text); line-height: 1.6; }
img   { max-width: 100%; height: auto; display: block; }
a     { color: inherit; text-decoration: none; }
button { font-family: inherit; }

/* ============================================================
   LIVE STREAM BANNER
   Dark background (#1a1a1a default), pulsing red LIVE dot,
   per-platform Watch buttons with brand colors.
   Positioned above .site-header, so z-index 300.
   ============================================================ */
.stream-banner {
  /* background set by inline style from PHP */
  color: #fff;
  font-size: 0.8125rem;
  position: relative;
  z-index: 300;
  overflow: hidden;
  max-height: 60px;
}
.stream-banner-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 48px 0 16px;
  height: 40px;
  display: flex;
  align-items: center;
  gap: 10px;
  position: relative;
}

/* LIVE indicator */
.stream-live-indicator {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}
.stream-live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ff2b2b;
  flex-shrink: 0;
  animation: live-pulse 1.6s ease-in-out infinite;
}
@keyframes live-pulse {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(255,43,43,.5); }
  50%       { opacity: .7; box-shadow: 0 0 0 5px rgba(255,43,43,0); }
}
.stream-live-text {
  font-size: 0.6875rem;
  font-weight: 800;
  letter-spacing: .1em;
  color: #ff2b2b;
  text-transform: uppercase;
}

/* Site name */
.stream-site-name {
  font-weight: 600;
  color: rgba(255,255,255,.85);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 200px;
  flex-shrink: 1;
}

/* Platform watch buttons */
.stream-platforms {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}
.stream-watch-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 11px;
  border-radius: 100px;
  /* background and text set inline from PHP */
  color: #fff;
  font-size: 0.75rem;
  font-weight: 600;
  white-space: nowrap;
  transition: opacity .15s, transform .1s;
  flex-shrink: 0;
}
.stream-watch-btn:hover { opacity: .85; transform: translateY(-1px); }
.stream-btn-icon {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}
.stream-btn-icon svg { width: 13px; height: 13px; fill: currentColor; }
.stream-btn-label { /* always visible */ }

/* Close button */
.stream-close-btn {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 26px;
  height: 26px;
  background: rgba(255,255,255,.12);
  border: none;
  border-radius: 4px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,.7);
  transition: background .15s, color .15s;
  flex-shrink: 0;
}
.stream-close-btn:hover { background: rgba(255,255,255,.25); color: #fff; }
.stream-close-btn svg { width: 11px; height: 11px; }

/* Mobile: hide platform button labels, keep icons */
@media (max-width: 600px) {
  .stream-site-name { max-width: 110px; }
  .stream-btn-label { display: none; }
  .stream-watch-btn { padding: 4px 8px; }
}

/* ============================================================
   SITE HEADER  (sticky, below stream banner)
   ============================================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 200;
  height: var(--header-h);
  background: rgba(255,255,255,.96);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.site-header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  height: 100%;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.site-title { font-size: 1rem; font-weight: 700; letter-spacing: -0.03em; white-space: nowrap; }
.site-title a:hover { opacity: 0.65; transition: opacity .15s; }
/* Logo image (when uploaded via Customizer) */
.site-logo { max-height: calc(var(--header-h) - 20px); width: auto; }
.site-nav { display: flex; align-items: center; gap: 20px; }
.site-nav a { font-size: .875rem; color: var(--muted); transition: color .15s; white-space: nowrap; }
.site-nav a:hover { color: var(--text); }
.site-nav .nav-shop {
  padding: 6px 14px;
  border: 1px solid var(--border);
  border-radius: 100px;
  color: var(--text);
  font-size: .8125rem;
  font-weight: 500;
  transition: background .15s, color .15s;
}
.site-nav .nav-shop:hover { background: var(--text); color: #fff; border-color: var(--text); }

/* ============================================================
   FILTER BAR
   ============================================================ */
.filter-bar {
  position: sticky;
  top: var(--header-h);
  z-index: 190;
  background: rgba(255,255,255,.97);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--border);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch; /* iOS momentum scroll */
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.filter-bar::-webkit-scrollbar { display: none; }
.filter-bar-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
  height: var(--filter-h);
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  min-width: max-content; /* prevents flex from squeezing into viewport width */
}
.filter-btn {
  padding: 5px 13px;
  height: 30px;
  border: 1px solid var(--border);
  border-radius: 100px;
  background: none;
  font-size: .8rem;
  cursor: pointer;
  transition: background .15s, color .15s, border-color .15s;
  color: var(--muted);
  flex-shrink: 0;
  line-height: 1;
}
.filter-btn:hover { border-color: var(--text); color: var(--text); }
.filter-btn.is-checked { background: var(--text); color: #fff; border-color: var(--text); }
.sort-wrap { display: flex; align-items: center; gap: 4px; margin-left: auto; flex-shrink: 0; }
.sort-select {
  padding: 5px 26px 5px 11px;
  height: 30px;
  border: 1px solid var(--border);
  border-radius: 100px;
  background: none url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 10 10'%3E%3Cpath fill='%23888' d='M5 7L1 3h8z'/%3E%3C/svg%3E") no-repeat right 9px center;
  -webkit-appearance: none;
  appearance: none;
  font-size: .8rem;
  color: var(--muted);
  cursor: pointer;
  font-family: var(--font);
}
.sort-select:hover { border-color: var(--text); color: var(--text); }
.order-btn {
  padding: 5px 10px;
  height: 30px;
  border: 1px solid var(--border);
  border-radius: 100px;
  background: none;
  font-size: .8rem;
  cursor: pointer;
  color: var(--muted);
  transition: all .15s;
  flex-shrink: 0;
}
.order-btn:hover { border-color: var(--text); color: var(--text); }

/* ============================================================
   TAXONOMY ARCHIVE HEADER (project_category / project_series)
   ============================================================ */
.taxonomy-header {
  border-bottom: 1px solid var(--border);
  padding: 28px 20px 20px;
}
.taxonomy-header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
}
.taxonomy-title {
  font-size: clamp(1.4rem, 3vw, 2rem);
  font-weight: 700;
  letter-spacing: -.03em;
  margin: 10px 0 6px;
}
.taxonomy-description {
  font-size: .9375rem;
  color: var(--muted);
  margin-bottom: 6px;
  max-width: 60ch;
}
.taxonomy-count {
  font-size: .8125rem;
  color: var(--muted);
}

/* ============================================================
   MASONRY GRID
   Column width is set via PHP inline <style> in <head>:
     .artwork-grid-sizer, .artwork-item { width: XX%; }
   Media queries below override at breakpoints.
   ============================================================ */
.artwork-grid-wrapper {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: var(--gap);
}

/* Negative margin compensates for item padding gutters */
.artwork-grid {
  margin: 0 calc(-1 * var(--gap) / 2);
}

/* Isotope sizer element — sets column width, zero height */
.artwork-grid-sizer { padding: 0; }

/* Each item: padding creates the visual gutter between items */
.artwork-item {
  padding: calc(var(--gap) / 2);
  /* width set by PHP inline style */
}

/* Responsive column caps (override PHP inline style) */
/* 4-col → cap at 3 on medium, 2 on small */
@media (max-width: 960px) {
  .grid-cols-4 .artwork-grid-sizer,
  .grid-cols-4 .artwork-item { width: 33.333%; }
}
/* All settings → cap at 2 on mobile */
@media (max-width: 600px) {
  .artwork-grid-sizer,
  .artwork-item { width: 50% !important; }
}
/* Very narrow: single column */
@media (max-width: 360px) {
  .artwork-grid-sizer,
  .artwork-item { width: 100% !important; }
}

/* ---- Card inner ---- */
.artwork-item-inner {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--card-bg);
}

/* ---- Image — natural aspect ratio, NO crop ---- */
.artwork-thumb-wrap {
  position: relative;
  display: block;
  cursor: zoom-in;
  overflow: hidden;
  background: var(--card-bg);
}
.artwork-thumb-wrap img {
  width: 100%;
  height: auto;      /* preserves natural aspect ratio */
  display: block;
  transition: transform .35s ease;
}
.artwork-item:hover .artwork-thumb-wrap img { transform: scale(1.03); }

/* Caption data hidden from view (used by PhotoSwipe lightbox) */
.pswp-caption-data { display: none; }

/* ---- Expand / zoom icon overlay ---- */
.expand-icon {
  position: absolute;
  bottom: 8px;
  right: 8px;
  width: 28px;
  height: 28px;
  background: rgba(255,255,255,.88);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity .2s;
  pointer-events: none;
  backdrop-filter: blur(4px);
}
.expand-icon svg { width: 13px; height: 13px; stroke: #111; fill: none; }
@media (hover: hover) { .artwork-item:hover .expand-icon { opacity: 1; } }
@media (hover: none)  { .expand-icon { opacity: .9; } }

/* ---- Arrow to post page — "Details" text pill, bottom-left ---- */
.view-post-btn {
  position: absolute;
  bottom: 8px;
  left: 8px;
  padding: 5px 10px;
  background: rgba(255,255,255,.92);
  border-radius: 100px;
  display: flex;
  align-items: center;
  font-size: .7rem;
  font-weight: 600;
  letter-spacing: .03em;
  color: #111;
  line-height: 1;
  white-space: nowrap;
  opacity: 0;
  transition: opacity .2s;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 2;
}
@media (hover: hover) { .artwork-item:hover .view-post-btn { opacity: 1; } }
@media (hover: none)  { .view-post-btn { opacity: 1; } }

.grid-empty {
  padding: 64px 24px;
  text-align: center;
  color: var(--muted);
  font-size: .9375rem;
}
.grid-empty a { color: var(--text); text-decoration: underline; }

/* ============================================================
   SINGLE PROJECT POST
   ============================================================ */
.single-project-page {
  max-width: 1000px;
  margin: 0 auto;
  padding: 28px 20px 96px;
}
.artwork-breadcrumb {
  font-size: .8125rem;
  color: var(--muted);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.artwork-breadcrumb a { color: var(--muted); transition: color .15s; }
.artwork-breadcrumb a:hover { color: var(--text); }

.artwork-hero-block {
  width: 100%;
  margin-bottom: 32px;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--card-bg);
  cursor: zoom-in;
  display: block;
  position: relative;
}
.artwork-hero-block img { width: 100%; height: auto; display: block; }
.hero-zoom-hint {
  position: absolute;
  bottom: 12px;
  right: 12px;
  background: rgba(255,255,255,.9);
  border-radius: 4px;
  padding: 6px 10px;
  font-size: .75rem;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 5px;
  backdrop-filter: blur(4px);
  pointer-events: none;
}
.hero-zoom-hint svg { width: 12px; height: 12px; stroke: var(--muted); fill: none; }

.artwork-body {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 48px;
  align-items: start;
}
@media (max-width: 720px) { .artwork-body { grid-template-columns: 1fr; gap: 32px; } }

.artwork-info h1 {
  font-size: clamp(1.4rem, 3vw, 2rem);
  font-weight: 700;
  letter-spacing: -.03em;
  line-height: 1.2;
  margin-bottom: 12px;
}
.artwork-specs { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-bottom: 20px; }
.artwork-spec { font-size: .875rem; color: var(--muted); }
.artwork-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 24px; }
.artwork-tag {
  font-size: .75rem;
  padding: 3px 10px;
  background: var(--card-bg);
  border-radius: 100px;
  color: var(--muted);
  transition: background .15s;
}
.artwork-tag:hover { background: var(--border); color: var(--text); }
.artwork-description { font-size: 1rem; line-height: 1.75; color: #333; }
.artwork-description p + p { margin-top: 1em; }

/* ── Availability badges ── */
.availability-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: .8125rem;
  font-weight: 500;
  margin-bottom: 10px;
}
.availability-badge.print-badge { margin-bottom: 14px; }
.availability-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }

/* Original */
.status-available .availability-dot { background: #22c55e; }
.status-sold      .availability-dot { background: var(--muted); }
.status-nfs       .availability-dot { background: #f59e0b; }

/* Print inherits same dot colors by status class */
.print-link {
  font-size: .75rem;
  color: var(--muted);
  text-decoration: underline;
  text-underline-offset: 2px;
  margin-left: 6px;
  transition: color .15s;
}
.print-link:hover { color: var(--text); }

.artwork-price { font-size: 1.5rem; font-weight: 700; letter-spacing: -.03em; margin-bottom: 16px; }

.cta-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 13px 20px;
  background: var(--text);
  color: #fff;
  border-radius: var(--radius);
  font-size: .9375rem;
  font-weight: 600;
  letter-spacing: -.01em;
  transition: opacity .15s;
  text-align: center;
  margin-bottom: 10px;
}
.cta-btn:hover { opacity: .82; }
.cta-btn.cta-sold { background: var(--muted); pointer-events: none; }
.cta-btn svg { width: 16px; height: 16px; fill: currentColor; flex-shrink: 0; }
.cta-sub { font-size: .75rem; color: var(--muted); text-align: center; }

.artwork-meta-list { margin-top: 24px; border-top: 1px solid var(--border); padding-top: 20px; }
.artwork-meta-row {
  display: flex;
  justify-content: space-between;
  font-size: .8125rem;
  padding: 6px 0;
  border-bottom: 1px solid var(--border);
}
.meta-label { color: var(--muted); }
.meta-value { font-weight: 500; text-align: right; max-width: 60%; }

/* ============================================================
   YOUTUBE SECTION
   ============================================================ */
.yt-section { margin-top: 52px; padding-top: 36px; border-top: 1px solid var(--border); }
.yt-section-title {
  font-size: .75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--muted);
  margin-bottom: 16px;
}
.yt-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.yt-item {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #1a1a1a;
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
}
.yt-thumb { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .8; transition: opacity .2s; }
.yt-item:hover .yt-thumb { opacity: 1; }
.yt-play { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; pointer-events: none; }
.yt-play svg { width: 44px; height: 44px; filter: drop-shadow(0 2px 6px rgba(0,0,0,.5)); }
.yt-item iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: none; z-index: 10; }

/* ============================================================
   PREV / NEXT NAV
   ============================================================ */
.post-nav {
  margin-top: 56px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  gap: 16px;
}
.post-nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--muted);
  font-size: .875rem;
  transition: color .15s;
  flex: 1;
  min-width: 0;
}
.post-nav-link:hover { color: var(--text); }
.post-nav-link.is-next { justify-content: flex-end; text-align: right; }
.post-nav-thumb { width: 48px; height: 48px; border-radius: 4px; object-fit: cover; flex-shrink: 0; }
.post-nav-dir { font-size: .7rem; text-transform: uppercase; letter-spacing: .06em; margin-bottom: 3px; }
.post-nav-title { font-size: .875rem; font-weight: 500; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.swipe-hint { text-align: center; font-size: .75rem; color: var(--border); margin-top: 14px; display: none; }
@media (hover: none) { .swipe-hint { display: block; } }

/* ============================================================
   PAGE TRANSITION
   ============================================================ */
body.is-navigating { opacity: 0 !important; transition: opacity .18s ease !important; }

/* ============================================================
   404 PAGE
   ============================================================ */
.page-404 {
  max-width: 600px;
  margin: 0 auto;
  padding: 80px 20px 96px;
  text-align: center;
}
.page-404 h1 {
  font-size: clamp(4rem, 12vw, 8rem);
  font-weight: 700;
  letter-spacing: -.05em;
  line-height: 1;
  color: var(--border);
  margin-bottom: 12px;
}
.page-404 h2 { font-size: 1.25rem; font-weight: 600; margin-bottom: 12px; }
.page-404 > p { color: var(--muted); margin-bottom: 28px; }
.page-404 .back-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 22px;
  background: var(--text);
  color: #fff;
  border-radius: var(--radius);
  font-size: .9375rem;
  font-weight: 500;
  transition: opacity .15s;
}
.page-404 .back-btn:hover { opacity: .8; }
.page-404-label { font-size: .75rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); margin: 40px 0 16px; }
.page-404-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; text-align: left; }
.page-404-item { display: block; border-radius: var(--radius); overflow: hidden; background: var(--card-bg); }
.page-404-item img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; transition: transform .3s; }
.page-404-item:hover img { transform: scale(1.04); }

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 28px 20px;
  font-size: .8125rem;
  color: var(--muted);
}
.site-footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.site-footer-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.site-footer a { color: var(--muted); transition: color .15s; }
.site-footer a:hover { color: var(--text); }

/* Footer custom nav menu */
.footer-nav { display: flex; align-items: center; }
.footer-nav-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.footer-nav-list li { margin: 0; padding: 0; }
.footer-nav-list a { font-size: .8125rem; color: var(--muted); transition: color .15s; }
.footer-nav-list a:hover { color: var(--text); }
.footer-nav-list .current-menu-item > a { color: var(--text); font-weight: 500; }

/* Social icons row */
.social-icons {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}
.social-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  transition: color .15s, transform .15s;
  flex-shrink: 0;
}
.social-icon:hover { color: var(--text); transform: translateY(-2px); }
.social-icon svg { width: 18px; height: 18px; fill: currentColor; }

/* ============================================================
   GENERIC PAGE
   ============================================================ */
.page-content { max-width: 720px; margin: 0 auto; padding: 48px 20px 96px; }
.page-content h1 { font-size: clamp(1.5rem, 4vw, 2.25rem); font-weight: 700; letter-spacing: -.03em; margin-bottom: 24px; }
.page-content p { line-height: 1.75; margin-bottom: 1em; }

/* ============================================================
   RESPONSIVE — global
   ============================================================ */
@media (max-width: 600px) {
  .filter-bar-inner { padding: 0 12px; gap: 4px; height: 44px; }
  .filter-btn { font-size: .75rem; padding: 4px 10px; height: 28px; }
  .sort-select { font-size: .75rem; height: 28px; padding: 4px 22px 4px 9px; }
  .order-btn  { padding: 4px 8px; height: 28px; }
}
@media (max-width: 480px) {
  .site-nav .nav-hide-mobile { display: none; }
  .single-project-page { padding: 20px 14px 72px; }
}
