/* Backend category links retain the existing RT/TR badge presentation. */
.product-tag-category[data-catalog-category-link], .related-category-badge[data-catalog-category-link] { max-width: calc(100% - 28px); white-space: normal; overflow-wrap: break-word; line-height: 1.35; text-align: center; cursor: pointer; text-decoration: none; }
.product-family-card .product-tag-category[data-catalog-category-link], .related-art .related-category-badge[data-catalog-category-link] { top: 5px; right: 5px; max-width: 65%; padding: 3px 6px; font-size: 8px; line-height: 1.2; letter-spacing: 0; background: rgba(255,255,255,.9); box-shadow: none; }
.product-tag-category[data-catalog-category-link]:hover, .related-category-badge[data-catalog-category-link]:hover { border-color: #8bb5d8; color: #17395e; background: #fff; box-shadow: 0 3px 10px rgba(41,104,163,.15); }
[data-catalog-category-link]:focus-visible { outline: 3px solid #76a9d3; outline-offset: 3px; }
.product-meta [data-catalog-category-link] { color: #64748b; font: 10px ui-monospace,monospace; letter-spacing: .12em; text-transform: uppercase; text-decoration: none; }
.product-meta [data-catalog-category-link]:hover { color: #2968a3; text-decoration: underline; text-underline-offset: 3px; }
.related-art > .related-image-link { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; }
.filter-panel [data-product-category-filters] { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); align-items: stretch; gap: 8px; overflow: visible; padding: 0; margin: 0; }
.catalog-filter-options { min-width: 0; overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: thin; scrollbar-color: #b7ccdf transparent; }
.catalog-filter-options-inner { min-width: 0; }
.catalog-section .catalog-intro { margin-bottom: 0; }
.catalog-search-row { margin: 32px 0 24px; }
.catalog-section .catalog-topbar { display: grid; grid-template-columns: auto minmax(0,1fr) auto; align-items: center; gap: 12px; }
.catalog-topbar > [data-product-type-filters] { min-width: 0; flex-wrap: nowrap; gap: 8px; margin: 0; padding: 4px 2px; }
.catalog-topbar > [data-product-type-filters] .category-chip { min-height: 44px; border-radius: 12px; }
.catalog-topbar > [data-product-type-filters] .category-chip:not(.is-active) { border-color: #cad9e7; background: rgba(255,255,255,.9); }
.catalog-section .catalog-search-row > .search-inline { width: 100%; min-width: 0; border-color: #cad9e7; border-radius: 12px; background: rgba(255,255,255,.9); }
.catalog-search-row > .search-inline svg { flex: 0 0 auto; }
.catalog-search-row > .search-inline input { min-width: 0; }
.catalog-search-row > .search-inline:focus-within { border-color: #6b9fc9; box-shadow: 0 0 0 3px rgba(118,169,211,.2); }
.catalog-topbar > .product-count { justify-self: end; }
.filter-panel .catalog-topic-chip { min-width: 0; justify-content: space-between; gap: 8px; padding: 9px 12px; border: 1px solid rgba(155,182,205,.46); border-radius: 12px; background: rgba(255,255,255,.42); font-size: 11px; line-height: 1.4; white-space: normal; text-align: left; text-decoration: none; }
.filter-panel .catalog-topic-chip:not(.is-active):hover { border-color: #8bb5d8; background: rgba(255,255,255,.68); }
.filter-panel .catalog-topic-chip.is-active { border-color: #2968a3; color: #fff; background: rgba(41,104,163,.92); box-shadow: 0 4px 12px rgba(41,104,163,.14); }
.catalog-topic-chip .category-count { flex: 0 0 auto; }
.catalog-filter-toggle { min-height: 44px; display: inline-flex; align-items: center; justify-content: center; gap: 9px; padding: 0 16px; border: 1px solid #cad9e7; border-radius: 12px; color: #172b40; background: rgba(255,255,255,.9); font: inherit; font-size: 14px; cursor: pointer; box-shadow: 0 3px 12px rgba(27,57,86,.05); }
.catalog-filter-toggle svg { width: 17px; height: 17px; }
.catalog-filter-toggle:hover, .catalog-filter-toggle[aria-expanded="true"] { border-color: #6b9fc9; background: #fff; }
.catalog-filter-toggle:focus-visible, .catalog-filter-close:focus-visible { outline: 3px solid #76a9d3; outline-offset: 3px; }
.catalog-section .filter-panel[popover] { position: fixed; inset: 16px auto auto 50%; translate: -50% 0; width: min(940px,66vw); max-width: calc(100vw - 32px); max-height: calc(100svh - 32px); margin: 0; padding: 20px; overflow-y: auto; overscroll-behavior: contain; border: 1px solid rgba(180,207,229,.76); border-radius: 16px; color: #172b40; background: linear-gradient(135deg,rgba(248,252,255,.74),rgba(226,240,250,.64)); box-shadow: 0 16px 44px rgba(24,53,82,.12), inset 0 1px 0 rgba(255,255,255,.72); -webkit-backdrop-filter: blur(18px) saturate(115%); backdrop-filter: blur(18px) saturate(115%); }
.filter-panel[popover]:popover-open { animation: catalog-filter-unfold .2s ease-out; }
.catalog-filter-dismiss { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 12px; }
.catalog-filter-dismiss > .catalog-filter-label { margin: 0; }
.catalog-filter-close { flex: 0 0 auto; width: 32px; height: 32px; display: inline-grid; place-items: center; padding: 0; border: 1px solid rgba(155,182,205,.35); border-radius: 8px; color: #3d5c78; background: rgba(255,255,255,.36); cursor: pointer; }
.catalog-filter-close:hover { border-color: #8bb5d8; background: rgba(255,255,255,.72); }
.catalog-filter-close svg { width: 17px; height: 17px; }
.catalog-filter-label { margin: 16px 0 8px; color: #64748b; font-size: 10px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; }
@keyframes catalog-filter-unfold { from { opacity: 0; transform: translateX(-18px); clip-path: inset(0 100% 0 0 round 16px); } to { opacity: 1; transform: translateX(0); clip-path: inset(0 0 0 0 round 16px); } }
@media (max-width:700px) {
  .catalog-search-row { margin: 24px 0 20px; }
  .catalog-section .catalog-topbar { grid-template-columns: minmax(0,1fr) auto; }
  .catalog-topbar > .catalog-filter-toggle { grid-column: 1; grid-row: 1; justify-self: start; }
  .catalog-topbar > .product-count { grid-column: 2; grid-row: 1; }
  .catalog-topbar > [data-product-type-filters] { grid-column: 1 / -1; grid-row: 2; display: grid; grid-template-columns: 1.25fr 1fr 1fr; margin: 0; }
  .catalog-topbar > [data-product-type-filters] .category-chip { min-width: 0; justify-content: center; gap: 5px; padding: 0 6px; font-size: 12px; }
  .catalog-section .filter-panel[popover] { width: min(520px,calc(100vw - 36px)); padding: 16px; }
  .filter-panel [data-product-category-filters] { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .catalog-filter-close { width: 36px; height: 36px; }
}
@media (min-width:701px) and (max-width:960px) {
  .catalog-section .filter-panel[popover] { width: calc(100vw - 48px); }
}
@media (prefers-reduced-motion:reduce) { .filter-panel[popover]:popover-open { animation: none; } }
