/**
 * Bristle Up Categories — the computer mega menu (1.38.0, WO-044). Loaded ONLY when a menu choice differs from the
 * default (B7); every rule keys on a body class Bristle_Cats_Mega_Menu::body_classes() prints, so on a default page it
 * would do nothing even if it loaded:
 *   bcm-bar                                  any bar choice not the default
 *   bcm-style-{tabs|boxes|pills}             B1        bcm-theme-{red|sand|olive|tactical|thermal|nv|custom}   B2
 *   bcm-size-{s|l} bcm-space-{tight|roomy}   B3        bcm-width-full bcm-place-{centre|spread}               B4
 *   bcm-fit-{more|tighten|wrap}              B5        bcm-panels-full (P8)      bcm-layouts (any layout not Classic)
 * A theme's colours arrive as --bcm-bg/-ink/-acc/-acc-ink/-panel on body.bcm-bar (inline, from fixed or sanitised hex).
 * frontend.css is protected and unchanged; these rules override its values (L396-436, L471-484).
 */

/* ============================================================ B4 · width and placement */
body.bcm-width-full .bristle-cats-desktop-inner { max-width: none; padding: 0 24px; }
body.bcm-place-centre .bristle-cats-bar { justify-content: center; }
body.bcm-place-spread .bristle-cats-bar { justify-content: space-between; }

/* ============================================================ B3 · size and spacing */
body.bcm-size-s .bristle-cats-bar-link { font-size: 12.5px; }
body.bcm-size-l .bristle-cats-bar-link { font-size: 16px; }
body.bcm-space-tight .bristle-cats-bar-link { padding-left: 10px; padding-right: 10px; }
body.bcm-space-roomy .bristle-cats-bar-link { padding-left: 26px; padding-right: 26px; }
/* Tighten, then More (B5): step 1 = Tight spacing, step 2 = Small text as well. */
body.bcm-fit-tighten .bcm-fit-step-1 .bristle-cats-bar-link,
body.bcm-fit-tighten .bcm-fit-step-2 .bristle-cats-bar-link { padding-left: 10px; padding-right: 10px; }
body.bcm-fit-tighten .bcm-fit-step-2 .bristle-cats-bar-link { font-size: 12.5px; }

/* ============================================================ B2 · themes (the bar; the panel's highlight) */
body.bcm-bar[class*="bcm-theme-"] .bristle-cats-desktop { background: var(--bcm-bg); color: var(--bcm-ink); border-color: transparent; }
body.bcm-bar[class*="bcm-theme-"] .bristle-cats-bar-link,
body.bcm-bar[class*="bcm-theme-"] .bristle-cats-bar-item.is-featured > .bristle-cats-bar-link { color: var(--bcm-ink); }
body.bcm-bar[class*="bcm-theme-"] .bristle-cats-bar-link:hover,
body.bcm-bar[class*="bcm-theme-"] .bristle-cats-bar-item.is-open > .bristle-cats-bar-link { color: var(--bcm-acc); border-bottom-color: var(--bcm-acc); }
body.bcm-theme-thermal .bristle-cats-bar-link:hover,
body.bcm-theme-thermal .bristle-cats-bar-item.is-open > .bristle-cats-bar-link { color: #fff; border-image: linear-gradient(90deg, #ffd000, #ff5a1f, #b400ff) 1; }
body.bcm-bar[class*="bcm-theme-"] .bristle-cats-panel-col-header { border-bottom-color: var(--bcm-panel); }
body.bcm-bar[class*="bcm-theme-"] #bristle-cats-desktop .bristle-cats-panel-close { background: var(--bcm-panel); }
body.bcm-bar[class*="bcm-theme-"] .bcm-panel .bcm-all,
body.bcm-bar[class*="bcm-theme-"] .bcm-panel .bcm-left-link.is-lit { color: var(--bcm-panel); }

/* ============================================================ B1 · styles */
/* Tabs: rounded tops; the open one joins its panel. */
body.bcm-style-tabs .bristle-cats-bar { gap: 2px; padding-top: 6px; }
/* The theme gives every li a bottom margin (Flatsome: .6em); without it the open tab reaches its panel. */
body.bcm-style-tabs .bristle-cats-bar > li,
body.bcm-style-tabs .bcm-end > li { margin-bottom: 0; }
/* The end slot steps down with the tabs (the mockup pads the whole row), so More and the switch sit on their line. */
body.bcm-bar.bcm-style-tabs .bcm-end { padding-top: 6px; }
body.bcm-style-tabs .bristle-cats-bar-link { border: 1px solid transparent; border-bottom: 0; border-radius: 8px 8px 0 0; padding-top: 10px; padding-bottom: 12px; }
body.bcm-style-tabs .bristle-cats-bar-link:hover,
body.bcm-style-tabs .bristle-cats-bar-item.is-open > .bristle-cats-bar-link { background: var(--bristle-bg-panel, #fff); color: var(--bristle-text-panel, inherit); border-color: var(--bristle-border-panel, rgba(0,0,0,.12)); }
body.bcm-style-tabs .bristle-cats-bar-item.is-open .bristle-cats-panel-wrap { border-top: 0; }
body.bcm-style-tabs[class*="bcm-theme-"] .bristle-cats-bar-link:hover,
body.bcm-style-tabs[class*="bcm-theme-"] .bristle-cats-bar-item.is-open > .bristle-cats-bar-link { color: var(--bcm-panel); border-image: none; }
/* Boxes: filled boxes with gaps; the open one filled with the highlight. */
body.bcm-style-boxes .bristle-cats-bar { gap: 6px; padding: 8px 0; }
body.bcm-style-boxes .bristle-cats-bar-link { border: 0; border-radius: 4px; background: rgba(127,127,127,.12); padding-top: 9px; padding-bottom: 9px; }
body.bcm-style-boxes .bristle-cats-bar-link:hover,
body.bcm-style-boxes .bristle-cats-bar-item.is-open > .bristle-cats-bar-link { background: var(--bcm-acc, var(--bristle-accent)); color: var(--bcm-acc-ink, #fff); }
/* Under a theme, B2's text rule (5 classes) would paint the label in the highlight it sits on: the highlight's ink wins. */
body.bcm-style-boxes[class*="bcm-theme-"] .bristle-cats-bar-link:hover,
body.bcm-style-boxes[class*="bcm-theme-"] .bristle-cats-bar-item.is-open > .bristle-cats-bar-link { color: var(--bcm-acc-ink, #fff); }
body.bcm-style-boxes.bcm-theme-thermal .bristle-cats-bar-link:hover,
body.bcm-style-boxes.bcm-theme-thermal .bristle-cats-bar-item.is-open > .bristle-cats-bar-link { background: linear-gradient(90deg, #ffd000, #ff5a1f, #b400ff); color: #fff; border-image: none; }
/* Pills: rounded outlines, no capitals; the open one filled. */
body.bcm-style-pills .bristle-cats-bar { gap: 6px; padding: 8px 0; }
body.bcm-style-pills .bristle-cats-bar-link { border: 1px solid currentColor; border-radius: 999px; text-transform: none; letter-spacing: 0; padding-top: 7px; padding-bottom: 7px; }
body.bcm-style-pills .bristle-cats-bar-link:hover,
body.bcm-style-pills .bristle-cats-bar-item.is-open > .bristle-cats-bar-link { background: var(--bcm-acc, var(--bristle-accent)); border-color: var(--bcm-acc, var(--bristle-accent)); color: var(--bcm-acc-ink, #fff); }
body.bcm-style-pills[class*="bcm-theme-"] .bristle-cats-bar-link:hover,
body.bcm-style-pills[class*="bcm-theme-"] .bristle-cats-bar-item.is-open > .bristle-cats-bar-link { color: var(--bcm-acc-ink, #fff); }
body.bcm-style-pills.bcm-theme-thermal .bristle-cats-bar-link:hover,
body.bcm-style-pills.bcm-theme-thermal .bristle-cats-bar-item.is-open > .bristle-cats-bar-link { background: linear-gradient(90deg, #ffd000, #ff5a1f, #b400ff); color: #fff; border-image: none; }
/* Boxes and Pills without the theme's li bottom margin: the boxes sit centred in the bar, More and the switch on their line. */
body.bcm-style-boxes .bristle-cats-bar > li,
body.bcm-style-boxes .bcm-end > li,
body.bcm-style-pills .bristle-cats-bar > li,
body.bcm-style-pills .bcm-end > li { margin-bottom: 0; }

/* ============================================================ B5 · when the departments don't fit; B6 · the end slot */
body.bcm-fit-wrap .bristle-cats-bar { flex-wrap: wrap; overflow-x: visible; }
/* The script makes the inner a row: the list, then the end slot (More, then the switch). */
body.bcm-bar .bristle-cats-desktop-inner.bcm-row { display: flex; align-items: center; }
body.bcm-bar .bcm-row > .bristle-cats-bar { flex: 0 1 auto; min-width: 0; }
body.bcm-place-centre .bcm-row > .bristle-cats-bar,
body.bcm-place-spread .bcm-row > .bristle-cats-bar { flex: 1 1 auto; }
body.bcm-bar .bcm-end { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; flex: 0 0 auto; position: relative; }
body.bcm-bar .bristle-cats-bar > .bcm-under-more { display: none !important; }
/* More keeps the bottom margin the theme gives the list's items (Text), so it sits on their line; B1 drops both. */
body.bcm-bar .bcm-more { position: relative; margin-top: 0; margin-left: 0; margin-right: 0; }
body.bcm-bar .bcm-more[hidden] { display: none; }
#bristle-cats-desktop .bcm-more-btn { display: inline-flex; align-items: center; gap: 6px; margin: 0 !important; padding: 8px 14px !important; min-height: 0 !important; line-height: 1.2 !important;
	background: transparent; color: inherit; border: 1px solid currentColor; border-radius: 4px; font: inherit; font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: .5px; cursor: pointer; }
body.bcm-bar .bcm-more-n { display: inline-block; min-width: 1.6em; padding: 0 5px; border-radius: 999px; background: currentColor; text-align: center; }
body.bcm-bar .bcm-more-n > span { color: var(--bcm-bg, var(--bristle-bg, #fff)); }
body.bcm-bar .bcm-more-menu { position: absolute; right: 0; top: calc(100% + 6px); z-index: 5; min-width: 220px; margin: 0; padding: 6px 0; list-style: none;
	background: var(--bristle-bg-panel, #fff); color: var(--bristle-text-panel, #1d2327); box-shadow: var(--bristle-shadow, 0 8px 24px rgba(0,0,0,.15)); border-radius: 4px; }
body.bcm-bar .bcm-more-menu[hidden] { display: none; }
body.bcm-bar .bcm-more-menu a { display: block; padding: 8px 16px; color: inherit; text-decoration: none; white-space: nowrap; font-weight: 600; }
body.bcm-bar .bcm-more-menu a:hover, body.bcm-bar .bcm-more-menu a:focus-visible { background: rgba(0,0,0,.06); }
/* R-134: the switch in the end slot keeps the look guides.css gives it in the bar (these three rules copied). */
.bcm-end > li.bristle-guides-bar-btn { margin-left: auto; margin-right: 4px; display: flex; align-items: center; flex: 0 0 auto; align-self: center; }
.bcm-end > li.bristle-guides-bar-btn .bristle-guides-btn { height: 30px; font-size: 11px; }
.bcm-end > li.bristle-guides-bar-btn { margin-left: 6px !important; margin-right: 0 !important; align-self: center; order: 999; }

/* ============================================================ P9 · focus always visible */
body.bcm-bar .bristle-cats-bar-link:focus-visible,
body.bcm-bar .bcm-more-btn:focus-visible,
body.bcm-layouts .bcm-panel a:focus-visible,
body.bcm-panels-full .bristle-cats-bar-link:focus-visible { outline: 2px solid var(--bcm-acc, var(--bristle-accent, #1d2327)); outline-offset: 2px; }

/* ============================================================ P8 · panel width */
body.bcm-panels-full .bristle-cats-panel-inner { max-width: none; }

/* ============================================================ P3–P5 · the layouts (only printed while bcm-layouts) */
/* frontend.css sets `white-space: nowrap` on .bristle-cats-bar-item, and the panel sits inside it: the new layouts wrap. */
.bcm-panel { --bcm-gap: 18px; color: var(--bristle-text-panel, inherit); white-space: normal; }
.bcm-panel a { color: inherit; text-decoration: none; }
.bcm-panel .bcm-all { color: var(--bristle-accent); font-weight: 700; white-space: nowrap; }
.bcm-panel h4 { margin: 0; font-size: 15px; text-transform: uppercase; letter-spacing: .4px; }
.bcm-head, .bcm-mid-head { display: flex; align-items: baseline; gap: 12px; margin: 0 0 12px; }
.bcm-head .bcm-all, .bcm-mid-head .bcm-all { margin-left: auto; }
/* The theme gives an h4 the full width: the heading takes only its words, so the count follows it on one line (mockup). */
.bcm-head > h4, .bcm-mid-head > h4 { width: auto; flex: 0 1 auto; }
.bcm-head-n { opacity: .7; font-size: 13px; }

/* The cards: the tiles' markup and looks (pills-tiles.css + -looks.css), in the panel's own grid. */
.bcm-panel .bcm-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; margin: 0; }
.bcm-layout-showcase .bcm-cards { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.bcm-card { min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.bcm-card .bpt-tile { display: flex; flex-direction: column; gap: 4px; }
.bcm-card .bcm-pic { aspect-ratio: 4 / 3; display: flex; align-items: center; justify-content: center; }
.bcm-card .bcm-pic img { width: 100%; height: 100%; object-fit: contain; }
.bcm-card .bpt-tile-label { font-weight: 700; font-size: 13.5px; line-height: 1.25; }
.bcm-card .bpt-tile-count { font-size: 12px; opacity: .7; }
.bcm-line { font-size: 12px; line-height: 1.35; opacity: .85; }
.bcm-line a:hover { text-decoration: underline; }
.bcm-nopic { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; padding: 6px; text-align: center; font-weight: 700; font-size: 12px; opacity: .55; }

/* Showcase: three columns, 220px | 1fr | 240px (1366 × 768 fits eight cards as 4 × 2, P8): pictures 90 px high, the
   short line on one line. With no quick links and no ad the right column is empty (the marker comment does not count
   for :empty) and the middle takes its room. */
.bcm-layout-showcase { display: grid; grid-template-columns: 220px minmax(0, 1fr) 240px; gap: 24px; }
.bcm-layout-showcase:has(> .bcm-right:empty) { grid-template-columns: 220px minmax(0, 1fr); }
.bcm-layout-showcase > .bcm-right:empty { display: none; }
.bcm-layout-showcase .bcm-card .bcm-pic { aspect-ratio: auto; height: 90px; }
.bcm-layout-showcase .bcm-line { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bcm-left-list { list-style: none; margin: 0 0 10px; padding: 0; }
.bcm-left-link { display: flex; justify-content: space-between; gap: 8px; padding: 7px 10px; border-radius: 4px; font-weight: 600; }
.bcm-left-link:hover, .bcm-left-link.is-lit { background: rgba(0,0,0,.06); }
.bcm-left-n { opacity: .6; font-weight: 400; font-size: 12px; }
.bcm-left-foot { display: flex; flex-direction: column; gap: 6px; padding: 8px 10px 0; border-top: 1px solid rgba(0,0,0,.1); }
.bcm-group[hidden], .bcm-leaf-all[hidden] { display: none !important; }
.bcm-leaf-all { display: inline-block; margin: 0 0 10px; font-weight: 700; color: var(--bristle-accent); }
.bcm-card.is-lit { outline: 2px solid var(--bcm-panel, var(--bristle-accent)); outline-offset: 2px; border-radius: 4px; }
.bcm-banner { display: flex; align-items: center; gap: 14px; margin-top: 14px; padding: 12px 16px; min-height: 64px; box-sizing: border-box; border-radius: 6px;
	background: var(--bcm-bg, #1d2327); color: var(--bcm-ink, #fff); }
.bcm-banner-line { font-size: 12px; text-transform: uppercase; letter-spacing: .6px; opacity: .8; }
.bcm-banner-head { font-size: 16px; }
.bcm-panel .bcm-banner-btn { margin-left: auto; padding: 8px 14px; border-radius: 4px; background: var(--bcm-acc, var(--bristle-accent)); color: var(--bcm-acc-ink, #fff); font-weight: 700; white-space: nowrap; }
.bcm-right-head { margin: 0 0 8px; font-size: 12px; text-transform: uppercase; letter-spacing: .6px; opacity: .75; }
.bcm-brands { list-style: none; margin: 0 0 14px; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.bcm-brands a { display: inline-block; padding: 5px 11px; border: 1px solid rgba(0,0,0,.18); border-radius: 999px; font-size: 13px; }
.bcm-brands a:hover { border-color: currentColor; }
.bcm-ad { margin-top: 6px; }

/* Picture columns (P5, R-137): the columns wrap, and scroll inside the panel's height cap. */
.bcm-pcols { display: flex; flex-wrap: wrap; gap: 22px 28px; }
.bcm-pcol { flex: 0 0 200px; min-width: 0; }
.bcm-pcol-head { display: grid; grid-template-columns: 56px 1fr; grid-template-rows: auto auto; column-gap: 10px; align-items: center; padding-bottom: 8px; margin-bottom: 8px;
	border-bottom: 2px solid var(--bcm-panel, var(--bristle-accent)); }
.bcm-pcol-pic { grid-row: 1 / 3; width: 56px; height: 42px; display: flex; align-items: center; justify-content: center; background: rgba(0,0,0,.04); border-radius: 4px; overflow: hidden; }
.bcm-pcol-pic img { width: 100%; height: 100%; object-fit: contain; }
.bcm-pcol-name { font-weight: 700; text-transform: uppercase; font-size: 13.5px; }
.bcm-pcol-n { font-size: 12px; opacity: .7; }
.bcm-pcol-list { list-style: none; margin: 0; padding: 0; }
.bcm-pcol-list li { padding: 3px 0; font-size: 13.5px; }
.bcm-pcol-list a:hover { text-decoration: underline; }
.bcm-pcol-more { opacity: .65; }
.bcm-pcol-list .bcm-all-item { padding-top: 6px; }
