/* Mega menu kiểu Yeti (header bottom, desktop) */
.punchy-mega-menu #wide-nav {
	--pm-ink: var(--cb-black);
	--pm-muted: var(--cb-muted);
	--pm-line: var(--cb-line);
	--pm-tile: var(--cb-cream);
	position: relative;
	z-index: 40;
	background: #fff !important;
	border-top: 1px solid var(--pm-line);
	border-bottom: 1px solid var(--pm-line);
	min-height: 0;
}
.punchy-mega-menu #wide-nav .flex-row,
.punchy-mega-menu #wide-nav .flex-col,
.punchy-mega-menu #wide-nav .header-bottom-nav {
	position: static;
}
.punchy-mega-menu #wide-nav .flex-col {
	flex: 1 1 auto;
}
.punchy-mega-menu #wide-nav .header-bottom-nav {
	display: flex;
	justify-content: flex-start;
	align-items: stretch;
	gap: 0 8px;
	width: 100%;
}

/* Mục cấp 1 */
.punchy-mega-menu #wide-nav .pm-item {
	position: static;
	margin: 0;
	padding: 0;
	display: flex;
}
.punchy-mega-menu #wide-nav .pm-link {
	position: relative;
	display: flex;
	align-items: center;
	height: 52px;
	padding: 0 18px;
	font-size: 14px;
	font-weight: 700;
	letter-spacing: .1em;
	text-transform: uppercase;
	color: var(--pm-ink);
	white-space: nowrap;
}
.punchy-mega-menu #wide-nav .pm-link::after {
	content: "";
	position: absolute;
	left: 18px;
	right: 18px;
	bottom: -1px;
	height: 3px;
	background: var(--pm-ink);
	transform: scaleX(0);
	transition: transform .25s ease;
}
.punchy-mega-menu #wide-nav .pm-item:hover > .pm-link::after,
.punchy-mega-menu #wide-nav .pm-item.is-open > .pm-link::after,
.punchy-mega-menu #wide-nav .pm-item.pm-active > .pm-link::after,
.punchy-mega-menu #wide-nav .pm-link:focus-visible::after {
	transform: scaleX(1);
}

/* Panel */
.punchy-mega-menu #wide-nav .pm-panel {
	position: absolute;
	left: 0;
	right: 0;
	top: 100%;
	margin-top: 1px;
	background: #fff;
	border-top: 1px solid var(--pm-line);
	box-shadow: 0 16px 30px rgba(0, 0, 0, .08);
	visibility: hidden;
	opacity: 0;
	transform: translateY(-6px);
	transition: opacity .2s ease, transform .2s ease, visibility 0s linear .2s;
	z-index: 41;
}
.punchy-mega-menu #wide-nav .pm-item.is-open > .pm-panel {
	visibility: visible;
	opacity: 1;
	transform: none;
	transition: opacity .2s ease, transform .2s ease;
}
.pm-panel__inner {
	display: grid;
	grid-template-columns: 260px 1fr;
	gap: 56px;
	max-width: 1280px;
	margin: 0 auto;
	padding: 40px 40px 48px;
}
.pm-panel__eyebrow {
	margin: 0 0 18px;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: .14em;
	text-transform: uppercase;
	color: var(--pm-muted);
}
.pm-panel__list ul {
	margin: 0 0 24px;
	padding: 0;
	list-style: none;
}
.pm-panel__list li {
	margin: 0 0 12px;
	padding: 0;
	list-style: none;
}
.punchy-mega-menu #wide-nav .pm-panel__list li a {
	font-size: 18px;
	font-weight: 700;
	line-height: 1.25;
	color: var(--pm-ink);
	text-transform: none;
	letter-spacing: 0;
	background: linear-gradient(currentColor, currentColor) 0 100% / 0 2px no-repeat;
	transition: background-size .25s ease;
	padding: 0;
}
.punchy-mega-menu #wide-nav .pm-panel__list li a:hover {
	background-size: 100% 2px;
}
.punchy-mega-menu #wide-nav .pm-panel__all {
	display: inline-block;
	padding: 12px 22px;
	border: 2px solid var(--pm-ink);
	font-size: 12px;
	font-weight: 700;
	letter-spacing: .12em;
	text-transform: uppercase;
	color: var(--pm-ink);
	transition: background .2s, color .2s;
}
.punchy-mega-menu #wide-nav .pm-panel__all:hover {
	background: var(--pm-ink);
	color: #fff;
}

/* Ô ảnh */
.pm-panel__tiles {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 20px;
	align-content: start;
}
.pm-panel__tiles.pm-tiles-1,
.pm-panel__tiles.pm-tiles-2,
.pm-panel__tiles.pm-tiles-3 {
	grid-template-columns: repeat(3, minmax(0, 1fr));
}
.punchy-mega-menu #wide-nav .pm-tile {
	display: block;
	padding: 0;
	color: var(--pm-ink);
	text-transform: none;
	letter-spacing: 0;
}
.pm-tile__media {
	display: block;
	aspect-ratio: 1 / 1;
	background: var(--pm-tile);
	overflow: hidden;
	margin-bottom: 12px;
}
.pm-tile__media img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	mix-blend-mode: multiply;
	transition: transform .45s ease;
}
.pm-tile:hover .pm-tile__media img {
	transform: scale(1.05);
}
.pm-tile__label {
	display: block;
	font-size: 15px;
	font-weight: 700;
}

/* Lớp tối phủ trang khi mở panel */
.pm-backdrop {
	position: fixed;
	left: 0;
	right: 0;
	bottom: 0;
	top: 0;
	background: rgba(26, 22, 18, .45);
	opacity: 0;
	visibility: hidden;
	transition: opacity .2s ease, visibility 0s linear .2s;
	z-index: 29;
	pointer-events: none;
}
.pm-backdrop.is-visible {
	opacity: 1;
	visibility: visible;
	transition: opacity .2s ease;
}

@media (max-width: 1200px) {
	.pm-panel__inner {
		grid-template-columns: 220px 1fr;
		gap: 32px;
	}
	.punchy-mega-menu #wide-nav .pm-link {
		padding: 0 12px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.punchy-mega-menu #wide-nav .pm-panel,
	.punchy-mega-menu #wide-nav .pm-link::after,
	.pm-tile__media img,
	.pm-backdrop {
		transition: none;
	}
}

/* Mục Offers nổi bật */
.punchy-mega-menu #wide-nav .pm-offers > .pm-link {
	color: var(--cb-brown);
}
.punchy-mega-menu #wide-nav .pm-offers > .pm-link::after {
	background: var(--cb-gold);
}
#main-menu .menu-offers > a {
	color: var(--cb-brown) !important;
	font-weight: 700;
}

/* -------------------------------------------------------------------------
 * Icon header đồng bộ: search (mobile) · ♡ wishlist · giỏ hàng
 * Cùng cỡ 28px (mobile 26px), nét 2, badge vàng viền trắng.
 * ---------------------------------------------------------------------- */
#header {
	--hi-size: 28px;
}
@media (max-width: 849px) {
	#header {
		--hi-size: 26px;
	}
}

/* Giỏ hàng: SVG xe đẩy thay ảnh PNG */
#header .header-cart-icon {
	display: inline-block;
	width: var(--hi-size);
	height: var(--hi-size);
	vertical-align: middle;
}
#header .header-cart-icon .cart-img-icon {
	display: none !important;
}
#header .header-cart-icon::before {
	content: "";
	display: block;
	width: 100%;
	height: 100%;
	background-color: var(--cb-black);
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cg fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2.5 3.5h2.6l2.4 11.2a1.6 1.6 0 0 0 1.6 1.3h8.6a1.6 1.6 0 0 0 1.5-1.2l1.8-7.3H6.2'/%3E%3Ccircle cx='9.5' cy='20' r='1.4'/%3E%3Ccircle cx='17' cy='20' r='1.4'/%3E%3C/g%3E%3C/svg%3E") center / contain no-repeat;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cg fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2.5 3.5h2.6l2.4 11.2a1.6 1.6 0 0 0 1.6 1.3h8.6a1.6 1.6 0 0 0 1.5-1.2l1.8-7.3H6.2'/%3E%3Ccircle cx='9.5' cy='20' r='1.4'/%3E%3Ccircle cx='17' cy='20' r='1.4'/%3E%3C/g%3E%3C/svg%3E") center / contain no-repeat;
	transition: background-color .15s, transform .15s;
}
#header .header-cart-link:hover .header-cart-icon::before {
	background-color: var(--cb-brown);
	transform: scale(1.06);
}

/* ♡ wishlist + search mobile: cùng cỡ, cùng nét */
#header .pwl-header .pwl-heart,
#header .punchy-search-trigger svg {
	width: var(--hi-size);
	height: var(--hi-size);
	transition: transform .15s, color .15s;
}
#header .pwl-header .pwl-heart path {
	stroke-width: 2;
}
#header .punchy-search-trigger svg circle,
#header .punchy-search-trigger svg path {
	stroke-width: 2;
}
#header .pwl-header:hover .pwl-heart,
#header .punchy-search-trigger:hover svg {
	color: var(--cb-brown);
	transform: scale(1.06);
}

/* Badge số đếm: giỏ hàng + wishlist giống nhau */
#header .header-cart-icon[data-icon-label]::after,
#header .pwl-header__count {
	top: -7px;
	right: -9px;
	min-width: 20px;
	height: 20px;
	padding: 0 5px;
	border: 2px solid #fff;
	border-radius: 10px;
	background-color: var(--cb-gold) !important;
	box-shadow: none;
	box-sizing: border-box;
	color: var(--cb-black);
	font-family: inherit !important;
	font-size: 11px;
	font-weight: 800;
	letter-spacing: 0;
	line-height: 16px;
	opacity: 1;
}

/* Khoảng cách đều giữa các icon */
#header .pwl-header {
	padding: 0 8px;
}
#header .cart-item .header-cart-link {
	padding-left: 8px;
	padding-right: 8px;
}

/* Menu căn trái: chữ mục đầu tiên thẳng mép container (bỏ padding trái của mục đầu) */
.punchy-mega-menu #wide-nav .header-bottom-nav > .pm-item:first-child > .pm-link {
	padding-left: 0;
}
.punchy-mega-menu #wide-nav .header-bottom-nav > .pm-item:first-child > .pm-link::after {
	left: 0;
}
