/* Header: promo strip, utility row, logo/search row, blue department bar, announcement bars. */

.gs-header {
	background: #fff;
	position: relative;
	z-index: 60;
}

/* parent theme paints header links white-on-white; pin the strip */
.gs-header .gs-promo {
	background: #1E7A1E !important;
	color: #fff !important;
	text-decoration: none !important;
}

/* 1. promo strip */
.gs-promo {
	display: block;
	background: #1E7A1E;
	color: #fff;
	text-align: center;
	font-size: 15px;
	font-weight: 700;
	line-height: 42px;
	padding: 0 12px;
	text-decoration: none;
}

/* 2. utility row */
.gs-header-inner {
	max-width: var(--gs-content);
	margin: 0 auto;
	padding: 0 16px;
}

.gs-utility {
	display: flex;
	justify-content: flex-end;
	gap: 18px;
	padding: 8px 0 2px;
}

.gs-utility a {
	color: var(--gs-ink);
	font-size: 12.5px;
	text-decoration: none;
}

.gs-utility a:hover {
	color: var(--gs-blue);
	text-decoration: underline;
}

/* 3. logo + search + actions */
.gs-mainrow {
	display: flex;
	align-items: center;
	gap: 24px;
	padding: 6px 0 14px;
}

.gs-logo img {
	display: block;
	width: 220px;
	height: auto;
}

.gs-search {
	flex: 1 1 auto;
	display: flex;
	align-items: center;
	border: 1px solid #9c9c9c;
	border-radius: 4px;
	height: 46px;
	background: #fff;
	overflow: hidden;
}

.gs-search .gs-scope {
	display: flex;
	align-items: center;
	height: 100%;
	padding: 0 16px;
	font-size: 14px;
	color: #fff;
	background: var(--gs-blue);
	position: relative;
}

.gs-search .gs-scope::after {
	content: "";
	border-left: 1px solid #7f7f7f;
	position: absolute;
	right: 0;
	top: 10px;
	bottom: 10px;
}

.gs-search input[type="search"] {
	flex: 1 1 auto;
	border: 0;
	outline: 0;
	height: 100%;
	padding: 0 14px;
	font-size: 14px;
	background: transparent;
	color: #555;
}

.gs-search button {
	width: 54px;
	height: 100%;
	border: 0;
	background: transparent;
	color: var(--gs-blue);
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
}

.gs-actions {
	display: flex;
	align-items: center;
	gap: 26px;
}

.gs-actions a {
	color: var(--gs-ink);
	font-size: 14px;
	text-decoration: none;
	display: inline-flex;
	align-items: center;
	gap: 8px;
}

.gs-actions .gs-cart span {
	font-size: 14px;
}

.gs-cart-count {
	background: var(--gs-blue);
	color: #fff;
	border-radius: 50%;
	min-width: 20px;
	height: 20px;
	font-size: 11px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
}

/* 4. department bar */
.gs-nav {
	background: var(--gs-blue-dk);
}

.gs-nav-inner {
	max-width: var(--gs-content);
	margin: 0 auto;
	padding: 0 16px;
	display: flex;
	align-items: stretch;
	gap: 4px;
	overflow-x: auto;
	scrollbar-width: none;
}

.gs-nav-inner::-webkit-scrollbar {
	display: none;
}

.gs-nav a {
	color: #fff;
	font-size: 14px;
	line-height: 44px;
	padding: 0 14px;
	white-space: nowrap;
	text-decoration: none;
	display: inline-flex;
	align-items: center;
	gap: 8px;
}

.gs-nav a:hover {
	background: rgba(255, 255, 255, .12);
}

.gs-nav-dept {
	font-weight: 600;
}

.gs-burger,
.gs-burger::before,
.gs-burger::after {
	display: block;
	width: 16px;
	height: 2px;
	background: #fff;
	content: "";
	position: relative;
}

.gs-burger::before {
	position: absolute;
	top: -5px;
}

.gs-burger::after {
	position: absolute;
	top: 5px;
}

/* 5. announcement bars */
.gs-announcements {
	background: #fff;
}

.gs-ann {
	position: relative;
	max-width: var(--gs-content);
	margin: 0 auto;
	padding: 10px 44px;
	border-bottom: 1px solid var(--gs-line);
	text-align: center;
}

.gs-ann p {
	margin: 0;
	font-size: 13px;
	color: var(--gs-ink);
}

.gs-ann a {
	color: var(--gs-blue);
	font-weight: 600;
	text-decoration: none;
}

.gs-ann a:hover {
	text-decoration: underline;
}

.gs-ann-close {
	position: absolute;
	right: 12px;
	top: 50%;
	transform: translateY(-50%);
	border: 0;
	background: transparent;
	font-size: 22px;
	line-height: 1;
	color: #666;
	cursor: pointer;
}

.gs-ann[hidden] {
	display: none;
}

/* sticky: promo strip + nav stay reachable while scrolling */
@media (min-width: 850px) {
	.gs-header .gs-header-inner,
	.gs-header .gs-promo {
		background: #fff;
	}
}

@media (max-width: 849px) {
	.gs-utility {
		display: none;
	}

	.gs-mainrow {
		flex-wrap: wrap;
		gap: 12px;
	}

	.gs-logo img {
		width: 150px;
	}

	.gs-search {
		height: 42px;
		order: 3;
		flex-basis: 100%;
	}

	.gs-actions {
		margin-left: auto;
		gap: 16px;
	}

	.gs-actions .gs-cart span {
		display: none;
	}

	.gs-nav a {
		font-size: 13px;
		padding: 0 10px;
	}

	.gs-ann {
		padding: 8px 52px 8px 16px;
		font-size: 12px;
	}

	.gs-ann-close {
		right: 8px;
	}

	.gs-promo {
		font-size: 13px;
		line-height: 1.4;
		padding: 8px 12px;
	}
}

/* search submit icon:真居中 */
.gs-search button {
	padding: 0;
	line-height: 0;
	display: inline-flex;
	align-items: center;
	justify-content: center;
}

.gs-search button svg {
	display: block;
}

/* search field: one clean bordered box, icon button inherits nothing from the parent theme */
.gs-search {
	background: #fff;
	border: 1px solid #c4c4c4;
	border-radius: 4px;
	padding-right: 4px;
}

.gs-search input[type="search"] {
	border: 0 !important;
	box-shadow: none !important;
	background: transparent !important;
	min-height: 0;
}

.gs-search button,
.gs-search button:hover,
.gs-search button:focus {
	border: 0 !important;
	outline: 0;
	background: transparent !important;
	box-shadow: none !important;
	color: var(--gs-blue);
	width: 44px;
	padding: 0;
	line-height: 0;
}

.gs-search button svg {
	width: 20px;
	height: 20px;
	margin: 0 auto;
}

.gs-search .gs-scope::after {
	display: none;
}

/* parent theme adds a 15px bottom margin to every button, which lifts the icon */
.gs-search button,
.gs-search button:hover,
.gs-search button:focus {
	margin: 0 !important;
	height: 100% !important;
	align-self: stretch;
	border-radius: 0 3px 3px 0;
}

/* ================= mobile header: Menú + Todo + search on one row ================= */
.gs-mmenu {
	display: none;
	position: relative;
}

.gs-mmenu summary {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 7px;
	height: 44px;
	padding: 0 14px;
	background: var(--gs-blue);
	color: #fff;
	font-size: 14px;
	font-weight: 600;
	border-radius: 4px;
	cursor: pointer;
	list-style: none;
	white-space: nowrap;
}

.gs-mmenu summary::-webkit-details-marker {
	display: none;
}

.gs-mmenu summary .gs-burger,
.gs-mmenu summary .gs-burger::before,
.gs-mmenu summary .gs-burger::after {
	width: 15px;
	height: 2px;
	background: #fff;
}

.gs-mmenu[open] summary {
	background: #00508f;
}

.gs-mmenu-panel {
	position: absolute;
	top: calc(100% + 6px);
	left: 0;
	z-index: 90;
	min-width: 240px;
	max-height: 70vh;
	overflow-y: auto;
	background: #fff;
	border: 1px solid var(--gs-line);
	border-radius: 8px;
	box-shadow: 0 12px 30px rgba(0, 0, 0, .16);
	padding: 8px 0;
}

.gs-mmenu-panel a {
	display: block;
	padding: 11px 18px;
	color: var(--gs-ink);
	font-size: 14px;
	text-decoration: none;
}

.gs-mmenu-panel a:hover {
	background: #f4f6f8;
	color: var(--gs-blue);
}

@media (max-width: 849px) {
	/* hide the desktop department strip, the menu button replaces it */
	.gs-nav {
		display: none !important;
	}

	.gs-mmenu {
		display: block;
	}

	.gs-mainrow {
		display: grid;
		grid-template-columns: auto auto minmax(0, 1fr);
		align-items: center;
		gap: 8px;
		padding: 8px 0 12px;
	}

	.gs-logo {
		order: 2;
		justify-self: start;
	}

	.gs-logo img {
		width: 118px;
	}

	.gs-mmenu {
		order: 1;
	}

	.gs-actions {
		order: 3;
		justify-self: end;
		gap: 12px;
	}

	.gs-actions .gs-account {
		font-size: 0;
		gap: 0;
	}

	.gs-actions .gs-account::before {
		content: "";
		width: 22px;
		height: 22px;
		display: block;
		background: currentColor;
		-webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8'><circle cx='12' cy='8' r='4'/><path d='M4 21c0-4 3.6-6 8-6s8 2 8 6'/></svg>");
		mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8'><circle cx='12' cy='8' r='4'/><path d='M4 21c0-4 3.6-6 8-6s8 2 8 6'/></svg>");
		-webkit-mask-size: contain;
		mask-size: contain;
		-webkit-mask-repeat: no-repeat;
		mask-repeat: no-repeat;
	}

	.gs-actions .gs-cart span {
		display: none;
	}

	/* search bar becomes its own full-width row, magnifier still inside */
	.gs-search {
		order: 4;
		grid-column: 1 / -1;
		height: 44px;
		margin-top: 2px;
	}

	.gs-search .gs-scope {
		padding: 0 14px;
		font-size: 14px;
	}

	.gs-search button {
		width: 48px;
		margin: 0 !important;
		height: 100% !important;
	}
}
