/* 顶栏 Mercadona 化 ============ */
#header {
	border-bottom: 0;
	box-shadow: 0 2px 10px rgba(59, 57, 53, 0.08);
	background: #ffffff;
	position: sticky;
	top: 0;
	z-index: 1000;
}

/* 隐藏经典 banner / 语言 / 货币 */
.header-banner,
#header .language-selector-wrapper,
#header .currency-selector {
	display: none;
}

.merc-header {
	display: flex;
	align-items: center;
	min-height: 70px;
	padding: 0 23px;
}

/* logo，右侧 15px 间距 */
.merc-header .merc-logo {
	margin-right: 15px;
	flex-shrink: 0;
}
.merc-header .merc-logo img,
.merc-header-mobile .merc-logo img {
	max-height: 56px;
	max-width: 260px;
	width: auto;
	display: block;
}

/* 搜索（宽 450px，右侧 19px 间距；窄屏弹性收缩） */
.merc-search {
	flex: 0 1 450px;
	width: 450px;
	margin-right: 19px;
	min-width: 0;
}

/* 注意：此 @media 块必须保持在基础规则之前（与原 mercarica.css 行序一致），
   否则下方 .merc-categories-btn/.merc-listas-btn/.merc-account 的 font-size 等会在窄屏被错误覆盖 */
@media (max-width: 1023px) {
	.merc-search {
		flex: 1 1 280px;
		width: auto;
		max-width: 340px;
	}
	.merc-header .merc-logo img {
		max-height: 44px;
	}
	.merc-listas-btn {
		display: none;
	}
	.merc-categories-btn {
		font-size: 14px;
		margin-right: 12px;
	}
	.merc-account {
		font-size: 14px;
	}
}


.merc-search-widget {
	width: 100%;
}
.merc-search-widget form {
	display: flex;
	align-items: center;
	border-radius: 22px;
	border: 1px solid #e0ded8;
	height: 44px;
	padding: 0 16px;
	transition: border-color 0.2s;
	width: 100%;
	box-sizing: border-box;
}
.merc-search-widget form input {
	width: 100% !important;
	box-sizing: border-box;
}

/* Categorías 按钮（无外框纯文字），右侧 19px 间距 */
.merc-categories-btn {
	align-items: center;
	background: none;
	border: 0;
	border-radius: 0;
	color: #2A2A29;
	display: inline-flex;
	font-size: 16px;
	font-weight: 600;
	gap: 6px;
	line-height: 1;
	margin-right: 19px;
	padding: 10px 0;
	text-decoration: none;
	transition: color 0.2s;
	white-space: nowrap;
	cursor: pointer;
}

.merc-categories-btn:hover {
	color: var(--merc-hover);
}

.merc-categories-btn .fa {
	font-size: 14px;
}

/* Listas 按钮 */
.merc-listas-btn {
	align-items: center;
	background: none;
	border: 0;
	color: #2A2A29;
	display: inline-flex;
	font-size: 16px;
	font-weight: 600;
	line-height: 1;
	margin-right: 19px;
	padding: 10px 0;
	text-decoration: none;
	white-space: nowrap;
	transition: color 0.2s;
}
.merc-listas-btn:hover {
	color: var(--merc-hover) !important;
	text-decoration: none !important;
}

/* 账户（Identifícate）字体与 Categorías/Listas 一致 */
.merc-account {
	align-items: center;
	color: #2A2A29;
	display: inline-flex;
	font-size: 16px;
	font-weight: 600;
	gap: 6px;
	line-height: 1;
	padding: 10px 0;
	text-decoration: none;
	white-space: nowrap;
}

.merc-search-widget form {
	display: flex;
	align-items: center;
	border-radius: 22px;
	border: 1px solid #e0ded8;
	height: 44px;
	padding: 0 16px;
	transition: border-color 0.2s;
}

.merc-search-widget form:focus-within {
	border-color: var(--merc-green);
}

.merc-search-widget .merc-search-icon {
	color: #b5b0a8;
	margin-right: 3px;
	flex-shrink: 0;
	width: 16px;
	height: 16px;
}

.merc-search-widget input[type="text"] {
	background: transparent;
	border: 0;
	flex: 1;
	font-size: 14px;
	color: var(--merc-text);
	outline: 0;
	height: 100%;
}
.merc-search-widget input::placeholder {
	color: #a09a90;
}

.merc-search-widget .merc-search-clear {
	display: none;
	color: #8a857c;
	cursor: pointer;
}

/* 搜索建议下拉 */
.merc-search-widget {
	position: relative;
}
.merc-suggest {
	background: #fff;
	border: 1px solid var(--merc-border);
	border-radius: 8px;
	box-shadow: 0 3px 12px rgba(0, 0, 0, 0.30);
	left: 0;
	position: absolute;
	right: 0;
	top: calc(100% + 6px);
	z-index: 40;
}
.merc-suggest-item {
	color: var(--merc-text);
	display: block;
	font-size: 14px;
	padding: 10px 14px;
	text-decoration: none;
}
.merc-suggest-item:hover,
.merc-suggest-item.is-active {
	background: #faf6f0;
	color: var(--merc-hover);
}

/* 头部右侧：账户 + 购物车（中间 flex 空白，账户与购物车 23px） */
.merc-header-actions {
	display: flex;
	align-items: center;
	gap: 23px;
	margin-left: auto;
}

.merc-account:hover {
	color: var(--merc-hover) !important;
}

/* 购物车紧凑卡片（Mercadona 风格：白底圆角 + 数量 + 金额） */
#header .blockcart,
#header .cart-preview {
	background: #f4f1ec;
	border: 1px solid var(--merc-border);
	border-radius: 8px;
}
#header .blockcart .header {
	align-items: center;
	display: flex;
	gap: 4px;
	min-height: 44px;
	padding: 0 14px;
	color: var(--merc-text);
}
#header .blockcart .header a,
#header .blockcart .header span,
#header .blockcart .header i {
	color: var(--merc-text);
}
#header .blockcart .shopping-cart {
	font-size: 18px;
}
#header .blockcart .cart-products-count {
	background: var(--merc-button);
	border-radius: 10px;
	color: #fff;
	font-size: 12px;
	font-weight: 700;
	min-width: 18px;
	padding: 1px 5px;
	text-align: center;
}
#header .blockcart .cart-total-value {
	font-size: 13px;
	font-weight: 700;
}

/* 移动端顶栏 */
.merc-header-mobile {
	display: none;
}


/* ============ 搜索联想下拉 ============ */
.merc-suggest {
	background: #fff;
	border: 1px solid var(--merc-border);
	border-radius: 12px;
	box-shadow: 0 6px 24px rgba(0, 0, 0, 0.12);
	left: 0;
	max-height: 400px;
	overflow-y: auto;
	position: absolute;
	right: 0;
	top: calc(100% + 6px);
	z-index: 1050;
}
.merc-suggest__group {
	color: #8a857c;
	font-size: 12px;
	font-weight: 700;
	padding: 12px 16px 4px;
	text-transform: uppercase;
}
.merc-suggest-item {
	align-items: center;
	display: flex;
	gap: 12px;
	padding: 8px 16px;
	text-decoration: none;
	transition: background 0.12s ease;
	min-height: 60px;
	box-sizing: border-box;
}
.merc-suggest-item:hover {
	background: #f4f0e9;
}
.merc-suggest-item__img {
	align-items: center;
	background: #faf8f4;
	border-radius: 8px;
	display: flex;
	flex: 0 0 44px;
	height: 44px;
	justify-content: center;
	overflow: hidden;
}
.merc-suggest-item__img img {
	height: 100%;
	object-fit: cover;
	width: 100%;
}
.merc-suggest-item__icon {
	align-items: center;
	background: #faf8f4;
	border-radius: 8px;
	color: var(--merc-hover);
	display: flex;
	flex: 0 0 44px;
	height: 44px;
	justify-content: center;
}
.merc-suggest-item__info {
	display: flex;
	flex-direction: column;
	gap: 2px;
	min-width: 0;
}
.merc-suggest-item__name {
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
	color: var(--merc-chocolat);
	display: -webkit-box;
	font-size: 14px;
	font-weight: 600;
	line-height: 1.35;
	overflow: hidden;
}
.merc-suggest-item__price {
	color: var(--merc-chocolat);
	font-size: 13px;
	font-weight: 800;
}
.merc-suggest-item__count {
	color: #8a857c;
	font-size: 12px;
}
.merc-suggest__mark {
	background: transparent;
	color: var(--merc-hover);
	font-weight: 800;
}
.merc-suggest__empty {
	color: #8a857c;
	font-size: 14px;
	padding: 24px 16px;
	text-align: center;
}

/* ============ 顶栏账户下拉（Mercadona 风格） ============ */
.merc-acct-trigger {
	position: relative;
}
.merc-acct-btn {
	align-items: center;
	background: transparent;
	border: 0;
	color: var(--merc-chocolat);
	cursor: pointer;
	display: flex;
	font-size: 14px;
	font-weight: 600;
	gap: 6px;
	padding: 8px 10px;
	white-space: nowrap;
}
.merc-acct-btn:hover {
	color: var(--merc-hover);
}
.merc-acct-drop {
	background: #fff;
	border: 1px solid var(--merc-border);
	border-radius: 12px;
	box-shadow: 0 8px 28px rgba(0, 0, 0, 0.12);
	min-width: 260px;
	padding: 14px 0;
	position: absolute;
	right: 0;
	top: calc(100% + 8px);
	z-index: 1060;
}
.merc-acct-drop__user {
	border-bottom: 1px solid #f0eee8;
	margin-bottom: 6px;
	padding: 4px 18px 12px;
}
.merc-acct-drop__name {
	color: var(--merc-chocolat);
	display: block;
	font-size: 15px;
	font-weight: 800;
}
.merc-acct-drop__guest {
	color: var(--merc-chocolat);
	display: block;
	font-size: 15px;
	font-weight: 800;
}
.merc-acct-drop__postal {
	color: #8a857c;
	display: block;
	font-size: 13px;
	margin-top: 3px;
}
.merc-acct-drop__postal strong {
	color: var(--merc-chocolat);
}
.merc-acct-drop__login {
	background: var(--merc-button);
	border: 0;
	border-radius: 22px;
	color: #fff;
	cursor: pointer;
	font-size: 15px;
	font-weight: 700;
	margin: 8px 18px;
	padding: 10px 0;
	width: calc(100% - 36px);
}
.merc-acct-drop__login:hover {
	background: var(--merc-button-dark);
}
.merc-acct-drop__item {
	color: var(--merc-chocolat);
	display: block;
	font-size: 14px;
	padding: 10px 18px;
	text-decoration: none;
	transition: background 0.12s ease;
}
.merc-acct-drop__item:hover {
	background: #faf8f4;
}
.merc-acct-drop__item--faq,
.merc-acct-drop__item--help {
	color: #6b6966;
	font-size: 13px;
}
.merc-acct-drop__help-wrap {
	position: relative;
}
.merc-acct-drop__item--help {
	align-items: center;
	background: transparent;
	border: 0;
	cursor: pointer;
	display: flex;
	justify-content: space-between;
	width: 100%;
}
.merc-acct-drop__item--help svg {
	transition: transform 0.2s ease;
}
.merc-acct-drop__item--help[aria-expanded="true"] svg {
	transform: rotate(180deg);
}
.merc-acct-drop__help-menu {
	background: #faf8f4;
	border-radius: 8px;
	margin: 2px 12px 6px;
	overflow: hidden;
}
.merc-acct-drop__help-item {
	align-items: center;
	color: var(--merc-chocolat) !important;
	display: flex !important;
	font-size: 13px !important;
	gap: 9px !important;
	padding: 10px 14px !important;
	text-decoration: none;
	transition: background 0.12s ease;
}
.merc-acct-drop__help-item:hover {
	background: #f0ece5 !important;
}
.merc-acct-drop__help-item svg {
	color: var(--merc-deepgreen);
	flex-shrink: 0;
}
.merc-acct-drop__help-item:last-child svg {
	color: var(--merc-hover);
}
.merc-acct-drop__item--logout {
	color: var(--merc-add-dark, #55701B);
	font-weight: 700;
}

/* 账户下拉里的「Entregar en xxx」现在可点开邮编弹窗（与抽屉同一入口） */
.merc-acct-drop__postal {
	cursor: pointer;
}
