.catalog-heading { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.catalog-heading > div { min-width: 0; }
.catalog-heading p { margin: 0; }
.eyebrow { margin: 0; color: #597385; font-size: 13px; letter-spacing: .05em; text-transform: uppercase; }
.result-count { color: #536977; font-variant-numeric: tabular-nums; white-space: nowrap; }
.sort-link { display: inline-block; padding: 4px 0; color: inherit; text-underline-offset: 3px; }
.sort-link[data-direction="ascending"]::after { content: " ↑"; }
.sort-link[data-direction="descending"]::after { content: " ↓"; }
.list-context { display: flex; flex-wrap: wrap; gap: 8px 20px; margin: 16px 0 10px; color: #536977; font-size: 14px; }
.list-context span + span::before { margin-right: 20px; color: #9aaeb9; content: "·"; }
.item-results { overflow-x: auto; border-top: 1px solid #aabec9; border-bottom: 1px solid #aabec9; background: #fff; }
.item-results table { table-layout: fixed; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 11px 10px; border-bottom: 1px solid #d6e0e5; text-align: left; vertical-align: middle; }
th { color: #294a60; background: #edf4f7; font-size: 14px; font-weight: bold; white-space: nowrap; }
tr:nth-child(even) { background: #f8fafb; }
.item-results th:first-child { width: 46%; }
.item-results th:not(:first-child) { width: 18%; text-align: right; white-space: normal; }
.item-results tbody tr:last-child td { border-bottom: 0; }
.item-results tbody tr:hover, .item-results tbody tr:focus-within { background: #eef5f8; }
.item-link { display: inline-flex; align-items: center; gap: 10px; min-width: 0; max-width: 100%; line-height: 1.35; text-decoration: none; }
.item-link:hover > span:last-child { text-decoration: underline; text-underline-offset: 3px; }
.item-cell { display: flex; align-items: center; min-width: 0; }
.item-link > span:last-child { min-width: 0; overflow-wrap: anywhere; }
.item-icon-frame { display: inline-flex; flex: 0 0 40px; align-items: center; justify-content: center; width: 40px; height: 40px; border: 1px solid #c4d1d8; border-radius: 3px; background: #fff; }
.item-icon { width: auto; height: auto; max-width: 36px; max-height: 36px; image-rendering: pixelated; object-fit: contain; }
small { display: block; color: #607582; font-size: 12px; }
.item-results .price-cell { text-align: right; }
.price { color: #203f54; font-size: 17px; font-weight: bold; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.price-cell .price { display: block; }
.price-unknown { color: #536977; font-size: 16px; font-weight: normal; }
.price-samples { margin-top: 3px; line-height: 1.35; }
.price-meta { display: flex; justify-content: flex-end; align-items: baseline; flex-wrap: wrap; gap: 3px 8px; margin-top: 3px; }
.price-meta .price-samples { margin-top: 0; }
.price-evidence { display: inline-flex; align-items: center; gap: 5px; max-width: 100%; color: #526977; font-size: 12px; font-weight: normal; line-height: 1.4; overflow-wrap: anywhere; }
.price-evidence-dot { flex: 0 0 5px; width: 5px; height: 5px; border-radius: 50%; background: #8799a5; }
.price-evidence-single .price-evidence-dot { background: #96702d; }
.price-evidence-multiple .price-evidence-dot { background: #39789a; }
.price-evidence-multiple { color: #32637f; }
.empty-state { padding: 14px; border-left: 3px solid #9bb1bd; background: #f4f8fa; }
.pagination { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 6px; margin: 16px 0; font-size: 14px; font-variant-numeric: tabular-nums; }
.pagination a, .pagination .current-page { display: inline-flex; align-items: center; justify-content: center; min-width: 32px; height: 32px; padding: 5px 9px; border: 1px solid #b6c7d1; border-radius: 3px; background: #fff; line-height: 20px; text-decoration: none; }
.pagination .current-page { border-color: #426f8a; background: #426f8a; color: #fff; }
.results-toolbar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin: 48px 0 12px; }
.catalog-filter-area:has(> .clear-search) + .results-toolbar { margin-top: 60px; }
.results-toolbar p, .results-toolbar .pagination { margin: 0; }
.catalog-note { max-width: 760px; font-size: 14px; line-height: 1.45; }
@media (max-width: 650px) {
  .catalog-heading { align-items: flex-start; }
  .list-context { gap: 5px 10px; }
  .list-context span + span::before { margin-right: 10px; }
  .item-results { margin-left: -2px; margin-right: -2px; overflow-x: visible; }
  .item-results table, .item-results tbody, .item-results tr, .item-results td { display: block; width: 100%; }
  .item-results thead { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
  .item-results tbody tr { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); padding: 9px 8px; border-bottom: 1px solid #d6e0e5; }
  .item-results td { padding: 6px 4px; border: 0; }
  .item-results td:first-child { grid-column: 1 / -1; }
  .item-results td:not(:first-child) { min-width: 0; text-align: right; white-space: normal; }
  .item-results td:not(:first-child)::before { display: block; margin-bottom: 3px; color: #536977; font-size: 12px; content: attr(data-label); }
  .item-link { min-width: 0; }
  .item-results .price { font-size: clamp(11px, 3.3vw, 14px); white-space: nowrap; }
}
.item-group-expansion > td { padding: 0 0 8px; }
.item-group-expansion summary { padding: 6px 10px; color: #245b7a; cursor: pointer; font-size: 13px; }
.item-group-expansion table { margin-top: 6px; border: 1px solid #d6e0e5; }
.item-group-expansion col:first-child { width: 46%; }
.item-group-expansion col:not(:first-child) { width: 18%; }
@media (max-width: 650px) {
  .item-results tbody tr.item-group-expansion { display: block; padding: 0 12px 8px; }
  .item-group-expansion > td { padding: 0; }
}

/* Catalog filters share the detail page's quiet, single surface. */
.item-search {
  position: relative; display: grid; gap: 18px; width: 100%; margin: 0;
  padding: 20px; border: 1px solid #dce4e9; border-radius: 12px;
  background: #fff; cursor: pointer;
}
.item-search label, .item-search legend {
  display: block; margin: 0 0 6px; padding: 0; color: #597080;
  font-size: 12px; font-weight: 600; line-height: 18px;
}
.item-search input, .item-search select { font-size: 14px; }
.item-search input[type="search"], .item-search input[type="number"], .item-search select {
  height: 42px; min-height: 42px; padding: 10px 12px; line-height: 20px;
  border: 1px solid #c6d3dc; border-radius: 6px; background: #fff; color: #243746;
}
.item-search input[type="search"] { width: 100%; min-width: 0; }
.item-search input[type="number"], .item-search select { field-sizing: content; width: auto; max-width: 100%; }
.item-search input::placeholder { color: #7b8c98; }
.item-search input[type="submit"] {
  height: 42px; padding: 10px 18px; border: 1px solid #285e7a; border-radius: 6px;
  background: #285e7a; color: #fff; font-size: 14px; font-weight: 600; line-height: 20px;
}
.item-search input[type="submit"]:hover { border-color: #204d65; background: #204d65; }
.catalog-primary { display: flex; flex-wrap: wrap; align-items: end; gap: 16px; }
.catalog-query { flex: 1 1 20rem; min-width: 0; }
.catalog-search-submit { flex: none; }
.item-search #type { min-width: 8rem; max-width: 18rem; }
.item-search #sort { min-width: 7.5rem; }
.catalog-secondary { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 18px 24px; }
.catalog-view-row { display: flex; flex-wrap: wrap; align-items: end; justify-content: flex-end; gap: 16px; max-width: 100%; }
.catalog-view-options, .advanced-affixes-group { padding: 0; margin: 0; border: 0; min-width: 0; }
.catalog-view-options { max-width: 100%; }
.catalog-view-options > div { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 4px 20px; }
.item-search .catalog-view-options label {
  display: inline-flex; align-items: center; gap: 8px; min-height: 42px; margin: 0;
  color: #385060; font-size: 13px; font-weight: 400; cursor: pointer;
}
.catalog-view-options input[type="checkbox"] { width: 16px; height: 16px; margin: 0; accent-color: #285e7a; }
.item-search .catalog-view-options label:has(input:disabled) { color: #7d8a93; cursor: not-allowed; }
.catalog-filter-area { position: relative; }
.catalog-filter-area > .clear-search { position: absolute; top: 100%; right: 0; display: inline-flex; align-items: center; min-height: 24px; color: #597080; font-size: 12px; text-underline-offset: 3px; }
.catalog-filter-area > .clear-search:focus-visible { outline: 2px solid #285e7a; outline-offset: 3px; }
.catalog-advanced-filters { min-width: 0; }
.catalog-advanced-filters:not([open]) { position: absolute; width: 0; height: 0; }
.item-search:has(.catalog-advanced-filters > summary:focus-visible) { outline: 2px solid #285e7a; outline-offset: 3px; }
.item-search :is(input, select, a, summary):focus-visible { outline: 2px solid #285e7a; outline-offset: 3px; }
.catalog-property-filters, .advanced-options-grid, .advanced-affixes-group > div {
  display: flex; flex-wrap: wrap; align-items: end; gap: 14px 16px;
}
.catalog-property-filters { min-width: 0; max-width: 100%; }
.advanced-options-grid { border-top: 1px solid #e8edf0; padding-top: 18px; }
.catalog-property-filters > div, .advanced-options-grid > div { min-width: 0; max-width: 100%; }
.item-search #max_price { min-width: 7.5rem; max-width: 12rem; }
.item-search #max_level { min-width: 6.5rem; max-width: 8.5rem; }
.item-search #job { min-width: 9rem; max-width: 22rem; }
.item-search #location { min-width: 8rem; max-width: 22rem; }
.catalog-secondary > .catalog-view-row { margin-left: auto; }
.item-search :is(select, input):disabled { background: #f4f6f8; color: #7d8a93; cursor: not-allowed; }
.item-search #enchantment { min-width: 14rem; max-width: 22rem; }
.item-search .advanced-affixes-group { max-width: 100%; }
.item-search .advanced-affixes-group select { min-width: 10.5rem; max-width: 22rem; }
.catalog-advanced-filters:not([open]) > :not(summary) { display: none; }
@media (max-width: 1100px) {
  .catalog-primary { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 16px; }
  .catalog-query { grid-column: 1; grid-row: 1; }
  .catalog-search-submit { grid-column: 2; grid-row: 1; }
  .catalog-primary > .catalog-sort { grid-column: 3; grid-row: 1; }
}
@media (max-width: 750px) {
  .item-search { padding: 16px; gap: 16px; }
  .item-search input, .item-search select { font-size: 16px; }
  .catalog-primary { grid-template-columns: minmax(0, 1fr) auto; gap: 16px 8px; }
  .catalog-primary > .catalog-sort { grid-column: 2; grid-row: 2; justify-self: end; }
  .item-search :is(#job, #location, #enchantment) { min-width: min(12rem, 100%); }
}
@media (max-width: 480px) {
  .item-search { padding: 14px; }
  .item-search :is(#type, #sort) { min-width: 0; width: 100%; max-width: none; }
  .catalog-view-row { flex-wrap: nowrap; align-items: start; width: 100%; }
  .catalog-sort { flex: 0 0 6rem; }
  .catalog-view-options { flex: 1 1 0; }
  .catalog-view-options > div { gap: 0 12px; }
  .item-search .catalog-view-options label { min-height: 40px; font-size: 12px; gap: 6px; }
  .catalog-filter-area > .clear-search { min-height: 40px; }
  .catalog-filter-area:has(> .clear-search) + .results-toolbar { margin-top: 64px; }
  .catalog-secondary { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 12px; }
  .catalog-secondary > .catalog-view-row { grid-column: 1 / -1; }
  .catalog-property-filters { display: contents; }
  .item-search :is(#type, #max_price, #max_level, #job, #location) { width: 100%; min-width: 0; max-width: none; }
  .advanced-options-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; padding-top: 16px; }
  .item-search #enchantment { min-width: 0; width: 100%; max-width: none; }
  .advanced-affixes-group > div { gap: 8px; }
  .item-search .advanced-affixes-group select { flex: 1 1 auto; min-width: 4.5rem; width: auto; max-width: 100%; }
}
