/*
 * The catalog line only: the wall, its filter bar, and the piece page's stage. Shared
 * furniture — the sheet, the product frame, the material picker, the green pill — is in
 * shell.css.
 */
.vh {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}

/* ── the filter bar ─────────────────────────────────────────────────────── */
.wall-title { margin-bottom: var(--s4); }
.filters {
  display: flex; flex-wrap: wrap; gap: var(--s3) var(--s6);
  padding: var(--s4) 0; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule);
}
.fgroup { border: 0; margin: 0; padding: 0; display: flex; align-items: center; gap: var(--s3); min-width: 0; }
.fgroup legend { float: left; margin: 0; padding: 0; }
.chiprow { display: flex; gap: var(--s2); align-items: center; }

.fchip { position: relative; cursor: pointer; }
.fchip input, .daub input { position: absolute; opacity: 0; pointer-events: none; }
.fchip span {
  display: block; white-space: nowrap; font-size: 14px; line-height: 1;
  padding: 9px 14px; border-radius: var(--r-pill);
  background: var(--sheet); border: 1px solid var(--rule); color: var(--ink);
  transition: background-color 120ms ease, border-color 120ms ease;
}
.fchip:hover span { border-color: var(--muted); }
.fchip input:checked + span { background: var(--forest); border-color: var(--forest); color: var(--sheet); }
.fchip input:focus-visible + span, .daub input:focus-visible ~ svg { outline: 2px solid var(--tomato); outline-offset: 2px; }

/* paint dabs, in the colours themselves */
.daubrow { gap: 2px; }
.daub { position: relative; display: block; cursor: pointer; width: 36px; height: 36px; border-radius: 50%; }
.daub svg { display: block; width: 100%; height: 100%; transition: transform 120ms ease; }
.daub:hover svg { transform: scale(1.12) rotate(-6deg); }
/* chosen: a pencil ring under the dab, so the colour itself is never covered */
.daub:has(input:checked)::after {
  content: ''; position: absolute; inset: 1px; border-radius: 50%;
  border: 2px solid var(--ink); pointer-events: none;
}
.daub:has(input:checked) svg { transform: scale(.82); }

/*
 * Phones: each group is its own row, and the row scrolls sideways rather than wrapping into
 * a wall of chips that pushes the art off the first screen.
 */
@media (max-width: 899px) {
  .filters { display: grid; gap: var(--s2); margin-inline: calc(var(--s4) * -1); padding-inline: 0; }
  .fgroup { display: grid; grid-template-columns: 64px minmax(0, 1fr); padding-left: var(--s4); }
  .chiprow { overflow-x: auto; scrollbar-width: none; padding: 2px var(--s4) 2px 2px; scroll-padding-left: 2px; }
  .chiprow::-webkit-scrollbar { display: none; }
  .fchip { flex: 0 0 auto; }
  .daub { flex: 0 0 auto; }
}

.wall-status { display: flex; align-items: baseline; gap: var(--s4); margin: var(--s4) 0 var(--s6); }
.wall-count { margin: 0; font-size: 14px; color: var(--muted); font-variant-numeric: tabular-nums; }
.wall-count b { color: var(--ink); font-weight: 600; }
.wall-empty { margin: var(--s8) 0; text-align: center; color: var(--muted); }

/* ── the wall ───────────────────────────────────────────────────────────── */
.wall-grid {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s6) var(--s4);
}
@media (min-width: 700px) { .wall-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s8) var(--s6); } }
@media (min-width: 1100px) { .wall-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--s12) var(--s8); } }

.art-link {
  position: relative; display: block; aspect-ratio: 5 / 7;
  background: var(--sheet-2);
  /* the standard soft shadow every poster stage in the studio sits on, at tile scale */
  box-shadow: 0 1px 3px rgba(42, 42, 40, .08), 0 16px 34px -18px rgba(42, 42, 40, .42);
  -webkit-touch-callout: none; -webkit-user-select: none; user-select: none;
  transition: transform 220ms ease, box-shadow 220ms ease;
}
.art-link img { width: 100%; height: 100%; object-fit: fill; -webkit-user-drag: none; }
.art-link:focus-visible { outline: 2px solid var(--tomato); outline-offset: 4px; }

/* the price, revealed: hover on a pointer, a long press on a phone */
.art-price {
  position: absolute; left: var(--s2); bottom: var(--s2);
  padding: 5px 10px; border-radius: var(--r-pill);
  background: var(--sheet); color: var(--ink); font-size: 12px; font-weight: 600;
  font-variant-numeric: tabular-nums; letter-spacing: .01em;
  box-shadow: 0 1px 3px rgba(42, 42, 40, .18);
  opacity: 0; transform: translateY(4px); transition: opacity 160ms ease, transform 160ms ease;
  pointer-events: none;
}
@media (hover: hover) {
  .art-link:hover { transform: translateY(-3px); box-shadow: 0 2px 4px rgba(42, 42, 40, .08), 0 22px 40px -20px rgba(42, 42, 40, .5); }
  .art-link:hover .art-price { opacity: 1; transform: none; }
}
.art-link:focus-visible .art-price, .art-link.peek .art-price { opacity: 1; transform: none; }

/* ── the piece ──────────────────────────────────────────────────────────── */
.art-title {
  margin: 0 0 var(--s2); font-family: 'Fraunces', Georgia, serif; font-weight: 600;
  letter-spacing: -0.015em; font-size: 26px; line-height: 1.15;
}
@media (min-width: 900px) { .art-title { font-size: 32px; } }
.artpiece .product-row { margin-top: var(--s2); }

.art-desc { margin: 0 0 var(--s6); font-size: 15px; }
.art-desc p { margin: 0 0 var(--s2); }
.art-desc-global { color: var(--muted); }

.carousel { position: relative; }
.track {
  display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none;
  gap: var(--s4); padding: 4px 4px 36px; margin: -4px -4px 0;
}
.track::-webkit-scrollbar { display: none; }
.slide { flex: 0 0 100%; margin: 0; scroll-snap-align: center; }
@media (min-width: 900px) {
  .slide { display: flex; justify-content: center; }
  .slide > img, .slide-art { width: min(100%, calc(76vh * 5 / 7)); }
}
.slide > img {
  width: 100%; aspect-ratio: 5 / 7; object-fit: cover; background: var(--sheet-2);
  box-shadow: 0 2px 4px rgba(42, 42, 40, .07), 0 22px 50px -24px rgba(42, 42, 40, .42);
}
.slide-art {
  position: relative; aspect-ratio: 5 / 7; background: var(--sheet-2);
  box-shadow: 0 2px 4px rgba(42, 42, 40, .07), 0 22px 50px -24px rgba(42, 42, 40, .42);
}
.slide-art > img { width: 100%; height: 100%; object-fit: fill; box-shadow: none; }
.dots { display: flex; justify-content: center; gap: var(--s2); margin-top: calc(var(--s6) * -1); }
.dot { width: 9px; height: 9px; padding: 0; border: 0; border-radius: 50%; background: var(--rule); cursor: pointer; }
.dot[aria-current="true"] { background: var(--forest); }

/*
 * GLASS, AS AN OVERLAY. The artwork's pixels are never touched: everything below sits on top
 * of the image. `backdrop-filter` lifts the contrast of what shows through it, and two thin
 * gradients plus an inset highlight make the faint sheen a pane of glass has at its edges.
 *
 * Paper turns it off with no transition at all — matte is the absence of a surface, so it
 * arrives instantly rather than fading.
 */
.glass { position: absolute; inset: 0; pointer-events: none; overflow: hidden; display: none; }
.slide-art[data-material="glass"] .glass {
  display: block;
  -webkit-backdrop-filter: contrast(1.07) saturate(1.05);
  backdrop-filter: contrast(1.07) saturate(1.05);
  background:
    linear-gradient(155deg, rgba(255, 255, 255, .16) 0%, rgba(255, 255, 255, 0) 22%),
    linear-gradient(335deg, rgba(255, 255, 255, .09) 0%, rgba(255, 255, 255, 0) 16%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .34), inset 0 1px 0 1px rgba(255, 255, 255, .22);
}
/* the one sweep: a soft diagonal band crossing the pane once, ~600ms */
.glass-sheen {
  position: absolute; top: -30%; bottom: -30%; left: 0; width: 45%;
  background: linear-gradient(100deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, .5) 48%, rgba(255, 255, 255, 0) 100%);
  transform: translateX(-150%) skewX(-18deg); opacity: 0;
}
.slide-art.sweeping .glass-sheen { animation: sheen 600ms cubic-bezier(.45, .05, .55, .95) both; }
@keyframes sheen {
  0% { transform: translateX(-150%) skewX(-18deg); opacity: 0; }
  12% { opacity: 1; }
  88% { opacity: 1; }
  100% { transform: translateX(240%) skewX(-18deg); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .slide-art.sweeping .glass-sheen { animation: none; }
}

.related { margin-top: var(--s12); }
.related-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 700px) { .related-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1100px) { .related-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: var(--s6); } }
