/* Room filter under the Sort By toolbar on the BIM Object listing
   (Magento_Catalog::category/room-filter.phtml), and spacing for the categories bar
   running full width under the page title. Theme colours: royal blue #0030b8,
   navy #0a1f6e, orange #e85d00. */
.page-products .subcategory-slider-section { margin-bottom: 28px; }

.room-bar {
    --room-blue: #0030b8;
    --room-navy: #0a1f6e;
    --room-ink: #16203a;
    --room-soft: #4d5872;
    --room-ground: #f2f4fa;
    --room-tile: #ffffff;
    margin: 4px 0 28px;
    padding: 20px;
    border-radius: 14px;
    background: var(--room-ground);
    color: var(--room-ink);
}
.room-bar__head {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 4px 16px;
    margin-bottom: 16px;
}
.room-bar .room-bar__title {
    margin: 0;
    color: var(--room-navy);
    font-size: 19px;
    font-weight: 700;
    line-height: 1.25;
    letter-spacing: -.01em;
    text-transform: none;
}
.room-bar__note { margin: 0; color: var(--room-soft); font-size: 14px; line-height: 1.5; }
.room-bar__clear,
.room-bar__clear:visited { margin-left: 4px; color: var(--room-blue); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.room-bar__clear:hover { color: var(--room-navy); }

.room-bar__list {
    display: flex;
    gap: 10px;
    margin: 0;
    padding: 0;
    list-style: none;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-snap-type: x proximity;
    scrollbar-width: none;
}
.room-bar__list::-webkit-scrollbar { display: none; }
.room-bar__list > li { flex: 0 0 120px; margin: 0; scroll-snap-align: start; }
.room-bar__room,
.room-bar__room:visited {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    height: 100%;
    min-height: 92px;
    padding: 14px;
    box-sizing: border-box;
    border-radius: 10px;
    background: var(--room-tile);
    color: var(--room-ink);
    text-decoration: none;
    transition: background-color .18s ease, color .18s ease, transform .18s ease;
}
.room-bar__room:hover { background: #e3e9fb; color: var(--room-navy); text-decoration: none; }
.room-bar__room:active { transform: scale(.97); }
.room-bar__room:focus-visible { outline: 3px solid #e85d00; outline-offset: 2px; }
.room-bar__room.is-active,
.room-bar__room.is-active:hover { background: var(--room-blue); color: #fff; }
.room-bar__room.is-empty { color: #8a93a8; cursor: default; }
.room-bar__room.is-empty:hover { background: var(--room-tile); color: #8a93a8; }
.room-bar__icon {
    width: 26px;
    height: 26px;
    fill: none;
    stroke: var(--room-blue);
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.room-bar__room.is-active .room-bar__icon { stroke: #fff; }
.room-bar__room.is-empty .room-bar__icon { stroke: currentColor; }
.room-bar__label { font-size: 14px; font-weight: 600; line-height: 1.25; }
.room-bar__count {
    position: absolute;
    top: 12px;
    right: 12px;
    color: var(--room-soft);
    font-size: 13px;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}
.room-bar__room.is-active .room-bar__count { color: #d6defa; }

@media (prefers-reduced-motion: reduce) {
    .room-bar__room { transition: none; }
}
@media (max-width: 767px) {
    .room-bar { padding: 16px 0 16px 16px; border-radius: 12px; }
    .room-bar__head { padding-right: 16px; }
    .room-bar .room-bar__title { font-size: 18px; }
    .room-bar__list { gap: 8px; padding-right: 16px; }
    .room-bar__list > li { flex-basis: 104px; }
}

/* Categories: one row that scrolls sideways instead of opening a second line
   (overrides the theme's wrapping track in custom.less). */
.subcategory-slider-section .cat-slider-track,
.subcategory-slider-section .cat-slider-track.expanded {
    flex-wrap: nowrap !important;
    max-height: none !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    overscroll-behavior-x: contain;
    scroll-snap-type: x proximity;
    scrollbar-width: none;
}
.subcategory-slider-section .cat-slider-track::-webkit-scrollbar { display: none; }
.subcategory-slider-section .cat-pill { scroll-snap-align: start; }

/* Arrows shared by both strips */
.hscroll-nav { display: inline-flex; gap: 6px; margin-left: auto; }
.hscroll-nav[hidden] { display: none; }
.cat-slider-header .view-all-link { margin-left: auto; }
.cat-slider-header .view-all-link + .hscroll-nav { margin-left: 8px; }
button.hscroll-btn {
    display: inline-grid !important;
    place-items: center;
    width: 32px !important;
    height: 32px !important;
    min-width: 0 !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 1.5px solid #dfe3ec !important;
    border-radius: 50% !important;
    background: #fff !important;
    box-shadow: none !important;
    color: #0a1f6e !important;
    line-height: 1 !important;
    cursor: pointer;
    transition: border-color .18s ease, color .18s ease, transform .18s ease;
}
button.hscroll-btn svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
button.hscroll-btn:hover:not(:disabled) { border-color: #0030b8 !important; color: #0030b8 !important; }
.subcategory-slider-section button.hscroll-btn:hover:not(:disabled) { border-color: #e85d00 !important; color: #e85d00 !important; }
button.hscroll-btn:active:not(:disabled) { transform: scale(.92); }
button.hscroll-btn:disabled { opacity: .35; cursor: default; }
button.hscroll-btn:focus-visible { outline: 3px solid #e85d00; outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) {
    button.hscroll-btn { transition: none; }
}
