:root {
	--vapms-c: #0b64d8;
	--vapms-offset: 0px;
	--vapms-ink: #14202e;
	--vapms-mute: #66768a;
	--vapms-line: #e3e9f0;
	--vapms-bg: #f3f6fa;
	--vapms-soft: color-mix(in srgb, var(--vapms-c) 9%, #fff);
	--vapms-r: 12px;
}

.vapms,
.vapms-layer,
.vapms-nav {
	box-sizing: border-box;
	font-family: inherit;
	color: var(--vapms-ink);
	-webkit-tap-highlight-color: transparent;
}
.vapms *,
.vapms-layer *,
.vapms-nav * { box-sizing: border-box; }
.vapms [hidden],
.vapms-layer[hidden] { display: none !important; }

.vapms button,
.vapms-layer button {
	font: inherit;
	color: inherit;
	margin: 0;
	text-transform: none;
	letter-spacing: normal;
	min-height: 0;
	line-height: 1.2;
	cursor: pointer;
}

html.vapms-lock,
html.vapms-lock body { overflow: hidden; }

.vapms {
	max-width: 1200px;
	margin: 0 auto;
	padding: 0 0 24px;
}

/* ---------- thanh trên cùng ---------- */

.vapms-top {
	position: sticky;
	top: var(--vapms-offset);
	z-index: 30;
	background: #fff;
	border-bottom: 1px solid var(--vapms-line);
	padding-top: 10px;
}
.vapms-bar {
	display: flex;
	align-items: center;
	gap: 6px;
	padding: 0 10px 10px;
}
.vapms-ibtn {
	position: relative;
	flex: none;
	width: 42px;
	height: 42px;
	padding: 0;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border: 0;
	border-radius: 50%;
	background: transparent;
	color: var(--vapms-ink);
}
.vapms-ibtn:active { background: var(--vapms-bg); }
.vapms-ibtn__n {
	position: absolute;
	top: 3px;
	right: 2px;
	min-width: 18px;
	height: 18px;
	padding: 0 5px;
	border-radius: 9px;
	background: var(--vapms-c);
	color: #fff;
	font-size: 11px;
	font-weight: 600;
	line-height: 18px;
	text-align: center;
}

.vapms-search {
	position: relative;
	flex: 1;
	min-width: 0;
}
.vapms-search__ic {
	position: absolute;
	left: 12px;
	top: 50%;
	transform: translateY(-50%);
	display: flex;
	color: var(--vapms-mute);
	pointer-events: none;
}
.vapms .vapms-search__in,
.vapms-layer .vapms-search__in {
	display: block;
	width: 100%;
	height: 42px;
	margin: 0;
	padding: 0 38px 0 38px;
	border: 1.5px solid transparent;
	border-radius: 21px;
	background: var(--vapms-bg);
	box-shadow: none;
	font-size: 16px; /* chặn iOS tự phóng to khi focus */
	color: var(--vapms-ink);
	-webkit-appearance: none;
	appearance: none;
}
.vapms .vapms-search__in:focus,
.vapms-layer .vapms-search__in:focus {
	outline: none;
	background: #fff;
	border-color: var(--vapms-c);
	box-shadow: none;
}
.vapms .vapms-search__in::-webkit-search-cancel-button,
.vapms-layer .vapms-search__in::-webkit-search-cancel-button { display: none; }
.vapms-search__x {
	position: absolute;
	right: 6px;
	top: 50%;
	transform: translateY(-50%);
	width: 30px;
	height: 30px;
	padding: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	border: 0;
	border-radius: 50%;
	background: transparent;
	color: var(--vapms-mute);
}

/* gợi ý tìm kiếm */
.vapms-sugg__h {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 10px 0 4px;
	font-size: 13px;
	color: var(--vapms-mute);
}
.vapms-sugg__h button {
	border: 0;
	background: none;
	padding: 4px 0;
	color: var(--vapms-c);
	font-size: 13px;
}
.vapms-sugg__r {
	display: flex;
	align-items: center;
	gap: 10px;
	width: 100%;
	padding: 10px 0;
	border: 0;
	border-bottom: 1px solid var(--vapms-bg);
	background: none;
	text-align: left;
	font-size: 15px;
}
.vapms-sugg__r span { display: flex; color: var(--vapms-mute); }
.vapms-sugg__w { display: flex; flex-wrap: wrap; gap: 8px; padding-top: 6px; }

/* ---------- chips ---------- */

.vapms-chips {
	position: relative;
	display: flex;
	gap: 8px;
	padding: 0 10px 10px;
	overflow-x: auto;
	scrollbar-width: none;
	-webkit-overflow-scrolling: touch;
}
.vapms-chips::-webkit-scrollbar { display: none; }

.vapms-chip {
	flex: none;
	height: 34px;
	padding: 0 14px;
	border: 1px solid var(--vapms-line);
	border-radius: 17px;
	background: #fff;
	font-size: 14px;
	white-space: nowrap;
}
.vapms-chip.is-on {
	background: var(--vapms-c);
	border-color: var(--vapms-c);
	color: #fff;
	font-weight: 600;
}
/* bộ lọc đang chọn */
.vapms-active {
	display: flex;
	gap: 8px;
	padding: 0 10px 10px;
	overflow-x: auto;
	scrollbar-width: none;
}
.vapms-active::-webkit-scrollbar { display: none; }
.vapms-tag {
	flex: none;
	display: inline-flex;
	align-items: center;
	gap: 6px;
	height: 30px;
	padding: 0 8px 0 12px;
	border: 0;
	border-radius: 15px;
	background: var(--vapms-soft);
	color: var(--vapms-c);
	font-size: 13px;
	white-space: nowrap;
}
.vapms-tag span { display: flex; }
.vapms-tag--clear { padding: 0 12px; background: transparent; text-decoration: underline; color: var(--vapms-mute); }

/* ---------- số lượng + sắp xếp ---------- */

.vapms-meta {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	padding: 12px 12px 8px;
}
.vapms-count { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; color: var(--vapms-mute); min-height: 20px; }
.vapms .vapms-sort {
	width: auto;
	flex: none;
	max-width: 48%;
	height: 36px;
	margin: 0;
	padding: 0 28px 0 12px;
	border: 1px solid var(--vapms-line);
	border-radius: 18px;
	background-color: #fff;
	font-size: 14px;
	color: var(--vapms-ink);
	box-shadow: none;
}

/* ---------- lưới sản phẩm ---------- */

.vapms-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 10px;
	padding: 0 10px;
}
.vapms-card {
	display: flex;
	flex-direction: column;
	overflow: hidden;
	border: 1px solid var(--vapms-line);
	border-radius: var(--vapms-r);
	background: #fff;
	color: inherit;
	text-decoration: none;
}
.vapms-card:active { border-color: var(--vapms-c); }
.vapms-card__img {
	position: relative;
	display: block;
	aspect-ratio: 1 / 1;
	background: #fff;
	border-bottom: 1px solid var(--vapms-bg);
}
.vapms-card__img img {
	display: block;
	width: 100%;
	height: 100%;
	margin: 0;
	object-fit: contain;
	padding: 8px;
}
.vapms-badge {
	position: absolute;
	top: 8px;
	left: 8px;
	padding: 2px 7px;
	border-radius: 6px;
	background: #e5352b;
	color: #fff;
	font-style: normal;
	font-size: 12px;
	font-weight: 700;
}
.vapms-card__body {
	display: flex;
	flex: 1;
	flex-direction: column;
	gap: 6px;
	padding: 10px;
}
.vapms-card__t {
	margin: 0;
	padding: 0;
	font-size: 14px;
	font-weight: 500;
	line-height: 1.35;
	color: var(--vapms-ink);
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	min-height: 2.7em;
}
.vapms-card__p {
	margin-top: auto;
	font-size: 15px;
	font-weight: 700;
	color: #d6281f;
}
.vapms-card__p del { color: var(--vapms-mute); font-weight: 400; font-size: 12px; margin-right: 4px; }
.vapms-card__p ins { text-decoration: none; }
.vapms-card__p .screen-reader-text { position: absolute; clip: rect(0 0 0 0); width: 1px; height: 1px; overflow: hidden; }
.vapms-card__p--call { color: var(--vapms-c); font-weight: 600; font-size: 14px; }

.vapms-card.is-skel { pointer-events: none; }
.vapms-card.is-skel .vapms-card__img { background: var(--vapms-bg); }
.vapms-sk {
	display: block;
	height: 12px;
	border-radius: 6px;
	background: linear-gradient(90deg, var(--vapms-bg) 25%, #e8eef5 50%, var(--vapms-bg) 75%);
	background-size: 200% 100%;
	animation: vapms-shine 1.2s linear infinite;
}
.vapms-sk--s { width: 55%; }
@keyframes vapms-shine { to { background-position: -200% 0; } }

.vapms-more {
	display: block;
	width: calc(100% - 20px);
	margin: 14px 10px 0;
	height: 46px;
	border: 1.5px solid var(--vapms-c);
	border-radius: 23px;
	background: #fff;
	color: var(--vapms-c);
	font-size: 15px;
	font-weight: 600;
}
.vapms-more:disabled { opacity: .6; }
.vapms-sentinel { height: 1px; }

.vapms-empty {
	margin: 24px 10px;
	padding: 28px 18px;
	text-align: center;
	border: 1px dashed var(--vapms-line);
	border-radius: var(--vapms-r);
}
.vapms-empty strong { display: block; font-size: 17px; }
.vapms-empty p { margin: 8px 0 16px; color: var(--vapms-mute); }
.vapms-empty__row { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }

/* ---------- nút chung ---------- */

.vapms .vapms-btn,
.vapms-layer .vapms-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	height: 44px;
	padding: 0 18px;
	border: 1.5px solid var(--vapms-line);
	border-radius: 22px;
	background: #fff;
	font-size: 15px;
	font-weight: 600;
	text-decoration: none;
	color: var(--vapms-ink);
}
.vapms .vapms-btn--solid,
.vapms-layer .vapms-btn--solid {
	background: var(--vapms-c);
	border-color: var(--vapms-c);
	color: #fff;
}
.vapms-layer .vapms-btn:disabled { opacity: .45; }

.vapms-pill {
	height: 36px;
	padding: 0 14px;
	border: 1px solid var(--vapms-line);
	border-radius: 18px;
	background: #fff;
	font-size: 14px;
}
.vapms-pill[aria-pressed="true"] {
	border-color: var(--vapms-c);
	background: var(--vapms-soft);
	color: var(--vapms-c);
	font-weight: 600;
}

/* ---------- lớp phủ ---------- */

.vapms-layer { position: fixed; inset: 0; z-index: 100000; }

/* ngăn kéo danh mục */
.vapms-drawer { background: #fff; transform: translateX(100%); transition: transform .24s ease; }
.vapms-drawer.is-open { transform: none; }
.vapms-d__panel { display: flex; flex-direction: column; height: 100%; }
.vapms-d__head {
	display: flex;
	align-items: center;
	gap: 4px;
	padding: 8px 10px;
	padding-top: calc(8px + env(safe-area-inset-top, 0px));
	border-bottom: 1px solid var(--vapms-line);
	font-size: 17px;
}
.vapms-d__body { display: flex; flex: 1; min-height: 0; }
.vapms-d__left {
	flex: none;
	width: 30%;
	min-width: 104px;
	max-width: 160px;
	overflow-y: auto;
	background: var(--vapms-bg);
	padding-bottom: env(safe-area-inset-bottom, 0px);
}
.vapms-d__item {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 6px;
	width: 100%;
	padding: 12px 6px;
	border: 0;
	border-left: 3px solid transparent;
	background: transparent;
	font-size: 13px;
	line-height: 1.25;
	text-align: center;
}
.vapms-d__item.is-on {
	background: #fff;
	border-left-color: var(--vapms-c);
	color: var(--vapms-c);
	font-weight: 600;
}
.vapms-d__right {
	flex: 1;
	min-width: 0;
	overflow-y: auto;
	padding: 14px 12px;
	padding-bottom: calc(14px + env(safe-area-inset-bottom, 0px));
}
.vapms-d__hint { color: var(--vapms-mute); font-size: 14px; }
.vapms .vapms-d__all,
.vapms-layer .vapms-d__all { width: 100%; height: 42px; font-size: 14px; margin-bottom: 14px; }
.vapms-d__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 10px; }
/* bảng lọc (kéo từ dưới lên) */
.vapms-s__dim { position: absolute; inset: 0; background: rgba(10, 20, 32, .5); opacity: 0; transition: opacity .2s ease; }
.vapms-sheet.is-open .vapms-s__dim { opacity: 1; }
.vapms-s__panel {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	display: flex;
	flex-direction: column;
	max-height: 86vh;
	border-radius: 20px 20px 0 0;
	background: #fff;
	transform: translateY(100%);
	transition: transform .26s cubic-bezier(.2, .8, .2, 1);
}
.vapms-sheet.is-open .vapms-s__panel { transform: none; }
.vapms-s__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 10px 8px 6px 18px;
	font-size: 17px;
}
.vapms-s__body { flex: 1; overflow-y: auto; padding: 0 18px 8px; }
.vapms-group h4 { margin: 16px 0 10px; font-size: 15px; font-weight: 600; }
.vapms-pills { display: flex; flex-wrap: wrap; gap: 8px; }
.vapms-s__foot {
	display: flex;
	gap: 10px;
	padding: 12px 18px;
	padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px));
	border-top: 1px solid var(--vapms-line);
}
.vapms-s__foot .vapms-btn { flex: 1; }
.vapms-s__foot .vapms-btn--solid { flex: 2; }

/* ---------- thanh điều hướng dưới ---------- */

.vapms-nav { display: none; }

@media (max-width: 849px) {
	body.vapms-has-nav { padding-bottom: calc(62px + env(safe-area-inset-bottom, 0px)); }
	.vapms-nav {
		position: fixed;
		left: 0;
		right: 0;
		bottom: 0;
		z-index: 9990;
		display: flex;
		background: #fff;
		border-top: 1px solid var(--vapms-line);
		padding-bottom: env(safe-area-inset-bottom, 0px);
	}
	.vapms-nav__i {
		position: relative;
		flex: 1;
		display: flex;
		flex-direction: column;
		align-items: center;
		justify-content: center;
		gap: 3px;
		height: 58px;
		color: var(--vapms-mute);
		font-size: 11px;
		text-decoration: none;
	}
	.vapms-nav__i.is-on { color: var(--vapms-c); font-weight: 600; }
	.vapms-nav__i span { line-height: 1; }
	.vapms-nav__n {
		position: absolute;
		top: 5px;
		left: calc(50% + 6px);
		min-width: 17px;
		height: 17px;
		padding: 0 4px;
		border-radius: 9px;
		background: #e5352b;
		color: #fff;
		font-size: 10px;
		line-height: 17px;
		text-align: center;
	}
}

/* ---------- màn hình lớn ---------- */

@media (min-width: 640px) {
	.vapms-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; padding: 0 14px; }
}
@media (min-width: 900px) {
	.vapms-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
	.vapms-d__grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
	.vapms-drawer {
		inset: 5vh 10vw;
		border-radius: 18px;
		overflow: hidden;
		box-shadow: 0 0 0 100vmax rgba(10, 20, 32, .5);
		transform: scale(.97);
		opacity: 0;
		transition: transform .2s ease, opacity .2s ease;
	}
	.vapms-drawer.is-open { transform: none; opacity: 1; }
	.vapms-s__panel {
		left: 50%;
		right: auto;
		bottom: auto;
		top: 50%;
		width: 520px;
		border-radius: 18px;
		transform: translate(-50%, -46%);
		opacity: 0;
		transition: transform .2s ease, opacity .2s ease;
	}
	.vapms-sheet.is-open .vapms-s__panel { transform: translate(-50%, -50%); opacity: 1; }
}

.vapms button:focus-visible,
.vapms a:focus-visible,
.vapms-layer button:focus-visible,
.vapms-nav a:focus-visible { outline: 2px solid var(--vapms-c); outline-offset: 2px; }

@media (prefers-reduced-motion: reduce) {
	.vapms-drawer,
.vapms-s__panel,
.vapms-s__dim,
.vapms-sk { transition: none; animation: none; }
}

/* ---------- avatar chữ cái / ảnh ---------- */

.vapms-av {
	display: flex;
	align-items: center;
	justify-content: center;
	font-weight: 700;
	font-size: 20px;
}
.vapms-av--all { background: var(--vapms-soft) !important; color: var(--vapms-c) !important; }

/* ---------- lưới ngành hàng (trang chủ app) ---------- */

.vapms-home { padding: 14px 10px 4px; }
.vapms-h { margin: 0 2px 12px; padding: 0; font-size: 17px; font-weight: 700; line-height: 1.3; color: var(--vapms-ink); }
.vapms-ic { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px 6px; }
.vapms-ic__b {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 7px;
	padding: 0;
	border: 0;
	background: none;
	text-align: center;
}
.vapms-ic__i {
	display: block;
	width: 100%;
	max-width: 68px;
	aspect-ratio: 1 / 1;
	object-fit: contain;
	padding: 6px;
	border: 1px solid var(--vapms-line);
	border-radius: 18px;
	background: #fff;
}
.vapms-ic__i.vapms-av { padding: 0; font-size: 24px; }
.vapms-ic__b:active .vapms-ic__i { border-color: var(--vapms-c); }
.vapms-ic__n {
	font-size: 12px;
	line-height: 1.3;
	color: var(--vapms-ink);
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

/* ---------- dải hãng / dòng sản phẩm ---------- */

.vapms-strip {
	position: relative;
	display: flex;
	gap: 6px;
	padding: 12px 10px 2px;
	overflow-x: auto;
	scrollbar-width: none;
	-webkit-overflow-scrolling: touch;
}
.vapms-strip::-webkit-scrollbar { display: none; }

/* ---------- ngăn kéo: ảnh/chữ cái, tiêu đề, nhóm lọc nhanh ---------- */

.vapms-d__ai {
	display: block;
	width: 40px;
	height: 40px;
	object-fit: contain;
	border-radius: 10px;
	background: #fff;
}
.vapms-d__ai.vapms-av { font-size: 17px; }
.vapms-d__sep { padding: 14px 10px 4px; font-size: 12px; color: var(--vapms-mute); text-align: center; }
.vapms-d__title { margin: 0 0 12px; padding: 0; font-size: 16px; font-weight: 700; line-height: 1.35; color: var(--vapms-ink); }
.vapms-d__nm { font-size: 13px; font-weight: 600; line-height: 1.3; color: var(--vapms-ink); }
.vapms-d__ct { font-size: 11px; color: var(--vapms-mute); }

@media (min-width: 640px) {
	.vapms-ic { grid-template-columns: repeat(8, minmax(0, 1fr)); }
	.vapms-d__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (min-width: 900px) {
	.vapms-d__grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* ---------- kích thước ảnh: khung cố định, ảnh tự co vừa khung ---------- */

.vapms-pic,
.vapms-av.vapms-av {
	box-sizing: border-box;
	display: flex;
	align-items: center;
	justify-content: center;
	overflow: hidden;
}
.vapms-pic img {
	display: block;
	width: auto;
	height: auto;
	max-width: 100%;
	max-height: 100%;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 0;
	box-shadow: none;
	object-fit: contain;
}

/* lưới ngành hàng */
.vapms-ic__i {
	width: 100%;
	max-width: 72px;
	height: auto;
	aspect-ratio: 1 / 1;
	padding: 9px;
	border: 1px solid var(--vapms-line);
	border-radius: 18px;
	background: #fff;
}
.vapms-av.vapms-ic__i { padding: 0; }

/* ngăn kéo */
.vapms-d__ai {
	width: 44px;
	height: 44px;
	padding: 5px;
	border: 1px solid var(--vapms-line);
	border-radius: 10px;
	background: #fff;
}
.vapms-av.vapms-d__ai { padding: 0; }

/* ảnh sản phẩm: lấp đầy khung vuông, không bị theme ghi đè */
.vapms-card__img img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	max-width: none;
	padding: 10px;
	object-fit: contain;
}

/* lớp tìm kiếm ở các trang khác */
.vapms-sl__body { flex: 1; overflow-y: auto; padding: 4px 16px 24px; }
.vapms-d__head .vapms-search { flex: 1; min-width: 0; margin-right: 4px; }

/* ================= Ô TÌM KIẾM (gia cố chống theme ghi đè) ================= */

.vapms-search {
	position: relative;
	flex: 1 1 auto;
	min-width: 0;
	margin: 0;
	padding: 0;
}
.vapms-search__ic {
	position: absolute;
	left: 13px;
	top: 50%;
	z-index: 2;
	width: 18px;
	height: 18px;
	margin-top: -9px;
	display: flex;
	align-items: center;
	justify-content: center;
	color: var(--vapms-mute);
	pointer-events: none;
}
.vapms-search__ic svg { display: block; width: 18px; height: 18px; }

.vapms .vapms-search input.vapms-search__in[type="search"],
.vapms-layer .vapms-search input.vapms-search__in[type="search"] {
	-webkit-appearance: none;
	appearance: none;
	box-sizing: border-box;
	display: block;
	float: none;
	width: 100%;
	max-width: none;
	height: 42px;
	min-height: 0;
	margin: 0;
	padding: 0 40px 0 40px;
	border: 1.5px solid transparent;
	border-radius: 21px;
	background: var(--vapms-bg);
	box-shadow: none;
	color: var(--vapms-ink);
	font-family: inherit;
	font-size: 16px;
	font-weight: 400;
	line-height: 1.2;
	text-indent: 0;
	text-transform: none;
	letter-spacing: normal;
	outline: 0;
}
.vapms .vapms-search input.vapms-search__in[type="search"]:focus,
.vapms-layer .vapms-search input.vapms-search__in[type="search"]:focus {
	background: #fff;
	border-color: var(--vapms-c);
	box-shadow: 0 0 0 3px color-mix(in srgb, var(--vapms-c) 14%, transparent);
}
.vapms .vapms-search input.vapms-search__in::placeholder,
.vapms-layer .vapms-search input.vapms-search__in::placeholder { color: #8a97a8; opacity: 1; }
.vapms-search input.vapms-search__in::-webkit-search-decoration,
.vapms-search input.vapms-search__in::-webkit-search-cancel-button,
.vapms-search input.vapms-search__in::-webkit-search-results-button,
.vapms-search input.vapms-search__in::-webkit-search-results-decoration { display: none; -webkit-appearance: none; }

.vapms .vapms-search .vapms-search__x {
	position: absolute;
	right: 5px;
	top: 50%;
	z-index: 2;
	width: 32px;
	height: 32px;
	margin: -16px 0 0;
	padding: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	border: 0;
	border-radius: 50%;
	background: transparent;
	box-shadow: none;
	text-shadow: none;
	color: var(--vapms-mute);
}
.vapms .vapms-search .vapms-search__x[hidden] { display: none; }
.vapms .vapms-search .vapms-search__x svg { display: block; }

/* khung gợi ý: rộng đúng bằng thanh trên, nằm ngay dưới ô tìm kiếm */
.vapms-top .vapms-sugg {
	position: absolute;
	left: 10px;
	right: 10px;
	top: 56px;
	z-index: 40;
	max-height: min(60vh, 420px);
	overflow-y: auto;
	-webkit-overflow-scrolling: touch;
	margin: 0;
	padding: 4px 14px 14px;
	background: #fff;
	border: 1px solid var(--vapms-line);
	border-radius: var(--vapms-r);
	box-shadow: 0 14px 32px rgba(20, 32, 46, .16);
}
.vapms-sugg__r { color: var(--vapms-ink); }
.vapms-sugg__r:last-of-type { border-bottom: 0; }

/* hàng đầu của lớp tìm kiếm ở trang khác */
.vapms-d__head .vapms-search { margin-right: 6px; }

/* ---------- thương hiệu: chỉ hiện tên ---------- */

.vapms-strip { gap: 8px; padding: 12px 10px 2px; }
.vapms .vapms-bt {
	flex: none;
	height: 36px;
	padding: 0 16px;
	border: 1px solid var(--vapms-line);
	border-radius: 18px;
	background: #fff;
	box-shadow: none;
	font-size: 14px;
	line-height: 1;
	white-space: nowrap;
	color: var(--vapms-ink);
}
.vapms .vapms-bt.is-on {
	border-color: var(--vapms-c);
	background: var(--vapms-soft);
	color: var(--vapms-c);
	font-weight: 600;
}

.vapms-layer .vapms-d__bt {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	justify-content: center;
	gap: 3px;
	min-height: 52px;
	padding: 8px 12px;
	border: 1px solid var(--vapms-line);
	border-radius: var(--vapms-r);
	background: #fff;
	text-align: left;
}
.vapms-layer .vapms-d__bt:active { border-color: var(--vapms-c); background: var(--vapms-soft); }
.vapms-d__grid { gap: 10px; }

/* ================= Ô TÌM KIẾM v2: khung bo tròn, icon + ô nhập + nút xóa xếp cạnh nhau ================= */

.vapms-search {
	position: relative;
	display: flex !important;
	align-items: center;
	gap: 8px;
	flex: 1 1 auto;
	min-width: 0;
	height: 42px;
	margin: 0;
	padding: 0 6px 0 14px !important;
	box-sizing: border-box;
	border: 1.5px solid transparent;
	border-radius: 21px;
	background: var(--vapms-bg);
}
.vapms-search:focus-within {
	background: #fff;
	border-color: var(--vapms-c);
	box-shadow: 0 0 0 3px color-mix(in srgb, var(--vapms-c) 14%, transparent);
}
.vapms .vapms-search .vapms-search__ic,
.vapms-layer .vapms-search .vapms-search__ic {
	position: static !important;
	flex: none;
	width: 18px;
	height: 18px;
	margin: 0 !important;
	transform: none !important;
	display: flex;
	align-items: center;
	justify-content: center;
	color: var(--vapms-mute);
	pointer-events: none;
}
.vapms .vapms-search input.vapms-search__in[type="search"],
.vapms-layer .vapms-search input.vapms-search__in[type="search"] {
	flex: 1 1 auto !important;
	width: auto !important;
	min-width: 0 !important;
	height: 100% !important;
	margin: 0 !important;
	padding: 0 !important;
	border: 0 !important;
	border-radius: 0 !important;
	background: transparent !important;
	box-shadow: none !important;
	outline: 0 !important;
	font-size: 16px !important;
	line-height: normal !important;
	text-indent: 0 !important;
}
.vapms .vapms-search .vapms-search__x {
	position: static !important;
	flex: none;
	width: 32px;
	height: 32px;
	margin: 0 !important;
	transform: none !important;
}

/* khung gợi ý: luôn là một thẻ nổi dưới ô tìm kiếm */
.vapms .vapms-top .vapms-sugg,
.vapms-top .vapms-sugg {
	position: absolute !important;
	left: 10px !important;
	right: 10px !important;
	top: 56px !important;
	z-index: 40;
	margin: 0 !important;
	padding: 4px 14px 14px !important;
	background: #fff !important;
	border: 1px solid var(--vapms-line) !important;
	border-radius: var(--vapms-r) !important;
	box-shadow: 0 14px 32px rgba(20, 32, 46, .16) !important;
}
.vapms-sugg[hidden] { display: none !important; }
