:root {
  --market-ink: #1d2735;
  --market-muted: #687587;
  --market-blue: #3659d9;
  --market-blue-dark: #2848bd;
  --market-canvas: #f5f7fb;
  --market-line: #e8ecf3;
  --market-mint: #eaf5ef;
}

body {
  min-height: 100vh;
  color: var(--market-ink);
  background: var(--market-canvas);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
}

a {
  color: var(--market-blue);
}

a:hover {
  color: var(--market-blue-dark);
}

.marketplace-navbar {
  position: relative;
  z-index: 2;
  min-height: 72px;
  background: #fff;
  border-bottom: 1px solid var(--market-line);
}

.navbar-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--market-ink);
  letter-spacing: -0.03em;
}

.navbar-brand:hover {
  color: var(--market-ink);
}

.brand-mark {
  display: inline-grid;
  width: 34px;
  height: 34px;
  place-items: center;
  color: #fff;
  background: var(--market-blue);
  border-radius: 11px;
  font-size: 0.95rem;
}

.nav-links .nav-link {
  padding: 0.5rem 0.65rem;
  color: #536174;
  font-size: 0.94rem;
  font-weight: 500;
}

.nav-links .nav-link:hover {
  color: var(--market-blue);
}

.btn-primary {
  --bs-btn-bg: var(--market-blue);
  --bs-btn-border-color: var(--market-blue);
  --bs-btn-hover-bg: var(--market-blue-dark);
  --bs-btn-hover-border-color: var(--market-blue-dark);
  --bs-btn-active-bg: var(--market-blue-dark);
  --bs-btn-active-border-color: var(--market-blue-dark);
}

.market-hero {
  overflow: hidden;
  background:
    radial-gradient(circle at 90% 15%, rgba(84, 121, 236, 0.14), transparent 30%),
    linear-gradient(120deg, #fff 5%, #f0f3ff 100%);
  border: 1px solid #e7ebfa;
}

.market-hero h1 {
  max-width: 720px;
  letter-spacing: -0.045em;
}

.market-hero .lead {
  max-width: 610px;
  font-size: 1.08rem;
}

.eyebrow {
  color: var(--market-blue);
  font-size: 0.69rem;
  font-weight: 750;
  letter-spacing: 0.13em;
}

.hero-note {
  max-width: 340px;
  margin-left: auto;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(226, 231, 244, 0.9);
}

.hero-note-icon {
  display: inline-grid;
  width: 38px;
  height: 38px;
  margin-bottom: 1.1rem;
  place-items: center;
  color: var(--market-blue);
  background: #edf0ff;
  border-radius: 12px;
  font-size: 1.3rem;
}

.filter-panel,
.auth-panel,
.form-panel {
  border-radius: 18px;
}

.filter-panel .form-label {
  color: #49566a;
  font-size: 0.8rem;
  font-weight: 650;
}

.filter-panel .form-control,
.filter-panel .form-select {
  min-height: 44px;
}

.listing-card {
  overflow: hidden;
  border-radius: 16px;
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.listing-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 1rem 2rem rgba(35, 51, 82, 0.1) !important;
}

.listing-image-link {
  display: block;
  overflow: hidden;
  text-decoration: none;
}

.listing-image {
  width: 100%;
  height: 220px;
  object-fit: cover;
  background: #eef1f7;
  transition: transform 180ms ease;
}

.listing-card:hover .listing-image {
  transform: scale(1.025);
}

.listing-image-placeholder {
  display: grid;
  place-items: center;
  color: #66738a;
  background: linear-gradient(145deg, #eaf0fb, #f3f5fa);
  font-weight: 650;
}

.listing-title {
  color: var(--market-ink);
}

.listing-title:hover {
  color: var(--market-blue);
}

.listing-price,
.detail-price {
  color: var(--market-ink);
  font-size: 1.17rem;
  font-weight: 750;
  letter-spacing: -0.025em;
}

.currency-code {
  margin-right: 0.12em;
  color: var(--market-muted);
  font-size: 0.76em;
  font-weight: 600;
}

.condition-badge {
  color: #31704e;
  background: var(--market-mint);
}

.empty-state {
  background: #fff;
  border: 1px dashed #d9e0eb;
}

.empty-state-icon {
  color: #a4afc2;
  font-size: 2.4rem;
  line-height: 1;
}

.detail-image-wrap {
  display: grid;
  min-height: 340px;
  max-height: 620px;
  place-items: center;
  background: #eef1f7;
}

.detail-image {
  display: block;
  max-width: 100%;
  max-height: 620px;
  object-fit: contain;
}

.detail-image-placeholder {
  color: #66738a;
  font-size: 1.25rem;
  font-weight: 650;
}

.detail-price {
  font-size: 1.65rem;
}

.listing-description {
  color: #465367;
  line-height: 1.75;
  white-space: pre-line;
}

.seller-panel {
  background: #fff;
  border: 1px solid var(--market-line);
}

.back-link {
  color: #576579;
  font-size: 0.93rem;
  text-decoration: none;
}

.back-link:hover {
  color: var(--market-blue);
}

.auth-panel,
.form-panel {
  background: #fff;
}

.auth-panel a {
  font-weight: 600;
  text-decoration: none;
}

.auth-panel a:hover {
  text-decoration: underline;
}

.password-hint {
  margin-top: -0.75rem;
}

.current-image {
  width: min(100%, 360px);
  max-height: 260px;
  object-fit: cover;
}

.site-footer {
  color: #788496;
  background: #fff;
  border-top: 1px solid var(--market-line);
  font-size: 0.88rem;
}

@media (max-width: 575.98px) {
  .marketplace-navbar {
    padding-block: 0.7rem;
  }

  .nav-links {
    width: 100%;
  }

  .market-hero {
    padding: 1.35rem !important;
  }

  .market-hero h1 {
    font-size: 2.2rem;
  }

  .listing-image {
    height: 205px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
