/* Colour wall (products page): the palette from src/data/colours.json, filtered by family, with a preview. */
.wall-filter { border: 0; margin: 0 0 22px; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.wall-filter legend { float: left; width: 100%; margin-bottom: 10px; padding: 0; font: 700 0.72rem/1.4 var(--body); letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink); }
.wall-grid { display: grid; gap: clamp(24px, 4vw, 48px); align-items: start; }
.wall.live .wall-grid { grid-template-columns: minmax(0, 1fr) minmax(260px, 340px); }
.wall.live .wall-panel { grid-column: 2; grid-row: 1; }
.wall.live .wall-swatches { grid-column: 1; grid-row: 1; }

.wall-swatches { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 18px 12px; }
.wall-swatches li[hidden] { display: none; }
.wall-swatch { display: grid; gap: 8px; width: 100%; padding: 0; border: 0; background: none; color: var(--text); font: 400 0.8rem/1.3 var(--body); text-align: center; }
button.wall-swatch { cursor: pointer; }
/* A light terry texture over each colour */
.wall-swatch .chip, .wall-stack span {
  background-color: var(--c);
  background-image: radial-gradient(circle at 50% 35%, rgba(255, 255, 255, 0.2) 0 1.5px, transparent 2.5px), radial-gradient(circle at 50% 80%, rgba(0, 0, 0, 0.1) 0 1.5px, transparent 2.5px);
  background-size: 7px 7px;
}
.wall-swatch .chip { display: block; aspect-ratio: 1; border: 1px solid rgba(0, 0, 0, 0.12); transition: transform 0.25s var(--ease), box-shadow 0.25s; }
button.wall-swatch:hover .chip { transform: translateY(-4px); box-shadow: 0 10px 18px rgba(0, 0, 0, 0.12); }
.wall-swatch[aria-pressed="true"] .chip { outline: 2px solid var(--gold); outline-offset: 3px; }
.wall-swatch[aria-pressed="true"] .wall-name { color: var(--ink); }
.wall-swatch:focus-visible { outline: 2px solid var(--title-navy); outline-offset: 4px; }

/* Preview: a stack of three folded towels in the chosen colour */
.wall-panel { position: sticky; top: calc(var(--header-h) + 49px + 24px); padding: 24px; background: var(--grey); }
.wall-stack { position: relative; width: 78%; height: 150px; margin: 6px auto 22px; }
.wall-stack span { position: absolute; left: 0; right: 0; height: 44px; border-radius: 6px 6px 4px 4px; box-shadow: inset 0 -8px 10px rgba(0, 0, 0, 0.12), 0 2px 3px rgba(0, 0, 0, 0.12); transition: background-color 0.4s; }
.wall-stack span::after { content: ""; position: absolute; top: 0; bottom: 0; left: 62%; width: 2px; background: rgba(0, 0, 0, 0.08); }
.wall-stack span:nth-child(1) { bottom: 0; }
.wall-stack span:nth-child(2) { bottom: 46px; left: 4%; right: 4%; }
.wall-stack span:nth-child(3) { bottom: 92px; left: 8%; right: 8%; }
.wall-family { margin: 0; font: 700 0.66rem/1.4 var(--body); letter-spacing: 0.16em; text-transform: uppercase; color: var(--gold-ink); }
.wall-title { margin: 4px 0 2px; font-size: 1.3rem; }
.wall-hex { margin: 0; font-size: 0.84rem; color: var(--muted); }
.wall-info .btn-row { margin-top: 16px; }
.wall-note { margin: 24px 0 0; font-size: 0.84rem; color: var(--muted); }

/* On small screens the preview becomes a compact bar that stays in view while browsing */
@media (max-width: 900px) {
  .wall.live .wall-grid { grid-template-columns: 1fr; }
  .wall.live .wall-panel, .wall.live .wall-swatches { grid-column: auto; grid-row: auto; }
  .wall-panel { top: calc(var(--header-h) + 49px); z-index: 4; display: grid; grid-template-columns: 90px 1fr; gap: 14px; align-items: center; padding: 12px 14px; box-shadow: 0 6px 14px rgba(0, 0, 0, 0.06); }
  .wall-stack { width: 100%; height: 82px; margin: 0; }
  .wall-stack span { height: 26px; }
  .wall-stack span:nth-child(2) { bottom: 27px; }
  .wall-stack span:nth-child(3) { bottom: 54px; }
  .wall-title { font-size: 1.02rem; }
  .wall-info .btn-row { margin-top: 8px; gap: 8px; }
  .wall-info .btn { padding: 9px 12px; font-size: 0.66rem; }
  .wall-swatches { grid-template-columns: repeat(auto-fill, minmax(72px, 1fr)); }
}
@media (prefers-reduced-motion: reduce) { .wall-swatch .chip, .wall-stack span { transition: none; } }

/* Short screens: the preview scrolls with the page, so the fixed header never takes most of the view */
@media (max-height: 640px) { .wall-panel { position: static; } }
