/*
 * Toysprovider premium header + mega menu
 * Global, site-wide header rendered via the `avada_render_header` hook.
 */

:root {
	--tp-ink: #111214;
	--tp-copy: #43464c;
	--tp-muted: #777b82;
	--tp-line: #e7e7e7;
	--tp-warm: #fdf3ec;
	--tp-orange: #ed6b1f;
	--tp-orange-dark: #d95c14;
	--tp-white: #fff;
	--tp-container: min(1360px, calc(100% - 48px));
	--tp-ease: cubic-bezier(.22, 1, .36, 1);
	--tp-header-h: 74px;
	--tp-nav-h: 44px;
}

.tp-header-root { position: relative; background: var(--tp-white); }
.tp-header-root * { box-sizing: border-box; }
.tp-header-root a { text-decoration: none; }

.tp-container { width: var(--tp-container); margin-inline: auto; }

/* ---------- Ticker ---------- */
.tp-ticker-bar { height: 34px; overflow: hidden; background: var(--tp-ink); color: #fff; }
.tp-ticker { width: 100%; height: 100%; overflow: hidden; }
.tp-ticker-track {
	display: flex;
	width: max-content;
	height: 100%;
	align-items: center;
	animation: tp-ticker-scroll 34s linear infinite;
	will-change: transform;
}
.tp-ticker:hover .tp-ticker-track { animation-play-state: paused; }
.tp-ticker-group { display: flex; height: 100%; align-items: center; flex: 0 0 auto; }
.tp-ticker-item {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	height: 100%;
	flex: 0 0 auto;
	padding-inline: 22px;
	font-size: 12px;
	font-weight: 500;
	letter-spacing: .01em;
	white-space: nowrap;
	opacity: .92;
}
.tp-ticker-item svg { width: 14px; height: 14px; flex: 0 0 14px; color: var(--tp-orange); }
@keyframes tp-ticker-scroll {
	from { transform: translate3d(0, 0, 0); }
	to { transform: translate3d(-50%, 0, 0); }
}

/* ---------- Header shell / sticky ---------- */
.tp-header {
	position: sticky;
	top: 0;
	z-index: 900;
	background: var(--tp-white);
	border-bottom: 1px solid var(--tp-line);
	transition: box-shadow .25s var(--tp-ease);
}
.tp-header.is-stuck { box-shadow: 0 6px 20px rgba(17, 18, 20, .08); }

/* ---------- Main row: logo / actions ---------- */
.tp-header-main__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 28px;
	height: var(--tp-header-h);
}
.tp-logo { display: flex; align-items: center; height: 100%; }
.tp-logo img { width: auto; max-width: 190px; max-height: 46px; height: auto; display: block; }
.tp-logo-text { font-size: 21px; font-weight: 800; color: var(--tp-ink); letter-spacing: -.01em; }

.tp-search { position: relative; max-width: 620px; }
/* Search sits at the right end of the category nav row. */
.tp-nav__inner .tp-search { flex: 0 0 320px; max-width: 320px; }
.tp-nav__inner .tp-search__input { height: 34px; padding: 0 40px 0 16px; font-size: 13px; background: #f4f4f4; }
.tp-nav__inner .tp-search__btn { width: 27px; height: 27px; right: 4px; }
.tp-nav__inner .tp-search__btn svg { width: 15px; height: 15px; }
.tp-search__input {
	width: 100%;
	height: 44px;
	padding: 0 46px 0 18px;
	border: 1px solid var(--tp-line);
	border-radius: 999px;
	background: #f7f7f7;
	color: var(--tp-ink);
	font-size: 14px;
	transition: border-color .2s, background .2s, box-shadow .2s;
}
.tp-search__input::placeholder { color: var(--tp-muted); }
.tp-search__input:focus {
	outline: none;
	border-color: var(--tp-orange);
	background: var(--tp-white);
	box-shadow: 0 0 0 3px rgba(237, 107, 31, .12);
}
.tp-search__btn {
	position: absolute;
	top: 50%;
	right: 5px;
	transform: translateY(-50%);
	width: 34px;
	height: 34px;
	display: flex;
	align-items: center;
	justify-content: center;
	border: 0;
	border-radius: 999px;
	background: var(--tp-orange);
	color: #fff;
	cursor: pointer;
	transition: background .2s, transform .2s var(--tp-ease);
}
.tp-search__btn:hover { background: var(--tp-orange-dark); transform: translateY(-50%) scale(1.04); }
.tp-search__btn svg { width: 17px; height: 17px; }

.tp-actions { display: flex; align-items: center; gap: 4px; justify-self: end; }
.tp-actions__item {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 2px;
	padding: 6px 10px;
	border-radius: 10px;
	color: var(--tp-ink);
	transition: background .18s, color .18s;
}
.tp-actions__item:hover { background: var(--tp-warm); color: var(--tp-orange); }
.tp-actions__item svg { width: 22px; height: 22px; }
.tp-actions__label { font-size: 10.5px; font-weight: 600; letter-spacing: .02em; white-space: nowrap; }
.tp-cart { position: relative; }
.tp-cart-count {
	position: absolute;
	top: 0;
	right: 2px;
	min-width: 16px;
	height: 16px;
	padding: 0 4px;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 999px;
	background: var(--tp-orange);
	color: #fff;
	font-size: 10px;
	font-weight: 700;
	line-height: 1;
}
.tp-cart-count[data-count="0"] { display: none; }

.tp-lang.tp-actions__item { padding: 6px 8px; }
.tp-lang .gtranslate_wrapper { transform: scale(.92); transform-origin: center; }

.tp-mobile-toggle {
	display: none;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	border: 1px solid var(--tp-line);
	border-radius: 10px;
	background: var(--tp-white);
	color: var(--tp-ink);
	cursor: pointer;
}
.tp-mobile-toggle svg { width: 20px; height: 20px; }

/* ---------- Category nav ---------- */
.tp-nav { border-top: 1px solid var(--tp-line); background: var(--tp-white); }
.tp-nav__inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; height: var(--tp-nav-h); }
.tp-nav__list { display: flex; align-items: center; gap: 4px; list-style: none; margin: 0; padding: 0; flex: 0 1 auto; min-width: 0; }
.tp-nav__item { position: static; }
.tp-nav__link {
	position: relative;
	display: inline-flex;
	align-items: center;
	height: var(--tp-nav-h);
	padding: 0 13px;
	font-size: 13.5px;
	font-weight: 600;
	color: var(--tp-ink);
	white-space: nowrap;
}
.tp-nav__link::after {
	content: "";
	position: absolute;
	left: 13px;
	right: 13px;
	bottom: 8px;
	height: 2px;
	background: var(--tp-orange);
	transform: scaleX(0);
	transform-origin: left;
	transition: transform .22s var(--tp-ease);
}
.tp-nav__link:hover,
.tp-nav__item.is-open .tp-nav__link { color: var(--tp-orange); }
.tp-nav__link:hover::after,
.tp-nav__item.is-open .tp-nav__link::after { transform: scaleX(1); }
.tp-nav__sale { color: var(--tp-orange); font-weight: 700; }
.tp-nav__sale::after { background: var(--tp-orange); }

/* ---------- Mega menu ---------- */
.tp-mega {
	position: absolute;
	left: 0;
	right: 0;
	top: 100%;
	z-index: 890;
	background: var(--tp-white);
	border-top: 1px solid var(--tp-line);
	border-bottom: 1px solid var(--tp-line);
	box-shadow: 0 18px 40px rgba(17, 18, 20, .1);
	opacity: 0;
	visibility: hidden;
	transform: translateY(-6px);
	transition: opacity .26s var(--tp-ease), transform .26s var(--tp-ease), visibility 0s linear .26s;
}
.tp-mega.is-open {
	opacity: 1;
	visibility: visible;
	transform: translateY(0);
	transition: opacity .26s var(--tp-ease), transform .26s var(--tp-ease), visibility 0s linear 0s;
}
.tp-mega__inner { display: flex; align-items: stretch; min-height: 340px; max-height: 74vh; }

.tp-mega__sidebar {
	flex: 0 0 250px;
	border-right: 1px solid var(--tp-line);
	padding: 14px 8px;
	overflow-y: auto;
}
.tp-mega__sidebar-item {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	width: 100%;
	padding: 11px 14px;
	border: 0;
	border-radius: 10px;
	background: transparent;
	color: var(--tp-ink);
	font-size: 14px;
	font-weight: 600;
	text-align: left;
	cursor: pointer;
	transition: background .18s, color .18s;
}
.tp-mega__sidebar-item svg { width: 15px; height: 15px; flex: 0 0 15px; opacity: .45; transition: transform .18s var(--tp-ease); }
.tp-mega__sidebar-item:hover { background: var(--tp-warm); }
.tp-mega__sidebar-item.is-active { background: var(--tp-warm); color: var(--tp-orange); }
.tp-mega__sidebar-item.is-active svg { opacity: 1; transform: translateX(2px); color: var(--tp-orange); }

.tp-mega__content { flex: 1 1 auto; display: flex; min-width: 0; }
.tp-mega__panel {
	display: none;
	flex: 1 1 auto;
	padding: 26px 32px;
	gap: 32px;
	opacity: 0;
}
.tp-mega__panel.is-active { display: flex; opacity: 1; animation: tp-mega-fade .2s var(--tp-ease); }
@keyframes tp-mega-fade { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: translateY(0); } }

.tp-mega__browse { flex: 1 1 auto; min-width: 0; }
.tp-mega__heading {
	margin: 0 0 14px;
	font-size: 15px;
	font-weight: 700;
	color: var(--tp-ink);
}
.tp-mega__columns { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px 24px; }
.tp-mega__col { display: flex; flex-direction: column; gap: 2px; }
.tp-mega__col a {
	padding: 5px 0;
	font-size: 14px;
	color: var(--tp-copy);
	line-height: 1.4;
	transition: color .16s;
}
.tp-mega__col a:hover { color: var(--tp-orange); }
.tp-mega__viewall {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	margin-top: 16px;
	font-size: 13.5px;
	font-weight: 700;
	color: var(--tp-orange);
}
.tp-mega__viewall svg { width: 13px; height: 13px; transition: transform .18s var(--tp-ease); }
.tp-mega__viewall:hover svg { transform: translateX(3px); }
.tp-mega__empty { color: var(--tp-muted); font-size: 14px; }

.tp-mega__promo {
	position: relative;
	flex: 0 0 300px;
	display: flex;
	align-items: flex-end;
	border-radius: 14px;
	overflow: hidden;
	background: var(--tp-warm) center/cover no-repeat;
	min-height: 100%;
}
.tp-mega__promo::before {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(180deg, rgba(17, 18, 20, 0) 45%, rgba(17, 18, 20, .78) 100%);
}
.tp-mega__promo-body { position: relative; padding: 18px; color: #fff; }
.tp-mega__promo-label { display: block; font-size: 16px; font-weight: 800; letter-spacing: .01em; text-transform: uppercase; }
.tp-mega__promo-cta { display: inline-flex; align-items: center; gap: 6px; margin-top: 6px; font-size: 12.5px; font-weight: 600; color: #fff; opacity: .92; }
.tp-mega__promo-cta svg { width: 12px; height: 12px; }

/* ---------- Mobile drawer ---------- */
.tp-drawer__overlay {
	position: fixed;
	inset: 0;
	background: rgba(17, 18, 20, .45);
	opacity: 0;
	visibility: hidden;
	transition: opacity .25s var(--tp-ease), visibility 0s linear .25s;
	z-index: 999;
}
.tp-drawer__overlay.is-open { opacity: 1; visibility: visible; transition: opacity .25s var(--tp-ease); }

.tp-drawer {
	position: fixed;
	top: 0;
	right: 0;
	bottom: 0;
	width: min(360px, 88vw);
	background: #fff;
	transform: translateX(100%);
	transition: transform .3s var(--tp-ease);
	z-index: 1000;
	display: flex;
	flex-direction: column;
}
.tp-drawer.is-open { transform: translateX(0); }

.tp-drawer__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	height: 62px;
	padding: 0 18px;
	border-bottom: 1px solid var(--tp-line);
	flex: 0 0 auto;
}
.tp-drawer__title { font-size: 15px; font-weight: 800; color: var(--tp-ink); }
.tp-drawer__close {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	border: 0;
	background: none;
	color: var(--tp-ink);
	cursor: pointer;
}
.tp-drawer__close svg { width: 20px; height: 20px; }

.tp-drawer__body { flex: 1 1 auto; overflow-y: auto; padding: 6px 0 18px; }

.tp-drawer__acc-item { border-bottom: 1px solid var(--tp-line); }
.tp-drawer__acc-trigger {
	display: flex;
	align-items: center;
	justify-content: space-between;
	width: 100%;
	min-height: 50px;
	padding: 0 18px;
	border: 0;
	background: none;
	color: var(--tp-ink);
	font-size: 14.5px;
	font-weight: 600;
	text-align: left;
	cursor: pointer;
}
.tp-drawer__acc-trigger[href] { text-decoration: none; }
.tp-drawer__acc-trigger svg { width: 14px; height: 14px; flex: 0 0 14px; transition: transform .22s var(--tp-ease); color: var(--tp-muted); }
.tp-drawer__acc-item.is-open .tp-drawer__acc-trigger svg { transform: rotate(180deg); color: var(--tp-orange); }
.tp-drawer__acc-panel {
	max-height: 0;
	overflow: hidden;
	transition: max-height .28s var(--tp-ease);
	background: #fafafa;
}
.tp-drawer__acc-panel-inner { padding: 4px 18px 12px 30px; display: flex; flex-direction: column; }
.tp-drawer__acc-panel-inner a {
	padding: 9px 0;
	min-height: 44px;
	display: flex;
	align-items: center;
	font-size: 14px;
	color: var(--tp-copy);
	border-bottom: 1px dashed var(--tp-line);
}
.tp-drawer__acc-panel-inner a:last-child { border-bottom: 0; }
.tp-drawer__acc-panel-inner a:hover { color: var(--tp-orange); }

.tp-drawer__foot {
	flex: 0 0 auto;
	display: flex;
	align-items: center;
	justify-content: space-around;
	gap: 6px;
	padding: 14px 12px;
	border-top: 1px solid var(--tp-line);
}
.tp-drawer__foot .tp-actions__item { padding: 8px 10px; }
.tp-drawer__lang { display: flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; }

body.tp-drawer-open { overflow: hidden; }

/* ---------- Responsive ---------- */
@media (max-width: 1240px) {
	.tp-nav__inner .tp-search { flex-basis: 240px; max-width: 240px; }
}

@media (max-width: 1180px) {
	:root { --tp-container: min(100% - 32px, 1360px); }
	.tp-nav__link { padding: 0 10px; font-size: 13px; }
	.tp-nav__inner { gap: 16px; }
	.tp-mega__sidebar { flex-basis: 220px; }
	.tp-mega__promo { flex-basis: 240px; }
}

@media (max-width: 1023px) {
	.tp-mega { display: none !important; }
	/* Keep the nav row solely as the mobile search carrier. */
	.tp-nav { display: block !important; }
	.tp-nav__inner { height: auto; padding: 8px 0; gap: 0; }
	.tp-nav__list { display: none; }
	.tp-nav__inner .tp-search { flex: 1 1 auto; max-width: none; width: 100%; }
	.tp-nav__inner .tp-search__input { height: 40px; padding: 0 46px 0 16px; font-size: 14px; }
	.tp-nav__inner .tp-search__btn { width: 32px; height: 32px; right: 5px; }
	.tp-header-main__inner { gap: 14px; height: 66px; }
	.tp-actions__label { display: none; }
	.tp-actions__item { padding: 6px; }
	.tp-mobile-toggle { display: flex; }
	.tp-logo img { max-width: 150px; max-height: 38px; }
}

@media (max-width: 640px) {
	.tp-ticker-item { font-size: 11px; padding-inline: 16px; gap: 6px; }
	.tp-header-main__inner { gap: 10px; }
}

@media (prefers-reduced-motion: reduce) {
	.tp-ticker-track { animation: none !important; transform: none !important; }
	.tp-header-root *, .tp-header-root *::before, .tp-header-root *::after {
		animation-duration: .01ms !important;
		transition-duration: .01ms !important;
	}
}
