@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root {
  --radius-sm: 8px;
  --radius: 10px;
  --radius-lg: 16px;
  --max-width: 1120px;

  --bg: #F6F7F9;
  --surface: #FFFFFF;
  --surface-2: #F3F4F6;
  --border: #E4E7EC;
  --text: #101828;
  --text-muted: #667085;
  --text-faint: #98A2B3;

  --accent: #16A34A;
  --accent-hover: #15803D;
  --accent-soft: #DCFCE7;
  --accent-contrast: #FFFFFF;

  --danger: #DC2626;
  --danger-soft: #FEE2E2;
  --success: #16A34A;
  --success-soft: #DCFCE7;
  --warning: #D97706;
  --warning-soft: #FEF3C7;
  --info: #4338CA;
  --info-soft: #E0E7FF;

  --shadow-sm: 0 1px 2px rgba(16, 24, 40, 0.06);
  --shadow-md: 0 4px 14px rgba(16, 24, 40, 0.08);
}

[data-theme="dark"] {
  --bg: #0B0D10;
  --surface: #15181D;
  --surface-2: #1C2027;
  --border: #282D35;
  --text: #F0F2F5;
  --text-muted: #9AA2B1;
  --text-faint: #6B7280;

  --accent: #22C55E;
  --accent-hover: #16A34A;
  --accent-soft: rgba(34, 197, 94, 0.16);
  --accent-contrast: #FFFFFF;

  --danger: #F87171;
  --danger-soft: rgba(248, 113, 113, 0.16);
  --success: #22C55E;
  --success-soft: rgba(34, 197, 94, 0.16);
  --warning: #FBBF24;
  --warning-soft: rgba(251, 191, 36, 0.14);
  --info: #818CF8;
  --info-soft: rgba(129, 140, 248, 0.16);

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.45);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 90px; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 15px;
  line-height: 1.55;
  transition: background 0.15s ease, color 0.15s ease;
}

h1, h2, h3, h4 {
  font-family: 'Inter', sans-serif;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 0 0 0.5em;
  color: var(--text);
}
h1 { font-size: 30px; }
h2 { font-size: 20px; }
h3 { font-size: 17px; }

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

img { max-width: 100%; display: block; }

.wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

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

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

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 14px;
  padding-bottom: 14px;
}

.logo {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}
.logo:hover { text-decoration: none; }
.logo-img { height: 28px; width: auto; display: block; }

.main-nav {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

.main-nav a {
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 500;
  font-size: 14px;
}
.main-nav a:hover { color: var(--text); text-decoration: none; }

.main-nav .pill {
  background: var(--accent);
  color: var(--accent-contrast);
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-weight: 600;
}
.main-nav .pill:hover { background: var(--accent-hover); color: var(--accent-contrast); }

.nav-user {
  color: var(--text-faint);
  font-size: 13px;
}

.notif-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  color: var(--text-muted);
}
.notif-link:hover { color: var(--text); }
.notif-link-mobile { display: none; }
.header-bar-actions { display: flex; align-items: center; gap: 14px; }
.notif-badge {
  position: absolute;
  top: -7px;
  right: -8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 16px;
  height: 16px;
  padding: 0 3px;
  border-radius: 999px;
  background: var(--danger);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
  border: 2px solid var(--surface);
}

.theme-toggle {
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text-muted);
  border-radius: var(--radius-sm);
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  line-height: 1;
}
.theme-toggle:hover { border-color: var(--accent); color: var(--text); }
.theme-toggle .icon-moon { display: none; }
[data-theme="dark"] .theme-toggle .icon-sun { display: none; }
[data-theme="dark"] .theme-toggle .icon-moon { display: block; }

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

.btn {
  display: inline-block;
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 14px;
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--accent);
  background: var(--accent);
  color: var(--accent-contrast);
  cursor: pointer;
  text-decoration: none;
  text-align: center;
  transition: background 0.12s ease, border-color 0.12s ease, transform 0.05s ease;
}
.btn:hover { background: var(--accent-hover); border-color: var(--accent-hover); text-decoration: none; }
.btn:active { transform: translateY(1px); }

.btn-amber { background: var(--accent); border-color: var(--accent); color: var(--accent-contrast); }
.btn-amber:hover { background: var(--accent-hover); border-color: var(--accent-hover); }

.btn-outline {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-outline:hover { border-color: var(--accent); color: var(--accent); background: var(--surface); }

.btn-block { display: block; width: 100%; }

.btn[disabled], .btn.disabled { opacity: 0.5; cursor: not-allowed; pointer-events: none; }

form label {
  display: block;
  font-weight: 600;
  font-size: 13px;
  margin-bottom: 6px;
  color: var(--text);
}

form .field { margin-bottom: 18px; }

input[type=text], input[type=email], input[type=password], input[type=number],
input[type=date], input[type=file], select, textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 14px;
  background: var(--surface);
  color: var(--text);
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
textarea { resize: vertical; min-height: 110px; }

.hint { font-size: 13px; color: var(--text-muted); margin-top: 4px; }

.form-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: 32px;
  max-width: 560px;
  margin: 40px auto;
}

.alert {
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  margin-bottom: 20px;
  font-weight: 500;
  font-size: 14px;
}
.alert-error { background: var(--danger-soft); color: var(--danger); }
.alert-success { background: var(--success-soft); color: var(--success); }

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

.hero {
  background-color: var(--surface);
  background-image:
    repeating-linear-gradient(135deg, var(--accent-soft) 0px, var(--accent-soft) 1px, transparent 1px, transparent 34px),
    radial-gradient(var(--border) 1.2px, transparent 1.2px);
  background-size: auto, 26px 26px;
  background-position: 0 0, 13px 13px;
  border-bottom: 1px solid var(--border);
  padding: 56px 0 44px;
}
.hero .wrap { display: flex; gap: 48px; align-items: center; flex-wrap: wrap; }
.hero-copy { flex: 1 1 420px; max-width: 640px; }
.hero h1 {
  font-size: 40px;
  line-height: 1.12;
  margin-bottom: 16px;
  letter-spacing: -0.02em;
}
.hero h1 em { color: var(--accent); font-style: normal; }
.hero p { font-size: 17px; max-width: 46ch; color: var(--text-muted); margin-bottom: 26px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }

/* ---------- Filters ---------- */

.filter-bar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  margin: 14px 0 22px;
}
.filter-bar select { width: auto; min-width: 180px; }
.filter-bar .count { margin-left: auto; font-size: 13px; color: var(--text-faint); }

/* ---------- Listing grid / cards ---------- */

.listing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 18px;
  margin: 22px 0 52px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: var(--text);
  transition: box-shadow 0.15s ease, transform 0.1s ease, border-color 0.15s ease;
}
.card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); border-color: var(--border); text-decoration: none; }

.card-image {
  height: 140px;
  background: var(--surface-2) center/cover no-repeat;
  position: relative;
  display: flex;
  align-items: flex-end;
}
.card-image .tag {
  background: var(--surface);
  color: var(--text);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  padding: 5px 10px;
  margin: 10px;
  border-radius: 999px;
  box-shadow: var(--shadow-sm);
}
.card-image .club-badge {
  background: rgba(16,24,40,0.72);
  color: #fff;
  font-size: 11px;
  padding: 5px 10px;
  margin: 10px;
  margin-left: auto;
  border-radius: 999px;
}

.card-body { padding: 16px 18px 18px; flex: 1; display: flex; flex-direction: column; }
.card-body h3 { font-size: 16px; margin-bottom: 4px; }
.card-body .club-line { font-size: 13px; color: var(--text-muted); margin-bottom: 14px; }

.card-stats {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}
.card-stats .bid-amount { font-size: 19px; font-weight: 700; color: var(--text); font-variant-numeric: tabular-nums; }
.card-stats .bid-label { font-size: 10px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--text-faint); }
.card-stats .time-left { font-size: 12px; font-weight: 600; color: var(--warning); text-align: right; }
.card-stats .time-left.ended { color: var(--text-faint); }

.empty-state {
  text-align: center;
  padding: 64px 20px;
  color: var(--text-muted);
}
.empty-state h3 { color: var(--text); }

/* ---------- Auction detail ---------- */

.auction-layout {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 36px;
  margin: 32px 0 56px;
  align-items: start;
}
@media (max-width: 860px) {
  .auction-layout { grid-template-columns: 1fr; }
}

.auction-image {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: var(--surface-2) center/cover no-repeat;
  border-radius: var(--radius-lg);
  margin-bottom: 20px;
  border: 1px solid var(--border);
}

.breadcrumb { font-size: 13px; color: var(--text-faint); margin: 24px 0 18px; }
.breadcrumb a { color: var(--text-muted); }

.auction-meta-line { font-size: 13px; color: var(--text-muted); margin-bottom: 18px; }
.auction-meta-line strong { color: var(--text); }
.auction-meta-line a { color: var(--text); font-weight: 600; }

.description-block { white-space: pre-line; line-height: 1.7; margin-bottom: 28px; color: var(--text); }

.share-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  font-family: inherit;
  font-weight: 600;
  font-size: 13px;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  cursor: pointer;
}
.share-btn:hover { border-color: var(--accent); color: var(--accent); }
.share-btn.copied { border-color: var(--success); color: var(--success); }
.share-btn.watching { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }

.bid-panel {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  position: sticky;
  top: 84px;
  box-shadow: var(--shadow-sm);
}
.bid-panel-header {
  background: var(--surface-2);
  color: var(--text);
  padding: 14px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border);
  font-weight: 600;
  font-size: 14px;
}
.bid-panel-header .status-live {
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: 999px;
}
.bid-panel-header .status-ended {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: 999px;
}
.bid-panel-header .status-cancelled {
  background: var(--danger-soft);
  color: var(--danger);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: 999px;
}
.bid-panel-body { background: var(--surface); padding: 22px; }

.current-bid-block { text-align: left; margin-bottom: 18px; }
.current-bid-block .label { font-size: 11px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--text-faint); }
.current-bid-block .amount { font-size: 36px; font-weight: 800; color: var(--text); line-height: 1.15; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.current-bid-block .sub { font-size: 13px; color: var(--text-muted); margin-top: 4px; }

.countdown { display: flex; gap: 8px; margin-bottom: 20px; }
.countdown .unit {
  flex: 1;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  text-align: center;
  padding: 8px 4px;
}
.countdown .unit .n { font-size: 20px; font-weight: 700; color: var(--text); display: block; font-variant-numeric: tabular-nums; }
.countdown .unit .u { font-size: 10px; text-transform: uppercase; color: var(--text-faint); }

.bid-history { margin-top: 24px; border-top: 1px solid var(--border); padding-top: 16px; }
.bid-history h4 { font-size: 12px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--text-faint); margin-bottom: 10px; }
.bid-history-row {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
}
.bid-history-row:last-child { border-bottom: none; }
.bid-history-row .amt { font-weight: 700; color: var(--text); font-variant-numeric: tabular-nums; }
.bid-history-row .who { color: var(--text-muted); }
.bid-history-row .when { color: var(--text-faint); font-size: 12px; }

.winner-banner {
  background: var(--success-soft);
  color: var(--success);
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  margin-bottom: 18px;
  font-size: 14px;
}

/* ---------- Dashboard ---------- */

.dash-header { margin: 32px 0 8px; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; }
.dash-tabs { display: flex; gap: 4px; margin: 22px 0; border-bottom: 1px solid var(--border); }
.dash-tabs a {
  padding: 10px 16px;
  text-decoration: none;
  font-weight: 600;
  font-size: 13px;
  color: var(--text-muted);
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}
.dash-tabs a:hover { color: var(--text); text-decoration: none; }
.dash-tabs a.active { color: var(--accent); border-bottom-color: var(--accent); }

table.data-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 40px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
table.data-table th, table.data-table td {
  text-align: left;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
}
table.data-table th {
  text-transform: uppercase;
  font-size: 10px;
  letter-spacing: 0.04em;
  color: var(--text-faint);
  background: var(--surface-2);
}
table.data-table tr:last-child td { border-bottom: none; }
table.data-table tr:hover td { background: var(--surface-2); }

@media (max-width: 720px) {
  table.data-table thead { display: none; }
  table.data-table, table.data-table tbody, table.data-table tr, table.data-table td {
    display: block;
    width: 100%;
  }
  table.data-table tr {
    border-bottom: 8px solid var(--bg);
    padding: 4px 0;
  }
  table.data-table tr:last-child { border-bottom: none; }
  table.data-table td {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    text-align: right;
    border-bottom: 1px solid var(--border);
  }
  table.data-table tr:last-child td:last-child { border-bottom: none; }
  table.data-table td::before {
    content: attr(data-label);
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-faint);
    text-align: left;
    flex-shrink: 0;
  }
}

.status-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  padding: 3px 10px;
  border-radius: 999px;
}
.status-badge.live { background: var(--warning-soft); color: var(--warning); }
.status-badge.closed { background: var(--surface-2); color: var(--text-muted); border: 1px solid var(--border); }
.status-badge.won { background: var(--success-soft); color: var(--success); }
.status-badge.cancelled { background: var(--danger-soft); color: var(--danger); }
.status-badge.draft { background: var(--info-soft); color: var(--info); }

.stat-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px,1fr)); gap: 14px; margin: 18px 0 34px; }
.stat-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 16px 18px; box-shadow: var(--shadow-sm); }
.stat-card .n { font-size: 26px; font-weight: 800; color: var(--text); letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.stat-card .l { font-size: 12px; color: var(--text-muted); }

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

.site-footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  margin-top: 60px;
  padding: 40px 0 44px;
  font-size: 13px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.4fr;
  gap: 28px;
}
.footer-col { display: flex; flex-direction: column; gap: 8px; }
.footer-col p { margin: 0; line-height: 1.6; }
.footer-brand { font-family: 'Inter', sans-serif; font-weight: 800; font-size: 16px; color: var(--text); }
.footer-heading {
  font-weight: 700;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-faint);
  margin-bottom: 2px;
}
.site-footer a { color: var(--text); text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }

@media (max-width: 720px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 460px) {
  .footer-grid { grid-template-columns: 1fr; }
}

.section-heading { display: flex; justify-content: space-between; align-items: baseline; margin: 40px 0 4px; }
.section-heading p { color: var(--text-muted); margin: 0; }

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

.profile-banner {
  height: 200px;
  background: var(--surface-2) center/cover no-repeat;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  margin-top: 24px;
  position: relative;
  z-index: 1;
}
.profile-identity {
  display: flex;
  align-items: flex-end;
  gap: 16px;
  margin: -40px 0 20px;
  padding: 0 6px;
  position: relative;
  z-index: 2;
}
.profile-avatar {
  width: 88px;
  height: 88px;
  object-fit: cover;
  background: var(--surface);
  border: 4px solid var(--surface);
  box-shadow: var(--shadow-md);
  flex-shrink: 0;
}
.profile-avatar.circle { border-radius: 50%; }
.profile-avatar.badge { border-radius: 14px; }
.profile-avatar.placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 30px;
  font-weight: 800;
  color: var(--accent);
  background: var(--accent-soft);
}
.profile-name-block { padding-bottom: 6px; }
.profile-name-block h1 { margin-bottom: 2px; font-size: 24px; }

/* ---------- City autocomplete ---------- */

.autocomplete-wrap { position: relative; }
.autocomplete-list {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-md);
  z-index: 30;
  max-height: 220px;
  overflow-y: auto;
}
.autocomplete-item {
  display: block;
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  border-bottom: 1px solid var(--border);
  padding: 10px 12px;
  font-family: inherit;
  font-size: 14px;
  color: var(--text);
  cursor: pointer;
}
.autocomplete-item:last-child { border-bottom: none; }
.autocomplete-item:hover { background: var(--surface-2); }

/* ---------- Listing gallery: horizontal swipeable row (mobile-app photo tray, not a one-at-a-time carousel) ---------- */

.gallery-scroll {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch;
  margin-bottom: 20px;
  padding-bottom: 2px;
}
.gallery-scroll::-webkit-scrollbar { height: 6px; }
.gallery-scroll::-webkit-scrollbar-thumb { background: var(--border); border-radius: 999px; }
.gallery-scroll .gallery-item {
  flex: 0 0 auto;
  width: 70%;
  max-width: 320px;
  aspect-ratio: 4 / 3;
  scroll-snap-align: start;
  background: var(--surface-2) center/cover no-repeat;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
}
@media (min-width: 640px) {
  .gallery-scroll .gallery-item { width: 240px; }
}

.listing-video {
  width: 100%;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  margin-bottom: 24px;
  background: #000;
}

/* ---------- Mobile nav ---------- */

.nav-toggle {
  display: none;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: var(--radius-sm);
  width: 36px;
  height: 36px;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-direction: column;
  gap: 4px;
}
.nav-toggle-bar {
  display: block;
  width: 16px;
  height: 2px;
  background: var(--text);
  border-radius: 1px;
}

/* ---------- News ---------- */

.news-post {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: 20px 22px;
  margin-bottom: 18px;
  position: relative;
}
.news-post-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  font-size: 13px;
  color: var(--text-muted);
  position: relative;
  z-index: 2;
}
.news-post-meta a { position: relative; z-index: 2; }
.news-post-title-link::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.news-post:hover { border-color: var(--accent); }

.news-post-meta img, .news-post-meta .initial {
  width: 28px; height: 28px; border-radius: 50%;
  object-fit: cover;
}
.news-post-meta .initial {
  display: flex; align-items: center; justify-content: center;
  background: var(--accent-soft); color: var(--accent); font-weight: 700; font-size: 12px;
}
.news-post-image {
  width: 100%;
  max-height: 320px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  margin: 12px 0;
}
.news-post-body { white-space: pre-line; line-height: 1.7; }

@media (max-width: 720px) {
  .nav-toggle { display: inline-flex; }
  .notif-link-mobile { display: inline-flex; }
  .notif-link-desktop { display: none; }
  .main-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-md);
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 6px 0;
  }
  .main-nav.nav-open { display: flex; }
  .main-nav a, .main-nav .nav-user {
    padding: 12px 24px;
    border-bottom: 1px solid var(--border);
    width: 100%;
  }
  .main-nav .pill { margin: 10px 24px; width: calc(100% - 48px); text-align: center; }
  .main-nav .theme-toggle { margin: 10px 24px; align-self: flex-start; }
  .site-header .wrap { position: relative; }
}

@media (max-width: 600px) {
  .hero h1 { font-size: 28px; }
  .form-card { padding: 22px; margin: 22px auto; }
  h1 { font-size: 24px; }

  .listing-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .card-image { height: 90px; }
  .card-image .tag, .card-image .club-badge, .boosted-badge { font-size: 7px; padding: 3px 7px; margin: 6px; }
  .card-body { padding: 10px 10px 12px; }
  .card-body h3 { font-size: 13px; margin-bottom: 2px; line-height: 1.3; }
  .card-body .club-line { font-size: 11px; margin-bottom: 8px; }
  .card-stats { padding-top: 8px; }
  .card-stats .bid-amount { font-size: 15px; }
  .card-stats .bid-label { font-size: 9px; }
  .card-stats .time-left { font-size: 10px; }
}

/* ---------- Pagination ---------- */

.pagination {
  display: flex;
  gap: 6px;
  justify-content: center;
  margin: 30px 0 50px;
}
.pagination a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  height: 34px;
  padding: 0 8px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-weight: 600;
  font-size: 13px;
  text-decoration: none;
}
.pagination a:hover { border-color: var(--accent); text-decoration: none; }
.pagination a.active { background: var(--accent); border-color: var(--accent); color: var(--accent-contrast); }

/* ---------- Boosted listings (gold upsell) ---------- */

.card.boosted {
  border-color: #E8B923;
  background: linear-gradient(180deg, rgba(232,185,35,0.08), transparent 40%);
  box-shadow: 0 0 0 1px rgba(232,185,35,0.35), var(--shadow-sm);
}
.boosted-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: linear-gradient(135deg, #F5D06B, #D9A521);
  color: #4A3400;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  padding: 5px 10px;
  margin: 10px;
  border-radius: 999px;
}

/* ---------- Upsell / boost / media pack panels ---------- */

.upsell-panel {
  background: linear-gradient(135deg, rgba(232,185,35,0.12), rgba(232,185,35,0.03));
  border: 1px solid #E8B923;
  border-radius: var(--radius-lg);
  padding: 22px 24px;
  margin: 20px 0;
}
.upsell-panel h3 { margin-bottom: 6px; }
.upsell-panel p { color: var(--text-muted); margin-bottom: 16px; }
.upsell-price {
  font-size: 26px;
  font-weight: 800;
  color: #A9791A;
  margin-bottom: 4px;
}

.media-pack-panel {
  border-radius: var(--radius-lg);
  padding: 26px;
  margin: 20px 0;
  border: 1px solid var(--border);
}
.media-pack-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  text-decoration: none;
}
.media-pack-badge:hover { border-color: var(--accent); text-decoration: none; }
.media-pack-badge.owned { border-color: #E8B923; color: #A9791A; }

.color-swatch-row { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 20px; }
.color-swatch-row .field { flex: 1 1 140px; margin-bottom: 0; }
input[type="color"] { height: 44px; padding: 4px; cursor: pointer; }

/* ---------- Admin / official news ---------- */

.news-post.official {
  border-color: var(--accent);
  background: linear-gradient(180deg, var(--accent-soft), transparent 45%);
}
.official-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--accent);
  color: var(--accent-contrast);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  padding: 3px 8px;
  border-radius: 999px;
}

/* ---------- Search bar ---------- */

.search-and-filters { margin-top: 28px; }
input.search-bar[type="text"] { font-size: 15px; padding: 13px 16px; width: 100%; }

/* ---------- Media thumbnails with remove button (create-listing.php) ---------- */

.media-thumb-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}
.media-thumb {
  position: relative;
  width: 84px;
  height: 84px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--surface-2);
}
.media-thumb img, .media-thumb video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.media-thumb-video { width: 140px; }
.media-thumb-file {
  width: auto;
  min-width: 160px;
  max-width: 240px;
  height: auto;
  padding: 10px 34px 10px 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--surface-2);
}
.media-thumb-file-icon { font-size: 20px; flex-shrink: 0; }
.media-thumb-file-name {
  font-size: 12px;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pdf-edit-row {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px;
  margin-bottom: 10px;
  position: relative;
}
.pdf-edit-row.marked-for-removal { opacity: 0.4; }
.pdf-edit-row-file {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  padding-right: 30px;
}
.pdf-edit-row-file a { font-size: 13px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pdf-edit-row .media-thumb-remove { top: 10px; right: 10px; }
.pdf-edit-row input[type="text"] { margin-bottom: 6px; font-size: 13px; padding: 8px 10px; }
.pdf-edit-row input[type="text"]:last-child { margin-bottom: 0; }
.media-thumb-remove {
  position: absolute;
  top: 3px;
  right: 3px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: none;
  background: rgba(16,24,40,0.75);
  color: #fff;
  font-size: 15px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.media-thumb-remove:hover { background: var(--danger); }
.media-thumb.marked-for-removal { opacity: 0.35; }
.media-thumb.marked-for-removal .media-thumb-remove { background: var(--success); }

/* ---------- Media pack fullscreen lightbox ---------- */

.mp-lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.92);
  z-index: 1000;
  align-items: center;
  justify-content: center;
}
.mp-lightbox.open { display: flex; }
.mp-lightbox-img {
  max-width: 90vw;
  max-height: 85vh;
  object-fit: contain;
  border-radius: 6px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}
.mp-lightbox-close {
  position: absolute;
  top: 20px;
  right: 24px;
  background: rgba(255,255,255,0.12);
  border: none;
  color: #fff;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  font-size: 22px;
  cursor: pointer;
  line-height: 1;
}
.mp-lightbox-close:hover { background: rgba(255,255,255,0.22); }
.mp-lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,0.12);
  border: none;
  color: #fff;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  font-size: 16px;
  cursor: pointer;
}
.mp-lightbox-nav:hover { background: rgba(255,255,255,0.22); }
.mp-lightbox-prev { left: 20px; }
.mp-lightbox-next { right: 20px; }
@media (max-width: 600px) {
  .mp-lightbox-nav { width: 38px; height: 38px; }
  .mp-lightbox-prev { left: 8px; }
  .mp-lightbox-next { right: 8px; }
}

/* ---------- Browse by category (homepage, above the footer) ---------- */

.category-browse {
  border-top: 1px solid var(--border);
  padding: 40px 0;
  margin-top: 20px;
}
.category-browse h2 { font-size: 18px; margin-bottom: 18px; }
.category-pills { display: flex; flex-wrap: wrap; gap: 10px; }
.category-pill {
  display: inline-block;
  padding: 8px 16px;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  text-decoration: none;
  background: var(--surface);
}
.category-pill:hover {
  border-color: var(--accent);
  color: var(--accent);
  text-decoration: none;
}
