/* GCLINIC R2.8 — TEST ONLY. Existing gcliniccatalog engine retained. */
@media (min-width: 768px) {
  body.gclinic-catalog-shell-page #gcc26-quickbar .gcc26-categories {
    display: flex !important;
    flex-flow: row wrap !important;
    gap: 9px !important;
    overflow: visible !important;
    max-height: none !important;
    scrollbar-width: none !important;
    padding: 2px 0 4px !important;
    margin-bottom: 16px !important;
  }
  body.gclinic-catalog-shell-page #gcc26-quickbar .gcc26-pill {
    flex: 0 0 auto !important;
    white-space: normal !important;
  }
  body.gclinic-catalog-shell-page #mse2_results {
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  }
}
/* No incorrect count derived from the old initial mFilter2 HTML. */
body.gclinic-catalog-shell-page #gcc26-quickbar .gcc26-total {
  visibility: hidden;
}
body.gclinic-catalog-shell-page #gcc26-quickbar.gcc28-count-ready .gcc26-total {
  visibility: visible;
}
/* Grid selector is no longer part of the public interface, but remains in DOM. */
body.gclinic-catalog-shell-page .catalog-grid-switch,
body.gclinic-catalog-shell-page .gcc26-grid { display: none !important; }
/* Mask the legacy dialog while R27 prepares its lazily-loaded values. */
html.gcc28-preloading .gcc-r41-panel,
html.gcc28-preloading .gcc-r33-panel,
html.gcc28-preloading .gcc-r41-overlay,
html.gcc28-preloading .gcc-r33-overlay,
html.gcc28-preloading .gcc-r41-backdrop,
html.gcc28-preloading .catalog-filter-modal,
html.gcc28-preloading .catalog-filter-overlay,
html.gcc28-preloading .catalog-filter-panel,
html.gcc28-preloading [role="dialog"]:has([data-gcc-group]),
html.gcc28-preloading [aria-modal="true"]:has([data-gcc-group]) {
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}
@media (max-width: 767px) {
  /* Mobile: retain original R41/R42 modal and original filter button. */
  body.gclinic-catalog-shell-page #gcc26-quickbar { display: none !important; }
  body.gclinic-catalog-shell-page .catalog-head__controls,
  body.gclinic-catalog-shell-page.gcc26-enhanced .catalog-head__controls { display: flex !important; }
  body.gclinic-catalog-shell-page.gcc26-enhanced .catalog-active-tags:not(:empty) { display: flex !important; }
  body.gclinic-catalog-shell-page #mse2_results {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 12px !important;
  }
  body.gclinic-catalog-shell-page #mse2_results > * {
    min-width: 0 !important;
    max-width: 100% !important;
    width: 100% !important;
    flex: none !important;
  }
}
