/* Header responsivo — v3050n (layout, cores em brand.css) */

header .header-main {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	margin-left: -8px;
	margin-right: -8px;
}

header .header-logo-col,
header .header-search-col,
header .header-cart-col {
	float: none;
	padding-left: 8px;
	padding-right: 8px;
}

/* Mobile: logo + carrinho na mesma linha, busca em largura total abaixo */
header .header-logo-col {
	order: 1;
	flex: 0 0 42%;
	width: 42%;
	max-width: 42%;
}

header .header-cart-col {
	order: 2;
	flex: 0 0 58%;
	width: 58%;
	max-width: 58%;
	text-align: right;
}

header .header-search-col {
	order: 3;
	flex: 0 0 100%;
	width: 100%;
	max-width: 100%;
	margin-top: 10px;
}

header .header-main .mt-2,
header .header-main .mt-4,
header .header-main .mt-6 {
	margin-top: 0 !important;
}

header {
	padding: 10px 0 12px;
}

#logo {
	margin: 0;
}

#logo img {
	max-width: 100%;
	width: auto;
	height: auto;
	max-height: 48px;
	margin-top: 0;
}

#search {
	margin-bottom: 0;
	width: 100%;
}

#search .input-lg {
	height: 38px;
	font-size: 14px;
	padding: 0 40px 0 14px;
}

#search .btn-search-icon {
	top: 2px;
	right: 12px;
	width: 32px;
	height: 32px;
	line-height: 32px;
	font-size: 15px;
}

#cart {
	margin-bottom: 0;
}

#cart > .btn {
	font-size: 12px;
	padding: 9px 12px;
	line-height: 1.3;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	max-width: 100%;
}

@media (max-width: 767px) {
	#top {
		min-height: 36px;
		padding: 3px 0;
	}

	#top .container {
		padding-left: 10px;
		padding-right: 10px;
	}

	#top-links {
		padding-top: 2px;
		float: right !important;
	}

	#top-links .list-inline {
		margin-bottom: 0;
	}

	#top-links .list-inline > li {
		padding-left: 3px;
		padding-right: 3px;
	}

	#top-links a + a {
		margin-left: 0;
	}

	/* Logo + carrinho em cima, busca embaixo (ordem padrão do flex) */
	header .header-search-col {
		position: relative;
		z-index: 2;
	}

	header .header-cart-col {
		position: relative;
		z-index: 30;
	}

	body.site-header-fixed > header,
	body.site-header-fixed #container > header {
		overflow: visible;
	}

	#cart {
		position: relative;
	}

	#cart > .dropdown-menu {
		top: auto !important;
		bottom: auto !important;
		right: 0;
		left: auto;
		max-height: min(65vh, 380px);
		overflow-y: auto;
		-webkit-overflow-scrolling: touch;
		min-width: min(calc(100vw - 24px), 360px);
	}

	#search {
		position: relative;
		z-index: auto;
	}

	#search .input-lg {
		position: relative;
		z-index: 1;
		background: #fff;
	}

	body.cart-mobile-open > header,
	body.cart-mobile-open #container > header,
	body.search-mobile-active > header,
	body.search-mobile-active #container > header {
		z-index: 1050;
	}
}

@media (max-width: 400px) {
	header .header-logo-col {
		flex: 0 0 40%;
		width: 40%;
		max-width: 40%;
	}

	header .header-cart-col {
		flex: 0 0 60%;
		width: 60%;
		max-width: 60%;
	}

	#logo img {
		max-height: 40px;
	}

	#cart > .btn {
		font-size: 11px;
		padding: 8px 8px;
	}
}

/* Desktop: logo | busca | carrinho */
@media (min-width: 768px) {
	header {
		padding: 8px 0 12px;
	}

	header .header-logo-col {
		order: 1;
		flex: 0 0 25%;
		width: 25%;
		max-width: 25%;
	}

	header .header-search-col {
		order: 2;
		flex: 0 0 50%;
		width: 50%;
		max-width: 50%;
		margin-top: 0;
	}

	header .header-cart-col {
		order: 3;
		flex: 0 0 25%;
		width: 25%;
		max-width: 25%;
		text-align: right;
	}

	header .header-logo-col.mt-2 {
		margin-top: 0 !important;
	}

	header .header-search-col.mt-6 {
		margin-top: 24px !important;
	}

	header .header-cart-col.mt-4 {
		margin-top: 23px !important;
	}

	#logo img {
		width: 80%;
		max-width: 220px;
		max-height: 65px;
		margin-top: 6px;
	}

	#search {
		margin-bottom: 10px;
	}

	#search .input-lg {
		height: 40px;
		font-size: 16px;
		padding: 0 44px 0 17px;
	}

	#search .btn-search-icon {
		top: 3px;
		right: 20px;
		width: 34px;
		height: 34px;
		line-height: 34px;
		font-size: 16px;
	}

	#cart > .btn {
		font-size: 12px;
		padding: 10px 15px;
	}
}

/* Cabeçalho fixo (módulo Checkout simplificado) */
:root {
	--sf-top-height: 45px;
	--sf-header-top: 45px;
	--sf-menu-top: 130px;
	--sf-body-padding: 176px;
}

body.site-header-fixed {
	padding-top: var(--sf-body-padding);
}

body.site-header-fixed #top {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	z-index: 1032;
	margin: 0;
}

body.theme-tact.site-header-fixed #top {
	background-color: #000;
	border-bottom: 5px solid #C12B2A;
}

body.theme-feasso.site-header-fixed #top {
	background-color: #131d28;
}

body.site-header-fixed > header,
body.site-header-fixed #container > header {
	position: fixed;
	top: var(--sf-header-top);
	left: 0;
	right: 0;
	z-index: 1031;
	margin: 0;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

body.theme-tact.site-header-fixed > header,
body.theme-tact.site-header-fixed #container > header {
	background: #fff;
}

body.theme-feasso.site-header-fixed > header,
body.theme-feasso.site-header-fixed #container > header {
	background: #1d60bc;
}

body.site-header-fixed nav.menu-principa {
	position: fixed;
	top: var(--sf-menu-top);
	left: 0;
	right: 0;
	z-index: 1030;
	width: 100%;
	margin: 0;
}

body.site-header-fixed nav.menu-principa .mega-dropdown-menu {
	z-index: 1040;
}
