/* Search popup – Figma 02.7 "Header – Tìm kiếm (focus)". */
.ldp-search input[readonly] { cursor: text; }
.ldp-sp-overlay { position: fixed; inset: 0; z-index: 1; background: rgba(26, 28, 36, .45); }
.ldp-sp {
	position: absolute; z-index: 2; left: -12px; top: -16px; width: 534px; max-width: calc(100vw - 24px);
	display: flex; flex-direction: column; background: #fff; border-radius: var(--r-lg); padding: 16px;
	box-shadow: 0 12px 32px rgba(15, 33, 64, .18); cursor: default;
}
.ldp-sp[hidden] { display: none; }
.ldp-sp__box { flex: none; display: flex; align-items: center; gap: 10px; height: 48px; padding: 0 14px; border: 1.5px solid var(--blue-500); border-radius: 10px; background: #fff; color: var(--n-500); }
.ldp-sp__box:focus-within { box-shadow: 0 0 0 3px rgba(79, 147, 222, .18); }
.ldp-sp__input { -webkit-appearance: none; appearance: none; box-shadow: none; border-radius: 0; flex: 1; min-width: 0; height: 100%; border: 0; outline: 0; background: none; padding: 0; font: 400 15px/1.4 var(--font); color: var(--n-900); caret-color: var(--blue-600); }
.ldp-sp__input::placeholder { color: var(--n-400); }
.ldp-sp__input::-webkit-search-cancel-button { cursor: pointer; }
.ldp-sp__close { display: none; border: 0; background: none; padding: 4px; color: var(--n-700); cursor: pointer; }
.ldp-sp__body { overflow-y: auto; overscroll-behavior: contain; max-height: calc(100vh - 100px); margin: 0 -16px -16px; padding: 14px 16px 16px; scrollbar-width: thin; }
.ldp-sp__default { display: flex; flex-direction: column; gap: 14px; }
.ldp-sp__default[hidden], .ldp-sp__suggest[hidden] { display: none; }
.ldp-sp__h { display: block; font: 700 15px/1.3 var(--font); color: var(--n-900); }
.ldp-sp__h--lg { font-size: 16px; }
.ldp-sp__row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.ldp-sp__clear { border: 0; background: none; padding: 0; font: 600 13px/1.3 var(--font); color: var(--blue-600); cursor: pointer; }
.ldp-sp__clear:hover { color: var(--blue-700); text-decoration: underline; }

/* History */
.ldp-sp__hist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0; }
.ldp-sp__hist li { display: flex; align-items: center; gap: 10px; }
.ldp-sp__hist a { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; padding: 4px 0; font: 400 14px/1.4 var(--font); color: var(--n-700) !important; }
.ldp-sp__hist a .ldp-icon { color: var(--n-400); }
.ldp-sp__hist a span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ldp-sp__hist a:hover span { color: var(--blue-600); }
.ldp-sp__hist button { border: 0; background: none; padding: 4px; color: var(--n-500); cursor: pointer; border-radius: 4px; display: grid; place-items: center; }
.ldp-sp__hist button:hover { background: var(--n-100); color: var(--n-900); }

/* Offer banner */
.ldp-sp__banner { display: flex; align-items: center; gap: 12px; height: 150px; padding: 16px 18px; border-radius: var(--r-md); background: linear-gradient(90deg, #c41212, #ff7a00); color: #fff !important; transition: filter .15s var(--ease); }
.ldp-sp__banner:hover { filter: brightness(1.05); }
.ldp-sp__banner-tx { flex: 1; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.ldp-sp__banner-tx strong { font: italic 800 20px/1.2 var(--font); color: var(--yellow); }
.ldp-sp__banner-tx span { font: 600 13px/1.3 var(--font); }
.ldp-sp__banner-tx small { font-size: 11px; }
.ldp-sp__banner-off { flex: none; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 10px 14px; border-radius: 10px; background: #fff; }
.ldp-sp__banner-off small { font: 700 11px/1.2 var(--font); color: var(--red-600); }
.ldp-sp__banner-off b { font: 800 30px/1.1 var(--font); color: var(--red-500); }
.ldp-sp__banner-off i { font: normal 700 10px/1.2 var(--font); color: #fff; background: var(--red-500); border-radius: 999px; padding: 3px 10px; }

/* Offer rows */
.ldp-sp__offers { display: flex; flex-direction: column; gap: 8px; margin-top: -6px; }
.ldp-sp__offers a { display: flex; align-items: center; justify-content: space-between; gap: 12px; height: 34px; padding-right: 10px; border-radius: var(--r-sm); background: var(--blue-100); color: var(--n-900) !important; font: 500 13px/1.2 var(--font); transition: background-color .15s var(--ease); }
.ldp-sp__offers a:hover { background: #c2dcf6; }
.ldp-sp__offers b { display: flex; align-items: center; height: 34px; padding: 0 10px; border-radius: var(--r-sm); background: var(--blue-500); color: #fff; font-weight: 600; white-space: nowrap; }
.ldp-sp__offers span { text-align: right; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Popular keywords */
.ldp-sp__kw { display: flex; flex-wrap: wrap; gap: 8px; margin-top: -6px; }
.ldp-sp__kw a { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border: 1px solid var(--n-200); border-radius: 999px; font: 500 13px/1.3 var(--font); color: var(--n-700) !important; transition: border-color .15s var(--ease), color .15s var(--ease); }
.ldp-sp__kw a .ldp-icon { color: var(--red-500); }
.ldp-sp__kw a:hover { border-color: var(--blue-500); color: var(--blue-600) !important; }

/* Category tiles */
.ldp-sp__cats { display: flex; flex-wrap: wrap; gap: 12px 4px; margin-top: -6px; }
.ldp-sp__cats a { width: 80px; display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; font: 500 12px/1.3 var(--font); color: var(--n-900) !important; }
.ldp-sp__cats a span { width: 52px; height: 52px; display: grid; place-items: center; border-radius: var(--r-md); background: var(--blue-50); color: var(--blue-600); transition: background-color .15s var(--ease); }
.ldp-sp__cats a:hover span { background: var(--blue-100); }

/* Live suggestions */
.ldp-sp__suggest { display: flex; flex-direction: column; gap: 4px; }
.ldp-sp__suggest .ldp-sp__h { margin-bottom: 6px; }
.ldp-sp__item { display: flex; align-items: center; gap: 12px; padding: 8px; border-radius: var(--r-sm); }
.ldp-sp__item:hover { background: var(--n-100); }
.ldp-sp__item img { width: 48px; height: 48px; flex: none; object-fit: contain; border: 1px solid var(--n-200); border-radius: 6px; background: #fff; }
.ldp-sp__item > span { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ldp-sp__item .t { font: 400 14px/1.4 var(--font); color: var(--n-900); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ldp-sp__item .p { font: 700 14px/1.3 var(--font); color: var(--red-500); }
.ldp-sp__all { display: block; margin-top: 6px; padding: 10px; border-radius: var(--r-sm); background: var(--blue-50); text-align: center; font: 600 14px/1.3 var(--font); color: var(--blue-600) !important; }
.ldp-sp__empty { margin: 0; padding: 12px 0; color: var(--n-500); font-size: 14px; }

/* Mobile: full-screen sheet */
@media (max-width: 991px) {
	.ldp-sp { position: fixed; inset: 0; width: auto; max-width: none; border-radius: 0; padding: 12px; box-shadow: none; }
	.ldp-sp__box { height: 44px; }
	.ldp-sp__close { display: grid; place-items: center; }
	.ldp-sp__body { max-height: none; flex: 1; margin: 0 -12px -12px; padding: 14px 12px 24px; }
	.ldp-sp__banner { height: 120px; }
	.ldp-sp__banner-tx strong { font-size: 17px; }
	.ldp-sp__banner-off b { font-size: 24px; }
	.ldp-sp__cats { display: grid; grid-template-columns: repeat(3, 1fr); }
	.ldp-sp__cats a { width: auto; }
	html.ldp-sp-open, html.ldp-sp-open body { overflow: hidden; }
	html.ldp-sp-open .ldp-bottomnav { display: none; }
}
.ldp .ldp-sp input.ldp-sp__input, .ldp .ldp-sp input.ldp-sp__input:focus { border: 0 !important; outline: 0 !important; box-shadow: none !important; padding: 0 !important; background: transparent !important; border-radius: 0 !important; height: 100%; }
