/* ============================================================
   Rarecanvas Auctions — "classic auction house" theme.
   Built on the main site's dark, warm-near-black palette and
   violet brand accent, elevated with a champagne/gold accent,
   editorial serif display type and quieter, gallery-grade
   spacing. Same identity; dressed for the saleroom.
   ============================================================ */

:root {
  --bg:        #0b0d10;
  --bg-2:      #0e1013;
  --surface:   #121419;
  --surface-2: #171a20;
  --elev:      #1b1e25;
  --line:      #24262c;
  --line-soft: #2d3038;

  --ink:   #ecedef;
  --text:  #d7d9dd;
  --muted: #9aa0a6;
  --faint: #6b6f76;

  /* Brand violet (kept for continuity with the main site) */
  --accent:      #262ff8;
  --accent-ink:  #1c24d1;
  --accent-text: #8b93ff;
  --ring:        rgba(38,47,248,.35);

  /* Champagne/gold — the auction-house accent: prices, the hammer,
     numerals, hairline rules. */
  --gold:      #c9a96a;
  --gold-soft: #e4cc94;
  --gold-deep: #9a824a;

  --live:   #35d49a;
  --live-bg: rgba(53,212,154,.12);
  --soon:   #e0b341;
  --soon-bg: rgba(224,179,65,.12);
  --ended:  #8b9099;
  --ended-bg: rgba(139,144,153,.12);
  --sold:   #ff7ea8;
  --sold-bg: rgba(255,126,168,.12);

  --radius:    14px;
  --radius-lg: 20px;
  --container: 1280px;
  --shadow:    0 18px 48px rgba(0,0,0,.55);
  --shadow-sm: 0 2px 10px rgba(0,0,0,.4);

  --serif: 'Fraunces', Georgia, 'Times New Roman', serif;
  --sans:  'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
}

* { box-sizing: border-box; min-width: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background:
    radial-gradient(1200px 600px at 85% -8%, rgba(38,47,248,.10), transparent 60%),
    radial-gradient(900px 500px at -5% 0%, rgba(201,169,106,.06), transparent 55%),
    var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
a { color: var(--text); text-decoration: none; transition: color .15s ease; }
a:hover { color: var(--gold-soft); }
img { max-width: 100%; height: auto; display: block; }
hr { border: 0; border-top: 1px solid var(--line); margin: 28px 0; }

h1, h2, h3, h4 { font-family: var(--serif); font-weight: 600; letter-spacing: -.01em; color: var(--ink); line-height: 1.12; margin: 0 0 .4em; }
h1 { font-size: clamp(30px, 5vw, 52px); }
h2 { font-size: clamp(22px, 3vw, 30px); }

.container { max-width: var(--container); margin: 0 auto; padding: 0 20px; }
.muted { color: var(--muted); }
.eyebrow {
  display: inline-block; font-family: var(--sans); font-size: 11px; font-weight: 700;
  letter-spacing: .22em; text-transform: uppercase; color: var(--gold);
  margin: 0 0 12px;
}
.num { font-variant-numeric: tabular-nums; font-feature-settings: "tnum" 1; }

/* ---------------- Buttons ---------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--sans); font-weight: 600; font-size: 14px; line-height: 1;
  padding: 12px 20px; border-radius: 11px; border: 1px solid var(--line-soft);
  background: var(--surface-2); color: var(--ink); cursor: pointer;
  transition: transform .12s ease, background .15s ease, border-color .15s ease, box-shadow .15s ease;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); border-color: #3a3d46; color: var(--ink); }
.btn:active { transform: translateY(0); }
.btn-primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-ink); border-color: var(--accent-ink); color: #fff; box-shadow: 0 10px 28px var(--ring); }
.btn-gold {
  background: linear-gradient(180deg, var(--gold-soft), var(--gold));
  border-color: var(--gold-deep); color: #241c08; font-weight: 700;
}
.btn-gold:hover { color: #241c08; box-shadow: 0 10px 28px rgba(201,169,106,.3); }
.btn-ghost { background: transparent; }
.btn-block { width: 100%; }
.btn-lg { padding: 15px 24px; font-size: 15px; }
.btn[disabled], .btn.is-disabled { opacity: .5; pointer-events: none; }

/* ---------------- Header ---------------- */
.a-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(11,13,16,.82); backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.a-header .container { display: flex; align-items: center; gap: 22px; height: 68px; }
.a-brand { display: flex; align-items: center; gap: 11px; flex-shrink: 0; }
.a-brand img { width: 34px; height: 34px; border-radius: 8px; }
.a-brand .bt { font-family: var(--serif); font-weight: 600; font-size: 19px; color: var(--ink); letter-spacing: .01em; }
.a-brand .bt small { display: block; font-family: var(--sans); font-size: 9.5px; letter-spacing: .28em; text-transform: uppercase; color: var(--gold); font-weight: 700; margin-top: 1px; }
.a-nav { display: flex; align-items: center; gap: 4px; margin-left: 6px; }
.a-nav a { padding: 9px 13px; border-radius: 9px; font-size: 14px; font-weight: 500; color: var(--text); }
.a-nav a:hover { background: var(--surface-2); color: var(--ink); }
.a-nav a.active { color: var(--ink); background: var(--surface-2); }
.a-header-right { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.a-search { display: flex; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: 11px; padding: 0 6px 0 12px; height: 42px; }
.a-search input { background: transparent; border: 0; outline: none; color: var(--ink); font-size: 14px; width: 190px; font-family: var(--sans); }
.a-search input::placeholder { color: var(--faint); }
.a-search button { background: var(--surface-2); border: 0; color: var(--muted); height: 32px; width: 34px; border-radius: 8px; cursor: pointer; display: grid; place-items: center; }
.a-search button:hover { color: var(--gold-soft); }
.a-user { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--muted); }
.a-user b { color: var(--ink); font-weight: 600; }
.a-burger { display: none; background: var(--surface-2); border: 1px solid var(--line); color: var(--ink); width: 42px; height: 42px; border-radius: 10px; font-size: 18px; cursor: pointer; }

/* ---------------- Hero ---------------- */
.a-hero { position: relative; border-bottom: 1px solid var(--line); overflow: hidden; }
.a-hero .container { padding-top: 54px; padding-bottom: 46px; }
.a-hero h1 { max-width: 15ch; }
.a-hero h1 em { font-style: italic; color: var(--gold-soft); }
.a-hero p { max-width: 54ch; color: var(--muted); font-size: 17px; margin: 0 0 22px; }
.a-hero .hammer-rule { width: 64px; height: 2px; background: linear-gradient(90deg, var(--gold), transparent); margin: 0 0 20px; }

/* Stats strip */
.a-stats { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 30px; }
.a-stat { flex: 1 1 150px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; }
.a-stat .k { font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.a-stat .v { font-family: var(--serif); font-size: 26px; color: var(--ink); margin-top: 4px; }
.a-stat .v span { color: var(--gold); font-size: 15px; }

/* ---------------- Toolbar (tabs + sort) ---------------- */
.a-toolbar { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin: 34px 0 22px; }
.a-tabs { display: flex; gap: 6px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 5px; flex-wrap: wrap; }
.a-tabs a { padding: 9px 15px; border-radius: 8px; font-size: 13.5px; font-weight: 600; color: var(--muted); display: inline-flex; gap: 7px; align-items: center; }
.a-tabs a .cnt { font-size: 11px; background: var(--surface-2); color: var(--muted); border-radius: 20px; padding: 1px 7px; font-weight: 700; }
.a-tabs a.active { background: var(--accent); color: #fff; }
.a-tabs a.active .cnt { background: rgba(255,255,255,.2); color: #fff; }
.a-tabs a:hover:not(.active) { color: var(--ink); background: var(--surface-2); }
.a-sort { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.a-sort label { font-size: 13px; color: var(--muted); }
.a-select { background: var(--surface); border: 1px solid var(--line); color: var(--ink); border-radius: 10px; padding: 10px 12px; font-size: 13.5px; font-family: var(--sans); cursor: pointer; }

/* ---------------- Card grid ---------------- */
.a-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(248px, 1fr)); gap: 22px; }
.lot {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg);
  overflow: hidden; display: flex; flex-direction: column;
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.lot:hover { transform: translateY(-4px); border-color: var(--line-soft); box-shadow: var(--shadow); }
.lot-media { position: relative; aspect-ratio: 1 / 1; background: var(--bg-2); overflow: hidden; }
.lot-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.lot:hover .lot-media img { transform: scale(1.04); }
.lot-badge {
  position: absolute; top: 12px; left: 12px; z-index: 2;
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  padding: 5px 10px; border-radius: 20px; backdrop-filter: blur(6px);
}
.lot-badge .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.is-live  { color: var(--live);  background: var(--live-bg); }
.is-live .dot { animation: pulse 1.4s infinite; }
.is-soon  { color: var(--soon);  background: var(--soon-bg); }
.is-ended { color: var(--ended); background: var(--ended-bg); }
.is-sold  { color: var(--sold);  background: var(--sold-bg); }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .35; } }
.lot-watch {
  position: absolute; top: 10px; right: 10px; z-index: 2;
  width: 34px; height: 34px; border-radius: 50%; border: 0; cursor: pointer;
  background: rgba(11,13,16,.55); backdrop-filter: blur(6px); color: #fff;
  display: grid; place-items: center; transition: background .15s ease, color .15s ease;
}
.lot-watch:hover, .lot-watch.on { background: rgba(201,169,106,.9); color: #241c08; }
.lot-body { padding: 15px 16px 17px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.lot-title { font-family: var(--serif); font-size: 17px; color: var(--ink); line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lot-artist { font-size: 12.5px; color: var(--muted); margin-top: -4px; }
.lot-artist .vb { color: var(--accent-text); }
.lot-foot { margin-top: auto; display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; padding-top: 6px; border-top: 1px solid var(--line); }
.lot-price .k { font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--faint); display: block; }
.lot-price .v { font-family: var(--serif); font-size: 19px; color: var(--gold-soft); }
.lot-price .v .cur { font-size: 12px; color: var(--muted); font-family: var(--sans); }
.lot-timer { text-align: right; }
.lot-timer .k { font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--faint); display: block; }
.lot-timer .v { font-size: 14px; color: var(--text); font-weight: 600; }
.lot-timer.ending .v { color: var(--soon); }
.lot-bids { font-size: 12px; color: var(--muted); }

/* ---------------- Featured rail ---------------- */
.a-featured { margin: 10px 0 6px; }
.a-section-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 18px; gap: 12px; }
.a-section-head h2 { margin: 0; }
.a-section-head .link { font-size: 13px; color: var(--gold); font-weight: 600; }

/* ---------------- Empty state ---------------- */
.a-empty { text-align: center; padding: 70px 20px; border: 1px dashed var(--line-soft); border-radius: var(--radius-lg); color: var(--muted); }
.a-empty .big { font-family: var(--serif); font-size: 22px; color: var(--ink); margin-bottom: 8px; }

/* ---------------- Detail page ---------------- */
.a-detail { display: grid; grid-template-columns: 1.1fr .9fr; gap: 40px; padding: 36px 0 60px; align-items: start; }
.a-crumbs { font-size: 13px; color: var(--muted); padding-top: 22px; }
.a-crumbs a { color: var(--muted); }
.a-crumbs a:hover { color: var(--gold-soft); }
.a-stage { position: sticky; top: 90px; }
.a-stage-frame { border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; background: var(--bg-2); box-shadow: var(--shadow); position: relative; }
.a-stage-frame img { width: 100%; display: block; }
.a-stage-badge { position: absolute; top: 14px; left: 14px; }

.a-info .cat { font-size: 12px; letter-spacing: .16em; text-transform: uppercase; color: var(--gold); font-weight: 700; }
.a-info h1 { margin: 10px 0 10px; }
.a-artistline { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 14px; margin-bottom: 22px; }
.a-artistline b { color: var(--ink); }

/* Bid box */
.bidbox { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 22px; }
.bidbox .row { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.bidbox .lead-k { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.bidbox .lead-v { font-family: var(--serif); font-size: 40px; color: var(--gold-soft); line-height: 1; margin-top: 6px; }
.bidbox .lead-v .cur { font-size: 16px; color: var(--muted); font-family: var(--sans); margin-left: 4px; }
.bidbox .sub { font-size: 13px; color: var(--muted); margin-top: 8px; }
.bidbox .sub b { color: var(--text); }

.countdown { display: flex; gap: 8px; }
.cd-cell { background: var(--bg-2); border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; text-align: center; min-width: 52px; }
.cd-cell .n { font-family: var(--serif); font-size: 24px; color: var(--ink); line-height: 1; font-variant-numeric: tabular-nums; }
.cd-cell .l { font-size: 9.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--faint); margin-top: 5px; }
.countdown.ending .cd-cell .n { color: var(--soon); }

.reserve-tag { display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; font-weight: 600; padding: 6px 12px; border-radius: 20px; margin-top: 14px; }
.reserve-tag.met { color: var(--live); background: var(--live-bg); }
.reserve-tag.not { color: var(--soon); background: var(--soon-bg); }
.reserve-tag.none { color: var(--muted); background: var(--ended-bg); }

.bid-form { margin-top: 20px; }
.bid-input-wrap { display: flex; gap: 10px; }
.bid-input { flex: 1; display: flex; align-items: center; background: var(--bg-2); border: 1px solid var(--line-soft); border-radius: 12px; padding: 0 14px; }
.bid-input:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--ring); }
.bid-input .cur { color: var(--muted); font-weight: 700; font-size: 14px; }
.bid-input input { flex: 1; background: transparent; border: 0; outline: none; color: var(--ink); font-size: 20px; font-family: var(--serif); padding: 14px 10px; width: 100%; }
.quick-bids { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.quick-bids button { background: var(--surface-2); border: 1px solid var(--line); color: var(--text); border-radius: 9px; padding: 8px 12px; font-size: 13px; cursor: pointer; font-family: var(--sans); }
.quick-bids button:hover { border-color: var(--gold); color: var(--gold-soft); }
.buy-now { margin-top: 12px; }
.bid-note { font-size: 12.5px; color: var(--faint); margin-top: 12px; text-align: center; }
.flash { border-radius: 11px; padding: 12px 14px; font-size: 13.5px; margin-bottom: 16px; }
.flash.ok { background: var(--live-bg); color: var(--live); border: 1px solid rgba(53,212,154,.3); }
.flash.err { background: var(--sold-bg); color: var(--sold); border: 1px solid rgba(255,126,168,.3); }

.signin-cta { background: var(--surface-2); border: 1px dashed var(--line-soft); border-radius: 12px; padding: 18px; text-align: center; margin-top: 18px; }
.signin-cta p { margin: 0 0 12px; color: var(--muted); font-size: 14px; }

/* Ended / result panel */
.result-panel { background: linear-gradient(180deg, var(--surface), var(--surface-2)); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 24px; text-align: center; }
.result-panel .hammer { font-size: 30px; }
.result-panel .lead-k { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.result-panel .lead-v { font-family: var(--serif); font-size: 36px; color: var(--gold-soft); margin: 6px 0; }
.result-panel .winner { font-size: 14px; color: var(--text); }
.result-panel .winner b { color: var(--ink); }
.result-panel.nosale .lead-v { color: var(--ended); }

/* Meta list + description + bid history */
.a-block { margin-top: 32px; }
.a-block h3 { font-size: 18px; margin-bottom: 12px; }
.a-desc { color: var(--text); font-size: 15px; line-height: 1.7; }
.meta-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.meta-grid div { background: var(--surface); padding: 14px 16px; }
.meta-grid .k { font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--faint); }
.meta-grid .v { color: var(--ink); font-size: 15px; margin-top: 4px; font-weight: 600; }

.history { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.history table { width: 100%; border-collapse: collapse; font-size: 14px; }
.history th { text-align: left; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); font-weight: 600; padding: 12px 16px; background: var(--surface-2); border-bottom: 1px solid var(--line); }
.history td { padding: 13px 16px; border-bottom: 1px solid var(--line); color: var(--text); }
.history tr:last-child td { border-bottom: 0; }
.history tr.win td { background: rgba(201,169,106,.07); }
.history .amt { font-family: var(--serif); color: var(--gold-soft); font-size: 15px; }
.history .who { color: var(--ink); }
.history .win-tag { font-size: 10px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--gold); background: rgba(201,169,106,.12); padding: 2px 7px; border-radius: 12px; margin-left: 8px; }
.history .empty { padding: 26px; text-align: center; color: var(--muted); }

/* ---------------- Footer ---------------- */
.a-footer { border-top: 1px solid var(--line); margin-top: 40px; padding: 34px 0; color: var(--muted); font-size: 14px; }
.a-footer .container { display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap; }
.a-footer nav { display: flex; gap: 18px; flex-wrap: wrap; }
.a-footer a { color: var(--muted); }
.a-footer a:hover { color: var(--gold-soft); }

/* ---------------- Responsive ---------------- */
@media (max-width: 960px) {
  .a-detail { grid-template-columns: 1fr; gap: 26px; }
  .a-stage { position: static; }
}
@media (max-width: 760px) {
  .a-nav, .a-search { display: none; }
  .a-burger { display: grid; place-items: center; }
  .a-nav.open { display: flex; position: absolute; top: 68px; left: 0; right: 0; flex-direction: column; align-items: stretch; background: var(--bg-2); border-bottom: 1px solid var(--line); padding: 10px 16px 16px; gap: 2px; }
  .a-nav.open a { padding: 13px 10px; border-bottom: 1px solid var(--line); border-radius: 0; }
  .a-sort { margin-left: 0; width: 100%; }
  .meta-grid { grid-template-columns: 1fr; }
  .bidbox .lead-v { font-size: 32px; }
}
