/* ============================================================
   LianGroup Art — additions on top of the shared LianGroup stylesheet

   style.css is a verbatim copy of the one on liangroupltd.com and is
   meant to stay that way, so it can be re-synced when the parent site's
   design changes. Everything specific to the art site lives here.
   ============================================================ */

:root {
  /* A warmer paper tone than the parent site's cool grey — artwork sits
     badly on blue-tinted backgrounds, which shift the perceived colour
     of the ink. */
  --paper:      #faf8f4;
  --paper-dark: #f2ede4;
  --ink:        #1c1a17;
}

/* ── Utilities the parent stylesheet does not define ─────────── */
/* style.css only has .section-header.center, so a bare .center wrapper —
   the obvious way to centre a lone call-to-action button — silently did
   nothing. */
.center { text-align: center; }

/* ── Three-way language switcher ─────────────────────────────── */
/* The parent site toggles between two languages, so its .nav-lang is a
   single link. Three needs separators and a clear active state. */
.nav-lang { display: flex; align-items: center; gap: 0; }
.nav-lang a {
  padding: 2px 8px;
  font-size: .84rem;
  color: var(--text-light);
  border-right: 1px solid var(--border);
  line-height: 1;
  text-decoration: none;
}
.nav-lang a:last-child { border-right: 0; }
.nav-lang a:hover { color: var(--accent); text-decoration: none; }
.nav-lang a.active { color: var(--accent); font-weight: 700; }

.nav-mobile .lang-row { display: flex; gap: 0; padding-top: 8px; }

/* ── "All Artists" at the foot of the Browse Works drop-down ─── */
/* Set apart from the artist names above it: it is a different kind of
   destination, not one more name in the list. */
.nav-dropdown a.more {
  border-top: 1px solid var(--border);
  margin-top: 4px;
  padding-top: 10px;
  color: var(--accent);
  font-weight: 600;
}

/* ── Footer addition ─────────────────────────────────────────── */
.footer-parent { margin-top: 10px; font-size: .82rem; }
.footer-parent a { color: rgba(255,255,255,.55); }
.footer-parent a:hover { color: var(--accent); }

.footer-bottom a { margin-left: 16px; color: rgba(255,255,255,.45); }

/* ── Artwork grid ────────────────────────────────────────────── */
/* auto-fill rather than auto-fit so a lone artwork in a filtered result
   keeps its column width instead of stretching across the whole row. */
.art-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 28px;
}

.art-card { background: var(--bg); }
.art-card a { text-decoration: none; color: inherit; }

/* Artworks vary wildly in proportion — a hanging scroll can be 4:1 while
   an album leaf is nearly square. A fixed-height box with the image
   centred inside keeps the grid aligned without cropping anything. */
.art-card-img {
  height: 260px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--paper-dark);
  border-radius: var(--radius);
  overflow: hidden;
}
.art-card-img img {
  max-height: 100%;
  max-width: 100%;
  width: auto;
  object-fit: contain;
  transition: transform .4s ease;
}
.art-card:hover .art-card-img img { transform: scale(1.03); }

.art-card-body { padding: 14px 2px 0; }
.art-card-title { font-size: 1rem; font-weight: 600; color: var(--primary); line-height: 1.4; }
.art-card-artist { font-size: .84rem; color: var(--text-muted); margin-top: 2px; }
.art-card-meta { font-size: .82rem; color: var(--text-light); margin-top: 6px; }
.art-card-price { font-size: .9rem; color: var(--accent); font-weight: 600; margin-top: 6px; }

/* ── Availability badge ──────────────────────────────────────── */
.badge {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .02em;
}
.badge-available    { background: var(--accent-light); color: #8a6420; }
.badge-reserved     { background: #fdf0d8; color: #96631a; }
.badge-sold         { background: var(--bg-dark);  color: var(--text-light); }
.badge-not-for-sale { background: var(--bg-dark);  color: var(--text-light); }

/* ── Artist card ─────────────────────────────────────────────── */
.artist-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 32px;
}
.artist-card { text-align: center; }
.artist-card a { text-decoration: none; color: inherit; }
.artist-card img {
  width: 150px; height: 150px;
  border-radius: 50%;
  object-fit: cover;
  margin: 0 auto 18px;
  background: var(--paper-dark);
}
.artist-card h3 { margin-bottom: 2px; }
.artist-card .artist-name-zh { font-size: .92rem; color: var(--text-muted); margin-bottom: 10px; }

/* ── Artist page ─────────────────────────────────────────────── */
.artist-name-alt {
  font-weight: 400;
  opacity: .7;
  font-size: .62em;
  margin-left: .4em;
}
.artist-studio { font-size: 1.05rem; color: var(--accent); margin-bottom: .5rem; }
.artist-specialities { font-size: .9rem; color: var(--text-muted); margin-bottom: 1.5rem; }
.artist-bio { max-width: 760px; }
.artist-bio h3 { margin: 2rem 0 .75rem; }

/* Sub-nav sticks below the main bar so the section links stay reachable
   through a long biography and a gallery of fifty works. */
.artist-subnav {
  position: sticky;
  top: var(--nav-h);
  z-index: 40;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}
.artist-subnav .container { display: flex; gap: 28px; overflow-x: auto; }
.artist-subnav a {
  padding: 14px 0;
  font-size: .92rem;
  color: var(--text-light);
  white-space: nowrap;
  border-bottom: 2px solid transparent;
}
.artist-subnav a:hover { color: var(--accent); border-bottom-color: var(--accent); text-decoration: none; }
.artist-subnav .count {
  font-size: .78em;
  color: var(--text-muted);
  background: var(--bg-light);
  border-radius: 999px;
  padding: 1px 7px;
  margin-left: 2px;
}

.empty-note { color: var(--text-muted); font-style: italic; }

.news-item { padding: 20px 0; border-bottom: 1px solid var(--border); }
.news-item:last-child { border-bottom: none; }
.news-date { font-size: .82rem; color: var(--text-muted); }

/* ── Artwork detail ──────────────────────────────────────────── */
.artwork-detail { padding: 32px 0 64px; }
.artwork-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(280px, 1fr);
  gap: 48px;
  align-items: start;
  margin-top: 24px;
}
.artwork-image {
  background: var(--paper-dark);
  border-radius: var(--radius);
  padding: 20px;
  display: flex;
  justify-content: center;
}
.artwork-image img { max-width: 100%; height: auto; box-shadow: var(--shadow); }

/* Sticky so the price and enquiry button stay in view while a collector
   studies a tall hanging scroll. */
.artwork-info { position: sticky; top: calc(var(--nav-h) + 20px); }
.artwork-artist { font-size: 1.05rem; margin-bottom: .75rem; }
.artwork-price { font-size: 1.5rem; color: var(--accent); font-weight: 700; margin: 12px 0; }
.artwork-description { margin: 16px 0; }
.artwork-cta { width: 100%; text-align: center; margin-top: 20px; }
.availability-note { font-size: .8rem; color: var(--text-muted); margin-top: 10px; }

.spec { margin-top: 20px; border-top: 1px solid var(--border); }
.spec-row {
  display: grid;
  grid-template-columns: 34% 1fr;
  gap: 12px;
  padding: 9px 0;
  border-bottom: 1px solid var(--border);
  font-size: .88rem;
}
.spec-row dt { color: var(--text-muted); }
.spec-row dd { color: var(--text); }

@media (max-width: 900px) {
  .artwork-layout { grid-template-columns: 1fr; gap: 28px; }
  .artwork-info { position: static; }
}

/* ── Page sections on paper ──────────────────────────────────── */
.bg-paper { background: var(--paper); }

/* Chinese text needs a slightly looser line for legibility at the same
   size, and the Latin-first font stack has no Chinese face in it. */
html[lang^="zh"] body {
  font-family: 'Inter', 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB',
               'Microsoft YaHei', system-ui, sans-serif;
  line-height: 1.85;
}
html[lang="zh-Hant"] body {
  font-family: 'Inter', 'Segoe UI', 'PingFang TC', 'Microsoft JhengHei',
               system-ui, sans-serif;
}
/* Chinese headings do not benefit from the negative tracking that tightens
   Latin display type — it closes up the space inside the characters. */
html[lang^="zh"] h1, html[lang^="zh"] h2,
html[lang^="zh"] h3, html[lang^="zh"] h4 { letter-spacing: 0; }

@media (max-width: 768px) {
  .art-card-img { height: 200px; }
  .artist-card img { width: 120px; height: 120px; }
}
