/* â€”â€” Header: no topo sem fundo; apÃ³s scroll fica fixo com fundo â€”â€” */
.cdp-header {
	position: relative;
	z-index: 10;
	background: transparent;
	border-bottom: 1px solid transparent;
	box-shadow: 0 2px 14px rgba(0, 0, 0, 0);
	transition:
		background 0.45s cubic-bezier(0.33, 1, 0.68, 1),
		box-shadow 0.45s cubic-bezier(0.33, 1, 0.68, 1),
		border-color 0.4s ease;
}

.cdp-header--scrolled {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	z-index: 200;
	width: 100%;
	background: var(--cdp-bg);
	border-bottom-color: rgba(0, 0, 0, 0.06);
	box-shadow: 0 2px 14px rgba(0, 0, 0, 0.07);
}

/* Barra interna: ≥768 grelha 3 col; <768 flex — logo à esquerda, ícones à direita */
.cdp-header__inner {
	max-width: var(--cdp-site-max);
	margin: 0 auto;
	padding: 0.85rem clamp(1rem, 4vw, 2.5rem) 1rem;
	display: flex;
	flex-direction: row;
	flex-wrap: nowrap;
	align-items: center;
	position: relative;
	gap: 0.65rem;
	transition:
		padding 0.45s cubic-bezier(0.33, 1, 0.68, 1),
		gap 0.4s ease;
}

.cdp-header:not(.cdp-header--scrolled) .cdp-header__inner {
	padding-top: 0.85rem;
	padding-bottom: 0.85rem;
}

.cdp-header--scrolled .cdp-header__inner {
	padding-top: 0.7rem;
	padding-bottom: 0.7rem;
}

.cdp-header__nav {
	display: flex;
	align-items: center;
	gap: clamp(1rem, 3vw, 2.25rem);
	font-size: 0.7rem;
	font-weight: 600;
	letter-spacing: 0.18em;
	text-transform: uppercase;
}

.cdp-header__nav .menu {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	column-gap: clamp(1rem, 3vw, 2.25rem);
	row-gap: 0.5rem;
}

.cdp-header__nav .menu > li {
	margin: 0;
	padding: 0;
}

/* Mobile (<768): logo à esquerda; faixa direita (toolbar) com margin-left: auto */
.cdp-header__logo {
	position: relative;
	left: auto;
	top: auto;
	transform: none;
	z-index: 1;
	display: flex;
	align-items: center;
	justify-content: flex-start;
	text-decoration: none;
	line-height: 0;
	height: auto;
	min-height: 0;
	flex: 0 1 auto;
	min-width: 0;
	max-height: clamp(44px, 11vw, 56px);
	transition: max-height 0.5s cubic-bezier(0.22, 1, 0.36, 1);
	max-width: min(200px, 58vw);
	pointer-events: auto;
}

.cdp-header__logo-img {
	display: block;
	width: auto;
	height: auto;
	max-height: 100%;
	max-width: min(200px, 52vw);
	margin-top: 0;
	object-fit: contain;
	object-position: center;
	flex-shrink: 1;
	transition:
		max-width 0.5s cubic-bezier(0.22, 1, 0.36, 1),
		max-height 0.5s cubic-bezier(0.22, 1, 0.36, 1),
		margin-top 0.4s cubic-bezier(0.33, 1, 0.68, 1);
}

.cdp-header--scrolled .cdp-header__logo-img {
	max-width: min(160px, 46vw);
}

.cdp-header__lane--right {
	margin-left: auto;
	position: relative;
	z-index: 2;
	display: flex;
	flex-direction: row;
	align-items: center;
	flex-wrap: nowrap;
	gap: 0.45rem;
	min-width: 0;
}

.cdp-header__lane--right .cdp-header__toolbar {
	display: flex;
	align-items: center;
	flex-wrap: nowrap;
	gap: 0.45rem;
	margin-left: 0;
	flex: 0 0 auto;
}

.cdp-header__lane--right .cdp-header__toolbar .cdp-header__social-btn {
	width: 40px;
	height: 40px;
	flex: 0 0 auto;
}

.cdp-header__social-btn--peek {
	display: none !important;
}

.cdp-header__menu-toggle {
	display: inline-flex !important;
}

.cdp-header__nav--left,
.cdp-header__nav--right {
	display: none !important;
}

@media (min-width: 768px) {
	.cdp-header__inner {
		display: grid;
		grid-template-columns: 1fr auto minmax(0, 1fr);
		align-items: center;
		gap: clamp(0.75rem, 2vw, 1.5rem);
	}

	.cdp-header:not(.cdp-header--scrolled) .cdp-header__inner {
		padding-top: 25px;
		padding-bottom: 25px;
	}

	.cdp-header--scrolled .cdp-header__inner {
		padding-top: 15px;
		padding-bottom: 15px;
	}

	.cdp-header__nav--left,
	.cdp-header__nav--right {
		display: flex !important;
		min-width: 0;
	}

	.cdp-header__nav--left {
		grid-column: 1;
		justify-self: center;
		width: max-content;
		max-width: 100%;
	}

	.cdp-header__lane--right {
		grid-column: 3;
		display: grid;
		grid-template-columns: minmax(0, 1fr) max-content;
		align-items: center;
		width: 100%;
		min-width: 0;
		margin-left: 0;
		gap: clamp(0.75rem, 2vw, 1.5rem);
	}

	.cdp-header__nav--right {
		grid-column: 1;
		justify-self: center;
		width: max-content;
		max-width: 100%;
	}

	.cdp-header__logo {
		position: relative;
		left: auto;
		top: auto;
		transform: none;
		z-index: auto;
		grid-column: 2;
		justify-self: center;
		max-height: clamp(56px, 12vw, 104px);
		max-width: min(304px, 100%);
	}

	.cdp-header:not(.cdp-header--scrolled) .cdp-header__logo {
		max-height: clamp(64px, 14vw, 112px);
	}

	.cdp-header--scrolled .cdp-header__logo {
		max-height: var(--cdp-header-logo-h-scrolled);
	}

	.cdp-header__logo-img {
		max-width: min(304px, 58vw);
		margin-top: 6px;
	}

	.cdp-header--scrolled .cdp-header__logo-img {
		max-width: min(151px, 40vw);
		margin-top: 0;
	}

	.cdp-header__lane--right .cdp-header__toolbar {
		grid-column: 2;
		justify-self: end;
		gap: 0.5rem;
	}

	.cdp-header__lane--right .cdp-header__toolbar .cdp-header__social-btn {
		width: 32px;
		height: 32px;
	}

	.cdp-header__social-btn--peek {
		display: inline-flex !important;
	}

	.cdp-header__menu-toggle {
		display: none !important;
	}
}

@media (max-width: 900px) {
	:root {
		--cdp-header-logo-h-scrolled: clamp(32px, 9vw, 44px);
	}
}

@media (max-width: 480px) {
	.cdp-header__nav {
		flex-wrap: wrap;
		justify-content: center;
		row-gap: 0.35rem;
		column-gap: clamp(0.4rem, 2.5vw, 0.75rem);
		font-size: 0.58rem;
		letter-spacing: 0.1em;
	}
}

.cdp-header__link {
	text-decoration: none;
	color: var(--cdp-text);
	position: relative;
	padding-bottom: 0.35rem;
}

.cdp-header__link::after {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	height: 2px;
	background: var(--cdp-accent);
	transform: scaleX(0);
	transform-origin: center;
	transition: transform 0.2s ease;
}

.cdp-header__link:hover {
	color: var(--cdp-accent);
}

.cdp-header__link:hover::after {
	transform: scaleX(1);
}

.cdp-header__menu-toggle {
	display: none;
	border: none;
	cursor: pointer;
	font: inherit;
	color: inherit;
}

.cdp-header__menu-toggle-bars {
	display: block;
	width: 14px;
	height: 10px;
	background: linear-gradient(currentColor, currentColor) 0 0 / 100% 2px no-repeat,
		linear-gradient(currentColor, currentColor) 0 50% / 100% 2px no-repeat,
		linear-gradient(currentColor, currentColor) 0 100% / 100% 2px no-repeat;
}

.cdp-header__social-btn {
	width: 32px;
	height: 32px;
	border-radius: 50%;
	background: #232629;
	color: #fff;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	text-decoration: none;
	transition: transform 0.2s, background 0.2s, color 0.2s;
}

/* Só o fundo muda; ícones (currentColor / barras do menu) mantêm-se brancos — vence estilos globais de a:hover */
.cdp-header a.cdp-header__social-btn:hover,
.cdp-header a.cdp-header__social-btn:focus-visible,
.cdp-header button.cdp-header__social-btn:hover,
.cdp-header button.cdp-header__social-btn:focus-visible {
	background: var(--cdp-accent);
	color: #fff !important;
	transform: scale(1.05);
}

.cdp-header a.cdp-header__social-btn:hover svg,
.cdp-header a.cdp-header__social-btn:focus-visible svg,
.cdp-header button.cdp-header__social-btn:hover svg,
.cdp-header button.cdp-header__social-btn:focus-visible svg {
	fill: currentColor !important;
}

.cdp-header__cart-link {
	position: relative;
}

.cdp-header__cart-badge {
	position: absolute;
	top: -4px;
	right: -4px;
	min-width: 1.125rem;
	height: 1.125rem;
	padding: 0 0.28rem;
	border-radius: 999px;
	background: var(--cdp-accent);
	color: #fff;
	font-family: var(--cdp-sans), system-ui, sans-serif;
	font-size: 0.55rem;
	font-weight: 700;
	line-height: 1.125rem;
	text-align: center;
	box-sizing: border-box;
	pointer-events: none;
	z-index: 2;
}

.cdp-header__cart-badge--empty {
	display: none;
}

.cdp-header__cart-badge:not(.cdp-header__cart-badge--empty) {
	display: inline-block;
}

@keyframes cdp-cart-link-pop {
	0% {
		transform: scale(1);
	}
	40% {
		transform: scale(1.14);
	}
	100% {
		transform: scale(1);
	}
}

.cdp-header__cart-link.cdp-cart-added {
	animation: cdp-cart-link-pop 0.6s cubic-bezier(0.34, 1.45, 0.64, 1);
}

@keyframes cdp-cart-badge-pop {
	0%,
	100% {
		transform: scale(1);
	}
	45% {
		transform: scale(1.38);
	}
}

.cdp-header__cart-badge.cdp-cart-badge-pop {
	display: inline-block;
	animation: cdp-cart-badge-pop 0.55s cubic-bezier(0.34, 1.45, 0.64, 1);
}

.cdp-header__drawer {
	position: fixed;
	inset: 0;
	z-index: 320;
	display: block;
}

@media (min-width: 768px) {
	.cdp-header__drawer {
		display: none !important;
	}
}

/* Mobile: drawer no DOM para permitir transição (override do [hidden]) */
@media (max-width: 767px) {
	.cdp-header__drawer[hidden] {
		display: block !important;
		visibility: hidden;
		pointer-events: none;
	}

	.cdp-header__drawer:not([hidden]) {
		visibility: visible;
		pointer-events: auto;
	}

	.cdp-header__drawer-scrim {
		opacity: 0;
		transition: opacity 0.3s ease;
	}

	.cdp-header__drawer--open .cdp-header__drawer-scrim {
		opacity: 1;
	}

	.cdp-header__drawer-panel {
		transform: translate3d(100%, 0, 0);
		transition: transform 0.36s cubic-bezier(0.22, 1, 0.36, 1);
		will-change: transform;
	}

	.cdp-header__drawer--open .cdp-header__drawer-panel {
		transform: translate3d(0, 0, 0);
	}
}

.cdp-header__drawer-scrim {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.42);
	backdrop-filter: blur(3px);
	cursor: pointer;
}

.cdp-header__drawer-panel {
	position: absolute;
	top: 0;
	right: 0;
	bottom: 0;
	width: min(20rem, 90vw);
	max-width: 100%;
	background: var(--cdp-bg);
	box-shadow: -6px 0 32px rgba(0, 0, 0, 0.14);
	display: flex;
	flex-direction: column;
	overflow: hidden;
}

.cdp-header__drawer-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	padding: 1rem 1rem 0.75rem;
	border-bottom: 1px solid rgba(0, 0, 0, 0.08);
	flex-shrink: 0;
}

.cdp-header__drawer-title {
	margin: 0;
	font-family: var(--cdp-sans);
	font-size: 0.72rem;
	font-weight: 700;
	letter-spacing: 0.2em;
	text-transform: uppercase;
	color: var(--cdp-text);
}

.cdp-header__drawer-close {
	border: none;
	background: transparent;
	color: var(--cdp-text);
	font-size: 1.5rem;
	line-height: 1;
	cursor: pointer;
	padding: 0.15rem 0.35rem;
	border-radius: 6px;
	transition:
		background 0.2s ease,
		color 0.2s ease;
}

.cdp-header__drawer-close:hover {
	background: rgba(0, 0, 0, 0.06);
	color: var(--cdp-accent);
}

.cdp-header__drawer-body {
	flex: 1;
	overflow-y: auto;
	padding: 0.75rem 0 1.25rem;
}

.cdp-header__drawer-nav + .cdp-header__drawer-nav {
	margin-top: 0.5rem;
	padding-top: 1rem;
	border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.cdp-header__drawer-nav .menu {
	list-style: none;
	margin: 0;
	padding: 0 1rem;
	display: flex;
	flex-direction: column;
	align-items: stretch;
	gap: 0.15rem;
}

.cdp-header__drawer-nav .menu > li {
	margin: 0;
	padding: 0;
}

.cdp-header__drawer-nav .cdp-header__link {
	display: block;
	padding: 0.85rem 0.35rem;
	font-size: 0.72rem;
	font-weight: 600;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	border-radius: 6px;
}

.cdp-header__drawer-nav .cdp-header__link:hover {
	background: rgba(54, 161, 137, 0.08);
}

.cdp-header__drawer-nav .cdp-header__link::after {
	display: none;
}

@media (prefers-reduced-motion: reduce) {
	.cdp-header,
	.cdp-header__inner,
	.cdp-header__logo,
	.cdp-header__logo-img {
		transition-duration: 0.01ms !important;
	}

	.cdp-header__cart-link.cdp-cart-added,
	.cdp-header__cart-badge.cdp-cart-badge-pop {
		animation: none !important;
	}

	.cdp-header__drawer-scrim,
	.cdp-header__drawer-panel {
		transition-duration: 0.01ms !important;
	}
}
