/* ==========================================================================
   pages/fabrics.css — fabric hub, family pages, fabric pages, swatch request
   (P2). Mobile first; tokens and components only (no new colours).
   Prefixes: .fx- (fabrics), .swr (swatch request).
   ========================================================================== */

/* ───────── Shared ───────── */
.fx-head { margin-top: 8px; }
.fx-head h1 { max-width: 13em; }
.fx-h { font-size: clamp(26px, 2.4vw, 34px); }
.fx-h3 { font-size: clamp(21px, 1.6vw, 25px); line-height: 1.18; }
.fx-sec { margin-top: clamp(40px, 5vw, 72px); }
.fx-sec__head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 16px; margin-bottom: 18px; }
.fx-sec__head .small { margin: 0; }

/* Photo placeholder ("Photos to follow") */
.fx-nophoto-tile {
  display: flex; align-items: center; justify-content: center; text-align: center;
  background: var(--stone); color: var(--muted); text-decoration: none;
  font: italic 400 18px/1.3 var(--serif); padding: 24px;
}
.fx-nophoto-tile { min-height: 320px; }
.fx-nophoto-tile p { margin: 0; }

/* Quality card caption: name + plain colour words, one column */
.fx-q__cap { grid-template-columns: 1fr; }
.fx-q__cap p { grid-column: 1; }

/* Four per row at ≥ 1100 px (cards default to span 4 = three per row) */
@media (min-width: 1100px) {
  .bento.fx-grid4 > * { grid-column: span 3; }
}

/* ───────── Hub: filters ───────── */
.fx-filterbox { margin-top: clamp(8px, 2vw, 24px); padding: 0; }
.fx-filterbox__sum {
  list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  min-height: 56px; padding: 0 var(--pad); font: 600 12px/1.2 var(--ui); letter-spacing: .12em; text-transform: uppercase; color: var(--ink);
}
.fx-filterbox__sum::-webkit-details-marker { display: none; }
.fx-filterbox__sum > span:first-child { display: inline-flex; align-items: center; gap: 10px; }
.fx-filterbox__sum svg { width: 16px; height: 16px; color: var(--teal); }
.fx-filterbox__sum::after {
  content: ""; width: 9px; height: 9px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg); margin: -4px 4px 0 auto; transition: transform var(--t);
}
.fx-filterbox[open] .fx-filterbox__sum::after { transform: rotate(-135deg); margin-top: 4px; }
.fx-filterbox__sum:focus-visible { outline: 2px solid var(--teal); outline-offset: -4px; border-radius: var(--r); }
.fx-filterbox__n { font: 500 13px/1 var(--body); letter-spacing: 0; text-transform: none; color: var(--teal-deep); background: var(--celadon); border-radius: var(--r-pill); padding: 6px 10px; }
.fx-filterbox__body { display: grid; gap: 14px; padding: 0 var(--pad) var(--pad); }
.fx-filterbox__body .filters { margin: 0; }
.fx-filterbox__body .filters a { min-height: 36px; }
.fx-filterbox__clear { margin: 0; }
@media (min-width: 1100px) {
  .fx-filterbox__body { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 40px; }
  .fx-filterbox__body .filters__group:first-child { grid-column: 1 / -1; }
  .fx-filterbox__clear { grid-column: 1 / -1; }
}
.fx-empty { margin-top: 24px; display: grid; gap: 6px; }
.fx-empty p { margin: 0; }

/* Hub: note tile next to the brief CTA */
.fx-note { display: flex; flex-direction: column; gap: 14px; }
.fx-note p { margin: 0; }
.fx-note > p:first-of-type { font: 400 clamp(20px, 1.6vw, 24px)/1.3 var(--serif); }

/* ───────── Family page ───────── */
.fx-fhead { margin-top: 0; }
.fx-fhead__info { display: flex; flex-direction: column; gap: 22px; }
.fx-fhead__info h1 { font-size: clamp(44px, 5vw, 80px); line-height: .98; }
.fx-fhead__info--wide .pd__desc { max-width: 40em; }
.fx-fhead__info--wide .pd__actions { max-width: 560px; }
.fx-n { font-variant-numeric: tabular-nums; }
.fx-fhead__photo { aspect-ratio: 4 / 3; }
@media (min-width: 1100px) {
  .fx-fhead__photo { aspect-ratio: auto; min-height: 560px; }
}
.fx-uses { display: grid; gap: 10px; }
.fx-uses ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.fx-uses li { padding: 8px 14px; border-radius: var(--r-pill); background: var(--stone); font-size: 14.5px; font-weight: 500; }
.fx-sec--first { margin-top: clamp(56px, 7vw, 120px); }
.fx-emptytile { display: grid; gap: 18px; justify-items: start; }
.fx-emptytile p { margin: 0; max-width: 40em; font: 400 clamp(19px, 1.5vw, 22px)/1.4 var(--serif); }

/* ───────── Fabric page ───────── */
.fx-preview { margin-bottom: 16px; }
.pd .seal { width: 44px; height: 44px; color: var(--vermilion); flex: none; }
.fx-factlink { text-decoration: none; display: inline-block; padding: 3px 0; }
.fx-factlink:hover { color: var(--teal); text-decoration: underline; text-underline-offset: 3px; }
.specs__grid dd.has-value { display: inline-flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: 6px 8px; }
.specs .fx-h3 { margin: 0; }
.specs__note .link svg { width: 15px; height: 15px; }
@media (max-width: 1099px) {
  .pd .tile--photo:not(.m-1) { aspect-ratio: var(--ar, 4 / 5); }
}

/* ───────── Swatch request ───────── */
.swr { margin-top: clamp(8px, 2vw, 24px); }
.swr__basket, .swr__form { display: flex; flex-direction: column; gap: 20px; }
.swr__list { list-style: none; margin: 0; padding: 0; display: grid; }
.swr__list .basket__item {
  display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; align-items: center; gap: 14px;
  padding: 12px 0; border-top: 1px solid var(--line);
}
.swr__list .basket__item:last-child { border-bottom: 1px solid var(--line); }
.swr__list .basket__item > :first-child:not(img) { grid-column: 2; }
.swr__list img { width: 64px; height: 64px; object-fit: cover; border-radius: var(--r-xs); background: var(--photo-bg); }
.swr__list a, .swr__list span { font: 400 19px/1.25 var(--serif); text-decoration: none; overflow-wrap: anywhere; }
.swr__list a:hover { color: var(--teal); }
.swr__list .linklike { font-size: 14px; color: var(--muted); min-height: 44px; padding: 0 4px; }
.swr__list .linklike:hover { color: var(--ink); }
.swr__empty { display: grid; gap: 16px; justify-items: start; padding: 22px; border-radius: var(--r-sm); background: var(--stone); }
.swr__empty p { margin: 0; font: 400 19px/1.4 var(--serif); }
.swr__more { margin: 0; }
.swr__note { margin-top: auto; display: flex; gap: 12px; align-items: flex-start; padding: 16px 18px; border-radius: var(--r-sm); background: var(--celadon); }
.swr__note svg { width: 20px; height: 20px; flex: none; color: var(--teal-deep); margin-top: 2px; }
.swr__note p { margin: 0; font-size: 14.5px; }
.swr__address { border: 0; margin: 0; padding: 0; min-width: 0; display: grid; gap: 14px; }
.swr__address legend { padding: 0; margin-bottom: 4px; }
.swr__address .field__hint { margin: 0; }
.swr__form .field__hint { margin: 0; }
.swr__form .btn[type="submit"] { min-height: 52px; padding: 0 28px; }
@media (min-width: 640px) {
  .swr__two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .swr__pc { grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); }
}
@media (min-width: 1100px) {
  .swr__basket { position: sticky; top: 112px; align-self: start; }
}
.error-summary a { color: inherit; }

/* Sent */
.swr-sent { margin-top: 16px; }
.swr-sent__main { display: flex; flex-direction: column; gap: 22px; }
.swr-sent__main h1 { font-size: clamp(40px, 5vw, 72px); max-width: 12em; }
.swr-sent__ref { margin: 0; font: 600 13px/1.4 var(--ui); letter-spacing: .08em; text-transform: uppercase; color: var(--teal-deep); }
.swr-sent__next { display: flex; flex-direction: column; gap: 14px; }
.swr-sent__next p { margin: 0; }
.swr-sent__next > p:first-of-type { font: 400 clamp(19px, 1.5vw, 22px)/1.4 var(--serif); }

/* X0: the article code is the H1; the family + working name follow */
.pd__info h1.fx-code { font-size: clamp(44px, 4.4vw, 72px); overflow-wrap: anywhere; letter-spacing: -0.01em; }
.fx-subline { margin-top: -6px; font: 600 12.5px/1.6 var(--ui); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
