/*
  NexusMarket — Homepage Styles
  Hero section, feature cards, recent listings, how-it-works, stats, payments
*/

/* === HERO SECTION === */
.hero {
  position: relative;
  padding: 120px 24px 80px;
  text-align: center;
  overflow: hidden;
}

/* Multi-layer gradient backdrop */
.hero::before {
  content: '';
  position: absolute;
  top: -200px;
  left: 50%;
  transform: translateX(-50%);
  width: 900px;
  height: 900px;
  background:
    radial-gradient(ellipse 60% 50% at 50% 30%, rgba(232, 118, 75, 0.1) 0%, transparent 60%),
    radial-gradient(ellipse 40% 60% at 30% 60%, rgba(245, 166, 35, 0.04) 0%, transparent 50%),
    radial-gradient(ellipse 50% 40% at 70% 40%, rgba(232, 90, 90, 0.03) 0%, transparent 50%);
  pointer-events: none;
  animation: hero-pulse 8s ease-in-out infinite alternate;
}

@keyframes hero-pulse {
  0% { opacity: 0.8; transform: translateX(-50%) scale(1); }
  100% { opacity: 1; transform: translateX(-50%) scale(1.05); }
}

/* Grain texture on hero — very subtle, purely decorative */
.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: var(--noise);
  background-repeat: repeat;
  background-size: 200px 200px;
  pointer-events: none;
  opacity: 0.08;
}

/* Floating geometric accents */
.hero-accents {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.hero-accent {
  position: absolute;
  border-radius: 50%;
  background: var(--accent-primary);
  opacity: 0.15;
}

.hero-accent--1 {
  width: 4px;
  height: 4px;
  top: 20%;
  left: 15%;
  animation: float-drift 6s ease-in-out infinite;
}

.hero-accent--2 {
  width: 3px;
  height: 3px;
  top: 35%;
  right: 18%;
  animation: float-drift 8s ease-in-out infinite reverse;
  opacity: 0.2;
}

.hero-accent--3 {
  width: 6px;
  height: 6px;
  bottom: 30%;
  left: 22%;
  animation: float-drift 7s ease-in-out infinite 1s;
  opacity: 0.1;
}

.hero-accent--4 {
  width: 2px;
  height: 24px;
  border-radius: 1px;
  top: 25%;
  right: 12%;
  animation: float-drift 9s ease-in-out infinite 0.5s;
  opacity: 0.08;
}

.hero-accent--5 {
  width: 24px;
  height: 2px;
  border-radius: 1px;
  bottom: 35%;
  right: 25%;
  animation: float-drift 7.5s ease-in-out infinite 2s;
  opacity: 0.08;
}

.hero-accent--6 {
  width: 5px;
  height: 5px;
  top: 60%;
  left: 10%;
  animation: float-drift 10s ease-in-out infinite 3s;
  opacity: 0.12;
}

@keyframes float-drift {
  0%, 100% { transform: translate(0, 0); }
  25% { transform: translate(6px, -8px); }
  50% { transform: translate(-4px, 5px); }
  75% { transform: translate(3px, -3px); }
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 720px;
  margin: 0 auto;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: var(--primary-dim);
  border: 1px solid var(--primary-border);
  border-radius: 20px;
  font-size: 0.73rem;
  font-weight: 500;
  color: var(--accent-primary);
  margin-bottom: 28px;
  box-shadow: 0 0 12px rgba(232, 118, 75, 0.08);
}

.hero-badge svg {
  width: 14px;
  height: 14px;
}

.hero h1 {
  font-size: 3.4rem;
  font-weight: 700;
  letter-spacing: -2.8px;
  line-height: 1.05;
  margin-bottom: 20px;
  color: var(--text-primary);
  text-shadow: 0 2px 40px rgba(232, 118, 75, 0.06);
}

.hero h1 .accent {
  background: linear-gradient(135deg, #e8764b 0%, #f5a623 50%, #e87a3a 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  background-size: 200% auto;
  animation: gradient-shift 4s ease-in-out infinite alternate;
}

@keyframes gradient-shift {
  0% { background-position: 0% center; }
  100% { background-position: 100% center; }
}

.hero-desc {
  font-size: 1.08rem;
  color: var(--text-secondary);
  line-height: 1.65;
  max-width: 540px;
  margin: 0 auto 36px;
}

.hero-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 28px;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 30px;
  background: var(--primary);
  color: #fff;
  font-size: 0.88rem;
  font-weight: 600;
  border-radius: var(--radius);
  transition: background var(--ease), box-shadow var(--ease), transform var(--ease);
}

.btn-primary:hover {
  background: var(--primary-hover);
  box-shadow: 0 8px 32px rgba(232, 118, 75, 0.35), 0 2px 8px rgba(232, 118, 75, 0.2);
  transform: translateY(-1px);
  color: #fff;
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 30px;
  background: var(--surface);
  color: var(--text-primary);
  font-size: 0.88rem;
  font-weight: 500;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  transition: border-color var(--ease), background var(--ease), transform var(--ease);
}

.btn-secondary:hover {
  border-color: var(--border-hover);
  background: var(--surface-hover);
  transform: translateY(-1px);
  color: var(--text-primary);
}

/* Social proof line */
.hero-social-proof {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-bottom: 20px;
}

.hero-social-proof span {
  color: var(--text-secondary);
  font-weight: 500;
}

/* Stats row */
.hero-stats {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.hero-stat {
  display: flex;
  align-items: center;
  gap: 6px;
}

.hero-stat strong {
  color: var(--text-secondary);
  font-weight: 600;
}

.hero-stats .stat-dot {
  width: 3px;
  height: 3px;
  background: var(--text-muted);
  border-radius: 50%;
  margin: 0 16px;
  opacity: 0.5;
}

/* === FEATURES SECTION === */
.features {
  padding: 80px 24px 60px;
  max-width: 980px;
  margin: 0 auto;
}

.features-title {
  text-align: center;
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: -0.8px;
  margin-bottom: 12px;
}

.features-subtitle {
  text-align: center;
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-bottom: 48px;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
}

.feature-card {
  padding: 30px 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  transition: border-color var(--ease), transform var(--ease-spring), box-shadow var(--ease);
  position: relative;
  overflow: hidden;
}

/* Gradient border on hover */
.feature-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--radius-md);
  padding: 1px;
  background: linear-gradient(135deg, rgba(232, 118, 75, 0.3), rgba(245, 166, 35, 0.1), transparent);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity var(--ease);
}

.feature-card:hover::before {
  opacity: 1;
}

.feature-card:hover {
  border-color: transparent;
  transform: translateY(-3px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2), 0 2px 8px rgba(232, 118, 75, 0.05);
}

/* Slightly vary card heights for organic feel */
.feature-card:nth-child(2) {
  padding: 34px 24px 28px;
}

.feature-icon {
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--primary-dim);
  border-radius: var(--radius-sm);
  margin-bottom: 18px;
  color: var(--accent-primary);
  box-shadow: 0 0 16px rgba(232, 118, 75, 0.08);
  transition: box-shadow var(--ease);
}

.feature-card:hover .feature-icon {
  box-shadow: 0 0 20px rgba(232, 118, 75, 0.15);
}

.feature-card h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text-primary);
  letter-spacing: -0.2px;
}

.feature-card p {
  font-size: 0.84rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* === HOW IT WORKS SECTION === */
.how-it-works {
  padding: 80px 24px;
  max-width: 820px;
  margin: 0 auto;
}

.section-label {
  text-align: center;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--accent-primary);
  margin-bottom: 12px;
}

.how-it-works-title {
  text-align: center;
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: -0.8px;
  margin-bottom: 52px;
}

.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  position: relative;
}

/* Connecting line between steps */
.steps::before {
  content: '';
  position: absolute;
  top: 26px;
  left: calc(16.66% + 20px);
  right: calc(16.66% + 20px);
  height: 1px;
  background: linear-gradient(90deg, var(--border), var(--primary-border), var(--border));
}

.step-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 0 16px;
  position: relative;
}

.step-number {
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 50%;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--accent-primary);
  margin-bottom: 18px;
  position: relative;
  z-index: 1;
  box-shadow: 0 0 20px rgba(232, 118, 75, 0.06);
  transition: box-shadow var(--ease), border-color var(--ease);
}

.step-item:hover .step-number {
  border-color: var(--primary-border);
  box-shadow: 0 0 24px rgba(232, 118, 75, 0.12);
}

.step-item h3 {
  font-size: 0.92rem;
  font-weight: 600;
  margin-bottom: 8px;
  letter-spacing: -0.2px;
}

.step-item p {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.55;
}

/* === STATS / NUMBERS SECTION === */
.stats-section {
  padding: 60px 24px;
  max-width: 900px;
  margin: 0 auto;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.stat-item {
  text-align: center;
  padding: 28px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  transition: border-color var(--ease), transform var(--ease);
}

.stat-item:hover {
  border-color: var(--border-hover);
  transform: translateY(-2px);
}

.stat-number {
  font-size: 1.8rem;
  font-weight: 700;
  letter-spacing: -1.5px;
  color: var(--text-primary);
  margin-bottom: 4px;
  font-variant-numeric: tabular-nums;
}

.stat-number .stat-accent {
  color: var(--accent-primary);
}

.stat-label {
  font-size: 0.74rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 500;
}

/* === PAYMENTS SECTION === */
.payments-section {
  padding: 60px 24px 80px;
  text-align: center;
  max-width: 700px;
  margin: 0 auto;
}

.payments-title {
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: -0.5px;
  margin-bottom: 8px;
}

.payments-desc {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 32px;
}

.payments-grid {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 32px;
  flex-wrap: wrap;
}

.payment-icon {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 20px 28px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  transition: border-color var(--ease), transform var(--ease);
  min-width: 100px;
}

.payment-icon:hover {
  border-color: var(--border-hover);
  transform: translateY(-2px);
}

.payment-icon svg {
  width: 32px;
  height: 32px;
  color: var(--text-secondary);
}

.payment-icon span {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* === RECENT LISTINGS SECTION === */
.recent-listings {
  padding: 60px 24px 80px;
  max-width: 1100px;
  margin: 0 auto;
}

.recent-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 32px;
}

.recent-header h2 {
  font-size: 1.4rem;
  font-weight: 600;
  letter-spacing: -0.8px;
}

.recent-header a {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--accent-primary);
  transition: opacity var(--ease);
}

.recent-header a:hover {
  opacity: 0.8;
  color: var(--accent-primary);
}

.recent-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.listing-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 20px;
  transition: border-color var(--ease), transform var(--ease-spring), box-shadow var(--ease);
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}

/* Gradient border hover effect */
.listing-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--radius-md);
  padding: 1px;
  background: linear-gradient(135deg, rgba(232, 118, 75, 0.25), rgba(245, 166, 35, 0.1), transparent 60%);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity var(--ease);
}

.listing-card:hover::before {
  opacity: 1;
}

.listing-card:hover {
  border-color: transparent;
  transform: translateY(-3px) scale(1.01);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.25), 0 2px 8px rgba(232, 118, 75, 0.04);
}

/* Vary card heights subtly */
.listing-card:nth-child(2n) {
  padding: 22px 20px 18px;
}

.listing-card:nth-child(3n) {
  padding: 18px 20px 22px;
}

.listing-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.listing-category {
  font-size: 0.68rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--accent-primary);
  padding: 3px 8px;
  background: var(--primary-dim);
  border-radius: 4px;
  box-shadow: 0 0 8px rgba(232, 118, 75, 0.06);
}

.listing-price {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-primary);
  font-variant-numeric: tabular-nums;
}

.listing-card h4 {
  font-size: 0.92rem;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--text-primary);
  letter-spacing: -0.2px;
}

.listing-card p {
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.5;
  flex: 1;
}

.listing-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}

.listing-seller {
  font-size: 0.74rem;
  color: var(--text-muted);
}

.listing-rating {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.74rem;
  color: var(--secondary);
}

/* === RESPONSIVE === */
@media (max-width: 1100px) {
  .recent-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .hero {
    padding: 90px 20px 60px;
  }

  .hero h1 {
    font-size: 2.4rem;
    letter-spacing: -1.8px;
  }

  .hero-desc {
    font-size: 0.95rem;
  }

  .hero-stats {
    flex-wrap: wrap;
    gap: 8px;
  }

  .hero-stats .stat-dot {
    display: none;
  }

  .hero-stat {
    width: 100%;
    justify-content: center;
  }

  .features-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .steps {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .steps::before {
    display: none;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
  }

  .recent-grid {
    grid-template-columns: 1fr;
  }

  .payments-grid {
    gap: 16px;
  }
}

@media (max-width: 480px) {
  .hero h1 {
    font-size: 1.9rem;
    letter-spacing: -1.2px;
  }

  .hero-actions {
    flex-direction: column;
  }

  .btn-primary,
  .btn-secondary {
    width: 100%;
    justify-content: center;
  }

  .stats-grid {
    grid-template-columns: 1fr 1fr;
  }
}


/* ============================================================
   NEW HOMEPAGE SECTIONS — best sellers, top products,
   recent sales feed, reviews, horizontal ad carousel
   ============================================================ */

/* === SECTION SHELL === */
.home-section {
  padding: 56px 24px;
  max-width: 1100px;
  margin: 0 auto;
}

.home-section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 28px;
  gap: 16px;
}

.home-section-head .title-group { min-width: 0; }

.home-section-head h2 {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.8px;
  margin-bottom: 4px;
}

.home-section-head .sub {
  font-size: 0.84rem;
  color: var(--text-muted);
}

.home-section-head .see-all {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--accent-primary);
  white-space: nowrap;
  transition: opacity var(--ease);
}

.home-section-head .see-all:hover { opacity: 0.75; }

/* === HORIZONTAL AD CAROUSEL (homepage strip) === */
.ad-carousel {
  position: relative;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
  overflow: hidden;
}

.ad-carousel-viewport {
  overflow: hidden;
  border-radius: var(--radius-md);
}

.ad-carousel-track {
  display: flex;
  gap: 16px;
  animation: ad-marquee 32s linear infinite;
  width: max-content;
}

.ad-carousel:hover .ad-carousel-track {
  animation-play-state: paused;
}

@keyframes ad-marquee {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

.ad-banner {
  flex: 0 0 auto;
  width: 320px;
  height: 120px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--surface);
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  text-decoration: none;
  transition: border-color var(--ease), transform var(--ease);
  overflow: hidden;
  position: relative;
}

.ad-banner:hover {
  border-color: var(--primary-border);
  transform: translateY(-2px);
}

.ad-banner-visual {
  width: 80px;
  height: 80px;
  border-radius: var(--radius-sm);
  flex-shrink: 0;
}

.ad-banner-body { min-width: 0; }

.ad-banner-tag {
  font-size: 0.58rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
  font-weight: 600;
}

.ad-banner-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 4px 0;
  letter-spacing: -0.2px;
}

.ad-banner-desc {
  font-size: 0.74rem;
  color: var(--text-secondary);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* === BEST SELLERS (seller cards) === */
.sellers-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.seller-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 22px 18px;
  text-align: center;
  transition: border-color var(--ease), transform var(--ease), box-shadow var(--ease);
  text-decoration: none;
  display: block;
}

.seller-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-3px);
  box-shadow: 0 12px 32px rgba(0,0,0,0.22);
}

.seller-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  margin: 0 auto 12px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  font-weight: 700;
  color: #fff;
}

.seller-name {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text-primary);
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-bottom: 4px;
}

.seller-verified-badge {
  display: inline-flex;
  color: var(--accent-primary);
}

.seller-meta {
  font-size: 0.74rem;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.seller-rating {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.78rem;
  color: var(--secondary);
  font-weight: 600;
}

.seller-rating .count {
  color: var(--text-muted);
  font-weight: 400;
}

/* === TOP PRODUCTS (ranked grid) === */
.top-products-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.top-product-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 20px;
  display: flex;
  flex-direction: column;
  transition: border-color var(--ease), transform var(--ease), box-shadow var(--ease);
  text-decoration: none;
}

.top-product-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-3px);
  box-shadow: 0 12px 32px rgba(0,0,0,0.22);
}

.top-product-rank {
  position: absolute;
  top: -10px;
  left: 16px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-size: 0.8rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(232,118,75,0.35);
}

.top-product-card .listing-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 6px 0 12px;
}

/* === RECENT SALES ACTIVITY FEED === */
.activity-feed {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.activity-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
  transition: background var(--ease);
}

.activity-row:last-child { border-bottom: none; }
.activity-row:hover { background: var(--surface-hover); }

.activity-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--success);
  flex-shrink: 0;
  box-shadow: 0 0 8px rgba(76,175,122,0.5);
}

.activity-body {
  flex: 1;
  min-width: 0;
  font-size: 0.84rem;
  color: var(--text-secondary);
}

.activity-body strong { color: var(--text-primary); font-weight: 600; }

.activity-price {
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--accent-primary);
  font-variant-numeric: tabular-nums;
}

.activity-time {
  font-size: 0.72rem;
  color: var(--text-muted);
  white-space: nowrap;
}

/* === REVIEWS / TESTIMONIALS === */
.reviews-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.review-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 22px;
  display: flex;
  flex-direction: column;
}

.review-stars {
  display: flex;
  gap: 2px;
  margin-bottom: 12px;
  color: var(--secondary);
  font-size: 0.9rem;
}

.review-text {
  font-size: 0.86rem;
  color: var(--text-secondary);
  line-height: 1.6;
  flex: 1;
  margin-bottom: 16px;
}

.review-author {
  display: flex;
  align-items: center;
  gap: 10px;
}

.review-author-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--surface-raised);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--accent-primary);
}

.review-author-name {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-primary);
}

.review-author-meta {
  font-size: 0.72rem;
  color: var(--text-muted);
}

/* === RESPONSIVE for new sections === */
@media (max-width: 1100px) {
  .sellers-grid { grid-template-columns: repeat(2, 1fr); }
  .top-products-grid { grid-template-columns: repeat(2, 1fr); }
  .reviews-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  .sellers-grid { grid-template-columns: repeat(2, 1fr); }
  .top-products-grid { grid-template-columns: 1fr; }
  .reviews-grid { grid-template-columns: 1fr; }
  .home-section { padding: 40px 20px; }
  .activity-time { display: none; }
}

@media (max-width: 480px) {
  .sellers-grid { grid-template-columns: 1fr; }
  .ad-banner { width: 260px; }
}


/* ============================================================
   FIXED LEFT / RIGHT AD RAILS (homepage)
   Vertical infinite-scroll carousels pinned to the viewport
   edges. Only shown on wide screens so they never crowd content.
   ============================================================ */

.ad-rail {
  position: fixed;
  top: calc(var(--nav-height) + 20px);
  bottom: 20px;
  /* Width auto-fits the gutter beside the centered 1100px content column.
     clamp floor (100px) is the minimum usable rail width; the formula ensures
     the rail never overlaps the content area regardless of viewport size. */
  width: clamp(100px, calc((100vw - 1100px) / 2 - 16px), 268px);
  overflow: hidden;
  z-index: 50;
  display: none;
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(to bottom, transparent, #000 8%, #000 92%, transparent);
}

.ad-rail-left { left: 8px; }
.ad-rail-right { right: 8px; }

.ad-rail-track {
  display: flex;
  flex-direction: column;
  gap: 14px;
  animation: rail-scroll-down 36s linear infinite;
  will-change: transform;
}

.ad-rail-track-reverse {
  animation: rail-scroll-up 36s linear infinite;
}

.ad-rail:hover .ad-rail-track {
  animation-play-state: paused;
}

@keyframes rail-scroll-down {
  0% { transform: translateY(0); }
  100% { transform: translateY(-50%); }
}
@keyframes rail-scroll-up {
  0% { transform: translateY(-50%); }
  100% { transform: translateY(0); }
}

.rail-ad {
  display: block;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
  padding: 12px;
  text-decoration: none;
  transition: border-color var(--ease), transform var(--ease);
}

.rail-ad:hover {
  border-color: var(--primary-border);
  transform: translateY(-2px);
}

.rail-ad-visual {
  width: 100%;
  height: 140px;
  border-radius: var(--radius-sm);
  margin-bottom: 10px;
}

.rail-ad-tag {
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 600;
  color: var(--text-muted);
}

.rail-ad-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.35;
  margin-top: 4px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Show rails from 1340px: at that width each gutter is (1340-1100)/2=120px,
   leaving 104px after the 8px margin — enough for a 100px minimum-width rail
   with 12px to spare before the content edge. Tablets/phones (<1340px) stay
   hidden since the gutter is too narrow for any usable rail. */
@media (min-width: 1340px) {
  .ad-rail { display: block; }
}

/* Empty-state block for a brand-new (no-data) marketplace. */
.home-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 44px 24px;
  text-align: center;
  border: 1px dashed var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
}
.home-empty p { color: var(--text-secondary); font-size: 0.95rem; margin: 0; }
.cta-inline { display: inline-flex; align-items: center; }

/* Open "place your ad here" slot in the home carousel (until partners buy in). */
.ad-banner-empty {
  border: 1px dashed var(--border-hover);
  background: var(--surface);
}
.ad-banner-empty:hover {
  border-color: var(--accent-primary);
  background: linear-gradient(135deg, rgba(232, 118, 75, 0.10), transparent 70%), var(--surface);
}
.ad-banner-empty .ad-banner-visual {
  display: grid;
  place-items: center;
  color: var(--text-muted);
  opacity: 0.65;
}
.ad-banner-empty:hover .ad-banner-visual { color: var(--accent-primary); opacity: 1; }
.ad-banner-empty .ad-banner-tag { color: var(--text-muted); }

/* Open "place your ad here" slots in the left/right home rails. */
.rail-ad-empty {
  border: 1px dashed var(--border-hover);
  background: var(--surface);
}
.rail-ad-empty:hover {
  border-color: var(--accent-primary);
  background: linear-gradient(135deg, rgba(232, 118, 75, 0.10), transparent 70%), var(--surface);
}
.rail-ad-empty .rail-ad-visual {
  display: grid;
  place-items: center;
  color: var(--text-muted);
  opacity: 0.65;
}
.rail-ad-empty:hover .rail-ad-visual { color: var(--accent-primary); opacity: 1; }
.rail-ad-empty .rail-ad-tag { color: var(--text-muted); }

/* Live ad creatives (GIF/PNG/JPG) — auto-size to fit fully inside the box. */
.rail-ad-visual, .ad-banner-visual { overflow: hidden; }
.rail-ad-img, .ad-banner-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}
.ad-banner-live .ad-banner-visual,
.rail-ad-live .rail-ad-visual {
  padding: 0;
  background: #0d0e12;
}
.ad-banner-live:hover, .rail-ad-live:hover { border-color: var(--accent-primary); }

/* === FEATURED carousel ad — pinned, gold ribbon ======================= */
.ad-banner-featured {
  border-color: rgba(245, 166, 35, 0.6);
  box-shadow: 0 0 0 1px rgba(245, 166, 35, 0.25), 0 6px 18px rgba(0, 0, 0, 0.3);
}
.ad-banner-featured:hover { border-color: rgba(245, 166, 35, 0.9); }
.ad-banner-ribbon {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 2;
  font-size: 0.52rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #1a1205;
  background: linear-gradient(135deg, #f5a623, #e8764b);
  padding: 2px 8px;
  border-radius: 999px;
}

/* === HOMEPAGE TAKEOVER — full-width banner directly under the hero ===== */
.home-takeover {
  position: relative;
  display: flex;
  align-items: stretch;
  gap: 0;
  width: min(1052px, calc(100% - 48px));
  margin: 8px auto 28px;
  border-radius: var(--radius-lg, 16px);
  border: 1px solid rgba(52, 184, 122, 0.5);
  background: var(--surface);
  overflow: hidden;
  text-decoration: none;
  box-shadow: 0 0 0 1px rgba(52, 184, 122, 0.18), 0 10px 30px rgba(0, 0, 0, 0.35);
  transition: border-color var(--ease), transform var(--ease);
}
.home-takeover:hover { border-color: rgba(52, 184, 122, 0.85); transform: translateY(-2px); }
.home-takeover-visual {
  flex: 1 1 auto;
  min-width: 0;
  background: #0d0e12;
  display: grid;
  place-items: center;
  overflow: hidden;
}
.home-takeover-visual img {
  width: 100%;
  height: 100%;
  max-height: 200px;
  object-fit: contain;
  display: block;
}
.home-takeover-body {
  flex: 0 0 300px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  padding: 20px 24px;
  border-left: 1px solid var(--border);
}
.home-takeover-tag {
  font-size: 0.6rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 700;
  color: #5fcf96;
}
.home-takeover-title {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.3px;
  color: var(--text-primary);
}
.home-takeover-desc { font-size: 0.85rem; color: var(--text-secondary); line-height: 1.4; }

/* Empty takeover slot — dashed, invites buyers to claim it. */
.home-takeover-empty {
  border-style: dashed;
  border-color: var(--border-hover);
  box-shadow: none;
  background: var(--surface);
}
.home-takeover-empty:hover {
  border-color: var(--accent-primary);
  background: linear-gradient(135deg, rgba(232, 118, 75, 0.08), transparent 70%), var(--surface);
}
.home-takeover-empty .home-takeover-visual {
  display: grid;
  place-items: center;
  color: var(--text-muted);
  background: transparent;
  min-height: 120px;
}
.home-takeover-empty:hover .home-takeover-visual { color: var(--accent-primary); }
.home-takeover-empty .home-takeover-tag { color: var(--text-muted); }

@media (max-width: 768px) {
  .home-takeover { flex-direction: column; }
  .home-takeover-body { flex: 1 1 auto; border-left: none; border-top: 1px solid var(--border); }
  .home-takeover-visual img { max-height: 150px; }
}

/* === TOP-3 SELLER MEDALS (Best sellers grid) ========================== */
.seller-card { position: relative; }

/* Gold / silver / bronze frame on the top three seller cards. */
.medal-gold   { border-color: rgba(245, 196, 80, 0.75)  !important; box-shadow: 0 0 0 1px rgba(245, 196, 80, 0.45), 0 10px 28px rgba(245, 196, 80, 0.14); }
.medal-silver { border-color: rgba(201, 209, 222, 0.75) !important; box-shadow: 0 0 0 1px rgba(201, 209, 222, 0.45), 0 10px 28px rgba(201, 209, 222, 0.12); }
.medal-bronze { border-color: rgba(206, 142, 86, 0.75)  !important; box-shadow: 0 0 0 1px rgba(206, 142, 86, 0.45), 0 10px 28px rgba(206, 142, 86, 0.12); }

/* Rank pill in the corner. */
.medal-badge {
  position: absolute;
  top: 10px; right: 10px;
  width: 22px; height: 22px;
  border-radius: 50%;
  display: grid; place-items: center;
  font-size: 0.72rem; font-weight: 800; color: #1c1405;
  z-index: 2;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
}
.medal-gold   .medal-badge { background: linear-gradient(135deg, #fbe48b, #d4a02a); }
.medal-silver .medal-badge { background: linear-gradient(135deg, #f3f6fb, #aab2c2); }
.medal-bronze .medal-badge { background: linear-gradient(135deg, #e8b483, #b06f3a); }

/* Sparkling metallic name — a shimmer sweeps across the gradient text. */
.medal-gold .seller-name-text,
.medal-silver .seller-name-text,
.medal-bronze .seller-name-text {
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  font-weight: 800;
  animation: name-sparkle 2.6s linear infinite;
}
.medal-gold   .seller-name-text { background-image: linear-gradient(100deg, #d4a02a 0%, #fff6d0 25%, #fbe48b 48%, #fff6d0 60%, #d4a02a 100%); }
.medal-silver .seller-name-text { background-image: linear-gradient(100deg, #9aa3b4 0%, #ffffff 25%, #e6eaf1 48%, #ffffff 60%, #9aa3b4 100%); }
.medal-bronze .seller-name-text { background-image: linear-gradient(100deg, #a9663a 0%, #f3cda2 25%, #e0a06a 48%, #f3cda2 60%, #a9663a 100%); }

@keyframes name-sparkle { to { background-position: 200% center; } }

@media (prefers-reduced-motion: reduce) {
  .seller-name-text { animation: none; }
}
