/* Small utilities for the catalogue and category browser. */
.lk-has-view-switch { flex-wrap: wrap; }
.lk-view-switch { display: inline-flex; flex: 0 0 auto; align-items: center; gap: 2px; padding: 2px; border: 1px solid #dce6ef; border-radius: 9px; background: #fff; }
.lk-view-button { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-width: 44px; min-height: 44px; padding: 10px 12px; border: 0; border-radius: 6px; background: transparent; color: #526780; font: inherit; font-size: 11px; line-height: 1.5; cursor: pointer; }
.lk-view-button svg { width: 17px; height: 17px; flex: 0 0 17px; }
.lk-view-button[aria-pressed="true"] { background: #edf3f8; color: #123f73; box-shadow: inset 0 0 0 1px #dce6ef; }
.lk-view-button:hover { color: #123f73; background: #f2f6fa; }
.lk-view-button:focus-visible, .lk-listing-enquiry:focus-visible, .lk-recent-clear:focus-visible, .lk-recent-product:focus-visible { outline: 3px solid #2674ae; outline-offset: 3px; }
.category-browser .browse-toolbar > p { margin-right: auto; }
.category-browser .browse-toolbar > a { order: 2; }
.category-browser .browse-toolbar .lk-view-switch { order: 1; }
.catalogue-page .catalogue-toolbar .catalogue-section-heading { margin-right: auto; }
.catalogue-page .catalogue-toolbar .lk-view-switch { order: 1; }
.catalogue-page .catalogue-toolbar .catalogue-filter { order: 2; }
.lk-listing-help { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin: 28px 0 0; padding: 22px; border: 1px solid #dce6ef; border-radius: 12px; background: #f1f6fa; }
.lk-listing-help > div { min-width: 0; }
.lk-listing-help h2, .lk-recent-heading h2 { margin: 0; color: #123f73; font-size: 18px; font-weight: 600; line-height: 1.4; letter-spacing: -.025em; }
.lk-listing-help p { margin: 7px 0 0; color: #526780; font-size: 12px; line-height: 1.7; overflow-wrap: anywhere; }
.lk-listing-enquiry { display: inline-flex; flex: 0 0 auto; align-items: center; justify-content: center; min-height: 44px; padding: 11px 15px; border: 1px solid #bcdcc9; border-radius: 8px; background: #edf8f1; color: #176a43; font-size: 12px; font-weight: 600; line-height: 1.5; text-decoration: none; }
.lk-listing-enquiry:hover { border-color: #95c9aa; background: #e3f3e9; }
.lk-recent-products { margin: 30px 0 0; }
.lk-recent-products[hidden] { display: none !important; }
.lk-recent-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 12px; }
.lk-recent-clear { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 8px 0 8px 12px; border: 0; border-radius: 6px; background: transparent; color: #526780; font: inherit; font-size: 11px; cursor: pointer; }
.lk-recent-clear:hover { color: #123f73; text-decoration: underline; text-underline-offset: 3px; }
.lk-recent-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.lk-recent-product { display: flex; align-items: center; gap: 10px; min-width: 0; padding: 10px; border: 1px solid #dce6ef; border-radius: 10px; background: #fff; color: #153958; text-decoration: none; }
.lk-recent-product:hover { border-color: #a9c0d5; }
.lk-recent-product > img { flex: 0 0 64px; width: 64px; height: 60px; object-fit: contain; border-radius: 6px; background: #f5f8fb; }
.lk-recent-product-copy { display: block; min-width: 0; }
.lk-recent-product-copy strong { display: -webkit-box; overflow: hidden; -webkit-line-clamp: 2; -webkit-box-orient: vertical; color: #153958; font-size: 11px; font-weight: 600; line-height: 1.5; }
.lk-recent-product-copy > span { display: block; overflow: hidden; margin-top: 5px; color: #65758a; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }

/* The mode changes only result cards, leaving the shared page widths and header alone. */
.lk-list-view .category-browser #categoryProducts .product-grid,
.lk-list-view .category-browser #categoryProducts .browse-group-grid,
.lk-list-view.catalogue-page .category-grid { grid-template-columns: minmax(0, 1fr) !important; gap: 12px !important; }
.lk-list-view .category-browser #categoryProducts .lk-listing-card { display: flex; flex-direction: column; align-items: stretch; min-width: 0; }
.lk-list-view .category-browser #categoryProducts .lk-listing-card > .lk-compare-card-shell { min-width: 0; }
.lk-list-view .category-browser #categoryProducts .product-card { display: grid !important; grid-template-columns: 100px minmax(0, 1fr) !important; grid-template-rows: repeat(4, auto) !important; align-content: center !important; align-items: center !important; column-gap: 18px !important; min-height: 132px !important; padding: 14px !important; }
.lk-list-view.category-browser-screen .category-browser #categoryProducts .product-card .catalog-image { grid-column: 1; grid-row: 1 / span 4; width: 100px !important; height: 100px !important; min-height: 100px !important; margin: 0 !important; }
.lk-list-view .category-browser #categoryProducts .product-card h3 { grid-column: 2; margin: 0 !important; padding-right: 0 !important; font-size: 16px !important; line-height: 1.45 !important; }
.lk-list-view .category-browser #categoryProducts .product-card > .lk-listing-code { display: block !important; grid-column: 2; margin-top: 4px; color: #65758a; font-size: 10px; line-height: 1.6; overflow-wrap: anywhere; }
.lk-list-view .category-browser #categoryProducts .product-card > p { display: -webkit-box !important; grid-column: 2; overflow: hidden !important; -webkit-line-clamp: 2; -webkit-box-orient: vertical; margin: 6px 0 !important; padding-right: 0; font-size: 12px !important; line-height: 1.6 !important; }
.lk-list-view .category-browser #categoryProducts .product-card > .product-meta { display: none !important; }
.lk-list-view.category-browser-screen .category-browser #categoryProducts .product-card > .card-footer { display: flex !important; grid-column: 2; min-height: 0 !important; margin: 0 !important; padding: 4px 0 0 !important; border: 0 !important; }
.lk-list-view .category-browser #categoryProducts .browse-group-card { display: grid; grid-template-columns: 120px minmax(0, 1fr); align-items: center; gap: 20px; padding: 14px; }
.lk-list-view .category-browser #categoryProducts .browse-group-media { width: 120px; height: 94px; padding: 10px; }
.lk-list-view .category-browser #categoryProducts .browse-group-copy { padding: 0; }
.lk-list-view .category-browser #categoryProducts .browse-group-copy h3 { margin: 0 0 6px; }
.lk-list-view .category-browser #categoryProducts .browse-group-link { margin-top: 12px; padding-top: 10px; }
.lk-list-view.catalogue-page .category-card { display: grid !important; grid-template-columns: 120px minmax(0, 1fr) 150px; align-items: center; gap: 22px; padding: 14px !important; }
.lk-list-view.catalogue-page .category-card .category-image { width: 120px; height: 96px; min-height: 0; margin: 0; }
.lk-list-view.catalogue-page .category-card .category-item-count { display: none; }
.lk-list-view.catalogue-page .category-card .category-info { padding: 0 !important; }
.lk-list-view.catalogue-page .category-card .category-info h3 { margin: 0 0 6px; }
.lk-list-view.catalogue-page .category-card .category-footer { margin: 0 !important; padding: 0 !important; border: 0; }

@media (max-width: 1100px) {
  .lk-recent-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 768px) {
  .lk-view-button { width: 44px; padding: 10px; }
  .lk-view-button > span { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
  .category-browser .browse-toolbar.lk-has-view-switch { gap: 10px; }
  .catalogue-page .catalogue-toolbar .catalogue-filter { flex: 1 0 100%; width: 100%; max-width: none; }
  .lk-listing-help { padding: 18px; gap: 14px; }
  .lk-listing-help h2, .lk-recent-heading h2 { font-size: 16px; }
  .lk-list-view .category-browser #categoryProducts .product-card { grid-template-columns: 76px minmax(0, 1fr) !important; column-gap: 12px !important; min-height: 110px !important; padding: 12px !important; }
  .lk-list-view.category-browser-screen .category-browser #categoryProducts .product-card .catalog-image { width: 76px !important; height: 80px !important; min-height: 80px !important; }
  .lk-list-view .category-browser #categoryProducts .product-card h3 { font-size: 13px !important; }
  .lk-list-view .category-browser #categoryProducts .product-card > p { display: none !important; }
  .lk-list-view.category-browser-screen .category-browser #categoryProducts .product-card > .card-footer { padding-top: 7px !important; }
  .lk-list-view .category-browser #categoryProducts .browse-group-card { grid-template-columns: 88px minmax(0, 1fr); gap: 14px; padding: 12px; }
  .lk-list-view .category-browser #categoryProducts .browse-group-media { width: 88px; height: 82px; }
  .lk-list-view .category-browser #categoryProducts .browse-group-copy p { display: none; }
  .lk-list-view .category-browser #categoryProducts .browse-group-copy h3 { font-size: 15px; }
  .lk-list-view .category-browser #categoryProducts .browse-group-link { margin-top: 8px; padding-top: 8px; }
  .lk-list-view.catalogue-page .category-card { grid-template-columns: 88px minmax(0, 1fr); gap: 14px; padding: 12px !important; }
  .lk-list-view.catalogue-page .category-card .category-image { width: 88px; height: 82px; }
  .lk-list-view.catalogue-page .category-card .category-info h3 { margin: 0; }
  .lk-list-view.catalogue-page .category-card .category-info p, .lk-list-view.catalogue-page .category-card .category-footer { display: none; }
}
@media (max-width: 480px) {
  .lk-listing-help { flex-direction: column; align-items: stretch; }
  .lk-listing-enquiry { align-self: flex-start; }
  .lk-recent-grid { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .lk-recent-product { padding: 8px 10px; }
  .lk-recent-product > img { width: 56px; height: 52px; flex-basis: 56px; }
  .lk-list-view .category-browser #categoryProducts .product-card { grid-template-columns: 64px minmax(0, 1fr) !important; min-height: 112px !important; }
  .lk-list-view.category-browser-screen .category-browser #categoryProducts .product-card .catalog-image { width: 64px !important; height: 76px !important; min-height: 76px !important; }
  .lk-list-view .category-browser #categoryProducts .product-card h3 { padding-right: 0 !important; }
}
@media (max-width: 360px) {
  .category-browser .browse-toolbar.lk-has-view-switch { flex-direction: row; align-items: center; }
  .category-browser .browse-toolbar.lk-has-view-switch > a { flex-basis: 100%; min-height: 24px; }
}
