/* ============================
   INDEX.CSS - Homepage Styles
   ============================ */

/* HERO */
.hero-section {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 0;
  max-height: 520px;
  overflow: hidden;
}

.hero-left {
  position: relative;
  overflow: hidden;
}

.hero-img {
  width: 100%; height: 520px;
  object-fit: cover;
  transition: transform 8s ease;
}

.hero-left:hover .hero-img { transform: scale(1.04); }

.hero-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(10,30,15,0.85) 0%, rgba(10,30,15,0.3) 50%, transparent 100%);
  padding: 40px;
  display: flex; flex-direction: column; justify-content: flex-end;
}

.hero-badge { margin-bottom: 16px; width: fit-content; }

.hero-title {
  color: #fff; font-size: clamp(32px, 5vw, 54px);
  font-weight: 800; line-height: 1.1;
  margin-bottom: 28px;
  text-shadow: 0 2px 20px rgba(0,0,0,0.4);
}

.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }

.hero-right {
  display: flex; flex-direction: column;
  background: var(--bg-cream);
  border-left: 1px solid var(--border);
}

/* RATES CARD */
.rates-card {
  border-radius: 0;
  border: none;
  border-bottom: 1px solid var(--border);
  padding: 24px;
  flex: 1;
}

.rates-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 4px;
}

/* TRACE CARD */
.trace-card {
  border-radius: 0;
  padding: 24px;
  position: relative;
  overflow: hidden;
}

.trace-icon {
  width: 44px; height: 44px;
  background: rgba(255,255,255,0.12);
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 14px;
}

.trace-title {
  font-size: 18px; font-weight: 700;
  color: #fff; margin-bottom: 10px;
}

.trace-desc {
  font-size: 13px; color: rgba(255,255,255,0.65);
  line-height: 1.6; margin-bottom: 18px;
}

.btn-outline-white {
  display: inline-block;
  padding: 10px 18px; border-radius: 8px;
  font-size: 12px; font-weight: 700; letter-spacing: 0.5px;
  border: 1.5px solid rgba(255,255,255,0.4);
  color: rgba(255,255,255,0.9);
  transition: all 0.2s;
}

.btn-outline-white:hover {
  background: rgba(255,255,255,0.12);
  border-color: rgba(255,255,255,0.7);
}

.trace-qr {
  position: absolute; right: 24px; bottom: 24px;
  opacity: 0.3;
}

.qr-grid {
  width: 64px; height: 64px;
  background:
    repeating-linear-gradient(
      0deg, transparent, transparent 4px,
      rgba(255,255,255,0.8) 4px, rgba(255,255,255,0.8) 5px
    ),
    repeating-linear-gradient(
      90deg, transparent, transparent 4px,
      rgba(255,255,255,0.8) 4px, rgba(255,255,255,0.8) 5px
    );
  border: 2px solid rgba(255,255,255,0.8);
  border-radius: 4px;
}

/* STATS BAND */
.stats-band {
  padding: 0 32px;
  background: var(--bg-cream);
  border-bottom: 1px solid var(--border);
}

.stats-inner {
  max-width: 1140px; margin: 0 auto;
  display: grid; grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: 0;
  min-height: 220px;
}

.stat-farmer {
  padding: 32px 32px 32px 0;
  border-right: 1px solid var(--border);
}

.farmer-name {
  font-size: 26px; font-weight: 800;
  color: var(--dark-green); line-height: 1.2;
  margin-bottom: 10px;
}

.farmer-desc {
  font-size: 13px; color: var(--text-muted);
  line-height: 1.6; margin-bottom: 20px;
}

.farmer-profile {
  display: flex; align-items: center; gap: 12px;
}

.farmer-avatar {
  width: 46px; height: 46px; border-radius: 50%;
  object-fit: cover; border: 2px solid var(--pale-green);
}

.farmer-profile-name { font-size: 14px; font-weight: 600; color: var(--text-dark); }
.farmer-profile-loc { font-size: 12px; color: var(--text-muted); }

.farmer-arrow {
  margin-left: auto;
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--dark-green); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; transition: all 0.2s;
}

.farmer-arrow:hover { background: var(--accent-green); transform: translateX(2px); }

.stat-box {
  padding: 32px 24px;
  border-right: 1px solid var(--border);
  display: flex; flex-direction: column; justify-content: center; align-items: center;
  text-align: center;
}

.stat-icon {
  color: var(--accent-green); margin-bottom: 12px;
}

.stat-num {
  font-family: 'Outfit', sans-serif;
  font-size: 36px; font-weight: 800;
  color: var(--dark-green); line-height: 1;
  margin-bottom: 8px;
}

.stat-num span {
  font-size: 18px; font-weight: 600;
  color: var(--accent-green);
}

.stat-label {
  font-size: 10px; font-weight: 700; letter-spacing: 1.2px;
  text-transform: uppercase; color: var(--text-muted);
}

.stat-hub {
  padding: 24px;
  display: flex; align-items: center; justify-content: center;
}

.hub-map-bg {
  width: 100%; height: 140px; border-radius: 16px;
  background: linear-gradient(135deg, #1a3a2a 0%, #2d5a3d 50%, #3d7a52 100%);
  display: flex; align-items: center; justify-content: center;
  position: relative; overflow: hidden;
}

.hub-map-bg::before {
  content: '';
  position: absolute; inset: 0;
  background-image: radial-gradient(circle at 50% 50%, rgba(255,255,255,0.05) 1px, transparent 1px);
  background-size: 20px 20px;
}

.hub-chip {
  display: flex; align-items: center; gap: 8px;
  background: rgba(255,255,255,0.15);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: 24px; padding: 8px 16px;
  font-size: 13px; font-weight: 600; color: #fff;
  position: relative; z-index: 1;
}

/* MARKET GRID */
.market-filters {
  display: flex; gap: 6px;
}

.filter-btn {
  padding: 7px 16px; border-radius: 20px;
  font-size: 13px; font-weight: 500;
  background: var(--bg-white); border: 1.5px solid var(--border);
  color: var(--text-mid); transition: all 0.2s;
}

.filter-btn:hover, .filter-btn.active {
  background: var(--dark-green); color: #fff; border-color: var(--dark-green);
}

.market-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 18px;
}

.market-card {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all 0.25s;
  cursor: pointer;
}

.market-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--pale-green);
}

.market-card-img {
  width: 100%; height: 160px;
  object-fit: cover; display: block;
  position: relative;
}

.market-card-img-wrap {
  position: relative; overflow: hidden;
}

.market-card-img-wrap img {
  width: 100%; height: 160px; object-fit: cover;
  transition: transform 0.4s ease;
}

.market-card:hover .market-card-img-wrap img { transform: scale(1.06); }

.market-card-price-tag {
  position: absolute; top: 12px; right: 12px;
  background: rgba(26,58,42,0.85);
  backdrop-filter: blur(4px);
  color: #fff; padding: 4px 10px;
  border-radius: 20px; font-size: 13px; font-weight: 700;
}

.market-card-body {
  padding: 16px;
}

.market-card-name {
  font-size: 16px; font-weight: 700;
  color: var(--text-dark); margin-bottom: 4px;
}

.market-card-sub {
  font-size: 12px; color: var(--text-muted); margin-bottom: 12px;
}

.market-card-footer {
  display: flex; align-items: center; justify-content: space-between;
}

.market-card-source {
  display: flex; align-items: center; gap: 5px;
  font-size: 11px; font-weight: 600; color: var(--accent-green);
}

.market-card-btn {
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--dark-green); color: #fff;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.2s;
}

.market-card-btn:hover { background: var(--accent-green); transform: scale(1.1); }

/* TRACEABILITY SECTION */
.trace-section {
  background: linear-gradient(180deg, var(--bg-cream) 0%, #eef5f0 100%);
}

.trace-steps {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr auto 1fr;
  align-items: center;
  gap: 0;
}

.trace-step {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 28px 24px;
  text-align: center;
  transition: all 0.25s;
}

.trace-step:hover {
  border-color: var(--accent-green);
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
}

.trace-step-icon {
  width: 56px; height: 56px;
  background: var(--pale-green);
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  color: var(--dark-green);
  margin: 0 auto 14px;
}

.trace-step-title {
  font-size: 15px; font-weight: 700;
  color: var(--text-dark); margin-bottom: 8px;
}

.trace-step-desc {
  font-size: 12px; color: var(--text-muted);
  line-height: 1.6;
}

.trace-step-arrow {
  font-size: 22px; color: var(--border);
  padding: 0 10px; flex-shrink: 0;
}
