/* Products (from the Showroom direction): the range hero, sticky filters, the index of drawn tiles,
   the contents of the product panel, and the closing delivery and order strip.
   Header, footer, tiles, drawings, tables, buttons and the panel shell come from site.css. */

/* The filter row sticks under the header here, so anything scrolled into view (a tile reached
   with Shift+Tab, the tile that gets focus back when the panel closes) clears both bars. */
html { scroll-padding-top: calc(var(--head-h) + 84px); }

/* ---------- hero ---------- */
.range-hero {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: 20px var(--gap-wide);
  align-items: end;
}
.range-hero h1 { max-width: 11em; }
.range-intro .lead { margin-top: 0; font-size: clamp(17px, 1.3vw, 18px); }
.range-intro .lead + .lead { margin-top: 14px; }
.range-prices { color: var(--ink); }
.range-pdf { white-space: nowrap; }  /* the link and its file size wrap as one */
.file-meta { font-size: var(--fs-fine); color: var(--grey); white-space: nowrap; }

/* ---------- filters ---------- */
.filters {
  position: sticky;
  top: var(--head-h);
  z-index: 30;
  background: var(--white);
  border-bottom: 1px solid var(--rule);
}
.filter-row {
  position: relative;
  display: flex;
  gap: 4px 28px;
  overflow-x: auto;
  scrollbar-width: none;
  margin-inline: -12px;
  padding-inline: 12px;
}
.filter-row::-webkit-scrollbar { display: none; }
/* Side padding (taken back by the margins) keeps the inset focus ring clear of the label;
   the underline is drawn the width of the label, like the header's. */
.filter {
  position: relative;
  flex: none;
  display: inline-flex;
  align-items: baseline;
  gap: 7px;
  margin-inline: -8px;
  padding: 18px 8px 18px;
  border: 0;
  background: none;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
}
.filter::after { content: ""; position: absolute; left: 8px; right: 8px; bottom: 0; height: 3px; }
.filter-count { font-size: 13px; color: var(--grey); font-variant-numeric: tabular-nums; }
.filter:hover::after { background: var(--rule); }
.filter[aria-pressed="true"]::after { background: var(--red); }
.filter[aria-pressed="true"] { font-weight: 600; }
.filter:focus-visible { outline-offset: -3px; }

/* ---------- the index ---------- */
.range-index { padding-block: clamp(32px, 4vw, 52px) var(--section); }

/* A family with sizes on the load list. */
.tile-on {
  position: absolute;
  top: 10px;
  left: 10px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 4px 9px 4px 8px;
  background: var(--white);
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.3;
}
.tile-on::before, .on-list::before, .panel-note.is-new::before {
  content: "";
  flex: none;
  width: 8px;
  height: 8px;
  background: var(--red);
}
/* Markers sit on the first line when the text wraps. */
.on-list::before, .panel-note.is-new::before { margin-top: calc(0.5lh - 4px); }

/* ---------- delivery and order strip ---------- */
.next-steps { padding-block: clamp(48px, 6vw, 88px); }
.next-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 40px var(--gap-wide);
}
.next { display: flex; flex-direction: column; align-items: flex-start; }
.next h2 { font-size: clamp(26px, 2.5vw, 34px); line-height: 1.08; letter-spacing: -0.018em; }
.next p { margin-top: 12px; max-width: 31em; }
.next .next-act { margin-top: auto; padding-top: 24px; }  /* both buttons on one line */
.next-call { font-weight: 600; text-decoration: none; font-variant-numeric: tabular-nums; }
.next-call:hover { text-decoration: underline; }

/* ---------- the product panel ---------- */
.panel-close:hover { text-decoration: underline; text-underline-offset: 3px; }
.panel-ill { background: var(--stone); }
.panel-art .ill { width: 100%; height: clamp(220px, 34vh, 330px); }
.panel-styles { display: grid; gap: 8px; }
.panel-styles.n2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.panel-styles.n3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.panel-styles .ill { width: 100%; height: auto; aspect-ratio: 1; }
.panel-styles.n1 .ill { aspect-ratio: auto; height: clamp(220px, 34vh, 330px); }
.panel-styles figcaption { margin-top: 8px; font-size: 14.5px; color: var(--grey); }

.panel-title { margin-top: 28px; font-size: clamp(30px, 4vw, 40px); line-height: 1.05; letter-spacing: -0.02em; }
.panel-note { display: flex; align-items: flex-start; gap: 8px; margin-top: 10px; font-size: 15px; font-weight: 600; }
.panel-desc { margin-top: 14px; max-width: 34em; }
.panel-body h3 { margin-top: 38px; font-size: 17px; }
.panel-body h3 + .table-scroll, .panel-body h3 + .sheets { margin-top: 12px; }
.panel-body .table-scroll + .table-scroll { margin-top: 28px; }
/* Room for the focus ring of the Add buttons at the right edge (a scrolling box clips outlines). */
.panel-body .table-scroll { margin-inline: -6px; padding-inline: 6px; }

/* Sizes and prices, each priced line with its Add */
.prices tbody th { font-weight: 400; }
.prices .size { font-weight: 600; }
.item-sub { display: block; margin-top: 2px; font-size: 14.5px; color: var(--grey); }
.on-list { display: flex; align-items: flex-start; gap: 7px; margin-top: 6px; font-size: 14px; font-weight: 600; line-height: 1.4; }
.prices .add-cell { width: 1%; white-space: nowrap; }
.prices tbody .add-cell { padding-block: 6px; }
/* One width per table, so "Add", "Add leaching" and "Add 1 ft" line up as a column. */
.adds { display: flex; flex-direction: column; align-items: stretch; gap: 6px; }
.price-note, .table-note { margin-top: 12px; font-size: 14.5px; color: var(--grey); }
.table-note { margin-top: 8px; font-size: 14px; }

/* Tables from the shop drawings */
.specs { font-size: 15px; }
.specs td { font-variant-numeric: tabular-nums; }

/* Drawing previews, opening in Spec sheets */
.sheets { list-style: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px 12px; }
.sheets a { display: block; text-decoration: none; }
.sheets img { width: 100%; aspect-ratio: 324 / 420; object-fit: contain; padding: 6px; background: var(--stone); }
.sheets span { display: block; margin-top: 7px; font-size: 14px; line-height: 1.35; color: var(--grey); }
.sheets a:hover span { color: var(--ink); text-decoration: underline; }
.sheets a:focus-visible { outline-offset: 4px; }
.pdf-row { margin-top: 22px; }
.pdf-title { display: block; margin-top: 2px; font-size: 14px; color: var(--grey); }
.pdf-also { margin-top: 16px; font-size: 14.5px; color: var(--grey); }
.pdf-also ul { list-style: none; margin-top: 4px; }
.pdf-also li + li { margin-top: 2px; }
.pdf-also .text-link { color: var(--ink); font-size: 15px; }
.no-drawing { margin-top: 10px; color: var(--grey); }

.panel-foot { position: relative; }
.panel-call { font-weight: 600; font-size: 15px; text-decoration: none; font-variant-numeric: tabular-nums; }
.panel-call:hover { text-decoration: underline; }

/* The shared toast: size it to its text (left: 50% halves its shrink-to-fit width), and dock it
   above the panel's foot while the panel is open (products.js moves it in and out). */
.toast { width: max-content; }
.panel-foot .toast { position: absolute; bottom: calc(100% + 12px); max-width: calc(100% - 32px); }
.toast a:focus-visible { outline-color: var(--white); }  /* the ink ring would vanish on the ink toast */

/* ---------- smaller screens ---------- */
@media (max-width: 1080px) {
  .range-hero { grid-template-columns: minmax(0, 1fr); }
  .range-hero h1 { max-width: 14em; }
  .range-intro { max-width: 40em; }
}
@media (max-width: 720px) {
  html { scroll-padding-top: calc(var(--head-h) + 74px); }
  .filter-row { gap: 4px 22px; margin-inline: calc(-1 * var(--gutter)); padding-inline: var(--gutter); }
  .filter { font-size: 15px; padding-block: 15px; }
  .next-grid { grid-template-columns: minmax(0, 1fr); }
  .tile-on { top: 8px; left: 8px; padding: 3px 7px 3px 6px; font-size: 12.5px; gap: 6px; }
  .sheets { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .panel-styles.n3 { gap: 6px; }
  .panel-styles figcaption { font-size: 14px; }
  .prices th + td, .prices td + td { padding-left: 12px; }
}
