/* ============================================================
   CARD-STAR.COM — Master Stylesheet
   Aesthetic: Sporty-Premium / Dark Mode Trading Floor
   Fonts: Bebas Neue (display) + Barlow (body)
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&family=Barlow:ital,wght@0,300;0,400;0,500;0,600;0,700;0,800;1,400&family=Barlow+Condensed:wght@500;600;700&family=JetBrains+Mono:wght@400;500;600&display=swap');

/* ===== CSS VARIABLES ===== */
:root {
  --navy: #1B2A4A;
  --navy-dark: #0D1526;
  --navy-mid: #162240;
  --navy-light: #2A3D66;
  --red: #D42027;
  --red-dark: #A8191F;
  --red-glow: rgba(212,32,39,0.25);
  --gold: #F5C518;
  --gold-dark: #D4A710;
  --gold-glow: rgba(245,197,24,0.15);
  --green: #22C55E;
  --green-dark: #16A34A;
  --white: #FFFFFF;
  --off-white: #F0F1F5;
  --gray-50: #F8F9FB;
  --gray-100: #EDEEF2;
  --gray-200: #D8DAE2;
  --gray-300: #B0B4C1;
  --gray-400: #8A8FA0;
  --gray-500: #6B7080;
  --gray-600: #4E5260;
  --gray-700: #363944;
  --gray-800: #23262E;
  --gray-900: #151619;
  --font-display: 'Bebas Neue', sans-serif;
  --font-body: 'Barlow', sans-serif;
  --font-cond: 'Barlow Condensed', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.08);
  --shadow-md: 0 4px 20px rgba(0,0,0,0.12);
  --shadow-lg: 0 8px 40px rgba(0,0,0,0.18);
  --shadow-glow-red: 0 4px 20px var(--red-glow);
  --shadow-glow-gold: 0 4px 20px var(--gold-glow);
  --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --max-width: 1400px;
}

/* ===== RESET ===== */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }
body { font-family: var(--font-body); font-size: 15px; color: var(--gray-800); background: var(--off-white); line-height: 1.6; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button, input, select, textarea { font-family: inherit; font-size: inherit; }
ul, ol { list-style: none; }

/* ===== UTILITY ===== */
.container { max-width: var(--max-width); margin: 0 auto; padding: 0 24px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }
.text-gold { color: var(--gold); }
.text-red { color: var(--red); }
.text-green { color: var(--green); }
.text-muted { color: var(--gray-400); }
.text-mono { font-family: var(--font-mono); }
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-1 { gap: 8px; }
.gap-2 { gap: 16px; }
.gap-3 { gap: 24px; }

/* ===== ANNOUNCEMENT BAR ===== */
.announce-bar {
  background: linear-gradient(90deg, var(--navy-dark) 0%, var(--navy) 50%, var(--navy-dark) 100%);
  color: var(--gray-300);
  text-align: center;
  padding: 7px 16px;
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.3px;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}
.announce-bar strong { color: var(--gold); font-weight: 700; }

/* ===== SITE HEADER ===== */
.site-header {
  background: var(--navy);
  position: sticky;
  top: 0;
  z-index: 900;
  box-shadow: 0 2px 20px rgba(0,0,0,0.3);
}
.header-main {
  display: flex;
  align-items: center;
  padding: 10px 0;
  gap: 24px;
}
.logo-link {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.logo-link img { height: 42px; width: auto; }
.logo-text {
  font-family: var(--font-display);
  font-size: 1.9rem;
  letter-spacing: 2px;
  white-space: nowrap;
}
.logo-text .c1 { color: var(--white); }
.logo-text .c2 { color: var(--gold); }
.logo-text .c3 { color: var(--red); }

/* Search */
.header-search {
  flex: 1;
  max-width: 580px;
  position: relative;
}
.header-search input {
  width: 100%;
  padding: 11px 18px 11px 46px;
  border: 2px solid var(--navy-light);
  border-radius: 50px;
  background: var(--navy-dark);
  color: var(--white);
  font-size: 0.92rem;
  transition: var(--transition);
}
.header-search input:focus { outline: none; border-color: var(--gold); background: rgba(245,197,24,0.04); }
.header-search input::placeholder { color: var(--gray-400); }
.header-search .s-icon {
  position: absolute; left: 16px; top: 50%; transform: translateY(-50%);
  color: var(--gray-400); pointer-events: none;
}
.header-search .search-results {
  position: absolute; top: calc(100% + 6px); left: 0; right: 0;
  background: var(--white); border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg); max-height: 420px; overflow-y: auto;
  display: none; z-index: 950;
}
.header-search.active .search-results { display: block; }
.search-result-item {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 16px; border-bottom: 1px solid var(--gray-100);
  cursor: pointer; transition: background 0.15s;
}
.search-result-item:hover { background: var(--gray-50); }

/* Header Actions */
.header-actions {
  display: flex; align-items: center; gap: 6px; flex-shrink: 0;
}
.h-btn {
  display: flex; align-items: center; gap: 6px;
  padding: 8px 14px; border-radius: var(--radius-sm);
  font-family: var(--font-cond); font-weight: 600; font-size: 0.88rem;
  letter-spacing: 0.5px; text-transform: uppercase;
  color: var(--gray-200); transition: var(--transition); border: none; cursor: pointer; background: none;
}
.h-btn:hover { color: var(--gold); background: rgba(245,197,24,0.08); }
.h-btn svg { width: 18px; height: 18px; }
.h-btn.sell-btn {
  background: var(--red); color: var(--white);
  box-shadow: var(--shadow-glow-red);
}
.h-btn.sell-btn:hover { background: var(--red-dark); transform: translateY(-1px); }
.cart-count {
  background: var(--red); color: var(--white);
  font-size: 0.65rem; font-weight: 800;
  min-width: 17px; height: 17px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  margin-left: -4px;
}

/* Category Nav */
.cat-nav {
  background: var(--navy-dark);
  border-top: 1px solid rgba(255,255,255,0.06);
}
.cat-nav-inner {
  display: flex; align-items: center; gap: 0; overflow-x: auto;
  scrollbar-width: none;
}
.cat-nav-inner::-webkit-scrollbar { display: none; }
.cat-link {
  font-family: var(--font-cond); font-weight: 600;
  font-size: 0.92rem; letter-spacing: 0.8px; text-transform: uppercase;
  color: var(--gray-300); padding: 12px 20px;
  white-space: nowrap; position: relative;
  transition: color 0.2s;
}
.cat-link:hover, .cat-link.active { color: var(--gold); }
.cat-link::after {
  content: ''; position: absolute; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 0; height: 3px; background: var(--gold); border-radius: 2px; transition: width 0.25s;
}
.cat-link:hover::after, .cat-link.active::after { width: 50%; }
.cat-divider { width: 1px; height: 20px; background: rgba(255,255,255,0.08); flex-shrink: 0; }

/* ===== HERO ===== */
.hero {
  background: linear-gradient(140deg, var(--navy-dark) 0%, var(--navy) 45%, #1e3a6e 100%);
  position: relative; overflow: hidden;
  padding: 80px 0;
}
.hero-stripes {
  position: absolute; inset: 0;
  background: repeating-linear-gradient(-45deg, transparent, transparent 60px, rgba(255,255,255,0.012) 60px, rgba(255,255,255,0.012) 62px);
  pointer-events: none;
}
.hero-glow-1 {
  position: absolute; top: -40%; right: -15%;
  width: 700px; height: 700px;
  background: radial-gradient(circle, rgba(245,197,24,0.1) 0%, transparent 65%);
  pointer-events: none;
}
.hero-glow-2 {
  position: absolute; bottom: -25%; left: -8%;
  width: 500px; height: 500px;
  background: radial-gradient(circle, rgba(212,32,39,0.06) 0%, transparent 65%);
  pointer-events: none;
}
.hero-inner { position: relative; z-index: 2; display: flex; align-items: center; gap: 60px; }
.hero-content { flex: 1; }
.hero-content h1 {
  font-family: var(--font-display); font-size: 4.2rem; line-height: 0.95;
  color: var(--white); letter-spacing: 3px; margin-bottom: 18px;
}
.hero-content h1 .hl-gold { color: var(--gold); }
.hero-content h1 .hl-red { color: var(--red); }
.hero-content p { font-size: 1.12rem; color: var(--gray-300); max-width: 520px; line-height: 1.65; margin-bottom: 30px; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }

/* Stats bar inside hero */
.hero-stats {
  display: flex; gap: 40px; margin-top: 50px;
  padding-top: 30px; border-top: 1px solid rgba(255,255,255,0.08);
}
.hero-stat { text-align: center; }
.hero-stat .stat-num {
  font-family: var(--font-display); font-size: 2.2rem;
  color: var(--gold); letter-spacing: 1px;
}
.hero-stat .stat-label { font-size: 0.78rem; color: var(--gray-400); text-transform: uppercase; letter-spacing: 1px; }

/* Hero floating cards */
.hero-visual { flex: 0 0 440px; height: 380px; position: relative; perspective: 900px; }
.float-card {
  position: absolute; width: 170px; height: 238px;
  border-radius: 12px; box-shadow: 0 15px 50px rgba(0,0,0,0.35);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  transition: transform 0.4s;
  background-size: cover; background-position: center;
}
.float-card:hover { transform: scale(1.1) !important; z-index: 10 !important; }
.float-card .fc-icon { font-size: 3rem; margin-bottom: 8px; }
.float-card .fc-label {
  font-family: var(--font-display); color: rgba(255,255,255,0.92);
  font-size: 1.2rem; letter-spacing: 3px;
}
.fc-1 { background: linear-gradient(135deg,#0033A0,#004FCC); top:15px; left:0; transform:rotate(-7deg); animation:bob1 4s ease-in-out infinite; z-index:3; }
.fc-2 { background: linear-gradient(135deg,#FFCB05,#FF7700); top:0; left:130px; transform:rotate(3deg); animation:bob2 5s ease-in-out infinite; z-index:5; }
.fc-3 { background: linear-gradient(135deg,#C8102E,#8B1A2B); top:50px; left:240px; transform:rotate(6deg); animation:bob3 4.3s ease-in-out infinite; z-index:4; }
.fc-4 { background: linear-gradient(135deg,#003831,#006B52); top:120px; left:30px; transform:rotate(-3deg); animation:bob1 5.5s ease-in-out infinite; z-index:2; }
.fc-5 { background: linear-gradient(135deg,#6C3BAA,#9B59B6); top:100px; left:180px; transform:rotate(9deg); animation:bob2 4.1s ease-in-out infinite; z-index:1; }
@keyframes bob1 { 0%,100%{transform:rotate(-7deg) translateY(0)} 50%{transform:rotate(-7deg) translateY(-14px)} }
@keyframes bob2 { 0%,100%{transform:rotate(3deg) translateY(0)} 50%{transform:rotate(3deg) translateY(-11px)} }
@keyframes bob3 { 0%,100%{transform:rotate(6deg) translateY(0)} 50%{transform:rotate(6deg) translateY(-16px)} }

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 28px; border: none; border-radius: var(--radius-sm);
  font-family: var(--font-cond); font-weight: 700; font-size: 1rem;
  letter-spacing: 1.2px; text-transform: uppercase;
  cursor: pointer; transition: var(--transition); text-decoration: none;
}
.btn-lg { padding: 16px 36px; font-size: 1.1rem; }
.btn-sm { padding: 8px 18px; font-size: 0.85rem; }
.btn-primary { background: var(--red); color: var(--white); box-shadow: var(--shadow-glow-red); }
.btn-primary:hover { background: var(--red-dark); transform: translateY(-2px); box-shadow: 0 6px 30px var(--red-glow); }
.btn-secondary { background: transparent; color: var(--gold); border: 2px solid var(--gold); }
.btn-secondary:hover { background: rgba(245,197,24,0.08); transform: translateY(-2px); }
.btn-dark { background: var(--navy); color: var(--white); }
.btn-dark:hover { background: var(--navy-dark); }
.btn-gold { background: var(--gold); color: var(--navy-dark); }
.btn-gold:hover { background: var(--gold-dark); }
.btn-success { background: var(--green); color: var(--white); }
.btn-success:hover { background: var(--green-dark); }
.btn-ghost { background: none; color: var(--gray-600); border: 1px solid var(--gray-200); }
.btn-ghost:hover { border-color: var(--navy); color: var(--navy); }
.btn-block { width: 100%; }

/* ===== SECTION HEADERS ===== */
.section { padding: 60px 0; }
.section-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  margin-bottom: 32px; gap: 16px;
}
.section-head h2 {
  font-family: var(--font-display); font-size: 2.2rem;
  letter-spacing: 2px; color: var(--navy); position: relative;
}
.section-head h2::after {
  content: ''; position: absolute; bottom: -3px; left: 0;
  width: 50px; height: 4px; background: var(--gold); border-radius: 2px;
}
.section-head .see-all {
  font-family: var(--font-cond); font-weight: 600;
  font-size: 0.9rem; color: var(--red);
  text-transform: uppercase; letter-spacing: 1px;
}
.section-head .see-all:hover { color: var(--red-dark); }

/* ===== CATEGORY CARDS (Homepage) ===== */
.cat-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 18px; }
.cat-card {
  background: var(--white); border-radius: var(--radius-lg); overflow: hidden;
  box-shadow: var(--shadow-sm); transition: var(--transition);
  display: block; position: relative;
}
.cat-card:hover { transform: translateY(-8px); box-shadow: var(--shadow-lg); }
.cat-card-img {
  height: 160px; display: flex; align-items: center; justify-content: center;
  font-size: 4rem; position: relative;
}
.cat-card-img::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(transparent 50%, rgba(0,0,0,0.06));
}
.cat-hk .cat-card-img { background: linear-gradient(135deg,#0033A0,#005CE6); }
.cat-sc .cat-card-img { background: linear-gradient(135deg,#00A651,#00D46A); }
.cat-bk .cat-card-img { background: linear-gradient(135deg,#C8102E,#FF2D3B); }
.cat-bb .cat-card-img { background: linear-gradient(135deg,#003831,#007A5E); }
.cat-pk .cat-card-img { background: linear-gradient(135deg,#FFCB05,#FF9500); }
.cat-card-body { padding: 16px; text-align: center; }
.cat-card-body h3 {
  font-family: var(--font-cond); font-weight: 700;
  font-size: 1.15rem; text-transform: uppercase; letter-spacing: 1px;
  margin-bottom: 2px;
}
.cat-card-body p { font-size: 0.8rem; color: var(--gray-400); }
.cat-tag {
  position: absolute; top: 10px; right: 10px;
  background: rgba(0,0,0,0.45); color: var(--white);
  padding: 3px 10px; border-radius: 20px;
  font-size: 0.7rem; font-weight: 700;
  backdrop-filter: blur(4px);
}

/* ===== LISTING CARDS ===== */
.listings-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.listing-card {
  background: var(--white); border-radius: var(--radius-md); overflow: hidden;
  box-shadow: var(--shadow-sm); transition: var(--transition);
  display: flex; flex-direction: column; position: relative;
}
.listing-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-md); }
.lc-img {
  height: 200px; background: var(--gray-100);
  display: flex; align-items: center; justify-content: center;
  font-size: 3rem; position: relative; overflow: hidden;
}
.lc-img img { width: 100%; height: 100%; object-fit: cover; }
.lc-badges { position: absolute; top: 8px; left: 8px; display: flex; gap: 4px; flex-wrap: wrap; }
.badge {
  padding: 3px 9px; border-radius: 4px;
  font-family: var(--font-cond); font-weight: 700;
  font-size: 0.68rem; letter-spacing: 0.5px; text-transform: uppercase;
}
.badge-rc { background: var(--gold); color: var(--navy-dark); }
.badge-graded { background: var(--navy); color: var(--gold); }
.badge-auction { background: var(--red); color: var(--white); }
.badge-oos { background: rgba(0,0,0,0.6); color: var(--white); }
.badge-featured { background: linear-gradient(135deg, var(--gold), var(--gold-dark)); color: var(--navy-dark); }
.lc-watch {
  position: absolute; top: 8px; right: 8px;
  width: 32px; height: 32px; border-radius: 50%;
  background: rgba(255,255,255,0.9); backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: var(--transition); border: none;
  font-size: 0.9rem;
}
.lc-watch:hover { background: var(--red); color: var(--white); transform: scale(1.1); }
.lc-body { padding: 14px; flex: 1; display: flex; flex-direction: column; }
.lc-cat {
  font-size: 0.68rem; text-transform: uppercase; letter-spacing: 1.5px;
  font-weight: 700; color: var(--red); margin-bottom: 3px;
}
.lc-title {
  font-weight: 700; font-size: 0.92rem; color: var(--gray-800);
  margin-bottom: 3px; line-height: 1.3;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.lc-set { font-size: 0.78rem; color: var(--gray-400); margin-bottom: auto; }
.lc-footer {
  display: flex; align-items: flex-end; justify-content: space-between;
  padding-top: 10px; margin-top: 10px;
  border-top: 1px solid var(--gray-100);
}
.lc-price {
  font-family: var(--font-cond); font-size: 1.35rem;
  font-weight: 700; color: var(--navy);
}
.lc-price.auction-price { color: var(--red); }
.lc-bids { font-size: 0.75rem; color: var(--gray-400); }
.lc-seller {
  font-size: 0.72rem; color: var(--gray-400);
  display: flex; align-items: center; gap: 4px;
}
.lc-seller .seller-rating { color: var(--gold); font-weight: 700; }

/* Auction countdown */
.auction-timer {
  display: flex; gap: 6px; margin-top: 6px;
}
.timer-unit {
  background: var(--navy); color: var(--white);
  padding: 3px 6px; border-radius: 3px;
  font-family: var(--font-mono); font-size: 0.72rem; font-weight: 600;
  text-align: center; min-width: 32px;
}
.timer-unit small { display: block; font-size: 0.55rem; color: var(--gray-400); font-weight: 400; }

/* ===== FEATURES STRIP ===== */
.features-strip {
  background: var(--navy); padding: 36px 0;
  border-top: 3px solid var(--gold);
}
.features-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px;
  text-align: center; color: var(--white);
}
.feat-icon { font-size: 1.8rem; color: var(--gold); margin-bottom: 8px; }
.feat-title {
  font-family: var(--font-cond); font-weight: 700;
  font-size: 0.95rem; text-transform: uppercase; letter-spacing: 1px;
  margin-bottom: 2px;
}
.feat-desc { font-size: 0.78rem; color: var(--gray-400); }

/* ===== NEWSLETTER ===== */
.newsletter {
  background: linear-gradient(135deg, var(--red) 0%, var(--red-dark) 100%);
  padding: 50px 0; text-align: center; position: relative; overflow: hidden;
}
.newsletter::before {
  content: ''; position: absolute; inset: 0;
  background: repeating-linear-gradient(-45deg, transparent, transparent 35px, rgba(255,255,255,0.025) 35px, rgba(255,255,255,0.025) 37px);
}
.newsletter-inner { position: relative; z-index: 2; }
.newsletter h2 { font-family: var(--font-display); font-size: 2.4rem; color: var(--white); letter-spacing: 3px; margin-bottom: 8px; }
.newsletter p { color: rgba(255,255,255,0.8); font-size: 1rem; margin-bottom: 24px; }
.nl-form { display: flex; max-width: 440px; margin: 0 auto; gap: 10px; }
.nl-form input { flex:1; padding: 13px 18px; border:none; border-radius:var(--radius-sm); font-size:0.95rem; }
.nl-form button { white-space: nowrap; }

/* ===== FOOTER ===== */
.site-footer { background: var(--navy-dark); color: var(--gray-300); padding: 50px 0 24px; }
.footer-grid { display: grid; grid-template-columns: 2.2fr 1fr 1fr 1fr 1fr; gap: 36px; margin-bottom: 36px; }
.footer-brand .f-logo {
  font-family: var(--font-display); font-size: 1.6rem;
  color: var(--white); letter-spacing: 2px; margin-bottom: 10px;
}
.footer-brand .f-logo .fg { color: var(--gold); }
.footer-brand .f-logo .fr { color: var(--red); }
.footer-brand p { font-size: 0.82rem; line-height: 1.6; margin-bottom: 14px; }
.social-row { display: flex; gap: 8px; }
.social-icon {
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--navy-light); display: flex; align-items: center; justify-content: center;
  color: var(--gray-200); font-size: 0.8rem; transition: var(--transition);
}
.social-icon:hover { background: var(--gold); color: var(--navy-dark); }
.footer-col h4 {
  font-family: var(--font-cond); font-weight: 700;
  font-size: 0.9rem; text-transform: uppercase; letter-spacing: 1.5px;
  color: var(--white); margin-bottom: 14px;
}
.footer-col a { display: block; font-size: 0.82rem; color: var(--gray-300); margin-bottom: 7px; transition: color 0.2s; }
.footer-col a:hover { color: var(--gold); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.06);
  padding-top: 20px; display: flex; justify-content: space-between;
  font-size: 0.75rem; color: var(--gray-500);
}
.footer-bottom a { color: var(--gray-400); }
.footer-bottom a:hover { color: var(--gold); }

/* ===== BROWSE PAGE ===== */
.browse-layout { display: grid; grid-template-columns: 260px 1fr; gap: 24px; }
.filter-sidebar {
  background: var(--white); border-radius: var(--radius-md);
  padding: 20px; box-shadow: var(--shadow-sm); height: fit-content;
  position: sticky; top: 100px;
}
.filter-group { margin-bottom: 20px; }
.filter-group h4 {
  font-family: var(--font-cond); font-weight: 700;
  font-size: 0.85rem; text-transform: uppercase; letter-spacing: 1px;
  color: var(--navy); margin-bottom: 10px;
  padding-bottom: 6px; border-bottom: 2px solid var(--gray-100);
}
.filter-option {
  display: flex; align-items: center; gap: 8px;
  padding: 5px 0; font-size: 0.88rem; cursor: pointer;
}
.filter-option input[type="checkbox"],
.filter-option input[type="radio"] { accent-color: var(--red); }
.filter-option label { cursor: pointer; }
.filter-option .count { margin-left: auto; color: var(--gray-400); font-size: 0.78rem; }
.price-range { display: flex; gap: 8px; align-items: center; }
.price-range input {
  width: 100%; padding: 8px 10px; border: 1px solid var(--gray-200);
  border-radius: var(--radius-sm); font-size: 0.85rem;
}
.browse-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 20px; gap: 16px;
}
.browse-header .result-count { font-size: 0.88rem; color: var(--gray-500); }
.sort-select {
  padding: 8px 14px; border: 1px solid var(--gray-200);
  border-radius: var(--radius-sm); font-family: var(--font-body);
  font-size: 0.88rem; background: var(--white); cursor: pointer;
}

/* ===== LISTING DETAIL PAGE ===== */
.ld-layout { display: grid; grid-template-columns: 1fr 420px; gap: 36px; padding: 40px 0; }
.ld-gallery { position: sticky; top: 100px; }
.ld-main-img {
  width: 100%; aspect-ratio: 3/4; background: var(--gray-100);
  border-radius: var(--radius-lg); overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  font-size: 6rem; margin-bottom: 12px;
}
.ld-main-img img { width: 100%; height: 100%; object-fit: contain; }
.ld-thumbs { display: flex; gap: 8px; }
.ld-thumb {
  width: 64px; height: 64px; border-radius: var(--radius-sm);
  background: var(--gray-100); border: 2px solid transparent;
  overflow: hidden; cursor: pointer; transition: var(--transition);
}
.ld-thumb:hover, .ld-thumb.active { border-color: var(--gold); }
.ld-info { }
.ld-breadcrumb { font-size: 0.8rem; color: var(--gray-400); margin-bottom: 12px; }
.ld-breadcrumb a { color: var(--red); }
.ld-breadcrumb a:hover { text-decoration: underline; }
.ld-title { font-size: 1.6rem; font-weight: 800; color: var(--navy); line-height: 1.25; margin-bottom: 8px; }
.ld-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.ld-meta .badge { font-size: 0.72rem; }
.ld-price-box {
  background: var(--gray-50); border: 2px solid var(--gray-100);
  border-radius: var(--radius-md); padding: 20px; margin-bottom: 20px;
}
.ld-price {
  font-family: var(--font-display); font-size: 2.8rem;
  color: var(--navy); letter-spacing: 1px;
}
.ld-price-note { font-size: 0.82rem; color: var(--gray-400); margin-top: 2px; }
.ld-actions { display: flex; gap: 10px; margin-bottom: 20px; }
.ld-details { margin-bottom: 24px; }
.ld-details table { width: 100%; border-collapse: collapse; }
.ld-details th {
  text-align: left; padding: 8px 12px; font-family: var(--font-cond);
  font-weight: 600; font-size: 0.82rem; text-transform: uppercase;
  letter-spacing: 1px; color: var(--gray-500); background: var(--gray-50);
  border-bottom: 1px solid var(--gray-100);
}
.ld-details td {
  padding: 8px 12px; font-size: 0.9rem; border-bottom: 1px solid var(--gray-100);
}
.ld-seller-card {
  background: var(--white); border: 1px solid var(--gray-100);
  border-radius: var(--radius-md); padding: 16px;
  display: flex; align-items: center; gap: 12px;
}
.ld-seller-avatar {
  width: 48px; height: 48px; border-radius: 50%;
  background: var(--navy); color: var(--gold);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-size: 1.2rem;
}
.ld-seller-info h4 { font-size: 0.95rem; font-weight: 700; }
.ld-seller-info .seller-stats { font-size: 0.8rem; color: var(--gray-400); }
.ld-seller-info .seller-stats .gold { color: var(--gold); font-weight: 700; }

/* Price history mini chart area */
.ld-price-history {
  margin-top: 24px; padding: 16px;
  background: var(--white); border: 1px solid var(--gray-100);
  border-radius: var(--radius-md);
}
.ld-price-history h4 {
  font-family: var(--font-cond); font-weight: 700;
  font-size: 0.88rem; text-transform: uppercase; letter-spacing: 1px;
  color: var(--navy); margin-bottom: 12px;
}
.price-history-list { }
.ph-row { display: flex; justify-content: space-between; padding: 6px 0; border-bottom: 1px solid var(--gray-50); font-size: 0.82rem; }
.ph-row .ph-price { font-weight: 700; color: var(--navy); }
.ph-row .ph-date { color: var(--gray-400); }
.ph-row .ph-condition { color: var(--gray-500); }

/* ===== AUTH PAGES ===== */
.auth-page { display: flex; min-height: 80vh; align-items: center; justify-content: center; padding: 40px 0; }
.auth-card {
  background: var(--white); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md); width: 100%; max-width: 440px;
  padding: 40px;
}
.auth-card h1 {
  font-family: var(--font-display); font-size: 2rem;
  letter-spacing: 2px; color: var(--navy); text-align: center;
  margin-bottom: 6px;
}
.auth-card .auth-sub { text-align: center; color: var(--gray-400); font-size: 0.9rem; margin-bottom: 28px; }
.form-group { margin-bottom: 16px; }
.form-group label {
  display: block; font-family: var(--font-cond); font-weight: 600;
  font-size: 0.82rem; text-transform: uppercase; letter-spacing: 1px;
  color: var(--gray-600); margin-bottom: 5px;
}
.form-input {
  width: 100%; padding: 12px 14px;
  border: 2px solid var(--gray-200); border-radius: var(--radius-sm);
  font-size: 0.95rem; transition: var(--transition);
  background: var(--gray-50);
}
.form-input:focus { outline: none; border-color: var(--gold); background: var(--white); }
.form-input.error { border-color: var(--red); }
.form-error { color: var(--red); font-size: 0.8rem; margin-top: 4px; }
.auth-link { text-align: center; margin-top: 20px; font-size: 0.88rem; color: var(--gray-500); }
.auth-link a { color: var(--red); font-weight: 600; }
.auth-link a:hover { text-decoration: underline; }

/* ===== DASHBOARD ===== */
.dash-layout { display: grid; grid-template-columns: 240px 1fr; gap: 24px; padding: 30px 0; }
.dash-sidebar {
  background: var(--white); border-radius: var(--radius-md);
  padding: 16px; box-shadow: var(--shadow-sm); height: fit-content;
}
.dash-nav a {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border-radius: var(--radius-sm);
  font-family: var(--font-cond); font-weight: 600;
  font-size: 0.9rem; color: var(--gray-600);
  transition: var(--transition); margin-bottom: 2px;
}
.dash-nav a:hover, .dash-nav a.active { background: var(--gray-50); color: var(--navy); }
.dash-nav a.active { border-left: 3px solid var(--red); }
.dash-main { }
.dash-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 24px; }
.stat-card {
  background: var(--white); border-radius: var(--radius-md);
  padding: 20px; box-shadow: var(--shadow-sm);
}
.stat-card .sc-label { font-size: 0.78rem; color: var(--gray-400); text-transform: uppercase; letter-spacing: 1px; margin-bottom: 4px; }
.stat-card .sc-value { font-family: var(--font-display); font-size: 2rem; color: var(--navy); letter-spacing: 1px; }
.stat-card .sc-change { font-size: 0.78rem; font-weight: 600; }
.stat-card .sc-change.up { color: var(--green); }
.stat-card .sc-change.down { color: var(--red); }

/* ===== CREATE LISTING ===== */
.create-listing-form {
  max-width: 800px; margin: 0 auto; padding: 30px 0;
}
.cl-section {
  background: var(--white); border-radius: var(--radius-md);
  padding: 28px; box-shadow: var(--shadow-sm); margin-bottom: 20px;
}
.cl-section h3 {
  font-family: var(--font-cond); font-weight: 700;
  font-size: 1.1rem; text-transform: uppercase; letter-spacing: 1px;
  color: var(--navy); margin-bottom: 18px;
  padding-bottom: 10px; border-bottom: 2px solid var(--gray-100);
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-row-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; }

/* Card auto-fill search */
.autofill-search { position: relative; margin-bottom: 20px; }
.autofill-search input {
  width: 100%; padding: 14px 18px 14px 48px;
  border: 2px solid var(--gold); border-radius: var(--radius-md);
  font-size: 1rem; background: rgba(245,197,24,0.04);
}
.autofill-search input:focus { outline: none; border-color: var(--gold); box-shadow: var(--shadow-glow-gold); }
.autofill-results {
  position: absolute; top: calc(100% + 4px); left: 0; right: 0;
  background: var(--white); border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg); max-height: 350px; overflow-y: auto;
  display: none; z-index: 50;
}
.autofill-search.active .autofill-results { display: block; }
.af-item {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 16px; border-bottom: 1px solid var(--gray-100);
  cursor: pointer; transition: background 0.15s;
}
.af-item:hover { background: var(--gray-50); }
.af-item .af-name { font-weight: 700; font-size: 0.9rem; }
.af-item .af-set { font-size: 0.78rem; color: var(--gray-400); }
.af-item .af-price { font-family: var(--font-cond); font-weight: 700; color: var(--navy); margin-left: auto; }

/* Image upload */
.image-upload-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.img-upload-slot {
  aspect-ratio: 3/4; border: 2px dashed var(--gray-200);
  border-radius: var(--radius-sm); display: flex;
  align-items: center; justify-content: center;
  cursor: pointer; transition: var(--transition);
  color: var(--gray-400); font-size: 1.5rem;
  position: relative; overflow: hidden;
}
.img-upload-slot:hover { border-color: var(--gold); background: rgba(245,197,24,0.04); }
.img-upload-slot img { width: 100%; height: 100%; object-fit: cover; }

/* ===== PAGINATION ===== */
.pagination { display: flex; justify-content: center; gap: 4px; margin-top: 30px; }
.pagination a, .pagination span {
  display: flex; align-items: center; justify-content: center;
  min-width: 38px; height: 38px; padding: 0 10px;
  border-radius: var(--radius-sm); font-family: var(--font-cond);
  font-weight: 600; font-size: 0.9rem; transition: var(--transition);
}
.pagination a { background: var(--white); color: var(--gray-600); border: 1px solid var(--gray-200); }
.pagination a:hover { background: var(--navy); color: var(--white); border-color: var(--navy); }
.pagination span.current { background: var(--red); color: var(--white); border: 1px solid var(--red); }

/* ===== MOBILE RESPONSIVE ===== */
@media (max-width: 1100px) {
  .cat-grid { grid-template-columns: repeat(3, 1fr); }
  .listings-grid { grid-template-columns: repeat(3, 1fr); }
  .footer-grid { grid-template-columns: repeat(3, 1fr); }
  .hero-visual { display: none; }
  .ld-layout { grid-template-columns: 1fr; }
  .ld-gallery { position: static; }
}
@media (max-width: 768px) {
  .header-main { flex-wrap: wrap; gap: 8px; }
  .header-search { order: 3; flex: 1 1 100%; max-width: 100%; }
  .cat-grid { grid-template-columns: repeat(2, 1fr); }
  .listings-grid { grid-template-columns: repeat(2, 1fr); }
  .features-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .browse-layout { grid-template-columns: 1fr; }
  .filter-sidebar { position: static; }
  .dash-layout { grid-template-columns: 1fr; }
  .dash-stats { grid-template-columns: repeat(2, 1fr); }
  .hero-content h1 { font-size: 2.8rem; }
  .hero-stats { flex-wrap: wrap; gap: 24px; }
  .form-row, .form-row-3 { grid-template-columns: 1fr; }
  .nl-form { flex-direction: column; }
  .cat-nav-inner { padding: 0 12px; }
}
@media (max-width: 480px) {
  .listings-grid { grid-template-columns: 1fr; }
  .cat-grid { grid-template-columns: 1fr; }
  .image-upload-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ===== ANIMATIONS ===== */
@keyframes fadeUp { from { opacity:0; transform:translateY(24px); } to { opacity:1; transform:translateY(0); } }
.anim-in { animation: fadeUp 0.5s ease-out forwards; }
.anim-d1 { animation-delay: 0.05s; opacity: 0; }
.anim-d2 { animation-delay: 0.1s; opacity: 0; }
.anim-d3 { animation-delay: 0.15s; opacity: 0; }
.anim-d4 { animation-delay: 0.2s; opacity: 0; }
.anim-d5 { animation-delay: 0.25s; opacity: 0; }



/* === MOBILE: 2 columns on phone, not 1 === */
@media (max-width: 768px) {
  .cat-grid { grid-template-columns: repeat(2, 1fr) !important; gap: 12px !important; }
  .listings-grid { grid-template-columns: repeat(2, 1fr) !important; gap: 12px !important; }
  .cat-card-img { height: 120px !important; font-size: 3rem !important; }
  .cat-card-body { padding: 10px !important; }
  .cat-card-body h3 { font-size: 0.95rem !important; }
  .cat-card-body p { font-size: 0.72rem !important; }
  .cat-tag { font-size: 0.6rem !important; padding: 2px 6px !important; }
  .lc-img { height: 160px !important; }
  .lc-body { padding: 10px !important; }
  .lc-title { font-size: 0.82rem !important; }
  .lc-price { font-size: 1.1rem !important; }
  .features-grid { grid-template-columns: repeat(2, 1fr) !important; gap: 16px !important; }
  .feat-icon { font-size: 1.4rem !important; }
  .feat-title { font-size: 0.82rem !important; }
  .feat-desc { font-size: 0.7rem !important; }
  /* Why Card-Star section - stack on mobile */
  .why-grid { grid-template-columns: 1fr !important; }
  /* Hero stats 2x2 */
  .hero-stats { gap: 20px !important; }
  .hero-stat { flex: 0 0 40%; }
}

/* 5th category card spans full width on 2-col */
@media (max-width: 768px) {
  .cat-grid .cat-card:nth-child(5) { grid-column: 1 / -1; }
  .cat-grid .cat-card:nth-child(5) .cat-card-img { height: 100px !important; }
}

/* How it works - 2 col on mobile */
@media (max-width: 768px) {
  .section [style*="grid-template-columns:repeat(4"] {
    grid-template-columns: repeat(2, 1fr) !important;
  }
  /* Fee comparison - stack on mobile */
  .section [style*="grid-template-columns:repeat(3"] {
    grid-template-columns: 1fr !important;
    max-width: 300px !important;
  }
  /* Why section stack */
  .why-grid {
    grid-template-columns: 1fr !important;
  }
}
