/* ==========================================================================
   Vatlieuso — components.css
   Buttons · Badges · Tags · Modals · Toasts · Sidebar · Search Page
   ========================================================================== */

/* ── Buttons ──────────────────────────────────────────────────────────────── */

.vls-btn {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  padding: 10px 18px;
  border: 1px solid transparent;
  border-radius: var(--r-2);
  font-family: var(--font-body);
  font-size: var(--fs-14);
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  text-decoration: none;
  transition: background var(--dur-fast), border-color var(--dur-fast),
              color var(--dur-fast), box-shadow var(--dur-fast),
              transform 80ms ease;
  line-height: 1;
  -webkit-user-select: none;
  user-select: none;
}
.vls-btn:active { transform: scale(0.98); }
.vls-btn svg    { pointer-events: none; flex-shrink: 0; }

/* Variants */
.vls-btn--primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.vls-btn--primary:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
  box-shadow: 0 4px 14px rgba(31,51,85,.35);
}
.vls-btn--outline {
  background: transparent;
  border-color: var(--border-strong, var(--fg-2));
  color: var(--fg-1);
}
.vls-btn--outline:hover {
  border-color: var(--fg-1);
  background: var(--bg-sunken);
}
.vls-btn--ghost {
  background: transparent;
  border-color: transparent;
  color: var(--fg-2);
}
.vls-btn--ghost:hover {
  background: var(--bg-sunken);
  color: var(--fg-1);
}
.vls-btn--danger {
  background: var(--c-danger);
  border-color: var(--c-danger);
  color: #fff;
}
.vls-btn--success {
  background: var(--c-success);
  border-color: var(--c-success);
  color: #fff;
}
/* Nút gold — dùng cho CTA tư vấn trên các card nền tối (navy) */
.vls-btn--gold {
  background: #F7C948;
  border-color: #F7C948;
  color: #1A1612;
  font-weight: 700;
}
.vls-btn--gold:hover {
  background: #FFD75E;
  border-color: #FFD75E;
  color: #1A1612;
  box-shadow: 0 4px 14px rgba(247, 201, 72, .32);
}

/* Sizes */
.vls-btn--sm  { padding: 6px 12px; font-size: var(--fs-12); }
.vls-btn--lg  { padding: 14px 24px; font-size: var(--fs-15); }
.vls-btn--xl  { padding: 16px 32px; font-size: var(--fs-16); }
.vls-btn--icon { padding: 9px; aspect-ratio: 1; justify-content: center; }
.vls-btn--block { width: 100%; justify-content: center; }

/* Loading state */
.vls-btn[aria-busy="true"] { opacity: 0.65; pointer-events: none; }

/* ── Tags / Badges ────────────────────────────────────────────────────────── */

.vls-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: var(--r-1);
  font-family: var(--font-mono);
  font-size: var(--fs-11);
  font-weight: 600;
  letter-spacing: 0.04em;
  background: var(--bg-sunken);
  color: var(--fg-2);
  white-space: nowrap;
  border: 1px solid var(--border-1);
}
.vls-tag--mono     { font-family: var(--font-mono); }
.vls-tag--success  { background: rgba(34,197,94,.12); color: #16a34a; border-color: rgba(34,197,94,.3); }
.vls-tag--warn     { background: rgba(234,179,8,.12); color: #b45309; border-color: rgba(234,179,8,.3); }
.vls-tag--danger   { background: rgba(239,68,68,.12); color: #dc2626; border-color: rgba(239,68,68,.3); }
.vls-tag--neutral  { background: var(--bg-sunken); color: var(--fg-2); border-color: var(--border-1); }
.vls-tag--accent   { background: var(--accent-soft); color: var(--fg-1); border-color: var(--accent); }
.vls-tag--verified { background: rgba(59,130,246,.1); color: #1d4ed8; border-color: rgba(59,130,246,.3); }

/* Badge pill on button */
.vls-sidebar__badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  background: var(--accent);
  color: #26251F;
  font-size: 10px;
  font-weight: 700;
  border-radius: 9px;
  margin-left: auto;
}

/* Filter count badge on mobile toggle */
.filter-count-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  background: var(--accent);
  color: #26251F;
  font-size: 10px;
  font-weight: 700;
  border-radius: 9px;
  margin-left: var(--sp-1);
}

/* ── Sidebar Filter Panel ─────────────────────────────────────────────────── */

.vls-archive-sidebar {
  width: 260px;
  flex-shrink: 0;
  background: var(--bg-surface);
  border: 1px solid var(--border-1);
  border-radius: var(--r-3);
  font-family: var(--font-body);
  position: sticky;
  top: 80px;
  max-height: calc(100vh - 100px);
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--border-1) transparent;
}
.vls-archive-sidebar::-webkit-scrollbar { width: 4px; }
.vls-archive-sidebar::-webkit-scrollbar-thumb { background: var(--border-1); border-radius: 2px; }

.vls-sidebar__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--sp-3) var(--sp-4);
  border-bottom: 1px solid var(--border-1);
}
.vls-sidebar__heading {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  font-family: var(--font-body);
  font-size: var(--fs-13);
  font-weight: 700;
  color: var(--fg-1);
  margin: 0;
  letter-spacing: var(--ls-tight);
}
.vls-sidebar__clear {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: var(--font-mono);
  font-size: var(--fs-11);
  font-weight: 600;
  color: var(--fg-3);
  text-decoration: none;
  transition: color var(--dur-fast);
}
.vls-sidebar__clear:hover { color: var(--c-danger); }

.vls-sidebar__section {
  border-bottom: 1px solid var(--border-1);
}
.vls-sidebar__section:last-of-type { border-bottom: none; }

.vls-sidebar__section-toggle {
  display: flex;
  align-items: center;
  width: 100%;
  padding: var(--sp-3) var(--sp-4);
  background: none;
  border: none;
  font-family: var(--font-body);
  font-size: var(--fs-13);
  font-weight: 600;
  color: var(--fg-1);
  cursor: pointer;
  text-align: left;
  gap: var(--sp-2);
  transition: background var(--dur-fast);
}
.vls-sidebar__section-toggle:hover { background: var(--bg-sunken); }
.vls-sidebar__toggle-arrow { margin-left: auto; color: var(--fg-3); transition: transform var(--dur-fast); }
.vls-sidebar__section-toggle[aria-expanded="false"] .vls-sidebar__toggle-arrow { transform: rotate(-90deg); }

.vls-sidebar__opts-wrap { padding: var(--sp-1) var(--sp-4) var(--sp-3); }

.vls-sidebar__group { padding: var(--sp-2) var(--sp-4); border-bottom: 1px solid var(--border-1); }
.vls-sidebar__group-label {
  font-family: var(--font-mono);
  font-size: var(--fs-11);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fg-3);
  margin-bottom: var(--sp-2);
}
.vls-sidebar__opt {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  font-family: var(--font-body);
  font-size: var(--fs-13);
  color: var(--fg-1);
  cursor: pointer;
  padding: 4px 0;
  transition: color var(--dur-fast);
  width: 100%;
}
.vls-sidebar__opt:hover { color: var(--accent); }
.vls-sidebar__opt input[type="checkbox"] { accent-color: var(--accent); }
.vls-sidebar__count {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: var(--fs-11);
  color: var(--fg-3);
}

/* Price range */
.vls-sidebar__range { padding: var(--sp-2) var(--sp-4) var(--sp-3); }
.vls-sidebar__range-track {
  position: relative;
  height: 4px;
  background: var(--border-1);
  border-radius: 2px;
  margin: var(--sp-4) 0 var(--sp-2);
}
.vls-sidebar__range-fill {
  position: absolute;
  height: 100%;
  background: var(--accent);
  border-radius: 2px;
  top: 0;
}
.vls-sidebar__range-handle {
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--bg-surface);
  border: 2px solid var(--accent);
  cursor: grab;
  transition: box-shadow var(--dur-fast);
  box-shadow: 0 1px 4px rgba(0,0,0,.2);
}
.vls-sidebar__range-handle:focus  { outline: none; box-shadow: 0 0 0 3px var(--accent-soft); }
.vls-sidebar__range-handle:active { cursor: grabbing; }
.vls-sidebar__range-labels {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: var(--fs-11);
  color: var(--fg-2);
}

.vls-sidebar__apply {
  padding: var(--sp-4);
  border-top: 1px solid var(--border-1);
}

/* Mobile sidebar */
.vls-mobile-filter-btn {
  display: none;
  margin-bottom: var(--sp-3);
}

/* ── Search Page ──────────────────────────────────────────────────────────── */

.vls-search-page-head {
  padding: var(--sp-6) 0 var(--sp-5);
}
.vls-search-page-head__kicker {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  font-family: var(--font-mono);
  font-size: var(--fs-11);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--fg-3);
  margin-bottom: var(--sp-2);
}
.vls-search-page-head__title {
  font-family: var(--font-display);
  font-size: clamp(24px, 4vw, 36px);
  font-weight: 700;
  color: var(--fg-1);
  letter-spacing: var(--ls-tight);
  margin: 0 0 var(--sp-2);
}
.vls-search-page-head__count {
  font-family: var(--font-body);
  font-size: var(--fs-14);
  color: var(--fg-2);
  margin: 0 0 var(--sp-4);
}
.vls-search-page-head__count b { color: var(--fg-1); }

.vls-search-page-head__refine { margin-bottom: var(--sp-2); }
.vls-search-page-head__input-wrap {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  background: var(--bg-surface);
  border: 1px solid var(--border-1);
  border-radius: var(--r-2);
  padding: 8px var(--sp-3);
  max-width: 560px;
  transition: border-color var(--dur-fast);
}
.vls-search-page-head__input-wrap:focus-within { border-color: var(--accent); }
.vls-search-page-head__input-wrap svg { color: var(--fg-3); flex-shrink: 0; }
.vls-search-page-head__input {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  font-family: var(--font-body);
  font-size: var(--fs-14);
  color: var(--fg-1);
}
.vls-search-page-head__input::placeholder { color: var(--fg-3); }

/* Search empty state */
.vls-search-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: var(--sp-10) var(--sp-6);
  gap: var(--sp-4);
}
.vls-search-empty__icon svg { color: var(--fg-3); }
.vls-search-empty__title {
  font-family: var(--font-display);
  font-size: var(--fs-22);
  font-weight: 700;
  color: var(--fg-1);
  margin: 0;
}
.vls-search-empty__tip {
  font-family: var(--font-body);
  font-size: var(--fs-14);
  color: var(--fg-2);
  margin: 0;
  max-width: 420px;
}
.vls-search-empty__cats-label {
  font-family: var(--font-mono);
  font-size: var(--fs-12);
  color: var(--fg-3);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: var(--sp-2);
}
.vls-search-empty__cats-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--sp-2);
}
.vls-search-empty__cat-pill {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-1);
  padding: 6px 14px;
  background: var(--bg-surface);
  border: 1px solid var(--border-1);
  border-radius: var(--r-2);
  font-family: var(--font-body);
  font-size: var(--fs-13);
  color: var(--fg-1);
  text-decoration: none;
  transition: border-color var(--dur-fast), color var(--dur-fast), background var(--dur-fast);
}
.vls-search-empty__cat-pill:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-soft);
}
.vls-search-empty__actions { display: flex; gap: var(--sp-3); flex-wrap: wrap; justify-content: center; }
.vls-search-empty__actions--col { flex-direction: column; align-items: center; }

/* Empty state entrance animation */
@keyframes vls-fade-slide-up {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}
.vls-search-empty {
  animation: vls-fade-slide-up .35s cubic-bezier(.22,.68,0,1.2) both;
}

/* Icon wrap variants */
.vls-search-empty__icon-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 88px;
  height: 88px;
  border-radius: 50%;
  flex-shrink: 0;
}
.vls-search-empty__icon-wrap svg { display: block; }
.vls-search-empty__icon-wrap--red {
  background: #FEF2F2;
  color: #DC2626;
}
.vls-search-empty__icon-wrap--amber {
  background: #FFFBEB;
  color: #D97706;
}

/* Filter-specific empty state */
.vls-search-empty--filter .vls-search-empty__title { font-size: var(--fs-20, 1.25rem); }

/* Filter applied summary inside empty state */
.vls-search-empty__filter-applied {
  background: var(--bg-sunken, #F4F5F7);
  border: 1px solid var(--border-1);
  border-radius: var(--r-2);
  padding: var(--sp-3) var(--sp-4);
  text-align: center;
  max-width: 520px;
  width: 100%;
}
.vls-search-empty__filter-chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--sp-2);
  margin-top: var(--sp-2);
}

/* Section divider with label */
.vls-search-empty__divider-label {
  position: relative;
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  font-family: var(--font-mono);
  font-size: var(--fs-11);
  color: var(--fg-3);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin: var(--sp-2) 0;
  width: 100%;
  max-width: 420px;
}
.vls-search-empty__divider-label::before,
.vls-search-empty__divider-label::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border-1);
}

/* Search tips row */
.vls-search-tip-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--sp-2);
}
.vls-search-tip {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-1);
  padding: 5px 12px;
  background: var(--bg-surface);
  border: 1px solid var(--border-1);
  border-radius: var(--r-full, 9999px);
  font-family: var(--font-body);
  font-size: var(--fs-12);
  color: var(--fg-2);
}
.vls-search-tip svg { color: var(--fg-3); }

/* ── Active filter chips (toolbar + empty state) ─────────────────────────── */

.vls-active-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--sp-2);
  flex: 1;
  min-width: 0;
}
.vls-active-filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px 4px 8px;
  border-radius: var(--r-full, 9999px);
  font-family: var(--font-body);
  font-size: var(--fs-12);
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
  transition: opacity var(--dur-fast), transform var(--dur-fast);
  border: 1px solid transparent;
}
.vls-active-filter-chip:hover { opacity: .75; transform: translateY(-1px); }
.vls-active-filter-chip svg { flex-shrink: 0; }

/* Type colour coding */
.vls-active-filter-chip--cat    { background: #EFF6FF; color: #1D4ED8; border-color: #BFDBFE; }
.vls-active-filter-chip--brand  { background: #F0FDF4; color: #15803D; border-color: #BBF7D0; }
.vls-active-filter-chip--region { background: #FFF7ED; color: #C2410C; border-color: #FED7AA; }
.vls-active-filter-chip--price  { background: #FEFCE8; color: #A16207; border-color: #FDE68A; }
.vls-active-filter-chip--clear  {
  background: var(--bg-surface);
  color: var(--fg-3);
  border-color: var(--border-2);
}
.vls-active-filter-chip--clear:hover { color: var(--fg-1); opacity: 1; border-color: var(--fg-2); }

/* ── Search page head — filter note pill ─────────────────────────────────── */

.vls-search-page-head__filter-note {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-1);
  margin-left: var(--sp-2);
  font-size: var(--fs-12);
  color: var(--fg-3);
}
.vls-search-page-head__filter-note a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
}
.vls-search-page-head__filter-note a:hover { text-decoration: underline; }

/* ── Toolbar left column ─────────────────────────────────────────────────── */

.vls-archive-toolbar__left {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
}

/* ── Responsive ──────────────────────────────────────────────────────────── */

@media (max-width: 768px) {
  .vls-search-empty__filter-applied { padding: var(--sp-3); }
  .vls-active-filters { gap: var(--sp-1); }
  .vls-active-filter-chip { font-size: var(--fs-11); padding: 3px 8px 3px 6px; }
  .vls-search-tip-list { gap: var(--sp-1); }
}
@media (max-width: 480px) {
  .vls-search-empty__icon-wrap { width: 72px; height: 72px; }
  .vls-search-empty__icon-wrap svg { width: 36px; height: 36px; }
  .vls-search-empty__actions { flex-direction: column; align-items: stretch; }
  .vls-search-empty__actions .vls-btn { justify-content: center; }
  .vls-search-tip-list { flex-direction: column; align-items: center; }
}

/* ── Resale Card ──────────────────────────────────────────────────────────── */

.vls-resale-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-1);
  border-radius: var(--r-3);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: border-color var(--dur-fast), box-shadow var(--dur-fast), transform var(--dur-fast);
}
.vls-resale-card:hover {
  border-color: var(--fg-2);
  box-shadow: var(--shadow-2);
  transform: translateY(-2px);
}
.vls-resale-card__thb {
  display: block;
  position: relative;
  aspect-ratio: 4/3;
  overflow: hidden;
  background: var(--bg-sunken);
}
.vls-resale-card__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s var(--ease-out);
}
.vls-resale-card:hover .vls-resale-card__img { transform: scale(1.04); }
.vls-resale-card__placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--fg-3);
}
.vls-resale-card__discount {
  position: absolute;
  top: 10px;
  left: 10px;
  background: var(--c-danger);
  color: #fff;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  padding: 3px 7px;
  border-radius: var(--r-1);
  z-index: 2;
}
.vls-resale-card__cond {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
}
.vls-resale-card__body {
  padding: var(--sp-3) var(--sp-4);
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: var(--sp-1);
}
.vls-resale-card__cat {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--fg-3);
}
.vls-resale-card__title {
  font-family: var(--font-display);
  font-size: var(--fs-14);
  font-weight: 600;
  color: var(--fg-1);
  margin: 0;
  letter-spacing: var(--ls-tight);
  line-height: var(--lh-snug);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.vls-resale-card__title a { text-decoration: none; color: inherit; }
.vls-resale-card__title a:hover { color: var(--accent); }
.vls-resale-card__price-row {
  display: flex;
  align-items: baseline;
  gap: var(--sp-2);
  margin-top: var(--sp-1);
}
.vls-resale-card__price {
  font-family: var(--font-mono);
  font-size: var(--fs-16);
  font-weight: 700;
  color: var(--fg-1);
  font-feature-settings: "tnum" 1;
}
.vls-resale-card__price--na { color: var(--fg-3); font-size: var(--fs-14); }
.vls-resale-card__orig-price {
  font-family: var(--font-mono);
  font-size: var(--fs-12);
  color: var(--fg-3);
  text-decoration: line-through;
}
.vls-resale-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
  margin-top: var(--sp-1);
}
.vls-resale-card__meta-item {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: var(--font-mono);
  font-size: var(--fs-11);
  color: var(--fg-3);
}
.vls-resale-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--sp-2) var(--sp-4);
  border-top: 1px solid var(--border-1);
}
.vls-resale-card__seller {
  display: flex;
  align-items: center;
  gap: var(--sp-1);
  font-family: var(--font-mono);
  font-size: var(--fs-11);
  color: var(--fg-3);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 120px;
}
.vls-resale-card__actions { display: flex; gap: var(--sp-2); flex-shrink: 0; }
.vls-resale-card__btn-call { color: var(--c-success); }

/* ── Calculator Presets ───────────────────────────────────────────────────── */

.vls-calculator__presets {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
  margin-bottom: var(--sp-3);
}
.vls-calculator__preset-btn {
  padding: 5px 10px;
  background: var(--bg-sunken);
  border: 1px solid var(--border-1);
  border-radius: var(--r-1);
  font-family: var(--font-mono);
  font-size: var(--fs-12);
  color: var(--fg-2);
  cursor: pointer;
  transition: border-color var(--dur-fast), color var(--dur-fast), background var(--dur-fast);
}
.vls-calculator__preset-btn:hover { border-color: var(--accent); color: var(--accent); }
.vls-calculator__preset-btn.is-active {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--fg-1);
}

/* ── Breadcrumb ───────────────────────────────────────────────────────────── */

.vls-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--sp-1);
  font-family: var(--font-body);
  font-size: var(--fs-13);
  color: var(--fg-3);
  padding: var(--sp-3) 0;
}
.vls-breadcrumb a { color: var(--fg-2); text-decoration: none; transition: color var(--dur-fast); }
.vls-breadcrumb a:hover { color: var(--accent); }
.vls-breadcrumb__sep { color: var(--fg-3); }
.vls-breadcrumb b { color: var(--fg-1); font-weight: 600; }

/* ── Toast Notifications ──────────────────────────────────────────────────── */

.vls-toast-container {
  position: fixed;
  bottom: var(--sp-6);
  right: var(--sp-6);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
  pointer-events: none;
}
.vls-toast {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  background: var(--bg-surface);
  border: 1px solid var(--border-1);
  border-radius: var(--r-2);
  padding: var(--sp-3) var(--sp-4);
  box-shadow: var(--shadow-3);
  font-family: var(--font-body);
  font-size: var(--fs-13);
  color: var(--fg-1);
  pointer-events: all;
  animation: toastIn 0.3s var(--ease-out) both;
  max-width: 320px;
}
.vls-toast--success { border-left: 3px solid var(--c-success); }
.vls-toast--error   { border-left: 3px solid var(--c-danger);  }
.vls-toast--info    { border-left: 3px solid var(--accent);     }
@keyframes toastIn {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Responsive ───────────────────────────────────────────────────────────── */

@media (max-width: 1024px) {
  .vls-archive-sidebar {
    width: 240px;
  }
}
@media (max-width: 768px) {
  .vls-mobile-filter-btn { display: inline-flex; }
  .vls-archive-sidebar {
    position: fixed;
    top: 0;
    left: -100%;
    width: min(300px, 90vw);
    height: 100dvh;
    max-height: none;
    z-index: 400;
    border-radius: 0;
    border: none;
    box-shadow: var(--shadow-3);
    transition: left 0.3s var(--ease-out);
    overflow-y: auto;
  }
  .vls-archive-sidebar.is-open { left: 0; }
  body.sidebar-open::before {
    content: '';
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.5);
    z-index: 399;
  }
  .vls-search-empty { padding: var(--sp-8) var(--sp-4); }
}
@media (max-width: 480px) {
  .vls-resale-card__title { -webkit-line-clamp: 2; }
}

/* ── Banner đồng ý cookie ─────────────────────────────────────────────── */
.vls-cookie {
  position: fixed;
  left: 20px;
  bottom: 20px;
  z-index: 1200;
  width: min(420px, calc(100vw - 40px));
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 12px;
  padding: 18px 20px;
  background: var(--bg-surface, #fff);
  border: 1px solid var(--border, #E3E0D8);
  border-radius: 16px;
  box-shadow: 0 18px 50px rgba(16, 22, 34, .22);
  /* Hiện mặc định (không phụ thuộc JS); chỉ ẩn khi đã quyết định (attr hidden). */
  animation: vls-cookie-in .4s cubic-bezier(.2,.8,.2,1) both;
}
.vls-cookie[hidden] { display: none; }
@keyframes vls-cookie-in {
  from { transform: translateY(18px); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}
.vls-cookie__ic { font-size: 26px; line-height: 1; flex-shrink: 0; }
.vls-cookie__body { flex: 1; min-width: 200px; }
.vls-cookie__body strong { display: block; font-size: var(--fs-15, 15px); color: var(--fg-1); margin-bottom: 4px; }
.vls-cookie__body p { margin: 0; font-size: var(--fs-13, 13px); color: var(--fg-2); line-height: 1.55; }
.vls-cookie__body a { color: var(--accent, #1F5FBF); font-weight: 600; }
.vls-cookie__actions { display: flex; gap: 8px; width: 100%; }
.vls-cookie__actions .vls-btn { flex: 1; justify-content: center; }

.vls-cookie-reopen {
  position: fixed;
  left: 18px;
  bottom: 18px;
  z-index: 1190;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--border, #E3E0D8);
  background: var(--bg-surface, #fff);
  box-shadow: 0 6px 18px rgba(16, 22, 34, .18);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  transition: transform var(--dur-fast), box-shadow var(--dur-fast);
}
.vls-cookie-reopen[hidden] { display: none; }
.vls-cookie-reopen:hover { transform: translateY(-2px) scale(1.05); box-shadow: 0 10px 24px rgba(16, 22, 34, .25); }

@media (max-width: 480px) {
  .vls-cookie { left: 12px; right: 12px; bottom: 12px; width: auto; }
}

/* ── Trợ lý ảo AI (widget nổi) ───────────────────────────────────────── */
.vls-ai { position: fixed; right: 20px; bottom: 20px; z-index: 1150; }
.vls-ai__fab {
  position: relative;
  display: inline-flex; align-items: center; gap: 8px;
  padding: 13px 20px; border: 2px solid rgba(247,201,72,.45); border-radius: 999px; cursor: pointer;
  background: linear-gradient(135deg, #1F3355, #0D1832); color: #fff;
  font-family: var(--font-body); font-weight: 700; font-size: var(--fs-14);
  box-shadow: 0 10px 28px rgba(13,24,50,.35);
  transition: transform var(--dur-fast), box-shadow var(--dur-fast);
}
/* Vòng nhịp vàng thu hút click (đập vài nhịp rồi dừng để không gây phiền) */
.vls-ai__fab::before {
  content: ''; position: absolute; inset: -2px; border-radius: 999px; pointer-events: none;
  box-shadow: 0 0 0 0 rgba(247,201,72,.55);
  animation: vls-ai-pulse 2.4s ease-out 5;
}
.vls-ai__fab svg { color: #F7C948; flex-shrink: 0; }
.vls-ai__fab:hover { transform: translateY(-2px); box-shadow: 0 16px 38px rgba(13,24,50,.5); border-color: #F7C948; }
.vls-ai__fab.is-open { display: none; }
@keyframes vls-ai-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(247,201,72,.55); }
  70%  { box-shadow: 0 0 0 14px rgba(247,201,72,0); }
  100% { box-shadow: 0 0 0 0 rgba(247,201,72,0); }
}
@media (prefers-reduced-motion: reduce) { .vls-ai__fab::before { animation: none; } }

/* Bong bóng mời chào nhỏ (hiện 1 lần, có nút đóng) */
.vls-ai__teaser {
  position: absolute; right: 4px; bottom: 66px; width: 232px;
  background: var(--bg-surface,#fff); border: 1px solid var(--border,#E3E0D8); border-radius: 14px;
  padding: 12px 30px 12px 14px; box-shadow: 0 16px 38px rgba(16,22,34,.22);
  font-size: var(--fs-13); color: var(--fg-1); line-height: 1.5; cursor: pointer;
  animation: vls-ai-pop .3s ease;
}
.vls-ai__teaser::after {
  content: ''; position: absolute; right: 26px; bottom: -7px; width: 13px; height: 13px;
  background: var(--bg-surface,#fff); border-right: 1px solid var(--border,#E3E0D8); border-bottom: 1px solid var(--border,#E3E0D8);
  transform: rotate(45deg);
}
.vls-ai__teaser b { color: var(--accent,#1F3355); }
.vls-ai__teaser-x {
  position: absolute; top: 5px; right: 7px; border: none; background: none; cursor: pointer;
  font-size: 17px; line-height: 1; color: var(--fg-3); padding: 2px;
}
.vls-ai__teaser-x:hover { color: var(--fg-1); }
@keyframes vls-ai-pop { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

.vls-ai__panel {
  position: absolute; right: 0; bottom: 0;
  width: min(380px, calc(100vw - 40px)); height: min(560px, calc(100vh - 100px));
  display: flex; flex-direction: column;
  background: var(--bg-surface, #fff); border: 1px solid var(--border, #E3E0D8);
  border-radius: 16px; overflow: hidden; box-shadow: 0 24px 60px rgba(16,22,34,.32);
}
/* QUAN TRỌNG: cho thuộc tính hidden thắng display:flex ở trên -> đóng/mở được */
.vls-ai__panel[hidden] { display: none; }
/* Trạng thái thu gọn: chỉ còn thanh tiêu đề (kiểu "Chat Online") */
.vls-ai__panel.is-min { height: auto; }
.vls-ai__panel.is-min .vls-ai__body { display: none; }
.vls-ai__body { display: flex; flex-direction: column; flex: 1; min-height: 0; }
.vls-ai__head {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 13px 14px; background: linear-gradient(135deg, #1F3355, #0D1832); color: #fff; font-weight: 700; cursor: pointer;
}
.vls-ai__head > span { display: inline-flex; align-items: center; gap: 6px; }
.vls-ai__head svg { color: #F7C948; vertical-align: -3px; }
.vls-ai__head-actions { display: flex; align-items: center; gap: 2px; }
.vls-ai__icon-btn, .vls-ai__x { background: none; border: none; color: rgba(255,255,255,.82); cursor: pointer; display: inline-flex; padding: 4px; border-radius: 7px; }
.vls-ai__icon-btn:hover, .vls-ai__x:hover { color: #fff; background: rgba(255,255,255,.14); }
.vls-ai__max-ic { display: none; }
.vls-ai__panel.is-min .vls-ai__min-ic { display: none; }
.vls-ai__panel.is-min .vls-ai__max-ic { display: inline-flex; }
.vls-ai__msgs { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 10px; background: var(--bg-sunken, #F7F5EF); }
.vls-ai__bubble { max-width: 85%; padding: 10px 13px; border-radius: 14px; font-size: var(--fs-14); line-height: 1.55; word-break: break-word; }
.vls-ai__bubble--bot { align-self: flex-start; background: var(--bg-surface, #fff); border: 1px solid var(--border, #E9E5DC); color: var(--fg-1); }
.vls-ai__bubble--me  { align-self: flex-end; background: var(--accent, #1F3355); color: #fff; }
.vls-ai__bubble a { color: #F7C948; text-decoration: underline; }
.vls-ai__bubble--me a { color: #fff; }
.vls-ai__bubble.is-typing { display: inline-flex; gap: 4px; }
.vls-ai__bubble.is-typing span { width: 7px; height: 7px; border-radius: 50%; background: var(--fg-3); animation: vls-ai-blink 1.2s infinite both; }
.vls-ai__bubble.is-typing span:nth-child(2) { animation-delay: .2s; }
.vls-ai__bubble.is-typing span:nth-child(3) { animation-delay: .4s; }
@keyframes vls-ai-blink { 0%,80%,100% { opacity: .25; } 40% { opacity: 1; } }
.vls-ai__form { display: flex; gap: 8px; padding: 10px; border-top: 1px solid var(--border, #E9E5DC); align-items: flex-end; }
.vls-ai__form textarea { flex: 1; resize: none; max-height: 110px; padding: 10px 12px; border: 1px solid var(--border, #E3E0D8); border-radius: 10px; font-family: var(--font-body); font-size: var(--fs-14); }
.vls-ai__note { margin: 0; padding: 0 12px 10px; font-size: 11px; color: var(--fg-3); text-align: center; }

@media (max-width: 480px) {
  .vls-ai { right: 12px; bottom: 12px; }
  .vls-ai__fab span { display: none; }
  .vls-ai__fab { padding: 14px; }
}

/* ── Huy hiệu uy tín NCC ─────────────────────────────────────────────── */
.vls-trust { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 999px; font-size: var(--fs-12, 12px); font-weight: 600; line-height: 1.2; }
.vls-trust b { font-weight: 800; }
.vls-trust i { font-style: normal; opacity: .7; font-size: 11px; }
.vls-trust svg { flex-shrink: 0; }
.vls-trust--gold  { background: linear-gradient(135deg,#FFD75E,#F5A623); color: #3A2E12; }
.vls-trust--blue  { background: rgba(31,95,191,.12); color: #1F5FBF; }
.vls-trust--amber { background: rgba(245,166,35,.16); color: #B45309; }
.vls-trust--muted { background: var(--bg-sunken, #EFEDE6); color: var(--fg-3); }
.vls-trust--compact { font-size: 11px; padding: 2px 8px; }

/* ==========================================================================
   Lightbox dùng chung (ảnh phóng to khi click) — single sản phẩm & xả kho
   ========================================================================== */
.vls-lightbox { position: fixed; inset: 0; z-index: 9999; display: flex; align-items: center; justify-content: center; padding: var(--sp-6); background: rgba(20,16,12,.92); opacity: 0; visibility: hidden; transition: opacity .25s ease, visibility .25s ease; cursor: zoom-out; }
.vls-lightbox.is-open { opacity: 1; visibility: visible; }
.vls-lightbox__img { max-width: 100%; max-height: 100%; border-radius: var(--r-2, 8px); box-shadow: 0 18px 60px rgba(0,0,0,.6); transform: scale(.95); transition: transform .25s ease; cursor: default; }
.vls-lightbox.is-open .vls-lightbox__img { transform: scale(1); }
.vls-lightbox__close { position: absolute; top: var(--sp-4); right: var(--sp-4); width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center; border: 0; border-radius: 999px; background: rgba(255,255,255,.12); color: #fff; cursor: pointer; transition: background .2s ease; }
.vls-lightbox__close:hover { background: rgba(255,255,255,.25); }

/* AI tool-use: action chips */
.vls-ai__chips{display:flex;flex-wrap:wrap;gap:7px;margin:6px 0 10px;padding-left:6px}
.vls-ai__chip{display:inline-flex;align-items:center;font-size:.82rem;font-weight:600;padding:6px 12px;border-radius:20px;background:#eef4ff;color:#1e40af;text-decoration:none;border:1px solid #c7d7fe}
.vls-ai__chip:hover{background:#dbe7ff}
