/* Lelong.com — design tokens and base styles. */

:root {
  --color-navy: #1f253d;
  --color-navy-dark: #151a2c;
  --color-blue: #1a6fbf;
  --color-blue-dark: #145896;
  --color-amber: #f5a623;
  --color-amber-dark: #c8830f;
  --color-sky: #e2f1fe;
  --color-slate: #5a6478;
  --color-slate-soft: #8a93a6;
  --color-bg: #fbfcfe;
  --color-surface: #ffffff;
  --color-surface-soft: #f3f5fb;
  --color-border: #d8dee9;
  --color-border-soft: #eceff5;
  --color-text: #1f253d;
  --color-text-muted: #5a6478;
  --color-success: #1f8a5d;
  --color-success-bg: #e6f6ee;
  --color-danger: #b83232;
  --color-danger-bg: #fdecec;

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-pill: 999px;

  --shadow-sm: 0 1px 2px rgba(31, 37, 61, 0.08);
  --shadow-md: 0 4px 16px rgba(31, 37, 61, 0.08);
  --shadow-lg: 0 12px 32px rgba(31, 37, 61, 0.12);

  --font-heading: 'Lato', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --font-body: 'Open Sans', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;

  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;
  --space-8: 64px;

  --container-max: 1200px;
}

*, *::before, *::after { box-sizing: border-box; }

[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  color: var(--color-text);
  background: var(--color-bg);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

img, svg { display: block; max-width: 100%; height: auto; }

img.image-tile {
  object-fit: cover;
  background: var(--color-surface-soft);
}

a {
  color: var(--color-blue);
  text-decoration: none;
  transition: color 120ms ease;
}
a:hover { color: var(--color-blue-dark); text-decoration: underline; }

/* Inline links in flow text need a non-colour distinguisher (WCAG 2.1 AA). */
.faq p a,
.faq summary a,
.help-card p a,
.empty-state p a,
.error-page p a,
.cta-block p a,
.hero__lede a,
main p a {
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-thickness: 1px;
}
a:focus-visible {
  outline: 2px solid var(--color-blue);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  color: var(--color-navy);
  margin: 0 0 var(--space-3);
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: -0.01em;
}

h1 { font-size: clamp(1.75rem, 1.2rem + 2vw, 2.5rem); }
h2 { font-size: clamp(1.4rem, 1.1rem + 1.2vw, 1.875rem); }
h3 { font-size: 1.25rem; }
p { margin: 0 0 var(--space-4); }

.skip-link {
  position: absolute;
  top: -100px;
  left: var(--space-4);
  background: var(--color-navy);
  color: #fff;
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-sm);
  z-index: 1000;
  font-weight: 600;
}
.skip-link:focus {
  top: var(--space-4);
}

.container {
  width: min(100%, var(--container-max));
  margin: 0 auto;
  padding: 0 var(--space-4);
}

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

.site-header {
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border-soft);
  position: sticky;
  top: 0;
  z-index: 50;
}

.site-header__inner {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  padding: var(--space-3) 0;
}

.site-logo {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--color-navy);
  text-decoration: none;
  flex: 0 0 auto;
}

.site-logo:hover { text-decoration: none; color: var(--color-navy); }

.site-logo__mark {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: inline-grid;
  place-items: center;
  background: linear-gradient(135deg, var(--color-blue) 0%, var(--color-amber) 100%);
  color: #fff;
  font-weight: 800;
  font-size: 1rem;
}

.search-form {
  display: flex;
  flex: 1 1 auto;
  min-width: 0;
  background: var(--color-surface-soft);
  border: 1px solid var(--color-border-soft);
  border-radius: var(--radius-pill);
  align-items: center;
  padding: 4px 4px 4px 16px;
  gap: var(--space-2);
}
.search-form:focus-within {
  border-color: var(--color-blue);
  box-shadow: 0 0 0 3px rgba(26, 111, 191, 0.18);
  background: #fff;
}

.search-form__input {
  flex: 1 1 auto;
  border: 0;
  background: transparent;
  font: inherit;
  color: var(--color-text);
  padding: 8px 0;
  min-width: 0;
}
.search-form__input:focus { outline: none; }

.search-form__button {
  border: 0;
  background: var(--color-navy);
  color: #fff;
  padding: 8px 18px;
  border-radius: var(--radius-pill);
  font-weight: 600;
  cursor: pointer;
  transition: background 120ms ease, transform 120ms ease;
}
.search-form__button:hover { background: var(--color-navy-dark); }
.search-form__button:active { transform: scale(0.98); }

.site-nav {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  flex: 0 0 auto;
}

.site-nav a, .site-nav button.nav-link {
  font-weight: 600;
  color: var(--color-navy);
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  transition: background 120ms ease;
  border: 0;
  background: transparent;
  cursor: pointer;
  font: inherit;
}
.site-nav a:hover, .site-nav button.nav-link:hover { background: var(--color-surface-soft); text-decoration: none; }

.site-nav .button-primary,
.site-nav .button-primary:hover {
  background: var(--color-amber);
  color: var(--color-navy);
}

.nav-toggle {
  display: none;
  background: transparent;
  border: 1px solid var(--color-border);
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  align-items: center;
  justify-content: center;
  color: var(--color-navy);
}
.nav-toggle:focus-visible { outline: 2px solid var(--color-blue); outline-offset: 2px; }

@media (max-width: 880px) {
  .site-header__inner { flex-wrap: wrap; row-gap: var(--space-3); }
  .nav-toggle { display: inline-flex; order: 2; margin-left: auto; }
  .search-form { order: 4; flex-basis: 100%; }
  .site-nav {
    order: 5;
    flex-basis: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: var(--space-1);
    background: var(--color-surface);
    border-top: 1px solid var(--color-border-soft);
    padding-top: var(--space-3);
    display: none;
  }
  .site-nav[data-open="true"] { display: flex; }
  .site-nav a, .site-nav button.nav-link { padding: 12px 14px; }
}

/* Buttons ------------------------------------------------------------- */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: 12px 20px;
  border-radius: var(--radius-pill);
  border: 0;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  transition: background 120ms ease, color 120ms ease, transform 120ms ease, box-shadow 120ms ease;
  text-decoration: none;
  line-height: 1;
}
.button:focus-visible { outline: 3px solid rgba(26, 111, 191, 0.45); outline-offset: 2px; }
.button:active { transform: translateY(1px); }
.button:disabled { opacity: 0.55; cursor: not-allowed; transform: none; }

.button-primary { background: var(--color-amber); color: var(--color-navy); }
.button-primary:hover { background: var(--color-amber-dark); color: var(--color-navy); text-decoration: none; }

.button-secondary { background: var(--color-navy); color: #fff; }
.button-secondary:hover { background: var(--color-navy-dark); color: #fff; text-decoration: none; }

.button-ghost { background: transparent; color: var(--color-navy); border: 1px solid var(--color-border); }
.button-ghost:hover { background: var(--color-surface-soft); text-decoration: none; }

.button-block { display: flex; width: 100%; }

/* Hero ---------------------------------------------------------------- */

.hero {
  background: radial-gradient(circle at top right, rgba(26, 111, 191, 0.15), transparent 55%),
              radial-gradient(circle at 20% 110%, rgba(245, 166, 35, 0.18), transparent 55%),
              var(--color-sky);
  padding: var(--space-7) 0;
}

.hero__inner {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: var(--space-7);
  align-items: center;
}

.hero__title {
  font-size: clamp(2rem, 1.5rem + 2vw, 3rem);
  margin: 0 0 var(--space-4);
}

.hero__lede {
  font-size: 1.125rem;
  color: var(--color-text-muted);
  max-width: 540px;
  margin: 0 0 var(--space-5);
}

.hero__cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
}

.hero__stats {
  margin-top: var(--space-6);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-3);
}

.hero__stat {
  background: rgba(255, 255, 255, 0.65);
  backdrop-filter: blur(4px);
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: var(--radius-md);
  padding: var(--space-3) var(--space-4);
}
.hero__stat strong {
  display: block;
  font-family: var(--font-heading);
  font-size: 1.25rem;
  color: var(--color-navy);
}
.hero__stat span { font-size: 0.875rem; color: var(--color-text-muted); }

.hero__art {
  display: flex;
  align-items: center;
  justify-content: center;
}
.hero__cards {
  position: relative;
  width: 100%;
  max-width: 460px;
  aspect-ratio: 4/3;
}
.hero__card {
  position: absolute;
  width: 60%;
  border-radius: var(--radius-lg);
  background: #fff;
  box-shadow: var(--shadow-lg);
  padding: var(--space-4);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}
.hero__card--one { top: 0; left: 0; transform: rotate(-4deg); }
.hero__card--two { top: 18%; right: 0; transform: rotate(5deg); }
.hero__card--three { bottom: 0; left: 18%; transform: rotate(-1deg); }
.hero__card .image-tile {
  font-size: 2rem;
  width: 100%;
  height: 90px;
  border-radius: var(--radius-md);
  display: grid;
  place-items: center;
}

@media (max-width: 880px) {
  .hero__inner { grid-template-columns: 1fr; }
  .hero__art { display: none; }
  .hero { padding: var(--space-6) 0; }
}

/* Section + grid ------------------------------------------------------- */

.section { padding: var(--space-7) 0; }
.section--soft { background: var(--color-surface-soft); }
.section__head { display: flex; flex-wrap: wrap; gap: var(--space-3); align-items: end; justify-content: space-between; margin-bottom: var(--space-5); }
.section__title { margin: 0; }
.section__lede { color: var(--color-text-muted); margin: var(--space-2) 0 0; max-width: 60ch; }

.grid-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: var(--space-4);
}
.grid-categories {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: var(--space-4);
}

/* Listing card -------------------------------------------------------- */

.listing-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border-soft);
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
  min-height: 348px;
}
.listing-card__title {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.6em;
}
.listing-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--color-border);
  text-decoration: none;
}
.listing-card:focus-visible {
  outline: 3px solid rgba(26, 111, 191, 0.45);
  outline-offset: 2px;
}

.image-tile {
  display: grid;
  place-items: center;
  font-size: 3rem;
  width: 100%;
  height: 180px;
}

.listing-card__body { padding: var(--space-3) var(--space-4) var(--space-4); display: flex; flex-direction: column; gap: var(--space-2); flex: 1; }
.listing-card__title { font-size: 1rem; font-weight: 700; color: var(--color-navy); margin: 0; line-height: 1.3; }
.listing-card__meta { display: flex; flex-wrap: wrap; gap: var(--space-2); align-items: center; color: var(--color-text-muted); font-size: 0.875rem; }
.listing-card__price { font-family: var(--font-heading); font-weight: 800; color: var(--color-navy); font-size: 1.25rem; margin-top: auto; }

.tag {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  padding: 2px 10px;
  border-radius: var(--radius-pill);
  font-size: 0.75rem;
  font-weight: 600;
  background: var(--color-sky);
  color: var(--color-navy);
}
.tag--amber { background: #fff1d6; color: #7a4a00; }
.tag--success { background: #d4ecdb; color: #155f3f; }

/* Category card ------------------------------------------------------- */

.category-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border-soft);
  border-radius: var(--radius-md);
  padding: var(--space-4);
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}
.category-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); border-color: var(--color-border); text-decoration: none; }
.category-card__icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  background: var(--color-sky);
  color: var(--color-blue);
  display: grid;
  place-items: center;
  font-weight: 800;
  font-family: var(--font-heading);
}
.category-card h3 { margin: 0; font-size: 1.125rem; }
.category-card p { margin: 0; color: var(--color-text-muted); font-size: 0.9375rem; }
.category-card__count { font-size: 0.8125rem; color: var(--color-blue); font-weight: 600; }

/* Forms --------------------------------------------------------------- */

.form-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border-soft);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: var(--space-6);
  max-width: 480px;
  margin: 0 auto;
}
.form-card--wide { max-width: 720px; }

.field { display: flex; flex-direction: column; gap: var(--space-1); margin-bottom: var(--space-4); }
.field label { font-weight: 600; font-size: 0.9375rem; color: var(--color-navy); }
.field .help { color: var(--color-text-muted); font-size: 0.8125rem; }
.field input, .field textarea, .field select {
  font: inherit;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  background: #fff;
  color: var(--color-text);
  transition: border-color 120ms ease, box-shadow 120ms ease;
  width: 100%;
}
.field input:focus, .field textarea:focus, .field select:focus {
  outline: none;
  border-color: var(--color-blue);
  box-shadow: 0 0 0 3px rgba(26, 111, 191, 0.18);
}
.field textarea { resize: vertical; min-height: 140px; }
.field input[aria-invalid="true"], .field textarea[aria-invalid="true"], .field select[aria-invalid="true"] {
  border-color: var(--color-danger);
  box-shadow: 0 0 0 3px rgba(184, 50, 50, 0.18);
}
.field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-3); }
@media (max-width: 600px) { .field-grid { grid-template-columns: 1fr; } }

.form-banner {
  border-radius: var(--radius-md);
  padding: var(--space-3) var(--space-4);
  margin-bottom: var(--space-4);
  font-size: 0.9375rem;
}
.form-banner--error { background: var(--color-danger-bg); color: var(--color-danger); border: 1px solid rgba(184, 50, 50, 0.3); }
.form-banner--success { background: var(--color-success-bg); color: var(--color-success); border: 1px solid rgba(31, 138, 93, 0.3); }

.palette-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}
.palette-row label {
  position: relative;
  cursor: pointer;
}
.palette-row input { position: absolute; opacity: 0; pointer-events: none; }
.palette-row .swatch {
  display: inline-grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: var(--radius-md);
  border: 2px solid transparent;
  font-size: 1.5rem;
  color: #fff;
  font-weight: 700;
}
.palette-row input:checked + .swatch { border-color: var(--color-navy); box-shadow: 0 0 0 3px rgba(31, 37, 61, 0.2); }
.palette-row input:focus-visible + .swatch { box-shadow: 0 0 0 3px rgba(26, 111, 191, 0.35); }

/* Item detail --------------------------------------------------------- */

.item-detail {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: var(--space-6);
  margin: var(--space-6) 0;
}
.item-detail__image {
  border-radius: var(--radius-lg);
  height: 420px;
  width: 100%;
  display: grid;
  place-items: center;
  font-size: 6rem;
  box-shadow: var(--shadow-md);
  object-fit: cover;
  background: var(--color-surface-soft);
}
img.item-detail__image { display: block; }

.item-detail__actions {
  display: flex;
  gap: var(--space-3);
  flex-wrap: wrap;
  margin-top: var(--space-4);
}

.item-detail__feedback {
  margin: var(--space-3) 0 0;
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-md);
  font-size: 0.9375rem;
  background: var(--color-success-bg);
  color: var(--color-success);
}
.item-detail__feedback[data-kind="error"] { background: var(--color-danger-bg); color: var(--color-danger); }
.item-detail__feedback[data-kind="info"] { background: var(--color-sky); color: var(--color-navy); }

[data-action="save"][aria-pressed="true"] {
  border-color: var(--color-amber);
  color: var(--color-amber-dark);
}
[data-action="save"][aria-pressed="true"] [data-save-icon] {
  color: var(--color-amber-dark);
}
.item-detail__price { font-family: var(--font-heading); font-weight: 800; font-size: 2rem; color: var(--color-navy); margin: var(--space-3) 0 var(--space-2); }
.item-detail__meta { display: flex; flex-wrap: wrap; gap: var(--space-2); margin-bottom: var(--space-4); color: var(--color-text-muted); font-size: 0.9375rem; }
.item-detail__seller {
  background: var(--color-surface);
  border: 1px solid var(--color-border-soft);
  border-radius: var(--radius-md);
  padding: var(--space-4);
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-top: var(--space-3);
}
.avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--color-sky);
  color: var(--color-navy);
  font-weight: 700;
  font-family: var(--font-heading);
}

@media (max-width: 880px) {
  .item-detail { grid-template-columns: 1fr; }
  .item-detail__image { height: 260px; font-size: 4rem; }
}

/* Footer -------------------------------------------------------------- */

.site-footer {
  background: var(--color-navy);
  color: #d6dceb;
  padding: var(--space-7) 0 var(--space-5);
  margin-top: auto;
}
.site-footer a { color: #fff; }
.site-footer a:hover { color: var(--color-amber); }

.site-footer__cols {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, minmax(0, 1fr));
  gap: var(--space-6);
  margin-bottom: var(--space-5);
}
.site-footer h2 { color: #fff; font-size: 0.9375rem; text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: var(--space-3); }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: var(--space-2); }
.site-footer p { margin: 0 0 var(--space-3); }

.site-footer__bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: var(--space-4);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-3);
  font-size: 0.875rem;
  color: #b6becf;
}

@media (max-width: 760px) {
  .site-footer__cols { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 480px) {
  .site-footer__cols { grid-template-columns: 1fr; }
}

/* Misc ---------------------------------------------------------------- */

.empty-state {
  text-align: center;
  background: var(--color-surface);
  border: 1px dashed var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-7) var(--space-5);
}
.empty-state h2 { color: var(--color-navy); }
.empty-state p { color: var(--color-text-muted); }

.toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin-bottom: var(--space-4);
}
.toolbar__filters { display: flex; gap: var(--space-2); flex-wrap: wrap; }
.chip {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-pill);
  padding: 6px 14px;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--color-navy);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  cursor: pointer;
}
.chip:hover { background: var(--color-surface-soft); text-decoration: none; }
.chip[aria-pressed="true"], .chip--active { background: var(--color-navy); color: #fff; border-color: var(--color-navy); }

.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;
}

.skeleton {
  background: linear-gradient(90deg, var(--color-surface-soft) 0%, #e7ebf3 50%, var(--color-surface-soft) 100%);
  background-size: 200% 100%;
  animation: skel 1.4s linear infinite;
  border-radius: var(--radius-md);
}
.skeleton-card { height: 348px; }
@keyframes skel { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

/* Page-specific ------------------------------------------------------- */

.page-header {
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border-soft);
  padding: var(--space-6) 0;
}
.page-header__inner { display: flex; flex-direction: column; gap: var(--space-2); }
.breadcrumbs { font-size: 0.875rem; color: var(--color-text-muted); }
.breadcrumbs a { color: var(--color-text-muted); }
.breadcrumbs span[aria-current] { color: var(--color-navy); font-weight: 600; }

.help-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: var(--space-4);
  margin-top: var(--space-5);
}
.help-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border-soft);
  border-radius: var(--radius-md);
  padding: var(--space-5);
}
.help-card h3 { margin-top: 0; }
.help-card p { margin: 0; color: var(--color-text-muted); }

.faq details {
  background: var(--color-surface);
  border: 1px solid var(--color-border-soft);
  border-radius: var(--radius-md);
  padding: var(--space-3) var(--space-4);
  margin-bottom: var(--space-3);
}
.faq summary { font-weight: 600; cursor: pointer; color: var(--color-navy); }
.faq summary:focus-visible { outline: 2px solid var(--color-blue); outline-offset: 2px; border-radius: var(--radius-sm); }
.faq p { margin: var(--space-3) 0 0; color: var(--color-text-muted); }

.cta-block {
  background: linear-gradient(135deg, var(--color-navy) 0%, var(--color-blue) 100%);
  color: #fff;
  border-radius: var(--radius-lg);
  padding: var(--space-7);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-4);
}
.cta-block h2 { color: #fff; margin: 0 0 var(--space-2); }
.cta-block p { margin: 0; color: #d6dceb; }

.error-page {
  text-align: center;
  padding: var(--space-8) var(--space-4);
}
.error-page h1 { font-size: clamp(2.5rem, 1.5rem + 4vw, 4rem); margin-bottom: var(--space-3); }
.error-page p { color: var(--color-text-muted); margin-bottom: var(--space-5); }

/* Profile ------------------------------------------------------------- */

.profile-summary {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  padding: var(--space-5);
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border-soft);
  flex-wrap: wrap;
}
.profile-summary .avatar { width: 64px; height: 64px; font-size: 1.25rem; }

/* Auth narrow centered ----------------------------------------------- */
.auth-shell {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-7) var(--space-4);
  flex: 1;
}

/* Modal -------------------------------------------------------------- */

.modal {
  border: 0;
  padding: 0;
  border-radius: var(--radius-lg);
  background: transparent;
  max-width: 540px;
  width: calc(100% - 32px);
  box-shadow: var(--shadow-lg);
}
.modal::backdrop {
  background: rgba(31, 37, 61, 0.55);
  backdrop-filter: blur(2px);
}
.modal__form {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  padding: var(--space-5) var(--space-5) var(--space-4);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}
.modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
}
.modal__header h2 { margin: 0; font-size: 1.25rem; }
.modal__close {
  border: 0;
  background: transparent;
  font-size: 1.75rem;
  line-height: 1;
  cursor: pointer;
  color: var(--color-text-muted);
  padding: 4px 8px;
  border-radius: var(--radius-sm);
}
.modal__close:hover { background: var(--color-surface-soft); color: var(--color-navy); }
.modal__close:focus-visible { outline: 2px solid var(--color-blue); outline-offset: 2px; }
.modal__lede {
  margin: 0;
  color: var(--color-text-muted);
  font-size: 0.9375rem;
}
.modal__actions {
  display: flex;
  justify-content: flex-end;
  gap: var(--space-2);
  margin-top: var(--space-2);
}
@media (max-width: 480px) {
  .modal__actions { flex-direction: column-reverse; }
  .modal__actions .button { width: 100%; }
}

/* Browse filters --------------------------------------------------- */

.browse-layout {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: var(--space-5);
}
@media (max-width: 880px) {
  .browse-layout { grid-template-columns: 1fr; }
}

.filters {
  background: var(--color-surface);
  border: 1px solid var(--color-border-soft);
  border-radius: var(--radius-md);
  padding: var(--space-4);
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  position: sticky;
  top: 80px;
  min-width: 0;
}
@media (max-width: 880px) {
  .filters { position: static; }
}
.filters__group { border: 0; padding: 0; margin: 0; }
.filters__group legend {
  font-weight: 700;
  font-size: 0.9375rem;
  color: var(--color-navy);
  margin-bottom: var(--space-2);
  padding: 0;
}
.filters__price { display: flex; gap: var(--space-2); }
.filters__price label { display: flex; flex-direction: column; gap: 4px; flex: 1; font-size: 0.8125rem; color: var(--color-text-muted); }
.filters__price input {
  font: inherit;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  background: #fff;
  width: 100%;
  min-width: 0;
}
.filters__price input:focus {
  outline: none;
  border-color: var(--color-blue);
  box-shadow: 0 0 0 3px rgba(26,111,191,.18);
}
.filters__conditions {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.filter-check {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9375rem;
  color: var(--color-navy);
  cursor: pointer;
}
.filter-check input { accent-color: var(--color-blue); }
.filters__actions { display: flex; gap: var(--space-2); }

/* Sold badge ------------------------------------------------------- */

.listing-card__media,
.item-detail__media {
  position: relative;
  display: block;
}
.status-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background: var(--color-navy);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
}
.status-badge--sold { background: #b83232; }
.listing-card--sold .listing-card__title,
.listing-card--sold .listing-card__price {
  color: var(--color-text-muted);
}
.listing-card--sold img.image-tile { filter: saturate(0.4) brightness(0.92); }

/* Inbox + conversation -------------------------------------------- */

.inbox {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}
.inbox-row {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3);
  background: var(--color-surface);
  border: 1px solid var(--color-border-soft);
  border-radius: var(--radius-md);
  text-decoration: none;
  color: inherit;
  transition: background 120ms ease, border-color 120ms ease;
}
.inbox-row:hover { background: var(--color-surface-soft); border-color: var(--color-border); text-decoration: none; }
.inbox-row__image {
  width: 64px;
  height: 64px;
  border-radius: var(--radius-md);
  object-fit: cover;
  flex-shrink: 0;
  background: var(--color-surface-soft);
}
.inbox-row__image--emoji { display: grid; place-items: center; font-size: 1.5rem; }
.inbox-row__body { flex: 1; min-width: 0; }
.inbox-row__title { margin: 0; font-size: 0.9375rem; color: var(--color-navy); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.inbox-row__last { margin: 4px 0 0; color: var(--color-text); font-size: 0.875rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.inbox-row__meta { margin: 4px 0 0; color: var(--color-text-muted); font-size: 0.8125rem; }
.inbox-row__badge {
  background: var(--color-blue);
  color: #fff;
  font-weight: 700;
  font-size: 0.75rem;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  flex-shrink: 0;
}

.conversation {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  max-width: 760px;
  margin: 0 auto;
}
.conversation__listing {
  background: var(--color-surface);
  border: 1px solid var(--color-border-soft);
  border-radius: var(--radius-md);
  padding: var(--space-3) var(--space-4);
}
.conversation__listing-head { display: flex; gap: var(--space-3); align-items: center; }
.conversation__listing-image { width: 72px; height: 72px; border-radius: var(--radius-md); overflow: hidden; flex-shrink: 0; }
.conversation__listing-image img { width: 100%; height: 100%; object-fit: cover; display: block; }
.conversation__emoji { width: 100%; height: 100%; display: grid; place-items: center; font-size: 1.5rem; }
.conversation__listing-title { margin: 0; font-weight: 700; }
.conversation__listing-title a { color: var(--color-navy); }
.conversation__listing-meta { margin: 4px 0 0; color: var(--color-text-muted); font-size: 0.875rem; }
.conversation__messages {
  background: var(--color-surface);
  border: 1px solid var(--color-border-soft);
  border-radius: var(--radius-md);
  padding: var(--space-4);
  min-height: 240px;
  max-height: 60vh;
  overflow-y: auto;
}
.conversation__bubbles { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--space-3); }
.bubble {
  max-width: 75%;
  padding: var(--space-3) var(--space-4);
  border-radius: 18px;
  background: var(--color-surface-soft);
}
.bubble--mine { align-self: flex-end; background: var(--color-blue); color: #fff; border-bottom-right-radius: 4px; }
.bubble--mine .bubble__meta { color: rgba(255,255,255,0.85); }
.bubble--mine a { color: #fff; }
.bubble--theirs { align-self: flex-start; border-bottom-left-radius: 4px; }
.bubble__body { margin: 0; line-height: 1.45; white-space: pre-wrap; word-wrap: break-word; }
.bubble__meta { margin: 4px 0 0; font-size: 0.75rem; color: var(--color-text-muted); }
.bubble__offer { margin: 0 0 6px; font-size: 0.8125rem; }
.bubble--mine .bubble__offer { background: rgba(255,255,255,0.15); padding: 4px 10px; border-radius: var(--radius-pill); display: inline-block; }
.bubble--theirs .bubble__offer { background: rgba(245,166,35,0.18); color: #7a4a00; padding: 4px 10px; border-radius: var(--radius-pill); display: inline-block; }
.conversation__composer {
  display: flex;
  gap: var(--space-2);
  align-items: flex-end;
  background: var(--color-surface);
  border: 1px solid var(--color-border-soft);
  border-radius: var(--radius-md);
  padding: var(--space-3);
}
.conversation__composer textarea {
  flex: 1;
  font: inherit;
  resize: none;
  min-height: 60px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
}
.conversation__composer textarea:focus {
  outline: none;
  border-color: var(--color-blue);
  box-shadow: 0 0 0 3px rgba(26,111,191,.18);
}

/* Seller profile -------------------------------------------------- */

.seller-profile {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  background: var(--color-surface);
  border: 1px solid var(--color-border-soft);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  flex-wrap: wrap;
}
.seller-profile__avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--color-sky);
  color: var(--color-navy);
  display: grid;
  place-items: center;
  font-size: 1.5rem;
  font-weight: 700;
  font-family: var(--font-heading);
}
.seller-profile h1 { margin: 0; }
.seller-profile__rating { margin: 4px 0 0; font-weight: 600; color: var(--color-amber-dark); }
.seller-profile__bio { margin: var(--space-2) 0 0; color: var(--color-text-muted); }
.seller-profile__joined { margin: 4px 0 0; color: var(--color-text-muted); font-size: 0.875rem; }
.avatar-link { text-decoration: none; }

/* Profile owner controls ------------------------------------------ */

.profile-card { display: flex; flex-direction: column; }
.profile-card-controls {
  display: flex;
  gap: var(--space-2);
  padding: var(--space-2);
  border-top: 1px solid var(--color-border-soft);
  background: var(--color-surface);
  border-radius: 0 0 var(--radius-md) var(--radius-md);
  margin-top: -1px;
}
.profile-card-controls .button { flex: 1; padding: 8px 12px; font-size: 0.875rem; }
.button-danger { color: var(--color-danger); border-color: var(--color-border); }
.button-danger:hover { background: var(--color-danger-bg); color: var(--color-danger); }

/* Nav badge ------------------------------------------------------- */

.nav-badge {
  display: inline-grid;
  place-items: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  background: var(--color-blue);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  border-radius: var(--radius-pill);
  margin-left: 4px;
}
