/* ============================================================
   ARTWORKS PAGE (index)
   ============================================================ */

.artworks-page { max-width: 1200px; margin: 100px auto 0; padding: 20px 20px 60px; }
.artworks-page h1 { font-size: 2rem; font-weight: 800; margin: 0 0 6px; color: var(--text); }
.artworks-subtitle { color: var(--muted); margin: 0 0 20px; font-size: 0.95rem; }
.artworks-toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: nowrap; margin-bottom: 18px; }
.artworks-search-wrap { position: relative; flex: 1; min-width: 0; }
.artworks-search-wrap i { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
#artwork-search { width: 100%; box-sizing: border-box; padding: 9px 12px 9px 36px; border: 1.5px solid var(--input-border); border-radius: 8px; background: var(--input-bg); color: var(--input-text); font-size: 0.92rem; font-family: inherit; }
#artwork-sort { flex-shrink: 0; width: 180px; padding: 9px 12px; border: 1.5px solid var(--input-border); border-radius: 8px; background: var(--input-bg); color: var(--input-text); font-size: 0.92rem; font-family: inherit; cursor: pointer; }
@media (max-width: 600px) {
  .artworks-toolbar { flex-wrap: wrap; }
  .artworks-search-wrap { flex: 1 1 100%; }
  #artwork-sort { flex: 1; }
  .btn-random { flex: 1; justify-content: center; }
}
#year-slider { margin: 10px 4px 6px; }
#year-range-display { text-align: center; font-size: 0.9rem; font-weight: 600; color: var(--text); margin-top: 10px; }

/* noUi slider (artworks page) */
#year-slider.noUi-target { background: var(--slider-track); border: 1px solid var(--slider-border); border-radius: 8px; box-shadow: inset 0 2px 4px var(--shadow); height: 12px; margin-bottom: 25px; }
#year-slider .noUi-connect { background: var(--slider-active); border-radius: 8px; }
#year-slider .noUi-handle { width: 20px; height: 20px; right: -10px; top: -6px; background: var(--slider-handle); border: 2px solid var(--slider-handle-border); border-radius: 50%; box-shadow: none; }
#year-slider .noUi-handle:before,
#year-slider .noUi-handle:after { content: none; }
#year-slider .noUi-handle:hover { transform: scale(1.2); border-color: var(--brand); }
#year-slider .noUi-handle:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }

/* Artworks grid — card chrome and image height */
.artworks-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px; margin-bottom: 32px;
}
@media (min-width: 600px) { .artworks-grid { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; } }
@media (min-width: 900px) { .artworks-grid { grid-template-columns: repeat(4, 1fr); } }
.artworks-grid .artwork-card { background: var(--card); border: 1px solid var(--border); border-radius: 12px; box-shadow: 0 4px 10px var(--shadow); overflow: hidden; position: relative; cursor: pointer; transition: transform .2s ease-in-out; margin: 0; }
.artworks-grid .artwork-card:hover { transform: translateY(-4px); }
.artworks-grid .artwork-card img { width: 100%; height: 200px; object-fit: cover; display: block; }
.artworks-grid .artwork-card-content { padding: 10px 10px 2px 10px; position: relative; }
.artworks-grid .artwork-description { font-size: .9rem; color: var(--text); margin: -3px 0 5px; }
@media (max-width: 600px) {
  .artworks-grid .artwork-card img { height: 140px; }
}