/* ============================================================
   BENUE NOW — Design System
   Palette grounded in the Benue River and the state's identity
   as Nigeria's agricultural heartland: a calm river-teal carries
   trust and navigation; a harvest-gold accent is spent sparingly,
   only on deals and calls to action.
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@500;700&family=Inter:wght@400;500;600&display=swap');

:root {
    /* Color */
    --ink: #16211D;
    --ink-soft: #4B5A54;
    --ink-faint: #8B9990;
    --paper: #F6F8F6;
    --surface: #FFFFFF;
    --primary: #0E6B5C;
    --primary-dark: #0A4F44;
    --primary-tint: #E4F0EC;
    --accent: #E8A33D;
    --accent-dark: #C7811F;
    --accent-tint: #FCF0DA;
    --border: #DCE4DF;
    --danger: #B8483A;
    --danger-tint: #FBEAE7;

    /* Type */
    --font-display: 'Space Grotesk', sans-serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --text-xs: 0.75rem;
    --text-sm: 0.875rem;
    --text-base: 1rem;
    --text-lg: 1.125rem;
    --text-xl: 1.375rem;
    --text-2xl: 1.75rem;
    --text-3xl: 2.25rem;

    /* Space */
    --space-1: 4px;
    --space-2: 8px;
    --space-3: 12px;
    --space-4: 16px;
    --space-5: 20px;
    --space-6: 24px;
    --space-8: 32px;
    --space-10: 40px;
    --space-12: 48px;

    /* Shape */
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --radius-full: 999px;
    --shadow-card: 0 1px 3px rgba(22,33,29,0.07), 0 1px 2px rgba(22,33,29,0.04);
    --shadow-lifted: 0 8px 24px rgba(22,33,29,0.10);

    --nav-height: 60px;
    --bottom-nav-height: 64px;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    font-family: var(--font-body);
    background: var(--paper);
    color: var(--ink);
    padding-bottom: calc(var(--bottom-nav-height) + env(safe-area-inset-bottom, 0px));
}

h1, h2, h3, .font-display {
    font-family: var(--font-display);
    line-height: 1.15;
    margin: 0;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

.container { max-width: 480px; margin: 0 auto; padding: 0 16px; }
.container-wide { max-width: 1080px; margin: 0 auto; padding: 0 16px; }

/* ---------- Top nav ---------- */

.topnav {
    position: sticky; top: 0; z-index: 30;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    height: var(--nav-height);
}
.topnav-inner {
    max-width: 1080px; margin: 0 auto; padding: 0 16px;
    height: 100%; display: flex; align-items: center; justify-content: space-between;
}
.topnav-logo {
    font-family: var(--font-display); font-weight: 700; font-size: 1.125rem;
    letter-spacing: -0.01em; color: var(--primary-dark);
}
.topnav-logo span { color: var(--accent-dark); }
.topnav-links { display: none; }
.topnav-actions { display: flex; align-items: center; gap: var(--space-4); }
.topnav-icon-link { font-size: 1.1rem; color: var(--ink-soft); }

/* ---------- Signature: "Right now in Benue" ticker ---------- */

.ticker {
    background: var(--primary-dark);
    color: #EAF4F1;
    overflow: hidden;
    white-space: nowrap;
    font-size: var(--text-sm);
}
.ticker-track {
    display: inline-flex;
    gap: var(--space-10);
    padding: var(--space-2) 0;
    animation: ticker-scroll 38s linear infinite;
}
.ticker-track span { display: inline-flex; align-items: center; gap: var(--space-2); }
.ticker-dot { width: 5px; height: 5px; border-radius: 50%; background: var(--accent); flex: none; }
@keyframes ticker-scroll {
    from { transform: translateX(0); }
    to   { transform: translateX(-50%); }
}
@media (prefers-reduced-motion: reduce) {
    .ticker-track { animation: none; overflow-x: auto; }
}

/* ---------- Hero ---------- */

.hero { padding: var(--space-8) 0 var(--space-6); text-align: center; }
.hero h1 {
    font-size: var(--text-2xl);
    color: var(--ink);
    max-width: 320px;
    margin: 0 auto var(--space-3);
}
.hero p.subtitle { color: var(--ink-soft); font-size: var(--text-base); margin: 0 0 var(--space-6); }

.search-panel {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: var(--space-4);
    box-shadow: var(--shadow-card);
    text-align: left;
}
.location-pill {
    display: inline-flex; align-items: center; gap: var(--space-1);
    background: var(--primary-tint); color: var(--primary-dark);
    font-size: var(--text-sm); font-weight: 600;
    padding: var(--space-1) var(--space-3); border-radius: var(--radius-full);
    margin-bottom: var(--space-3);
}
.search-form { display: flex; gap: var(--space-2); }
.search-form input[type=text] {
    flex: 1; border: 1px solid var(--border); border-radius: var(--radius-sm);
    padding: 12px 14px; font-size: var(--text-base); font-family: inherit;
}
.hero-ctas { display: flex; gap: var(--space-3); margin-top: var(--space-5); }
.hero-ctas .btn { flex: 1; }

/* ---------- Buttons ---------- */

.btn {
    display: inline-flex; align-items: center; justify-content: center;
    gap: var(--space-2);
    padding: 11px 18px;
    border-radius: var(--radius-sm);
    font-size: var(--text-base); font-weight: 600; font-family: inherit;
    border: none; cursor: pointer; text-align: center;
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); }
.btn-outline { background: transparent; color: var(--primary-dark); border: 1.5px solid var(--primary); }
.btn-accent { background: var(--accent); color: #4A2E06; }
.btn-whatsapp { background: #1E8E5A; color: #fff; }
.btn-block { width: 100%; }
.btn-sm { padding: 7px 12px; font-size: var(--text-sm); }

/* ---------- Category quick-nav ---------- */

.cat-scroll {
    display: flex; gap: var(--space-3); overflow-x: auto;
    padding: var(--space-5) 0; scrollbar-width: none;
}
.cat-scroll::-webkit-scrollbar { display: none; }
.cat-pill {
    flex: none; display: flex; flex-direction: column; align-items: center; gap: var(--space-2);
    width: 76px; text-align: center;
}
.cat-pill-icon {
    width: 52px; height: 52px; border-radius: var(--radius-md);
    background: var(--surface); border: 1px solid var(--border);
    display: flex; align-items: center; justify-content: center; font-size: 1.4rem;
}
.cat-pill span { font-size: var(--text-xs); color: var(--ink-soft); font-weight: 500; }

/* ---------- Sections ---------- */

.section { padding: var(--space-6) 0; }
.section-head {
    display: flex; align-items: baseline; justify-content: space-between;
    margin-bottom: var(--space-4);
}
.section-head h2 { font-size: var(--text-xl); }
.section-head a { font-size: var(--text-sm); color: var(--primary-dark); font-weight: 600; }

/* ---------- Cards ---------- */

.h-scroll { display: flex; gap: var(--space-4); overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
.h-scroll::-webkit-scrollbar { display: none; }

.deal-card {
    flex: none; width: 200px;
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md);
    overflow: hidden; box-shadow: var(--shadow-card);
}
.deal-card-img {
    height: 130px; background: var(--primary-tint);
    display: flex; align-items: center; justify-content: center;
    font-size: 2rem; position: relative;
}
.discount-badge {
    position: absolute; top: 8px; left: 8px;
    background: var(--accent); color: #4A2E06;
    font-size: var(--text-xs); font-weight: 700;
    padding: 2px 8px; border-radius: var(--radius-full);
}
.deal-card-body { padding: var(--space-3); }
.deal-card-title { font-size: var(--text-sm); font-weight: 600; margin-bottom: 2px; }
.price-row { display: flex; align-items: baseline; gap: var(--space-2); margin: var(--space-1) 0; }
.price-now { font-weight: 700; color: var(--primary-dark); }
.price-was { font-size: var(--text-xs); color: var(--ink-faint); text-decoration: line-through; }
.meta-row { display: flex; align-items: center; gap: 4px; font-size: var(--text-xs); color: var(--ink-soft); }
.verified-badge { color: var(--primary-dark); }

.listing-card {
    display: flex; gap: var(--space-3);
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md);
    padding: var(--space-3); box-shadow: var(--shadow-card); margin-bottom: var(--space-3);
}
.listing-card-thumb {
    width: 72px; height: 72px; border-radius: var(--radius-sm); flex: none;
    background: var(--primary-tint); display: flex; align-items: center; justify-content: center; font-size: 1.5rem;
}
.listing-card-body { flex: 1; min-width: 0; }
.listing-card-title { font-weight: 600; font-size: var(--text-base); margin-bottom: 2px; }

.grid-cards {
    display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--space-4);
}
@media (min-width: 640px) { .grid-cards { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 900px) { .grid-cards { grid-template-columns: repeat(4, 1fr); } }
.grid-card {
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md);
    overflow: hidden; box-shadow: var(--shadow-card);
}
.grid-card-img { height: 110px; background: var(--primary-tint); display: flex; align-items: center; justify-content: center; font-size: 1.75rem; }
.grid-card-body { padding: var(--space-3); }

/* ---------- Badges & pills ---------- */

.badge { display: inline-flex; align-items: center; gap: 4px; font-size: var(--text-xs); font-weight: 600; padding: 2px 8px; border-radius: var(--radius-full); }
.badge-verified { background: var(--primary-tint); color: var(--primary-dark); }
.badge-pending { background: var(--accent-tint); color: var(--accent-dark); }

/* ---------- Forms ---------- */

.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md); padding: var(--space-5); box-shadow: var(--shadow-card); }
label { display: block; font-size: var(--text-sm); font-weight: 600; margin: var(--space-4) 0 var(--space-1); }
input[type=text], input[type=email], input[type=tel], input[type=password],
input[type=number], select, textarea {
    width: 100%; padding: 11px 13px; border: 1px solid var(--border);
    border-radius: var(--radius-sm); font-size: var(--text-base); font-family: inherit;
    background: var(--surface); color: var(--ink);
}
textarea { resize: vertical; min-height: 90px; }
.field-hint { font-size: var(--text-xs); color: var(--ink-faint); margin-top: 4px; }
.error { background: var(--danger-tint); color: var(--danger); padding: 10px 12px; border-radius: var(--radius-sm); font-size: var(--text-sm); margin-bottom: 12px; }
.success { background: var(--primary-tint); color: var(--primary-dark); padding: 10px 12px; border-radius: var(--radius-sm); font-size: var(--text-sm); margin-bottom: 12px; }
.muted-link { display: block; text-align: center; margin-top: 16px; font-size: var(--text-sm); color: var(--ink-soft); }
.filter-row { display: flex; gap: var(--space-2); overflow-x: auto; padding: var(--space-3) 0; scrollbar-width: none; }
.filter-row::-webkit-scrollbar { display: none; }
.filter-chip {
    flex: none; font-size: var(--text-sm); font-weight: 500; padding: 6px 14px;
    border-radius: var(--radius-full); border: 1px solid var(--border); background: var(--surface); color: var(--ink-soft);
}
.filter-chip.active { background: var(--primary); border-color: var(--primary); color: #fff; }

/* ---------- Empty state ---------- */

.empty-state { text-align: center; padding: var(--space-10) var(--space-4); color: var(--ink-soft); }
.empty-state .icon { font-size: 2rem; margin-bottom: var(--space-3); }

/* ---------- Bottom nav (mobile) ---------- */

.bottom-nav {
    position: fixed; bottom: 0; left: 0; right: 0; z-index: 40;
    background: var(--surface); border-top: 1px solid var(--border);
    height: var(--bottom-nav-height);
    padding-bottom: env(safe-area-inset-bottom, 0px);
    display: flex;
}
.bottom-nav a {
    flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 2px; font-size: 10px; font-weight: 600; color: var(--ink-faint);
}
.bottom-nav a.active { color: var(--primary-dark); }
.bottom-nav .nav-icon { font-size: 1.2rem; }
.bottom-nav a.post-cta .nav-icon {
    background: var(--primary); color: #fff; width: 34px; height: 34px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center; font-size: 1.1rem;
}

@media (min-width: 768px) {
    .bottom-nav { display: none; }
    body { padding-bottom: 0; }
    .hero h1 { font-size: var(--text-3xl); max-width: 460px; }
    .topnav-links {
        display: flex; align-items: center; gap: var(--space-6);
        font-size: var(--text-sm); font-weight: 600; color: var(--ink-soft);
    }
    .topnav-links a:hover { color: var(--primary-dark); }
}
