/**
 * Announcement bar + sticky site header.
 */

/* ---------- Announcement bar / marquee ---------- */

.tb-announcement__bar {
	background: var(--tb-maroon);
	color: var(--tb-white);
	padding-block: 3px;
}

.tb-marquee {
	overflow: hidden;
	display: grid;
	justify-content: center;
}

.tb-marquee__track {
	display: flex;
	width: max-content;
	animation: tb-marquee-scroll 42s linear infinite;
}

.tb-marquee__group {
	display: flex;
	align-items: center;
	flex-shrink: 0;
}

.tb-marquee__item {
	font-size: 11px;
	line-height: 18.7px;
	font-weight: 700;
	margin: 0;
	white-space: nowrap;
	padding-inline: 5rem;
}

.tb-marquee__item a {
	color: var(--tb-white);
	text-decoration: none;
}

.tb-marquee__dot {
	width: 0.25rem;
	height: 0.25rem;
	border-radius: var(--tb-radius-pill);
	background: var(--tb-white);
	flex-shrink: 0;
	margin-inline-start: -4rem;
}

@keyframes tb-marquee-scroll {
	from {
		transform: translateX(0);
	}
	to {
		transform: translateX(-50%);
	}
}

@media (prefers-reduced-motion: reduce) {
	.tb-marquee__track {
		animation: none;
	}
}

/* ---------- Sticky header ---------- */

.tb-header {
	position: sticky;
	top: 0;
	z-index: 10;
	background: rgba(243, 243, 243, 0.54);
	backdrop-filter: blur(2px);
	-webkit-backdrop-filter: blur(2px);
	transition: background 0.25s;
}

.tb-header__bar {
	display: grid;
	grid-template-areas: "logo main-nav secondary-nav";
	grid-template-columns: minmax(0, 1fr) fit-content(70%) minmax(0, 1fr);
	align-items: center;
	gap: 40px;
	padding-block: 10px;
	max-width: var(--tb-container-max);
}

.tb-header__logo {
	grid-area: logo;
	margin: 0;
}

.tb-header__logo a {
	display: inline-block;
	width: 100px;
	height: 28px;
	text-decoration: none;
}

.tb-header__logo img {
	width: 100%;
	height: 100%;
	object-fit: contain;
}

.tb-header__main-nav {
	grid-area: main-nav;
	display: flex;
	align-items: center;
	gap: 24px;
}

.tb-header__burger,
.tb-header__mobile-search {
	display: none;
	color: var(--tb-black);
}

.tb-nav__list {
	display: contents;
}

.tb-nav {
	display: flex;
}

.tb-nav__list {
	display: flex;
	gap: 16px 40px;
	flex-wrap: wrap;
	justify-content: center;
}

.tb-nav__item {
	/* Not position:relative — the Brands flyout (.tb-mega-brands) needs its
	   absolute positioning to resolve against .tb-header (full width), not
	   this narrow nav item. */
	position: static;
}

.tb-nav__link {
	font-weight: 700;
	font-size: 14px;
	line-height: 22.4px;
	color: var(--tb-text-nav);
	text-decoration: none;
	background: transparent;
	border: 0;
	display: inline-flex;
	align-items: center;
	gap: 10px;
	padding: 0;
	transition: color 0.2s ease-in-out;
}

.tb-nav__link:hover {
	opacity: 0.7;
}

.tb-nav__caret {
	position: relative;
	top: 1px;
	transition: transform 0.2s ease-in-out;
	flex-shrink: 0;
}

.tb-nav__link--toggle[aria-expanded="true"] .tb-nav__caret {
	transform: rotate(180deg);
}

.tb-header__secondary-nav {
	grid-area: secondary-nav;
	display: flex;
	justify-content: flex-end;
}

.tb-icon-list {
	display: flex;
	gap: 12px 40px;
	flex-wrap: wrap;
}

.tb-icon-list__item {
	display: flex;
}

.tb-header__icon-link {
	position: relative;
	color: var(--tb-black);
}

.tb-cart-count {
	position: absolute;
	top: -5px;
	left: 14px;
	width: 16px;
	height: 16px;
	display: grid;
	place-items: center;
	border-radius: var(--tb-radius-pill);
	background: var(--tb-text);
	color: var(--tb-white);
	font-size: 9px;
	font-weight: 700;
	line-height: 1;
}

.tb-cart-count[data-tb-count="0"] {
	opacity: 0;
}

/* ---------- Responsive ---------- */

@media (max-width: 989px) {
	.tb-header__burger,
	.tb-header__mobile-search {
		display: inline-flex;
	}

	.tb-nav {
		display: none;
	}

	.tb-header__bar {
		display: flex;
		align-items: center;
		justify-content: space-between;
		padding-inline: 20px;
	}

	.tb-header__main-nav {
		order: 1;
	}

	.tb-header__logo {
		order: 2;
	}

	.tb-header__secondary-nav {
		order: 3;
	}
}

@media (min-width: 990px) {
	.tb-header__bar {
		padding-inline: 52.5px;
	}
}
