/* Pixel-parity overrides (parity-header). Loaded after all theme CSS. */

/* ---- Header, desktop (>= 901px) ---------------------------------- */
@media (min-width: 901px) {
	.header-nav .menu a {
		font-weight: 600;
	}

	/* right cluster: Sign in / heart / bag / search at the reference rhythm
	   (24px, 32px, ~14px incl. label overflow, search circle 29px with 2px ring). */
	.header-link,
	.header-icon-link {
		font-weight: 400;
		line-height: 15.6px;
		letter-spacing: 0.25px;
	}

	.header-right {
		gap: 0;
	}

	.site-header .header-right .lang-switch {
		margin-right: 24px;
		padding-right: 0;
	}

	.header-account {
		margin-right: 24px;
	}

	.header-wishlist {
		margin-right: 32px;
		opacity: 0.7;
		letter-spacing: 0.65px;
	}

	.header-wishlist:hover {
		opacity: 1;
	}

	.header-cart {
		width: 66px;
		margin-right: 14px;
		justify-content: flex-start;
	}

	.be-cart-count.is-empty {
		display: none;
	}

	.header-search {
		box-sizing: border-box;
		border-width: 2px;
		margin: 0;
	}
}

/* Scrolled bar keeps the top-state nav type; logo sits in the corner like the reference. */
@media (min-width: 1381px) {
	.site-header.is-scrolled .header-left {
		display: none;
	}

	.site-header.is-scrolled .brand-main {
		left: 28px;
		width: 149px;
	}

	.site-header.is-scrolled .header-nav .menu {
		gap: 34px;
	}

	.site-header.is-scrolled .header-nav .menu a {
		font-size: 1.16rem;
		letter-spacing: 0.075em;
	}

	body.be-lang-kz .site-header.is-scrolled .header-nav .menu {
		gap: 14px;
	}

	body.be-lang-kz .site-header.is-scrolled .header-nav .menu a {
		font-size: 1rem;
		letter-spacing: 0.04em;
	}
}

/* ---- Footer (desktop) -------------------------------------------- */
body .site-footer {
	font-weight: 400;
}

@media (min-width: 1200px) {
	.site-footer .footer-inner {
		width: 1200px;
		max-width: none;
		margin: 0 auto;
		padding: 0 0 0 16px;
	}

	/* logo + 3 reference-width columns (195px, text inset 15px); 4th column and
	   the side block share the remainder up to x=1320. */
	.footer-grid {
		grid-template-columns: 195px 195px 195px 195px 150px 254px;
		column-gap: 0;
	}

	.footer-col,
	.footer-side {
		padding-left: 15px;
		padding-right: 15px;
	}

	.footer-legal {
		margin-top: 80px;
	}

	.footer-copy {
		margin-top: 28px;
	}
}

.footer-logo {
	box-sizing: border-box;
	height: 21px;
	padding-top: 3px;
}

/* ---- Header, <= 1380px top state: logo 195px like the reference ---- */
@media (min-width: 901px) and (max-width: 1380px) {
	.site-header:not(.is-scrolled) .brand-main {
		width: 195px;
	}
}

/* ---- Header, mobile (<= 900px) ----------------------------------- */
@media (max-width: 900px) {
	.brand-main,
	.site-header.is-scrolled .brand-main {
		top: 20px;
	}

	.header-icon-link,
	.header-search {
		font-weight: 400;
		line-height: 15.6px;
		letter-spacing: 0.25px;
	}

	/* 13px glyph box like the reference; 44px tap target kept via ::after. */
	.header-search {
		position: relative;
		width: 13px;
		height: 13px;
		margin: 14px 17px 17px 0;
		align-self: flex-start;
		overflow: visible;
	}

	.header-search::after {
		content: "";
		position: absolute;
		inset: -16px;
	}
}

/* Footer min-height = reference footer height, so the copyright line sits at
   the same offset from the footer top (ref: copyright 42px above the bottom). */
.site-footer {
	display: flex;
	flex-direction: column;
	min-height: 467px;
}

.site-footer .footer-inner {
	flex: 1;
	align-self: stretch;
	display: flex;
	flex-direction: column;
	box-sizing: border-box;
}

.site-footer .footer-copy {
	margin-top: auto;
	padding-top: 28px;
}

@media (min-width: 1200px) {
	.site-footer .footer-inner {
		margin-left: auto;
		margin-right: auto;
	}
}

/* 1024-1199: logo + columns on 165px rhythm */
@media (min-width: 1024px) and (max-width: 1199px) {
	.site-footer { min-height: 497px; }

	.footer-grid {
		grid-template-columns: 165px 165px 165px 165px 165px minmax(0, 1fr);
		column-gap: 0;
		row-gap: 0;
	}

	.footer-brand { grid-column: auto; }
	.footer-side { grid-column: auto; }

	.footer-col,
	.footer-side {
		padding-left: 15px;
		padding-right: 15px;
	}

	.footer-legal { margin-top: 80px; }
}

/* 481-1023: 140px columns, side block on the right spanning two rows */
@media (min-width: 481px) and (max-width: 1023px) {
	.site-footer { min-height: 655px; }

	body .site-footer { padding-top: 60px; }

	.site-footer .footer-inner { padding: 0 16px; }

	.footer-grid {
		display: grid;
		grid-template-columns: 140px 140px 140px 1fr;
		column-gap: 0;
		align-items: start;
	}

	.footer-brand { grid-column: auto; margin: 0; }

	.footer-col {
		margin: 0;
		padding: 0 15px;
	}

	.footer-side {
		grid-column: 4;
		grid-row: 1 / span 2;
		margin: 0;
		padding-left: 76px;
	}

	.footer-title { font-size: 1.3rem; margin-bottom: 20px; }

	.footer-legal { margin-top: 80px; }
}

/* 390: reference stacks everything; logo 155px, title 104px from the top */
@media (max-width: 480px) {
	.site-footer { min-height: 1083px; }

	.footer-logo { width: 155px; }

	.footer-brand { margin-bottom: 55px; }
}

@media (max-width: 1199px) {
	.site-footer .footer-inner {
		width: 100%;
		max-width: none;
		margin-left: 0;
		margin-right: 0;
	}
}

/* Woo pages: `.woocommerce h2` must not restyle footer titles. */
body .site-footer .footer-title {
	font-family: inherit;
	font-size: 1.3rem;
	font-weight: 400;
	letter-spacing: 0.02em;
	line-height: 15px;
	text-transform: uppercase;
}

@media (min-width: 481px) and (max-width: 900px) {
	body .site-footer .footer-title { font-size: 1.3rem; }
}

@media (max-width: 480px) {
	body .site-footer .footer-title { font-size: 1.2rem; letter-spacing: 0.02em; }
}

/* Compact bar (<=1280): label and Sign in are hidden, so the cart/account boxes shrink. */
@media (min-width: 901px) and (max-width: 1280px) {
	.site-header.is-scrolled .header-cart {
		width: auto;
		margin-right: 24px;
	}

	.site-header.is-scrolled .header-wishlist {
		margin-right: 24px;
	}
}

/* KZ labels are long: tighten the compact bar so the centred menu clears logo and icons. */
@media (min-width: 901px) and (max-width: 1100px) {
	body.be-lang-kz .site-header.is-scrolled .header-nav .menu {
		gap: 10px;
	}

	body.be-lang-kz .site-header.is-scrolled .header-nav .menu a {
		font-size: 0.9rem;
		letter-spacing: 0.02em;
	}
}

/* Mobile: the reference shows only the bag icon; we add the count once the cart is not empty. */
@media (max-width: 900px) {
	.site-header .be-cart-count:not(.is-empty) {
		display: inline;
		margin-left: 4px;
		font-size: 1.1rem;
	}
}

/* "Корзина (N)" is wider than the reference's "Bag": size the link to its content so the count never slides under the search circle. */
@media (min-width: 901px) {
	.site-header .header-cart {
		width: auto;
		flex-shrink: 0;
	}

	.site-header:not(.is-scrolled) .header-cart {
		min-width: 66px;
	}
}
