/* fix153 + fix154 - the brand bar (kelola -> Website Design -> Top bar: brand design = "Brand bar").
   Two tiers: white - the RIC logo + RAINBOW CARPET wordmark + group line (one link to Home; html.php prints it through
   rc_brand_logo()) on the left, the product search and Log in on the right; below it the menu band.
   fix154: the menu band takes the site colour scheme (Website Design -> Colours, --rcd-* variables):
     "Light, as before" (default)  - the scheme's soft header colours, dark words, accent line under the page you are on
     rcd-brandnav-theme             - the scheme's own menu colour, light words
     rcd-brandnav-navy              - dark navy #001745
     rcd-brandnavcol-custom         - any colour (variables printed in the page head by rc_design_head)
   A click on any empty part of the top bar goes to Home (small script printed with the logo). It wins over the older top
   bar / menu choices (topbar, headlayout, stripe, depth, menu, navbar, navshape, navsize, dropstyle) - they keep their
   settings for when the brand bar is switched off.
   fix155: the lines, shadows, search field and its icons take the site colour scheme too (only the logo keeps the RIC navy);
   "Top bar: LOG IN button" = Hide (rcd-toplogin-hide) takes Log in away and the search moves to the right end. */
html body.rcd-brandbar-brand {
	--rcb-navy: #001745; --rcb-ink: var(--rcd-ink, #001745); --rcb-accent: var(--rcd-accent, #2B518F);
	--rcb-line: rgba(15, 23, 42, .10); --rcb-mute: #5f6b7a;
	/* fix155: neutral tints (older browsers); the @supports block below mixes them from the colour scheme */
	--rcb-edge: rgba(15, 23, 42, .14); --rcb-edge2: rgba(15, 23, 42, .26); --rcb-field: #f5f7f9; --rcb-ph: #6b7684;
	--rcb-shadow: rgba(15, 23, 42, .45); --rcb-ring: rgba(15, 23, 42, .12); --rcb-icon: var(--rcb-go);
	--rcb-t1: 78px; --rcb-t2: 46px; --rcb-pad: 32px;
	--rcb-font: 'IBM Plex Sans', 'Gudea', Arial, sans-serif;
	--rcb-ip: clamp(9px, 1.1vw, 20px);	/* room either side of a menu word */
	/* the menu band - "Light, as before" */
	--rcb-band1: var(--rcd-head, #eef3f7); --rcb-band2: var(--rcd-btn, #dde6ee);
	--rcb-bandink: var(--rcd-ink, #001745); --rcb-bandline: var(--rcd-accent, #2B518F); --rcb-bandcur: var(--rcd-accent, #2B518F);
	--rcb-bandhover: rgba(255, 255, 255, .6); --rcb-bandedge: rgba(15, 23, 42, .07);
	--rcb-go: var(--rcd-accent, #2B518F);
}
@supports (color: color-mix(in srgb, red 50%, blue)) {
	html body.rcd-brandbar-brand {
		--rcb-line: color-mix(in srgb, var(--rcb-ink) 12%, transparent);
		--rcb-mute: color-mix(in srgb, var(--rcb-ink) 62%, #fff);
		--rcb-edge: color-mix(in srgb, var(--rcb-ink) 15%, transparent);
		--rcb-edge2: color-mix(in srgb, var(--rcb-ink) 28%, transparent);
		--rcb-field: color-mix(in srgb, var(--rcd-head, #eef3f7) 45%, #fff);
		--rcb-ph: color-mix(in srgb, var(--rcb-ink) 58%, #fff);
		--rcb-shadow: color-mix(in srgb, var(--rcb-ink) 45%, transparent);
		--rcb-ring: color-mix(in srgb, var(--rcb-go) 18%, transparent);
		--rcb-bandedge: color-mix(in srgb, var(--rcb-ink) 8%, transparent);
	}
}
html body.rcd-brandbar-brand.rcd-brandnav-theme {
	--rcb-band1: var(--rcd-nav, #2B518F); --rcb-band2: var(--rcd-nav2, #1d3c70); --rcb-bandink: var(--rcd-navink, #ffffff);
	--rcb-bandline: var(--rcd-navhover, #B9C0D0); --rcb-bandcur: #ffffff; --rcb-bandhover: rgba(255, 255, 255, .08); --rcb-bandedge: transparent;
	--rcb-go: var(--rcd-nav, #2B518F);
}
html body.rcd-brandbar-brand.rcd-brandnav-navy {
	--rcb-band1: #0b2a5e; --rcb-band2: #001745; --rcb-bandink: #ffffff; --rcb-bandline: #9fbbe8; --rcb-bandcur: #ffffff;
	--rcb-bandhover: rgba(255, 255, 255, .07); --rcb-bandedge: transparent; --rcb-go: #001745;
}

/* ---- the bar ---- */
html body.rcd-brandbar-brand #header {
	height: auto !important; min-width: 960px; background: #fff !important; background-image: none !important;
	border: 0 !important; border-radius: 0 !important;
	box-shadow: 0 12px 30px -24px var(--rcb-shadow) !important; cursor: pointer;
}
html body.rcd-brandbar-brand #header::before, html body.rcd-brandbar-brand #header::after { content: none !important; display: none !important; }
html body.rcd-brandbar-brand #header > .row {
	display: grid !important; grid-template-columns: auto minmax(0, 1fr) auto auto; grid-template-rows: var(--rcb-t1) var(--rcb-t2);
	column-gap: 14px; align-items: center; width: 100%; max-width: none; height: auto !important; min-height: 0 !important;
	margin: 0 !important; padding: 0 var(--rcb-pad) !important; box-sizing: border-box; position: relative;
	transition: grid-template-rows .3s ease;
}
html body.rcd-brandbar-brand #header > .row::after { content: none !important; }

/* ---- tier 1: the brand ---- */
html body.rcd-brandbar-brand #header .logo {
	grid-row: 1; grid-column: 1; float: none !important; margin: 0 !important; position: static !important; align-self: center;
}
html body.rcd-brandbar-brand .rcb-brand { display: flex; align-items: center; gap: 16px; text-decoration: none; cursor: pointer; }
html body.rcd-brandbar-brand .rcb-brand img { display: block; max-width: none; border: 0; }
html body.rcd-brandbar-brand .rcb-mark { width: 104px; height: 52px; transition: width .3s ease, height .3s ease; }
html body.rcd-brandbar-brand .rcb-text { display: flex; flex-direction: column; align-items: stretch; gap: 7px; padding-left: 16px; border-left: 1px solid var(--rcb-line); }
html body.rcd-brandbar-brand .rcb-word { width: 190px; height: 22px; transition: width .3s ease, height .3s ease; }
html body.rcd-brandbar-brand .rcb-group {
	display: block; width: 190px; font: 600 8.8px/1 var(--rcb-font); letter-spacing: .07em; text-transform: uppercase;
	color: var(--rcb-mute); white-space: nowrap; text-align: justify; text-align-last: justify; transition: opacity .2s ease;
}
html body.rcd-brandbar-brand .rcb-brand:hover .rcb-mark, html body.rcd-brandbar-brand .rcb-brand:hover .rcb-word { opacity: .86; }
html body.rcd-brandbar-brand .rcb-brand:focus-visible { outline: 2px solid var(--rcb-accent); outline-offset: 6px; border-radius: 4px; }

/* ---- tier 1, right: the product search (always open) and Log in ---- */
html body.rcd-brandbar-brand #header .search-cat { display: none !important; }
html body.rcd-brandbar-brand #header .searhproduct {
	display: block !important; grid-row: 1; grid-column: 3; position: static !important; float: none !important;
	width: 372px !important; margin: 0 !important; cursor: auto;
}
html body.rcd-brandbar-brand #header .searhproduct .styled, html body.rcd-brandbar-brand #header .searhproduct form {
	position: relative; display: block; float: none !important; width: 100% !important; height: auto !important; overflow: visible !important;
	margin: 0; padding: 0; background: none !important; border: 0; box-shadow: none;
}
/* the magnifier on the left of the field (drawn with a mask, so it takes the words' colour) */
html body.rcd-brandbar-brand #header .searhproduct form::before {
	content: ""; position: absolute; left: 16px; top: 50%; width: 17px; height: 17px; margin-top: -8.5px; pointer-events: none; z-index: 1;
	background: var(--rcb-icon); opacity: .8; transition: opacity .2s ease;
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.1' stroke-linecap='round'%3E%3Ccircle cx='10.5' cy='10.5' r='6.75'/%3E%3Cpath d='m15.6 15.6 5.4 5.4'/%3E%3C/svg%3E") center / contain no-repeat;
	        mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.1' stroke-linecap='round'%3E%3Ccircle cx='10.5' cy='10.5' r='6.75'/%3E%3Cpath d='m15.6 15.6 5.4 5.4'/%3E%3C/svg%3E") center / contain no-repeat;
}
html body.rcd-brandbar-brand #header .searhproduct form:focus-within::before { opacity: 1; }
html body.rcd-brandbar-brand #header .searhproduct input[type="text"] {
	display: block; width: 100% !important; height: 44px !important; box-sizing: border-box; margin: 0 !important;
	padding: 0 52px 0 44px !important; border: 1px solid var(--rcb-edge) !important; border-radius: 999px !important;
	background: var(--rcb-field) !important; box-shadow: inset 0 1px 2px rgba(15, 23, 42, .04) !important; color: var(--rcb-ink) !important;
	font: 500 14px/44px var(--rcb-font) !important; font-style: normal !important; letter-spacing: 0; outline: 0;
	-webkit-appearance: none; appearance: none; transition: border-color .2s, background-color .2s, box-shadow .2s;
}
html body.rcd-brandbar-brand #header .searhproduct input[type="text"]::placeholder { color: var(--rcb-ph); opacity: 1; font-weight: 400; }
html body.rcd-brandbar-brand #header .searhproduct input[type="text"]:hover { border-color: var(--rcb-edge2) !important; background: #fff !important; }
html body.rcd-brandbar-brand #header .searhproduct input[type="text"]:focus {
	background: #fff !important; border-color: var(--rcb-go) !important;
	box-shadow: 0 0 0 4px var(--rcb-ring), 0 6px 18px -10px var(--rcb-shadow) !important;
}
/* the round go button at the right end of the field (added by the script printed with the logo) */
html body.rcd-brandbar-brand #header .searhproduct .rcb-go {
	position: absolute; right: 6px; top: 50%; width: 32px; height: 32px; margin: -16px 0 0; padding: 0; border: 0; border-radius: 50%;
	background: var(--rcb-go); color: #fff; cursor: pointer; box-shadow: 0 2px 6px -2px var(--rcb-shadow);
	transition: transform .2s ease, filter .2s ease;
}
html body.rcd-brandbar-brand #header .searhproduct .rcb-go::before {
	content: ""; position: absolute; inset: 0; margin: auto; width: 15px; height: 15px; background: #fff;
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12h14M13 6l6 6-6 6'/%3E%3C/svg%3E") center / contain no-repeat;
	        mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12h14M13 6l6 6-6 6'/%3E%3C/svg%3E") center / contain no-repeat;
}
html body.rcd-brandbar-brand #header .searhproduct .rcb-go:hover { transform: translateX(1px) scale(1.06); filter: brightness(1.1); }
html body.rcd-brandbar-brand #header .searhproduct .rcb-go:focus-visible { outline: 2px solid var(--rcb-go); outline-offset: 2px; }
/* Log in */
html body.rcd-brandbar-brand #header .top-login {
	grid-row: 1; grid-column: 4; position: static !important; top: auto !important; right: auto !important; justify-self: end;
	display: inline-flex; align-items: center; gap: 8px; height: 44px; padding: 0 18px 0 16px; box-sizing: border-box;
	border: 1px solid var(--rcb-edge); border-radius: 999px; background: #fff;
	color: var(--rcb-ink) !important; font: 600 12px/1 var(--rcb-font); letter-spacing: .06em; text-transform: uppercase; text-decoration: none; white-space: nowrap;
	transition: background-color .2s, color .2s, border-color .2s;
}
html body.rcd-brandbar-brand #header .top-login::before {
	content: ""; width: 16px; height: 16px; flex: 0 0 auto; background: currentColor;
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='8' r='4'/%3E%3Cpath d='M4.5 20.5c.9-3.6 4-5.5 7.5-5.5s6.6 1.9 7.5 5.5'/%3E%3C/svg%3E") center / contain no-repeat;
	        mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='8' r='4'/%3E%3Cpath d='M4.5 20.5c.9-3.6 4-5.5 7.5-5.5s6.6 1.9 7.5 5.5'/%3E%3C/svg%3E") center / contain no-repeat;
}
html body.rcd-brandbar-brand #header .top-login:hover { background: var(--rcb-go); border-color: var(--rcb-go); color: #fff !important; }
/* fix155: no Log in - the search takes its place at the right end, a little wider */
html body.rcd-brandbar-brand.rcd-toplogin-hide #header .searhproduct { grid-column: 4; width: 400px !important; }

/* ---- tier 2: the menu band (across the whole width) ---- */
html body.rcd-brandbar-brand #header .menu {
	grid-row: 2; grid-column: 1 / -1; float: none !important; height: var(--rcb-t2) !important; position: relative;
	margin: 0 calc(-1 * var(--rcb-pad)) !important; padding: 0 var(--rcb-pad); box-sizing: border-box;
	background: linear-gradient(180deg, var(--rcb-band1) 0%, var(--rcb-band2) 100%);
	box-shadow: inset 0 1px 0 var(--rcb-bandedge), inset 0 -1px 0 var(--rcb-bandedge);
}
html body.rcd-brandbar-brand #header .nav {
	position: static !important; top: auto !important; left: auto !important; width: auto !important; height: 100% !important;
	margin: 0 !important; padding: 0 !important; background: none !important; border: 0 !important; border-radius: 0 !important; box-shadow: none !important;
}
html body.rcd-brandbar-brand #header .nav span.left, html body.rcd-brandbar-brand #header .nav span.right { display: none !important; }
html body.rcd-brandbar-brand #header .nav > ul {
	display: flex !important; justify-content: center; align-items: stretch; flex-wrap: nowrap; height: 100%; margin: 0; padding: 0;
	gap: clamp(0px, calc((100vw - 1100px) * .04), 18px);	/* the words keep together in the middle on wide screens */
	font-family: var(--rcb-font) !important;
}
html body.rcd-brandbar-brand #header .nav > ul > li {
	float: none !important; display: flex; align-items: stretch; position: relative; min-height: 0; flex: 0 0 auto !important;
	background: none !important; background-image: none !important; color: inherit; margin: 0 !important;
}
html body.rcd-brandbar-brand #header .nav > ul > li > a {
	display: flex !important; align-items: center; width: auto !important; height: 100%; box-sizing: border-box;
	margin: 0 !important; padding: 0 var(--rcb-ip) !important; position: relative;
	background: none !important; background-image: none !important; border: 0 !important; border-radius: 0 !important; box-shadow: none !important;
	transform: none !important; animation: none !important; filter: none !important;
	color: var(--rcb-bandink) !important; opacity: .9; font: 600 11.5px/1 var(--rcb-font) !important; letter-spacing: .085em; text-transform: uppercase;
	white-space: nowrap; text-decoration: none; transition: color .2s ease, background-color .2s ease, opacity .2s ease;
}
/* the line under the item: on mouse-over, and for the page you are on */
html body.rcd-brandbar-brand #header .nav > ul > li > a::after {
	content: "" !important; display: block !important; position: absolute !important; left: var(--rcb-ip) !important; right: var(--rcb-ip) !important;
	top: auto !important; bottom: 9px !important; width: auto !important; height: 2px !important; margin: 0 !important; border-radius: 2px !important;
	background: var(--rcb-bandline) !important; box-shadow: none !important; opacity: 1 !important; animation: none !important;
	padding: 0 !important; border: 0 !important; z-index: 1 !important; filter: none !important; pointer-events: none;
	-webkit-mask: none !important; mask: none !important;
	transform: scaleX(0) !important; transform-origin: 50% 50%; transition: transform .28s cubic-bezier(.22, .61, .36, 1) !important;
}
html body.rcd-brandbar-brand #header .nav > ul > li > a:hover, html body.rcd-brandbar-brand #header .nav > ul > li:hover > a,
html body.rcd-brandbar-brand #header .nav > ul > li > a:focus-visible { opacity: 1; background: var(--rcb-bandhover) !important; }
html body.rcd-brandbar-brand #header .nav > ul > li > a:hover::after, html body.rcd-brandbar-brand #header .nav > ul > li:hover > a::after,
html body.rcd-brandbar-brand #header .nav > ul > li.rcd-current > a::after { transform: scaleX(1) !important; }
html body.rcd-brandbar-brand #header .nav > ul > li.rcd-current > a { opacity: 1; }
html body.rcd-brandbar-brand #header .nav > ul > li.rcd-current > a::after { background: var(--rcb-bandcur) !important; height: 2.5px !important; }
/* a small arrow on the items with a dropdown (a mask: it takes the words' colour) */
html body.rcd-brandbar-brand #header .nav > ul > li.dir > a { padding-right: calc(var(--rcb-ip) + 13px) !important; }
html body.rcd-brandbar-brand #header .nav > ul > li.dir > a::before {
	content: ""; position: absolute; right: var(--rcb-ip); top: 50%; width: 9px; height: 9px; margin-top: -5px;
	background: currentColor; opacity: .7; transition: transform .25s ease, opacity .2s ease;
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 10' fill='none' stroke='%23000' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2 3.5 5 6.5 8 3.5'/%3E%3C/svg%3E") center / contain no-repeat;
	        mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 10' fill='none' stroke='%23000' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2 3.5 5 6.5 8 3.5'/%3E%3C/svg%3E") center / contain no-repeat;
}
html body.rcd-brandbar-brand #header .nav > ul > li.dir:hover > a::before { transform: rotate(180deg); opacity: 1; }

/* the dropdowns: white panels */
html body.rcd-brandbar-brand #header .nav ul ul.sub {
	top: 100% !important; left: 0 !important; min-width: 250px; margin: 0 !important; padding: 8px !important; box-sizing: border-box;
	background: #fff !important; border: 0 !important; border-top: 3px solid var(--rcb-bandline) !important; border-radius: 0 0 12px 12px !important;
	box-shadow: 0 22px 44px -14px var(--rcb-shadow), 0 0 0 1px var(--rcb-line) !important; z-index: 100;
}
html body.rcd-brandbar-brand #header .nav ul ul.sub li, html body.rcd-brandbar-brand #header .nav ul ul.sub li:first-child {
	float: none !important; width: auto !important; height: auto !important; margin: 0 !important; background: none !important; border: 0 !important;
}
html body.rcd-brandbar-brand #header .nav ul ul.sub li a {
	display: block !important; width: auto !important; height: auto !important; box-sizing: border-box; margin: 0 !important;
	padding: 11px 14px !important; border-radius: 8px !important; background: none !important; box-shadow: none !important; border: 0 !important;
	color: var(--rcb-ink) !important; font: 500 12.5px/1.3 var(--rcb-font) !important; letter-spacing: .04em; text-align: left; white-space: nowrap;
	opacity: 1; transform: none !important; transition: background-color .18s ease, color .18s ease;
}
html body.rcd-brandbar-brand #header .nav ul ul.sub li a::after, html body.rcd-brandbar-brand #header .nav ul ul.sub li a::before { content: none !important; display: none !important; }
html body.rcd-brandbar-brand #header .nav ul ul.sub li a:hover { background: var(--rcb-field) !important; color: var(--rcb-accent) !important; }

/* ---- scrolling (the bar stays at the top - "Top bar when scrolling"): the white tier gets slimmer ---- */
html body.rcd-brandbar-brand.rcb-scrolled #header > .row { grid-template-rows: 60px var(--rcb-t2); }
html body.rcd-brandbar-brand.rcb-scrolled .rcb-mark { width: 80px; height: 40px; }
html body.rcd-brandbar-brand.rcb-scrolled .rcb-word { width: 164px; height: 19px; }
html body.rcd-brandbar-brand.rcb-scrolled .rcb-group { opacity: 0; height: 0; margin-top: -7px; overflow: hidden; }
html body.rcd-brandbar-brand.rcb-scrolled #header .searhproduct input[type="text"], html body.rcd-brandbar-brand.rcb-scrolled #header .top-login { height: 40px !important; }

@media (prefers-reduced-motion: reduce) {
	html body.rcd-brandbar-brand #header *, html body.rcd-brandbar-brand #header > .row { transition: none !important; }
}
