.catalog-masthead {
    position: relative;
    overflow: hidden;
    min-height: 250px;
    padding: 36px 40px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    align-items: center;
    gap: 32px;
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-lg);
    background:
        radial-gradient(circle at 88% 18%, rgba(64, 141, 255, .18), transparent 18rem),
        linear-gradient(135deg, #fff 0%, #f6faff 58%, #eef6ff 100%);
    box-shadow: var(--shadow-md);
}
.catalog-masthead::after {
    content: "";
    position: absolute;
    width: 260px;
    height: 260px;
    right: 115px;
    bottom: -190px;
    border-radius: 50%;
    border: 46px solid rgba(23, 92, 211, .05);
}
.catalog-breadcrumbs { display:flex; align-items:center; flex-wrap:wrap; gap:7px; margin-bottom:19px; color:#70809b; font-size:12px; font-weight:750; }
.catalog-breadcrumbs a { text-decoration:none; transition:color .18s ease; }
.catalog-breadcrumbs a:hover { color:var(--blue); }
.catalog-breadcrumbs strong { color:#304c76; }
.catalog-masthead h1 { max-width:920px; margin:7px 0 10px; color:var(--ink); font-size:clamp(32px, 4vw, 52px); line-height:1.02; letter-spacing:-.045em; }
.catalog-masthead p { max-width:760px; margin:0; color:var(--ink-soft); font-size:15px; line-height:1.75; }
.catalog-masthead-art { position:relative; z-index:1; min-height:170px; display:flex; flex-direction:column; align-items:center; justify-content:center; padding:24px; border:1px solid rgba(191,211,240,.9); border-radius:24px; background:rgba(255,255,255,.76); box-shadow:var(--shadow-sm); backdrop-filter:blur(12px); text-align:center; }
.catalog-orb { width:68px; height:68px; display:grid; place-items:center; margin-bottom:13px; border-radius:22px; color:#fff; background:linear-gradient(135deg,#3182ef,#0d4ea9); box-shadow:0 16px 30px rgba(23,92,211,.24); transform:rotate(-3deg); transition:transform .28s ease; }
.catalog-masthead-art:hover .catalog-orb { transform:rotate(2deg) translateY(-3px); }
.catalog-orb svg { width:34px; height:34px; fill:none; stroke:currentColor; stroke-width:1.7; stroke-linecap:round; stroke-linejoin:round; }
.catalog-masthead-art strong { max-width:240px; color:var(--blue-deep); font-size:17px; line-height:1.2; }
.catalog-masthead-art small { margin-top:5px; color:#788aa5; font-size:11px; font-weight:800; text-transform:uppercase; letter-spacing:.08em; }

.catalog-control-panel { position:relative; z-index:4; margin:-22px 28px 0; padding:14px; border:1px solid rgba(191,211,240,.92); border-radius:20px; background:rgba(255,255,255,.94); box-shadow:0 18px 38px rgba(18,48,91,.11); backdrop-filter:blur(18px); }
.catalog-global-form { display:grid; grid-template-columns:minmax(280px,1.65fr) minmax(200px,.85fr) minmax(200px,.85fr) auto auto; align-items:end; gap:10px; }
.catalog-search-field { position:relative; height:50px; display:flex; align-items:center; border:1px solid #cddcf0; border-radius:14px; background:#f9fbfe; transition:border-color .2s ease, box-shadow .2s ease, background .2s ease; }
.catalog-search-field:focus-within { border-color:#78a7e8; background:#fff; box-shadow:0 0 0 4px rgba(23,92,211,.08); }
.catalog-search-field svg { width:19px; height:19px; margin-left:15px; color:#6980a0; fill:none; stroke:currentColor; stroke-width:1.8; }
.catalog-search-field input { width:100%; height:100%; padding:0 14px 0 10px; border:0; outline:0; color:var(--ink); background:transparent; font-size:13px; }
.compact-select { display:flex; flex-direction:column; gap:5px; }
.compact-select > span { padding-left:3px; color:#6c7f9c; font-size:10px; font-weight:850; text-transform:uppercase; letter-spacing:.07em; }
.compact-select select, .resource-filter-form select { height:50px; padding:0 38px 0 13px; border:1px solid #cddcf0; border-radius:14px; outline:0; color:#294467; background:#fff; font-size:12px; font-weight:750; }
.compact-select select:focus, .resource-filter-form select:focus { border-color:#78a7e8; box-shadow:0 0 0 4px rgba(23,92,211,.08); }
.filter-reset { min-height:46px; display:inline-flex; align-items:center; justify-content:center; padding:0 10px; color:#627795; font-size:12px; font-weight:850; text-decoration:none; }
.filter-reset:hover { color:var(--blue); }
.filter-reset.block { width:100%; min-height:34px; margin-top:1px; }

.catalog-section { margin-top:20px; padding:30px; border:1px solid var(--line-strong); border-radius:var(--radius-lg); background:rgba(255,255,255,.92); box-shadow:var(--shadow-sm); }
.catalog-section-head { display:flex; align-items:end; justify-content:space-between; gap:24px; margin-bottom:20px; }
.catalog-section-head h2 { margin:4px 0 0; color:var(--ink); font-size:28px; letter-spacing:-.035em; }
.catalog-section-head p { margin:5px 0 0; color:var(--muted); font-size:13px; }
.back-link { color:var(--blue); font-size:12px; font-weight:850; text-decoration:none; }
.back-link:hover { text-decoration:underline; }

.collection-card-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:16px; }
.collection-card { --spot-x:50%; --spot-y:50%; position:relative; overflow:hidden; min-height:195px; display:grid; grid-template-columns:148px minmax(0,1fr); border:1px solid #d7e3f3; border-radius:21px; background:#fff; color:inherit; text-decoration:none; box-shadow:0 8px 24px rgba(24,53,96,.06); transition:transform .22s ease,border-color .22s ease,box-shadow .22s ease; transform-style:preserve-3d; }
.collection-card::after { content:""; position:absolute; inset:0; pointer-events:none; opacity:0; background:radial-gradient(260px circle at var(--spot-x) var(--spot-y),rgba(56,132,235,.10),transparent 58%); transition:opacity .25s ease; }
.collection-card:hover { border-color:#9fc1ee; box-shadow:0 19px 42px rgba(23,69,130,.13); }
.collection-card:hover::after { opacity:1; }
.collection-visual { min-height:195px; overflow:hidden; display:grid; place-items:center; background:#eaf3ff; }
.collection-visual img { width:100%; height:100%; object-fit:cover; transition:transform .45s cubic-bezier(.2,.7,.2,1); }
.collection-card:hover .collection-visual img { transform:scale(1.055); }
.collection-visual.is-fallback { color:#aeb3b8; background:#f3f3f3; }
.collection-visual.is-fallback.muted { background:#f3f3f3; }
.collection-visual svg { width:48px; height:48px; fill:none; stroke:currentColor; stroke-width:1.6; }
.collection-visual.is-fallback img { object-fit:cover; }
.collection-card:hover .collection-visual.is-fallback img { transform:none; }
.collection-content { position:relative; z-index:1; min-width:0; padding:22px 20px; display:flex; flex-direction:column; align-items:flex-start; }
.collection-count { display:inline-flex; padding:6px 9px; border-radius:9px; color:#0f5bbd; background:#edf5ff; font-size:10px; font-weight:900; text-transform:uppercase; letter-spacing:.04em; }
.collection-content strong { margin-top:13px; color:var(--ink); font-size:19px; line-height:1.18; letter-spacing:-.025em; }
.collection-content small { margin-top:7px; color:#70809b; font-size:11px; line-height:1.5; }
.collection-open { margin-top:auto; padding-top:16px; color:var(--blue); font-size:12px; font-weight:900; }
.collection-open b { display:inline-block; transition:transform .2s ease; }
.collection-card:hover .collection-open b { transform:translateX(4px); }

.resource-browser-layout { display:grid; grid-template-columns:245px minmax(0,1fr); gap:20px; align-items:start; }
.resource-filter-panel { position:sticky; top:112px; overflow:hidden; border:1px solid #d8e4f4; border-radius:19px; background:#f9fbfe; }
.filter-panel-head { padding:16px 17px; display:flex; align-items:center; justify-content:space-between; border-bottom:1px solid #e0e9f5; }
.filter-panel-head strong { font-size:13px; }
.filter-panel-head button { display:none; border:0; background:transparent; color:#617795; font-size:24px; cursor:pointer; }
.resource-filter-form { padding:16px; display:flex; flex-direction:column; gap:14px; }
.resource-filter-form label { display:flex; flex-direction:column; gap:6px; }
.resource-filter-form label > span { color:#6b7e99; font-size:10px; font-weight:900; text-transform:uppercase; letter-spacing:.07em; }
.results-toolbar { min-height:40px; margin-bottom:12px; display:flex; align-items:center; justify-content:space-between; gap:12px; color:#71819a; font-size:11px; font-weight:750; }
.view-toggle { display:flex; gap:4px; padding:3px; border:1px solid #dce6f3; border-radius:10px; background:#f8fafd; }
.view-toggle button { width:31px; height:28px; border:0; border-radius:7px; background:transparent; color:#6d809d; cursor:pointer; font-size:17px; transition:background .18s ease,color .18s ease; }
.view-toggle button.is-active { color:var(--blue); background:#fff; box-shadow:0 3px 9px rgba(31,62,105,.09); }
.filter-drawer-button { display:none; }

.catalog-resource-grid { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:15px; }
.catalog-resource-card { --spot-x:50%; --spot-y:50%; position:relative; overflow:hidden; min-width:0; border:1px solid #dce6f3; border-radius:19px; background:#fff; box-shadow:0 8px 22px rgba(23,50,90,.06); transition:transform .22s ease,border-color .22s ease,box-shadow .22s ease; }
.catalog-resource-card::after { content:""; position:absolute; inset:0; z-index:0; pointer-events:none; opacity:0; background:radial-gradient(240px circle at var(--spot-x) var(--spot-y),rgba(53,130,230,.08),transparent 60%); transition:opacity .2s ease; }
.catalog-resource-card:hover { transform:translateY(-4px); border-color:#abc9f0; box-shadow:0 20px 38px rgba(20,56,108,.12); }
.catalog-resource-card:hover::after { opacity:1; }
.catalog-resource-cover { position:relative; z-index:1; overflow:hidden; aspect-ratio:3/4; display:block; background:#edf3fb; }
.catalog-resource-cover img { width:100%; height:100%; object-fit:cover; transition:transform .45s cubic-bezier(.2,.8,.2,1),filter .3s ease; }
.catalog-resource-card:hover .catalog-resource-cover img { transform:scale(1.035); filter:saturate(1.04); }
.catalog-resource-cover .cover-action { position:absolute; left:10px; right:10px; bottom:10px; transform:translateY(10px); opacity:0; padding:9px 11px; display:flex; align-items:center; justify-content:space-between; border-radius:10px; color:#fff; background:rgba(8,33,73,.88); backdrop-filter:blur(10px); font-size:11px; font-weight:850; transition:opacity .22s ease,transform .22s ease; }
.catalog-resource-card:hover .cover-action { opacity:1; transform:none; }
.catalog-resource-cover .new-badge { position:absolute; top:10px; left:10px; z-index:2; padding:6px 9px; border-radius:9px; color:#fff; background:#0b8f58; box-shadow:0 7px 18px rgba(8,117,76,.2); font-size:9px; font-weight:900; text-transform:uppercase; }
.catalog-resource-body { position:relative; z-index:1; padding:14px; }
.resource-status-row { display:flex; align-items:center; justify-content:space-between; gap:8px; }
.catalog-resource-body .availability { font-size:9px; }
.type-chip { max-width:47%; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; padding:5px 7px; border-radius:8px; color:#526d92; background:#f1f5fb; font-size:8px; font-weight:850; text-transform:uppercase; }
.catalog-resource-body h3 { margin:10px 0 0; font-size:14px; line-height:1.28; letter-spacing:-.015em; }
.catalog-resource-body h3 a { text-decoration:none; }
.catalog-resource-body h3 a:hover { color:var(--blue); }
.catalog-resource-body .resource-author { min-height:17px; margin:4px 0 0; color:#74839b; font-size:10px; }
.catalog-resource-meta { margin-top:10px; display:flex; flex-wrap:wrap; gap:5px; }
.catalog-resource-meta span { max-width:100%; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; padding:5px 7px; border:1px solid #e2eaf5; border-radius:8px; color:#657895; background:#fafcff; font-size:9px; font-weight:750; }
.resource-card-actions { min-height:36px; margin-top:12px; padding-top:10px; display:flex; align-items:center; justify-content:space-between; gap:8px; border-top:1px solid #edf1f6; }
.resource-card-actions form { margin:0; }
.detail-link { color:var(--blue); font-size:10px; font-weight:900; text-decoration:none; }
.detail-link span { display:inline-block; transition:transform .2s ease; }
.detail-link:hover span { transform:translateX(3px); }
.mini-request { min-height:30px; padding:0 10px; border:0; border-radius:9px; color:#fff; background:#175cd3; cursor:pointer; font-size:9px; font-weight:850; }
.mini-request:disabled { opacity:.45; cursor:not-allowed; }

.catalog-resource-grid.is-list { grid-template-columns:1fr; }
.catalog-resource-grid.is-list .catalog-resource-card { display:grid; grid-template-columns:110px minmax(0,1fr); min-height:150px; }
.catalog-resource-grid.is-list .catalog-resource-cover { aspect-ratio:auto; min-height:150px; }
.catalog-resource-grid.is-list .catalog-resource-body { display:flex; flex-direction:column; justify-content:center; padding:18px; }
.catalog-resource-grid.is-list .catalog-resource-body h3 { font-size:17px; }
.catalog-resource-grid.is-list .resource-card-actions { margin-top:auto; }

.catalog-pagination.premium-pagination {
    position:relative;
    margin-top:26px;
    padding:12px;
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:16px;
    border:1px solid #d8e5f5;
    border-radius:18px;
    background:linear-gradient(180deg,#ffffff 0%,#f8fbff 100%);
    box-shadow:0 12px 30px rgba(20,54,102,.07);
    overflow:hidden;
}
.catalog-pagination.premium-pagination::before {
    content:"";
    position:absolute;
    inset:0 auto auto 0;
    width:100%;
    height:2px;
    background:linear-gradient(90deg,transparent,#4c93ef 18%,#175cd3 50%,#4c93ef 82%,transparent);
    opacity:.72;
}
.pagination-navigation { display:flex; align-items:center; justify-content:center; gap:6px; min-width:0; }
.page-control,
.page-number {
    min-width:38px;
    height:38px;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    gap:5px;
    border:1px solid #d7e3f3;
    border-radius:11px;
    color:#526984;
    background:#fff;
    box-shadow:0 3px 9px rgba(24,56,100,.035);
    font-size:10px;
    font-weight:850;
    text-decoration:none;
    transition:transform .18s ease,border-color .18s ease,color .18s ease,background .18s ease,box-shadow .18s ease;
}
.page-control { padding:0 10px; }
.page-control span { font-size:17px; line-height:1; transition:transform .18s ease; }
.page-control b { font:inherit; }
.page-control:hover,
.page-number:hover {
    color:var(--blue);
    border-color:#9fc3f1;
    background:#f5f9ff;
    box-shadow:0 8px 18px rgba(23,92,211,.10);
    transform:translateY(-2px);
}
.page-control:hover:first-child span,
.page-control:hover:nth-child(2) span { transform:translateX(-2px); }
.page-control:hover:nth-last-child(-n+2) span { transform:translateX(2px); }
.page-control.is-disabled {
    opacity:.38;
    pointer-events:none;
    box-shadow:none;
    background:#f8fafc;
}
.pagination-pages { display:flex; align-items:center; gap:5px; }
.page-number { position:relative; padding:0 8px; }
.page-number.is-current {
    color:#fff;
    border-color:#175cd3;
    background:linear-gradient(135deg,#2874e6,#1550b7);
    box-shadow:0 8px 18px rgba(23,92,211,.22);
    transform:translateY(-1px);
}
.page-number.is-current::after {
    content:"";
    position:absolute;
    left:50%;
    bottom:-7px;
    width:5px;
    height:5px;
    border-radius:99px;
    background:#2d76df;
    transform:translateX(-50%);
}
.page-ellipsis {
    width:24px;
    height:38px;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    color:#8798af;
    font-size:14px;
    font-weight:900;
}
.pagination-jump {
    flex:0 0 auto;
    min-height:46px;
    display:flex;
    align-items:center;
    gap:8px;
    padding:5px 6px 5px 11px;
    border:1px solid #dbe7f6;
    border-radius:13px;
    background:#f4f8fd;
}
.pagination-jump > label {
    color:#6a7d98;
    font-size:9px;
    font-weight:900;
    text-transform:uppercase;
    letter-spacing:.055em;
    white-space:nowrap;
}
.page-jump-control {
    height:34px;
    display:flex;
    align-items:center;
    overflow:hidden;
    border:1px solid #cbdcf0;
    border-radius:9px;
    background:#fff;
    transition:border-color .18s ease,box-shadow .18s ease;
}
.page-jump-control:focus-within {
    border-color:#79a9eb;
    box-shadow:0 0 0 3px rgba(23,92,211,.08);
}
.page-jump-control input {
    width:52px;
    height:32px;
    padding:0 6px 0 10px;
    border:0;
    outline:0;
    color:#10244a;
    background:transparent;
    text-align:center;
    font-size:11px;
    font-weight:900;
    -moz-appearance:textfield;
}
.page-jump-control input::-webkit-outer-spin-button,
.page-jump-control input::-webkit-inner-spin-button { margin:0; -webkit-appearance:none; }
.page-jump-control span {
    height:100%;
    display:flex;
    align-items:center;
    padding:0 9px 0 4px;
    color:#8291a7;
    font-size:9px;
    font-weight:800;
    white-space:nowrap;
}
.page-jump-button {
    min-width:46px;
    height:34px;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    gap:5px;
    padding:0 10px;
    border:0;
    border-radius:9px;
    color:#fff;
    background:linear-gradient(135deg,#2874e6,#1550b7);
    box-shadow:0 6px 14px rgba(23,92,211,.18);
    cursor:pointer;
    font-size:9px;
    font-weight:900;
    transition:transform .18s ease,box-shadow .18s ease,filter .18s ease;
}
.page-jump-button:hover { transform:translateY(-1px); box-shadow:0 9px 18px rgba(23,92,211,.24); filter:saturate(1.06); }
.page-jump-button span { transition:transform .18s ease; }
.page-jump-button:hover span { transform:translateX(2px); }
.premium-pagination.is-navigating { pointer-events:none; }
.premium-pagination.is-navigating::after {
    content:"";
    position:absolute;
    left:0;
    bottom:0;
    height:3px;
    width:34%;
    border-radius:99px;
    background:linear-gradient(90deg,#175cd3,#31a6ee,#175cd3);
    animation:paginationLoading .65s ease-in-out infinite alternate;
}
.premium-pagination .is-loading { color:#175cd3; background:#edf5ff; }
.pagination-jump.is-invalid .page-jump-control {
    border-color:#e98b85;
    box-shadow:0 0 0 3px rgba(217,45,32,.08);
    animation:paginationShake .28s ease;
}
@keyframes paginationLoading { from { transform:translateX(-20%); } to { transform:translateX(230%); } }
@keyframes paginationShake { 0%,100% { transform:translateX(0); } 35% { transform:translateX(-4px); } 70% { transform:translateX(4px); } }
.catalog-empty { min-height:330px; padding:40px 20px; display:flex; flex-direction:column; align-items:center; justify-content:center; text-align:center; border:1px dashed #cbd9ec; border-radius:19px; background:#fafcff; }
.catalog-empty.standalone { margin-top:20px; min-height:520px; border-style:solid; }
.catalog-empty > span { width:58px; height:58px; display:grid; place-items:center; border-radius:18px; color:var(--blue); background:#edf5ff; font-size:30px; }
.catalog-empty h3, .catalog-empty h1 { margin:14px 0 6px; }
.catalog-empty p { max-width:480px; margin:0 0 17px; color:#72829b; font-size:13px; }

@media (max-width:1200px) {
    .catalog-global-form { grid-template-columns:minmax(260px,1.5fr) 1fr 1fr auto; }
    .catalog-global-form .filter-reset { grid-column:1/-1; min-height:24px; justify-content:flex-start; }
    .collection-card-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
    .catalog-resource-grid { grid-template-columns:repeat(3,minmax(0,1fr)); }
}
@media (max-width:900px) {
    .catalog-masthead { grid-template-columns:1fr; min-height:0; padding:30px; }
    .catalog-masthead-art { display:none; }
    .catalog-control-panel { margin:-14px 14px 0; }
    .catalog-global-form { grid-template-columns:1fr 1fr; }
    .catalog-search-field { grid-column:1/-1; }
    .catalog-global-form .primary-button { width:100%; }
    .resource-browser-layout { grid-template-columns:1fr; }
    .filter-drawer-button { display:inline-flex; }
    .resource-filter-panel { position:fixed; z-index:1500; top:0; right:0; bottom:0; width:min(360px,92vw); border-radius:0; transform:translateX(105%); transition:transform .28s cubic-bezier(.2,.8,.2,1); box-shadow:-20px 0 45px rgba(10,35,75,.18); }
    .resource-filter-panel.is-open { transform:none; }
    .filter-panel-head button { display:block; }
    .resource-filter-form { overflow:auto; max-height:calc(100vh - 60px); }
    .catalog-resource-grid { grid-template-columns:repeat(3,minmax(0,1fr)); }
}
@media (max-width:980px) {
    .catalog-pagination.premium-pagination { align-items:stretch; flex-direction:column; }
    .pagination-navigation { width:100%; }
    .pagination-jump { align-self:center; }
}
@media (max-width:640px) {
    .catalog-pagination.premium-pagination { margin-top:20px; padding:10px; border-radius:15px; }
    .pagination-navigation { gap:4px; }
    .page-control { min-width:38px; padding:0 8px; }
    .page-control b { display:none; }
    .page-edge { display:none; }
    .page-number { min-width:34px; height:36px; padding:0 6px; }
    .page-ellipsis { width:18px; height:36px; }
    .pagination-jump { width:100%; justify-content:center; padding-left:8px; }
    .pagination-jump > label { display:none; }
}
@media (max-width:390px) {
    .pagination-pages .page-number:not(.is-current):nth-of-type(n+4) { display:none; }
}
@media (max-width:720px) {
    .catalog-masthead { padding:26px 20px; border-radius:22px; }
    .catalog-masthead h1 { font-size:34px; }
    .catalog-control-panel { margin:12px 0 0; border-radius:18px; }
    .catalog-global-form { grid-template-columns:1fr; }
    .catalog-search-field { grid-column:auto; }
    .catalog-section { padding:20px 15px; border-radius:22px; }
    .catalog-section-head { align-items:flex-start; }
    .collection-card-grid { grid-template-columns:1fr; }
    .collection-card { grid-template-columns:112px minmax(0,1fr); min-height:160px; }
    .collection-visual { min-height:160px; }
    .collection-content { padding:17px; }
    .catalog-resource-grid { grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
    .catalog-resource-body { padding:11px; }
    .resource-status-row { align-items:flex-start; flex-direction:column; }
    .type-chip { max-width:100%; }
    .resource-card-actions { align-items:flex-start; flex-direction:column; }
    .resource-card-actions form, .mini-request { width:100%; }
    .catalog-resource-grid.is-list .catalog-resource-card { grid-template-columns:90px minmax(0,1fr); }
}
@media (max-width:440px) {
    .catalog-resource-grid { grid-template-columns:1fr 1fr; }
    .catalog-resource-cover .cover-action { display:none; }
    .catalog-resource-body h3 { font-size:12px; }
    .catalog-resource-meta { display:none; }
    .catalog-resource-grid.is-list { grid-template-columns:1fr; }
}

/* Automatic catalog search / filter enhancement */
.catalog-global-form.auto-filter-ready {
    grid-template-columns:minmax(280px,1.65fr) minmax(200px,.85fr) minmax(200px,.85fr) auto;
}
.auto-filter-ready [data-auto-submit-fallback] { display:none !important; }
.catalog-control-panel.is-auto-updating::after,
.resource-filter-panel.is-auto-updating::after {
    content:"";
    position:absolute;
    z-index:20;
    top:0;
    left:14px;
    right:14px;
    height:3px;
    border-radius:0 0 999px 999px;
    background:linear-gradient(90deg,transparent,#2f80ed 24%,#175cd3 55%,#38a6e8 78%,transparent);
    transform-origin:left center;
    animation:autoFilterProgress .85s cubic-bezier(.2,.75,.2,1) infinite;
    pointer-events:none;
}
.catalog-control-panel.is-auto-updating .catalog-search-field,
.catalog-control-panel.is-auto-updating .compact-select select,
.resource-filter-panel.is-auto-updating .resource-filter-form select {
    opacity:.72;
    transition:opacity .16s ease;
}
.catalog-global-form.auto-filter-ready .catalog-search-field,
.catalog-global-form.auto-filter-ready .compact-select select,
.resource-filter-form.auto-filter-ready select {
    transition:border-color .2s ease,box-shadow .2s ease,background .2s ease,opacity .16s ease,transform .18s ease;
}
.catalog-global-form.auto-filter-ready .catalog-search-field:hover,
.catalog-global-form.auto-filter-ready .compact-select select:hover,
.resource-filter-form.auto-filter-ready select:hover {
    border-color:#abc8ee;
}
.resource-filter-form.auto-filter-ready .filter-reset { margin-top:2px; }
@keyframes autoFilterProgress {
    0% { opacity:.25; transform:scaleX(.08) translateX(-12%); }
    48% { opacity:1; transform:scaleX(.62) translateX(18%); }
    100% { opacity:.2; transform:scaleX(.12) translateX(720%); }
}

@media (max-width:1200px) {
    .catalog-global-form.auto-filter-ready { grid-template-columns:minmax(260px,1.5fr) 1fr 1fr auto; }
}
@media (max-width:900px) {
    .catalog-global-form.auto-filter-ready { grid-template-columns:1fr 1fr; }
    .catalog-global-form.auto-filter-ready .filter-reset { grid-column:1/-1; justify-content:flex-start; min-height:28px; }
}
@media (max-width:720px) {
    .catalog-global-form.auto-filter-ready { grid-template-columns:1fr; }
    .catalog-global-form.auto-filter-ready .catalog-search-field,
    .catalog-global-form.auto-filter-ready .filter-reset { grid-column:auto; }
}
@media (prefers-reduced-motion:reduce) {
    .catalog-control-panel.is-auto-updating::after,
    .resource-filter-panel.is-auto-updating::after { animation:none; opacity:1; transform:none; }
}

/* Phase 6 responsive hardening audit */
@media(max-width:420px){
  .catalog-masthead{padding:22px 15px}.catalog-masthead h1{font-size:30px}
  .catalog-section{padding:16px 10px}
  .catalog-resource-grid{grid-template-columns:1fr!important}
  .catalog-resource-cover{aspect-ratio:16/10}
  .collection-card{grid-template-columns:90px minmax(0,1fr);min-height:140px}.collection-visual{min-height:140px}.collection-content{padding:14px}
  .catalog-pagination.premium-pagination{padding:8px}.page-number{min-width:32px}
}

/* Compact add-to-cart action */
.resource-card-actions form[data-request-add-form] { position:relative; }
.cart-request-button { position:relative; width:34px; min-width:34px; height:34px; min-height:34px; padding:0; display:grid; place-items:center; overflow:visible; border:1px solid #c8dcf7; border-radius:11px; color:#1458c4; background:#eef5ff; box-shadow:none; transition:transform .18s ease,border-color .18s ease,background .18s ease,box-shadow .18s ease; }
.cart-request-button svg { position:absolute; width:17px; height:17px; fill:none; stroke:currentColor; stroke-width:1.9; stroke-linecap:round; stroke-linejoin:round; transition:transform .2s cubic-bezier(.2,.8,.2,1),opacity .16s ease; }
.cart-request-button .cart-button-check { opacity:0; transform:scale(.45); }
.cart-request-button:hover:not(:disabled) { transform:translateY(-2px); border-color:#9fc2ef; background:#e3efff; box-shadow:0 8px 18px rgba(23,92,211,.12); }
.cart-request-button:focus-visible { outline:3px solid rgba(23,92,211,.18); outline-offset:2px; }
.cart-request-button.is-loading { pointer-events:none; opacity:.68; }
.cart-request-button.is-loading .cart-button-icon { animation:cartButtonBusy .7s ease-in-out infinite alternate; }
.cart-request-button.is-added { color:#08774a; border-color:#a9dfc5; background:#eaf9f1; }
.cart-request-button.is-added .cart-button-icon { opacity:0; transform:scale(.45) rotate(-8deg); }
.cart-request-button.is-added .cart-button-check { opacity:1; transform:scale(1); }
.cart-request-button:disabled { color:#8d9bb0; border-color:#dde5ef; background:#f3f6fa; opacity:.75; }
@media(hover:hover) and (pointer:fine){
    .cart-request-button::after { content:attr(data-tooltip); position:absolute; right:0; bottom:calc(100% + 8px); z-index:8; width:max-content; max-width:150px; padding:7px 9px; border-radius:8px; color:#fff; background:#122b4d; box-shadow:0 8px 20px rgba(8,28,58,.18); font-size:9px; font-weight:850; line-height:1; opacity:0; transform:translateY(4px); pointer-events:none; transition:opacity .16s ease,transform .16s ease; }
    .cart-request-button:hover::after,.cart-request-button:focus-visible::after { opacity:1; transform:none; }
}
@keyframes cartButtonBusy { from{transform:translateX(-1px) rotate(-3deg)} to{transform:translateX(1px) rotate(3deg)} }
@media(max-width:720px){
    .resource-card-actions { align-items:center; flex-direction:row; }
    .resource-card-actions form[data-request-add-form] { width:auto; margin-left:auto; }
    .resource-card-actions .cart-request-button { width:36px; min-width:36px; height:36px; }
}
@media(prefers-reduced-motion:reduce){.cart-request-button,.cart-request-button svg{transition:none!important}.cart-request-button.is-loading .cart-button-icon{animation:none!important}}
