/* Final responsive rules for the catalog menu. Loaded after theme.css. */
.rms-catalog-menu__sidebar-head {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	align-items: center;
	column-gap: 16px;
	min-width: 0;
}

.rms-catalog-menu__sidebar-head strong {
	min-width: 0;
	margin: 0;
	color: #14243f;
	font-size: 28px;
	font-weight: 700;
	line-height: 1.1;
	white-space: normal;
}

.rms-catalog-menu__sidebar-head a {
	min-width: 0;
	color: #ed1b2f;
	font-size: 16px;
	font-weight: 700;
	line-height: 1.2;
	white-space: nowrap;
	display: inline-flex;
	align-items: center;
	gap: 6px;
}

.rms-catalog-menu__link-chevron {
	display: inline-block;
	width: 18px;
	height: 18px;
	flex: 0 0 18px;
	fill: none;
	stroke: currentColor;
	stroke-linecap: round;
	stroke-linejoin: round;
	stroke-width: 1.8;
	vertical-align: middle;
}

.rms-catalog-menu__panel-head > a,
.rms-catalog-menu__group-title {
	gap: 6px;
}

/* Keep the item count inside the same category block, below its title. */
.rms-catalog-menu__group {
	padding-bottom: 20px;
	border-bottom: 1px solid #e3e7e9;
}

.rms-catalog-menu__group-title {
	min-height: 38px;
	padding: 0;
	border-bottom: 0;
	border-radius: 0;
	align-items: center;
}

.rms-catalog-menu__group-title strong {
	min-width: 0;
}

.rms-catalog-menu__group-title .rms-catalog-menu__link-chevron {
	margin-top: 0;
	align-self: center;
}

.rms-catalog-menu__count {
	display: block;
	padding: 9px 0 0;
}

.rms-catalog-menu__links {
	row-gap: 28px;
}

.rms-catalog-menu__group-title:hover,
.rms-catalog-menu__group-title:focus-visible {
	background: transparent;
	color: #ed1b2f;
}

.rms-catalog-menu__group-title:focus-visible {
	outline: 2px solid #ed1b2f;
	outline-offset: 4px;
}

.rms-catalog-button__chevron {
	width: 18px;
	height: 18px;
	fill: none;
	stroke: currentColor;
	stroke-linecap: round;
	stroke-linejoin: round;
	stroke-width: 1.8;
	transform: rotate(90deg);
	transition: transform .18s ease;
}

.rms-catalog-button[aria-expanded='true'] .rms-catalog-button__chevron {
	transform: rotate(-90deg);
}

.rms-catalog-menu__category {
	display: grid;
	grid-template-columns: 36px minmax(0, 1fr) 22px;
	align-items: center;
	gap: 18px;
	text-align: left;
}

.rms-catalog-menu__category > span:not(.rms-catalog-menu__category-icon) {
	min-width: 0;
	text-align: left;
}

.rms-catalog-menu__category-icon {
	width: 36px;
	height: 36px;
}

.rms-catalog-menu__category-icon svg,
.rms-catalog-menu__category-icon-asset {
	width: 30px;
	height: 30px;
}

.rms-catalog-menu__category > svg {
	grid-column: 3;
	justify-self: end;
	width: 22px;
	height: 22px;
}

.rms-catalog-menu__category:focus {
	outline: none;
}

.rms-catalog-menu__category:focus-visible {
	outline: 2px solid #ed1b2f;
	outline-offset: -2px;
}

@media (min-width: 801px) {
	.rms-catalog-menu__inner {
		grid-template-columns: clamp(420px, 44%, 540px) minmax(0, 1fr);
		gap: 18px;
	}

	.rms-catalog-menu__sidebar-head {
		display: flex;
		flex-direction: row;
		flex-wrap: nowrap;
		align-items: center;
		justify-content: flex-start;
		gap: 24px;
		padding-right: 16px;
		padding-left: 16px;
	}

	.rms-catalog-menu__sidebar-head strong {
		flex: 0 0 auto;
		font-size: 26px;
		white-space: nowrap;
	}

	.rms-catalog-menu__sidebar-head a {
		align-self: center;
		flex: 0 0 auto;
		font-size: 16px;
	}

	.rms-catalog-menu__category {
		min-height: 68px;
		padding: 10px 34px;
		border-radius: 0;
		border-bottom: 1px solid #edf0f2;
	}

	.rms-catalog-menu__category:first-child {
		border-top: 1px solid #edf0f2;
	}

	.rms-catalog-menu__group {
		padding-bottom: 20px;
	}
}

@media (min-width: 801px) and (max-width: 1100px) {
	.rms-catalog-menu__inner {
		grid-template-columns: minmax(360px, 48%) minmax(0, 1fr);
	}

	.rms-catalog-menu__sidebar-head {
		padding-right: 22px;
		padding-left: 22px;
		gap: 12px;
	}

	.rms-catalog-menu__sidebar-head strong {
		flex: 1 1 auto;
		font-size: 22px;
	}

	.rms-catalog-menu__sidebar-head a {
		font-size: 13px;
	}
}

@media (max-width: 800px) {
	.rms-catalog-menu__sidebar-head {
		padding: 20px 16px 18px;
		column-gap: 24px;
	}

	.rms-catalog-menu__sidebar-head strong {
		font-size: clamp(22px, 4vw, 28px);
	}

	.rms-catalog-menu__sidebar-head a {
		font-size: 13px;
	}

	.rms-catalog-menu__category {
		grid-template-columns: 32px minmax(0, 1fr) 20px;
		gap: 14px;
		padding-right: 16px;
		padding-left: 16px;
	}

	.rms-catalog-menu__category-icon {
		width: 32px;
		height: 32px;
	}

	.rms-catalog-menu__category-icon svg,
	.rms-catalog-menu__category-icon-asset {
		width: 27px;
		height: 27px;
	}

	.rms-catalog-menu__group {
		padding-bottom: 16px;
	}

	.rms-catalog-menu__links {
		row-gap: 16px;
	}
}

/* Compact desktop scale: keep the open catalog menu proportional to the site. */
@media (min-width: 801px) {
	.rms-catalog-menu {
		padding: 10px 0 14px;
	}

	.rms-catalog-menu__inner {
		grid-template-columns: clamp(300px, 24vw, 360px) minmax(0, 1fr);
		gap: 14px;
	}

	.rms-catalog-menu__sidebar {
		padding: 0 0 8px !important;
	}

	.rms-catalog-menu__sidebar-head {
		min-height: 68px;
		padding: 0 20px !important;
		gap: 12px;
	}

	.rms-catalog-menu__sidebar-head strong {
		font-size: 22px !important;
	}

	.rms-catalog-menu__sidebar-head a {
		font-size: 13px !important;
	}

	.rms-catalog-menu__category {
		grid-template-columns: 30px minmax(0, 1fr) 18px;
		min-height: 56px !important;
		gap: 12px;
		padding: 8px 20px !important;
		font-size: 16px;
	}

	.rms-catalog-menu__category-icon {
		width: 30px !important;
		height: 30px !important;
	}

	.rms-catalog-menu__category-icon svg,
	.rms-catalog-menu__category-icon-asset {
		width: 26px !important;
		height: 26px !important;
	}

	.rms-catalog-menu__category > svg {
		width: 18px !important;
		height: 18px !important;
	}

	.rms-catalog-menu__panels {
		max-height: min(520px, calc(100vh - 150px));
	}

	.rms-catalog-menu__panel {
		padding: 24px 28px 28px;
	}

	.rms-catalog-menu__panel-head {
		margin-bottom: 16px;
		padding-bottom: 12px;
	}

	.rms-catalog-menu__panel h2 {
		font-size: 28px;
	}

	.rms-catalog-menu__panel-head p {
		font-size: 14px;
	}

	.rms-catalog-menu__panel-head > a {
		font-size: 13px;
	}

	.rms-catalog-menu__group {
		padding-bottom: 14px;
	}

	.rms-catalog-menu__group-title {
		min-height: 38px;
		font-size: 16px;
	}

	.rms-catalog-menu__count {
		padding-top: 6px;
		font-size: 12px;
	}

	.rms-catalog-menu__links {
		row-gap: 18px;
	}

	.rms-catalog-menu__products {
		gap: 14px;
		margin-top: 12px;
	}

	.rms-catalog-menu__product-image {
		height: 150px;
	}

	.rms-catalog-menu__product strong {
		font-size: 16px;
	}
}

/* Keep phone, account and cart stable at the tablet-sized desktop breakpoint. */
@media (min-width: 801px) and (max-width: 1100px) {
	.rms-header__contact,
	.rms-header__account,
	.rms-header__cart {
		justify-self: end;
		width: max-content;
		max-width: 100%;
	}
}

/* Preserve the account link when a tablet-width header still has room for it. */
@media (min-width: 481px) and (max-width: 800px) {
	.rms-header__top {
		grid-template-columns: minmax(0, 1fr) auto auto;
		gap: 10px;
	}

	.rms-header__account {
		display: flex;
		grid-column: 2;
		grid-row: 1;
		align-self: center;
		justify-self: end;
	}

	.rms-header__cart {
		grid-column: 3;
		grid-row: 1;
		justify-self: end;
	}

	.rms-brand img {
		width: 145px;
		max-height: 56px;
	}
}

/* Keep the utility bar mobile-only; desktop keeps the original header layout. */
.rms-header__utility-wrap {
	display: none;
	background: #14243f;
	color: #fff;
}

.rms-header__utility {
	display: flex;
	min-height: 38px;
	align-items: center;
	justify-content: center;
	gap: 28px;
}

.rms-header__utility .rms-header__contact,
.rms-header__utility .rms-header__account {
	display: flex;
	width: auto;
	min-width: 0;
	flex-direction: row;
	align-items: center;
	justify-self: auto;
	font-size: 14px;
	line-height: 1.2;
}

.rms-header__utility .rms-header__contact a,
.rms-header__utility .rms-header__account strong {
	color: #fff;
	font-size: 14px;
	font-weight: 700;
	white-space: nowrap;
}

.rms-header__utility .rms-header__contact .rms-icon,
.rms-header__utility .rms-header__account .rms-icon {
	width: 21px;
	height: 21px;
	color: #ed1b2f;
}

.rms-header__utility .rms-header__contact > span,
.rms-header__utility .rms-header__account > span {
	display: none;
}

@media (min-width: 801px) {
	.rms-header__top {
		grid-template-columns: 205px 150px minmax(520px, 580px) 190px 130px 125px;
		gap: 20px;
	}

	.rms-header__top .rms-search {
		grid-column: auto;
		grid-row: auto;
		max-width: none;
	}

	.rms-header__top > .rms-header__contact,
	.rms-header__top > .rms-header__account {
		display: flex;
	}
}

@media (min-width: 801px) and (max-width: 1100px) {
	.rms-header__top {
		grid-template-columns: 190px minmax(0, 1fr) auto auto;
		gap: 20px;
	}

	.rms-header__top .rms-search {
		grid-column: 2 / 4;
		grid-row: 2;
		max-width: none;
	}
}

@media (max-width: 800px) {
	.rms-header__utility-wrap {
		display: block;
	}

	.rms-header__top > .rms-header__contact,
	.rms-header__top > .rms-header__account {
		display: none !important;
	}

	.rms-header__utility {
		min-height: 36px;
		gap: 16px;
		padding: 0 8px;
	}

	.rms-header__utility .rms-header__contact,
	.rms-header__utility .rms-header__account {
		display: flex;
	}

	.rms-header__utility .rms-header__contact a,
	.rms-header__utility .rms-header__account strong {
		font-size: 12px;
	}

	.rms-header__utility .rms-header__contact .rms-icon,
	.rms-header__utility .rms-header__account .rms-icon {
		width: 18px;
		height: 18px;
	}

	.rms-header__utility .rms-header__account-copy {
		display: inline-flex;
		align-items: center;
		gap: 6px;
	}

	.rms-header__utility .rms-header__account-copy a {
		color: #fff;
		text-decoration: none;
	}

	.rms-header__utility .rms-header__account-separator {
		color: rgba(255, 255, 255, .7);
	}
}

@media (max-width: 480px) {
	.rms-header__utility {
		gap: 10px;
		justify-content: space-between;
	}

	.rms-header__utility .rms-header__contact a,
	.rms-header__utility .rms-header__account strong {
		font-size: 11px;
	}
}

/* Collapse the secondary navigation into a compact mobile accordion. */
.rms-mobile-nav-toggle {
	display: none;
}

@media (max-width: 800px) {
	.rms-header__top {
		grid-template-columns: minmax(0, 1fr) auto 48px;
		gap: 8px;
	}

	.rms-header__cart {
		grid-column: 2;
		grid-row: 1;
	}

	.rms-header__top > .rms-mobile-nav-toggle {
		grid-column: 3;
		grid-row: 1;
		align-self: center;
	}

	.rms-header__nav {
		display: block;
	}

	.rms-header__nav > .rms-catalog-button {
		display: flex;
		width: 100%;
	}

	.rms-mobile-nav-toggle {
		display: flex;
		width: 48px;
		height: 48px;
		padding: 0;
		border: 1px solid #d7e0e7;
		border-radius: 10px;
		background: #fff;
		color: #14243f;
		cursor: pointer;
		transition: border-color .18s ease, background-color .18s ease, color .18s ease;
	}

	.rms-mobile-nav-toggle:hover,
	.rms-mobile-nav-toggle:focus-visible {
		border-color: #ed1b2f;
		color: #ed1b2f;
	}

	.rms-mobile-nav-toggle__icon {
		display: flex;
		width: 22px;
		height: 18px;
		flex-direction: column;
		justify-content: space-between;
	}

	.rms-mobile-nav-toggle__icon i {
		display: block;
		width: 22px;
		height: 2px;
		border-radius: 99px;
		background: currentColor;
		transition: transform .18s ease, opacity .18s ease;
	}

	.rms-mobile-nav-toggle[aria-expanded='true'] {
		border-color: #ed1b2f;
		background: #fff4f5;
		color: #ed1b2f;
	}

	.rms-mobile-nav-toggle[aria-expanded='true'] .rms-mobile-nav-toggle__icon i:nth-child(2) {
		opacity: 0;
	}

	.rms-mobile-nav-toggle[aria-expanded='true'] .rms-mobile-nav-toggle__icon i:first-child {
		transform: translateY(8px) rotate(45deg);
	}

	.rms-mobile-nav-toggle[aria-expanded='true'] .rms-mobile-nav-toggle__icon i:last-child {
		transform: translateY(-8px) rotate(-45deg);
	}

	.rms-header__nav > .rms-nav {
		display: none !important;
		width: 100%;
		gap: 0;
		overflow: hidden;
		padding: 6px 0;
		border: 1px solid #e2e8ed;
		border-radius: 10px;
		background: #fff;
		box-shadow: 0 10px 24px rgba(20, 36, 63, .1);
	}

	.rms-header__nav > .rms-nav.is-open {
		display: flex !important;
	}

	.rms-header__nav > .rms-nav a {
		display: flex;
		min-height: 44px;
		align-items: center;
		padding: 0 16px;
		border-bottom: 1px solid #edf0f2;
		font-size: 15px;
		line-height: 1.25;
		text-decoration: none;
	}

	.rms-header__nav > .rms-nav a:last-child {
		border-bottom: 0;
	}

	/* Shopping first, then service and company information. */
	.rms-header__nav > .rms-nav a:nth-child(5) {
		order: 3;
	}

	.rms-header__nav > .rms-nav a:nth-child(3) {
		order: 4;
	}

	.rms-header__nav > .rms-nav a:nth-child(4) {
		order: 5;
	}
}

/* Final header alignment: keep the desktop account action visible and stable. */
@media (min-width: 801px) {
	.rms-header__top {
		grid-template-columns: 205px 125px minmax(280px, 1fr) 180px 150px 120px;
		gap: 16px;
	}

	.rms-header__account strong {
		gap: 6px;
		font-size: 13px;
		white-space: nowrap;
	}

	.rms-header__account strong .rms-icon {
		flex: 0 0 27px;
	}

	.rms-header__account-copy {
		display: flex;
		flex-direction: column;
		gap: 2px;
		line-height: 1.08;
	}

	.rms-header__account-copy a {
		color: inherit;
		text-decoration: none;
	}

	.rms-header__account-copy a:last-child {
		color: #ed1b2f;
	}

	.rms-header__account-separator {
		display: none;
	}
}

/* Mobile menu: a proper square control beside the cart and a dropdown below the nav bar. */
@media (max-width: 800px) {
	.rms-header__top {
		grid-template-columns: minmax(0, 1fr) auto 52px;
		gap: 10px;
	}

	.rms-header__nav-wrap {
		position: relative;
		overflow: visible;
	}

	.rms-header__nav {
		position: relative;
		display: block;
		height: 48px;
		overflow: visible;
	}

	.rms-mobile-nav-toggle {
		position: relative;
		display: block;
		width: 52px;
		height: 52px;
		padding: 0;
		border: 2px solid #ed1b2f;
		border-radius: 14px;
		background: #fff;
		color: #14243f;
		cursor: pointer;
		transition: border-color .18s ease, background-color .18s ease, color .18s ease;
	}

	.rms-mobile-nav-toggle:hover,
	.rms-mobile-nav-toggle:focus-visible {
		border-color: #ed1b2f;
		color: #ed1b2f;
	}

	.rms-mobile-nav-toggle__icon {
		position: absolute;
		top: 50%;
		left: 50%;
		display: flex;
		width: 27px;
		height: 18px;
		flex-direction: column;
		justify-content: space-between;
		transform: translate(-50%, -50%);
	}

	.rms-mobile-nav-toggle__icon i {
		display: block;
		width: 27px;
		height: 2.5px;
		border-radius: 99px;
		background: currentColor;
		transition: transform .18s ease, opacity .18s ease;
	}

	.rms-mobile-nav-toggle[aria-expanded='true'] {
		background: #fff4f5;
		color: #ed1b2f;
	}

	.rms-mobile-nav-toggle[aria-expanded='true'] .rms-mobile-nav-toggle__icon i:nth-child(2) {
		opacity: 0;
	}

	.rms-mobile-nav-toggle[aria-expanded='true'] .rms-mobile-nav-toggle__icon i:first-child {
		transform: translateY(7.75px) rotate(45deg);
	}

	.rms-mobile-nav-toggle[aria-expanded='true'] .rms-mobile-nav-toggle__icon i:last-child {
		transform: translateY(-7.75px) rotate(-45deg);
	}

	.rms-header__nav > .rms-nav {
		position: absolute;
		top: calc(100% + 8px);
		right: 0;
		left: 0;
		z-index: 70;
		box-sizing: border-box;
		width: 100%;
		max-height: min(420px, calc(100vh - 150px));
		overflow-y: auto;
		flex-direction: column;
		align-items: stretch;
	}

	.rms-header__nav > .rms-nav.is-open {
		display: flex !important;
	}
}
