/* PokéBay — Early 2000s eBay-inspired stylesheet */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --blue: #003087;
  --blue-dark: #00236e;
  --blue-light: #dce6f5;
  --red: #CC0000;
  --red-dark: #990000;
  --yellow: #f5af02;
  --green: #3a7d44;
  --gray-100: #f5f5f5;
  --gray-200: #e8e8e8;
  --gray-300: #d3d3d3;
  --gray-400: #b0b0b0;
  --gray-500: #767676;
  --gray-700: #444;
  --gray-900: #111;
  --white: #fff;
  --border: 1px solid var(--gray-300);
  --radius: 3px;
  --font: Arial, Helvetica, sans-serif;
  --font-sm: 12px;
  --font-base: 13px;
  --font-md: 14px;
  --shadow: 0 1px 3px rgba(0,0,0,.12);
  --shadow-md: 0 2px 8px rgba(0,0,0,.15);
}

html { font-size: var(--font-base); font-family: var(--font); color: var(--gray-900); background: var(--gray-100); }
body { min-height: 100vh; display: flex; flex-direction: column; }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
p { line-height: 1.6; margin-bottom: 0.75em; }
h1,h2,h3,h4 { font-family: var(--font); font-weight: bold; }
ul { list-style: none; }

/* ── Container ── */
.container { max-width: 1200px; margin: 0 auto; padding: 0 12px; }

/* ── Top Bar ── */
.topbar { background: var(--gray-900); color: #ccc; font-size: 11px; padding: 4px 0; }
.topbar-inner { max-width: 1200px; margin: 0 auto; padding: 0 12px; display: flex; justify-content: space-between; align-items: center; }
.topbar a { color: #aad4f5; }
.topbar a:hover { color: #fff; text-decoration: underline; }
.topbar-right { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }

/* ── Header ── */
.site-header {
  background: linear-gradient(180deg, #ffffff 0%, #f0f4fc 60%, #e4ecf8 100%);
  border-bottom: 3px solid var(--red);
  padding: 10px 0;
  box-shadow: 0 2px 6px rgba(0,48,135,.12);
}
.header-inner { max-width: 1200px; margin: 0 auto; padding: 0 12px; display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }

/* Logo */
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; flex-shrink: 0; }
.logo:hover { text-decoration: none; opacity: .92; }
.logo-icon { width: 42px; height: 42px; flex-shrink: 0; border-radius: 4px; }
.logo-block { display: flex; flex-direction: column; justify-content: center; gap: 1px; }
.logo-ball { width: 38px; height: 38px; flex-shrink: 0; filter: drop-shadow(0 1px 3px rgba(0,0,0,.35)); }
.logo-text { display: flex; align-items: baseline; line-height: 1; }
.logo-poke { font-size: 28px; font-weight: 900; color: var(--blue); letter-spacing: -1px; font-family: Impact, Arial Black, sans-serif; }
.logo-bay  { font-size: 28px; font-weight: 900; color: var(--red);  letter-spacing: -1px; font-family: Impact, Arial Black, sans-serif; }
.logo-tag { font-size: 9px; color: var(--gray-500); text-transform: uppercase; letter-spacing: .7px; white-space: nowrap; display: none; }
@media(min-width:640px) { .logo-tag { display: block; } }

/* Search bar */
.header-search { flex: 1; display: flex; min-width: 200px; }
.header-search input { flex: 1; padding: 9px 13px; border: 2px solid var(--gray-300); border-right: none; border-radius: var(--radius) 0 0 var(--radius); font-size: 14px; outline: none; }
.header-search input:focus { border-color: var(--blue); }
.header-search button { padding: 9px 20px; background: var(--blue); color: var(--white); border: 2px solid var(--blue-dark); border-left: none; border-radius: 0 var(--radius) var(--radius) 0; cursor: pointer; font-size: 14px; font-weight: bold; white-space: nowrap; letter-spacing: .3px; }
.header-search button:hover { background: var(--blue-dark); }
.header-actions { flex-shrink: 0; }

/* ── Nav ── */
.main-nav { background: linear-gradient(180deg, var(--blue) 0%, var(--blue-dark) 100%); border-bottom: 2px solid var(--red); }
.nav-inner { max-width: 1200px; margin: 0 auto; padding: 0 12px; display: flex; justify-content: space-between; overflow-x: auto; }
.nav-links { display: flex; }
.nav-links li a { display: block; color: var(--white); font-size: 12px; font-weight: bold; padding: 9px 13px; white-space: nowrap; opacity: .92; letter-spacing: .2px; }
.nav-links li a:hover { opacity: 1; background: rgba(255,255,255,.12); text-decoration: none; color: #fff; }
.nav-links li:first-child a { border-left: none; }

/* ── Flash ── */
.flash { padding: 10px 0; font-size: 13px; font-weight: bold; }
.flash .container { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.flash-success { background: #d4edda; color: #155724; border-bottom: 1px solid #c3e6cb; }
.flash-error { background: #f8d7da; color: #721c24; border-bottom: 1px solid #f5c6cb; }
.flash-close { background: none; border: none; font-size: 18px; cursor: pointer; color: inherit; padding: 0 4px; }

/* ── Main Content ── */
.main-content { flex: 1; padding: 20px 0; }

/* ── Buttons ── */
.btn { display: inline-block; padding: 7px 16px; border-radius: var(--radius); font-size: 13px; font-weight: bold; cursor: pointer; border: 1px solid transparent; text-decoration: none; line-height: 1.4; transition: background .1s; white-space: nowrap; }
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--blue); color: var(--white); border-color: var(--blue-dark); }
.btn-primary:hover { background: var(--blue-dark); }
.btn-secondary { background: var(--gray-200); color: var(--gray-700); border-color: var(--gray-300); }
.btn-secondary:hover { background: var(--gray-300); }
.btn-danger { background: var(--red); color: var(--white); border-color: var(--red-dark); }
.btn-danger:hover { background: var(--red-dark); }
.btn-bid { background: var(--green); color: var(--white); border-color: #2a5c32; padding: 9px 20px; font-size: 14px; }
.btn-bid:hover { background: #2a5c32; }
.btn-buy { background: linear-gradient(180deg, #ffd140 0%, #f5af02 100%); color: #111; border: 2px solid #b88a00; padding: 12px 24px; font-size: 16px; font-weight: 900; letter-spacing: .3px; box-shadow: 0 2px 4px rgba(0,0,0,.2); }
.btn-buy:hover { background: linear-gradient(180deg, #ffda55 0%, #dda000 100%); }
.btn-full { width: 100%; display: block; text-align: center; }
.btn-lg { padding: 10px 24px; font-size: 15px; }
.btn-sm { padding: 4px 10px; font-size: 11px; }
.btn-link { color: var(--blue); background: none; border: none; cursor: pointer; padding: 0; font-size: 12px; }
.btn-back { font-size: 12px; }
.btn-hero-primary { background: var(--white); color: var(--blue); padding: 10px 24px; font-size: 15px; border-color: var(--white); }
.btn-hero-primary:hover { background: var(--blue-light); }
.btn-hero-secondary { background: transparent; color: var(--white); border-color: rgba(255,255,255,.6); padding: 10px 24px; font-size: 15px; }
.btn-hero-secondary:hover { background: rgba(255,255,255,.15); }

/* ── Hero Banner ── */
.hero-banner { background: linear-gradient(135deg, var(--blue-dark) 0%, var(--blue) 55%, #1a4ab0 100%); color: var(--white); border-radius: 4px; padding: 28px 24px; margin-bottom: 24px; display: flex; gap: 24px; align-items: center; flex-wrap: wrap; border-left: 5px solid var(--red); box-shadow: var(--shadow-md); }
.hero-content { flex: 1; min-width: 200px; }
.hero-content h1 { font-size: 24px; margin-bottom: 10px; line-height: 1.2; }
.hero-content p { font-size: 14px; opacity: .9; margin-bottom: 16px; }
.hero-buttons { display: flex; gap: 10px; flex-wrap: wrap; }
.hero-stats { display: flex; gap: 16px; flex-wrap: wrap; }
.stat-box { background: rgba(255,255,255,.15); border-radius: 4px; padding: 12px 20px; text-align: center; min-width: 80px; }
.stat-num { display: block; font-size: 22px; font-weight: 900; }
.stat-label { display: block; font-size: 11px; opacity: .85; margin-top: 2px; }

/* ── Sections ── */
.section { margin-bottom: 28px; }
.section-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; border-bottom: 2px solid var(--blue); padding-bottom: 8px; }
.section-header h2 { font-size: 16px; color: var(--gray-900); }
.see-all { font-size: 12px; color: var(--blue); }

/* ── Set Chips ── */
.set-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { padding: 4px 12px; background: var(--white); border: var(--border); border-radius: 20px; font-size: 12px; color: var(--blue); }
.chip:hover { background: var(--blue); color: var(--white); border-color: var(--blue); text-decoration: none; }

/* ── Listings Grid ── */
.listings-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; }
.listings-grid-sm { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
.listing-card { background: var(--white); border: var(--border); border-radius: 4px; overflow: hidden; text-decoration: none; color: inherit; display: block; transition: box-shadow .15s, border-color .15s; }
.listing-card:hover { box-shadow: var(--shadow-md); border-color: var(--blue); text-decoration: none; }
.listing-thumb { position: relative; width: 100%; padding-top: 110%; background: var(--gray-100); overflow: hidden; }
.listing-thumb img { position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: contain; padding: 6px; }
.no-image { position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%); font-size: 11px; color: var(--gray-400); text-align: center; }
.no-image-large { background: var(--gray-100); border: var(--border); border-radius: 4px; display: flex; align-items: center; justify-content: center; min-height: 300px; color: var(--gray-400); font-size: 14px; }
.listing-info { padding: 8px; }
.listing-title { font-size: 12px; font-weight: bold; color: var(--gray-900); line-height: 1.3; margin-bottom: 5px; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.listing-meta { display: flex; gap: 4px; margin-bottom: 5px; flex-wrap: wrap; }
.listing-price { font-size: 13px; margin-bottom: 3px; }
.listing-price strong { color: var(--red); }
.listing-seller { font-size: 11px; color: var(--gray-500); }
.price-label { font-size: 11px; color: var(--gray-500); }
.buy-now-label { font-size: 10px; color: var(--green); margin-left: 4px; }

/* ── Badges ── */
.badge { position: absolute; top: 4px; left: 4px; font-size: 9px; font-weight: bold; padding: 2px 5px; border-radius: 2px; text-transform: uppercase; }
.badge-auction { background: var(--red); color: var(--white); }
.badge-psa { background: #1a56db; color: var(--white); left: auto; right: 4px; }
.condition-badge { display: inline-block; font-size: 10px; font-weight: bold; padding: 1px 5px; border-radius: 2px; background: var(--gray-200); color: var(--gray-700); }
.condition-nm { background: #d4edda; color: #155724; }
.condition-lp { background: #cce5ff; color: #004085; }
.condition-mp { background: #fff3cd; color: #856404; }
.condition-hp { background: #f8d7da; color: #721c24; }
.condition-raw { background: var(--gray-200); color: var(--gray-700); }
.set-code { font-size: 10px; color: var(--gray-500); background: var(--gray-100); padding: 1px 4px; border-radius: 2px; }
.status-badge { display: inline-block; font-size: 10px; font-weight: bold; padding: 2px 6px; border-radius: 2px; text-transform: uppercase; }
.status-active { background: #d4edda; color: #155724; }
.status-sold { background: var(--gray-200); color: var(--gray-500); }
.status-removed { background: #f8d7da; color: #721c24; }
.status-ended { background: #fff3cd; color: #856404; }
.set-code-badge { display: inline-block; font-size: 11px; background: var(--blue-light); color: var(--blue); padding: 2px 6px; border-radius: 2px; font-weight: bold; }
.psa-badge { display: inline-block; font-size: 11px; background: #1a56db; color: var(--white); padding: 2px 6px; border-radius: 2px; font-weight: bold; }
.rarity-badge { display: inline-block; font-size: 11px; background: #f3e8ff; color: #6b21a8; padding: 2px 6px; border-radius: 2px; }

/* ── Auction Timer ── */
.auction-timer { font-size: 10px; color: var(--red); margin-top: 3px; }
.auction-timer-large { background: #fff3cd; border: 1px solid #ffc107; border-radius: 3px; padding: 8px 12px; font-weight: bold; color: #856404; text-align: center; margin: 10px 0; font-size: 14px; }

/* ── How It Works ── */
.how-it-works { background: var(--white); border: var(--border); border-radius: 4px; padding: 24px; }
.how-it-works h2 { font-size: 16px; margin-bottom: 20px; text-align: center; }
.steps-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 20px; }
.step { text-align: center; }
.step-num { width: 36px; height: 36px; background: var(--blue); color: var(--white); font-size: 18px; font-weight: 900; border-radius: 50%; display: flex; align-items: center; justify-content: center; margin: 0 auto 10px; }
.step h3 { font-size: 13px; margin-bottom: 6px; }
.step p { font-size: 12px; color: var(--gray-500); }

/* ── Auth ── */
.auth-page { display: flex; justify-content: center; padding: 20px 0; }
.auth-box { background: var(--white); border: var(--border); border-radius: 4px; padding: 28px 32px; width: 100%; max-width: 440px; box-shadow: var(--shadow); }
.auth-box h1 { font-size: 20px; margin-bottom: 6px; }
.auth-sub { font-size: 12px; color: var(--gray-500); margin-bottom: 20px; }
.auth-form { display: flex; flex-direction: column; gap: 14px; }
.auth-divider { border: none; border-top: var(--border); margin: 20px 0; }
.auth-links { font-size: 11px; color: var(--gray-500); text-align: center; }
.auth-note { font-size: 11px; color: var(--gray-400); margin-top: 14px; text-align: center; }
.age-warning-box { display: flex; gap: 12px; background: #fff8e1; border: 2px solid #f59e0b; border-radius: 6px; padding: 14px 16px; margin-bottom: 18px; }
.age-warning-icon { font-size: 22px; flex-shrink: 0; line-height: 1.2; }
.age-warning-text { flex: 1; font-size: 12px; color: #78350f; line-height: 1.55; }
.age-warning-text > strong { display: block; font-size: 13px; margin-bottom: 6px; color: #92400e; }
.age-warning-text p strong { display: inline; font-size: inherit; color: #92400e; }
.age-warning-text p { margin: 0 0 6px; }
.age-warning-text p:last-child { margin-bottom: 0; }
.age-warning-text a { color: #b45309; }
.age-confirm-check { background: #fffbeb; border: 1px solid #fcd34d; border-radius: 4px; padding: 10px 12px; }
.age-confirm-check label { font-size: 12px; color: #78350f; line-height: 1.5; }
.auth-box { background: var(--white); border: var(--border); border-radius: 4px; padding: 28px 32px; width: 100%; max-width: 500px; box-shadow: var(--shadow); }

/* ── Forms ── */
.form-group { display: flex; flex-direction: column; gap: 4px; }
.form-group label { font-size: 12px; font-weight: bold; color: var(--gray-700); }
.form-group label small { font-weight: normal; color: var(--gray-500); }
.form-group input[type=text], .form-group input[type=email], .form-group input[type=password],
.form-group input[type=number], .form-group input[type=datetime-local],
.form-group select, .form-group textarea {
  padding: 8px 10px; border: var(--border); border-radius: var(--radius); font-size: 13px; font-family: var(--font); outline: none; width: 100%; background: var(--white);
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus { border-color: var(--blue); box-shadow: 0 0 0 2px rgba(0,100,210,.12); }
.form-group textarea { resize: vertical; }
.form-group small { font-size: 11px; color: var(--gray-500); }
.form-check { flex-direction: row; gap: 8px; align-items: flex-start; }
.form-check input { width: auto; margin-top: 2px; }
.required { color: var(--red); }
.form-row { margin-bottom: 0; }
.form-row.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-row.three-col { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; }
@media(max-width:600px) { .form-row.two-col, .form-row.three-col { grid-template-columns: 1fr; } }
.form-section { background: var(--white); border: var(--border); border-radius: 4px; padding: 18px 20px; margin-bottom: 16px; }
.form-section h3 { font-size: 14px; color: var(--blue-dark); margin-bottom: 14px; padding-bottom: 8px; border-bottom: 1px solid var(--gray-200); }
.form-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 16px; }
.form-note { font-size: 11px; color: var(--gray-400); margin-top: 12px; }
.input-prefix { display: flex; }
.input-prefix span { padding: 8px 10px; background: var(--gray-100); border: var(--border); border-right: none; border-radius: var(--radius) 0 0 var(--radius); font-weight: bold; color: var(--gray-700); }
.input-prefix input { border-radius: 0 var(--radius) var(--radius) 0; }
.checkbox-label { display: flex; gap: 8px; align-items: center; font-size: 12px; font-weight: normal; cursor: pointer; }
.auction-toggle-label { margin-top: 28px; }

/* ── Upload Area ── */
.upload-area { display: flex; flex-direction: column; align-items: center; gap: 6px; border: 2px dashed var(--gray-300); border-radius: 4px; text-align: center; padding: 28px 20px; background: var(--gray-100); cursor: pointer; transition: border-color .2s, background .2s; }
.upload-area:hover, .upload-area.drag-over { border-color: var(--blue); background: #e8f0fb; }
.upload-area input[type=file] { display: none; }
.upload-icon { font-size: 32px; line-height: 1; }
.upload-cta { font-size: 14px; color: var(--blue); font-weight: bold; }
.upload-hint { font-size: 11px; color: var(--gray-500); }
.upload-status { font-size: 12px; color: var(--gray-700); font-weight: bold; min-height: 16px; }
.image-previews { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.image-previews:empty { display: none; }
.preview-thumb { position: relative; width: 110px; height: 130px; border: 2px solid var(--gray-300); border-radius: 4px; overflow: hidden; background: var(--gray-100); flex-shrink: 0; cursor: grab; user-select: none; }
.preview-thumb:active { cursor: grabbing; }
.preview-thumb.dragging { opacity: .4; border-style: dashed; }
.preview-thumb img { width: 100%; height: 90px; object-fit: cover; display: block; }
.preview-thumb-label { position: absolute; bottom: 18px; left: 0; right: 0; background: rgba(0,0,0,.65); color: #fff; font-size: 10px; padding: 3px 4px; text-align: center; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.preview-thumb-num { position: absolute; top: 3px; left: 3px; background: var(--blue); color: #fff; font-size: 10px; font-weight: bold; width: 18px; height: 18px; border-radius: 50%; display: flex; align-items: center; justify-content: center; z-index: 2; }
.preview-thumb-x { position: absolute; bottom: 0; left: 0; right: 0; height: 18px; background: #c00; color: #fff; font-size: 11px; font-weight: bold; border: none; cursor: pointer; padding: 0; line-height: 18px; text-align: center; }
.preview-thumb-x:hover { background: #900; }
.sort-thumb-cover { position: absolute; top: 3px; right: 3px; background: #c8860a; color: #fff; font-size: 9px; font-weight: bold; padding: 2px 5px; border-radius: 3px; text-transform: uppercase; letter-spacing: .5px; z-index: 2; pointer-events: none; }
/* Sortable existing images in edit form */
.sort-images { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 14px; }
.sort-thumb { position: relative; width: 110px; background: var(--gray-100); border: 2px solid var(--gray-300); border-radius: 4px; overflow: hidden; flex-shrink: 0; cursor: grab; user-select: none; }
.sort-thumb:active { cursor: grabbing; }
.sort-thumb.dragging { opacity: .35; border-style: dashed; }
.sort-thumb img { width: 100%; height: 90px; object-fit: cover; display: block; }
.sort-handle { text-align: center; font-size: 16px; color: var(--gray-500); padding: 3px 0 1px; line-height: 1; background: var(--gray-200); cursor: grab; letter-spacing: 2px; }
.sort-handle:active { cursor: grabbing; }
.sort-thumb-remove { display: flex; align-items: center; justify-content: center; gap: 4px; font-size: 11px; color: #c00; padding: 4px 4px 5px; cursor: pointer; background: #fff8f8; border-top: 1px solid #fcc; }

/* ── Browse Page ── */
.browse-page { }
.browse-layout { display: grid; grid-template-columns: 220px 1fr; gap: 20px; }
@media(max-width:768px) { .browse-layout { grid-template-columns: 1fr; } .filters-sidebar { order: 1; } }
.filters-sidebar { }
.filters-box { background: var(--white); border: var(--border); border-radius: 4px; padding: 14px 16px; position: sticky; top: 10px; }
.filters-box h3 { font-size: 14px; margin-bottom: 14px; color: var(--blue-dark); padding-bottom: 8px; border-bottom: var(--border); }
.filter-group { margin-bottom: 12px; }
.filter-group label { display: block; font-size: 11px; font-weight: bold; color: var(--gray-700); margin-bottom: 4px; }
.filter-group input, .filter-group select { width: 100%; padding: 6px 8px; border: var(--border); border-radius: var(--radius); font-size: 12px; }
.price-range { display: flex; gap: 6px; align-items: center; }
.price-range input { flex: 1; }
.price-range span { color: var(--gray-400); }
.results-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; flex-wrap: wrap; gap: 8px; }
.results-header h2 { font-size: 15px; }
.results-count { font-size: 12px; color: var(--gray-500); font-weight: normal; margin-left: 8px; }

/* ── Listing Detail ── */
.breadcrumb { font-size: 11px; color: var(--gray-500); margin-bottom: 14px; }
.breadcrumb a { color: var(--blue); }
.listing-detail-layout { display: grid; grid-template-columns: 380px 1fr; gap: 24px; margin-bottom: 24px; }
@media(max-width:768px) { .listing-detail-layout { grid-template-columns: 1fr; } }
.listing-gallery { }
.main-image { border: var(--border); border-radius: 4px; overflow: hidden; background: var(--white); }
.main-image img { width: 100%; max-height: 400px; object-fit: contain; display: block; padding: 8px; }
.thumb-strip { display: flex; gap: 6px; margin-top: 8px; flex-wrap: wrap; }
.thumb-strip img { width: 60px; height: 60px; object-fit: cover; border: 2px solid var(--gray-300); border-radius: 3px; cursor: pointer; }
.thumb-strip img.active { border-color: var(--blue); }
.listing-panel { }
.listing-h1 { font-size: 20px; margin-bottom: 10px; line-height: 1.3; }
.listing-badges { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.listing-badges .condition-badge, .listing-badges .set-code-badge,
.listing-badges .psa-badge, .listing-badges .rarity-badge, .listing-badges .status-badge { font-size: 12px; }
.auction-box, .buy-box { background: var(--white); border: 2px solid var(--blue); border-radius: 4px; padding: 16px; margin-bottom: 16px; }
.auction-header { font-size: 11px; font-weight: bold; color: var(--blue); text-transform: uppercase; margin-bottom: 8px; }
.current-bid { font-size: 22px; color: var(--red); margin-bottom: 8px; }
.current-bid strong { font-size: 28px; }
.bid-count { font-size: 12px; color: var(--gray-500); margin-bottom: 12px; }
.bid-form { }
.bid-input-row { display: flex; gap: 8px; margin-bottom: 6px; }
.price-display { font-size: 32px; font-weight: 900; color: var(--red); margin-bottom: 12px; }
.sold-banner { background: var(--gray-200); color: var(--gray-500); text-align: center; padding: 14px; font-size: 18px; font-weight: bold; border-radius: 3px; }
.seller-box { background: var(--gray-100); border: var(--border); border-radius: 4px; padding: 12px 14px; margin-bottom: 16px; }
.seller-box h3 { font-size: 12px; font-weight: bold; color: var(--gray-500); text-transform: uppercase; margin-bottom: 8px; }
.seller-info { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.seller-name { font-size: 15px; font-weight: bold; }
.seller-rating { font-size: 13px; color: var(--yellow); }
.card-details-box { background: var(--white); border: var(--border); border-radius: 4px; padding: 12px 14px; }
.card-details-box h3 { font-size: 12px; font-weight: bold; color: var(--gray-500); text-transform: uppercase; margin-bottom: 10px; }
.details-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.details-table th { text-align: left; padding: 4px 6px; color: var(--gray-500); font-weight: bold; width: 40%; background: var(--gray-100); }
.details-table td { padding: 4px 6px; }
.details-table tr:nth-child(even) th { background: var(--gray-200); }
.description-section { background: var(--white); border: var(--border); border-radius: 4px; padding: 16px 20px; margin-bottom: 20px; }
.description-section h2 { font-size: 15px; margin-bottom: 10px; }
.description-body { font-size: 13px; line-height: 1.7; color: var(--gray-700); }

/* ── Bid History ── */
.bid-history-section { background: var(--white); border: var(--border); border-radius: 4px; padding: 16px 20px; margin-bottom: 20px; }
.bid-history-section h2 { font-size: 15px; margin-bottom: 12px; }

/* ── Data Tables ── */
.data-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.data-table th { background: var(--blue); color: var(--white); padding: 7px 10px; text-align: left; font-weight: bold; font-size: 11px; text-transform: uppercase; white-space: nowrap; }
.data-table td { padding: 7px 10px; border-bottom: 1px solid var(--gray-200); vertical-align: middle; }
.data-table tbody tr:nth-child(even) { background: var(--gray-100); }
.data-table tbody tr:hover { background: var(--blue-light); }

/* ── Reviews ── */
.reviews-section { background: var(--white); border: var(--border); border-radius: 4px; padding: 16px 20px; }
.reviews-section h2 { font-size: 15px; margin-bottom: 14px; }
.reviews-list { display: flex; flex-direction: column; gap: 10px; margin-bottom: 20px; }
.review-card { border: var(--border); border-radius: 3px; padding: 10px 14px; background: var(--gray-100); }
.review-header { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 6px; }
.star-display { display: flex; align-items: center; gap: 1px; }
.star { font-size: 14px; }
.star-filled { color: var(--yellow); }
.star-empty { color: var(--gray-300); }
.star-num { font-size: 11px; color: var(--gray-500); margin-left: 4px; }
.review-date { font-size: 11px; color: var(--gray-400); margin-left: auto; }
.review-body { font-size: 12px; color: var(--gray-700); line-height: 1.5; }
.no-reviews { font-size: 12px; color: var(--gray-500); }
.leave-review-box { border-top: 2px solid var(--blue); padding-top: 16px; margin-top: 16px; }
.leave-review-box h3 { font-size: 14px; margin-bottom: 12px; }
.review-form { display: flex; flex-direction: column; gap: 12px; }
.star-picker { display: flex; gap: 4px; margin-bottom: 4px; }
.star-btn { font-size: 24px; cursor: pointer; color: var(--gray-300); transition: color .1s; }
.star-btn:hover, .star-selected { color: var(--yellow); }

/* ── Profile ── */
.profile-page { }
.profile-header { background: var(--white); border: var(--border); border-radius: 4px; padding: 20px 24px; margin-bottom: 20px; display: flex; gap: 20px; align-items: flex-start; flex-wrap: wrap; }
.profile-avatar { flex-shrink: 0; }
.profile-avatar img { width: 80px; height: 80px; border-radius: 50%; object-fit: cover; border: 3px solid var(--blue); }
.avatar-placeholder { width: 80px; height: 80px; border-radius: 50%; background: var(--blue); color: var(--white); font-size: 32px; font-weight: bold; display: flex; align-items: center; justify-content: center; }
.profile-info h1 { font-size: 22px; margin-bottom: 8px; }
.profile-stats-row { display: flex; gap: 16px; font-size: 13px; margin-bottom: 6px; flex-wrap: wrap; }
.member-since { font-size: 12px; color: var(--gray-500); margin-bottom: 8px; }
.profile-bio { font-size: 13px; color: var(--gray-700); margin-bottom: 10px; }
.profile-actions { display: flex; gap: 8px; }

/* ── Messages ── */
.messages-page h1 { font-size: 20px; margin-bottom: 16px; }
.compose-box { background: var(--white); border: var(--border); border-radius: 4px; padding: 16px 20px; margin-bottom: 16px; }
.compose-box h3 { font-size: 14px; margin-bottom: 12px; }
.compose-form { display: flex; flex-direction: column; gap: 10px; }
.message-tabs { display: flex; gap: 0; border-bottom: 2px solid var(--blue); margin-bottom: 0; }
.tab-btn { padding: 8px 20px; border: 1px solid var(--gray-300); border-bottom: none; background: var(--gray-100); font-size: 13px; font-weight: bold; cursor: pointer; border-radius: 3px 3px 0 0; margin-right: 3px; }
.tab-btn.active { background: var(--blue); color: var(--white); border-color: var(--blue); }
.tab-content { background: var(--white); border: 1px solid var(--gray-300); border-top: none; padding: 16px; }
.msg-unread td:first-child::before { content: "● "; color: var(--blue); }
.messages-table td:nth-child(2) { font-weight: bold; }
.empty-state-sm { padding: 20px; text-align: center; color: var(--gray-500); font-size: 13px; }

/* ── Conversation ── */
.conversation-page { background: var(--white); border: var(--border); border-radius: 4px; padding: 20px 24px; }
.conversation-header { margin-bottom: 16px; }
.conversation-header h1 { font-size: 18px; margin: 8px 0; }
.conversation-meta { font-size: 12px; color: var(--gray-500); display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.msg-date { margin-left: auto; }
.message-body-box { background: var(--gray-100); border: var(--border); border-radius: 4px; padding: 16px 20px; font-size: 13px; line-height: 1.7; margin-bottom: 20px; }
.reply-box h3 { font-size: 14px; margin-bottom: 12px; }

/* ── Notifications ── */
.notifications-page h1 { font-size: 20px; margin-bottom: 16px; }
.notifications-list { display: flex; flex-direction: column; gap: 0; }
.notification-item { display: flex; gap: 12px; padding: 12px 16px; background: var(--white); border-bottom: var(--border); align-items: flex-start; }
.notification-item:first-child { border-radius: 4px 4px 0 0; border: var(--border); }
.notification-item:last-child { border-radius: 0 0 4px 4px; }
.notif-unread { background: var(--blue-light); }
.notif-icon { width: 32px; height: 32px; border-radius: 50%; background: var(--blue); color: var(--white); display: flex; align-items: center; justify-content: center; flex-shrink: 0; font-size: 14px; }
.notif-outbid .notif-icon, .notif-icon.notif-outbid { background: var(--red); }
.notif-sale .notif-icon, .notif-icon.notif-sale { background: var(--green); }
.notif-content p { font-size: 13px; margin-bottom: 4px; }
.notif-content a { font-size: 12px; }
.notif-date { font-size: 11px; color: var(--gray-400); }

/* ── Admin ── */
.admin-page h1 { font-size: 20px; margin-bottom: 16px; }
.admin-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 12px; margin-bottom: 20px; }
.stat-card { background: var(--white); border: var(--border); border-radius: 4px; padding: 14px 16px; text-align: center; }
.stat-card .stat-num { font-size: 24px; font-weight: 900; color: var(--blue); }
.stat-card .stat-label { font-size: 11px; color: var(--gray-500); margin-top: 4px; }
.admin-table { font-size: 11px; }
.row-banned { background: #fff0f0 !important; }

/* ── Static Pages ── */
.static-page { background: var(--white); border: var(--border); border-radius: 4px; padding: 24px 30px; max-width: 900px; margin: 0 auto; }
.static-page h1 { font-size: 22px; margin-bottom: 6px; color: var(--blue-dark); }
.last-updated { font-size: 12px; color: var(--gray-500); margin-bottom: 20px; }
.static-content h2 { font-size: 15px; color: var(--gray-900); margin: 18px 0 8px; padding-bottom: 4px; border-bottom: 1px solid var(--gray-200); }
.static-content p { font-size: 13px; color: var(--gray-700); }
.static-content ul, .static-content ol { padding-left: 20px; list-style: disc; }
.static-content ol { list-style: decimal; }
.static-content li { font-size: 13px; color: var(--gray-700); margin-bottom: 5px; line-height: 1.5; }
.warning-box { background: #fff3cd; border: 1px solid #ffc107; border-radius: 4px; padding: 12px 16px; margin-bottom: 20px; font-size: 13px; }
.shipping-tiers { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; margin: 14px 0; }
.tier-card { background: var(--gray-100); border: var(--border); border-radius: 4px; padding: 14px; }
.tier-card h3 { font-size: 13px; margin-bottom: 10px; color: var(--blue-dark); }
.tier-card ul { list-style: disc; padding-left: 16px; }
.tier-card li { font-size: 12px; margin-bottom: 4px; }
.tier-premium { border-color: var(--yellow); background: #fffdf0; }

/* ── Create Listing ── */
.create-listing-page h1 { font-size: 20px; margin-bottom: 4px; }
.page-sub { font-size: 12px; color: var(--gray-500); margin-bottom: 18px; }
.listing-form { max-width: 800px; }
#auction-fields { border-top: var(--border); padding-top: 14px; margin-top: 14px; }

/* ── Success ── */
.success-page { display: flex; justify-content: center; padding: 40px 0; }
.success-box { background: var(--white); border: var(--border); border-radius: 4px; padding: 40px 36px; text-align: center; max-width: 480px; }
.success-icon { width: 60px; height: 60px; background: var(--green); border-radius: 50%; color: var(--white); font-size: 28px; font-weight: bold; display: flex; align-items: center; justify-content: center; margin: 0 auto 16px; }
.success-box h1 { font-size: 22px; margin-bottom: 12px; }
.success-box p { font-size: 13px; color: var(--gray-700); margin-bottom: 10px; }
.success-actions { display: flex; gap: 10px; justify-content: center; margin-top: 20px; flex-wrap: wrap; }

/* ── Error Page ── */
.error-page { text-align: center; padding: 60px 20px; }
.error-page h1 { font-size: 26px; margin-bottom: 12px; color: var(--red); }
.error-page p { font-size: 14px; color: var(--gray-700); margin-bottom: 20px; }

/* ── Misc ── */
.empty-state { text-align: center; padding: 40px 20px; background: var(--white); border: var(--border); border-radius: 4px; }
.empty-state h3 { font-size: 16px; margin-bottom: 8px; }
.empty-state p { font-size: 13px; color: var(--gray-500); margin-bottom: 16px; }
.no-items { font-size: 13px; color: var(--gray-500); padding: 12px 0; }

/* ── Footer ── */
.site-footer { background: #0a0f1c; color: #bbb; font-size: 12px; padding: 0; margin-top: 40px; border-top: 4px solid var(--red); }
.footer-inner { max-width: 1200px; margin: 0 auto; padding: 0 12px; }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 24px; padding: 28px 0 20px; }
.footer-col h4 { color: var(--white); font-size: 13px; font-weight: 900; margin-bottom: 10px; letter-spacing: .3px; }
.footer-col p { font-size: 12px; color: #999; line-height: 1.6; }
.footer-col ul { display: flex; flex-direction: column; gap: 5px; }
.footer-col ul li a { color: #999; font-size: 12px; }
.footer-col ul li a:hover { color: var(--white); }
.footer-bottom { border-top: 1px solid #222; padding: 12px 0; text-align: center; color: #555; font-size: 11px; }

/* ── Mobile responsive ── */
@media(max-width:480px) {
  .hero-banner { padding: 16px; }
  .hero-content h1 { font-size: 18px; }
  .hero-stats { gap: 8px; }
  .stat-box { padding: 8px 12px; }
  .stat-num { font-size: 18px; }
  .listings-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
  .auth-box { padding: 20px 16px; }
  .site-header { padding: 8px 0; }
}

/* ── Listing Type Selector ── */
.listing-type-row { display: flex; gap: 10px; flex-wrap: wrap; }
.type-option { display: flex; align-items: flex-start; gap: 8px; border: 2px solid var(--gray-300); border-radius: 4px; padding: 10px 14px; cursor: pointer; flex: 1; min-width: 140px; transition: border-color .15s, background .15s; }
.type-option:has(input:checked) { border-color: var(--blue); background: var(--blue-light); }
.type-option input[type=radio] { margin-top: 2px; flex-shrink: 0; }
.type-label strong { display: block; font-size: 13px; }
.type-label small { font-size: 11px; color: var(--gray-500); }

/* ── Trade badges ── */
.badge-trade { background: #6f42c1; color: #fff; }
.badge-trade-lg { display: inline-block; background: #6f42c1; color: #fff; font-size: 11px; font-weight: bold; padding: 2px 8px; border-radius: 3px; letter-spacing: .5px; }
.trade-price-label { color: #6f42c1; font-weight: bold; font-size: 15px; }

/* ── Trade Box (listing detail) ── */
.trade-box { border: 2px solid #6f42c1; border-radius: 4px; padding: 16px; margin-top: 12px; }
.trade-header { font-size: 15px; font-weight: bold; color: #6f42c1; margin-bottom: 10px; }
.trade-intro { font-size: 12px; color: var(--gray-700); margin-bottom: 10px; }
.trade-form .trade-card-slot { border: 1px dashed var(--gray-300); border-radius: 4px; padding: 10px; margin-bottom: 10px; }
.trade-slot-header { display: flex; justify-content: space-between; align-items: center; font-size: 13px; font-weight: bold; margin-bottom: 6px; }
.trade-closed { font-size: 13px; color: var(--gray-500); font-style: italic; }
.existing-offer-notice { background: #d4edda; border: 1px solid #c3e6cb; border-radius: 4px; padding: 10px 14px; font-size: 13px; color: #155724; }
.offer-accepted-notice { background: #d4edda; border: 1px solid #c3e6cb; border-radius: 4px; padding: 10px; font-size: 13px; color: #155724; margin-top: 8px; }
.btn-trade { background: #6f42c1; color: #fff; border: none; padding: 10px 20px; border-radius: 3px; font-weight: bold; cursor: pointer; font-size: 14px; display: block; width: 100%; text-align: center; margin-top: 10px; }
.btn-trade:hover { background: #5a32a3; }

/* ── Trade Offers Page ── */
.trade-offers-page h1 { margin-bottom: 4px; }
.trade-tabs { display: flex; gap: 0; margin-bottom: 20px; border-bottom: 2px solid var(--gray-300); }
.trade-tab { background: none; border: none; border-bottom: 2px solid transparent; padding: 8px 20px; font-size: 14px; font-weight: bold; cursor: pointer; color: var(--gray-600); margin-bottom: -2px; }
.trade-tab.active { border-bottom-color: var(--blue); color: var(--blue); }
.trade-offer-card { border: 1px solid var(--gray-300); border-radius: 4px; padding: 14px 16px; margin-bottom: 12px; background: var(--white); }
.trade-offer-card.status-accepted { border-color: #28a745; }
.trade-offer-card.status-declined { opacity: .65; }
.offer-header { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; font-size: 13px; }
.offer-meta { flex: 1; }
.offer-status { font-size: 11px; font-weight: bold; padding: 2px 8px; border-radius: 10px; background: var(--gray-200); }
.offer-status-pending { background: #fff3cd; color: #856404; }
.offer-status-accepted { background: #d4edda; color: #155724; }
.offer-status-declined { background: #f8d7da; color: #721c24; }
.offer-status-cancelled { background: var(--gray-200); color: var(--gray-600); }
.offer-date { font-size: 11px; color: var(--gray-500); }
.offer-cards { margin-bottom: 10px; font-size: 13px; }
.offer-cards-row { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 6px; }
.offer-card-item { display: flex; gap: 8px; align-items: center; border: 1px solid var(--gray-300); border-radius: 4px; padding: 6px 10px; }
.offer-card-item img { width: 50px; height: 50px; object-fit: cover; border-radius: 3px; }
.offer-card-no-img { width: 50px; height: 50px; display: flex; align-items: center; justify-content: center; background: var(--gray-100); border-radius: 3px; font-size: 20px; }
.offer-card-info { display: flex; flex-direction: column; gap: 2px; font-size: 12px; }
.offer-message { font-style: italic; color: var(--gray-700); font-size: 13px; margin: 8px 0; padding: 8px; background: var(--gray-100); border-radius: 3px; }
.offer-actions { margin-top: 10px; }

/* ── Checkout / Shipping ── */
.shipping-info-box { font-size: 13px; color: var(--gray-700); padding: 8px 10px; background: var(--gray-100); border-radius: 3px; margin: 8px 0; }
.free-ship-badge { color: #155724; font-weight: bold; font-size: 12px; background: #d4edda; padding: 2px 8px; border-radius: 10px; display: inline-block; }
.ships-from { font-size: 12px; }
.checkout-summary { border: 1px solid var(--gray-300); border-radius: 4px; padding: 10px; margin-bottom: 10px; font-size: 13px; }
.checkout-row { display: flex; justify-content: space-between; padding: 3px 0; }
.checkout-total { border-top: 1px solid var(--gray-300); margin-top: 4px; padding-top: 6px; font-weight: bold; font-size: 14px; }

/* ── Pagination ── */
.pagination { display: flex; align-items: center; justify-content: center; gap: 12px; margin: 24px 0; padding: 12px; }
.page-info { font-size: 13px; color: var(--gray-600); }

/* ── Free shipping badge in card grid ── */
.free-ship-badge { font-size: 10px; padding: 1px 5px; }

/* ── Logo (no ball) ── */
.logo-ball { display: none; }
.logo { display: flex; align-items: center; gap: 8px; text-decoration: none; flex-shrink: 0; }
.logo:hover { text-decoration: none; }
.logo-text { display: flex; align-items: baseline; line-height: 1; }

/* ── Disclaimer Box (TOS / anti-counterfeit pages) ── */
.disclaimer-box { border-radius: 4px; padding: 12px 16px; margin-bottom: 20px; font-size: 13px; line-height: 1.6; }
.disclaimer-box-legal { background: #eef2fb; border: 1px solid #b8c9ef; color: #1a2d6d; }

/* ── Site-wide Disclaimer (homepage) ── */
.site-disclaimer { background: #f0f4fd; border: 1px solid #c5d3ef; border-radius: 4px; padding: 12px 16px; font-size: 12px; color: #2a3f7a; line-height: 1.6; margin-bottom: 20px; }
.site-disclaimer a { color: var(--blue); font-weight: bold; }

/* ── Footer Disclaimer ── */
.footer-disclaimer { border-top: 1px solid #1a2030; padding: 16px 0 12px; font-size: 11px; color: #777; line-height: 1.7; }
.footer-disclaimer strong { color: #aaa; }
.footer-bottom a { color: #777; }
.footer-bottom a:hover { color: #ccc; }

/* ── Report Section on Listing Detail ── */
.report-section { margin-top: 20px; }
.report-details { border: 1px solid #f5c6cb; border-radius: 4px; background: #fff; }
.report-toggle { list-style: none; cursor: pointer; padding: 10px 14px; font-size: 12px; font-weight: bold; color: var(--red-dark); background: #fff5f5; border-radius: 4px; user-select: none; }
.report-toggle::-webkit-details-marker { display: none; }
.report-toggle::marker { display: none; }
.report-details[open] .report-toggle { border-radius: 4px 4px 0 0; border-bottom: 1px solid #f5c6cb; }
.report-form-inner { padding: 14px 16px; }
.report-intro { font-size: 12px; color: var(--gray-700); margin-bottom: 12px; line-height: 1.5; }
.report-email-note { font-size: 11px; color: var(--gray-500); margin-top: 10px; }
.btn-report { background: var(--red); color: #fff; border: 1px solid var(--red-dark); padding: 7px 18px; border-radius: var(--radius); font-size: 13px; font-weight: bold; cursor: pointer; }
.btn-report:hover { background: var(--red-dark); }

/* ── Authenticity Section on Create Listing ── */
.authenticity-section { border-color: #b8d8b8 !important; background: #f4fbf4 !important; }
.authenticity-section h3 { color: #1a5c1a !important; border-bottom-color: #b8d8b8 !important; }
.auth-confirm-intro { font-size: 12px; color: var(--gray-700); margin-bottom: 12px; }
.auth-confirms { display: flex; flex-direction: column; gap: 10px; }
.auth-check { align-items: flex-start !important; font-size: 13px; }
.auth-check input { margin-top: 3px; flex-shrink: 0; }
.auth-check span { line-height: 1.5; }

/* ── Admin Reports Tab ── */
.report-badge { display: inline-block; background: var(--red); color: #fff; font-size: 10px; font-weight: bold; padding: 1px 6px; border-radius: 10px; margin-left: 4px; vertical-align: middle; }
.row-pending-report { background: #fff9f9; }

/* ── Auth forgot password ── */
.auth-forgot-link { font-size: 13px; color: var(--blue); }

/* ── Orders List ── */
.orders-page { max-width: 900px; margin: 0 auto; padding: 20px 0; }
.orders-list { display: flex; flex-direction: column; gap: 12px; margin-top: 16px; }
.order-card { display: flex; gap: 14px; align-items: flex-start; background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 14px; }
.order-card.order-status-paid { border-left: 3px solid #2a7a2a; }
.order-card.order-status-shipped { border-left: 3px solid #003087; }
.order-card.order-status-completed { border-left: 3px solid #888; }
.order-card.order-status-pending_payment { border-left: 3px solid #CC0000; }
.order-thumb { width: 64px; height: 64px; flex-shrink: 0; }
.order-thumb img { width: 64px; height: 64px; object-fit: cover; border-radius: 3px; }
.no-image-sm { width: 64px; height: 64px; display: flex; align-items: center; justify-content: center; background: #f0f0f0; border-radius: 3px; font-size: 10px; color: #999; text-align: center; }
.order-info { flex: 1; min-width: 0; }
.order-title { font-weight: bold; font-size: 14px; margin-bottom: 4px; }
.order-title a { color: var(--blue); }
.order-meta { font-size: 12px; color: var(--gray-700); margin-bottom: 6px; }
.order-status-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.order-status-badge { display: inline-block; font-size: 10px; font-weight: bold; padding: 2px 7px; border-radius: 10px; }
.order-status-paid { background: #d4edda; color: #155724; }
.order-status-shipped { background: #cce5ff; color: #004085; }
.order-status-completed { background: #e2e3e5; color: #383d41; }
.order-status-pending_payment { background: #f8d7da; color: #721c24; }
.order-status-pending { background: #fff3cd; color: #856404; }
.order-status-refunded { background: #ffeeba; color: #856404; }
.tracking-info { font-size: 12px; color: var(--blue); }
.order-actions { display: flex; flex-direction: column; gap: 6px; flex-shrink: 0; }

/* ── Order Detail ── */
.order-detail-page { max-width: 960px; margin: 0 auto; padding: 20px 0; }
.order-detail-layout { display: grid; grid-template-columns: 1fr 320px; gap: 24px; margin-top: 20px; }
@media (max-width: 720px) { .order-detail-layout { grid-template-columns: 1fr; } }
.order-detail-card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; margin-bottom: 20px; }
.order-detail-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.order-date { font-size: 13px; color: var(--gray-700); }
.order-item-row { display: flex; gap: 14px; align-items: flex-start; padding: 14px 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); margin-bottom: 14px; }
.order-item-thumb { width: 80px; height: 80px; object-fit: cover; border-radius: 4px; }
.order-item-info { flex: 1; }
.order-item-title { font-weight: bold; color: var(--blue); text-decoration: none; display: block; margin-bottom: 4px; }
.order-item-meta { font-size: 12px; color: var(--gray-700); }
.order-price-breakdown { margin-top: 12px; }
.price-row { display: flex; justify-content: space-between; padding: 5px 0; font-size: 14px; }
.total-row { border-top: 2px solid var(--border); padding-top: 10px; font-weight: bold; font-size: 15px; margin-top: 4px; }

/* ── Order Timeline ── */
.order-timeline { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; }
.order-timeline h3 { margin-top: 0; color: var(--blue); font-size: 14px; }
.timeline { position: relative; padding-left: 28px; }
.timeline::before { content:''; position:absolute; left:9px; top:6px; bottom:6px; width:2px; background:#dde3f0; }
.timeline-step { position: relative; padding-bottom: 20px; }
.timeline-step:last-child { padding-bottom: 0; }
.tl-dot { position:absolute; left:-24px; top:4px; width:14px; height:14px; border-radius:50%; background:#dde3f0; border:2px solid #fff; box-shadow:0 0 0 2px #dde3f0; }
.timeline-step.done .tl-dot { background: var(--blue); box-shadow:0 0 0 2px var(--blue); }
.tl-label strong { display:block; font-size:13px; }
.tl-label span { font-size:11px; color:var(--gray-700); }

/* ── Order Sidebar ── */
.order-action-box { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; margin-bottom: 16px; }
.order-action-box h3 { margin-top: 0; font-size: 14px; }
.action-urgent { border-color: #CC0000; background: #fff5f5; }
.action-primary { border-color: #003087; background: #f4f8ff; }
.action-urgent h3 { color: #CC0000; }
.action-primary h3 { color: var(--blue); }
.order-action-note { font-size: 11px; color: var(--gray-700); margin-top: 8px; }
.order-parties { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; margin-bottom: 12px; }
.order-parties h3 { margin-top: 0; font-size: 14px; }
.party-row { display: flex; gap: 8px; align-items: center; font-size: 13px; padding: 5px 0; border-bottom: 1px solid #f0f0f0; }
.party-row:last-child { border-bottom: none; }
.party-label { font-weight: bold; min-width: 60px; color: var(--gray-700); }
.order-contact { margin-bottom: 12px; }

/* ── Dashboard ── */
.dashboard-page { max-width: 1000px; margin: 0 auto; padding: 20px 0; }
.dash-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 24px; }
@media (max-width: 640px) { .dash-stats { grid-template-columns: repeat(2,1fr); } }
.dash-stat { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; text-align: center; }
.dash-stat-num { font-size: 28px; font-weight: 900; color: var(--blue); font-family: 'Impact', Arial Black, sans-serif; }
.dash-stat-label { font-size: 12px; color: var(--gray-700); margin-top: 2px; }
.dash-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 28px; }
.dash-action-btn { display: flex; flex-direction: column; align-items: center; gap: 4px; background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 18px; text-decoration: none; color: var(--blue); font-size: 12px; font-weight: bold; min-width: 80px; transition: background .15s, border-color .15s; }
.dash-action-btn:hover { background: #eef2fb; border-color: var(--blue); text-decoration: none; }
.dash-action-icon { font-size: 22px; }
.dash-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
@media (max-width: 700px) { .dash-columns { grid-template-columns: 1fr; } }
.dash-section { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 20px; }
.dash-section h2 { font-size: 16px; color: var(--blue); margin-top: 0; margin-bottom: 12px; }
.empty-state-sm { padding: 16px 0; color: var(--gray-700); font-size: 13px; }
.dash-order-row { display: flex; justify-content: space-between; align-items: center; padding: 8px 0; border-bottom: 1px solid #f0f0f0; gap: 10px; }
.dash-order-row:last-child { border-bottom: none; }
.dash-order-info { display: flex; flex-direction: column; font-size: 12px; gap: 2px; min-width: 0; }
.dash-order-info a { color: var(--blue); }

/* ── Order Timeline in show.ejs ── */
.order-main { flex: 1; }

/* ── btn-danger ── */
.btn-danger { background: #CC0000; color: #fff; border: 1px solid #990000; }
.btn-danger:hover { background: #990000; }

/* ── Payouts Page ── */
.payouts-page { max-width: 900px; margin: 0 auto; }
.payouts-page h1 { margin-bottom: 4px; }
.payout-connect-box { display: flex; align-items: center; justify-content: space-between; gap: 16px; border-radius: 6px; padding: 18px 22px; margin-bottom: 24px; border: 2px solid; flex-wrap: wrap; }
.payout-connect-box.connected { background: #f0fdf4; border-color: #22c55e; }
.payout-connect-box.not-connected { background: #fffbeb; border-color: #f59e0b; }
.payout-connect-left { display: flex; align-items: flex-start; gap: 14px; flex: 1; }
.payout-connect-left p { margin: 4px 0 0; font-size: 13px; color: #555; }
.connect-status-icon { font-size: 24px; color: #22c55e; font-weight: 900; flex-shrink: 0; }
.pending-icon { color: #f59e0b; }
.connect-form { flex-shrink: 0; }
.earnings-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 14px; margin-bottom: 22px; }
@media (max-width:640px) { .earnings-grid { grid-template-columns: repeat(2,1fr); } }
.earnings-card { background: #fff; border: 1px solid var(--gray-200); border-radius: 4px; padding: 16px; text-align: center; }
.earnings-card.earnings-pending { border-color: #fcd34d; background: #fffbeb; }
.earnings-num { font-size: 26px; font-weight: 900; color: var(--blue); font-family: 'Impact', Arial Black, sans-serif; }
.earnings-label { font-size: 11px; color: var(--gray-700); margin-top: 4px; }
.fee-info-box { background: #f8f9fc; border: 1px solid var(--gray-200); border-radius: 4px; padding: 16px 20px; margin-bottom: 22px; font-size: 13px; }
.fee-info-box h3 { margin-top: 0; font-size: 14px; color: var(--blue); margin-bottom: 8px; }
.fee-info-box p { margin: 0 0 8px; }
.payout-section { background: #fff; border: 1px solid var(--gray-200); border-radius: 4px; padding: 18px 20px; margin-bottom: 18px; }
.payout-section h2 { font-size: 16px; color: var(--blue); margin-top: 0; }
.fee-col { color: var(--red); }
.payout-col { color: #16a34a; }
.payout-note { font-size: 12px; color: var(--gray-500); margin-top: 8px; }

/* ── How-to-Use Page ── */
.how-to-page { max-width: 860px; margin: 0 auto; padding-bottom: 40px; }
.how-to-hero { text-align: center; padding: 28px 0 12px; }
.how-to-hero h1 { font-size: 30px; color: var(--blue); margin-bottom: 6px; }
.how-to-sub { color: var(--gray-700); font-size: 15px; margin: 0; }
.how-to-toc { background: #f0f4ff; border: 1px solid var(--blue); border-radius: 4px; padding: 12px 18px; margin: 18px 0 28px; display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; font-size: 13px; }
.how-to-toc strong { color: var(--blue); }
.how-to-toc a { color: var(--blue); text-decoration: underline; }
.how-to-section { border-top: 2px solid var(--border); padding: 28px 0; }
.how-to-section h2 { font-size: 20px; color: var(--blue); margin: 0 0 18px; display: flex; align-items: center; gap: 10px; }
.section-num { background: var(--blue); color: #fff; border-radius: 50%; width: 28px; height: 28px; display: inline-flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 900; flex-shrink: 0; }
.steps-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 16px; }
@media (max-width:700px) { .steps-grid { grid-template-columns: 1fr; } }
.step-card { background: #fff; border: 1px solid var(--border); border-radius: 6px; padding: 18px; }
.step-card h3 { margin: 8px 0 6px; font-size: 14px; color: var(--blue); }
.step-card p { font-size: 13px; color: #444; margin: 0 0 12px; }
.step-icon { font-size: 28px; }
.steps-list { display: flex; flex-direction: column; gap: 12px; }
.step-row { display: flex; gap: 14px; align-items: flex-start; }
.step-num { background: var(--blue); color: #fff; border-radius: 50%; width: 30px; height: 30px; display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 900; flex-shrink: 0; margin-top: 2px; }
.step-body { font-size: 13px; color: #333; flex: 1; line-height: 1.6; }
.step-body strong { color: #111; }
.detail-list { margin: 8px 0 0 16px; padding: 0; }
.detail-list li { margin-bottom: 4px; }
.how-to-tip { background: #fffbeb; border: 1px solid #fcd34d; border-radius: 4px; padding: 12px 16px; font-size: 13px; color: #555; margin-top: 16px; }
.how-to-fee-box { background: #f8f9fc; border: 1px solid var(--border); border-radius: 4px; padding: 16px 20px; margin-top: 20px; }
.how-to-fee-box h3 { margin: 0 0 10px; font-size: 15px; color: var(--blue); }
.fee-table { width: 100%; border-collapse: collapse; font-size: 13px; margin-bottom: 8px; }
.fee-table td { padding: 5px 10px; border: 1px solid var(--border); }
.fee-table td:last-child { text-align: right; }
.fee-example { background: #eef2fb; font-style: italic; color: #555; }
.order-flow { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.flow-step { background: #fff; border: 1px solid var(--border); border-radius: 4px; padding: 10px 14px; text-align: center; }
.flow-step p { font-size: 12px; color: #555; margin: 4px 0 0; }
.flow-badge { display: inline-block; background: var(--blue); color: #fff; border-radius: 3px; font-size: 12px; font-weight: bold; padding: 2px 8px; }
.flow-arrow { font-size: 20px; color: var(--gray-500); }
.badge-demo { background: #CC0000; color: #fff; font-size: 11px; font-weight: bold; padding: 1px 6px; border-radius: 3px; }
.faq-list { display: flex; flex-direction: column; gap: 2px; }
.faq-item { border: 1px solid var(--border); border-radius: 4px; overflow: hidden; }
.faq-q { background: #f8f9fc; padding: 11px 16px; font-weight: bold; font-size: 13px; cursor: pointer; color: var(--blue); }
.faq-a { padding: 11px 16px; font-size: 13px; color: #444; background: #fff; line-height: 1.6; }
.how-to-cta { background: var(--blue); color: #fff; border-radius: 6px; padding: 32px 24px; text-align: center; margin-top: 28px; }
.how-to-cta h2 { color: #fff; margin-top: 0; font-size: 22px; }
.how-to-cta p { color: #ccd5e8; margin-bottom: 20px; }
.cta-btns { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.cta-btns .btn-secondary { background: rgba(255,255,255,0.15); color: #fff; border-color: rgba(255,255,255,0.4); }
.cta-btns .btn-secondary:hover { background: rgba(255,255,255,0.25); }

/* ── Message Threading ── */
.conversation-page { max-width: 700px; margin: 0 auto; }
.conversation-header { padding: 16px 0 12px; border-bottom: 2px solid var(--border); margin-bottom: 16px; }
.convo-title-row { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.convo-title-row h1 { font-size: 20px; margin: 0; color: var(--blue); }
.convo-with { font-size: 13px; color: var(--gray-700); }
.convo-listing-ref { font-size: 12px; color: var(--gray-500); margin-top: 4px; }
.thread-container { display: flex; flex-direction: column; gap: 10px; max-height: 520px; overflow-y: auto; padding: 12px 4px; margin-bottom: 20px; border: 1px solid var(--border); border-radius: 6px; background: #f8f9fc; }
.bubble-row { display: flex; }
.bubble-me { justify-content: flex-end; }
.bubble-them { justify-content: flex-start; }
.bubble { max-width: 75%; border-radius: 12px; padding: 10px 14px; font-size: 13px; line-height: 1.5; }
.bubble-me .bubble { background: var(--blue); color: #fff; border-bottom-right-radius: 3px; }
.bubble-them .bubble { background: #fff; color: #222; border: 1px solid var(--border); border-bottom-left-radius: 3px; }
.bubble-meta { display: flex; gap: 8px; align-items: baseline; margin-bottom: 4px; font-size: 11px; }
.bubble-me .bubble-meta { color: rgba(255,255,255,0.75); justify-content: flex-end; }
.bubble-them .bubble-meta { color: var(--gray-500); }
.bubble-author { font-weight: bold; }
.bubble-body { word-break: break-word; }
.reply-box { background: #fff; border: 1px solid var(--border); border-radius: 6px; padding: 16px 18px; }
.reply-box h3 { margin: 0 0 12px; font-size: 14px; color: var(--blue); }

/* ── Lightbox / Image Zoom ── */
.zoomable { cursor: zoom-in; }
.zoom-hint { position: absolute; bottom: 8px; right: 12px; background: rgba(0,0,0,0.55); color: #fff; font-size: 11px; padding: 4px 8px; border-radius: 3px; pointer-events: none; }
.main-image { position: relative; }
.lightbox { position: fixed; inset: 0; background: rgba(0,0,0,0.92); z-index: 9999; display: flex; align-items: center; justify-content: center; cursor: zoom-out; padding: 20px; }
.lightbox img { max-width: 95vw; max-height: 95vh; object-fit: contain; box-shadow: 0 8px 40px rgba(0,0,0,0.5); }
.lightbox-close { position: absolute; top: 18px; right: 28px; color: #fff; font-size: 42px; font-weight: bold; cursor: pointer; line-height: 1; }
.lightbox-close:hover { color: #ccc; }

/* ── Watchlist Heart Button ── */
.listing-title-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.watch-form { margin: 0; }
.watch-btn { background: #fff; border: 1.5px solid var(--border); border-radius: 4px; padding: 6px 12px; font-size: 13px; font-weight: bold; cursor: pointer; color: #555; display: inline-flex; align-items: center; gap: 6px; text-decoration: none; transition: all 0.15s; }
.watch-btn:hover { border-color: #CC0000; color: #CC0000; }
.watch-btn.watching { background: #fff5f5; border-color: #CC0000; color: #CC0000; }
.watch-heart { font-size: 16px; }
.watch-count { color: var(--gray-500); font-weight: normal; }
.watch-static { font-size: 13px; color: var(--gray-700); padding: 6px 10px; background: #f8f9fc; border: 1px solid var(--border); border-radius: 4px; }

/* ── Make an Offer ── */
.make-offer-section { margin-top: 14px; border-top: 1px dashed var(--border); padding-top: 12px; }
.make-offer-toggle { cursor: pointer; font-size: 13px; font-weight: bold; color: var(--blue); padding: 6px 0; }
.make-offer-form { padding-top: 12px; }
.offer-hint { font-size: 12px; color: var(--gray-700); margin: 0 0 10px; }

/* ── Cookie Banner ── */
.cookie-banner { position: fixed; bottom: 14px; left: 14px; right: 14px; max-width: 540px; margin: 0 auto; background: #fff; border: 2px solid var(--blue); border-radius: 6px; box-shadow: 0 6px 24px rgba(0,0,0,0.18); z-index: 9000; padding: 14px 18px; }
.cookie-banner-inner { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.cookie-banner p { margin: 0; font-size: 12px; color: #333; flex: 1; min-width: 240px; line-height: 1.5; }
.cookie-banner .btn { white-space: nowrap; }

/* ── Dispute Box ── */
.action-disputed { background: #fff5f5; border-color: #CC0000; }
.action-disputed h3 { color: #CC0000; }
.dispute-toggle { cursor: pointer; font-weight: bold; color: #CC0000; padding: 6px 0; font-size: 13px; }
.dispute-form { padding-top: 12px; }
.dispute-intro { font-size: 12px; color: #555; line-height: 1.5; margin-bottom: 12px; padding: 10px; background: #f8f9fc; border-radius: 4px; }
.dispute-detail { background: #fff; padding: 8px 10px; border-radius: 3px; font-size: 12px; color: #555; margin: 6px 0; }

/* ── Watchlist Page ── */
.watchlist-page .page-head { padding: 14px 0 18px; border-bottom: 2px solid var(--border); margin-bottom: 18px; }
.watchlist-page .page-head h1 { color: #CC0000; margin: 0; font-size: 22px; }
.empty-state { text-align: center; padding: 60px 20px; background: #f8f9fc; border-radius: 6px; }
.empty-state h3 { color: var(--gray-700); margin-top: 0; }
.empty-state-sm { color: var(--gray-500); padding: 20px; text-align: center; font-size: 13px; }

/* ── Offers Page ── */
.offers-page h1 { color: var(--blue); margin: 0 0 6px; }
.offers-tabs { display: flex; gap: 4px; border-bottom: 2px solid var(--border); margin: 18px 0; }
.tab-btn { background: none; border: none; padding: 10px 18px; cursor: pointer; font-weight: bold; color: var(--gray-700); font-size: 13px; border-bottom: 3px solid transparent; margin-bottom: -2px; }
.tab-btn.active { color: var(--blue); border-bottom-color: var(--blue); }
.tab-pane { display: none; }
.tab-pane.active { display: block; }
.offer-card { display: flex; gap: 14px; background: #fff; border: 1px solid var(--border); border-radius: 6px; padding: 14px; margin-bottom: 12px; }
.offer-thumb { width: 80px; height: 80px; object-fit: cover; border-radius: 4px; flex-shrink: 0; }
.offer-body { flex: 1; }
.offer-title { font-weight: bold; color: var(--blue); display: block; margin-bottom: 6px; text-decoration: none; }
.offer-amounts { display: flex; gap: 14px; font-size: 13px; flex-wrap: wrap; margin-bottom: 4px; }
.offer-amt { color: #006600; }
.offer-discount { color: var(--gray-500); }
.offer-meta { font-size: 12px; color: var(--gray-700); margin-bottom: 6px; }
.offer-msg { font-size: 13px; color: #444; padding: 8px 10px; background: #f8f9fc; border-left: 3px solid var(--blue); margin: 6px 0; border-radius: 0 4px 4px 0; }
.offer-actions { display: flex; gap: 6px; margin-top: 8px; }
.offer-accepted-note { font-size: 12px; color: #006600; margin-top: 6px; padding: 6px 10px; background: #f0fdf4; border-radius: 3px; }
.status-pill { font-size: 11px; font-weight: bold; padding: 2px 8px; border-radius: 10px; text-transform: uppercase; }
.status-pending { background: #fef3c7; color: #92400e; }
.status-accepted, .status-paid, .status-completed { background: #dcfce7; color: #166534; }
.status-declined, .status-withdrawn, .status-expired, .status-cancelled { background: #f3f4f6; color: #6b7280; }
.status-shipped { background: #dbeafe; color: #1e40af; }


/* ── Seller Analytics ── */
.seller-analytics-page .page-head { border-bottom: 2px solid var(--border); padding-bottom: 14px; margin-bottom: 20px; }
.seller-analytics-page h1 { color: var(--blue); margin: 0; }
.analytics-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; margin-bottom: 28px; }
.stat-card { background: #fff; border: 1px solid var(--border); border-radius: 6px; padding: 16px 18px; text-align: center; }
.stat-value { font-size: 28px; font-weight: 900; color: var(--blue); margin-bottom: 4px; }
.stat-label { font-size: 12px; color: var(--gray-700); text-transform: uppercase; letter-spacing: 0.5px; }
.analytics-section { margin-bottom: 28px; }
.analytics-section h2 { font-size: 16px; color: var(--blue); border-bottom: 1px solid var(--border); padding-bottom: 8px; margin-bottom: 14px; }

/* ── Listing Grid Helpers (for watchlist) ── */
.listing-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px,1fr)); gap: 14px; }
.listing-grid .listing-card { background: #fff; border: 1px solid var(--border); border-radius: 6px; overflow: hidden; }
.listing-grid .card-img { width: 100%; height: 180px; object-fit: cover; display: block; background: #f0f0f0; }
.listing-grid .card-no-img { width: 100%; height: 180px; background: #f0f0f0; display: flex; align-items: center; justify-content: center; color: var(--gray-500); font-size: 12px; }
.listing-grid .card-body { padding: 10px 12px; }
.listing-grid .card-title { display: block; font-weight: bold; font-size: 13px; color: var(--blue); margin-bottom: 4px; text-decoration: none; }
.listing-grid .card-meta { display: flex; gap: 4px; flex-wrap: wrap; margin-bottom: 6px; }
.listing-grid .card-cond { font-size: 11px; background: #f8f9fc; padding: 1px 6px; border-radius: 3px; color: #555; }
.listing-grid .card-price { font-size: 16px; font-weight: bold; color: #006600; margin-bottom: 4px; }
.listing-grid .card-price small { font-size: 11px; color: var(--gray-500); font-weight: normal; }
.listing-grid .card-seller { font-size: 11px; color: var(--gray-700); }

/* Mobile tweaks */
@media (max-width: 700px) {
  .listing-title-row { flex-direction: column; }
  .cookie-banner { left: 8px; right: 8px; padding: 12px 14px; }
  .cookie-banner-inner { flex-direction: column; align-items: stretch; text-align: center; }
  .offers-tabs { overflow-x: auto; }
  .offer-card { flex-direction: column; }
  .offer-thumb { width: 100%; height: 160px; }
}

/* ── Dashboard Tabs (consolidated dashboard) ── */
.dashboard-head { padding: 14px 0 18px; border-bottom: 2px solid var(--border); margin-bottom: 18px; }
.dashboard-head h1 { color: var(--blue); margin: 0 0 6px; }
.dash-tabs { display: flex; gap: 2px; border-bottom: 2px solid var(--border); margin: 22px 0 22px; }
.dash-tab { background: none; border: none; padding: 12px 22px; cursor: pointer; font-weight: bold; color: var(--gray-700); font-size: 14px; border-bottom: 3px solid transparent; margin-bottom: -2px; display: inline-flex; align-items: center; gap: 8px; }
.dash-tab:hover { color: var(--blue); }
.dash-tab.active { color: var(--blue); border-bottom-color: var(--blue); }
.tab-badge { background: #CC0000; color: #fff; font-size: 11px; font-weight: bold; padding: 1px 7px; border-radius: 10px; min-width: 18px; text-align: center; }
.dash-pane { animation: fade 0.18s ease-out; }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

/* ── Sub-tabs inside Orders pane ── */
.orders-subtabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin-bottom: 16px; }
.sub-tab { background: none; border: none; padding: 9px 16px; cursor: pointer; font-weight: bold; color: var(--gray-700); font-size: 13px; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.sub-tab.active { color: var(--blue); border-bottom-color: var(--blue); }

/* ── Accepted-offer badge on order cards ── */
.badge-offer { background: #6b21a8; color: #fff; font-size: 10px; font-weight: bold; padding: 2px 7px; border-radius: 3px; text-transform: uppercase; letter-spacing: 0.4px; margin-left: 6px; }

/* ── Hero stats: keep labels readable on dark blue gradient ── */
.hero-stats .stat-label { color: var(--white); opacity: 0.95; font-weight: 600; }
.hero-stats .stat-num { color: var(--white); }

/* ── Simplified Graded / Raw badges (replaces PSA grade badges) ── */
.badge-graded { background: #16a34a; color: #fff; left: auto; right: 4px; font-weight: bold; letter-spacing: 0.5px; }
.badge-raw { background: rgba(60,60,60,0.85); color: #fff; left: auto; right: 4px; font-weight: bold; letter-spacing: 0.5px; }
.badge-sealed { background: #0a7ea4; color: #fff; left: auto; right: 4px; font-weight: bold; letter-spacing: 0.5px; }
.badge-bulk { background: #b45309; color: #fff; left: auto; right: 4px; font-weight: bold; letter-spacing: 0.5px; }
.psa-badge-raw { background: #6b7280 !important; }

/* ── In-page confirmation modal (replaces browser confirm()) ── */
.confirm-modal { position: fixed; inset: 0; z-index: 9999; display: flex; align-items: center; justify-content: center; padding: 20px; }
.confirm-modal-backdrop { position: absolute; inset: 0; background: rgba(15, 23, 42, 0.55); }
.confirm-modal-card { position: relative; background: #fff; border-radius: 8px; padding: 22px 26px; max-width: 440px; width: 100%; box-shadow: 0 20px 60px rgba(0,0,0,0.3); border-top: 4px solid var(--blue); }
.confirm-modal-card h3 { margin: 0 0 10px; color: var(--blue); font-size: 18px; }
.confirm-modal-card p { margin: 0 0 18px; color: var(--gray-700); line-height: 1.45; font-size: 14px; }
.confirm-modal-actions { display: flex; justify-content: flex-end; gap: 10px; }

/* ── Offers tab: make active state actually readable (was dark blue text on dark blue) ── */
.offers-tabs .tab-btn { color: var(--gray-700); background: transparent; }
.offers-tabs .tab-btn.active { color: var(--white) !important; background: var(--blue) !important; border-color: var(--blue) !important; border-bottom-color: var(--blue) !important; border-radius: 3px 3px 0 0; }
.offers-tabs .tab-btn:hover:not(.active) { color: var(--blue); background: var(--gray-100); }

/* ── Buy-now-label on listing cards: subtle status pill, NOT a button ── */
.buy-now-label { display: inline-block; font-size: 10px; color: var(--gray-700); background: var(--gray-100); padding: 1px 6px; border-radius: 2px; margin-left: 4px; font-weight: normal; text-transform: uppercase; letter-spacing: 0.3px; }

/* ════════════════════════════════════════════════════════
   MOBILE NAVIGATION
   ════════════════════════════════════════════════════════ */

/* Hamburger button — hidden on desktop, shown on mobile */
.hamburger-btn {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 42px;
  height: 42px;
  background: none;
  border: 1.5px solid var(--gray-300);
  border-radius: 4px;
  cursor: pointer;
  padding: 9px 10px;
  flex-shrink: 0;
}
.hamburger-btn span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--blue);
  border-radius: 2px;
  transition: transform 0.22s ease, opacity 0.22s ease;
}
.hamburger-btn.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger-btn.is-open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.hamburger-btn.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile nav panel */
.mobile-nav-menu {
  display: none;
  background: var(--white);
  border-bottom: 3px solid var(--blue);
  box-shadow: 0 6px 18px rgba(0,48,135,.18);
  position: relative;
  z-index: 200;
}
.mobile-nav-menu.is-open { display: block; }
.mobile-nav-list { list-style: none; margin: 0; padding: 0; }
.mobile-nav-list li a {
  display: block;
  padding: 13px 18px;
  font-size: 15px;
  font-weight: bold;
  color: var(--gray-900);
  border-bottom: 1px solid var(--gray-200);
  text-decoration: none;
}
.mobile-nav-list li:last-child a { border-bottom: none; }
.mobile-nav-list li a:hover { background: var(--blue-light); color: var(--blue); text-decoration: none; }
.mobile-nav-sell a {
  background: var(--blue);
  color: var(--white) !important;
  text-align: center;
  font-size: 16px;
  padding: 14px 18px;
}
.mobile-nav-sell a:hover { background: var(--blue-dark) !important; }
.mobile-nav-section {
  padding: 7px 18px 5px;
  font-size: 10px;
  font-weight: bold;
  color: var(--gray-500);
  text-transform: uppercase;
  letter-spacing: 0.7px;
  background: var(--gray-100);
  border-bottom: 1px solid var(--gray-200);
}
.mobile-nav-signout a { color: var(--red) !important; }
.mobile-nav-signout a:hover { background: #fff5f5 !important; }

/* Mobile filter toggle button — browse page */
.mobile-filter-btn {
  display: none;
  width: 100%;
  margin-bottom: 12px;
  padding: 11px 16px;
  background: var(--white);
  border: 1.5px solid var(--gray-300);
  border-radius: 4px;
  font-size: 14px;
  font-weight: bold;
  color: var(--blue);
  cursor: pointer;
  text-align: left;
}
.mobile-filter-btn:hover { border-color: var(--blue); background: var(--blue-light); }

/* Scrollable table wrapper */
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }

/* ════════════════════════════════════════════════════════
   MOBILE BREAKPOINTS (≤ 640px)
   ════════════════════════════════════════════════════════ */
@media(max-width:640px) {

  /* Hide old desktop-only topbar — mobile menu covers everything */
  .topbar { display: none; }

  /* ── Header: [Logo | Hamburger] row, then [Search] full-width row ── */
  .header-inner { flex-wrap: wrap; gap: 8px; padding: 10px 12px; }
  .logo { flex: 1; min-width: 0; }
  .header-search { order: 3; flex: 1 1 100%; min-width: 0; }
  .header-sell-btn { display: none; }  /* move into hamburger menu */
  .hamburger-btn { display: flex; }

  /* ── Nav: scrolls horizontally, smaller text ── */
  .nav-links li a { padding: 8px 10px; font-size: 11px; }

  /* ── Listings grid: 2 columns ── */
  .listings-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }

  /* ── Browse: filter panel hidden behind toggle ── */
  .mobile-filter-btn { display: block; }
  .browse-layout { grid-template-columns: 1fr; }
  .filters-sidebar { display: none; }
  .filters-sidebar.mobile-open { display: block; margin-bottom: 14px; }

  /* ── Hero ── */
  .hero-banner { padding: 16px 14px; flex-direction: column; }
  .hero-content h1 { font-size: 20px; }
  .hero-stats { justify-content: center; gap: 8px; }
  .stat-box { flex: 1; min-width: 72px; padding: 8px 10px; }
  .stat-num { font-size: 18px; }

  /* ── Data tables: scroll horizontally ── */
  .data-table { min-width: 520px; }
  .tab-content { overflow-x: auto; }

  /* ── Auth box ── */
  .auth-box { padding: 20px 14px; }
  .auth-page { padding: 12px 0; }

  /* ── Forms ── */
  .form-actions { flex-direction: column; }
  .form-actions .btn { width: 100%; text-align: center; }
  .form-row.two-col, .form-row.three-col { grid-template-columns: 1fr; }

  /* ── Listing detail ── */
  .listing-h1 { font-size: 17px; }
  .price-display { font-size: 26px; }
  .bid-input-row { flex-direction: column; }
  .bid-input-row .btn { width: 100%; text-align: center; }

  /* ── Profile ── */
  .profile-header { flex-direction: column; }

  /* ── Order cards ── */
  .order-card { flex-wrap: wrap; }
  .order-actions { flex-direction: row; flex-wrap: wrap; gap: 6px; }
  .order-detail-layout { grid-template-columns: 1fr; }

  /* ── Dashboard ── */
  .dash-stats { grid-template-columns: repeat(2, 1fr); }
  .dash-columns { grid-template-columns: 1fr; }
  .dash-actions { gap: 8px; }

  /* ── Payouts ── */
  .earnings-grid { grid-template-columns: repeat(2, 1fr); }
  .payout-connect-box { flex-direction: column; }

  /* ── Trade cards ── */
  .offer-cards-row { flex-direction: column; }

  /* ── Results header ── */
  .results-header { flex-direction: column; align-items: flex-start; gap: 8px; }

  /* ── Footer: single column ── */
  .footer-grid { grid-template-columns: 1fr; gap: 16px; padding: 20px 0 16px; }

  /* ── Conversation bubbles ── */
  .bubble { max-width: 88%; }

  /* ── Cookie banner ── */
  .cookie-banner { left: 8px; right: 8px; padding: 12px 14px; }
  .cookie-banner-inner { flex-direction: column; align-items: stretch; text-align: center; }

  /* ── Tabs: scrollable ── */
  .dash-tabs { overflow-x: auto; flex-wrap: nowrap; }
  .dash-tab { white-space: nowrap; padding: 10px 14px; }
  .orders-subtabs { overflow-x: auto; flex-wrap: nowrap; }
  .sub-tab { white-space: nowrap; }
  .offers-tabs { overflow-x: auto; flex-wrap: nowrap; }

  /* ── Static pages ── */
  .static-page { padding: 18px 14px; }

  /* ── Admin stats ── */
  .admin-stats { grid-template-columns: repeat(2, 1fr); }
}

/* ════════════════════════════════════════════════════════
   EXTRA-SMALL (≤ 360px — very small phones only)
   ════════════════════════════════════════════════════════ */
@media(max-width:360px) {
  .listings-grid { grid-template-columns: 1fr; }
  .logo-poke, .logo-bay { font-size: 21px; }
}

/* ════════════════════════════════════════════════════════
   PRICE CHECK PAGE
   ════════════════════════════════════════════════════════ */
.price-check-page { max-width: 960px; margin: 0 auto; padding: 24px 0; }
.price-check-hero { text-align: center; padding: 32px 24px 24px; background: var(--blue-dark); border: 1px solid var(--border); border-radius: 4px; margin-bottom: 28px; }
.price-check-hero h1 { color: #fff; font-size: 28px; margin: 0 0 8px; }
.price-check-hero .page-sub { color: #c8d4f0; margin: 0 0 20px; }
.price-check-search-wrap { position: relative; max-width: 580px; margin: 0 auto; }
.price-check-input { width: 100%; padding: 14px 48px 14px 18px; font-size: 17px; border: 2px solid var(--yellow); border-radius: 4px; outline: none; box-sizing: border-box; }
.price-check-input:focus { border-color: #fff; }
.price-check-spinner { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); font-size: 22px; animation: spin 0.8s linear infinite; color: var(--yellow); }
@keyframes spin { to { transform: translateY(-50%) rotate(360deg); } }
.price-check-hint { color: #a0b0d0; font-size: 12px; margin: 12px 0 0; }

/* Results */
.price-results-meta { font-size: 13px; color: var(--gray-600); margin-bottom: 12px; padding: 0 2px; }
.price-load-more { text-align: center; margin-top: 24px; padding-bottom: 12px; }
.price-load-more .btn { min-width: 220px; }
.price-results { display: flex; flex-direction: column; gap: 18px; }
.no-results { text-align: center; color: var(--gray-600); padding: 32px; font-size: 15px; }

.price-card { display: flex; gap: 20px; background: #fff; border: 1px solid var(--border); border-radius: 4px; padding: 18px; align-items: flex-start; }
.price-card-img { width: 90px; flex-shrink: 0; border-radius: 4px; box-shadow: 0 2px 8px rgba(0,0,0,0.15); }
.price-card-no-img { width: 90px; height: 126px; flex-shrink: 0; background: var(--gray-100); border: 1px solid var(--border); border-radius: 4px; display: flex; align-items: center; justify-content: center; color: var(--gray-500); font-size: 11px; }
.price-card-body { flex: 1; min-width: 0; }
.price-card-header { margin-bottom: 12px; }
.price-card-name { display: block; font-size: 18px; font-weight: 700; color: var(--blue-dark); }
.price-card-meta { display: block; font-size: 13px; color: var(--gray-600); margin-top: 2px; }
.set-badge { background: var(--gray-200); color: var(--gray-700); padding: 1px 6px; border-radius: 3px; font-size: 11px; font-weight: 600; letter-spacing: 0.5px; }

/* Price table */
.price-table { width: 100%; border-collapse: collapse; font-size: 13px; margin-bottom: 12px; }
.price-table th { background: var(--gray-100); color: var(--gray-700); padding: 6px 10px; text-align: left; border-bottom: 2px solid var(--border); font-size: 11px; text-transform: uppercase; letter-spacing: 0.5px; }
.price-table td { padding: 7px 10px; border-bottom: 1px solid var(--gray-100); color: var(--gray-800); }
.price-table tr:last-child td { border-bottom: none; }
.price-market strong { color: var(--red); font-size: 15px; }
.price-source { color: var(--gray-500); font-size: 11px; }
.no-price { color: var(--gray-500); font-style: italic; font-size: 13px; margin: 0 0 12px; }
.price-browse-btn { font-size: 12px; padding: 5px 12px; }

/* ── Card autocomplete on listing create form ── */
.card-autocomplete { position: absolute; top: 100%; left: 0; right: 0; background: #fff; border: 2px solid var(--blue-dark); border-top: none; border-radius: 0 0 4px 4px; box-shadow: 0 6px 20px rgba(0,0,0,0.15); z-index: 200; max-height: 320px; overflow-y: auto; }
.ac-item { display: flex; align-items: center; gap: 10px; padding: 8px 12px; cursor: pointer; border-bottom: 1px solid var(--gray-100); transition: background 0.1s; }
.ac-item:last-child { border-bottom: none; }
.ac-item:hover { background: var(--blue-light, #eef2fc); }
.ac-item img { width: 36px; height: 50px; object-fit: contain; border-radius: 2px; flex-shrink: 0; }
.ac-no-img { width: 36px; height: 50px; flex-shrink: 0; background: var(--gray-100); border-radius: 2px; }
.ac-info { flex: 1; min-width: 0; }
.ac-name { display: block; font-weight: 700; font-size: 13px; color: var(--blue-dark); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ac-meta { display: block; font-size: 11px; color: var(--gray-500); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ac-price { font-weight: 700; font-size: 13px; color: var(--red); white-space: nowrap; flex-shrink: 0; }

/* Market price hint below card name row */
.market-price-hint { background: #f0f7f0; border: 1px solid #b8ddb8; border-radius: 4px; padding: 8px 14px; font-size: 13px; color: #2a6a2a; margin-bottom: 12px; }
.market-price-hint a { color: #1a4a1a; font-weight: 600; }

/* ── Market Data Box (listing show page) ── */
.market-data-box { background: #f8f9ff; border: 1px solid #c5cee8; border-radius: 6px; padding: 14px 16px; margin-bottom: 14px; }
.market-data-header { font-weight: 700; font-size: 13px; color: var(--blue-dark); margin-bottom: 10px; }
.market-data-sub { font-weight: 400; font-size: 11px; color: var(--gray-600); }
.market-data-stats { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.market-stat { background: #fff; border: 1px solid #dde3f5; border-radius: 4px; padding: 8px 14px; text-align: center; flex: 1; min-width: 60px; }
.market-stat-label { display: block; font-size: 10px; color: var(--gray-500); text-transform: uppercase; letter-spacing: .5px; }
.market-stat-value { display: block; font-size: 16px; font-weight: 700; color: var(--blue-dark); margin-top: 2px; }
.market-data-verdict { font-size: 12px; padding: 6px 10px; border-radius: 4px; margin-bottom: 8px; }
.market-above { background: #fff3e0; color: #e65100; border: 1px solid #ffcc80; }
.market-below { background: #e8f5e9; color: #2e7d32; border: 1px solid #a5d6a7; }
.market-data-link { font-size: 12px; color: var(--blue-dark); text-decoration: underline; }

/* ── PokéBay comps in price-check results ── */
.pb-comps-box { background: #eef2ff; border: 1px solid #c5cee8; border-radius: 4px; padding: 10px 14px; margin: 10px 0 6px; font-size: 13px; }
.pb-comps-title { font-weight: 700; color: var(--blue-dark); margin-bottom: 6px; display: block; }
.pb-comps-stats { display: flex; gap: 16px; flex-wrap: wrap; }
.pb-comps-stat { text-align: center; }
.pb-comps-stat-label { display: block; font-size: 10px; color: var(--gray-500); text-transform: uppercase; }
.pb-comps-stat-value { display: block; font-size: 14px; font-weight: 700; color: #2d3e8e; }

@media(max-width:600px) {
  .price-card { flex-direction: column; }
  .price-card-img { width: 70px; }
  .price-check-input { font-size: 15px; padding: 12px 14px; }
  .price-table { font-size: 12px; }
  .price-table th, .price-table td { padding: 5px 6px; }
}
