/**
 * Header Sanomart – mobile-first
 */

:root {
	--sanomart-bg: #ffffff;
	--sanomart-radius-pill: 999px;
	--sanomart-header-gap: 0.75rem;
	--sanomart-header-mobile-bg: var(--sanomart-bg, #ffffff);
	--sanomart-header-compact-threshold: 48px;
}

*,
*::before,
*::after {
	box-sizing: border-box;
}

body {
	margin: 0;
	color: var(--sanomart-text);
	background: var(--sanomart-bg);
}

.screen-reader-text {
	clip: rect(1px, 1px, 1px, 1px);
	clip-path: inset(50%);
	height: 1px;
	width: 1px;
	margin: -1px;
	overflow: hidden;
	padding: 0;
	position: absolute;
	word-wrap: normal !important;
}

/* Header – mobile first */
.sanomart-header {
	background: var(--sanomart-bg);
	border-bottom: none;
	padding: 0.75rem 0;
}

.sanomart-header__inner {
	display: flex;
	flex-direction: column;
	align-items: stretch;
	gap: var(--sanomart-header-gap);
}

/* Mobile menu toggle – ẩn desktop */
.sanomart-header__menu-toggle {
	display: none;
}

.sanomart-header__brand--mobile {
	display: none;
}

.sanomart-header__brand {
	display: flex;
	justify-content: center;
}

.sanomart-header__logo-link {
	display: inline-flex;
	line-height: 0;
	width: 120px;
	flex: 0 0 120px;
}

.sanomart-header__logo {
	display: block;
	height: auto;
	width: 100%;
	max-width: 100%;
}

.sanomart-header__search-wrap {
	width: 100%;
}

/* WooCommerce + fallback search */
.sanomart-header__search-form,
.sanomart-header__search-form .woocommerce-product-search {
	position: relative;
	width: 100%;
	margin: 0;
}

.sanomart-header__search-form form,
.sanomart-search-fallback {
	display: flex;
	align-items: center;
	width: 100%;
	border: 2px solid var(--sanomart-border);
	border-radius: var(--sanomart-radius-pill);
	background: var(--sanomart-bg);
	overflow: hidden;
}

.sanomart-header .woocommerce-product-search {
	display: flex;
	align-items: center;
	gap: 0;
}

.sanomart-header .woocommerce-product-search label {
	position: absolute;
	left: -9999px;
}

.sanomart-header .woocommerce-product-search input[type='search'],
.sanomart-header .woocommerce-product-search .search-field {
	margin: 0 !important;
	height: auto;
	line-height: 1.3;
	box-shadow: none;
}

.sanomart-header .woocommerce-product-search button[type='submit'] {
	margin: 0.2rem 0.25rem 0.2rem 0 !important;
	min-height: auto;
	line-height: 1;
	box-shadow: none;
}

.sanomart-header__search-input,
.sanomart-header__search-form .search-field {
	flex: 1;
	min-width: 0;
	border: 0;
	background: transparent;
	padding: 0.65rem 1rem;
	font-size: 1rem;
	color: var(--sanomart-text);
	outline: none;
}

.sanomart-header__search-input::placeholder,
.sanomart-header__search-form .search-field::placeholder {
	color: #7a9bb5;
}

.sanomart-header__search-submit,
.sanomart-header__search-form button[type='submit'] {
	flex-shrink: 0;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 2rem;
	height: 2rem;
	margin: 0.2rem 0.25rem 0.2rem 0;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: transparent;
	color: var(--sanomart-orange);
	cursor: pointer;
}

.sanomart-header__search-form label.screen-reader-text {
	position: absolute;
}

/* Gợi ý từ khóa */
.sanomart-header__suggestions {
	margin-top: 0.5rem;
}

.sanomart-header__suggestions-list {
	display: flex;
	flex-wrap: nowrap;
	gap: 0.35rem 1rem;
	margin: 0;
	padding: 0;
	list-style: none;
	justify-content: flex-start;
	overflow-x: auto;
	overflow-y: hidden;
	scrollbar-width: none;
	-webkit-overflow-scrolling: touch;
	white-space: nowrap;
}

.sanomart-header__suggestions-list::-webkit-scrollbar {
	display: none;
}

.sanomart-header__suggestions-item {
	flex: 0 0 auto;
}

.sanomart-header__suggestions-item a {
	font-size: 0.8125rem;
	color: var(--sanomart-blue);
	text-decoration: none;
	white-space: nowrap;
}

.sanomart-header__suggestions-item a:hover,
.sanomart-header__suggestions-item a:focus {
	text-decoration: underline;
	color: var(--sanomart-orange);
}

/* Actions */
.sanomart-header__actions {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 1rem;
	flex-wrap: wrap;
}

.sanomart-header__action {
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 2.5rem;
	height: 2.5rem;
	padding: 0;
	border: 0;
	background: transparent;
	color: var(--sanomart-blue);
	text-decoration: none;
	cursor: pointer;
	border-radius: 50%;
	transition: color 0.2s ease, background 0.2s ease;
	margin: 0 !important;
}

.sanomart-header__action--account-login {
	width: auto;
	min-width: 7.5rem;
	padding: 0 0.9rem;
	gap: 0.5rem;
	border-radius: 999px;
	background: #f5f8fa;
	border: 1px solid #e3ebf2;
}

.sanomart-header__action-text {
	font-size: 0.875rem;
	font-weight: 700;
	line-height: 1;
	white-space: nowrap;
}

.sanomart-header__action:hover,
.sanomart-header__action:focus-visible {
	color: var(--sanomart-orange);
	background: #f5f8fa;
	outline: none;
}

.sanomart-header__cart-count {
	position: absolute;
	top: 0;
	right: 0;
	min-width: 1.125rem;
	height: 1.125rem;
	padding: 0 0.25rem;
	font-size: 0.625rem;
	font-weight: 700;
	line-height: 1.125rem;
	text-align: center;
	color: #fff;
	background: var(--sanomart-orange);
	border-radius: var(--sanomart-radius-pill);
}

.sanomart-header__cart {
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
}

.sanomart-header__cart.is-mini-cart-open .sanomart-header__action--cart,
.sanomart-header__cart:hover .sanomart-header__action--cart,
.sanomart-header__cart:focus-within .sanomart-header__action--cart {
	color: var(--sanomart-orange);
	background: #f5f8fa;
}

.sanomart-header__cart .wrcf-mini-cart__panel {
	border: 1px solid #edf2f7;
}

.sanomart-header__cart .wrcf-mini-cart__price,
.sanomart-header__cart .woocommerce-Price-amount {
	color: #165dff;
}

.sanomart-header__cart .wrcf-mini-cart__cta {
	background: linear-gradient(180deg, #2f6cff 0%, #1f5ae0 100%);
	color: #fff;
	box-shadow: 0 12px 24px rgba(31, 90, 224, 0.22);
}

.sanomart-header__cart .wrcf-mini-cart__cta:hover,
.sanomart-header__cart .wrcf-mini-cart__cta:focus-visible {
	color: #fff;
	filter: brightness(1.03);
	outline: none;
}

.sanomart-header__account {
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
}

.sanomart-header__account--logged-in::after {
	content: '';
	position: absolute;
	top: 100%;
	left: 50%;
	width: 13.25rem;
	height: 0.8rem;
	transform: translateX(-50%);
}

.sanomart-header__account--logged-in .sanomart-header__account-menu {
	position: absolute;
	top: calc(100% + 0.65rem);
	right: 50%;
	z-index: 80;
	width: 13.25rem;
	margin: 0;
	padding: 0.5rem 0;
	border: 1px solid #d9e4ed;
	border-radius: 0.5rem;
	background: #fff;
	box-shadow: 0 14px 34px rgba(18, 45, 74, 0.16);
	opacity: 0;
	pointer-events: none;
	visibility: hidden;
	transform: translate(50%, -0.25rem);
	transition: opacity 0.16s ease, transform 0.16s ease, visibility 0.16s ease;
}

.sanomart-header__account--logged-in .sanomart-header__account-menu::before {
	content: '';
	position: absolute;
	top: -0.45rem;
	right: calc(50% - 0.45rem);
	width: 0.9rem;
	height: 0.9rem;
	border-top: 1px solid #d9e4ed;
	border-left: 1px solid #d9e4ed;
	background: #fff;
	transform: rotate(45deg);
}

.sanomart-header__account--logged-in:hover .sanomart-header__account-menu,
.sanomart-header__account--logged-in:focus-within .sanomart-header__account-menu {
	opacity: 1 !important;
	pointer-events: auto;
	visibility: visible;
	transform: translate(50%, 0);
}

.sanomart-header__account-menu-link {
	position: relative;
	z-index: 1;
	display: grid;
	grid-template-columns: 1.25rem minmax(0, 1fr);
	gap: 0.65rem;
	align-items: center;
	min-height: 2.65rem;
	padding: 0 0.95rem;
	color: #4b5568;
	font-size: 0.9375rem;
	font-weight: 600;
	line-height: 1.25;
	text-decoration: none;
	white-space: nowrap;
	transition: background 0.16s ease, color 0.16s ease;
}

.sanomart-header__account-menu-link:hover,
.sanomart-header__account-menu-link:focus-visible {
	color: var(--sanomart-blue);
	background: #f4f8ff;
	outline: none;
}

.sanomart-header__account-menu-link svg {
	width: 1.2rem;
	height: 1.2rem;
	fill: none;
	stroke: currentColor;
	stroke-width: 2;
	stroke-linecap: round;
	stroke-linejoin: round;
}

.sanomart-header__account-menu-link--logout {
	color: #dc2626;
}

.sanomart-header__account-menu-link--logout:hover,
.sanomart-header__account-menu-link--logout:focus-visible {
	color: #b91c1c;
	background: #fef2f2;
}

body.sanomart-modal-open {
	overflow: hidden;
}

.sanomart-header__account-login-modal[hidden] {
	display: none !important;
}

.sanomart-header__account-login-modal {
	position: fixed;
	inset: 0;
	z-index: 2000;
	display: grid;
	place-items: center;
	padding: 1rem;
}

.sanomart-header__account-login-modal__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(7, 17, 33, 0.48);
	backdrop-filter: blur(2px);
}

.sanomart-header__account-login-modal__dialog {
	position: relative;
	width: min(100%, 560px);
	max-height: min(100vh - 2rem, 720px);
	overflow: auto;
	padding: 2.25rem;
	border-radius: 1rem;
	background: #fff;
	box-shadow: 0 30px 80px rgba(0, 0, 0, 0.28);
	z-index: 1;
}

.sanomart-header__account-login-modal__close {
	position: absolute;
	top: 0.75rem;
	right: 0.75rem;
	width: 2rem;
	height: 2rem;
	border: 0;
	border-radius: 999px;
	background: #f1f5f9;
	color: #334155;
	font-size: 1.25rem;
	line-height: 1;
	cursor: pointer;
}

.sanomart-header__account-login-modal__close:hover,
.sanomart-header__account-login-modal__close:focus-visible {
	background: #e2e8f0;
	outline: none;
}

.sanomart-header__account-login-modal__title {
	margin: 0 2rem 1rem 0;
	font-size: 1.125rem;
	font-weight: 800;
	color: var(--sanomart-text);
}

.sanomart-header__account-login-modal__body .wrcf-account-auth,
.sanomart-header__account-login-modal__body .sanomart-account-auth {
	gap: 0.85rem;
}

.sanomart-header__account-login-modal__body .wrcf-account-auth__tabs,
.sanomart-header__account-login-modal__body .sanomart-account-auth__tabs {
	padding: 0.4rem;
}

.sanomart-header__account-login-modal__body .wrcf-account-auth__panel,
.sanomart-header__account-login-modal__body .sanomart-account-auth__panel {
	padding: 0;
}

.sanomart-header__account-login-modal__body .woocommerce-form-login .form-row,
.sanomart-header__account-login-modal__body .woocommerce-form-register .form-row {
	margin-bottom: 0.85rem;
}

.sanomart-header__account-login-modal__body .woocommerce-form-login .button,
.sanomart-header__account-login-modal__body .woocommerce-form-register .button {
	width: 100%;
}

/* Language selector */
.sanomart-header__lang {
	position: relative;
	min-width: 5.75rem;
	font-size: 0.8125rem;
	color: var(--sanomart-blue);
}

.sanomart-header__lang summary {
	list-style: none;
}

.sanomart-header__lang summary::-webkit-details-marker {
	display: none;
}

.sanomart-header__lang-current {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	width: 100%;
	min-height: 2.5rem;
	padding: 0.45rem 2rem 0.45rem 0.75rem;
	border: 1px solid #d9e4ed;
	border-radius: 0.625rem;
	background: #fff;
	box-shadow: 0 1px 3px rgba(42, 59, 143, 0.08);
	font-weight: 600;
	cursor: pointer;
	position: relative;
	user-select: none;
}

.sanomart-header__lang-current::after {
	content: '';
	position: absolute;
	top: 50%;
	right: 0.75rem;
	width: 0.45rem;
	height: 0.45rem;
	border-right: 2px solid currentColor;
	border-bottom: 2px solid currentColor;
	transform: translateY(-65%) rotate(45deg);
	transition: transform 0.18s ease;
}

.sanomart-header__lang[open] .sanomart-header__lang-current::after {
	transform: translateY(-35%) rotate(225deg);
}

.sanomart-header__lang-current:hover,
.sanomart-header__lang-current:focus-visible {
	border-color: var(--sanomart-blue);
	outline: none;
}

.sanomart-header__lang-menu {
	position: absolute;
	top: calc(100% + 0.35rem);
	right: 0;
	z-index: 30;
	width: 100%;
	min-width: 9.25rem;
	margin: 0;
	padding: 0.35rem;
	list-style: none;
	border: 1px solid #d9e4ed;
	border-radius: 0.625rem;
	background: #fff;
	box-shadow: 0 12px 28px rgba(18, 45, 74, 0.14);
}

.sanomart-header__lang-option {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	width: 100%;
	min-height: 2.25rem;
	padding: 0.45rem 0.55rem;
	border: 0;
	border-radius: 0.45rem;
	background: transparent;
	color: var(--sanomart-blue);
	font: inherit;
	font-weight: 600;
	text-align: left;
	cursor: pointer;
}

.sanomart-header__lang-option:hover,
.sanomart-header__lang-option:focus-visible,
.sanomart-header__lang-option--active {
	background: #eef5fb;
	outline: none;
}

.sanomart-header__lang-name {
	white-space: nowrap;
}

.sanomart-header__lang-flag {
	position: relative;
	width: 1.25rem;
	height: 1.25rem;
	border-radius: 50%;
	overflow: hidden;
	flex-shrink: 0;
	box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.12);
}

.sanomart-header__lang-flag--en {
	background:
		linear-gradient(0deg, transparent 42%, #fff 42%, #fff 58%, transparent 58%),
		linear-gradient(90deg, transparent 42%, #fff 42%, #fff 58%, transparent 58%),
		linear-gradient(0deg, transparent 45%, #c8102e 45%, #c8102e 55%, transparent 55%),
		linear-gradient(90deg, transparent 45%, #c8102e 45%, #c8102e 55%, transparent 55%),
		#012169;
}

.sanomart-header__lang-flag--vn {
	background: #da251d;
}

.sanomart-header__lang-flag--vn::after {
	content: '★';
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	color: #ffcd00;
	font-size: 0.65rem;
	line-height: 1;
}

/* Content / footer */
.sanomart-content {
	padding-top: 1.5rem;
	padding-bottom: 1.5rem;
}

.sanomart-footer {
	border-top: 1px solid #e8eef3;
	padding: 1rem;
	text-align: center;
	font-size: 0.875rem;
	color: #5a7a94;
}

/* Tablet+ */
@media (min-width: 768px) {
	.sanomart-header {
		padding: 1rem 0;
		position: static;
		background: var(--sanomart-bg);
		border-bottom: 1px solid #e8eef3;
	}

	.sanomart-header__inner {
		display: flex;
		flex-direction: row;
		align-items: center;
		flex-wrap: wrap;
		gap: 1rem 1.5rem;
	}

	.sanomart-header__menu-toggle,
	.sanomart-header__brand--mobile {
		display: none;
	}

	.sanomart-header__brand--desktop {
		display: flex;
		flex: 0 0 auto;
		justify-content: flex-start;
	}

	.sanomart-header__brand {
		flex: 0 0 auto;
		justify-content: flex-start;
	}

	.sanomart-header__account {
		display: inline-flex;
	}

	.sanomart-header__action {
		color: var(--sanomart-blue);
	}

	.sanomart-header__action--cart {
		background: transparent;
	}

	.sanomart-header__lang--desktop {
		display: block;
		color: var(--sanomart-blue);
	}

	.sanomart-header__lang--desktop .sanomart-header__lang-current {
		border-color: #d9e4ed;
		background: #fff;
		color: var(--sanomart-blue);
		box-shadow: 0 1px 3px rgba(42, 59, 143, 0.08);
	}

	.sanomart-header__suggestions {
		display: block;
	}

	.sanomart-header__suggestions-item a {
		color: var(--sanomart-blue);
	}

	.sanomart-header__suggestions-item a:hover,
	.sanomart-header__suggestions-item a:focus {
		color: var(--sanomart-orange);
		opacity: 1;
	}

	.sanomart-header__logo {
		max-width: 100%;
	}

	.sanomart-header__logo-link {
		width: 140px;
		flex-basis: 140px;
	}

	.sanomart-header__brand--desktop {
		order: 1;
	}

	.sanomart-header__search-wrap {
		flex: 1 1 280px;
		min-width: 0;
		order: 2;
	}

	.sanomart-header__actions {
		flex: 0 0 auto;
		order: 3;
		margin-left: auto;
		gap: 1.25rem;
	}

	.sanomart-header__suggestions-list {
		justify-content: flex-start;
	}
}

/* Desktop – 3 cột như mockup */
@media (min-width: 1024px) {
	.sanomart-header__inner {
		flex-wrap: nowrap;
		align-items: flex-start;
	}

	.sanomart-header__brand {
		align-self: center;
	}

	.sanomart-header__search-wrap {
		flex: 1 1 auto;
		max-width: 640px;
		margin: 0 auto;
	}

	.sanomart-header__actions {
		align-self: center;
		align-items: center;
	}

}

@media (max-width: 767px) {
	.sanomart-header {
		position: sticky;
		top: 0;
		z-index: 120;
		background: var(--sanomart-header-mobile-bg);
		border-bottom: 1px solid #e8eef3;
		padding: 0.65rem 0 0.75rem;
		transition: padding 0.28s ease;
		box-shadow: 0 1px 0 rgba(15, 23, 42, 0.04);
	}

	.sanomart-header__inner {
		display: grid;
		grid-template-columns: 1fr auto 1fr;
		grid-template-areas:
			'menu brand actions'
			'search search search';
		align-items: center;
		gap: 0.55rem 0.65rem;
	}

	.sanomart-header__menu-toggle {
		display: inline-flex;
		grid-area: menu;
		justify-self: start;
		align-items: center;
		justify-content: center;
		width: 2.5rem;
		height: 2.5rem;
		padding: 0;
		border: 0;
		border-radius: 50%;
		background: transparent;
		color: var(--sanomart-primary, #283b91);
		cursor: pointer;
		transition: background 0.2s ease;
	}

	.sanomart-header__menu-toggle:hover,
	.sanomart-header__menu-toggle:focus-visible {
		background: #eef2fb;
		outline: none;
	}

	.sanomart-header__menu-toggle-icon {
		display: block;
		width: 1.25rem;
		height: 2px;
		background: currentColor;
		position: relative;
		transition: transform 0.25s ease;
	}

	.sanomart-header__menu-toggle-icon::before,
	.sanomart-header__menu-toggle-icon::after {
		content: '';
		position: absolute;
		left: 0;
		width: 100%;
		height: 2px;
		background: currentColor;
		transition: transform 0.25s ease, top 0.25s ease, opacity 0.2s ease;
	}

	.sanomart-header__menu-toggle-icon::before {
		top: -6px;
	}

	.sanomart-header__menu-toggle-icon::after {
		top: 6px;
	}

	.sanomart-header__brand--mobile {
		display: flex;
		grid-area: brand;
		justify-self: center;
		justify-content: center;
		min-width: 0;
		transition: opacity 0.28s ease, transform 0.28s ease, max-height 0.28s ease;
	}

	.sanomart-header__brand--desktop {
		display: none;
	}

	.sanomart-header__brand--mobile .sanomart-header__logo-link {
		width: clamp(96px, 28vw, 130px);
		flex-basis: auto;
		padding: 0;
		background: transparent;
	}


	.sanomart-header__search-wrap {
		grid-area: search;
		width: 100%;
		transition: transform 0.28s ease, opacity 0.28s ease;
	}

	.sanomart-header__actions {
		grid-area: actions;
		justify-self: end;
		justify-content: flex-end;
		gap: 0.35rem;
		flex-wrap: nowrap;
	}

	.sanomart-header__account,
	.sanomart-header__lang--desktop {
		display: none;
	}

	.sanomart-header__action {
		color: var(--sanomart-primary, #283b91);
	}

	.sanomart-header__action--cart {
		background: #eef2fb;
		border: 1px solid #d9e4ed;
	}

	.sanomart-header__action:hover,
	.sanomart-header__action:focus-visible {
		color: var(--sanomart-orange, #fbaf43);
		background: #f5f8fa;
	}

	.sanomart-header__action--cart:hover,
	.sanomart-header__action--cart:focus-visible {
		color: var(--sanomart-primary, #283b91);
		background: #e8eef8;
		border-color: #c5d4e8;
	}

	.sanomart-header__search-form form,
	.sanomart-search-fallback,
	.sanomart-header .woocommerce-product-search {
		border: 1px solid #d9e4ed;
		background: #f8fafc;
		box-shadow: none;
	}

	.sanomart-header__search-input,
	.sanomart-header__search-form .search-field {
		padding: 0.7rem 0.5rem 0.7rem 1rem;
		font-size: 1rem;
	}

	.sanomart-header__search-submit,
	.sanomart-header__search-form button[type='submit'] {
		color: var(--sanomart-primary);
		width: 2.25rem;
		height: 2.25rem;
		margin-right: 0.35rem;
	}

	/* Ẩn icon mic/scan từ smart-search nếu có */
	.sanomart-header .ss-voice-btn,
	.sanomart-header .ss-scan-btn,
	.sanomart-header .smart-search-voice,
	.sanomart-header .smart-search-scan,
	.sanomart-header [class*='voice-search'],
	.sanomart-header [class*='barcode'],
	.sanomart-header [class*='scan-btn'] {
		display: none !important;
	}

	.sanomart-header__suggestions {
		display: block;
		margin-top: 0.45rem;
		min-width: 0;
		overflow: hidden;
	}

	.sanomart-header__suggestions-list {
		gap: 0.35rem 0.85rem;
		overscroll-behavior-x: contain;
		scroll-snap-type: x proximity;
	}

	.sanomart-header__suggestions-item {
		scroll-snap-align: start;
	}

	.sanomart-header__suggestions-item a {
		color: var(--sanomart-primary, #283b91);
		font-weight: 600;
	}

	.sanomart-header__suggestions-item a:hover,
	.sanomart-header__suggestions-item a:focus {
		color: var(--sanomart-orange, #fbaf43);
		text-decoration: underline;
		opacity: 1;
	}

	/* Compact header khi scroll */
	.sanomart-header.is-compact .sanomart-header__inner {
		grid-template-areas: 'menu search actions';
		gap: 0.5rem;
	}

	.sanomart-header.is-compact .sanomart-header__brand--mobile {
		opacity: 0;
		transform: scale(0.72);
		max-height: 0;
		overflow: hidden;
		pointer-events: none;
		grid-area: brand;
		position: absolute;
		width: 0;
		height: 0;
	}

	.sanomart-header.is-compact {
		padding-top: 0.5rem;
		padding-bottom: 0.5rem;
	}

	.sanomart-header.is-compact .sanomart-header__suggestions {
		display: none;
	}

	.sanomart-header__cart .wrcf-mini-cart {
		position: fixed;
		top: auto;
		right: 1rem;
		left: 1rem;
		bottom: 1rem;
		width: auto;
		transform: translateY(1rem);
	}

	.sanomart-header__cart .wrcf-mini-cart__panel {
		max-height: min(70vh, 34rem);
		overflow: auto;
	}
}

/* Mobile drawer */
.sanomart-drawer[hidden] {
	display: none !important;
}

.sanomart-drawer {
	position: fixed;
	inset: 0;
	z-index: 1300;
	display: block;
}

.sanomart-drawer__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(7, 17, 33, 0.45);
	opacity: 0;
	transition: opacity 0.3s ease;
}

.sanomart-drawer.is-open .sanomart-drawer__backdrop {
	opacity: 1;
}

.sanomart-drawer__panel {
	position: absolute;
	top: 0;
	left: 0;
	bottom: 0;
	display: flex;
	flex-direction: column;
	width: min(88vw, 22rem);
	max-width: 100%;
	background: #fff;
	box-shadow: 8px 0 32px rgba(12, 40, 74, 0.18);
	transform: translateX(-105%);
	transition: transform 0.32s cubic-bezier(0.4, 0, 0.2, 1);
	overflow: hidden;
}

.sanomart-drawer.is-open .sanomart-drawer__panel {
	transform: translateX(0);
}

.sanomart-drawer__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.75rem;
	padding: 1rem 1rem 0.75rem;
	border-bottom: 1px solid #e8eef3;
}

.sanomart-drawer__logo-link {
	display: inline-flex;
	line-height: 0;
	max-width: 9rem;
}

.sanomart-drawer__logo {
	display: block;
	width: 100%;
	height: auto;
}

.sanomart-drawer__close {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 2.25rem;
	height: 2.25rem;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: #f1f5f9;
	color: var(--sanomart-primary);
	cursor: pointer;
	transition: background 0.2s ease;
}

.sanomart-drawer__close:hover,
.sanomart-drawer__close:focus-visible {
	background: #e2e8f0;
	outline: none;
}

.sanomart-drawer__auth {
	flex-shrink: 0;
	padding: 1rem;
	background: var(--sanomart-primary);
	color: #fff;
}

.sanomart-drawer__auth-text {
	margin: 0 0 0.85rem;
	font-size: 0.875rem;
	line-height: 1.45;
	font-weight: 500;
}

.sanomart-drawer__auth-actions {
	display: flex;
	gap: 0.65rem;
}

.sanomart-drawer__auth-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 2.5rem;
	padding: 0.5rem 1rem;
	border-radius: var(--sanomart-radius-pill);
	font-size: 0.875rem;
	font-weight: 700;
	text-decoration: none;
	cursor: pointer;
	border: 2px solid transparent;
	transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.sanomart-drawer__auth-btn--login {
	background: #fff;
	color: var(--sanomart-primary);
	border-color: #fff;
}

.sanomart-drawer__auth-btn--register {
	background: transparent;
	color: #fff;
	border-color: rgba(255, 255, 255, 0.85);
}

.sanomart-drawer__auth-btn--primary {
	width: 100%;
	background: #fff;
	color: var(--sanomart-primary);
}

.sanomart-drawer__auth-btn:hover,
.sanomart-drawer__auth-btn:focus-visible {
	filter: brightness(1.03);
	outline: none;
}

.sanomart-drawer__lang {
	flex-shrink: 0;
	width: 100%;
}

.sanomart-drawer__lang-label {
	margin: 0 0 0.5rem;
	font-size: 0.75rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	color: #6b7280;
}

.sanomart-drawer__lang .sanomart-header__lang--drawer {
	width: 100%;
	min-width: 0;
	color: var(--sanomart-primary);
}

.sanomart-drawer__lang .sanomart-header__lang-current {
	width: 100%;
	border-color: #d9e4ed;
	background: #f8fafc;
	color: var(--sanomart-primary);
	box-shadow: none;
}

.sanomart-drawer__lang .sanomart-header__lang-menu {
	position: static;
	width: 100%;
	min-width: 0;
	margin-top: 0.35rem;
	box-shadow: none;
	border: 1px solid #e8eef3;
}

.sanomart-drawer__nav {
	flex: 1;
	min-height: 0;
	overflow-y: auto;
	-webkit-overflow-scrolling: touch;
}

.sanomart-drawer__nav-list {
	margin: 0;
	padding: 0;
	list-style: none;
}

.sanomart-drawer__nav-list > .menu-item {
	border-bottom: 1px solid #edf2f7;
}

.sanomart-drawer__nav .sanomart-nav__link {
	color: var(--sanomart-primary);
	padding: 0.9rem 1rem;
	font-weight: 600;
}

.sanomart-drawer__nav .sanomart-nav__link:hover,
.sanomart-drawer__nav .sanomart-nav__link:focus-visible {
	background: #f4f8ff;
	color: var(--sanomart-primary);
}

.sanomart-drawer__nav .sanomart-nav__chevron {
	border-color: var(--sanomart-primary);
}

.sanomart-drawer__nav .sub-menu,
.sanomart-drawer__nav .sanomart-drawer__submenu {
	display: none;
	margin: 0;
	padding: 0;
	list-style: none;
	background: #f8fafc;
}

.sanomart-drawer__nav .menu-item.is-drawer-submenu-open > .sub-menu,
.sanomart-drawer__nav .menu-item.is-drawer-submenu-open > .sanomart-drawer__submenu {
	display: block;
}

.sanomart-drawer__nav .menu-item.is-drawer-submenu-open > .sanomart-nav__link .sanomart-nav__chevron {
	transform: rotate(-135deg);
}

.sanomart-drawer__sub-link {
	display: flex;
	align-items: center;
	gap: 0.65rem;
	padding: 0.75rem 1rem 0.75rem 1.5rem;
	color: var(--sanomart-primary);
	text-decoration: none;
	font-size: 0.875rem;
	font-weight: 500;
	border-top: 1px solid #edf2f7;
}

.sanomart-drawer__sub-link:hover,
.sanomart-drawer__sub-link:focus-visible {
	background: #f4f8ff;
	color: var(--sanomart-primary);
	outline: none;
}

.sanomart-drawer__sub-icon {
	width: 24px;
	height: 24px;
	object-fit: contain;
	flex-shrink: 0;
}

.sanomart-drawer .sanomart-mega,
.sanomart-drawer .sanomart-mega__products {
	display: none !important;
}

.sanomart-drawer__footer {
	flex-shrink: 0;
	display: flex;
	flex-direction: column;
	gap: 0.85rem;
	padding: 0.85rem 1rem 1.25rem;
	border-top: 1px solid #e8eef3;
	background: #fff;
}

.sanomart-drawer__zalo-btn {
	width: 100%;
	justify-content: center;
	gap: 0.5rem;
	border-color: #0068ff;
	color: #0068ff;
	font-weight: 700;
}

.sanomart-drawer__footer .sanomart-drawer__lang {
	margin-top: 0;
	padding-top: 0.85rem;
	border-top: 1px solid #edf2f7;
}

.sanomart-drawer__footer:not(:has(.sanomart-drawer__zalo-btn)) .sanomart-drawer__lang {
	padding-top: 0;
	border-top: 0;
}

.sanomart-drawer__zalo-btn:hover,
.sanomart-drawer__zalo-btn:focus-visible {
	background: #f0f7ff;
	color: #0052cc;
	border-color: #0052cc;
}

.sanomart-drawer__zalo-icon {
	display: block;
	width: 18px;
	height: 18px;
	flex-shrink: 0;
	object-fit: contain;
}

body.sanomart-drawer-open {
	overflow: hidden;
}

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