/* Mobile finishing pass. Keep all navigation reachable on short screens. */
@media (max-width: 900px) {
  .nav-links.open {
    max-height: calc(100svh - 96px);
    max-height: calc(100dvh - 96px);
    overflow-y: auto;
    overscroll-behavior: contain;
    scroll-padding-block: 16px;
  }
}

/* Product details scroll independently, with the close control always in reach. */
html:has(#product-dialog[open]) { overflow: hidden; }
#product-dialog { overscroll-behavior: contain; }
#product-dialog .dialog-close {
  position: sticky;
  top: 12px;
  inset-inline-end: auto;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin: 12px 12px -56px auto;
  z-index: 10;
}
[dir=rtl] #product-dialog .dialog-close { margin: 12px auto -56px 12px; }

@media (max-width: 650px) {
  .nav-wrap { width: calc(100% - 32px); gap: 8px; }
  .nav-wrap .brand { width: clamp(108px, 30vw, 128px); }
  .nav-actions { gap: 6px; }
  .language { gap: 0; }
  .language button { min-width: 32px; min-height: 44px; padding: 4px; }
  .studio-stepper button { width: 44px; height: 44px; }
  .studio-stepper { bottom: 0; }
  .studio-selector button { min-height: 64px; }
  .studio-selector span { font-size: .7rem; line-height: 1.5; }
  .catalogue-families .filter > span { font-size: .8rem; }
  .catalogue-results-heading .result-count,
  .catalogue-results-heading > a { font-size: .75rem; }
  .catalog-grid .catalogue-card .product-info h3 { font-size: .94rem; }
  .catalog-grid .catalogue-card .product-info p { font-size: .8125rem; }
  .catalogue-detail { min-height: 48px; font-size: .75rem; line-height: 1.45; }
  .catalogue-detail > span:first-child { min-width: 0; text-align: start; }
  .catalogue-detail > span:last-child { flex-shrink: 0; }
  .catalog-grid .catalogue-card .category { font-size: .625rem; max-width: calc(100% - 68px); }
  .catalogue-index { font-size: .625rem; }
}
