/* Inner-page spec refinements (Nov 2026). Loaded on inner pages only; never on the homepage.
   Uses existing site tokens only (navy/brass). Layout-only: no text is hidden, clamped or changed. */

/* ---------- Services hub: filter row becomes a scrollable chip rail on narrow screens ---------- */
@media (max-width: 640px) {
  body:not(.home-redesign) section[aria-label="Our bathroom remodeling services"] .filter-bar {
    flex-wrap: nowrap; overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x proximity;
    -webkit-overflow-scrolling: touch; margin-left: -20px; margin-right: -20px; padding: 4px 20px 10px;
    scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.35) transparent;
  }
  body:not(.home-redesign) section[aria-label="Our bathroom remodeling services"] .filter-btn {
    flex: none; scroll-snap-align: start; white-space: nowrap; min-height: 44px;
  }
}

/* ---------- Service pages: text-led 60/40 intro + estimate layout on desktop ---------- */
@media (min-width: 1100px) {
  body.page-shower main .shower-consult-grid,
  body.page-tub main .tub-consult-grid,
  body.page-access main .abr-studio-grid,
  body.page-lighting main .lux-bay-grid,
  body.page-rst main .rst-studio-grid {
    grid-template-columns: minmax(0, 1.4fr) minmax(400px, 1fr);
  }
}

/* ---------- Narrow phones (320px): let single-column grids shrink instead of overflowing ---------- */
@media (max-width: 400px) {
  body.page-styles main .style-match-grid,
  body.sdloc-page main .sdloc-convert-grid,
  body.sdloc-page main .sdloc-editorial,
  body.sdloc-page main .sdloc-plan-cards,
  body.page-vanity main .van-cabinet-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  body.page-styles main .style-match-card,
  body.page-vanity main .van-cabinet-frame,
  body.sdloc-page main .sdloc-convert-grid > *,
  body.sdloc-page main .sdloc-editorial > *,
  body.sdloc-page main .sdloc-plan-cards > * { min-width: 0; }
  body.page-sbr .site-footer .footer-inner { grid-template-columns: minmax(0, 1fr); }
  body.page-sbr .site-footer .footer-inner > * { min-width: 0; }
  body.page-sbr .site-footer a[href^="mailto:"] { overflow-wrap: anywhere; }
}
/* Long e-mail addresses wrap instead of pushing the page sideways */
body:not(.home-redesign) main a[href^="mailto:"] { overflow-wrap: anywhere; }

/* ---------- Tables: accessible horizontal scroll where a table is wider than a phone ---------- */
body:not(.home-redesign) main .sr-table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; max-width: 100%; }
body:not(.home-redesign) main .sr-table-scroll:focus-visible { outline: 3px solid var(--sr-brass, #C08A3E); outline-offset: 3px; }
