/* Lovus Market
   Paleta lovus.md: crem + vișiniu + auriu (vezi css/style.css din rădăcina
   site-ului), ca magazinul să arate ca o pagină a site-ului, nu un modul separat. */

:root {
  --bg: #F6EFE2;
  --surface: #FFFFFF;
  --ink: #2B2118;
  --muted: #5A4D3F;
  --line: rgba(58, 42, 30, 0.14);
  --primary: #7C2233;
  --primary-ink: #FFFFFF;
  --primary-soft: rgba(124, 34, 51, 0.08);
  --coin: #C39A4B;
  --coin-deep: #8A6B2E;
  --coin-soft: #F3E6C2;
  --ok: #0B8A5F;
  --ok-soft: #DCF5EA;
  --bad: #C9353A;
  --bad-soft: #FDE8E9;

  --r-card: 18px;
  --r-ctl: 11px;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-num: "Playfair Display", "Inter", system-ui, sans-serif;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #201811;
    --surface: #2B2118;
    --ink: #F6EFE2;
    --muted: #C9BBA6;
    --line: rgba(246, 239, 226, 0.14);
    --primary: #E4C780;
    --primary-soft: rgba(228, 199, 128, 0.14);
    --coin-soft: #3A2F1A;
    --ok: #3DD69A;
    --ok-soft: #12382B;
    --bad: #FF7A7E;
    --bad-soft: #401C22;
    color-scheme: dark;
  }
}

/* ---------- Bază ---------- */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 15px/1.55 var(--font);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--primary); }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2.5px solid var(--primary); outline-offset: 2px; border-radius: 6px; }

h1, h2, h3 { margin: 0 0 .5em; line-height: 1.2; letter-spacing: -.015em; }
h1 { font-size: clamp(22px, 2.6vw, 30px); font-weight: 700; }
h2 { font-size: 19px; font-weight: 650; }
p { margin: 0 0 .6em; }
fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
legend { padding: 0; }

.wrap { max-width: 1260px; margin: 0 auto; padding: 0 20px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.block { display: block; }
.nowrap { white-space: nowrap; }
.count { font: 500 .6em var(--font-num); color: var(--muted); vertical-align: middle; margin-left: 4px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--primary); color: #fff; padding: 10px 14px; border-radius: 10px; }
.skip:focus { top: 12px; color: #fff; }

/* ---------- Butoane ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 42px; padding: 0 18px;
  border-radius: var(--r-ctl); border: 1px solid transparent;
  background: var(--surface); color: var(--ink);
  font-weight: 600; font-size: 14px; line-height: 1.2; white-space: nowrap;
  cursor: pointer; text-align: center;
  transition: background-color .15s, border-color .15s, color .15s, filter .15s;
}
.btn--primary { background: var(--primary); color: var(--primary-ink); }
.btn--primary:hover { color: var(--primary-ink); filter: brightness(1.08); }
.btn--accent { background: var(--coin); color: #231A00; }
.btn--accent:hover { color: #231A00; filter: brightness(1.05); }
.btn--ghost { background: transparent; border-color: var(--line); }
.btn--ghost:hover { border-color: var(--primary); color: var(--ink); }
.btn--lg { min-height: 54px; font-size: 16px; width: 100%; border-radius: 14px; }
.btn--wide { min-width: 220px; }
.btn--icon { width: 42px; padding: 0; flex: none; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .55; cursor: progress; }
.btn input[type="checkbox"] { accent-color: var(--primary); width: 16px; height: 16px; margin: 0; }
.btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; }
.btn--fav[aria-pressed="true"] { color: var(--bad); border-color: currentColor; }
.btn--fav[aria-pressed="true"] svg { fill: currentColor; }

/* ---------- Moneda LVS ---------- */

.coin {
  --s: 1em;
  position: relative; flex: none;
  display: inline-grid; place-items: center;
  width: var(--s); height: var(--s); border-radius: 50%;
  background:
    radial-gradient(circle at 32% 28%, #FFF1B8 0 12%, transparent 13%),
    radial-gradient(circle at 50% 50%, #FFD54A 0 58%, var(--coin) 59% 72%, var(--coin-deep) 100%);
  box-shadow: inset 0 -1px 0 rgba(0,0,0,.18), 0 1px 0 rgba(0,0,0,.06);
}
.coin::after {
  content: "L";
  font: 700 calc(var(--s) * .5)/1 var(--font-num);
  color: #6B4A00;
  transform: translateY(2%);
}

.price {
  display: flex; align-items: center; gap: .32em;
  font-family: var(--font-num); font-weight: 700; font-size: 18px;
  letter-spacing: -.03em; line-height: 1.1;
  font-variant-numeric: tabular-nums;
}
.price .coin { --s: .9em; }
.price__sym { font-size: .56em; font-weight: 500; color: var(--muted); letter-spacing: 0; margin-left: .1em; }
.price--xl { font-size: clamp(30px, 3.6vw, 40px); margin: 6px 0 4px; }
.price--hero { font-size: clamp(40px, 7vw, 72px); }
.price--hero .coin { --s: .82em; }
.price__old { color: var(--muted); font-size: 13px; }

/* ---------- Header ---------- */

.topbar {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(14px);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid var(--line);
}
.topbar__row { display: flex; align-items: center; gap: 18px; min-height: 70px; }
.logo { display: flex; align-items: center; gap: 9px; font: 700 18px var(--font-num); letter-spacing: -.04em; flex: none; }
.logo .coin { --s: 30px; }
.logo b { color: var(--primary); font-weight: 700; }

.search {
  flex: 1; max-width: 640px;
  display: flex; align-items: center; gap: 8px;
  background: var(--bg); border: 1.5px solid transparent; border-radius: 14px;
  padding: 4px 4px 4px 14px;
  transition: border-color .15s, background-color .15s;
}
.search:focus-within { border-color: var(--primary); background: var(--surface); }
.search svg { width: 18px; height: 18px; fill: none; stroke: var(--muted); stroke-width: 2; stroke-linecap: round; flex: none; }
.search input { flex: 1; min-width: 0; height: 38px; border: 0; background: transparent; outline: none; font-size: 15px; }
.search input::-webkit-search-cancel-button { cursor: pointer; }
.search .btn { min-height: 38px; }

.topnav { display: flex; align-items: center; gap: 6px; margin-left: auto; }
.iconlink { display: inline-flex; align-items: center; gap: 6px; padding: 8px 10px; border-radius: 10px; font-weight: 500; }
.iconlink svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linejoin: round; }
.iconlink[aria-current="page"] { background: var(--primary-soft); color: var(--primary); }
.wallet-pill {
  display: inline-flex; align-items: center; gap: 6px;
  height: 40px; padding: 0 14px 0 8px; margin: 0 4px;
  border-radius: 999px; background: var(--coin-soft);
  font: 700 14px var(--font-num); letter-spacing: -.02em;
}
.wallet-pill .coin { --s: 24px; }
.wallet-pill small { font: 500 10px var(--font); color: var(--muted); }

@media (max-width: 860px) {
  .topbar__row { flex-wrap: wrap; gap: 10px; padding: 10px 0; }
  .search { order: 3; flex-basis: 100%; max-width: none; }
  .hide-sm { display: none; }
}
@media (max-width: 420px) {
  .hide-xs { display: none; }
  .topnav .btn--accent { width: 40px; padding: 0; font-size: 20px; }
}

/* ---------- Mesaje ---------- */

.flash { margin: 18px 0 0; padding: 12px 16px; border-radius: 12px; font-weight: 500; }
.flash--ok { background: var(--ok-soft); color: var(--ok); }
.flash--err { background: var(--bad-soft); color: var(--bad); }

.toast {
  position: fixed; left: 50%; bottom: 96px; z-index: 50;
  transform: translate(-50%, 12px); opacity: 0; pointer-events: none;
  background: var(--ink); color: var(--surface);
  padding: 11px 18px; border-radius: 12px; font-weight: 500;
  box-shadow: 0 10px 30px rgba(20, 18, 60, .25);
  transition: opacity .2s, transform .2s;
}
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }

.hint { font-size: 14px; padding: 11px 14px; border-radius: 12px; background: var(--bg); }
.hint--warn { background: var(--bad-soft); color: var(--bad); }
.hint--warn a { text-decoration: underline; font-weight: 600; }

.empty {
  text-align: center; padding: 56px 24px;
  background: var(--surface); border: 1.5px dashed var(--line); border-radius: var(--r-card);
}
.empty .btn { margin-top: 10px; }
.page-gap { margin-top: 32px; }

/* ---------- Categorii ---------- */

.cats {
  display: flex; gap: 8px; overflow-x: auto;
  padding: 20px 0 4px; margin: 0 -20px; padding-inline: 20px;
  scrollbar-width: none; scroll-snap-type: x proximity;
}
.cats::-webkit-scrollbar { display: none; }
.chip {
  display: inline-flex; align-items: center; gap: 7px; flex: none;
  height: 40px; padding: 0 16px;
  border-radius: 999px; background: var(--surface); border: 1px solid var(--line);
  font-weight: 550; white-space: nowrap; scroll-snap-align: start;
}
.chip small { font-size: 12px; color: var(--muted); font-weight: 500; }
.chip[aria-current="true"] { background: var(--ink); border-color: var(--ink); color: var(--surface); }
.chip[aria-current="true"] small { color: inherit; opacity: .65; }

/* ---------- Listă + filtre ---------- */

.listing { display: grid; grid-template-columns: 264px minmax(0, 1fr); gap: 24px; margin: 18px 0 48px; align-items: start; }

.filters {
  position: sticky; top: 90px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card);
  padding: 6px 18px 18px;
}
.filters summary {
  display: flex; align-items: center; gap: 8px;
  padding: 12px 0; font-weight: 650; font-size: 17px; cursor: pointer; list-style: none;
}
.filters summary::-webkit-details-marker { display: none; }
.filters summary::after { content: ""; margin-left: auto; width: 8px; height: 8px; border: solid var(--muted); border-width: 0 2px 2px 0; transform: rotate(45deg); transition: transform .2s; }
.filters details[open] summary::after { transform: rotate(-135deg); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--primary); }
.filters__actions { display: grid; gap: 8px; }

.field { display: grid; gap: 6px; margin-bottom: 16px; }
.field > span, .field > legend, .rate legend { font-size: 13px; font-weight: 600; color: var(--muted); margin-bottom: 6px; }
.field__err { color: var(--bad); font-size: 13px; font-weight: 500; }
.input {
  width: 100%; min-height: 42px; padding: 9px 12px;
  border: 1px solid var(--line); border-radius: var(--r-ctl);
  background: var(--surface); font-size: 15px;
  transition: border-color .15s, box-shadow .15s;
}
textarea.input { resize: vertical; line-height: 1.5; }
.input:hover { border-color: color-mix(in srgb, var(--primary) 35%, var(--line)); }
.input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.input[aria-invalid="true"] { border-color: var(--bad); }
select.input { appearance: none; padding-right: 34px; cursor: pointer;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 17px) 50%, calc(100% - 12px) 50%;
  background-size: 5px 5px; background-repeat: no-repeat; }
.range { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }

.seg { display: flex; background: var(--bg); border-radius: var(--r-ctl); padding: 3px; }
.seg label { flex: 1; position: relative; }
.seg input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.seg span { display: block; text-align: center; padding: 8px 6px; border-radius: 8px; font-size: 13px; font-weight: 600; color: var(--muted); }
.seg input:checked + span { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgba(20, 18, 60, .12); }
.seg input:focus-visible + span { outline: 2.5px solid var(--primary); }

.results-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.results-head h1 { margin: 0; }
.sort select { min-width: 190px; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(214px, 1fr)); gap: 16px; }
.grid > div { display: flex; }
.grid > div > .card { flex: 1; }
.is-sold .card { opacity: .55; }

@media (max-width: 900px) {
  .listing { grid-template-columns: 1fr; gap: 14px; }
  .filters { position: static; }
}
@media (max-width: 540px) {
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .wrap { padding: 0 14px; }
  .cats { margin: 0 -14px; padding-inline: 14px; }
}

/* ---------- Card ---------- */

.card {
  position: relative; display: flex; flex-direction: column; overflow: hidden;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card);
  transition: border-color .15s;
}
.card:hover { border-color: color-mix(in srgb, var(--primary) 45%, var(--line)); }
.card--boost { border-color: color-mix(in srgb, var(--coin) 70%, var(--line)); box-shadow: 0 0 0 1px color-mix(in srgb, var(--coin) 40%, transparent); }
.card__media { position: relative; display: block; aspect-ratio: 4 / 3; background: var(--bg); }
.card__media img { width: 100%; height: 100%; object-fit: cover; }
.card__body { display: flex; flex-direction: column; gap: 7px; padding: 12px 14px 12px; flex: 1; }
.card__title {
  font-weight: 500; line-height: 1.35; min-height: 2.7em;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.card__title::after { content: ""; position: absolute; inset: 0; z-index: 0; }
.card__price { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.card__meta { display: flex; justify-content: space-between; gap: 8px; margin-top: auto; font-size: 12px; color: var(--muted); }
.card__meta span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.cmp {
  position: relative; z-index: 1;
  display: flex; align-items: center; gap: 7px;
  padding-top: 9px; border-top: 1px dashed var(--line);
  font-size: 13px; color: var(--muted); cursor: pointer;
}
.cmp input { accent-color: var(--primary); width: 16px; height: 16px; margin: 0; cursor: pointer; }
.cmp:has(input:checked) { color: var(--primary); font-weight: 600; }

.badge { position: absolute; left: 10px; top: 10px; padding: 4px 9px; border-radius: 7px; font-size: 12px; font-weight: 700; line-height: 1.2; }
.badge--boost { background: var(--coin); color: #231A00; }
.badge--sale { top: auto; bottom: 10px; background: var(--bad); color: #fff; font-family: var(--font-num); font-weight: 500; }

.fav {
  position: absolute; right: 10px; top: 10px; z-index: 2;
  width: 38px; height: 38px; border-radius: 50%; border: 0;
  display: grid; place-items: center; cursor: pointer;
  background: rgba(255, 255, 255, .94); color: #1C1B3A;
  box-shadow: 0 2px 8px rgba(20, 18, 60, .12);
}
.fav svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 2; }
.fav[aria-pressed="true"] { color: #E0343A; }
.fav[aria-pressed="true"] svg { fill: currentColor; }
.pop { animation: pop .32s ease-out; }
@keyframes pop { 45% { transform: scale(1.28); } }

/* ---------- Pagina produsului ---------- */

.crumbs { display: flex; flex-wrap: wrap; gap: 6px; margin: 18px 0 14px; font-size: 13px; color: var(--muted); }
.crumbs span[aria-current] { color: var(--ink); max-width: 40ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.pd, .pd-bottom { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(320px, 1fr); gap: 24px; align-items: start; }
.pd-bottom { margin-top: 0; }

.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); padding: 20px; }
.section { margin-top: 24px; }

.gallery { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); padding: 12px; }
.gallery__main { position: relative; aspect-ratio: 4 / 3; border-radius: 12px; overflow: hidden; background: var(--bg); }
.gallery__main img { width: 100%; height: 100%; object-fit: contain; transition: opacity .18s; }
.gallery__main img.is-swapping { opacity: 0; }
.thumbs { display: flex; gap: 8px; margin-top: 10px; overflow-x: auto; padding-bottom: 2px; }
.thumbs button { flex: none; width: 76px; height: 58px; padding: 0; border-radius: 9px; overflow: hidden; cursor: pointer; background: var(--bg); border: 2px solid transparent; opacity: .7; }
.thumbs button[aria-current="true"] { border-color: var(--primary); opacity: 1; }
.thumbs img { width: 100%; height: 100%; object-fit: cover; }

.buybox { position: sticky; top: 90px; display: grid; gap: 14px; }
.buybox > .panel:first-child { display: grid; gap: 12px; }
.pd__title { font-size: clamp(20px, 2.2vw, 26px); margin: 0; }
.saving { font-size: 14px; color: var(--muted); margin: 0; }
.saving b { color: var(--ok); }

.tags { display: flex; gap: 6px; flex-wrap: wrap; }
.tag { display: inline-block; padding: 4px 10px; border-radius: 999px; background: var(--bg); font-size: 12px; font-weight: 600; }
.tag--ok { background: var(--ok-soft); color: var(--ok); }
.tag--bad { background: var(--bad-soft); color: var(--bad); }
.tag--coin { background: var(--coin-soft); color: var(--coin-deep); }
.tag--block { margin: 0; justify-self: start; }

.buy { display: grid; gap: 12px; }
.buy__row { display: flex; align-items: center; gap: 12px; }
.qty { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: var(--r-ctl); }
.qty button { width: 42px; height: 42px; border: 0; background: none; font-size: 20px; cursor: pointer; border-radius: var(--r-ctl); }
.qty button:hover { background: var(--bg); }
.qty input { width: 46px; height: 42px; border: 0; background: none; text-align: center; font-weight: 700; -moz-appearance: textfield; }
.qty input::-webkit-inner-spin-button, .qty input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }

.stack { display: grid; gap: 8px; }
.row-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.row-actions .btn { flex: 1 1 auto; }

.escrow { display: flex; gap: 10px; align-items: flex-start; margin: 0; font-size: 13px; color: var(--muted); }
.escrow svg { width: 22px; height: 22px; flex: none; fill: none; stroke: var(--ok); stroke-width: 1.8; stroke-linejoin: round; stroke-linecap: round; }

.seller { display: flex; gap: 14px; align-items: flex-start; }
.seller__name { font-size: 16px; margin: 0 0 2px; }
.seller__info p { margin: 0 0 4px; font-size: 14px; }
.avatar { width: 52px; height: 52px; flex: none; border-radius: 50%; overflow: hidden; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary); font: 700 20px var(--font-num); }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.stars { color: var(--coin); letter-spacing: 1px; white-space: nowrap; }
.stars__off { color: var(--line); }

.desc { white-space: pre-line; max-width: 72ch; margin-bottom: 14px; }
.specs { width: 100%; border-collapse: collapse; }
.specs th, .specs td { text-align: left; vertical-align: top; padding: 11px 0; border-bottom: 1px solid var(--line); }
.specs tr:last-child > * { border-bottom: 0; }
.specs th { width: 42%; font-weight: 500; color: var(--muted); padding-right: 16px; }

.history { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 18px; align-items: end; }
.history__low { display: grid; gap: 4px; justify-items: end; }
.spark { width: 100%; height: 64px; color: var(--primary); overflow: visible; }

.review { padding: 12px 0; border-bottom: 1px solid var(--line); }
.review:last-child { border-bottom: 0; }
.review__head { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.review p { margin: 4px 0 0; }

@media (max-width: 920px) {
  .pd, .pd-bottom { grid-template-columns: 1fr; }
  .buybox { position: static; }
}

/* ---------- Comparație ---------- */

.page-head { margin: 26px 0 16px; }
.page-head h1 { margin-bottom: 4px; }
.back { display: inline-block; margin-bottom: 8px; font-size: 14px; color: var(--muted); }
.back::before { content: "‹ "; }

.toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.toolbar__spacer { flex: 1; }

.switch { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-weight: 500; position: relative; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch__track { width: 42px; height: 24px; border-radius: 999px; background: var(--line); position: relative; transition: background-color .2s; flex: none; }
.switch__track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.2); transition: transform .2s; }
.switch input:checked + .switch__track { background: var(--primary); }
.switch input:checked + .switch__track::after { transform: translateX(18px); }
.switch input:focus-visible + .switch__track { outline: 2.5px solid var(--primary); outline-offset: 2px; }

.cmp-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); margin-bottom: 40px; }
.cmp-table { border-collapse: separate; border-spacing: 0; width: 100%; }
.cmp-table th, .cmp-table td { padding: 13px 16px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); min-width: 210px; }
.cmp-table tbody tr:last-child > * { border-bottom: 0; }
.cmp-table th[scope="row"], .cmp-table thead td:first-child {
  position: sticky; left: 0; z-index: 1; min-width: 150px; width: 150px;
  background: var(--surface); color: var(--muted); font-weight: 500;
  box-shadow: 1px 0 0 var(--line);
}
.cmp-group th { background: var(--bg); font-size: 12px; font-weight: 700; color: var(--muted); padding: 8px 16px; }
.cmp-head { font-weight: 600; }
.cmp-head img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 12px; background: var(--bg); margin-bottom: 10px; }
.cmp-head__title { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.8em; }
.cmp-head__actions { display: flex; gap: 8px; margin-top: 10px; }
.cmp-head__actions .btn--primary { flex: 1; }
.cmp-add { vertical-align: middle !important; }
.cmp-add a { display: grid; place-items: center; gap: 6px; aspect-ratio: 4 / 3; border: 1.5px dashed var(--line); border-radius: 12px; color: var(--muted); font-weight: 600; text-align: center; }
.cmp-add a span { font-size: 28px; line-height: 1; }
.cmp-add a:hover { border-color: var(--primary); color: var(--primary); }
.cmp-table td.best { background: var(--ok-soft); }
.best-tag { display: block; margin-top: 4px; font-size: 11px; font-weight: 700; color: var(--ok); }
.diff-only tr.is-same { display: none; }

/* ---------- Plată ---------- */

.checkout { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(300px, 1fr); gap: 24px; align-items: start; margin-bottom: 48px; }
.checkout__main { display: grid; gap: 16px; }
.options { display: grid; gap: 8px; margin-bottom: 16px; }
.option { position: relative; display: flex; gap: 12px; align-items: flex-start; padding: 14px; border: 1.5px solid var(--line); border-radius: 14px; cursor: pointer; }
.option input { accent-color: var(--primary); width: 18px; height: 18px; margin: 2px 0 0; }
.option__body { display: grid; gap: 2px; }
.option:has(input:checked) { border-color: var(--primary); background: var(--primary-soft); }
.checkout:has(input[value="ridicare"]:checked) .address { display: none; }

.flow { margin: 0; padding-left: 20px; display: grid; gap: 8px; }
.flow li::marker { font-family: var(--font-num); color: var(--primary); }

.summary { position: sticky; top: 90px; display: grid; gap: 16px; }
.summary__item { display: flex; gap: 12px; align-items: center; }
.summary__item img { width: 72px; height: 56px; object-fit: cover; border-radius: 10px; flex: none; background: var(--bg); }
.summary__item div { display: grid; }
.totals { margin: 0; display: grid; gap: 8px; padding: 14px 0; border-block: 1px solid var(--line); }
.totals div { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; }
.totals dt { color: var(--muted); }
.totals dd { margin: 0; font-weight: 600; font-variant-numeric: tabular-nums; }
.totals__after dd { color: var(--ok); }
.totals__after.is-neg dd { color: var(--bad); }
.summary__total { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.summary__total .price--xl { margin: 0; }

@media (max-width: 920px) {
  .checkout { grid-template-columns: 1fr; }
  .summary { position: static; }
}

/* ---------- Comenzi ---------- */

.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 18px; }
.tabs a { padding: 10px 14px; margin-bottom: -1px; border-bottom: 2.5px solid transparent; font-weight: 600; color: var(--muted); }
.tabs a[aria-current="page"] { color: var(--ink); border-color: var(--primary); }

.order {
  display: grid; grid-template-columns: 104px minmax(0, 1fr) auto; gap: 18px; align-items: start;
  padding: 16px; margin-bottom: 12px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card);
}
.order img { width: 104px; height: 80px; object-fit: cover; border-radius: 12px; background: var(--bg); }
.order__top { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.order__title { font-weight: 600; }
.order__info p { margin: 4px 0 0; }
.order__actions { display: flex; flex-direction: column; gap: 8px; min-width: 170px; }
.order__actions form, .order__actions .btn { width: 100%; }
.address-box { background: var(--bg); padding: 8px 12px; border-radius: 10px; font-size: 13px; }

.steps { list-style: none; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 10px 0 0; padding: 0; font-size: 12px; font-weight: 600; color: var(--muted); counter-reset: step; }
.steps li { display: flex; align-items: center; gap: 6px; counter-increment: step; }
.steps li::before { content: counter(step); display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: var(--bg); font-size: 11px; }
.steps li:not(:last-child)::after { content: ""; width: 22px; height: 2px; border-radius: 2px; background: var(--line); margin-left: 2px; }
.steps li.done { color: var(--ok); }
.steps li.done::before { content: "✓"; background: var(--ok-soft); }
.steps li.done:not(:last-child)::after { background: var(--ok); }

.review-form { grid-column: 1 / -1; }
.review-form summary { list-style: none; width: max-content; }
.review-form summary::-webkit-details-marker { display: none; }
.review-form form { margin-top: 12px; padding: 16px; background: var(--bg); border-radius: 14px; max-width: 560px; }
.rate { margin-bottom: 12px; }
.rate__stars { display: inline-flex; flex-direction: row-reverse; gap: 2px; }
.rate__stars input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.rate__stars label { font-size: 30px; line-height: 1; color: var(--line); cursor: pointer; transition: color .1s; }
.rate__stars input:checked ~ label,
.rate__stars label:hover,
.rate__stars label:hover ~ label { color: var(--coin); }
.rate__stars input:focus-visible + label { outline: 2.5px solid var(--primary); border-radius: 4px; }

@media (max-width: 640px) {
  .order { grid-template-columns: 76px minmax(0, 1fr); gap: 12px; }
  .order img { width: 76px; height: 60px; }
  .order__actions { grid-column: 1 / -1; flex-direction: row; min-width: 0; }
}

/* ---------- Portofel ---------- */

.wallet-hero {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; flex-wrap: wrap;
  margin: 26px 0 16px; padding: 28px;
  border-radius: 24px; background: var(--surface); border: 1px solid var(--line);
  background-image: radial-gradient(120% 140% at 100% 0%, var(--coin-soft) 0 30%, transparent 60%);
}
.wallet-hero p { margin: 0 0 4px; font-weight: 500; }
.wallet-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.wallet-stats .panel p { margin: 0; }
.wallet-stats .price { margin: 6px 0; font-size: 24px; }
.table-scroll { overflow-x: auto; }
.tx { width: 100%; border-collapse: collapse; }
.tx th { text-align: left; font-size: 12px; font-weight: 600; color: var(--muted); padding: 8px 12px 8px 0; border-bottom: 1px solid var(--line); }
.tx td { padding: 12px 12px 12px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.tx tr:last-child td { border-bottom: 0; }
.tx .num { text-align: right; white-space: nowrap; font: 600 14px var(--font-num); letter-spacing: -.02em; padding-right: 0; }
.tx .plus { color: var(--ok); }

/* ---------- Formular anunț ---------- */

.listing-form { display: grid; gap: 16px; max-width: 860px; margin-bottom: 48px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.span-2 { grid-column: 1 / -1; }
@media (max-width: 600px) { .form-grid { grid-template-columns: 1fr; } }

.input-coin { position: relative; }
.input-coin .coin { --s: 20px; position: absolute; left: 12px; top: 50%; transform: translateY(-50%); pointer-events: none; }
.input-coin .input { padding-left: 42px; font: 700 17px var(--font-num); letter-spacing: -.02em; }

.drop {
  position: relative; display: grid; place-items: center; min-height: 120px; padding: 24px;
  border: 2px dashed var(--line); border-radius: var(--r-card); text-align: center; cursor: pointer;
  transition: border-color .15s, background-color .15s;
}
.drop:hover, .drop.is-over, .drop:focus-within { border-color: var(--primary); background: var(--primary-soft); }
.drop input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.drop__text b { color: var(--primary); }
.preview, .img-edit { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 10px; margin: 12px 0; }
.preview:empty { display: none; }
.preview img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 10px; }
.img-edit__item { display: grid; gap: 4px; font-size: 13px; cursor: pointer; }
.img-edit__item img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 10px; }
.img-edit__item:has(input:checked) img { opacity: .35; outline: 2px solid var(--bad); }

.spec-row { display: grid; grid-template-columns: 1fr 1.4fr auto; gap: 8px; margin-bottom: 8px; }

.form-foot {
  position: sticky; bottom: 0; z-index: 5;
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 14px 0; background: linear-gradient(to top, var(--bg) 70%, transparent);
}

/* ---------- Bara de comparație ---------- */

.compare-tray {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  padding: 10px 0 calc(10px + env(safe-area-inset-bottom));
  background: var(--ink); color: var(--surface);
  transition: transform .25s ease, visibility .25s;
}
.compare-tray[hidden] { display: block; transform: translateY(110%); visibility: hidden; }
.compare-tray__row { display: flex; align-items: center; gap: 10px; }
.compare-tray__text { flex: 1; font-size: 14px; }
.compare-tray__text b { font-family: var(--font-num); }
.compare-tray .btn--ghost { color: inherit; border-color: color-mix(in srgb, var(--surface) 30%, transparent); }
.compare-tray .btn--ghost:hover { border-color: var(--surface); }
@media (max-width: 520px) { .compare-tray__text { font-size: 12px; } }

/* ---------- Paginare, footer ---------- */

.pager { display: flex; justify-content: center; gap: 6px; margin: 28px 0 8px; }
.pager a, .pager span { display: grid; place-items: center; min-width: 42px; height: 42px; padding: 0 12px; border-radius: 11px; background: var(--surface); border: 1px solid var(--line); font-weight: 600; }
.pager [aria-current="page"] { background: var(--primary); border-color: var(--primary); color: #fff; }

.foot { margin-top: 32px; padding: 24px 0 100px; border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; }
.foot__row { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.foot nav { display: flex; gap: 16px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
