/* ============================================================
   HeroesCollection – Main Stylesheet
   Christie's-inspired: clean, minimal, serif headings
   ============================================================ */

/* --- Typography --- */
@import url('https://fonts.googleapis.com/css2?family=EB+Garamond:ital,wght@0,400;0,600;1,400&family=Inter:wght@300;400;500&display=swap');

body {
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  color: #1a1a1a;
  background-color: #fafafa;
}

h1, h2, h3, .artwork-detail__title {
  font-family: 'EB Garamond', Georgia, serif;
}

/* --- Page layout --- */
main.container-fluid {
  padding-left: 50px;
  padding-right: 50px;
}

/* --- Navbar --- */
.navbar .container-fluid {
  padding-left: 50px;
  padding-right: 50px;
}

.navbar-brand {
  letter-spacing: 0.18em;
  font-size: 1rem;
  font-family: 'Inter', sans-serif;
  font-weight: 500;
}

/* ============================================================
   Gallery Grid  (Christie's-style 3–4 column mosaic)
   ============================================================ */
.artwork-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 3rem 2.5rem;
  margin-bottom: 2rem;
}

.artwork-card {
  display: flex;
  flex-direction: column;
}

.artwork-card__image-link {
  display: block;
  overflow: hidden;
  background: #f0ece8;
  aspect-ratio: 4 / 5;
  position: relative;
}

.artwork-card__image {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform 0.3s ease;
}

.artwork-card__image-link:hover .artwork-card__image {
  transform: scale(1.03);
}

.artwork-card__sold-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  background: rgba(220, 53, 69, 0.88);
  color: #fff;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 2px 7px;
  border-radius: 3px;
  pointer-events: none;
  text-transform: uppercase;
  z-index: 1;
}

.artwork-card__no-image {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #ede9e4;
}

.artwork-card__info {
  padding: 0.6rem 0;
}

.artwork-card__artist {
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #555;
  margin-bottom: 0.2rem;
}

.artwork-card__artist-link {
  color: inherit;
  text-decoration: none;
}

.artwork-card__artist-link:hover {
  text-decoration: underline;
  color: #1a1a1a;
}

.artwork-card__title {
  font-family: 'EB Garamond', Georgia, serif;
  font-size: 1rem;
  margin-bottom: 0.1rem;
}

.artwork-card__title a {
  color: #1a1a1a;
  text-decoration: none;
}

.artwork-card__title a:hover {
  text-decoration: underline;
}

.artwork-card__medium {
  font-size: 0.78rem;
}

.artwork-card__estimate {
  font-size: 0.78rem;
  color: #444;
}

/* ============================================================
   Artwork Detail
   ============================================================ */
.artwork-detail__artist-link {
  color: inherit;
  text-decoration: none;
}

.artwork-detail__artist-link:hover {
  text-decoration: underline;
}

.artwork-detail__main-image img {
  max-height: 600px;
  width: 100%;
  object-fit: contain;
  background: #f5f2ef;
}

.artwork-detail__thumbs {
  margin-top: 0.5rem;
}

.artwork-detail__thumb {
  height: 60px;
  object-fit: cover;
  cursor: pointer;
  border: 2px solid transparent;
  opacity: 0.7;
  transition: opacity 0.2s, border-color 0.2s;
}

.artwork-detail__thumb:hover,
.artwork-detail__thumb.active {
  opacity: 1;
  border-color: #1a1a1a;
}

.artwork-detail__artist {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #555;
}

.artwork-detail__title {
  font-size: 2rem;
  font-weight: 400;
  line-height: 1.2;
}

.artwork-detail__estimate,
.artwork-detail__realised {
  font-size: 0.9rem;
}

/* ============================================================
   Artist Bio Panel  (gallery page, ?artist_id=N)
   ============================================================ */
.artist-panel {
  border-top: 2px solid #1a1a1a;
  border-bottom: 1px solid #1a1a1a;
  padding-top: 1.25rem;
  padding-bottom: 1.75rem;
  margin-bottom: 2rem;
}

.artist-panel__works-header {
  font-family: 'EB Garamond', Georgia, serif;
  font-size: 1.1rem;
  font-weight: 600;
  color: #555;
  margin-bottom: 1.25rem;
}

.artist-panel__name {
  font-family: 'EB Garamond', Georgia, serif;
  font-size: 1.75rem;
  font-weight: 400;
}

.artist-panel__website-icon {
  color: #888;
  font-size: 0.9rem;
  vertical-align: middle;
  text-decoration: none;
  transition: color 0.15s;
}
.artist-panel__website-icon:hover { color: #1a1a1a; }

.artist-panel__meta {
  font-size: 0.8rem;
  letter-spacing: 0.04em;
}

.artist-panel__rule {
  border-color: #ddd;
  opacity: 1;
}

/* Bio text — clamped until expanded */
.artist-panel__overview {
  font-size: 0.88rem;
  line-height: 1.7;
  color: #333;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.artist-panel__overview.expanded {
  display: block;
  overflow: visible;
}

.artist-panel__toggle-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.3rem;
}

.artist-panel__toggle-btn {
  background: none;
  border: none;
  padding: 0;
  font-size: 0.78rem;
  color: #666;
  cursor: pointer;
  letter-spacing: 0.02em;
}
.artist-panel__toggle-btn:hover { color: #1a1a1a; text-decoration: underline; }

.artist-panel__source-link {
  font-size: 0.75rem;
  color: #999;
  text-decoration: none;
}
.artist-panel__source-link:hover { color: #555; text-decoration: underline; }

/* Section labels */
.artist-panel__section-label {
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #999;
  margin-bottom: 0.5rem;
}

/* Gallery chips */
.artist-panel__gallery-chip {
  font-size: 0.75rem;
  font-weight: 400;
  letter-spacing: 0.02em;
  border: 1px solid #ccc;
  border-radius: 2px;
  padding: 3px 10px;
  color: #333;
  text-decoration: none;
  background: #fff;
  display: inline-block;
  transition: background 0.15s, border-color 0.15s;
}
.artist-panel__gallery-chip:hover {
  background: #f0ece8;
  border-color: #aaa;
  color: #1a1a1a;
}

/* Exhibitions table */
.artist-panel__exh-table {
  border-collapse: collapse;
}
.artist-panel__exh-table td {
  padding: 3px 12px 3px 0;
  vertical-align: top;
  font-size: 0.82rem;
  line-height: 1.4;
}
.artist-panel__exh-date {
  color: #999;
  white-space: nowrap;
  width: 3.5rem;
  font-size: 0.78rem;
}
.artist-panel__exh-title {
  font-family: 'EB Garamond', Georgia, serif;
  font-size: 0.92rem;
}
.artist-panel__exh-link {
  color: #1a1a1a;
  text-decoration: none;
}
.artist-panel__exh-link:hover { text-decoration: underline; }
.artist-panel__exh-venue {
  font-size: 0.78rem;
}

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 576px) {
  .artwork-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }

  .artwork-detail__title {
    font-size: 1.4rem;
  }
}

/* ── Pagination ─────────────────────────────────────────────────────────────── */
.page-link {
  color: #555;
  background-color: #fff;
  border-color: #ccc;
}
.page-link:hover {
  color: #1a1a1a;
  background-color: #f5f2ef;
  border-color: #888;
}
.page-link:focus {
  box-shadow: 0 0 0 0.2rem rgba(0, 0, 0, 0.15);
  outline: none;
}
.page-item.active .page-link {
  color: #fff;
  background-color: #212529;
  border-color: #212529;
}
.page-item.disabled .page-link {
  color: #aaa;
  background-color: #fff;
  border-color: #e0ddd9;
}
