/* ============================================================
   Den Gallery — shared "gallery aesthetic" styles
   Used by the Artworks listing, Artists listing, Artist detail
   and Artwork detail pages. Scoped under .g-page so the
   variables and resets do not bleed into other site templates
   (control panel, exhibitions, gift shop, etc.).
   ============================================================ */

/* Global utility — used by static pages (About, Contact, Exhibitions)
   for their page heading. Size matches the "Artworks" heading on the
   Artworks page (26px) per client direction. */
.page-title-serif {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-weight: 400;
  font-size: 26px;
  letter-spacing: -0.005em;
  line-height: 1.2;
  margin: 0 0 6px;
}
@media (max-width: 768px) { .page-title-serif { font-size: 22px; } }

/* Page-header bar — replicates the placement of the "Artworks" heading
   on the Artworks listing page so static pages (About, Contact,
   Exhibitions, etc.) all sit with their title flush-left, followed by
   an optional subtitle and a thin border-bottom divider. Vertical spacing
   is balanced: ~40px of breathing room above the title (navbar is fixed
   ~80px) and the same below the border to the first content block. */
.page-header-bar {
  padding: 120px 0 20px;
  margin: 0 0 32px;
  border-bottom: 1px solid #ececec;
  text-align: left;
}
@media (max-width: 768px) {
  .page-header-bar { padding: 100px 0 16px; margin: 0 0 24px; }
}
[dir="rtl"] .page-header-bar { text-align: right; }
.page-header-bar .page-subtitle {
  color: #6b6b6b;
  font-size: 14px;
  margin: 4px 0 0;
}

.g-page {
  --aw-bg:      #ffffff;
  --aw-fg:      #1a1a1a;
  --aw-muted:   #6b6b6b;
  --aw-border:  #ececec;
  --aw-accent:  #8B1F2F;   /* deep burgundy */
  --aw-soft:    #f7f5f3;
  --aw-sans:    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  /* --aw-serif now aliases the sans-serif stack per client direction —
     keeps existing rules using var(--aw-serif) but renders sans-serif. */
  --aw-serif:   -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--aw-bg);
  color: var(--aw-fg);
  font-family: var(--aw-sans);
  padding-top: 80px;
}

/* Fluid full-width shell matching the Artworks page (.artworks-page__shell)
   so every public page (artists, artwork details, About, Contact, Exhibitions,
   My Profile, etc.) reads with the same horizontal padding and edge-to-edge
   feel — no centered 1440px cap. */
.g-shell {
  margin: 0 auto;
  padding: 0 48px 24px;
  box-sizing: border-box;
  max-width: 100%;
}
@media (max-width: 1200px) { .g-shell { padding: 0 32px 24px; } }
@media (max-width: 768px)  { .g-shell { padding: 0 20px 20px; } }

/* Page header (centered hero) */
.g-page-header { text-align: center; padding: 8px 0 32px; }
.g-page-header h1 {
  font-family: var(--aw-serif);
  font-size: 28px;
  font-weight: 400;
  margin: 0 0 6px;
  letter-spacing: -0.005em;
}
@media (max-width: 768px) {
  .g-page-header h1 { font-size: 24px; }
}
.g-page-header .g-subtitle {
  color: var(--aw-muted);
  font-size: 13px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.g-divider {
  border: 0;
  border-top: 1px solid var(--aw-border);
  margin: 24px 0;
}

/* Card grid */
.g-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 32px;
}
@media (max-width: 1200px) { .g-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; } }
@media (max-width: 768px)  { .g-grid, .g-grid--sm { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 20px; } }
@media (max-width: 600px)  { .g-grid, .g-grid--sm { grid-template-columns: minmax(0, 1fr) !important; gap: 24px; } }

.g-grid--sm { gap: 20px; }
.g-grid--sm .g-card__title { font-size: 16px; }

/* Card */
.g-card {
  display: block;
  color: var(--aw-fg);
  text-decoration: none;
  transition: transform .2s ease;
}
.g-card:hover { color: var(--aw-fg); text-decoration: none; transform: translateY(-2px); }
.g-card__media {
  position: relative;
  background: var(--aw-soft);
  aspect-ratio: 1 / 1;
  overflow: hidden;
}
.g-card__media--portrait { aspect-ratio: 3 / 4; }
.g-card__media img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  transition: opacity .2s ease;
}
.g-card:hover .g-card__media img { opacity: .92; }
.g-card__media-placeholder {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  background: var(--aw-soft);
  color: #c8c4bc;
  font-size: 36px;
}
.g-card__body { padding: 14px 2px 0; }
.g-card__title {
  font-family: var(--aw-serif);
  font-size: 18px;
  font-weight: 400;
  margin: 0 0 4px;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.g-card__sub {
  color: var(--aw-muted);
  font-size: 13px;
  margin: 0 0 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.g-card__meta {
  color: var(--aw-muted);
  font-size: 12px;
  margin: 0 0 8px;
}
.g-card__price {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--aw-fg);
}

/* Buttons / links */
.g-btn {
  display: inline-block;
  background: var(--aw-fg);
  color: #fff;
  border: 0;
  padding: 12px 28px;
  font-family: inherit;
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  cursor: pointer;
  text-decoration: none;
  border-radius: 2px;
  transition: opacity .15s;
}
.g-btn:hover { color: #fff; text-decoration: none; opacity: .9; }
.g-btn--outline {
  background: transparent;
  color: var(--aw-fg);
  border: 1px solid var(--aw-fg);
}
.g-btn--outline:hover { background: var(--aw-fg); color: #fff; }
.g-btn--accent { background: var(--aw-accent); }
.g-btn--sm { padding: 8px 16px; font-size: 11px; }

.g-link {
  color: var(--aw-accent);
  text-decoration: none;
  border-bottom: 1px solid transparent;
}
.g-link:hover { color: var(--aw-accent); border-bottom-color: var(--aw-accent); }

/* Empty state */
.g-empty {
  text-align: center;
  padding: 80px 16px;
  grid-column: 1 / -1;
}
.g-empty h4 {
  font-family: var(--aw-serif);
  font-weight: 400;
  font-size: 22px;
  margin: 0 0 8px;
}

/* Info label (used on detail pages) */
.g-info-label {
  color: var(--aw-muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* Artist hero (used on artist detail page) */
.g-artist-hero {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 32px;
  align-items: center;
  padding: 16px 0 32px;
}
@media (max-width: 768px) {
  .g-artist-hero { grid-template-columns: 1fr; text-align: center; gap: 16px; }
  .g-artist-hero__media { margin: 0 auto; }
}
.g-artist-hero__media,
.g-artist-hero__media img {
  width: 200px; height: 200px; border-radius: 50%;
  object-fit: cover;
}
.g-artist-hero__media {
  background: var(--aw-soft);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.g-artist-hero__media i { color: #c8c4bc; font-size: 64px; }
.g-artist-hero h1 {
  font-family: var(--aw-serif);
  font-size: 28px;
  font-weight: 400;
  margin: 0 0 6px;
}
@media (max-width: 768px) {
  .g-artist-hero h1 { font-size: 24px; }
}
.g-artist-hero .g-subtitle {
  color: var(--aw-muted);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 12px;
}
.g-artist-hero .g-bio {
  color: var(--aw-muted);
  font-size: 15px;
  line-height: 1.6;
}

/* Load-more wrap (used by listing pages) */
.g-load-more {
  display: flex;
  justify-content: center;
  margin: 56px 0 0;
}
@media (max-width: 768px) {
  .g-load-more { display: block; }
  .g-load-more .g-btn { width: 100%; }
}
