/* ============================================================================
   LuxScout Member — premium dark account dashboard.
   Shares the design language of the Operations Command Center (admin) so the
   ported UI kit in /app/auth.js renders consistently. Self-contained.
   ========================================================================== */
:root {
  --bg: #0b0c0f; --bg-2: #101218; --panel: #15171e; --panel-2: #1b1e27;
  --panel-3: #232734; --border: #2a2f3b; --border-2: #353b49;
  --text: #f5f1e8; --text-2: #c7cad2; --muted: #888e9c; --faint: #5c6270;
  --gold: #cca869; --gold-soft: #e4cd9b; --gold-dim: rgba(204,168,105,.14);
  --green: #57c08a; --green-bg: rgba(87,192,138,.13);
  --amber: #e0ad4e; --amber-bg: rgba(224,173,78,.13);
  --red: #e2706e; --red-bg: rgba(226,112,110,.13);
  --info: #6fa8d6;
  --r: 14px; --r-sm: 9px; --r-pill: 999px;
  --mono: ui-monospace, SFMono-Regular, Menlo, monospace;
  --shadow: 0 6px 24px rgba(0,0,0,.35);
  --sans: Inter, system-ui, -apple-system, sans-serif;
  --serif: 'Playfair Display', Georgia, serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: radial-gradient(1200px 600px at 80% -10%, rgba(204,168,105,.06), transparent 60%), var(--bg);
  color: var(--text); font-family: var(--sans); font-size: 14px; line-height: 1.55; -webkit-font-smoothing: antialiased;
}
a { color: var(--gold); text-decoration: none; }
a:hover { text-decoration: underline; }
.mono { font-family: var(--mono); font-size: 12px; color: var(--muted); }
.muted { color: var(--muted); }

/* --- Top bar --------------------------------------------------------------- */
.topbar {
  position: sticky; top: 0; z-index: 40; display: flex; align-items: center; gap: 22px;
  padding: 13px 26px; background: rgba(16,18,24,.86); backdrop-filter: blur(12px); border-bottom: 1px solid var(--border);
}
.brand { font-family: var(--serif); font-weight: 700; font-size: 20px; letter-spacing: .2px; color: var(--text); }
.brand .dot { color: var(--gold); }
.brand small { display: block; font-family: var(--sans); font-weight: 600; font-size: 10px;
  letter-spacing: .18em; text-transform: uppercase; color: var(--muted); margin-top: -2px; }
.topnav { display: flex; gap: 2px; flex-wrap: wrap; }
.topnav a, .topnav button.navlink {
  display: inline-flex; align-items: center; gap: 7px; color: var(--text-2); padding: 8px 14px; background: transparent;
  border-radius: var(--r-pill); font-weight: 600; font-size: 13px; border: 1px solid transparent; cursor: pointer;
}
.topnav a:hover, .topnav button.navlink:hover { background: var(--panel-2); color: var(--text); text-decoration: none; }
.topnav a.active, .topnav button.navlink.active { background: var(--gold-dim); color: var(--gold-soft); border-color: rgba(204,168,105,.35); }
.topnav svg { width: 16px; height: 16px; }
.topbar .spacer { flex: 1; }
/* Back control — prepended to the topbar on secondary member pages. */
.backbtn {
  display: inline-flex; align-items: center; gap: 6px; cursor: pointer;
  color: var(--text-2); background: transparent; border: 1px solid var(--border);
  padding: 7px 12px; border-radius: var(--r-pill); font-weight: 600; font-size: 13px;
  font-family: inherit; line-height: 1;
}
.backbtn:hover { background: var(--panel-2); color: var(--text); }
.backbtn svg { width: 16px; height: 16px; }
@media (max-width: 600px) { .backbtn span { display: none; } .backbtn { padding: 7px; } }
.who { display: flex; align-items: center; gap: 12px; }
.who-meta { display: flex; flex-direction: column; align-items: flex-end; line-height: 1.2; }
.who-meta b { font-size: 12px; color: var(--text); } .who-meta span { font-size: 11px; color: var(--muted); }
.avatar { width: 34px; height: 34px; border-radius: 50%; flex: none; display: flex; align-items: center; justify-content: center;
  font-family: var(--serif); font-size: 15px; color: #221805; background: linear-gradient(180deg, var(--gold-soft), var(--gold)); }

/* --- Layout --------------------------------------------------------------- */
.wrap { max-width: 1140px; margin: 0 auto; padding: 26px 26px 90px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 6px; flex-wrap: wrap; }
h1 { font-family: var(--serif); font-weight: 700; font-size: 30px; margin: 2px 0; letter-spacing: .2px; }
h4 { margin: 0; }
.sub { color: var(--muted); margin: 0 0 18px; font-size: 14px; }
.section-label { display: flex; align-items: center; gap: 9px; margin: 30px 0 12px; }
.section-label svg { width: 17px; height: 17px; color: var(--gold); }
.section-label h2 { font-size: 12px; text-transform: uppercase; letter-spacing: .14em; color: var(--text-2); margin: 0; font-weight: 700; }
.section-label .rule { flex: 1; height: 1px; background: linear-gradient(90deg, var(--border), transparent); }

.panel { background: var(--panel); border: 1px solid var(--border); border-radius: var(--r); padding: 18px; margin-top: 14px; box-shadow: var(--shadow); }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.panel-head h3 { font-family: var(--serif); font-weight: 700; font-size: 18px; margin: 0; }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }
@media (max-width: 900px) { .split { grid-template-columns: 1fr; } }

/* --- Tabs ----------------------------------------------------------------- */
.tabs { display: flex; gap: 4px; flex-wrap: wrap; margin: 18px 0 4px; border-bottom: 1px solid var(--border); padding-bottom: 0; }
.tab { display: inline-flex; align-items: center; gap: 7px; padding: 10px 15px; background: transparent; border: none;
  border-bottom: 2px solid transparent; color: var(--text-2); font-weight: 600; font-size: 13.5px; cursor: pointer; }
.tab svg { width: 15px; height: 15px; }
.tab:hover { color: var(--text); }
.tab.active { color: var(--gold-soft); border-bottom-color: var(--gold); }
.tab .pillcount { font-size: 11px; background: var(--panel-3); color: var(--text-2); border-radius: var(--r-pill); padding: 1px 8px; }

/* --- KPI / plan ----------------------------------------------------------- */
.kpi-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-top: 14px; }
@media (max-width: 1000px) { .kpi-row { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 540px) { .kpi-row { grid-template-columns: 1fr; } }
.kpi { display: flex; flex-direction: column; min-height: 104px; padding: 16px 18px; border-radius: 16px;
  background: linear-gradient(180deg, var(--panel), var(--bg-2)); border: 1px solid var(--border); }
.kpi-l { color: var(--muted); font-size: 11.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .09em; display: flex; align-items: center; gap: 7px; }
.kpi-l svg { width: 14px; height: 14px; color: var(--gold); }
.kpi-n { margin-top: auto; font-size: 34px; line-height: 1; font-weight: 700; letter-spacing: -1px; font-variant-numeric: tabular-nums; }
.kpi-sub { margin-top: 6px; font-size: 11.5px; color: var(--faint); min-height: 14px; }

.plan-card { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap;
  margin-top: 14px; padding: 24px 26px; border-radius: 20px; border: 1px solid rgba(204,168,105,.28);
  background: radial-gradient(800px 300px at 0% 0%, rgba(204,168,105,.10), transparent 70%), linear-gradient(180deg, var(--panel), var(--bg-2)); }
.plan-card .plan-l { color: var(--gold-soft); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .14em; }
.plan-card .plan-n { font-family: var(--serif); font-size: 38px; line-height: 1.1; margin: 8px 0 4px; color: var(--text); }
.plan-card .plan-meta { color: var(--text-2); font-size: 13px; }
.plan-actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* --- FOR YOU: compact horizontal recommendation rail ---------------------- */
.fy-rail { display: flex; gap: 14px; overflow-x: auto; padding: 4px 2px 8px; margin-top: 4px; }
.fy-card { flex: 0 0 148px; display: flex; flex-direction: column; gap: 6px; padding: 10px; border-radius: 14px;
  border: 1px solid var(--border); background: linear-gradient(180deg, var(--panel), var(--bg-2)); color: inherit; }
.fy-card:hover { border-color: rgba(204,168,105,.35); }
.fy-card img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 10px; background: var(--panel-3); }
.fy-card .fy-ph { width: 100%; aspect-ratio: 4 / 3; border-radius: 10px; background: var(--panel-3);
  display: flex; align-items: center; justify-content: center; color: var(--faint); font-family: var(--serif); font-size: 20px; }
.fy-card .fy-brand { font-size: 10.5px; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); }
.fy-card .fy-name { font-size: 13px; font-weight: 600; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.fy-card .fy-price { font-size: 14px; font-weight: 700; color: var(--text); }

/* --- Watchlist Intelligence: compact stacked signal lines ------------------ */
.wl-intel { display: flex; flex-direction: column; gap: 2px; margin-top: 6px; }
.wl-price { font-size: 16px; font-weight: 700; color: var(--text); font-variant-numeric: tabular-nums; }
.wl-line { font-size: 12.5px; color: var(--text-2); display: flex; align-items: center; gap: 5px; }
.wl-line.ok { color: #4fae76; }
.wl-line.no { color: #d17a6a; }
.wl-line.muted { color: var(--faint); }
.wl-flag { width: 16px; height: 11px; object-fit: cover; border-radius: 2px; flex: none; }

/* --- list rows (wishlist / alerts / saved / collections / history) -------- */
.list { display: flex; flex-direction: column; }
.list-row { display: flex; align-items: center; gap: 14px; padding: 13px 6px; border-bottom: 1px solid var(--border); }
.list-row:last-child { border-bottom: none; }

/* Country flags in the member app (search markets, price-compare table, alerts).
   Real flag images so they render on every OS + viewport; self-remove on load
   failure, leaving the country name. Sized in em to scale with the text. */
.lx-flag {
  display: inline-block;
  width: 1.3em; height: 0.92em;
  object-fit: cover;
  vertical-align: -0.14em;
  margin-right: 0.4em;
  border-radius: 2px;
  box-shadow: 0 0 0 0.5px rgba(0, 0, 0, 0.28);
  background: rgba(255, 255, 255, 0.06);
}

/* Search-by-image (upload-first) — PREMIUM drawer UI: dropzone, preview, status. */
.sx-dropzone {
  display: flex; flex-direction: column; align-items: center; gap: 13px;
  text-align: center; padding: 46px 24px; cursor: pointer;
  border: 1.5px dashed var(--border); border-radius: 16px;
  color: var(--muted);
  background: radial-gradient(120% 90% at 50% 0%, rgba(201, 168, 106, 0.05), transparent 70%);
  transition: border-color .3s ease, background .3s ease, transform .3s ease, box-shadow .3s ease;
}
.sx-dropzone:hover, .sx-dropzone:focus-visible, .sx-dropzone.drag {
  border-color: var(--gold, #c9a86a); outline: none; transform: translateY(-2px);
  background: radial-gradient(120% 90% at 50% 0%, rgba(201, 168, 106, 0.11), transparent 72%);
  box-shadow: 0 18px 44px -28px rgba(201, 168, 106, 0.5);
}
/* Gold medallion around the camera icon */
.sx-dropzone > svg:first-child {
  width: 26px; height: 26px; color: var(--gold, #c9a86a);
  box-sizing: content-box; padding: 15px; border-radius: 50%;
  background: rgba(201, 168, 106, 0.10); border: 1px solid rgba(201, 168, 106, 0.24);
  transition: transform .35s ease, box-shadow .35s ease;
}
.sx-dropzone:hover > svg:first-child { transform: scale(1.05); box-shadow: 0 0 0 6px rgba(201, 168, 106, 0.06); }
.sx-dropzone b { color: var(--text, inherit); font-size: 17px; font-weight: 600; letter-spacing: .005em; }
.sx-dropzone .muted { font-size: 12.5px; max-width: 300px; line-height: 1.5; }
.sx-img-wrap { border-radius: 14px; overflow: hidden; background: rgba(127, 127, 127, .12); border: 1px solid var(--border); box-shadow: 0 20px 50px -34px rgba(0, 0, 0, .6); }
.sx-img-wrap.sm { max-width: 168px; box-shadow: none; }
.sx-img-preview { display: block; width: 100%; max-height: 340px; object-fit: contain; }
.sx-img-preview.sm { max-height: 124px; }
.sx-img-status { display: flex; align-items: center; gap: 11px; margin-top: 16px; color: var(--muted); font-size: 13.5px; letter-spacing: .005em; }
.sx-img-detected {
  display: inline-flex; align-items: center; gap: 7px; margin: 14px 0; padding: 6px 13px;
  color: var(--gold, #c9a86a); font-size: 12.5px; font-weight: 600; letter-spacing: .02em;
  background: rgba(201, 168, 106, 0.09); border: 1px solid rgba(201, 168, 106, 0.2); border-radius: 999px;
}
.sx-img-detected svg { width: 14px; height: 14px; }

/* Boutique cards (Find Boutique Near You). */
.sx-boutique-card { border: 1px solid var(--border, #e7e2d8); border-radius: 12px; padding: 12px 14px; }
.sx-boutique-card + .sx-boutique-card { margin-top: 0; }
.sx-save-boutique { padding: 0; }

.list-row .t { flex: 1; min-width: 0; }
.list-row .t b { font-size: 14px; font-weight: 600; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.list-row .t span { display: block; color: var(--muted); font-size: 12.5px; }
.list-row .row-actions { display: flex; gap: 8px; align-items: center; }
.thumb { width: 46px; height: 46px; border-radius: var(--r-sm); object-fit: cover; background: var(--panel-3); border: 1px solid var(--border); flex: none; }
.thumb.ph { display: flex; align-items: center; justify-content: center; color: var(--faint); font-family: var(--serif); font-size: 16px; }
.iconbtn { background: transparent; border: 1px solid var(--border-2); border-radius: var(--r-sm); width: 34px; height: 34px;
  padding: 0; color: var(--muted); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.iconbtn:hover { color: var(--text); background: var(--panel-2); }
.iconbtn.danger:hover { color: var(--red); border-color: rgba(226,112,110,.5); background: var(--red-bg); }
.iconbtn svg { width: 16px; height: 16px; }

/* --- Definition rows (account) ------------------------------------------- */
.def-list { display: flex; flex-direction: column; }
.def-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--border); font-size: 13.5px; }
.def-row:last-child { border-bottom: none; }
.def-row .dt { color: var(--muted); } .def-row .dd { font-weight: 600; color: var(--text); display: inline-flex; align-items: center; gap: 6px; }

/* --- Controls ------------------------------------------------------------- */
.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
input, select, textarea, button { font-family: inherit; font-size: 13.5px; color: var(--text); background: var(--panel-2);
  border: 1px solid var(--border-2); border-radius: var(--r-sm); padding: 9px 12px; outline: none; }
input:focus, select:focus, textarea:focus { border-color: var(--gold); box-shadow: 0 0 0 3px var(--gold-dim); }
input::placeholder { color: var(--faint); }
input:disabled, select:disabled { opacity: .5; cursor: not-allowed; }
label.chk { display: inline-flex; align-items: center; gap: 7px; color: var(--text-2); font-size: 13px; cursor: pointer; }
button { cursor: pointer; font-weight: 600; transition: filter .12s, background .12s; }
button.primary { background: linear-gradient(180deg, var(--gold-soft), var(--gold)); color: #221805; border-color: var(--gold); }
button.primary:hover { filter: brightness(1.06); }
button.ghost { background: transparent; color: var(--text-2); }
button.ghost:hover { background: var(--panel-3); color: var(--text); }
button.danger { background: transparent; color: var(--red); border-color: rgba(226,112,110,.5); }
button.danger:hover { background: var(--red-bg); }
button.sm { padding: 6px 10px; font-size: 12.5px; }
button:disabled { opacity: .45; cursor: not-allowed; filter: none; }
.field { display: flex; flex-direction: column; gap: 5px; margin-bottom: 13px; }
.field label { font-size: 12px; color: var(--text-2); font-weight: 600; }
.field input, .field select, .field textarea { width: 100%; }
.field-hint { font-size: 11.5px; color: var(--faint); }
.row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.actions { display: flex; gap: 9px; flex-wrap: wrap; margin-top: 6px; }

/* --- Tables --------------------------------------------------------------- */
.tbl-wrap { overflow-x: auto; border-radius: var(--r-sm); }
table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
thead th { background: var(--panel-2); color: var(--muted); font-weight: 600; text-transform: uppercase; font-size: 10.5px;
  letter-spacing: .07em; text-align: left; padding: 11px 13px; border-bottom: 1px solid var(--border); }
tbody td { padding: 12px 13px; border-bottom: 1px solid var(--border); vertical-align: middle; }
tbody tr.click { cursor: pointer; } tbody tr.click:hover { background: var(--panel-2); }
.cell-main { font-weight: 600; color: var(--text); } .cell-sub { color: var(--muted); font-size: 12px; }

/* --- Badges --------------------------------------------------------------- */
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: var(--r-pill);
  font-size: 11.5px; font-weight: 700; border: 1px solid; letter-spacing: .02em; white-space: nowrap; }
.badge.ok { color: var(--green); border-color: rgba(87,192,138,.4); background: var(--green-bg); }
.badge.warn { color: var(--amber); border-color: rgba(224,173,78,.4); background: var(--amber-bg); }
.badge.bad { color: var(--red); border-color: rgba(226,112,110,.4); background: var(--red-bg); }
.badge.gold { color: var(--gold-soft); border-color: rgba(204,168,105,.4); background: var(--gold-dim); }
.badge.info { color: var(--info); border-color: rgba(111,168,214,.4); background: rgba(111,168,214,.12); }
.badge.neutral { color: var(--muted); border-color: var(--border-2); background: var(--panel-2); }

/* --- Drawer --------------------------------------------------------------- */
.scrim { position: fixed; inset: 0; background: rgba(0,0,0,.55); z-index: 60; opacity: 0; pointer-events: none; transition: opacity .18s; }
.scrim.show { opacity: 1; pointer-events: auto; }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: 440px; max-width: 92vw; z-index: 61; background: var(--bg-2);
  border-left: 1px solid var(--border-2); box-shadow: -16px 0 40px rgba(0,0,0,.5); transform: translateX(100%);
  pointer-events: none; transition: transform .22s cubic-bezier(.4,0,.2,1); display: flex; flex-direction: column; }
.drawer.show { transform: translateX(0); pointer-events: auto; }
.drawer-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 20px 22px; border-bottom: 1px solid var(--border); }
.drawer-head h3 { font-family: var(--serif); font-size: 21px; margin: 0; }
.drawer-head .x { background: transparent; border: 1px solid var(--border-2); border-radius: 50%; width: 34px; height: 34px; padding: 0; color: var(--muted); display: flex; align-items: center; justify-content: center; }
.drawer-head .x:hover { color: var(--text); background: var(--panel-2); }
.drawer-body { padding: 18px 22px; overflow-y: auto; flex: 1; }
.kv { display: grid; grid-template-columns: 124px 1fr; gap: 8px 14px; margin-bottom: 6px; }
.kv dt { color: var(--muted); font-size: 12.5px; } .kv dd { margin: 0; font-size: 13.5px; word-break: break-word; }
.drawer h4 { font-size: 11px; text-transform: uppercase; letter-spacing: .12em; color: var(--gold); margin: 22px 0 10px; }

/* --- Accordion / danger zone --------------------------------------------- */
.accordion { margin-top: 26px; background: var(--panel); border: 1px solid var(--border); border-radius: var(--r); overflow: hidden; box-shadow: var(--shadow); }
.accordion.danger-zone { border-color: rgba(226,112,110,.32); }
.accordion summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 11px; padding: 16px 18px; font-weight: 600; font-size: 14px; color: var(--text); }
.accordion summary::-webkit-details-marker { display: none; }
.accordion summary:hover { background: var(--panel-2); }
.acc-ic { display: flex; color: var(--red); } .acc-ic svg { width: 18px; height: 18px; }
.acc-caret { margin-left: auto; color: var(--faint); display: flex; transition: transform .2s ease; } .acc-caret svg { width: 16px; height: 16px; }
.accordion[open] .acc-caret { transform: rotate(90deg); }
.acc-body { padding: 14px 18px 18px; border-top: 1px solid var(--border); }
.dz-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.dz-row .t { flex: 1; min-width: 220px; } .dz-row .t b { font-size: 14px; } .dz-row .t span { display: block; color: var(--muted); font-size: 12.5px; margin-top: 2px; }
.dz-confirm { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }

/* --- Auth pages / states -------------------------------------------------- */
.center { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px; }
.auth-card { width: 380px; max-width: 100%; background: linear-gradient(180deg, var(--panel), var(--bg-2)); border: 1px solid var(--border-2);
  border-radius: 18px; padding: 32px; box-shadow: var(--shadow); }
.auth-card .brand { display: block; text-align: center; font-size: 24px; margin-bottom: 4px; }
.auth-card h1 { text-align: center; font-size: 23px; margin: 14px 0 4px; }
.auth-card .sub { text-align: center; margin-bottom: 18px; }
.auth-card .field { margin-bottom: 12px; }
.auth-card button.primary { width: 100%; margin-top: 6px; padding: 11px; }
.auth-links { display: flex; justify-content: space-between; gap: 12px; margin-top: 16px; font-size: 13px; flex-wrap: wrap; }
.auth-note { text-align: center; font-size: 13px; color: var(--text-2); margin-top: 16px; }
.err { color: var(--red); font-size: 13px; margin-top: 10px; min-height: 18px; }
.ok-msg { color: var(--green); font-size: 13px; margin-top: 10px; min-height: 18px; }
.notice { display: flex; align-items: flex-start; gap: 10px; padding: 13px 15px; border-radius: var(--r-sm); font-size: 13px; margin-bottom: 16px; }
.notice svg { width: 17px; height: 17px; flex: none; margin-top: 1px; }
.notice.warn { background: var(--amber-bg); border: 1px solid rgba(224,173,78,.35); color: var(--amber); }
.notice.ok { background: var(--green-bg); border: 1px solid rgba(87,192,138,.35); color: var(--green); }
.notice.info { background: var(--gold-dim); border: 1px solid rgba(204,168,105,.32); color: var(--gold-soft); }

.empty { text-align: center; padding: 46px 20px; color: var(--muted); }
.empty svg { width: 40px; height: 40px; color: var(--faint); margin-bottom: 10px; }
.empty b { display: block; color: var(--text-2); font-size: 15px; margin-bottom: 4px; }
.spinner { width: 26px; height: 26px; border: 3px solid var(--border-2); border-top-color: var(--gold); border-radius: 50%; animation: spin .8s linear infinite; margin: 40px auto; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Instant Search: popular-house quick picks, skeleton loading, live-refresh tag */
.chips-label { font-size: 11px; text-transform: uppercase; letter-spacing: .12em; margin: 14px 0 8px; }
.brand-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { padding: 7px 13px; border-radius: var(--r-pill); background: var(--panel-3); border: 1px solid var(--border);
  color: var(--text-2); font-size: 12.5px; cursor: pointer; transition: border-color .15s, color .15s, background .15s; }
.chip:hover { border-color: var(--gold); color: var(--gold-soft); background: var(--gold-dim); }
.skel { position: relative; overflow: hidden; background: var(--panel-3); border-radius: var(--r-sm); }
.skel::after { content: ''; position: absolute; inset: 0; transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.06), transparent); animation: shimmer 1.3s infinite; }
.skel-line { height: 11px; margin: 4px 0; }
.skel-line.lg { width: 55%; }
.skel-line.sm { width: 32%; }
.thumb.skel { width: 46px; height: 46px; }
@keyframes shimmer { 100% { transform: translateX(100%); } }
.updating { color: var(--gold-soft); font-size: 11px; margin-left: 8px; animation: pulse 1.2s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .45; } }
.toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); z-index: 80;
  background: linear-gradient(180deg, var(--gold-soft), var(--gold)); color: #221805; font-weight: 700;
  padding: 12px 20px; border-radius: var(--r-pill); box-shadow: var(--shadow); max-width: 90vw; text-align: center; }
.toast.bad { background: var(--red); color: #2a0d0d; }

@media (max-width: 560px) {
  .kv { grid-template-columns: 1fr; gap: 2px 0; } .kv dt { margin-top: 8px; }
  .row-2 { grid-template-columns: 1fr; }
  .who-meta { display: none; }
  .wrap { padding: 20px 16px 80px; }
}

/* ==========================================================================
   Premium luxury Search — search box, suggestions, chip carousels, filters,
   rich result cards, recovery states.
   ========================================================================== */
.sx-panel { padding: 20px 20px 18px; }
.sx-toolbar { align-items: stretch; }
.sx-searchbox { position: relative; flex: 1; min-width: 240px; display: flex; }
.sx-searchbox > input[type=search] { width: 100%; padding: 11px 14px; font-size: 14.5px; }
.sx-filter-btn { display: inline-flex; align-items: center; gap: 7px; }
.sx-filter-btn svg { width: 15px; height: 15px; }
.sx-filter-btn.active { background: var(--gold-dim); color: var(--gold-soft); border-color: rgba(204,168,105,.4); }
.primary { display: inline-flex; align-items: center; gap: 7px; }
.primary svg { width: 15px; height: 15px; }

/* Instant suggestions */
.suggest { position: absolute; top: calc(100% + 6px); left: 0; right: 0; z-index: 50;
  background: var(--panel-2); border: 1px solid var(--border-2); border-radius: var(--r-sm);
  box-shadow: var(--shadow); overflow: hidden; max-height: 340px; overflow-y: auto; }
.suggest[hidden] { display: none; }
.suggest-item { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left;
  background: transparent; border: none; border-radius: 0; padding: 10px 14px; color: var(--text-2);
  font-size: 13.5px; border-bottom: 1px solid var(--border); }
.suggest-item:last-child { border-bottom: none; }
.suggest-item:hover, .suggest-item:focus { background: var(--panel-3); color: var(--text); }
.suggest-item svg { width: 14px; height: 14px; color: var(--faint); flex: none; }

/* Advanced filters */
.sx-filters { margin: 14px 0 4px; padding: 14px; background: var(--bg-2); border: 1px solid var(--border); border-radius: var(--r-sm); }
.sx-filters[hidden] { display: none; }
.sx-filter-grid { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.sx-f { display: flex; align-items: center; gap: 8px; }
.sx-f select, .sx-f input[type=number] { padding: 8px 10px; font-size: 13px; }
.sx-price input { width: 84px; }
.sx-checks { gap: 14px; }
.sx-check { display: inline-flex; align-items: center; gap: 6px; color: var(--text-2); font-size: 13px; cursor: pointer; }
.sx-check input { width: auto; padding: 0; }

/* Chip carousel */
.carousel { position: relative; display: flex; align-items: center; }
.chip-scroll { display: flex; gap: 8px; overflow-x: auto; scroll-behavior: smooth; padding: 2px 2px 6px;
  scrollbar-width: none; -ms-overflow-style: none; cursor: grab; }
.chip-scroll::-webkit-scrollbar { display: none; }
.chip-scroll:active { cursor: grabbing; }
.chip { flex: none; white-space: nowrap; }
.chip.sm { padding: 5px 11px; font-size: 12px; }
.chip.active { border-color: var(--gold); color: var(--gold-soft); background: var(--gold-dim); font-weight: 600; }
.chip-lead { color: var(--gold-soft); border-color: rgba(204,168,105,.35); font-weight: 600; }
.car-arrow { position: absolute; top: 50%; transform: translateY(-50%); z-index: 6; width: 30px; height: 30px; padding: 0;
  display: inline-flex; align-items: center; justify-content: center; border-radius: 50%;
  background: var(--panel-2); border: 1px solid var(--border-2); color: var(--text-2); box-shadow: var(--shadow); }
.car-arrow:hover { color: var(--gold-soft); border-color: var(--gold); }
.car-arrow svg { width: 16px; height: 16px; }
.car-arrow.left { left: -6px; } .car-arrow.left svg { transform: rotate(180deg); }
.car-arrow.right { right: -6px; }
.car-arrow.hide { opacity: 0; pointer-events: none; }
.carousel.no-scroll .car-arrow { display: none; }

/* Recent searches strip */
.sx-recent { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 4px 0 12px; }
.sx-recent-label { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 11px;
  text-transform: uppercase; letter-spacing: .12em; }
.sx-recent-label svg { width: 13px; height: 13px; }

/* Rich result cards */
.list.rich .list-row { padding: 15px 8px; gap: 16px; align-items: center; }
.thumb.lg, .list.rich .thumb { width: 68px; height: 68px; border-radius: var(--r-sm); }
.sx-row .t { display: flex; flex-direction: column; gap: 3px; }
/* Whole search card is a gateway to the product page — clear interactive states. */
.sx-row.sx-clickable { cursor: pointer; border-radius: var(--r-sm, 10px); transition: background .16s ease, box-shadow .2s ease, transform .08s ease; }
.sx-row.sx-clickable:hover { background: var(--panel-2); box-shadow: 0 6px 22px rgba(0,0,0,.35), inset 0 0 0 1px var(--border-2); }
.sx-row.sx-clickable:active { transform: scale(.995); }
.sx-row.sx-clickable:focus-visible { outline: none; box-shadow: 0 0 0 2px var(--gold-dim), inset 0 0 0 1px var(--gold); }
.sx-row.sx-clickable .row-actions { position: relative; z-index: 1; }
.sx-brand { font-size: 10.5px; text-transform: uppercase; letter-spacing: .14em; color: var(--gold-soft); font-weight: 600; }
.sx-name { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.sx-name b { font-size: 14.5px; font-weight: 600; color: var(--text); white-space: normal; }
.sx-verified { display: inline-flex; align-items: center; gap: 4px; font-size: 10.5px; font-weight: 600;
  color: var(--green); background: var(--green-bg); padding: 2px 8px; border-radius: var(--r-pill); }
.sx-verified svg { width: 11px; height: 11px; }
.sx-meta { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; color: var(--muted); font-size: 12.5px; }
.sx-dot { color: var(--faint); }
.sx-stock.ok { color: var(--green); } .sx-stock { color: var(--amber); }
.sx-pricecol { display: flex; flex-direction: column; align-items: flex-end; gap: 5px; flex: none; }
.sx-price { display: flex; align-items: baseline; gap: 5px; }
.sx-price .sx-from { color: var(--muted); font-size: 11px; }
.sx-price b { font-family: var(--serif); font-size: 17px; color: var(--text); }
.sx-pricecol .badge.ok { font-weight: 700; }

/* Recovery / empty states */
.sx-empty { text-align: center; padding: 30px 16px 10px; color: var(--muted); }
.sx-empty svg { width: 34px; height: 34px; color: var(--faint); margin-bottom: 8px; }
.sx-empty b { display: block; color: var(--text); font-size: 16px; margin-bottom: 4px; }
.sx-suggest-chips { display: flex; flex-wrap: wrap; gap: 8px; }

@media (max-width: 560px) {
  .sx-pricecol { align-items: flex-start; }
  .list.rich .list-row { flex-wrap: wrap; }
  .sx-pricecol { order: 3; flex-basis: 100%; flex-direction: row; align-items: center; }
}
