:root {
  --bg: #ffffff;
  --bg-soft: #fafafa;
  --surface: #ffffff;
  --surface-2: #f4f4f4;
  --ink: #0a0a0a;
  --muted: #6b6b6b;
  --line: #e2e2e2;
  --line-soft: #ececec;

  --accent: #0a0a0a;      /* black — primary CTA */
  --accent-dark: #000000;
  --ink-invert: #ffffff;

  --green: #2f8a53;
  --red: #c73b3b;

  --success-bg: rgba(47, 138, 83, 0.08);
  --success-line: rgba(47, 138, 83, 0.3);
  --error-bg: rgba(199, 59, 59, 0.08);
  --error-line: rgba(199, 59, 59, 0.3);
  --info-bg: #f4f4f4;
  --info-line: var(--line);
  --vendor-bg: #f0f0f0;
  --vendor-ink: #444;

  --shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--ink);
}
a { color: var(--ink); text-decoration: none; }
a:hover { text-decoration: underline; }
main { max-width: 1160px; margin: 0 auto; padding: 1.5rem 1.25rem 3rem; }
h1 { font-size: 1.6rem; margin: 0.5rem 0 1rem; }
h2 { font-size: 1.1rem; margin: 1.75rem 0 0.5rem; }

/* ---------- top bar ---------- */
.topbar {
  position: relative;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}
.topbar-row {
  display: flex; align-items: center; gap: 1rem; flex-wrap: wrap;
  padding: 0.65rem 1.5rem;
}
.topbar-main { justify-content: space-between; }
.topbar-sub {
  padding-top: 0.5rem; padding-bottom: 0.5rem;
  background: var(--bg-soft);
  border-top: 1px solid var(--line-soft);
}
.brand { display: inline-flex; align-items: center; gap: 0.55rem; font-size: 1.25rem; font-weight: 800; color: var(--ink); letter-spacing: -0.01em; }
.brand:hover { text-decoration: none; }
.brand .accent { color: var(--ink); }
.brand-mark {
  width: 30px; height: 30px; object-fit: contain;
  flex-shrink: 0;
}
.brand-icon { margin-right: 0.15rem; }
.tagline { font-size: 0.75rem; font-weight: 400; color: var(--muted); margin-left: 0.4rem; }
.topbar-auth, .topbar-sub { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.nav-user { color: var(--muted); }

/* header search */
.header-search {
  display: flex; align-items: center; flex: 1; max-width: 460px;
  background: var(--bg); border: 1px solid var(--line); border-radius: 999px;
  padding: 0.25rem 0.3rem 0.25rem 0.9rem;
}
.header-search input {
  flex: 1; border: none; background: none; color: var(--ink); font-size: 0.92rem; padding: 0.25rem 0;
}
.header-search input::placeholder { color: var(--muted); }
.header-search input:focus { outline: none; }
.header-search button {
  border: none; cursor: pointer; border-radius: 999px; width: 34px; height: 34px;
  background: var(--ink); color: #fff; font-size: 0.95rem;
}
.btn-sm { padding: 0.35rem 0.85rem; font-size: 0.85rem; }

/* mega-menu: "Instrumentos" trigger + category panel */
.nav-instruments { position: relative; }
.nav-instruments-trigger {
  display: inline-flex; align-items: center; gap: 0.35rem;
  background: none; border: none; cursor: pointer;
  color: var(--ink); font-size: 1rem; font-family: inherit; padding: 0.2rem 0;
}
.nav-instruments-trigger .chevron { font-size: 0.7rem; color: var(--muted); transition: transform 0.15s; }
.nav-instruments:hover .chevron,
.nav-instruments.open .chevron { transform: rotate(180deg); }
.mega-panel {
  position: absolute; top: calc(100% + 14px); left: 0; z-index: 40;
  min-width: 260px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-top: 2px solid var(--ink);
  border-radius: 12px;
  box-shadow: var(--shadow);
  padding: 0.6rem;
  opacity: 0; visibility: hidden; transform: translateY(-6px);
  transition: opacity 0.15s ease, transform 0.15s ease, visibility 0.15s;
}
.nav-instruments:hover .mega-panel,
.nav-instruments.open .mega-panel {
  opacity: 1; visibility: visible; transform: translateY(0);
}
.mega-panel a {
  display: flex; align-items: center; gap: 0.6rem;
  padding: 0.5rem 0.6rem; border-radius: 8px;
  color: var(--ink); font-size: 0.92rem;
}
.mega-panel a:hover { text-decoration: none; background: var(--surface-2); }
.mega-panel .mega-icon { font-size: 1.1rem; }

/* ---------- buttons ---------- */
.btn {
  display: inline-block; border: none; cursor: pointer;
  padding: 0.6rem 1.15rem; border-radius: 8px;
  font-size: 0.95rem; font-weight: 600;
}
.btn:hover { text-decoration: none; }
.btn-accent, .btn-dark {
  background: var(--ink);
  color: #fff !important;
}
.btn-accent:hover, .btn-dark:hover { background: var(--accent-dark); }
.btn-outline {
  background: transparent; color: var(--ink) !important;
  border: 1px solid var(--ink);
}
.btn-outline:hover { background: var(--surface-2); }
.btn-bin { background: var(--ink); color: #fff; width: 100%; margin-top: 0.6rem; }
.btn-secondary { background: var(--surface-2); color: var(--ink); border: 1px solid var(--line); }
.btn-danger { background: var(--error-bg); color: var(--red); border: 1px solid var(--error-line); }

/* ---------- flashes ---------- */
.flashes { max-width: 1160px; margin: 0.75rem auto 0; padding: 0 1.25rem; }
.flash { padding: 0.65rem 1rem; border-radius: 8px; margin-bottom: 0.5rem; font-size: 0.95rem; border: 1px solid var(--line); }
.flash-success { background: var(--success-bg); color: #1e6e3f; border-color: var(--success-line); }
.flash-error { background: var(--error-bg); color: #a52b2b; border-color: var(--error-line); }
.flash-info, .flash-message { background: var(--info-bg); color: var(--ink); border-color: var(--info-line); }

/* ---------- hero ---------- */
.hero {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 3rem;
  padding: 3rem 0 2.5rem;
  margin: 0 0 1.5rem;
  border-bottom: 1px solid var(--line);
}
.hero-left { display: flex; flex-direction: column; justify-content: center; }
.hero-eyebrow {
  font-size: 0.78rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--muted); margin: 0 0 1rem;
}
.hero-title {
  font-size: clamp(2.4rem, 5.5vw, 3.6rem);
  font-weight: 800; line-height: 1.05; letter-spacing: -0.02em;
  margin: 0 0 1.1rem; color: var(--ink);
}
.hero-title .dim { color: #8a8a8a; }
.hero-subtitle { font-size: 1.02rem; line-height: 1.55; color: var(--muted); max-width: 460px; margin: 0 0 1.6rem; }
.hero-ctas { display: flex; gap: 0.75rem; margin-bottom: 2rem; flex-wrap: wrap; }
.hero-stats { display: flex; gap: 2.2rem; flex-wrap: wrap; }
.hero-stat { display: flex; flex-direction: column; }
.hero-stat strong { font-size: 1.6rem; font-weight: 800; color: var(--ink); }
.hero-stat span { font-size: 0.82rem; color: var(--muted); }

/* ---------- featured auction card (hero right) ---------- */
.hero-right { display: flex; flex-direction: column; }
.featured-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.75rem; }
.featured-eyebrow { font-size: 0.78rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.live-badge { display: inline-flex; align-items: center; gap: 0.4rem; font-size: 0.78rem; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; color: var(--ink); }
.live-dot-mark { width: 7px; height: 7px; border-radius: 50%; background: var(--ink); animation: blink 1.6s ease-in-out infinite; }
.featured-card { display: block; color: var(--ink); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.featured-card:hover { text-decoration: none; box-shadow: var(--shadow); }
.featured-img { aspect-ratio: 4/3; background: #111; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.featured-img img { width: 100%; height: 100%; object-fit: cover; }
.featured-img .placeholder { font-size: 4rem; opacity: 0.7; }
.featured-body { padding: 1.1rem 1.2rem 1.3rem; }
.featured-body h3 { margin: 0 0 0.9rem; font-size: 1.15rem; }
.featured-row { display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 1rem; }
.featured-label { font-size: 0.72rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); margin-bottom: 0.2rem; }
.featured-price { font-size: 1.5rem; font-weight: 800; }
.featured-end { text-align: right; }
.featured-countdown { font-size: 1.05rem; font-weight: 700; }
.featured-cta { width: 100%; text-align: center; }

/* ---------- section headers (shared) ---------- */
.section-head { display: flex; justify-content: space-between; align-items: flex-end; margin: 2.5rem 0 1rem; }
.section-eyebrow { font-size: 0.78rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); margin: 0 0 0.3rem; }
.section-title { font-size: 1.9rem; font-weight: 800; margin: 0; letter-spacing: -0.01em; }
.view-all { font-size: 0.9rem; font-weight: 600; color: var(--ink); white-space: nowrap; }

/* ---------- category pills ---------- */
.category-pills { display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 0.75rem 0 1.25rem; }
.pill {
  padding: 0.35rem 0.8rem; border-radius: 999px; font-size: 0.85rem;
  background: var(--bg); border: 1px solid var(--line); color: var(--ink);
}
.pill:hover { text-decoration: none; border-color: var(--ink); }
.pill-active { background: var(--ink); border-color: var(--ink); color: #fff; }

/* ---------- listing grid ---------- */
.grid {
  display: grid; gap: 1.1rem;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
}
.card {
  background: var(--bg); border: 1px solid var(--line); border-radius: 12px;
  overflow: hidden; color: var(--ink); display: flex; flex-direction: column;
  transition: box-shadow 0.15s, transform 0.15s, border-color 0.15s;
}
.card:hover {
  text-decoration: none; transform: translateY(-2px);
  border-color: var(--ink);
  box-shadow: var(--shadow);
}
.card-img {
  position: relative; aspect-ratio: 4/3; background: var(--surface-2);
  display: flex; align-items: center; justify-content: center; overflow: hidden;
}
.card-img img { width: 100%; height: 100%; object-fit: cover; }
.placeholder { font-size: 4rem; opacity: 0.6; }
.badge {
  position: absolute; top: 0.5rem; padding: 0.2rem 0.55rem; border-radius: 6px;
  font-size: 0.72rem; font-weight: 700; color: #fff;
  background: var(--ink);
}
.badge-bin { right: 0.5rem; }
.badge-reserve { left: 0.5rem; background: #fff; color: var(--ink); border: 1px solid var(--ink); }
.card-body { padding: 0.8rem 0.9rem 1rem; display: flex; flex-direction: column; gap: 0.25rem; }
.card-tag { font-size: 0.72rem; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; color: var(--muted); }
.card-body h3 { margin: 0; font-size: 0.98rem; line-height: 1.3; }
.card-meta { font-size: 0.83rem; color: var(--muted); }
.card-price { font-size: 1.2rem; font-weight: 800; color: var(--ink); }
.countdown.urgent { color: var(--red); font-weight: 700; }
.countdown.ended { color: var(--muted); }
.empty { text-align: center; color: var(--muted); padding: 3rem 0; }

/* ---------- how it works (dark section) ---------- */
.how-it-works {
  background: #0a0a0a; color: #fff;
  margin: 3rem calc(50% - 50vw) 0;
  padding: 3.5rem calc(50vw - 50% + 1.25rem);
}
.how-it-works .section-eyebrow { color: #9a9a9a; }
.how-title { font-size: clamp(1.7rem, 3.5vw, 2.3rem); font-weight: 800; margin: 0 0 2.5rem; letter-spacing: -0.01em; }
.how-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2.5rem; }
.how-num { font-size: 2.2rem; font-weight: 800; color: #4a4a4a; margin-bottom: 0.5rem; }
.how-step h3 { margin: 0 0 0.5rem; font-size: 1.15rem; }
.how-step p { margin: 0; color: #b5b5b5; line-height: 1.5; font-size: 0.95rem; }
@media (max-width: 720px) { .how-steps { grid-template-columns: 1fr; gap: 1.75rem; } }

/* ---------- listing detail ---------- */
.listing-page { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; align-items: start; }
@media (max-width: 800px) { .listing-page { grid-template-columns: 1fr; } }
@media (max-width: 900px) { .hero { grid-template-columns: 1fr; } }
.listing-gallery img#main-photo, .gallery-placeholder {
  width: 100%; aspect-ratio: 4/3; object-fit: cover;
  border-radius: 12px; border: 1px solid var(--line); background: var(--surface-2);
}
.gallery-placeholder { display: flex; align-items: center; justify-content: center; font-size: 7rem; }
.thumbs { display: flex; gap: 0.5rem; margin-top: 0.5rem; }
.thumbs img { width: 72px; height: 54px; object-fit: cover; border-radius: 6px; cursor: pointer; border: 1px solid var(--line); }
.listing-panel h1 { font-size: 1.35rem; }
.price-block {
  background: var(--bg-soft); border: 1px solid var(--line); border-radius: 12px;
  padding: 1rem 1.2rem; margin: 0.9rem 0;
}
.price-block.ended { background: var(--surface-2); }
.price-label { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); }
.price { font-size: 2rem; font-weight: 800; color: var(--ink); }
.time-left { margin-top: 0.4rem; font-weight: 600; }
.reserve-met { color: var(--green); font-weight: 600; }
.reserve-not-met { color: var(--red); font-weight: 600; }
.bid-form { margin: 1rem 0; }
.bid-form label { display: block; font-size: 0.9rem; margin-bottom: 0.35rem; }
.bid-row { display: flex; gap: 0.5rem; align-items: center; }
.bid-row .currency { font-weight: 700; font-size: 1.1rem; }
.bid-row input { flex: 1; padding: 0.55rem 0.8rem; border: 1px solid var(--line); border-radius: 8px; font-size: 1rem; background: var(--bg); color: var(--ink); }
.description { white-space: pre-line; }

/* ---------- tables ---------- */
.bid-table { width: 100%; border-collapse: collapse; background: var(--bg); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.bid-table th, .bid-table td { text-align: left; padding: 0.5rem 0.75rem; border-bottom: 1px solid var(--line); font-size: 0.92rem; }
.bid-table th { background: var(--surface-2); font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); }
.badge-inline { font-size: 0.72rem; font-weight: 700; padding: 0.1rem 0.45rem; border-radius: 6px; margin-left: 0.3rem; }
.badge-winning { background: var(--success-bg); color: #1e6e3f; }
.badge-outbid { background: var(--error-bg); color: #a52b2b; }
.badge-vendor { background: var(--vendor-bg); color: var(--vendor-ink); }

/* seller "manage this listing" row */
.manage-row { display: flex; gap: 0.6rem; margin: 0.75rem 0; }
.manage-row form { margin: 0; }

/* ---------- forms ---------- */
.form-page { max-width: 760px; margin: 0 auto; }
.form-page.narrow { max-width: 420px; }
.stacked-form { display: flex; flex-direction: column; gap: 0.9rem; background: var(--bg); border: 1px solid var(--line); border-radius: 12px; padding: 1.25rem; }
.stacked-form label { display: flex; flex-direction: column; gap: 0.3rem; font-size: 0.9rem; font-weight: 600; flex: 1; }
.stacked-form input, .stacked-form select, .stacked-form textarea {
  padding: 0.55rem 0.8rem; border: 1px solid var(--line); border-radius: 8px;
  font-size: 0.97rem; font-family: inherit; font-weight: 400;
  background: var(--bg); color: var(--ink);
}
.stacked-form input:focus, .stacked-form select:focus, .stacked-form textarea:focus {
  outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px rgba(10, 10, 10, 0.08);
}
.form-row { display: flex; gap: 0.9rem; flex-wrap: wrap; }
.stacked-form .btn { align-self: flex-start; }
.checkbox-field { flex-direction: row !important; align-items: center; gap: 0.5rem !important; }
.checkbox-field input { width: auto; }

.footer {
  text-align: center; color: var(--muted); font-size: 0.82rem; padding: 1.75rem;
  border-top: 1px solid var(--line);
}

/* ---------- language switch ---------- */
.lang-switch { display: inline-flex; gap: 0.15rem; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; }
.lang-switch a { padding: 0.2rem 0.5rem; font-size: 0.78rem; font-weight: 700; color: var(--muted); }
.lang-switch a:hover { text-decoration: none; background: var(--surface-2); }
.lang-switch a.lang-active { background: var(--ink); color: #fff; }

/* ---------- live connection dot (bid panel) ---------- */
.live-dot { font-size: 0.7rem; font-weight: 700; margin-left: 0.5rem; padding: 0.1rem 0.45rem; border-radius: 999px; vertical-align: middle; }
.live-dot.on { background: var(--success-bg); color: #1e6e3f; }
.live-dot.on::before { content: "● "; animation: blink 1.6s ease-in-out infinite; }
.live-dot.off { background: var(--surface-2); color: var(--muted); }
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0.25; } }

/* ---------- item specifics table ---------- */
.specs-table { width: 100%; border-collapse: collapse; background: var(--bg); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.specs-table th, .specs-table td { text-align: left; padding: 0.45rem 0.75rem; border-bottom: 1px solid var(--line); font-size: 0.9rem; }
.specs-table th { width: 40%; color: var(--muted); font-weight: 600; background: var(--surface-2); }

/* ---------- dashboard stats ---------- */
.stat-row { display: flex; gap: 1rem; flex-wrap: wrap; margin: 0.5rem 0 1rem; }
.stat { flex: 1; min-width: 130px; background: var(--bg); border: 1px solid var(--line); border-radius: 12px; padding: 1rem 1.2rem; }
.stat-num { font-size: 2rem; font-weight: 800; color: var(--ink); }
.stat-label { font-size: 0.82rem; color: var(--muted); }

/* ---------- photo uploader island ---------- */
.uploader-field .field-label { display: block; font-size: 0.9rem; font-weight: 600; margin-bottom: 0.4rem; }
.dropzone {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.4rem;
  padding: 1.6rem; border: 2px dashed var(--line); border-radius: 12px; background: var(--bg-soft);
  cursor: pointer; color: var(--muted); text-align: center; transition: border-color 0.15s, background 0.15s;
}
.dropzone:hover, .dropzone-over { border-color: var(--ink); background: var(--surface-2); color: var(--ink); }
.dropzone-icon { font-size: 1.8rem; }
.thumb-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 0.6rem; margin-top: 0.7rem; }
.thumb-item { position: relative; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: var(--surface-2); }
.thumb-item img { width: 100%; height: 90px; object-fit: cover; display: block; }
.thumb-cover { position: absolute; top: 4px; left: 4px; background: var(--ink); color: #fff; font-size: 0.65rem; font-weight: 700; padding: 0.1rem 0.4rem; border-radius: 4px; }
.thumb-from-phone { background: var(--surface-2); color: var(--muted); border: 1px solid var(--line); }
.qr-upload-box { display: flex; align-items: center; gap: 0.8rem; margin-top: 0.8rem; padding: 0.6rem;
                border: 1px solid var(--line); border-radius: 10px; background: var(--bg-soft); }
.qr-upload-box img { border-radius: 6px; background: #fff; padding: 4px; flex-shrink: 0; }
.qr-upload-box p { margin: 0; }
.thumb-actions { display: flex; justify-content: space-between; padding: 0.2rem; gap: 0.2rem; }
.thumb-actions button { border: none; background: var(--surface-2); color: var(--ink); border-radius: 5px; cursor: pointer; font-size: 0.8rem; padding: 0.15rem 0.4rem; }
.thumb-actions button:disabled { opacity: 0.35; cursor: default; }
.thumb-remove { display: flex !important; flex-direction: row !important; align-items: center; gap: 0.3rem !important;
               font-size: 0.75rem !important; font-weight: 400 !important; padding: 0.2rem 0.3rem; color: var(--muted); }
.thumb-remove input { width: auto; }
