/* Navigazione del catalogo pubblico: stili isolati dal sito e dalle schede. */
.modules-catalog { background: #f5f6fb; }
.modules-layout { display: grid; grid-template-columns: 340px minmax(0, 1fr); align-items: start; }
.catalog-navigation { position: sticky; top: 100px; height: calc(100vh - 120px); height: calc(100dvh - 120px); min-height: 460px; display: flex; flex-direction: column; background: #efedf5; color: #29243b; border-right: 1px solid #d8d2e3; padding: 22px 18px 14px; border-radius: 0 0 22px 0; }
.catalog-heading { margin-bottom: 15px; }
.catalog-eyebrow { color: #a61985; font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .1em; }
.catalog-heading h1 { color: #29243b; font-size: 24px; margin: 6px 0; }
.catalog-heading p, .catalog-note { color: #6c667b; font-size: 12px; line-height: 1.5; margin: 0; }
#catalog-browser { display: flex; flex-direction: column; min-height: 0; flex: 1; }
.catalog-controls { flex-shrink: 0; }
.catalog-controls label { display: block; color: #494258; font-size: 12px; font-weight: 700; margin-bottom: 5px; }
.modules-catalog input, .modules-catalog select { width: 100%; height: 42px; border: 1px solid #bdb3cd; border-radius: 10px; background: #fff; color: #29243b; padding: 0 11px; font-size: 13px; }
.modules-catalog input::placeholder { color: #6c667b; }
.modules-catalog select { appearance: auto; }
.catalog-filters { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin: 12px 0; }
.catalog-filters button { display: flex; justify-content: space-between; align-items: center; gap: 6px; padding: 8px 10px; background: #fff; color: #494258; border: 1px solid #bdb3cd; border-radius: 9px; font-size: 12px; font-weight: 700; }
.catalog-filters button[aria-pressed="true"] { background: #652bb5; border-color: #652bb5; color: #fff; }
.catalog-filters button span { font-size: 11px; opacity: .8; }
.catalog-results { display: flex; justify-content: space-between; align-items: center; min-height: 35px; font-size: 12px; color: #6c667b; }
#catalog-reset { color: #92227b; font-size: 12px; text-decoration: underline; border: 0; background: none; padding: 4px; }
.catalog-list { min-height: 0; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: #c9bfd8 transparent; padding-right: 5px; flex: 1; }
.catalog-group h2 { color: #6c667b; font-size: 10px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; margin: 16px 2px 8px; }
.catalog-group:first-child h2 { margin-top: 4px; }
.catalog-module { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 11px 10px; margin-bottom: 6px; border: 1px solid #cfc6dd; box-shadow: 0 2px 4px rgba(48, 28, 73, .04); border-radius: 11px; color: #29243b; background: #fff; }
.catalog-module:hover { color: #58239d; background: #faf5fc; border-color: #c9a5df; }
.catalog-module[aria-current="true"] { background: #652bb5; border-color: #652bb5; color: #fff; box-shadow: inset 3px 0 #e26ec6; }
.catalog-module-name { font-size: 13px; line-height: 1.35; font-weight: 700; min-width: 0; overflow-wrap: anywhere; }
.catalog-module-name small { display: block; color: #6c667b; font-size: 10px; font-weight: 400; margin-top: 3px; }
.catalog-module[aria-current="true"] small { color: #eee5fb; }
.catalog-badges { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; flex-shrink: 0; }
.catalog-badge { display: inline-block; white-space: nowrap; font-size: 10px; font-weight: 700; line-height: 1.2; border-radius: 6px; padding: 4px 6px; }
.badge-included { background: #e9f6ed; color: #24663c; }
.badge-free { background: #e9f3fc; color: #215e87; }
.badge-paid { background: #f0eafa; color: #694297; }
.badge-soon { background: #fff3db; color: #805b13; }
#catalog-empty { font-size: 14px; color: #494258; padding: 20px 6px; }
.catalog-note { padding-top: 12px; font-size: 11px; }
.catalog-detail { min-width: 0; scroll-margin-top: 100px; }
.catalog-detail-heading { display: flex; flex-wrap: wrap; gap: 5px 12px; align-items: center; padding: 16px 24px; border-bottom: 1px solid #e2e2ed; }
.catalog-detail-heading > span:first-child { font-size: 12px; color: #62647c; }
.catalog-detail-heading strong { font-size: 15px; color: #191733; }
#module-frame { width: 100%; display: block; min-height: 100vh; border: 0; background: #fff; }
#catalog-toggle { display: none; }
.modules-catalog [hidden] { display: none !important; }
.modules-catalog :is(a, button, input, select, nav):focus-visible { outline: 3px solid #a236a5; outline-offset: 2px; }
@media (max-width: 991px) {
  .modules-layout { display: block; }
  .catalog-navigation { position: static; height: auto; min-height: 0; border-radius: 0; padding: 20px 18px; }
  .catalog-heading h1 { font-size: 22px; }
  #catalog-toggle { display: flex; align-items: center; justify-content: space-between; width: 100%; padding: 12px; color: #58239d; border: 1px solid #b9a5d2; border-radius: 10px; background: #fff; font-weight: 700; font-size: 14px; }
  #catalog-browser { flex: none; padding-top: 16px; }
  .catalog-list { flex: none; max-height: 340px; max-height: 45dvh; }
  .catalog-filters { grid-template-columns: 1fr 1fr; }
  .catalog-filters button { justify-content: space-between; padding: 9px 12px; line-height: 1.4; }
  .catalog-detail-heading { padding: 14px 18px; }
}
@media (max-height: 740px) and (min-width: 992px) {
  .catalog-heading { margin-bottom: 8px; }
  .catalog-heading h1 { font-size: 20px; }
  .catalog-heading p, .catalog-eyebrow { display: none; }
  .catalog-navigation { top: 85px; height: calc(100dvh - 95px); min-height: 380px; padding-top: 12px; }
}

@media (max-width: 575px) {
  .public-modules-page .tp-header-main__bar button { width: 70px; }
}
#catalog-current-badges { display: inline-flex; gap: 5px; align-items: center; }
