/* ==========================================================
   Tilila Modern Header — edit the variables to restyle
   ========================================================== */
:root {
	--tl-accent: #D81C22;        /* main red */
	--tl-accent-soft: #fdecec;   /* light red backgrounds */
	--tl-ink: #1d1a1c;           /* text */
	--tl-muted: #7b7278;
	--tl-line: rgba(29, 26, 28, .08);
	--tl-bg: rgba(255, 255, 255, .82);
	--tl-topbar-bg: #1d1a1c;
	--tl-topbar-ink: #fff;
	--tl-radius: 999px;
	--tl-h: 76px;                /* header height */
	--tl-font: "Poppins", system-ui, -apple-system, "Segoe UI", sans-serif;
}

.tl-wrap { max-width: 1280px; margin: 0 auto; padding: 0 24px; }
.tl-ico { width: 22px; height: 22px; display: block; flex: none; }
.tl-header *, .tl-drawer *, .tl-topbar * { box-sizing: border-box; }

/* ---------- Top bar ---------- */
.tl-topbar { background: var(--tl-topbar-bg); color: var(--tl-topbar-ink); font: 500 12.5px/1 var(--tl-font); letter-spacing: .02em; }
.tl-topbar__in { display: flex; align-items: center; justify-content: space-between; height: 38px; gap: 16px; }
.tl-topbar__side { display: flex; align-items: center; gap: 6px; color: inherit !important; text-decoration: none; opacity: .8; transition: opacity .2s; white-space: nowrap; }
.tl-topbar__side:hover { opacity: 1; }
.tl-topbar__side .tl-ico { width: 14px; height: 14px; }
.tl-ticker { position: relative; flex: 1; height: 100%; overflow: hidden; text-align: center; }
.tl-ticker__item { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; opacity: 0; transform: translateY(100%); transition: opacity .5s, transform .5s; }
.tl-ticker__item.is-active { opacity: 1; transform: none; }
.tl-ticker__item.is-leaving { opacity: 0; transform: translateY(-100%); }

/* ---------- Header ---------- */
.tl-header {
	position: sticky; top: 0; z-index: 999;
	background: var(--tl-bg);
	-webkit-backdrop-filter: saturate(180%) blur(14px);
	backdrop-filter: saturate(180%) blur(14px);
	border-bottom: 1px solid var(--tl-line);
	font-family: var(--tl-font);
	transition: box-shadow .3s, background .3s;
}
.admin-bar .tl-header { top: 32px; }
.tl-header.is-scrolled { box-shadow: 0 8px 30px -12px rgba(29, 26, 28, .18); --tl-h: 64px; }
.tl-header__in { position: relative; display: flex; align-items: center; gap: 28px; height: var(--tl-h); transition: height .3s; }

/* Logo */
.tl-logo { display: flex; align-items: center; flex: none; text-decoration: none !important; }
.tl-logo__img { height: 44px; width: auto; transition: height .3s; }
.tl-header.is-scrolled .tl-logo__img { height: 36px; }
.tl-logo__txt { font: 600 24px/1 var(--tl-font); color: var(--tl-ink); letter-spacing: -.02em; }
.tl-logo__txt em { font-style: normal; font-weight: 400; color: var(--tl-accent); margin-left: 2px; }

/* Nav */
.tl-nav { flex: 1; min-width: 0; }
.tl-nav__list { display: flex; align-items: center; gap: 4px; margin: 0; padding: 0; list-style: none; }
.tl-nav__list > li { position: relative; margin: 0; }
.tl-nav__list > li > a {
	position: relative; display: block; padding: 10px 14px;
	font-size: 14.5px; font-weight: 500; color: var(--tl-ink) !important;
	text-decoration: none !important; white-space: nowrap; border-radius: var(--tl-radius);
	transition: color .2s, background .2s;
}
.tl-nav__list > li > a::after {
	content: ""; position: absolute; left: 14px; right: 14px; bottom: 5px; height: 2px;
	background: var(--tl-accent); border-radius: 2px; transform: scaleX(0); transform-origin: left; transition: transform .3s ease;
}
.tl-nav__list > li > a:hover::after,
.tl-nav__list > li.current-menu-item > a::after,
.tl-nav__list > li.current-product_cat-ancestor > a::after { transform: scaleX(1); }
.tl-nav__list > li.tl-sale > a,
.tl-nav__list > li.tl-sale > a:hover { color: var(--tl-accent) !important; }

/* Dropdown (sub-menu) */
.tl-nav .sub-menu {
	position: absolute; top: calc(100% + 8px); left: 0; min-width: 220px; padding: 8px; margin: 0; list-style: none;
	background: #fff; border: 1px solid var(--tl-line); border-radius: 16px; box-shadow: 0 20px 40px -16px rgba(29,26,28,.25);
	opacity: 0; visibility: hidden; transform: translateY(6px); transition: all .25s ease;
}
.tl-nav .sub-menu::before { content: ""; position: absolute; left: 0; right: 0; top: -10px; height: 10px; }
.tl-nav li:hover > .sub-menu, .tl-nav li:focus-within > .sub-menu { opacity: 1; visibility: visible; transform: none; }
.tl-nav .sub-menu a { display: block; padding: 10px 14px; border-radius: 10px; font-size: 14px; color: var(--tl-ink) !important; text-decoration: none !important; }
.tl-nav .sub-menu a:hover { background: var(--tl-accent-soft); color: var(--tl-accent) !important; }

/* Actions */
.tl-actions { display: flex; align-items: center; gap: 6px; margin-left: auto; }
.tl-btn {
	position: relative; display: inline-grid; place-items: center; width: 44px; height: 44px; padding: 0;
	border: 0; border-radius: 50%; background: transparent; color: var(--tl-ink) !important; cursor: pointer;
	transition: background .2s, color .2s, transform .15s;
}
.tl-btn:hover { background: var(--tl-accent-soft); color: var(--tl-accent) !important; }
.tl-btn:active { transform: scale(.94); }
.tl-cart { background: var(--tl-ink); color: #fff !important; }
.tl-cart:hover { background: var(--tl-accent); color: #fff !important; }
.tl-cart__count {
	position: absolute; top: -2px; right: -2px; min-width: 20px; height: 20px; padding: 0 5px;
	display: grid; place-items: center; border-radius: 10px; border: 2px solid #fff;
	background: var(--tl-accent); color: #fff; font: 600 11px/1 var(--tl-font);
	transition: transform .3s cubic-bezier(.3,1.6,.5,1);
}
.tl-cart__count.is-empty { transform: scale(0); }
.tl-cart__count.is-bump { animation: tl-bump .5s; }
@keyframes tl-bump { 40% { transform: scale(1.35); } }

/* Search */
.tl-search { position: relative; display: flex; align-items: center; margin: 0; }
.tl-search .tl-ico { position: absolute; left: 16px; width: 18px; height: 18px; color: var(--tl-muted); pointer-events: none; }
.tl-search input[type="search"] {
	width: 100%; height: 44px; padding: 0 18px 0 44px; margin: 0;
	border: 1px solid var(--tl-line); border-radius: var(--tl-radius); background: #f6f3f5;
	font: 400 14px var(--tl-font); color: var(--tl-ink); outline: none; box-shadow: none;
	transition: border-color .2s, background .2s, box-shadow .2s;
}
.tl-search input[type="search"]:focus { background: #fff; border-color: var(--tl-accent); box-shadow: 0 0 0 4px var(--tl-accent-soft); }
.tl-search-desk { width: 260px; transition: width .3s ease; }
.tl-search-desk:focus-within { width: 320px; }
.tl-search-toggle { display: none; }
.tl-search-pop { border-top: 1px solid var(--tl-line); padding: 12px 0 16px; }
.tl-search-pop[hidden] { display: none; }
.tl-header .screen-reader-text, .tl-drawer .screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* Burger + drawer */
.tl-burger { display: none; }
.tl-overlay { position: fixed; inset: 0; z-index: 1000; background: rgba(29,26,28,.4); opacity: 0; transition: opacity .3s; }
.tl-overlay.is-open { opacity: 1; }
.tl-overlay[hidden] { display: none; }
.tl-drawer {
	position: fixed; top: 0; left: 0; bottom: 0; z-index: 1001; width: min(86vw, 360px);
	display: flex; flex-direction: column; gap: 18px; padding: 20px;
	background: #fff; font-family: var(--tl-font); overflow-y: auto;
	transform: translateX(-102%); transition: transform .35s cubic-bezier(.2,.8,.2,1);
}
.tl-drawer.is-open { transform: none; box-shadow: 20px 0 60px -20px rgba(0,0,0,.3); }
.tl-drawer__head { display: flex; align-items: center; justify-content: space-between; }
.tl-drawer__list, .tl-drawer__list .sub-menu { list-style: none; margin: 0; padding: 0; }
.tl-drawer__list a { display: block; padding: 14px 4px; border-bottom: 1px solid var(--tl-line); font-size: 16px; font-weight: 500; color: var(--tl-ink) !important; text-decoration: none !important; }
.tl-drawer__list .sub-menu a { padding-left: 18px; font-size: 14.5px; font-weight: 400; color: var(--tl-muted) !important; }
.tl-drawer__list .tl-sale > a { color: var(--tl-accent) !important; }
.tl-drawer__foot { margin-top: auto; display: grid; gap: 8px; }
.tl-drawer__foot a { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-radius: 14px; background: var(--tl-accent-soft); color: var(--tl-ink) !important; text-decoration: none !important; font-size: 14px; font-weight: 500; }
.tl-drawer__foot .tl-ico { width: 18px; height: 18px; color: var(--tl-accent); }
body.tl-lock { overflow: hidden; }

/* ---------- Responsive ---------- */
@media (max-width: 1180px) {
	.tl-search-desk { display: none; }
	.tl-search-toggle { display: inline-grid; }
	.tl-nav__list > li > a { padding: 10px 11px; }
}
@media (max-width: 960px) {
	.tl-nav { display: none; }
	.tl-burger { display: inline-grid; }
	.tl-header__in { gap: 8px; }
	.tl-logo { position: absolute; left: 50%; transform: translateX(-50%); }
	.tl-wrap { padding: 0 16px; }
}
@media (max-width: 782px) {
	.admin-bar .tl-header { top: 46px; }
}
@media (max-width: 600px) {
	:root { --tl-h: 64px; }
	.tl-logo__img { height: 36px; }
	.tl-hide-sm { display: none; }
	.tl-topbar__side { display: none; }
	.admin-bar .tl-header { top: 0; }
}
@media (prefers-reduced-motion: reduce) {
	.tl-header *, .tl-drawer, .tl-ticker__item { transition: none !important; animation: none !important; }
}

/* ---------- v1.0.2: dropdown arrows, 3rd level, mobile accordion ---------- */
.tl-nav__list > li.menu-item-has-children > a { padding-right: 30px; }
.tl-nav__list > li.menu-item-has-children > a::before {
	content: ""; position: absolute; right: 13px; top: 50%; width: 6px; height: 6px; margin-top: -5px;
	border-right: 1.6px solid currentColor; border-bottom: 1.6px solid currentColor;
	transform: rotate(45deg); transition: transform .25s, margin .25s;
}
.tl-nav__list > li.menu-item-has-children:hover > a::before { transform: rotate(225deg); margin-top: -1px; }
.tl-nav__list > li.menu-item-has-children > a::after { right: 30px; }
.tl-nav .sub-menu li { position: relative; }
.tl-nav .sub-menu .sub-menu { top: -9px; left: calc(100% + 8px); }
.tl-nav .sub-menu .sub-menu::before { top: 0; left: -10px; width: 10px; height: 100%; }
.tl-nav .sub-menu .menu-item-has-children > a::after { content: "›"; float: right; margin-left: 12px; opacity: .5; }
.tl-nav__list > li:nth-last-child(-n+2) > .sub-menu { left: auto; right: 0; }

.tl-drawer__list li { position: relative; }
.tl-drawer__list .tl-sub-toggle {
	position: absolute; right: 0; top: 4px; width: 44px; height: 44px; border: 0; border-radius: 50%;
	background: transparent; color: var(--tl-ink); cursor: pointer; display: grid; place-items: center;
}
.tl-drawer__list .tl-sub-toggle::before {
	content: ""; width: 8px; height: 8px; margin-top: -4px; border-right: 1.8px solid currentColor; border-bottom: 1.8px solid currentColor;
	transform: rotate(45deg); transition: transform .25s;
}
.tl-drawer__list li.is-open > .tl-sub-toggle::before { transform: rotate(225deg); margin-top: 4px; }
.tl-drawer__list .menu-item-has-children > a { padding-right: 50px; }
.tl-drawer__list .sub-menu { display: none; }
.tl-drawer__list li.is-open > .sub-menu { display: block; }
.tl-drawer__list .sub-menu .sub-menu a { padding-left: 32px; }
