/**
 * Petopia header redesign — Woodmart Header Builder overrides.
 * Design source: Figma/Navbar.pdf (desktop), Figma/Header.pdf (mobile)
 * Scoped to body.petopia-redesign-v1
 */

body.petopia-redesign-v1 {
	--petopia-brand-blue: #003bd1;
	--petopia-brand-pink: #ff3b81;
	--petopia-border-gray: #d9d9d9;
	--petopia-placeholder-gray: #666666;

	--petopia-pill-max-width: 1198px;
	--petopia-pill-max-width-mobile: calc(100% - 16px);
	--petopia-pill-height-desktop: 95px;
	--petopia-pill-height-mobile: 46px;
	--petopia-pill-radius-desktop:35px;
	--petopia-pill-radius-mobile: 35px;
	--petopia-pill-bg-desktop: rgba(255, 255, 255, 0.5);
	--petopia-pill-bg-mobile: #ffffff;
	--petopia-pill-shadow-desktop: 0 4px 30px rgba(0, 0, 0, 0.1);
	--petopia-pill-shadow-mobile: 0 4px 16px rgba(0, 0, 0, 0.08);
	--petopia-pill-padding-desktop: 0 36px;
	--petopia-page-gutter: 16px;

	--petopia-search-width: 292px;
	--petopia-search-height: 42px;
	--petopia-search-radius: 35px;
	--petopia-icon-size: 32px;
	--petopia-mobile-search-inset-left: 20px;
	--petopia-mobile-menu-inset-right: 20px;
}

/* No top bar in Navbar.pdf */
body.petopia-redesign-v1 .whb-top-bar {
	display: none !important;
}

/* Transparent WHB shell — pill carries the visual */
body.petopia-redesign-v1 .whb-header {
	background: transparent;
	box-shadow: none !important;
}

body.petopia-redesign-v1 .whb-main-header {
	padding: 24px var(--petopia-page-gutter) 0;
}

body.petopia-redesign-v1 .whb-general-header {
	background: transparent !important;
	border: none !important;
}

body.petopia-redesign-v1 .whb-general-header > .container {
	max-width: calc(var(--petopia-pill-max-width) + 72px);
	padding-inline: 0;
}

/* Desktop pill — Navbar.pdf: 1198×126, r50, white 50%, soft black shadow */
body.petopia-redesign-v1 .whb-general-header .whb-flex-row.whb-general-header-inner {
	background: var(--petopia-pill-bg-desktop);
	backdrop-filter: blur(12px);
	-webkit-backdrop-filter: blur(12px);
	border-radius: var(--petopia-pill-radius-desktop);
	min-height: var(--petopia-pill-height-desktop);
	max-width: var(--petopia-pill-max-width);
	padding: var(--petopia-pill-padding-desktop);
	margin-inline: auto;
	box-shadow: var(--petopia-pill-shadow-desktop);
	align-items: center;
	gap: 24px;
}

@media (min-width: 1025px) {
	body.petopia-redesign-v1 .whb-sticky-header.whb-clone .whb-general-header-inner,
	body.petopia-redesign-v1 .whb-sticked .whb-general-header .whb-general-header-inner {
		background: rgba(255, 255, 255, 0.92);
		box-shadow: var(--petopia-pill-shadow-desktop);
	}
}

/* Logo — compact to match shorter pill */
body.petopia-redesign-v1 .whb-general-header .site-logo img {
	max-height: 36px !important;
	width: auto !important;
	max-width: 130px !important;
}

/* Nav links — 18px #003BD1, ~24px gap */
body.petopia-redesign-v1 .whb-general-header .wd-header-main-nav .woodmart-nav-link,
body.petopia-redesign-v1 .whb-general-header .wd-header-main-nav .nav-link-text {
	color: var(--petopia-brand-blue) !important;
	font-family: "YekanBakhFaNum", "Yekan Bakh FaNum", sans-serif;
	font-size: 18px;
	font-weight: 500;
}

body.petopia-redesign-v1 .whb-general-header .wd-header-main-nav > .menu {
	gap: 24px;
}

body.petopia-redesign-v1 .whb-general-header .wd-header-main-nav > .menu > li > a:hover,
body.petopia-redesign-v1 .whb-general-header .wd-header-main-nav > .menu > li.current-menu-item > a {
	opacity: 0.85;
}

/* Hide items not in Navbar.pdf */
body.petopia-redesign-v1 .whb-general-header .wd-header-divider,
body.petopia-redesign-v1 .whb-general-header .wd-header-wishlist,
body.petopia-redesign-v1 .whb-general-header .wd-header-compare,
body.petopia-redesign-v1 .whb-general-header .wd-header-cats {
	display: none !important;
}

/* Cart + account — icon only, hide subtotal text (icons set in Header Builder) */
body.petopia-redesign-v1 .whb-general-header .wd-header-cart > a,
body.petopia-redesign-v1 .whb-general-header .wd-header-my-account > a {
	color: var(--petopia-brand-pink) !important;
}

body.petopia-redesign-v1 .whb-general-header .wd-header-cart .wd-tools-text,
body.petopia-redesign-v1 .whb-general-header .wd-header-my-account .wd-tools-text {
	display: none !important;
}

body.petopia-redesign-v1 .whb-general-header .wd-header-cart .wd-cart-number {
	top: -4px;
	inset-inline-end: -4px;
	background: var(--petopia-brand-pink);
	color: #fff;
	font-size: 10px;
	min-width: 16px;
	height: 16px;
	line-height: 16px;
}

/* Desktop search field — 292×48, 1px #D9D9D9, r24, blue circle button inline-end */
body.petopia-redesign-v1 .whb-general-header .wd-header-search.wd-display-full-screen {
	position: relative;
}

body.petopia-redesign-v1 .whb-general-header .wd-header-search.wd-display-full-screen > a {
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: flex-start;
	width: var(--petopia-search-width);
	min-height: var(--petopia-search-height);
	padding-inline: 24px 44px;
	border: 1px solid var(--petopia-border-gray);
	border-radius: var(--petopia-search-radius);
	background: transparent;
	color: var(--petopia-placeholder-gray);
}

body.petopia-redesign-v1 .whb-general-header .wd-header-search.wd-display-full-screen > a::before {
	content: "دنبال چی میگردی؟";
	font-family: "YekanBakhFaNum", "Yekan Bakh FaNum", sans-serif;
	font-size: 14px;
	font-weight: 400;
	color: var(--petopia-placeholder-gray);
	line-height: 1;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

body.petopia-redesign-v1 .whb-general-header .wd-header-search.wd-display-full-screen .wd-tools-text {
	display: none !important;
}

/* Column balance — logo start, nav center, tools end (RTL logical) */
body.petopia-redesign-v1 .whb-general-header .whb-col-left,
body.petopia-redesign-v1 .whb-general-header .whb-col-center,
body.petopia-redesign-v1 .whb-general-header .whb-col-right {
	display: flex;
	align-items: center;
	gap: 24px;
}

body.petopia-redesign-v1 .whb-general-header .whb-col-center {
	flex: 1 1 auto;
	justify-content: center;
}

body.petopia-redesign-v1 .whb-general-header .whb-col-left,
body.petopia-redesign-v1 .whb-general-header .whb-col-right {
	flex: 0 0 auto;
}

/* ─── Mobile / tablet — Header.pdf ─── */
@media (max-width: 1024px) {
	body.petopia-redesign-v1 .whb-main-header {
		padding-top: 23px;
	}

	/* Header.pdf: 358×46 pill, r20 — shadow lives on inner only, not .container */
	body.petopia-redesign-v1 .whb-general-header {
		background: transparent !important;
		margin: 0 !important;
		border-radius: 0 !important;
		box-shadow: none !important;
	}

	body.petopia-redesign-v1 .whb-general-header > .container,
	body.petopia-redesign-v1 .whb-general-header div.container {
		box-shadow: none !important;
		border-radius: 0 !important;
		background: transparent !important;
		max-width: var(--petopia-pill-max-width-mobile);
		margin-inline: auto;
		padding-inline: 0 !important;
		width: 100%;
	}

	body.petopia-redesign-v1 .whb-general-header .whb-flex-row.whb-general-header-inner {
		background: var(--petopia-pill-bg-mobile);
		backdrop-filter: none;
		-webkit-backdrop-filter: none;
		border-radius: var(--petopia-pill-radius-mobile);
		min-height: var(--petopia-pill-height-mobile);
		max-width: var(--petopia-pill-max-width-mobile);
		padding: 0 4px;
		margin-inline: auto;
		box-shadow: var(--petopia-pill-shadow-mobile);
		gap: 0;
		justify-content: space-between;
	}

	body.petopia-redesign-v1 .whb-general-header .site-logo img {
		max-height: 36px !important;
		max-width: 130px !important;
	}

	body.petopia-redesign-v1 .whb-general-header .wd-header-main-nav {
		display: none !important;
	}

	/* Mobile header: icon-only tools — no Woodmart text/bar wrappers (Header.pdf) */
	body.petopia-redesign-v1 .whb-general-header .wd-header-cart,
	body.petopia-redesign-v1 .whb-general-header .wd-header-my-account,
	body.petopia-redesign-v1 .whb-general-header .wd-header-divider,
	body.petopia-redesign-v1 .whb-general-header .wd-header-wishlist,
	body.petopia-redesign-v1 .whb-general-header .wd-header-compare {
		display: none !important;
	}

	/* Strip Woodmart design-6/7/8 pill bars on all mobile header tools */
	body.petopia-redesign-v1 .whb-general-header .wd-tools-element > a {
		display: inline-flex;
		align-items: center;
		justify-content: center;
		width: var(--petopia-icon-size);
		height: var(--petopia-icon-size);
		min-width: 0 !important;
		min-height: 0 !important;
		padding: 0 !important;
		border: none !important;
		border-radius: 0 !important;
		background: transparent !important;
		box-shadow: none !important;
	}

	body.petopia-redesign-v1 .whb-general-header .wd-tools-element .wd-tools-inner {
		display: contents !important;
		padding: 0 !important;
		border: none !important;
		border-radius: 0 !important;
		background: transparent !important;
		box-shadow: none !important;
		height: auto !important;
		min-height: 0 !important;
		width: auto !important;
	}

	body.petopia-redesign-v1 .whb-general-header .wd-tools-element .wd-tools-text {
		display: none !important;
	}

	/* Search = 32×32 blue circle icon only (no field bar) */
	body.petopia-redesign-v1 .whb-general-header .wd-header-search.wd-display-full-screen > a,
	body.petopia-redesign-v1 .whb-general-header .wd-header-search.wd-header-search-mobile > a,
	body.petopia-redesign-v1 .whb-general-header .wd-header-search > a {
		width: var(--petopia-icon-size) !important;
		height: var(--petopia-icon-size) !important;
		min-width: var(--petopia-icon-size) !important;
		min-height: var(--petopia-icon-size) !important;
		padding: 0 !important;
		border: none !important;
		border-radius: 0 !important;
		background: transparent !important;
		justify-content: center;
	}

	body.petopia-redesign-v1 .whb-general-header .wd-header-search.wd-display-full-screen > a::before,
	body.petopia-redesign-v1 .whb-general-header .wd-header-search > a::before {
		display: none !important;
		content: none !important;
	}

	/* Outer inset: space left of search, right of menu */
	body.petopia-redesign-v1 .whb-general-header .wd-header-search {
		margin-left: var(--petopia-mobile-search-inset-left);
		margin-right: 0;
	}

	body.petopia-redesign-v1 .whb-general-header .wd-header-mobile-nav,
	body.petopia-redesign-v1 .whb-general-header .wd-header-fs-nav,
	body.petopia-redesign-v1 .whb-general-header .woodmart-burger-icon {
		margin-right: var(--petopia-mobile-menu-inset-right);
		margin-left: 0;
	}

	/* Mobile menu — hide label text only (icon from Header Builder) */
	body.petopia-redesign-v1 .whb-general-header .wd-header-mobile-nav .wd-tools-text,
	body.petopia-redesign-v1 .whb-general-header .wd-header-fs-nav .wd-tools-text,
	body.petopia-redesign-v1 .whb-general-header .woodmart-burger-icon .wd-tools-text {
		display: none !important;
	}

	/* Mobile columns: search | logo | menu */
	body.petopia-redesign-v1 .whb-general-header .whb-col-mobile {
		display: flex;
		align-items: center;
		justify-content: space-between;
		width: 100%;
		gap: 8px;
	}

	body.petopia-redesign-v1 .whb-general-header .whb-col-mobile-center {
		flex: 1 1 auto;
		justify-content: center;
	}

	/* Sticky scroll: no full-width white plate behind the pill */
	body.petopia-redesign-v1 .whb-header .whb-clone {
		display: none !important;
	}

	body.petopia-redesign-v1 .whb-sticked .whb-main-header {
		background: transparent !important;
		box-shadow: none !important;
	}

	body.petopia-redesign-v1 .whb-sticky-shadow.whb-sticked .whb-main-header {
		box-shadow: none !important;
	}

	body.petopia-redesign-v1 .whb-sticked .whb-row.whb-general-header,
	body.petopia-redesign-v1 .whb-sticked .whb-general-header.whb-row {
		background: transparent !important;
		background-color: transparent !important;
		box-shadow: none !important;
	}

	body.petopia-redesign-v1 .whb-sticked .whb-general-header.whb-with-bg::before {
		display: none !important;
		content: none !important;
	}

	body.petopia-redesign-v1 .whb-sticked .whb-general-header .whb-general-header-inner {
		background: var(--petopia-pill-bg-mobile) !important;
		backdrop-filter: none !important;
		-webkit-backdrop-filter: none !important;
		box-shadow: var(--petopia-pill-shadow-mobile) !important;
	}
}

/* Override Woodmart Theme Settings custom CSS at ≤576px (container shadow bleed) */
@media (max-width: 576px) {
	body.petopia-redesign-v1 .whb-general-header,
	body.petopia-redesign-v1 div.whb-general-header {
		background: transparent !important;
		margin: 0 !important;
		border-radius: 0 !important;
		box-shadow: none !important;
	}

	body.petopia-redesign-v1 .whb-general-header > .container,
	body.petopia-redesign-v1 .whb-general-header div.container {
		box-shadow: none !important;
		border-radius: 0 !important;
		background: transparent !important;
		max-width: var(--petopia-pill-max-width-mobile) !important;
		margin-inline: auto !important;
		padding-inline: 0 !important;
		width: 100%;
	}

	body.petopia-redesign-v1 .whb-general-header .whb-flex-row.whb-general-header-inner {
		box-shadow: var(--petopia-pill-shadow-mobile) !important;
		border-radius: var(--petopia-pill-radius-mobile) !important;
	}
}

/* Drawer search tint */
body.petopia-redesign-v1 .mobile-nav .searchform {
	background-color: #edf2ff;
	border-radius: 24px;
}

body.petopia-redesign-v1:not(.page-template-elementor_header_footer) .wd-page-content {
	padding-top: 8px;
}
