/* Category browsing: independent overview cards and scoped legacy product styles. */
.category-browser-screen { background: #f7f9fc; }
.category-browser { display: grid; grid-template-columns: 244px minmax(0, 1fr); align-items: start; gap: 32px; width: min(1440px, calc(100% - 80px)); margin: 0 auto; padding: 28px 0 64px; color: #153958; }
.category-browser a:focus-visible, .category-browser button:focus-visible, .category-browser summary:focus-visible { outline: 3px solid #2674ae; outline-offset: 4px; }
.category-browser-sidebar { min-width: 0; padding: 20px 16px; border: 1px solid #dce6f0; border-radius: 14px; background: #fff; box-shadow: 0 6px 22px rgba(20, 50, 80, .035); }
.browse-sidebar-title { margin: 0 10px 18px; color: #123f73; font-size: 18px; font-weight: 700; line-height: 1.4; letter-spacing: -.025em; }
.category-browser-sidebar .sidebar-toggle { display: none; }
/* This nav is a vertical list, independent of the shared header navigation. */
.category-browser-sidebar #sidebarCategories { display: block; width: 100%; min-width: 0; max-width: 100%; }
.category-browser-sidebar #sidebarCategories > * { min-width: 0; max-width: 100%; }
.category-browser-sidebar #sidebarCategories a { white-space: normal; overflow-wrap: anywhere; }
.category-browser-sidebar [hidden] { display: none !important; }
.browse-category-row, .browse-type-row { display: flex; align-items: center; min-width: 0; border: 1px solid transparent; border-radius: 8px; }
.browse-category-row { margin-top: 2px; }
.browse-category-row:hover, .browse-type-row:hover { background: #f6f8fa; }
.browse-category-row.is-current, .browse-type-row.is-current { border-color: #dce6f0; background: #edf3f9; box-shadow: inset 3px 0 #20a563; }
#sidebarCategories .browse-category-row > .sidebar-category-link { display: flex !important; flex: 1; align-items: center; align-self: stretch; width: auto !important; min-width: 0; min-height: 40px; margin: 0 !important; padding: 9px 10px !important; border: 0 !important; border-radius: 7px; background: transparent !important; color: #526780 !important; font-size: 12px !important; font-weight: 500; line-height: 1.5; text-decoration: none; box-shadow: none; }
#sidebarCategories .browse-category-row > .sidebar-category-link.active { color: #123f73 !important; font-weight: 600; box-shadow: none; }
.category-browser-sidebar .browse-branch-toggle { display: inline-flex; flex: 0 0 34px; align-items: center; justify-content: center; width: 34px; min-height: 36px; padding: 8px; border: 0; border-radius: 7px; background: transparent; color: #65758a; font: inherit; cursor: pointer; }
.category-browser-sidebar .browse-branch-toggle:hover { background: #e5edf5; color: #123f73; }
.category-browser-sidebar .browse-branch-toggle svg { width: 14px; height: 14px; flex: 0 0 14px; pointer-events: none; }
.category-browser-sidebar .browse-branch-toggle[aria-expanded="true"] > svg { transform: rotate(90deg); }
.browse-category-item { min-width: 0; }
.browse-category-children { min-width: 0; margin: 5px 0 8px 10px; padding-left: 7px; border-left: 1px solid #dce6f0; }
.browse-type-link, .browse-subcategory-link { display: block; width: 100%; min-width: 0; padding: 8px 10px; border-radius: 7px; color: #526780; font-size: 11px; font-weight: 500; line-height: 1.5; text-decoration: none; white-space: normal; overflow-wrap: anywhere; }
.browse-type-row > .browse-type-link { flex: 1; width: auto; }
.browse-type-row.is-current > .browse-type-link { background: transparent; box-shadow: none; }
.browse-type-link:hover, .browse-subcategory-link:hover { background: #f3f6f9; color: #123f73; }
.browse-type-link.is-active, .browse-subcategory-link.is-active { background: #edf3f9; color: #123f73; font-weight: 600; box-shadow: inset 3px 0 #20a563; }
.browse-type-link.is-current-parent { color: #123f73; font-weight: 600; }
.browse-subcategory-list { min-width: 0; margin: 3px 0 7px; }
.browse-subgroup { margin: 2px 0; }
.category-browser-sidebar .browse-subgroup-toggle { display: flex; justify-content: space-between; gap: 6px; width: 100%; padding: 8px 10px; color: #526780; font-size: 10px; font-weight: 500; line-height: 1.5; text-align: left; }
.category-browser-sidebar .browse-subgroup-toggle[aria-expanded="true"] { color: #123f73; font-weight: 600; }
.browse-subgroup-toggle > span { min-width: 0; overflow-wrap: anywhere; }
.browse-subgroup-links { margin: 1px 0 5px 7px; border-left: 1px solid #e4ebf2; padding-left: 4px; }
.browse-subcategory-link { padding-left: 12px; font-size: 11px; }
.browse-help { margin-top: 22px; padding: 17px 14px; border: 1px solid #dce6f0; border-radius: 10px; background: #f3f6fa; }
.browse-help-kicker { color: #42627e; font-size: 9px; font-weight: 700; line-height: 1.6; letter-spacing: .13em; }
.browse-help h3 { margin: 8px 0; color: #123f73; font-size: 15px; font-weight: 700; line-height: 1.4; letter-spacing: -.025em; }
.browse-help p { color: #526780; font-size: 11px; line-height: 1.75; }
.browse-help a { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 44px; margin-top: 16px; padding: 10px 12px; border: 1px solid #c8e5d5; border-radius: 8px; background: #edf8f1; color: #167243; font-size: 11px; font-weight: 600; text-decoration: none; }
.browse-help a:hover { border-color: #97ccb0; background: #def0e5; }
.category-browser-content { min-width: 0; scroll-margin-top: 100px; }
.browse-breadcrumb { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 12px; min-width: 0; margin-bottom: 28px; color: #65758a; font-size: 12px; line-height: 1.6; }
.browse-breadcrumb a { color: #50647d; font-size: inherit; font-weight: 500; text-decoration: none; }
.browse-breadcrumb a:hover { color: #123f73; text-decoration: underline; }
.browse-breadcrumb #categoryBreadcrumb { display: contents; }
.browse-breadcrumb .breadcrumb-current { color: #65758a; font-size: inherit; font-weight: 400; }
.browse-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; padding-bottom: 26px; border-bottom: 1px solid #dfe7ef; }
.browse-heading > div { min-width: 0; max-width: 740px; }
.browse-eyebrow { display: flex; align-items: center; gap: 10px; color: #42627e; font-size: 10px; font-weight: 700; line-height: 1.5; letter-spacing: .14em; }
.browse-eyebrow::before { content: ""; width: 24px; height: 3px; flex: 0 0 24px; background: #20a563; }
.browse-heading h1 { margin: 12px 0 12px; color: #123f73; font-size: clamp(34px, 3.6vw, 52px); font-weight: 800; line-height: 1.12; letter-spacing: -.045em; }
.browse-heading p { color: #526780; font-size: 14px; line-height: 1.8; }
.browse-enquiry { display: inline-flex; align-items: center; justify-content: space-between; gap: 20px; flex: 0 0 auto; min-height: 44px; padding: 11px 15px; border: 1px solid #cbd9e7; border-radius: 9px; background: #fff; color: #245580; font-size: 12px; font-weight: 600; line-height: 1.5; text-decoration: none; }
.browse-enquiry:hover { border-color: #9bb8d2; background: #edf3f9; }
.browse-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 66px; padding: 15px 0; }
.browse-toolbar p { color: #65758a; font-size: 12px; line-height: 1.6; }
.browse-toolbar a { display: inline-flex; align-items: center; gap: 12px; min-height: 36px; color: #345b7d; font-size: 11px; font-weight: 500; text-decoration: none; }
.browse-toolbar a:hover { color: #1767b4; text-decoration: underline; text-underline-offset: 3px; }
.browse-group-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: stretch; gap: 20px; }
.browse-group-card { display: flex; min-width: 0; flex-direction: column; padding: 14px; border: 1px solid #dce6f0; border-radius: 14px; background: #fff; color: #123f73; text-decoration: none; transition: border-color 180ms ease, box-shadow 180ms ease; }
.browse-group-card:hover { border-color: #9eb9d2; box-shadow: 0 7px 20px rgba(20, 50, 80, .065); }
.browse-group-media { display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 1fr); place-items: center; height: 170px; overflow: hidden; padding: 18px; border-radius: 9px; background: #f3f6f9; }
.browse-group-media img { display: block; width: 100%; height: 100%; min-width: 0; min-height: 0; max-width: 100%; max-height: 100%; object-fit: contain; object-position: center; mix-blend-mode: multiply; }
.browse-group-copy { display: flex; flex: 1; min-width: 0; flex-direction: column; padding: 19px 5px 3px; }
.browse-group-copy h3 { margin: 0 0 9px; color: #123f73; font-size: 19px; font-weight: 700; line-height: 1.4; letter-spacing: -.025em; }
.browse-group-copy p { margin: 0 0 20px; color: #526780; font-size: 13px; line-height: 1.75; }
.browse-group-link { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-top: auto; padding: 14px 0 0; border-top: 1px solid #e9eef3; color: #345b7d; font-size: 11px; font-weight: 600; line-height: 1.6; }
.browse-group-link > span:first-child { min-width: 0; }
.browse-group-count { font-variant-numeric: tabular-nums; }
/* Image choices make each grouped range understandable before opening products. */
.browse-subcategories { display: grid; gap: 30px; }
.browse-subcategory-heading { margin: 0 0 14px; color: #123f73; font-size: 20px; font-weight: 600; line-height: 1.4; letter-spacing: -.02em; }
.browse-subcategory-heading:has(+ .browse-subcategory-description) { margin-bottom: 6px; }
.browse-subcategory-description { margin: 0 0 14px; color: #526780; font-size: 13px; line-height: 1.6; }
.browse-subcategories .browse-group-grid { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
.browse-subcategories .browse-group-card { padding: 12px; }
.category-browser .browse-subcategories .browse-group-media { height: 140px; padding: 14px; }
.browse-subcategories .browse-group-copy { padding: 14px 3px 2px; }
.browse-subcategories .browse-group-copy h3 { font-size: 17px; }
.browse-subcategories .browse-group-copy p { margin-bottom: 14px; font-size: 12px; line-height: 1.65; }
.browse-subcategories .browse-group-link { font-size: 11px; }
.category-browser .empty-state, .browse-noscript { padding: 26px; border: 1px solid #dce6f0; border-radius: 14px; background: #fff; color: #526780; font-size: 14px; line-height: 1.8; }
.category-browser .empty-state h3 { margin-bottom: 9px; color: #123f73; font-size: 22px; }
/* Shared product cards across every category and viewport.
   Scoped overrides replace legacy fixed heights and hidden mobile details. */
  .category-browser #categoryProducts .product-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
  .category-browser #categoryProducts .product-card { display: flex !important; flex-direction: column; align-items: stretch !important; justify-content: flex-start !important; text-align: left !important; min-width: 0; width: 100%; height: auto !important; max-height: none !important; min-height: 0 !important; row-gap: 0 !important; padding: 14px !important; border-color: #dce6f0; border-radius: 14px; box-shadow: none; transform: none; transition: border-color 180ms ease, box-shadow 180ms ease; }
  .category-browser #categoryProducts .product-card:hover { border-color: #9eb9d2; box-shadow: 0 7px 20px rgba(20, 50, 80, .065); transform: none; }
  .category-browser #categoryProducts .product-card .catalog-image { display: grid !important; grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 1fr); place-items: center; height: 170px !important; min-height: 170px !important; padding: 0 !important; margin: 0 0 19px !important; border-radius: 9px; background: #f3f6f9; background-image: none; }
  .category-browser #categoryProducts .product-card .catalog-image img { width: 100% !important; height: 100% !important; min-width: 0; min-height: 0; max-width: 100% !important; max-height: 100% !important; object-fit: contain; object-position: center; mix-blend-mode: multiply; }
  .category-browser #categoryProducts .product-card h3 { display: block !important; width: auto !important; height: auto !important; min-height: 0 !important; max-height: none !important; margin: 0 5px 9px !important; padding: 0 !important; overflow: visible !important; text-align: left !important; -webkit-line-clamp: unset !important; color: #123f73; font-size: 19px !important; font-weight: 700; line-height: 1.4 !important; letter-spacing: -.025em; }
  .category-browser #categoryProducts .product-card p { display: block !important; min-height: 0 !important; max-height: none !important; margin: 0 5px 18px; overflow: visible; color: #526780; font-size: 13px !important; line-height: 1.75 !important; }
  /* Anchor metadata above the footer; descriptions can wrap without moving it. */
  .category-browser #categoryProducts .product-card > .product-meta { display: flex !important; align-self: stretch !important; align-items: flex-start !important; min-width: 0; min-height: 0 !important; margin: auto 5px 18px !important; text-align: left; transform: none; }
  .category-browser #categoryProducts .product-card > .product-meta.product-meta-empty { display: none !important; }
  .category-browser #categoryProducts .product-card .product-meta > .product-origin:not(.product-origin-empty),
  .category-browser #categoryProducts .product-card .product-meta > .product-options:not(.product-options-empty),
  .category-browser #categoryProducts .product-card .product-meta > .product-colours:not(.product-colours-empty) { display: block !important; position: static !important; min-width: 0; margin: 0 !important; }
  .category-browser #categoryProducts .product-card .option-list span,
  .category-browser #categoryProducts .product-card .product-origin span { max-width: 100%; white-space: normal !important; overflow-wrap: anywhere; }
  .category-browser #categoryProducts .product-card .option-list,
  .category-browser #categoryProducts .product-card .colour-list { justify-content: flex-start; text-align: left; }
  .category-browser #categoryProducts .product-card > .card-footer { display: flex !important; align-items: center; gap: 14px; min-height: 40px; margin: auto 5px 0; padding: 13px 0 0; border-top: 1px solid #e9eef3; }
  .category-browser #categoryProducts .product-card > .product-meta:not(.product-meta-empty) + .card-footer { margin-top: 0; }
  .category-browser #categoryProducts .product-card .card-footer > span { color: #345b7d; font-size: 11px; font-weight: 600; line-height: 1.6; }
  .category-browser #categoryProducts .product-card .card-arrow { width: 26px; height: 26px; box-shadow: none; }
  .category-browser #categoryProducts .product-card .product-origin small,
  .category-browser #categoryProducts .product-card .product-options small,
  .category-browser #categoryProducts .product-card .product-colours small { display: block !important; color: #65758a; font-size: 10px; }
  .category-browser #categoryProducts .product-card .catalogue-badge { padding: 7px 10px; border-radius: 7px; font-size: 10px; }
  .category-browser .card-action-compact { display: none; }

.category-browser #categoryProducts .product-card.catalogue-card-featured .catalog-image img { mix-blend-mode: normal; }
@media (min-width: 1051px) and (min-height: 820px) {
  .category-browser-sidebar { position: sticky; top: 24px; max-height: calc(100dvh - 48px); overflow-y: auto; }
}
@media (max-width: 1100px) {
  .category-browser { grid-template-columns: 218px minmax(0, 1fr); gap: 24px; }
  .browse-group-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
  .browse-heading { align-items: flex-start; flex-direction: column; gap: 18px; }
}
@media (min-width: 769px) and (max-width: 1100px) {
  .category-browser #categoryProducts .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
}
@media (max-width: 900px) {
  .category-browser { width: calc(100% - 40px); grid-template-columns: 200px minmax(0, 1fr); gap: 22px; padding-top: 22px; }
  .category-browser-sidebar { padding: 18px 12px; }
  .browse-sidebar-title { font-size: 17px; }
  .browse-group-media { height: 150px; padding: 16px; }
  .browse-group-card { padding: 12px; }
  .browse-group-copy h3 { font-size: 18px; }
}
@media (max-width: 768px) {
  .browse-subcategories { gap: 24px; }
  .browse-subcategory-heading { margin-bottom: 12px; font-size: 18px; }
  .browse-subcategories .browse-group-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .browse-subcategories .browse-group-card { padding: 10px; }
  .category-browser .browse-subcategories .browse-group-media { height: 112px; padding: 10px; }
  .browse-subcategories .browse-group-copy { padding: 12px 2px 2px; }
  .browse-subcategories .browse-group-copy h3 { margin-bottom: 10px; font-size: 14px; overflow-wrap: anywhere; }
  .browse-subcategories .browse-group-copy p { display: none; }
  .browse-subcategories .browse-group-link { gap: 6px; padding-top: 10px; font-size: 10px; }
  .category-browser #categoryProducts .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 10px !important; }
  .category-browser #categoryProducts .product-card { padding: 10px !important; border-radius: 12px !important; }
  .category-browser-screen .category-browser #categoryProducts .product-card .catalog-image { height: 138px !important; min-height: 138px !important; margin-bottom: 12px !important; }
  .category-browser #categoryProducts .product-card h3 { margin: 0 2px 10px !important; font-size: 14px !important; line-height: 1.4 !important; overflow-wrap: anywhere; }
  /* Mobile browsing shows the essentials; specifications and options stay on the product page. */
  .category-browser #categoryProducts .product-card > p,
  .category-browser #categoryProducts .product-card > .product-meta { display: none !important; }
  .category-browser-screen .category-browser #categoryProducts .product-card > .card-footer { gap: 8px; min-height: 40px; margin: auto 2px 0 !important; padding-top: 10px; }
  .category-browser #categoryProducts .product-card .card-footer > span { font-size: 11px; }
  .category-browser .card-action-full { display: none; }
  .category-browser .card-action-compact { display: inline; }
  .category-browser #categoryProducts .product-card .card-arrow { flex: 0 0 22px; width: 22px; height: 22px; }
  .browse-type-link, .browse-subcategory-link { min-height: 42px; padding-top: 10px; padding-bottom: 10px; font-size: 12px; }
  #sidebarCategories .browse-category-row > .sidebar-category-link { min-height: 44px; font-size: 13px !important; }
  .category-browser-sidebar .browse-branch-toggle { min-height: 44px; }
  .category-browser-sidebar .browse-branch-toggle:not(.browse-subgroup-toggle) { flex-basis: 44px; width: 44px; }
  .category-browser-sidebar .browse-subgroup-toggle { font-size: 11px; }
  .category-browser { display: grid; grid-template-columns: minmax(0, 1fr); width: calc(100% - 32px); gap: 8px; padding: 10px 0 40px; }
  .category-browser-sidebar { border: 0; border-radius: 0; }
  .category-browser-sidebar .browse-sidebar-title { display: none; }
  .category-browser-sidebar .sidebar-toggle { border: 1px solid #dce6f0; font: inherit; line-height: 1.5; text-align: left; }
  .category-browser-sidebar .sidebar-toggle .toggle-icon svg { width: 18px; height: 18px; }
  .browse-menu-chevron { margin-left: auto; color: #65758a; font-size: 18px; }
  .category-browser-sidebar.open .browse-menu-chevron { transform: rotate(180deg); }
  .category-browser-sidebar .browse-help { margin-top: 14px; }
  .category-browser-sidebar.open #sidebarCategories { max-height: min(62dvh, 560px); overflow-y: auto; overscroll-behavior: contain; scrollbar-gutter: stable; }
  .browse-breadcrumb { gap: 6px 8px; margin: 0 0 12px; font-size: 11px; }
  .browse-heading { gap: 6px; padding-bottom: 12px; }
  .browse-eyebrow { margin-bottom: 8px; font-size: 9px; letter-spacing: .12em; }
  .browse-heading h1 { margin: 0 0 7px; font-size: clamp(28px, 7.4vw, 36px); }
  .browse-heading p { font-size: 12px; line-height: 1.65; }
  .browse-enquiry { min-height: 44px; gap: 8px; padding: 5px 0; border: 0; border-radius: 0; background: transparent; font-size: 11px; }
  .browse-toolbar { min-height: 54px; padding: 8px 0; }
  .category-browser .browse-toolbar > a { display: none; }
  .browse-toolbar p, .browse-toolbar a { font-size: 11px; }
  .browse-subcategory-description { margin-bottom: 12px; font-size: 12px; }
  .browse-group-grid { gap: 12px; }
  .browse-group-media { height: 135px; padding: 12px; }
  .browse-group-copy { padding: 16px 3px 2px; }
  .browse-group-copy h3 { font-size: 17px; }
  .browse-group-copy p { margin-bottom: 18px; font-size: 12px; line-height: 1.7; }
  .browse-group-link { padding-top: 12px; font-size: 10px; }
}
@media (max-width: 420px) {
  .category-browser-screen .category-browser #categoryProducts .product-card .catalog-image { height: 120px !important; min-height: 120px !important; }
  .browse-group-card { padding: 10px; border-radius: 12px; }
  .browse-group-media { height: 118px; padding: 10px; border-radius: 8px; }
  .browse-group-copy h3 { font-size: 16px; }
  .browse-group-copy p { font-size: 11px; }
}
@media (max-width: 360px) {
  .category-browser-screen .category-browser #categoryProducts .product-card .catalog-image { height: 108px !important; min-height: 108px !important; }
  .browse-group-grid { grid-template-columns: minmax(0, 1fr); }
  .browse-group-media { height: 160px; }
  .browse-toolbar { align-items: flex-start; flex-direction: column; gap: 4px; padding: 8px 0; }
}
@media (prefers-reduced-motion: reduce) {
  .category-browser a, .category-browser button, .category-browser summary, .category-browser .card-arrow { transition: none; }
}
