/* ================= MARKETPLACE REDESIGN v2 ================= */

:root {
  --bg-primary:    #0a0a0a;
  --bg-secondary:  #111111;
  --bg-tertiary:   #161616;
  --bg-card:       #141414;
  --bg-hover:      #202020;
  --bg-image-box:  #111111;
  --bg-info-box:   #141414;

  --accent-red:       #dc2626;
  --accent-red-hover: #ef4444;
  --accent-red-dark:  #991b1b;

  --text-primary:   #ffffff;
  --text-secondary: rgba(255,255,255,0.65);
  --text-muted:     rgba(255,255,255,0.4);

  --border-color: rgba(255,255,255,0.07);
  --border-hover: rgba(255,255,255,0.14);

  --sidebar-width: 220px;
  --nav-height:    60px;

  --font-display: 'Rajdhani', sans-serif;
  --font-body:    'Outfit', sans-serif;

  /* Rarity colours */
  --rarity-common:    #6B7280;
  --rarity-uncommon:  #4ade80;
  --rarity-rare:      #6366F1;
  --rarity-epic:      #9333EA;
  --rarity-legendary: #FACC15;
  --rarity-event:     #B91C1C;
  

  /* Shop cards */
  --shop-banner-h: 110px;
  --shop-name-h:   28px;
  --shop-info-h:   28px;
  --shop-btn-h:    38px;
}

*, *::before, *::after { box-sizing: border-box; }

body {
  background: var(--bg-primary) !important;
  font-family: var(--font-body);
  margin: 0; padding: 0;
  overflow-x: hidden;
}

/* ================= PAGE LAYOUT ================= */
.marketplace-wrapper {
  display: flex;
  height: calc(100vh - var(--nav-height));
  overflow: hidden;
  background: var(--bg-primary);
}

.below-dashboard { width: 100%; background: #000; }

/* ================= FILTER SIDEBAR ================= */
.filter-sidebar {
  width: var(--sidebar-width);
  min-width: var(--sidebar-width);
  background: var(--bg-secondary);
  border-right: 1px solid var(--border-color);
  padding: 24px 16px;
  overflow-y: auto;
  height: 100%;
  flex-shrink: 0;
}

.sidebar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.sidebar-header h2 {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
  letter-spacing: 0.5px;
}

.sidebar-reset-btn {
  font-size: 12px;
  font-weight: 600;
  color: var(--accent-red);
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--font-body);
  padding: 0;
  transition: opacity 0.2s;
}

.sidebar-reset-btn:hover { opacity: 0.7; }

.close-sidebar { display: none; }

.filter-section-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.5px;
  color: var(--text-muted);
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 10px;
  cursor: default;
}

.filter-section-label .section-toggle {
  margin-left: auto;
  font-size: 10px;
  color: var(--text-muted);
}

.filter-group { margin-bottom: 22px; }

/* Quick filter pills */
.quick-filter-pills {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.quick-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  background: transparent;
  cursor: pointer;
  transition: all 0.2s;
  width: 100%;
  text-align: left;
  color: var(--text-secondary);
  font-size: 13px;
  font-family: var(--font-body);
  font-weight: 500;
}

.quick-pill .pill-icon {
  width: 20px; height: 20px;
  border-radius: 6px;
  background: var(--bg-tertiary);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; font-size: 10px;
  transition: all 0.2s;
}

.quick-pill:hover {
  background: var(--bg-hover);
  border-color: var(--border-hover);
  color: var(--text-primary);
}

.quick-pill.active {
  background: rgba(220,38,38,0.12);
  border-color: rgba(220,38,38,0.4);
  color: var(--text-primary);
}

.quick-pill.active .pill-icon { background: rgba(220,38,38,0.25); }

/* Radio options */
.filter-options {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.radio-option {
  display: flex; align-items: center; gap: 10px;
  cursor: pointer; padding: 7px 8px; border-radius: 7px;
  transition: all 0.2s; position: relative;
}

.radio-option:hover { background: var(--bg-hover); }

.radio-option input[type="radio"] { position: absolute; opacity: 0; pointer-events: none; }

.radio-custom {
  width: 14px; height: 14px;
  border: 2px solid rgba(255,255,255,0.2);
  border-radius: 50%; position: relative;
  transition: all 0.2s; flex-shrink: 0;
}

.radio-option input[type="radio"]:checked ~ .radio-custom {
  border-color: var(--accent-red);
  background: var(--accent-red);
  box-shadow: 0 0 0 3px rgba(220,38,38,0.15);
}

.radio-custom::after {
  content: '';
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%,-50%) scale(0);
  width: 4px; height: 4px;
  background: white; border-radius: 50%;
  transition: transform 0.2s;
}

.radio-option input[type="radio"]:checked ~ .radio-custom::after {
  transform: translate(-50%,-50%) scale(1);
}

.option-text {
  font-size: 13px; color: var(--text-secondary);
  flex: 1; font-weight: 500; transition: color 0.2s;
}

.radio-option:hover .option-text,
.radio-option input[type="radio"]:checked ~ .option-text { color: var(--text-primary); }

.count-badge {
  background: var(--bg-tertiary); color: var(--text-muted);
  padding: 2px 6px; border-radius: 10px;
  font-size: 11px; font-weight: 600;
  min-width: 20px; text-align: center;
}

.radio-option input[type="radio"]:checked ~ .count-badge {
  background: var(--accent-red); color: white;
}

.filter-divider { height: 1px; background: var(--border-color); margin: 16px 0; }

/* Price inputs */
.price-inputs { display: flex; flex-direction: column; gap: 8px; }

.price-input-row { display: flex; align-items: center; gap: 8px; }

.price-input-row label {
  font-size: 11px; color: var(--text-muted); font-weight: 600;
  width: 26px; flex-shrink: 0; font-family: var(--font-display);
}

.price-inputs input {
  flex: 1; min-width: 0; width: 0;
  background: var(--bg-tertiary); border: 1px solid var(--border-color);
  color: var(--text-primary); padding: 6px 8px; border-radius: 7px;
  font-size: 12px; font-family: var(--font-body);
  outline: none; transition: all 0.2s;
}

.price-inputs input:focus {
  border-color: var(--accent-red);
  background: var(--bg-card);
  box-shadow: 0 0 0 3px rgba(220,38,38,0.08);
}

.price-inputs input::placeholder { color: var(--text-muted); }

.apply-filters-btn {
  width: 100%; padding: 11px;
  background: var(--accent-red); color: white; border: none;
  border-radius: 8px; font-size: 13px; font-weight: 700;
  font-family: var(--font-display); letter-spacing: 0.5px;
  cursor: pointer; transition: all 0.2s; margin-top: 4px;
}

.apply-filters-btn:hover {
  background: var(--accent-red-hover);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(220,38,38,0.3);
}

/* ================= MAIN CONTENT ================= */
.marketplace-main {
  flex: 1; display: flex; flex-direction: column;
  overflow: hidden; min-width: 0;
}

/* ================= TOP BAR ================= */
.marketplace-topbar {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 20px;
  background: rgba(17,17,17,0.98);
  border-bottom: 1px solid var(--border-color);
  flex-shrink: 0; backdrop-filter: blur(10px);
}

.search-container {
  flex: 1; max-width: 440px; position: relative;
}

.search-container input {
  width: 100%; padding: 10px 40px 10px 14px;
  background: var(--bg-tertiary); border: 1px solid var(--border-color);
  color: var(--text-primary); font-size: 13px;
  font-family: var(--font-body); border-radius: 8px;
  outline: none; transition: all 0.25s;
}

.search-container input:focus {
  border-color: var(--accent-red);
  box-shadow: 0 0 0 3px rgba(220,38,38,0.08);
  background: var(--bg-card);
}

.search-container input::placeholder { color: var(--text-muted); }

.search-icon {
  position: absolute; right: 12px; top: 50%;
  transform: translateY(-50%);
  width: 16px; height: 16px;
  color: var(--text-muted); pointer-events: none; stroke-width: 2.5;
}

.create-listing-btn {
  display: flex; align-items: center; gap: 7px;
  background: linear-gradient(135deg, var(--accent-red), var(--accent-red-hover));
  color: white; border: none; padding: 10px 18px;
  border-radius: 8px; font-size: 13px; font-weight: 700;
  font-family: var(--font-display); cursor: pointer;
  letter-spacing: 0.5px;
  box-shadow: 0 4px 14px rgba(220,38,38,0.3);
  transition: all 0.25s; white-space: nowrap; flex-shrink: 0;
}

.create-listing-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(220,38,38,0.4);
}

.plus-icon { width: 16px; height: 16px; stroke-width: 3; }

/* ================= FILTER ICON (mobile) ================= */
.filter-icon-btn {
  display: none; align-items: center; justify-content: center;
  width: 40px; height: 40px;
  background: var(--bg-tertiary); border: 1px solid var(--border-color);
  border-radius: 8px; cursor: pointer; flex-shrink: 0;
  transition: all 0.2s; padding: 0; position: relative;
}

.filter-icon-btn:hover { border-color: var(--accent-red); }
.filter-icon-btn.active { border-color: var(--accent-red); background: rgba(220,38,38,0.1); }

.filter-icon-btn img { width: 20px; height: 20px; object-fit: contain; filter: brightness(0) invert(0.6); }
.filter-icon-btn:hover img, .filter-icon-btn.active img { filter: brightness(0) invert(1); }

.filter-icon-btn .filter-icon-fallback { width: 18px; height: 18px; color: var(--text-secondary); }
.filter-icon-btn:hover .filter-icon-fallback { color: var(--text-primary); }

.filter-active-dot {
  position: absolute; top: 5px; right: 5px;
  width: 6px; height: 6px;
  background: var(--accent-red); border-radius: 50%;
  display: none; border: 1.5px solid var(--bg-primary);
}

.filter-icon-btn.has-active-filters .filter-active-dot { display: block; }

/* ================= SCROLLABLE AREA ================= */
.marketplace-scroll-area {
  flex: 1; overflow-y: auto; overflow-x: hidden;
}

/* ================= HERO BANNER ================= */
.marketplace-hero {
  margin: 16px 20px 0;
  border-radius: 14px; overflow: hidden;
  position: relative; background: #0d0d0d;
  border: 1px solid rgba(220,38,38,0.2);
  display: flex; align-items: stretch;
  height: 200px; flex-shrink: 0;
  box-shadow: 0 8px 40px rgba(0,0,0,0.5), 0 0 0 1px rgba(220,38,38,0.05);
}

.hero-bg {
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 65% 90% at 78% 50%, rgba(175,20,20,0.6) 0%, transparent 70%),
    radial-gradient(ellipse 40% 60% at 58% 25%, rgba(220,38,38,0.28) 0%, transparent 60%),
    radial-gradient(ellipse 35% 50% at 92% 80%, rgba(140,10,10,0.45) 0%, transparent 60%),
    linear-gradient(135deg, #080808 0%, #0e0606 40%, #180404 100%);
  pointer-events: none;
}

.marketplace-hero::before {
  content: '';
  position: absolute; left: 0; top: 0; bottom: 0; width: 2px;
  background: linear-gradient(to bottom, transparent 5%, rgba(220,38,38,0.9) 50%, transparent 95%);
  z-index: 5;
}

.hero-left {
  position: relative; z-index: 5;
  padding: 22px 28px;
  display: flex; flex-direction: column; justify-content: center; gap: 8px;
  flex: 0 0 280px;
}

.hero-tag {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(220,38,38,0.18); border: 1px solid rgba(220,38,38,0.45);
  color: #ff6b6b; font-size: 9px; font-weight: 700;
  letter-spacing: 1.5px; text-transform: uppercase;
  padding: 3px 9px; border-radius: 4px; width: fit-content;
}

.hero-tag-dot {
  width: 5px; height: 5px; background: #ff4444; border-radius: 50%;
  box-shadow: 0 0 5px #ff4444;
  animation: heroPulse 2s ease-in-out infinite;
}

@keyframes heroPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.7); }
}

.hero-headline {
  font-family: var(--font-display); font-weight: 700;
  font-size: 32px; line-height: 1.05; color: var(--text-primary);
  letter-spacing: 0.3px; margin: 0;
}

.hero-headline .hero-accent { color: var(--accent-red-hover); display: block; }

.hero-sub {
  font-size: 11px; color: rgba(255,255,255,0.45);
  line-height: 1.5; max-width: 200px;
}

.hero-btn {
  display: inline-flex; align-items: center; gap: 7px;
  background: linear-gradient(135deg, var(--accent-red), #e53535);
  color: white; border: none; padding: 9px 18px; border-radius: 7px;
  font-size: 12px; font-weight: 700; font-family: var(--font-display);
  letter-spacing: 0.8px; text-transform: uppercase; cursor: pointer;
  width: fit-content; text-decoration: none;
  box-shadow: 0 4px 18px rgba(220,38,38,0.38);
  transition: all 0.25s; margin-top: 2px;
}

.hero-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 26px rgba(220,38,38,0.5);
  background: linear-gradient(135deg, #e53535, #f04444);
}

.hero-btn svg { width: 13px; height: 13px; stroke-width: 2.5; }

.hero-divider {
  position: relative; z-index: 5; width: 1px;
  background: linear-gradient(to bottom, transparent, rgba(255,255,255,0.07), transparent);
  align-self: stretch; margin: 20px 0; flex-shrink: 0;
}

.hero-items {
  position: relative; z-index: 5;
  display: flex; align-items: center; gap: 10px;
  padding: 16px 22px; flex: 1; justify-content: flex-end;
}

.hero-item-card {
  background: rgba(255,255,255,0.035);
  border: 1px solid rgba(255,255,255,0.09);
  border-radius: 11px; padding: 12px 14px 10px;
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  width: 138px; flex-shrink: 0; backdrop-filter: blur(8px);
  transition: all 0.3s; position: relative; overflow: hidden; cursor: pointer;
}

.hero-item-card::after {
  content: ''; position: absolute; bottom: 0; left: 0; right: 0;
  height: 1.5px;
  background: linear-gradient(90deg, transparent, rgba(220,38,38,0.6), transparent);
  opacity: 0; transition: opacity 0.3s;
}

.hero-item-card:hover {
  border-color: rgba(220,38,38,0.35);
  background: rgba(220,38,38,0.06);
  transform: translateY(-3px);
  box-shadow: 0 10px 28px rgba(0,0,0,0.5);
}

.hero-item-card:hover::after { opacity: 1; }

.hero-item-img {
  width: 58px; height: 58px; object-fit: contain;
  filter: drop-shadow(0 4px 10px rgba(0,0,0,0.7));
}

.hero-item-rarity {
  font-size: 9px; font-weight: 700; letter-spacing: 1px;
  text-transform: uppercase; color: rgba(255,255,255,0.35);
}

.hero-item-name {
  font-family: var(--font-display); font-size: 12px; font-weight: 700;
  color: var(--text-primary); text-align: center; letter-spacing: 0.2px; line-height: 1.2;
}

.hero-item-price {
  display: flex; align-items: center; gap: 4px;
  font-family: var(--font-display); font-size: 14px; font-weight: 700;
  color: #fbbf24; margin-top: 2px;
}

.hero-coin {
  width: 12px; height: 12px;
  background: radial-gradient(circle at 35% 35%, #fde68a, #f59e0b);
  border-radius: 50%; box-shadow: 0 0 5px rgba(251,191,36,0.35); flex-shrink: 0;
}

/* ================= SECTION HEADER ================= */
.section-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 20px 10px;
}

.section-title {
  font-family: var(--font-display); font-size: 18px; font-weight: 700;
  color: var(--text-primary); letter-spacing: 0.3px;
}

.section-view-all {
  font-size: 12px; font-weight: 600; color: var(--accent-red);
  cursor: pointer; transition: opacity 0.2s;
  font-family: var(--font-body); background: none; border: none;
  padding: 0; text-decoration: none;
}

.section-view-all:hover { opacity: 0.7; }

/* ================= MARKETPLACE GRID ================= */
.marketplace-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(clamp(130px, 13vw, 185px), 1fr));
  gap: clamp(8px, 1vw, 14px);
  padding: 0 20px 20px;
  align-items: stretch;
}

/* ================= ITEM CARDS ================= */
.marketplace-card {
  background: var(--bg-card);
  border-radius: 12px;
  border: 1px solid var(--border-color);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  transition: border-color 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease;
  height: 100%;
}

.marketplace-card:hover {
  border-color: rgba(220,38,38,0.45);
  box-shadow: 0 8px 28px rgba(220,38,38,0.15), 0 0 0 1px rgba(220,38,38,0.06);
  transform: translateY(-3px);
}

/* Image - UNIFORM DARK GREY, NO HEIGHT CHANGE */
.card-image-container {
  background: var(--bg-card);
  height: 105px;
  border-radius: 12px 12px 0 0;
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}

.card-image {
  width: 100%; height: 100%; object-fit: contain;
  padding: 10px;
  transition: transform 0.5s cubic-bezier(0.4,0,0.2,1);
}

.marketplace-card:hover .card-image { transform: scale(1.06); }

/* Info block — UNIFORM DARK GREY */
.card-info-block {
  padding: 9px 10px 6px;
  display: flex; flex-direction: column; gap: 2px;
  background: var(--bg-card);
  flex-shrink: 0;
}

/* Item name — larger */
.card-item-name {
  font-family: var(--font-display);
  font-size: clamp(12px, 1.1vw, 14px);
  font-weight: 700; color: var(--text-primary);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  letter-spacing: 0.2px;
}

/* Rarity — smaller than name */
.card-rarity {
  font-size: clamp(8px, 0.7vw, 9px);
  font-weight: 600; letter-spacing: 0.5px; text-transform: uppercase;
}

.card-rarity.common    { color: var(--rarity-common); }
.card-rarity.uncommon  { color: var(--rarity-uncommon); }
.card-rarity.rare      { color: var(--rarity-rare); }
.card-rarity.epic      { color: var(--rarity-epic); }
.card-rarity.legendary { color: var(--rarity-legendary); }
.card-rarity.premium-legendary    { color: #FACC15; }
.card-rarity.achievement-exclusive { color: #B91C1C; }
.card-rarity.event-exclusive       { color: #B91C1C; }
.card-rarity.skin-sale-exclusive   { color: #B91C1C; }
.card-rarity.gamepass              { color: #B91C1C; }
.card-rarity.staff-exclusive       { color: #B91C1C; }
.card-rarity.clan-rewards-exclusive { color: #B91C1C; }
.card-rarity.wandering-trader-exclusive { color: #B91C1C; }
.card-rarity.gift-from-developers  { color: #B91C1C; }

/* Price + category row — UNIFORM DARK GREY */
.card-bottom-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 7px 10px;
  background: var(--bg-card);
  flex-shrink: 0;
}

.card-price {
  display: flex; align-items: center; gap: 5px;
  font-family: var(--font-display);
  font-size: clamp(11px, 1.1vw, 13px);
  font-weight: 700; color: #fbbf24; white-space: nowrap;
}

.coin-icon {
  width: 1em; height: 1em;
  filter: drop-shadow(0 1px 2px rgba(251,191,36,0.3));
  flex-shrink: 0;
}

.card-category-badge {
  font-family: var(--font-display);
  font-size: clamp(8px, 0.75vw, 9px);
  font-weight: 700; letter-spacing: 0.6px; text-transform: uppercase;
  padding: 3px 7px; border-radius: 4px; flex-shrink: 0;
}

/* Selling = red, Buying = grey */
.card-category-badge.buying  { background: rgba(156,163,175,0.12); color: #9ca3af; border: 1px solid rgba(156,163,175,0.25); }
.card-category-badge.selling { background: rgba(220,38,38,0.15);   color: #ef4444; border: 1px solid rgba(220,38,38,0.3); }

/* Reserved spacer so hover actions don't cause layout shift */
.card-spacer {
  height: 46px;
  flex-shrink: 0;
}

/* Hover action row — absolutely positioned over the spacer */
.card-hover-actions {
  display: flex; align-items: center; gap: 6px;
  padding: 0 8px; height: 0; overflow: hidden; opacity: 0;
  background: var(--bg-card);
  border-top: 0px solid var(--border-color);
  position: absolute; bottom: 0; left: 0; right: 0;
  transition:
    height 0.28s cubic-bezier(0.4,0,0.2,1),
    opacity 0.22s ease,
    border-width 0.1s ease;
  pointer-events: none;
  flex-shrink: 0;
}

.marketplace-card:hover .card-hover-actions {
  height: 46px; opacity: 1;
  border-top-width: 1px; padding: 0 8px;
  pointer-events: all;
}

.card-contact-btn {
  flex: 1; height: 28px;
  background: var(--accent-red); color: white; border: none;
  border-radius: 6px; font-family: var(--font-display);
  font-size: clamp(9px, 0.85vw, 11px);
  font-weight: 700; letter-spacing: 0.5px; text-transform: uppercase;
  cursor: pointer; transition: background 0.2s; max-width: 70%;
}

.card-contact-btn:hover { background: var(--accent-red-hover); }

.card-expand-btn {
  display: flex; align-items: center; justify-content: center;
  width: 28px; height: 28px; flex-shrink: 0;
  background: var(--bg-tertiary); border: 1px solid var(--border-color);
  border-radius: 6px; color: var(--text-secondary);
  font-size: 13px; cursor: pointer; transition: all 0.2s;
}

.card-expand-btn:hover {
  border-color: var(--accent-red); color: var(--text-primary);
  background: rgba(220,38,38,0.1);
}

/* Hide old sub-elements */
.card-category-row, .card-title-row, .card-info-row,
.card-btn-row, .card-content, .card-hover-info { display: none !important; }

/* ================= SHOP CARDS - REDESIGNED ================= */
.shop-card {
  background: var(--bg-card);
  border-radius: 12px; overflow: hidden;
  border: 1px solid var(--border-color);
  cursor: pointer; display: flex; flex-direction: column;
  position: relative;
  transition: border-color 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease;
  height: 100%;
}

.shop-card:hover {
  border-color: rgba(220,38,38,0.45);
  box-shadow: 0 8px 28px rgba(220,38,38,0.15), 0 0 0 1px rgba(220,38,38,0.06);
  transform: translateY(-3px);
}

/* Shop logo/image container - same height as item cards image */
.shop-banner-container {
  background: var(--bg-card);
  height: 105px;
  flex-shrink: 0; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  border-radius: 12px 12px 0 0;
}

.shop-banner {
  max-width: 80%; max-height: 80%; 
  object-fit: contain;
  transition: transform 0.5s cubic-bezier(0.4,0,0.2,1), opacity 0.3s ease;
}

.shop-card:hover .shop-banner { transform: scale(1.06); opacity: 0.9; }

/* Shop name - matches item name styling */
.shop-title-row {
  background: var(--bg-card);
  flex-shrink: 0; display: flex; align-items: center; justify-content: flex-start;
  padding: 9px 10px 6px;
}

.shop-title {
  font-family: var(--font-display);
  font-size: clamp(12px, 1.1vw, 14px);
  font-weight: 700; color: var(--text-primary);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  letter-spacing: 0.2px; text-align: left; width: 100%;
}

/* Item count - matches rarity styling */
.shop-info-row {
  background: var(--bg-card);
  flex-shrink: 0; display: flex; align-items: center; justify-content: flex-start;
  padding: 0 10px 7px;
}

.shop-products-preview {
  font-size: clamp(10px, 0.85vw, 11px);
  color: var(--text-secondary);
  font-weight: 600; font-family: var(--font-display); white-space: nowrap;
  text-transform: uppercase; letter-spacing: 0.5px;
}

.shop-spacer { display: none; }

.shop-btn-row {
  display: flex; align-items: center; gap: 6px;
  padding: 7px 10px 10px;
  background: var(--bg-card);
  border-top: 1px solid var(--border-color);
  flex-shrink: 0;
}

.view-shop-btn {
  flex: 1; height: 28px;
  background: var(--accent-red); color: white; border: none;
  border-radius: 6px; font-family: var(--font-display);
  font-size: clamp(9px, 0.85vw, 11px);
  font-weight: 700; letter-spacing: 0.5px; text-transform: uppercase;
  cursor: pointer; transition: background 0.2s; line-height: 1;
}

.view-shop-btn:hover { background: var(--accent-red-hover); }

.coin-icon-small { display: none; }
.shop-content { display: none; }
.shop-hover-info { display: none; }

/* ================= DELETE BUTTON ================= */
.delete-btn {
  position: absolute; top: 6px; right: 6px;
  width: 20px; height: 20px;
  background: rgba(220,38,38,0.9); color: white; border: none;
  border-radius: 50%; font-size: 13px; font-weight: bold;
  cursor: pointer; display: none; align-items: center; justify-content: center;
  z-index: 10; transition: all 0.2s; line-height: 1; backdrop-filter: blur(10px);
}

.marketplace-card:hover .delete-btn,
.shop-card:hover .delete-btn { display: flex; }

.delete-btn:hover { background: var(--accent-red-dark); transform: scale(1.1); }

/* ================= ITEM DETAIL MODAL ================= */
.item-detail-modal {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.8); backdrop-filter: blur(8px);
  z-index: 10000; display: flex; align-items: center; justify-content: center;
  padding: 20px; animation: fadeInOverlay 0.2s ease;
}

@keyframes fadeInOverlay { from { opacity: 0; } to { opacity: 1; } }

.item-detail-inner {
  background: var(--bg-card); border: 1px solid var(--border-color);
  border-radius: 18px; width: 100%; max-width: 460px; overflow: hidden;
  animation: slideUpModal 0.3s cubic-bezier(0.4,0,0.2,1); position: relative;
}

@keyframes slideUpModal {
  from { opacity: 0; transform: translateY(22px); }
  to   { opacity: 1; transform: translateY(0); }
}

.item-detail-image-wrap {
  height: clamp(150px, 20vw, 200px); background: var(--bg-image-box);
  display: flex; align-items: center; justify-content: center;
  position: relative; overflow: hidden;
}

.item-detail-image-wrap img {
  max-height: 85%; max-width: 80%; width: auto; height: auto; object-fit: contain;
}

.item-detail-close {
  position: absolute; top: 10px; right: 10px;
  width: 32px; height: 32px;
  background: rgba(0,0,0,0.7); backdrop-filter: blur(8px);
  border: none; border-radius: 50%; color: white; font-size: 18px;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: all 0.2s; line-height: 1;
}

.item-detail-close:hover { background: var(--accent-red); transform: scale(1.1); }

.item-detail-body {
  padding: clamp(14px, 1.8vw, 22px);
  display: flex; flex-direction: column; gap: 12px;
}

.item-detail-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }

.item-detail-name {
  font-family: var(--font-display); font-size: clamp(18px, 2.2vw, 24px);
  font-weight: 700; color: var(--text-primary); letter-spacing: 0.3px; margin: 0;
}

.item-detail-category {
  display: flex; align-items: center; gap: 5px; padding: 4px 10px; border-radius: 20px;
  font-size: 11px; font-weight: 700; font-family: var(--font-display);
  letter-spacing: 0.5px; text-transform: uppercase; white-space: nowrap; flex-shrink: 0;
}

/* Modal badges match card badge colours */
.item-detail-category.buying  { background: rgba(156,163,175,0.12); color: #9ca3af; border: 1px solid rgba(156,163,175,0.25); }
.item-detail-category.selling { background: rgba(220,38,38,0.15);   color: #ef4444; border: 1px solid rgba(220,38,38,0.3); }

.item-detail-price {
  display: flex; align-items: center; gap: 7px;
  font-family: var(--font-display);
  font-size: clamp(20px, 2.2vw, 26px); font-weight: 700; color: #fbbf24;
}

.item-detail-price .coin-icon { width: 1em; height: 1em; }

.item-detail-desc {
  font-size: 13px; color: var(--text-secondary); line-height: 1.6;
  padding: 11px; background: var(--bg-secondary); border-radius: 9px;
}

.item-detail-seller {
  display: flex; align-items: center; gap: 10px;
  padding: 11px; background: var(--bg-secondary); border-radius: 9px;
}

.item-detail-seller img { width: 34px; height: 34px; border-radius: 50%; border: 2px solid var(--border-color); }
.item-detail-seller-info { flex: 1; }
.item-detail-seller-label { font-size: 9px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; font-weight: 600; }
.item-detail-seller-name { font-size: 13px; color: var(--text-primary); font-weight: 600; }

.item-detail-contact-btn {
  background: var(--accent-red); color: white; border: none;
  padding: 13px; border-radius: 11px;
  font-size: 14px; font-weight: 600; font-family: var(--font-display);
  cursor: pointer; width: 100%; transition: all 0.2s; letter-spacing: 0.5px;
}

.item-detail-contact-btn:hover {
  background: var(--accent-red-hover); transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(220,38,38,0.3);
}

/* ================= SHOP DETAIL MODAL ================= */
.shop-modal-expanded {
  background: var(--bg-card); border: 1px solid var(--border-color);
  border-radius: 18px; width: 100%; max-width: 580px;
  max-height: 80vh; overflow-y: auto;
  animation: slideUpModal 0.3s cubic-bezier(0.4,0,0.2,1); position: relative;
}

.shop-modal-header {
  position: relative; height: clamp(130px, 16vw, 185px);
  overflow: hidden; flex-shrink: 0; background: var(--bg-image-box);
  display: flex; align-items: center; justify-content: center;
}

.shop-modal-banner { width: 100%; height: 100%; object-fit: contain; max-height: 100%; max-width: 100%; }

.shop-modal-close {
  position: absolute; top: 10px; right: 10px;
  width: 32px; height: 32px;
  background: rgba(0,0,0,0.8); backdrop-filter: blur(10px);
  border: none; border-radius: 50%; color: white; font-size: 20px;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: all 0.2s; line-height: 1;
}

.shop-modal-close:hover { background: var(--accent-red); transform: scale(1.1); }

.shop-modal-content { padding: clamp(14px, 1.8vw, 22px); }

.shop-modal-title {
  font-family: var(--font-display); font-size: clamp(20px, 2.2vw, 26px);
  font-weight: 700; color: var(--text-primary); margin: 0 0 14px 0; letter-spacing: 0.5px;
}

.shop-modal-owner {
  display: flex; align-items: center; gap: 11px;
  padding: 13px; background: var(--bg-secondary); border-radius: 11px; margin-bottom: 18px;
}

.shop-modal-owner img { width: 36px; height: 36px; border-radius: 50%; border: 2px solid var(--border-color); }
.shop-modal-owner-label { font-size: 9px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; font-weight: 600; }
.shop-modal-owner-name { font-size: 13px; color: var(--text-primary); font-weight: 600; }

.shop-modal-products { margin-top: 18px; }
.shop-modal-products h3 { font-family: var(--font-display); font-size: 17px; font-weight: 700; color: var(--text-primary); margin: 0 0 12px 0; letter-spacing: 0.3px; }

.shop-products-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 18px; }

.shop-product-item {
  background: var(--bg-secondary); padding: 12px;
  border-radius: 9px; border: 1px solid var(--border-color);
}

.shop-product-name { font-weight: 600; color: var(--text-primary); margin-bottom: 5px; font-size: 13px; }
.shop-product-price { display: flex; align-items: center; gap: 5px; font-family: var(--font-display); font-size: 15px; font-weight: 700; color: #fbbf24; }

.shop-modal-contact {
  background: var(--accent-red); color: white; border: none;
  padding: 13px 26px; border-radius: 11px;
  font-size: 14px; font-weight: 600; font-family: var(--font-display);
  cursor: pointer; width: 100%; transition: all 0.2s; letter-spacing: 0.5px;
}

.shop-modal-contact:hover {
  background: var(--accent-red-hover); transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(220,38,38,0.3);
}

/* ================= FOOTER BAR ================= */
.marketplace-footer {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 20px; background: var(--bg-secondary);
  border-top: 1px solid var(--border-color); flex-shrink: 0; gap: 12px;
}

#listingCount {
  font-size: 12px; color: var(--text-muted);
  font-weight: 500; font-family: var(--font-body); letter-spacing: 0.2px;
}

.pagination { display: flex; align-items: center; gap: 4px; }

.page-btn {
  width: 30px; height: 30px; background: var(--bg-tertiary);
  border: 1px solid var(--border-color); border-radius: 6px;
  color: var(--text-secondary); font-size: 12px; font-weight: 600;
  font-family: var(--font-body); cursor: pointer;
  display: flex; align-items: center; justify-content: center; transition: all 0.2s;
}

.page-btn:hover { border-color: var(--accent-red); color: var(--text-primary); }
.page-btn.active { background: var(--accent-red); border-color: var(--accent-red); color: white; }
.page-btn.prev-next { font-size: 14px; }

.sort-dropdown-wrap { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }

.sort-dropdown-label { font-size: 12px; color: var(--text-muted); font-weight: 500; white-space: nowrap; }

.sort-dropdown {
  background: var(--bg-tertiary); border: 1px solid var(--border-color);
  color: var(--text-primary); padding: 6px 10px; border-radius: 7px;
  font-size: 12px; font-family: var(--font-body); outline: none;
  cursor: pointer; transition: border-color 0.2s;
}

.sort-dropdown:focus { border-color: var(--accent-red); }
.sort-dropdown option { background: var(--bg-card); }

/* ================= LOADING / EMPTY ================= */
.loading-state {
  grid-column: 1 / -1; display: flex; flex-direction: column;
  align-items: center; gap: 14px; padding: 60px 20px;
}

.loading-spinner {
  width: 44px; height: 44px;
  border: 3px solid rgba(255,255,255,0.08); border-top-color: var(--accent-red);
  border-radius: 50%; animation: spin 1s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }
.loading-state p { font-size: 14px; color: var(--text-secondary); font-weight: 500; }

.no-results { grid-column: 1 / -1; text-align: center; padding: 70px 20px; }
.no-results p { font-size: 15px; color: var(--text-secondary); font-family: var(--font-display); }

/* ================= MODALS (CREATE) ================= */
.modal-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,0.8); backdrop-filter: blur(8px);
  z-index: 9999; align-items: center; justify-content: center; padding: 20px;
}

.modal-overlay.active { display: flex; }

.modal-content {
  background: var(--bg-card); border: 1px solid var(--border-color);
  border-radius: 18px; width: 100%; max-width: 540px;
  max-height: 88vh; overflow-y: auto;
  animation: slideUpModal 0.3s cubic-bezier(0.4,0,0.2,1);
}

.modal-content.small { max-width: 380px; }
.modal-content.large { max-width: 660px; }

.modal-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 18px 22px; border-bottom: 1px solid var(--border-color);
  position: sticky; top: 0; background: var(--bg-card); z-index: 1;
  border-radius: 18px 18px 0 0;
}

.modal-header h2 {
  font-family: var(--font-display); font-size: 20px; font-weight: 700;
  color: var(--text-primary); margin: 0; letter-spacing: 0.3px;
}

.modal-close { font-size: 26px; color: var(--text-muted); cursor: pointer; line-height: 1; transition: color 0.2s; user-select: none; }
.modal-close:hover { color: var(--text-primary); }

.modal-body { padding: 22px; }
.modal-body p { color: var(--text-secondary); font-size: 14px; margin: 0 0 18px 0; }
.type-buttons { display: flex; gap: 14px; }

.type-btn {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 7px;
  padding: 18px 14px; background: var(--bg-tertiary);
  border: 2px solid var(--border-color); border-radius: 12px;
  cursor: pointer; color: var(--text-primary); font-size: 13px;
  font-weight: 600; font-family: var(--font-display); transition: all 0.2s;
}

.type-btn:hover { border-color: var(--accent-red); background: var(--bg-hover); transform: translateY(-2px); }
.type-icon { font-size: 26px; }
.type-limit { font-size: 10px; color: var(--text-muted); font-weight: 400; }

form { padding: 22px; }
.form-group { margin-bottom: 16px; }

.form-group label {
  display: block; font-family: var(--font-display);
  font-size: 11px; font-weight: 600; color: var(--text-secondary);
  margin-bottom: 7px; letter-spacing: 0.3px; text-transform: uppercase;
}

.form-group input, .form-group select, .form-group textarea {
  width: 100%; background: var(--bg-tertiary); border: 1px solid var(--border-color);
  color: var(--text-primary); padding: 11px 13px; border-radius: 9px;
  font-size: 13px; font-family: var(--font-body); outline: none;
  transition: all 0.2s; box-sizing: border-box;
}

.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
  border-color: var(--accent-red); box-shadow: 0 0 0 3px rgba(220,38,38,0.08); background: var(--bg-card);
}

.form-group input::placeholder, .form-group textarea::placeholder { color: var(--text-muted); }
.form-group select option { background: var(--bg-card); color: var(--text-primary); }

.image-hint { font-size: 10px; color: var(--text-muted); font-weight: 400; text-transform: none; }

.item-selector-section { margin-bottom: 18px; }
.item-selector-section h3 { font-family: var(--font-display); font-size: 15px; color: var(--text-primary); margin: 0 0 12px 0; }

.item-search-bar { position: relative; margin-bottom: 12px; }
.item-search-bar input {
  width: 100%; background: var(--bg-tertiary); border: 1px solid var(--border-color);
  color: var(--text-primary); padding: 9px 36px 9px 13px; border-radius: 7px;
  font-size: 13px; font-family: var(--font-body); outline: none; box-sizing: border-box;
}
.item-search-bar input:focus { border-color: var(--accent-red); }
.item-search-bar .search-icon { position: absolute; right: 11px; top: 50%; transform: translateY(-50%); font-size: 15px; }

.items-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(78px, 1fr));
  gap: 9px; max-height: 210px; overflow-y: auto; padding: 4px;
}

.item-card {
  background: var(--bg-tertiary); border: 2px solid var(--border-color);
  border-radius: 9px; padding: 9px 5px;
  display: flex; flex-direction: column; align-items: center; gap: 5px;
  cursor: pointer; transition: all 0.2s;
}

.item-card:hover { border-color: var(--border-hover); background: var(--bg-hover); }
.item-card.selected { border-color: var(--accent-red); background: rgba(220,38,38,0.08); }

.item-card-image { width: 50px; height: 50px; object-fit: contain; }

.item-card-name {
  font-size: 9px; color: var(--text-secondary); text-align: center;
  font-weight: 500; line-height: 1.3; overflow: hidden;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
}

.selected-item-display {
  display: flex; align-items: center; gap: 11px; padding: 11px;
  background: rgba(220,38,38,0.08); border: 1px solid rgba(220,38,38,0.28); border-radius: 9px;
}

.selected-label { font-size: 11px; color: var(--text-muted); font-weight: 600; }
.selected-item-display img { width: 38px; height: 38px; object-fit: contain; }
.selected-item-display span:nth-child(3) { flex: 1; font-weight: 600; color: var(--text-primary); }

.change-item-btn {
  background: var(--bg-hover); border: 1px solid var(--border-color); color: var(--text-secondary);
  padding: 5px 11px; border-radius: 5px; font-size: 11px; cursor: pointer; transition: all 0.2s;
}

.change-item-btn:hover { border-color: var(--accent-red); color: var(--text-primary); }

.form-divider { height: 1px; background: var(--border-color); margin: 18px 0; }
.listing-details-section h3 { font-family: var(--font-display); font-size: 15px; color: var(--text-primary); margin: 0 0 12px 0; }
.products-section { margin-top: 4px; }
.products-header-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.products-header-row h3 { font-family: var(--font-display); font-size: 15px; color: var(--text-primary); margin: 0; }

.add-product-btn {
  display: flex; align-items: center; gap: 5px;
  background: var(--bg-tertiary); border: 1px solid var(--border-color);
  color: var(--text-secondary); padding: 7px 12px; border-radius: 7px;
  font-size: 12px; font-weight: 600; cursor: pointer; transition: all 0.2s;
  font-family: var(--font-display);
}

.add-product-btn:hover:not(:disabled) { border-color: var(--accent-red); color: var(--text-primary); }
.plus-small { font-size: 15px; line-height: 1; }

.products-list { display: flex; flex-direction: column; gap: 12px; }

.product-group {
  background: var(--bg-tertiary); border: 1px solid var(--border-color);
  border-radius: 9px; padding: 12px; display: flex; flex-direction: column; gap: 7px;
}

.product-header { display: flex; justify-content: space-between; align-items: center; }
.product-header label { font-size: 11px; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; }

.remove-product-btn {
  background: none; border: none; color: var(--text-muted);
  font-size: 18px; cursor: pointer; line-height: 1; transition: color 0.2s; padding: 0;
}

.remove-product-btn:hover { color: var(--accent-red); }

.product-group input {
  width: 100%; background: var(--bg-card); border: 1px solid var(--border-color);
  color: var(--text-primary); padding: 9px 11px; border-radius: 7px;
  font-size: 12px; font-family: var(--font-body); outline: none;
  transition: all 0.2s; box-sizing: border-box;
}

.product-group input:focus { border-color: var(--accent-red); }
.product-group input::placeholder { color: var(--text-muted); }

.loading-items {
  grid-column: 1 / -1; display: flex; flex-direction: column;
  align-items: center; gap: 9px; padding: 28px;
}

.loading-spinner-small {
  width: 26px; height: 26px;
  border: 2px solid rgba(255,255,255,0.08); border-top-color: var(--accent-red);
  border-radius: 50%; animation: spin 0.8s linear infinite;
}

.loading-items p { font-size: 12px; color: var(--text-muted); margin: 0; }
.no-items-found { grid-column: 1 / -1; text-align: center; padding: 18px; color: var(--text-muted); font-size: 12px; }

.form-actions {
  display: flex; gap: 10px; justify-content: flex-end;
  padding-top: 8px; margin-top: 8px; border-top: 1px solid var(--border-color);
}

.btn-cancel {
  background: var(--bg-tertiary); border: 1px solid var(--border-color);
  color: var(--text-secondary); padding: 11px 20px; border-radius: 9px;
  font-size: 13px; font-weight: 600; font-family: var(--font-display);
  cursor: pointer; transition: all 0.2s; letter-spacing: 0.3px;
}

.btn-cancel:hover { border-color: var(--border-hover); color: var(--text-primary); }

.btn-submit {
  background: var(--accent-red); border: none; color: white;
  padding: 11px 20px; border-radius: 9px; font-size: 13px; font-weight: 600;
  font-family: var(--font-display); cursor: pointer; transition: all 0.2s; letter-spacing: 0.3px;
}

.btn-submit:hover:not(:disabled) { background: var(--accent-red-hover); transform: translateY(-1px); }
.btn-submit:disabled { opacity: 0.35; cursor: not-allowed; }

.btn-discord {
  background: #5865f2; border: none; color: white;
  padding: 11px 20px; border-radius: 9px; font-size: 13px; font-weight: 600;
  font-family: var(--font-display); cursor: pointer; transition: all 0.2s;
  display: flex; align-items: center; gap: 7px;
}

.btn-discord:hover { background: #4752c4; transform: translateY(-1px); }

/* ================= FULLSCREEN FILTER OVERLAY (mobile) ================= */
.mobile-filter-toggle { display: none !important; }

.filter-fullscreen-overlay {
  display: none; position: fixed; inset: 0; z-index: 2000;
  background: var(--bg-primary); flex-direction: column;
  animation: slideInFromBottom 0.3s cubic-bezier(0.4,0,0.2,1);
}

.filter-fullscreen-overlay.active { display: flex; }

@keyframes slideInFromBottom {
  from { transform: translateY(100%); opacity: 0; }
  to   { transform: translateY(0); opacity: 1; }
}

.filter-fs-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 18px 14px; border-bottom: 1px solid var(--border-color); flex-shrink: 0;
}

.filter-fs-title {
  font-family: var(--font-display); font-size: 22px; font-weight: 700;
  color: var(--text-primary); letter-spacing: 0.5px; margin: 0;
}

.filter-fs-close {
  width: 36px; height: 36px; background: var(--bg-tertiary);
  border: 1px solid var(--border-color); border-radius: 50%;
  color: var(--text-primary); font-size: 20px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  line-height: 1; transition: all 0.2s; padding: 0;
}

.filter-fs-close:hover { background: var(--accent-red); border-color: var(--accent-red); }
.filter-fs-body { flex: 1; overflow-y: auto; padding: 22px 18px; }

.filter-fs-footer {
  display: flex; gap: 10px; padding: 14px 18px;
  border-top: 1px solid var(--border-color); flex-shrink: 0; background: var(--bg-secondary);
}

.filter-fs-reset {
  flex: 1; padding: 13px; background: var(--bg-tertiary); border: 1px solid var(--border-color);
  color: var(--text-secondary); border-radius: 9px; font-size: 14px; font-weight: 600;
  font-family: var(--font-display); cursor: pointer; transition: all 0.2s; letter-spacing: 0.3px;
}

.filter-fs-reset:hover { border-color: var(--border-hover); color: var(--text-primary); }

.filter-fs-apply {
  flex: 2; padding: 13px; background: var(--accent-red); border: none; color: white;
  border-radius: 9px; font-size: 14px; font-weight: 600; font-family: var(--font-display);
  cursor: pointer; transition: all 0.2s; letter-spacing: 0.3px;
}

.filter-fs-apply:hover { background: var(--accent-red-hover); transform: translateY(-1px); box-shadow: 0 6px 18px rgba(220,38,38,0.35); }

/* ================= RESPONSIVE ================= */
@media (max-width: 1200px) {
  :root { --sidebar-width: 200px; }
}

@media (max-width: 1024px) {
  .filter-sidebar { display: none; }
  .filter-icon-btn { display: flex; }

  .marketplace-topbar { flex-direction: row; flex-wrap: nowrap; padding: 10px 12px; gap: 8px; }
  .search-container { flex: 1; min-width: 0; max-width: none; }
  .create-listing-btn { padding: 10px 14px; font-size: 12px; gap: 5px; }

  .marketplace-hero { margin: 12px 12px 0; height: 175px; }
  .hero-left { padding: 16px 20px; flex: 0 0 240px; }
  .hero-headline { font-size: 26px; }
  .hero-items { padding: 12px 16px; gap: 8px; }
  .hero-item-card { width: 120px; }

  .section-header { padding: 14px 12px 8px; }
  .marketplace-grid { grid-template-columns: repeat(3, 1fr); padding: 0 12px 16px; gap: 8px; }
  .marketplace-footer { padding: 10px 12px; }

  /* On mobile: action rows always visible, positioned correctly */
  .card-hover-actions {
    height: 46px !important; opacity: 1 !important;
    border-top-width: 1px !important; pointer-events: all !important;
  }

  .shop-btn-row {
    height: 46px !important; opacity: 1 !important;
    border-top-width: 1px !important; pointer-events: all !important;
  }

  .marketplace-card:hover { transform: none; }
  .shop-card:hover { transform: none; }
}

@media (max-width: 680px) {
  .marketplace-hero { display: none; }
}

@media (max-width: 540px) {
  .marketplace-grid { grid-template-columns: repeat(2, 1fr); gap: 7px; padding: 0 10px 14px; }
  .create-listing-btn span { display: none; }
  .create-listing-btn { padding: 10px 12px; width: auto; flex-shrink: 0; }
  .type-buttons { flex-direction: column; }
  .shop-products-grid { grid-template-columns: 1fr; }
  .marketplace-hero { margin: 10px 10px 0; height: 145px; }
  .hero-headline { font-size: 22px; }
  .pagination .page-btn { width: 26px; height: 26px; font-size: 11px; }
  .sort-dropdown-label { display: none; }
}

/* ================= SCROLLBAR ================= */
::-webkit-scrollbar { width: 7px; height: 7px; }
::-webkit-scrollbar-track { background: var(--bg-secondary); }
::-webkit-scrollbar-thumb { background: var(--bg-hover); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent-red); }