/* ═══════════════════════════════════════════════════════════
   AfriMarket — Page-Specific Styles
   ═══════════════════════════════════════════════════════════ */

/* ══════ HOME PAGE ══════════════════════════════════════════ */

/* Hero */
.hero { background: var(--dark); position: relative; overflow: hidden; }
.hero-bg-pattern {
  position: absolute; inset: 0; opacity: 0.035;
  background-image: repeating-linear-gradient(45deg, #fff 0, #fff 1px, transparent 0, transparent 50%);
  background-size: 20px 20px;
}
.hero-inner {
  display: grid; grid-template-columns: 1fr 360px; gap: 48px;
  align-items: center; padding: 56px 0 68px;
}
.hero-content { position: relative; z-index: 1; }
.hero-eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(39,168,87,0.14); border: 1px solid rgba(39,168,87,0.28);
  border-radius: var(--radius-full); padding: 5px 15px; font-size: 12px;
  color: var(--green-light); margin-bottom: 20px; font-weight: 500; letter-spacing: 0.4px;
}
.hero h1 {
  font-family: var(--font-head); font-size: 50px; font-weight: 800;
  color: #fff; line-height: 1.08; margin-bottom: 18px;
}
.hero h1 .accent { color: var(--gold-light); }
.hero-lead { color: rgba(255,255,255,0.6); font-size: 17px; line-height: 1.75; margin-bottom: 32px; max-width: 500px; }
.hero-buttons { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.hero-buttons .btn-primary  { padding: 13px 28px; font-size: 15px; }
.hero-buttons .btn-dark-outline {
  padding: 13px 28px; font-size: 15px; border: 1.5px solid rgba(255,255,255,0.2);
  color: #fff; border-radius: var(--radius-sm); transition: var(--transition);
  display: inline-flex; align-items: center; gap: 8px;
}
.hero-buttons .btn-dark-outline:hover { background: rgba(255,255,255,0.08); }
.hero-stats { display: flex; gap: 36px; margin-top: 40px; padding-top: 32px; border-top: 1px solid rgba(255,255,255,0.1); }
.hero-stat strong { display: block; font-family: var(--font-head); font-size: 26px; font-weight: 700; color: #fff; }
.hero-stat span   { font-size: 12px; color: rgba(255,255,255,0.45); }

/* Hero Promo Card */
.hero-promo-card {
  background: linear-gradient(135deg, var(--green) 0%, var(--dark2) 100%);
  border-radius: var(--radius-xl); padding: 28px; color: #fff; overflow: hidden;
  position: relative; margin-bottom: 14px; border: 1px solid rgba(255,255,255,0.1);
}
.hero-promo-card::before {
  content: ''; position: absolute; right: -24px; top: -24px;
  width: 160px; height: 160px; background: rgba(255,255,255,0.05); border-radius: 50%;
}
.promo-label { background: var(--gold); color: #fff; padding: 3px 10px; border-radius: 4px; font-size: 10px; font-weight: 700; display: inline-block; margin-bottom: 10px; letter-spacing: 0.6px; }
.hero-promo-card h3 { font-family: var(--font-head); font-size: 20px; font-weight: 700; margin-bottom: 6px; }
.hero-promo-card p  { font-size: 13px; opacity: 0.75; margin-bottom: 18px; }
.hero-mini-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 14px; }
.hero-mini-card {
  background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius); padding: 14px; cursor: pointer; transition: var(--transition);
}
.hero-mini-card:hover { background: rgba(255,255,255,0.14); }
.hero-mini-card .icon  { font-size: 22px; margin-bottom: 6px; }
.hero-mini-card strong { display: block; font-size: 13px; font-weight: 500; color: #fff; }
.hero-mini-card span   { font-size: 11px; color: rgba(255,255,255,0.5); }

/* Categories */
.cat-grid { display: grid; grid-template-columns: repeat(8, 1fr); gap: 12px; }
.cat-card {
  background: var(--white); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 16px 10px; text-align: center; cursor: pointer; transition: var(--transition);
}
.cat-card:hover { border-color: var(--green); box-shadow: var(--shadow); transform: translateY(-2px); }
.cat-card.featured { background: var(--green-pale); border-color: rgba(27,107,58,0.3); }
.cat-icon  { font-size: 28px; margin-bottom: 8px; }
.cat-name  { display: block; font-size: 12px; font-weight: 500; color: var(--dark); margin-bottom: 2px; }
.cat-count { font-size: 11px; color: var(--muted); }

/* Flash Sale Bar */
.flash-bar {
  background: var(--dark); color: #fff; border-radius: var(--radius);
  padding: 18px 24px; display: flex; align-items: center; justify-content: space-between; margin-bottom: 28px;
}
.flash-label { background: var(--red); color: #fff; padding: 4px 12px; border-radius: 4px; font-size: 12px; font-weight: 700; letter-spacing: 0.6px; }
.flash-title { font-family: var(--font-head); font-size: 18px; font-weight: 700; }
.flash-sub   { font-size: 13px; color: rgba(255,255,255,0.55); }
.countdown { display: flex; align-items: center; gap: 8px; }
.count-block { background: rgba(255,255,255,0.1); border-radius: 6px; padding: 6px 10px; text-align: center; min-width: 44px; }
.count-block strong { display: block; font-size: 18px; font-weight: 700; font-family: var(--font-head); }
.count-block small  { display: block; font-size: 9px; color: rgba(255,255,255,0.45); letter-spacing: 0.5px; text-transform: uppercase; }
.count-sep { font-size: 20px; font-weight: 700; color: rgba(255,255,255,0.35); margin-bottom: 14px; }

/* Product Cards */
.products-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; }
.product-card {
  background: var(--white); border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden; transition: var(--transition-slow); cursor: pointer; position: relative;
}
.product-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-3px); border-color: transparent; }
.product-img-wrap {
  width: 100%; aspect-ratio: 1; background: var(--light);
  display: flex; align-items: center; justify-content: center; position: relative; overflow: hidden;
}
.product-emoji { font-size: 56px; pointer-events: none; }
.product-img-overlay {
  position: absolute; inset: 0; background: rgba(15,30,20,0.5);
  display: flex; align-items: center; justify-content: center; gap: 8px;
  opacity: 0; transition: opacity 0.2s;
}
.product-card:hover .product-img-overlay { opacity: 1; }
.product-img-overlay .ov-btn {
  background: #fff; width: 36px; height: 36px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; font-size: 14px;
  transform: translateY(8px); transition: transform 0.2s;
}
.product-card:hover .ov-btn { transform: none; }
.product-badges { position: absolute; top: 8px; left: 8px; display: flex; flex-direction: column; gap: 4px; z-index: 1; }
.product-body { padding: 12px; }
.product-store { font-size: 11px; color: var(--muted); margin-bottom: 4px; display: flex; align-items: center; gap: 4px; }
.product-name  { font-size: 13.5px; font-weight: 500; color: var(--dark); margin-bottom: 6px; line-height: 1.4; }
.product-rating { display: flex; align-items: center; gap: 5px; margin-bottom: 8px; }
.product-rating span { font-size: 11px; color: var(--muted); }
.product-price { display: flex; align-items: baseline; gap: 6px; margin-bottom: 10px; flex-wrap: wrap; }
.price-main     { font-family: var(--font-head); font-size: 17px; font-weight: 700; color: var(--dark); }
.price-old      { font-size: 12px; color: var(--muted); text-decoration: line-through; }
.price-off      { font-size: 11px; background: var(--red-pale); color: var(--red); padding: 2px 6px; border-radius: 4px; font-weight: 600; }
.product-actions { display: flex; align-items: center; gap: 6px; }
.btn-add-cart {
  flex: 1; background: var(--green-pale); color: var(--green);
  border: 1px solid rgba(27,107,58,0.2); padding: 7px; border-radius: var(--radius-sm);
  font-size: 12.5px; font-weight: 500; transition: var(--transition); cursor: pointer;
}
.btn-add-cart:hover { background: var(--green); color: #fff; }
.btn-whatsapp-share {
  width: 32px; height: 32px; background: #25D366; border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center; color: #fff; font-size: 14px;
  cursor: pointer; transition: opacity 0.15s;
}
.btn-whatsapp-share:hover { opacity: 0.85; }
.product-delivery { font-size: 11px; color: var(--green); margin-top: 6px; }
.stock-indicator  { margin-top: 8px; }
.stock-bar  { height: 3px; background: var(--light); border-radius: 2px; overflow: hidden; }
.stock-fill { height: 100%; background: var(--red); border-radius: 2px; }
.stock-text { font-size: 10px; color: var(--muted); margin-top: 2px; }

/* Banner Grid */
.banner-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 16px; }
.banner-card {
  border-radius: var(--radius); overflow: hidden; position: relative;
  min-height: 180px; display: flex; align-items: flex-end; cursor: pointer; transition: var(--transition);
}
.banner-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.banner-bg      { position: absolute; inset: 0; }
.banner-content { position: relative; z-index: 1; padding: 22px; color: #fff; }
.banner-sub  { font-size: 11px; opacity: 0.75; margin-bottom: 4px; text-transform: uppercase; letter-spacing: 0.5px; }
.banner-h    { font-family: var(--font-head); font-size: 20px; font-weight: 700; margin-bottom: 12px; line-height: 1.25; }
.banner-h .hl { color: var(--gold-light); }
.b1 .banner-bg { background: linear-gradient(120deg, #0F4C1A 0%, #1B6B3A 100%); }
.b2 .banner-bg { background: linear-gradient(120deg, #5D1A00 0%, #B44A1A 100%); }
.b3 .banner-bg { background: linear-gradient(120deg, #0C2040 0%, #1A4A80 100%); }

/* Store Cards */
.store-card {
  background: var(--white); border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden; transition: var(--transition-slow); cursor: pointer;
}
.store-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); }
.store-banner-area {
  height: 78px; position: relative;
  display: flex; align-items: center; justify-content: center;
}
.store-logo-circle {
  position: absolute; bottom: -20px; left: 16px;
  width: 46px; height: 46px; border-radius: 11px; border: 2.5px solid var(--white);
  background: var(--white); display: flex; align-items: center; justify-content: center;
  font-size: 22px; box-shadow: var(--shadow);
}
.store-body  { padding: 26px 14px 14px; }
.store-name  { font-family: var(--font-head); font-size: 14px; font-weight: 700; margin-bottom: 3px; display: flex; align-items: center; gap: 5px; }
.verified-icon { color: var(--green); font-size: 12px; }
.store-tagline { font-size: 12px; color: var(--muted); margin-bottom: 10px; }
.store-stats   { display: flex; gap: 10px; }
.store-stats span { font-size: 11px; color: var(--muted); }
.store-stats strong { color: var(--dark); }
.store-footer  { padding: 10px 14px; border-top: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; }
.store-footer a { font-size: 12px; color: var(--green); font-weight: 500; }
.btn-follow { font-size: 12px; color: var(--green); border: 1px solid var(--green); padding: 4px 12px; border-radius: 4px; background: none; cursor: pointer; transition: var(--transition); }
.btn-follow:hover { background: var(--green); color: #fff; }
.btn-follow.following { background: var(--green); color: #fff; }

/* Payment Section */
.payment-section { background: var(--dark); border-radius: var(--radius-xl); padding: 52px; color: #fff; }
.payment-methods { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 28px; }
.pay-method-card {
  background: rgba(255,255,255,0.06); border: 1.5px solid rgba(255,255,255,0.08);
  border-radius: var(--radius); padding: 20px; cursor: pointer; transition: var(--transition);
}
.pay-method-card:hover  { background: rgba(255,255,255,0.1); border-color: rgba(255,255,255,0.2); }
.pay-method-card.active { border-color: var(--gold); background: rgba(212,160,23,0.1); }
.pay-method-card .pm-icon   { font-size: 28px; margin-bottom: 10px; }
.pay-method-card strong { display: block; font-size: 15px; font-weight: 600; margin-bottom: 3px; }
.pay-method-card span   { font-size: 12px; color: rgba(255,255,255,0.5); }
.escrow-box {
  background: rgba(39,168,87,0.1); border: 1px solid rgba(39,168,87,0.3);
  border-radius: var(--radius); padding: 20px; display: flex; align-items: flex-start; gap: 14px;
}
.escrow-box .ec-icon { font-size: 30px; flex-shrink: 0; }
.escrow-box strong { display: block; font-size: 15px; font-weight: 600; color: var(--green-light); margin-bottom: 5px; }
.escrow-box p { font-size: 13px; color: rgba(255,255,255,0.55); line-height: 1.65; }

/* Seller CTA */
.seller-cta-section { background: var(--green-pale); border-radius: var(--radius-xl); padding: 52px; display: grid; grid-template-columns: 1fr 400px; gap: 52px; align-items: center; }
.seller-cta-section h2 { font-family: var(--font-head); font-size: 36px; font-weight: 800; color: var(--dark); margin-bottom: 12px; }
.seller-cta-section h2 .accent { color: var(--green); }
.seller-cta-section .lead { color: var(--muted); font-size: 16px; margin-bottom: 28px; line-height: 1.75; }
.seller-steps { display: flex; flex-direction: column; gap: 13px; margin-bottom: 28px; }
.seller-step  { display: flex; align-items: center; gap: 12px; font-size: 14px; color: var(--dark); }
.step-num { width: 28px; height: 28px; background: var(--green); color: #fff; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; flex-shrink: 0; }
.seller-preview-card { background: var(--white); border-radius: var(--radius); border: 1px solid var(--border); overflow: hidden; box-shadow: var(--shadow-xl); }
.sp-header { background: var(--dark); padding: 16px; display: flex; align-items: center; gap: 10px; }
.sp-logo   { width: 36px; height: 36px; background: var(--green); border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: 16px; }
.sp-header strong { color: #fff; font-size: 14px; display: block; }
.sp-header span   { color: rgba(255,255,255,0.45); font-size: 11px; }
.sp-body    { padding: 16px; }
.sp-products { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 12px; }
.sp-product  { background: var(--light); border-radius: var(--radius-sm); aspect-ratio: 1; display: flex; align-items: center; justify-content: center; font-size: 24px; }
.sp-footer   { padding: 12px 16px; border-top: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; }
.sp-footer span { font-size: 12px; color: var(--muted); }

/* ══════ DASHBOARD ══════════════════════════════════════════ */
.dashboard-layout { display: grid; grid-template-columns: 240px 1fr; min-height: calc(100vh - 110px); }
.dash-sidebar { background: var(--dark); }
.dash-profile { padding: 20px 20px 18px; border-bottom: 1px solid rgba(255,255,255,0.08); }
.dash-avatar  { width: 48px; height: 48px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 22px; margin-bottom: 10px; }
.dash-profile strong { display: block; color: #fff; font-size: 14px; }
.dash-profile span   { font-size: 12px; color: rgba(255,255,255,0.45); }
.dash-nav { padding: 10px 10px; }
.dash-nav-section { font-size: 10px; font-weight: 700; letter-spacing: 0.8px; text-transform: uppercase; color: rgba(255,255,255,0.28); padding: 12px 14px 5px; }
.dash-nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px; border-radius: var(--radius-sm);
  color: rgba(255,255,255,0.6); font-size: 13.5px;
  cursor: pointer; transition: var(--transition); margin-bottom: 2px;
}
.dash-nav-item:hover { background: rgba(255,255,255,0.07); color: #fff; }
.dash-nav-item.active { background: var(--green); color: #fff; }
.dash-nav-badge { margin-left: auto; background: rgba(255,255,255,0.15); color: #fff; font-size: 10px; padding: 1px 7px; border-radius: 10px; }
.dash-nav-badge.alert { background: var(--red); }
.dash-main { background: var(--light); padding: 28px; overflow-y: auto; }
.dash-page-header { margin-bottom: 24px; }
.dash-page-header h2 { font-family: var(--font-head); font-size: 22px; font-weight: 700; }
.dash-page-header p  { font-size: 14px; color: var(--muted); }
.stats-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 24px; }
.stat-card { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; }
.stat-icon-wrap { width: 40px; height: 40px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 18px; margin-bottom: 14px; }
.stat-icon-green { background: var(--green-pale); }
.stat-icon-gold  { background: var(--gold-pale); }
.stat-icon-blue  { background: #EBF5FF; }
.stat-icon-red   { background: var(--red-pale); }
.stat-val   { font-family: var(--font-head); font-size: 24px; font-weight: 800; color: var(--dark); }
.stat-label { font-size: 12px; color: var(--muted); margin-top: 2px; }
.stat-delta { font-size: 12px; margin-top: 6px; }
.delta-up   { color: var(--green); }
.delta-down { color: var(--red); }
.delta-neutral { color: var(--muted); }
.dash-grid-2 { display: grid; grid-template-columns: 2fr 1fr; gap: 20px; }
.dash-card { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.dash-card-head { padding: 15px 20px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; }
.dash-card-head h3 { font-family: var(--font-head); font-size: 15px; font-weight: 600; }
.top-product-row { display: flex; align-items: center; gap: 12px; padding: 12px 20px; border-bottom: 1px solid var(--border); }
.top-product-row:last-child { border-bottom: none; }
.top-rank { width: 22px; height: 22px; background: var(--light); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 700; color: var(--muted); }
.top-thumb { width: 40px; height: 40px; background: var(--light); border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: 20px; }
.top-info  { flex: 1; }
.top-info strong { display: block; font-size: 13px; font-weight: 500; }
.top-info span   { font-size: 11px; color: var(--muted); }
.top-val   { font-family: var(--font-head); font-size: 14px; font-weight: 700; }

/* ══════ RESPONSIVE PAGE STYLES ═════════════════════════════ */
@media (max-width: 1024px) {
  .products-grid    { grid-template-columns: repeat(3, 1fr); }
  .cat-grid         { grid-template-columns: repeat(4, 1fr); }
  .banner-grid      { grid-template-columns: 1fr 1fr; }
  .banner-grid .b3  { display: none; }
  .hero-inner       { grid-template-columns: 1fr; }
  .hero-promo-card  { display: none; }
  .payment-methods  { grid-template-columns: repeat(2, 1fr); }
  .stats-row        { grid-template-columns: repeat(2, 1fr); }
  .dash-grid-2      { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
  .products-grid    { grid-template-columns: repeat(2, 1fr); }
  .cat-grid         { grid-template-columns: repeat(4, 1fr); }
  .payment-methods  { grid-template-columns: 1fr; }
  .seller-cta-section { grid-template-columns: 1fr; }
  .seller-preview-card { display: none; }
  .dashboard-layout { grid-template-columns: 1fr; }
  .dash-sidebar     { display: none; }
  .hero h1          { font-size: 34px; }
  .hero-stats       { gap: 20px; flex-wrap: wrap; }
}
@media (max-width: 480px) {
  .products-grid { grid-template-columns: 1fr; }
  .cat-grid      { grid-template-columns: repeat(2, 1fr); }
  .flash-bar     { flex-direction: column; gap: 14px; align-items: flex-start; }
  .payment-section { padding: 28px 20px; }
}
