/* ============================================================================
   ALTER FOOD AFRICA - UNIFIED DARK THEME DESIGN SYSTEM
   ============================================================================ */

:root {
    --primary: #16a34a;
    --primary-dark: #15803d;
    --primary-light: #4ade80;
    
    --bg-dark: #0f172a;
    --bg-darker: #0a0e27;
    --bg-card: #1e293b;
    --bg-card-hover: #334155;
    
    --text-primary: #ffffff;
    --text-secondary: #cbd5e1;
    --text-muted: #94a3b8;
    
    --border: #334155;
    --border-light: #475569;
    
    --success: #22c55e;
    --warning: #fbbf24;
    --danger: #ef4444;
    --info: #3b82f6;
    
    --radius-sm: 6px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.5);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.4);
    --shadow-lg: 0 20px 25px rgba(0,0,0,0.3);
    
    --transition: 300ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* ============================================================================
   GLOBAL STYLES
   ============================================================================ */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    background: var(--bg-dark);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: var(--bg-dark);
    color: var(--text-primary);
    line-height: 1.6;
    font-size: 16px;
}

/* ============================================================================
   TYPOGRAPHY
   ============================================================================ */

h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    color: var(--text-primary);
}

h1 { font-size: 2.5rem; margin-bottom: 1.5rem; }
h2 { font-size: 2rem; margin-bottom: 1.25rem; }
h3 { font-size: 1.5rem; margin-bottom: 1rem; }
h4 { font-size: 1.25rem; margin-bottom: 0.75rem; }
h5 { font-size: 1.125rem; margin-bottom: 0.75rem; }
h6 { font-size: 1rem; margin-bottom: 0.5rem; }

p { color: var(--text-secondary); margin-bottom: 1rem; }

a {
    color: var(--primary-light);
    text-decoration: none;
    transition: color var(--transition);
}

a:hover { color: var(--primary); }

/* ============================================================================
   LAYOUT
   ============================================================================ */

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* ============================================================================
   NAVBAR
   ============================================================================ */

.navbar {
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-sm);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
}

.logo-img {
    width: 32px;
    height: 32px;
}

.logo-text {
    font-weight: 700;
    color: var(--primary);
    font-size: 1.25rem;
}

.navbar-menu {
    display: flex;
    align-items: center;
    gap: 2rem;
    list-style: none;
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color var(--transition);
}

.nav-link:hover {
    color: var(--primary);
}

.navbar-user {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-left: 1rem;
    padding-left: 1rem;
    border-left: 1px solid var(--border);
}

.user-name {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.navbar-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 1.5rem;
    cursor: pointer;
}

/* ============================================================================
   BUTTONS
   ============================================================================ */

.btn {
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-md);
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all var(--transition);
    text-decoration: none;
    display: inline-block;
    font-size: 0.95rem;
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-dark);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
}

.btn-secondary:hover {
    background: var(--primary);
    color: white;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1.05rem;
}

/* ============================================================================
   CARDS
   ============================================================================ */

.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    transition: all var(--transition);
}

.card:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-md);
}

/* ============================================================================
   FORMS
   ============================================================================ */

input,
textarea,
select {
    background: var(--bg-darker);
    border: 1px solid var(--border);
    color: var(--text-primary);
    padding: 0.75rem;
    border-radius: var(--radius-md);
    font-size: 0.95rem;
    transition: all var(--transition);
    font-family: inherit;
}

input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.1);
}

/* ============================================================================
   UTILITIES
   ============================================================================ */

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }
.gap-3 { gap: 1.5rem; }

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

/* ============================================================================
   FOOTER
   ============================================================================ */

.footer {
    background: var(--bg-card);
    border-top: 1px solid var(--border);
    padding: 3rem 0;
    margin-top: 4rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.footer .container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.footer h4 {
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.footer a {
    display: block;
    margin-bottom: 0.5rem;
}

.footer-bottom {
    border-top: 1px solid var(--border);
    margin-top: 2rem;
    padding-top: 2rem;
    text-align: center;
}

/* ============================================================================
   RESPONSIVE
   ============================================================================ */

@media (max-width: 768px) {
    .navbar-menu {
        position: fixed;
        top: 60px;
        left: 0;
        right: 0;
        bottom: 0;
        background: var(--bg-card);
        flex-direction: column;
        gap: 1rem;
        padding: 1rem;
        display: none;
        z-index: 999;
    }

    .navbar-menu.active {
        display: flex;
    }

    .navbar-toggle {
        display: block;
    }

    h1 { font-size: 1.8rem; }
    h2 { font-size: 1.5rem; }
    h3 { font-size: 1.25rem; }

    .grid {
        grid-template-columns: 1fr;
    }

    .container {
        padding: 0 1rem;
    }

    .navbar-user {
        flex-direction: column;
        align-items: flex-start;
        border-left: none;
        border-top: 1px solid var(--border);
        padding-left: 0;
        padding-top: 1rem;
    }

    /* Hero Section Mobile */
    .hero-section {
        grid-template-columns: 1fr;
        padding: 2rem 1rem;
        gap: 2rem;
    }

    .hero-content h1 {
        font-size: 1.8rem;
    }

    .hero-image img {
        height: 250px;
    }

    /* Section Mobile */
    .section {
        padding: 2rem 1rem;
    }

    .section-title {
        font-size: 1.4rem;
    }

    /* Grids Mobile */
    .categories-grid,
    .testimonials-grid,
    .merchants-grid,
    .features-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .features-grid {
        margin-top: 2rem;
        padding: 0 1rem;
    }

    /* Hero CTA Mobile */
    .hero-cta-group {
        flex-direction: column;
    }

    .btn-hero {
        width: 100%;
        text-align: center;
    }
}

/* ============================================================================
   ANIMATIONS
   ============================================================================ */

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from { transform: translateY(10px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.fade-in { animation: fadeIn var(--transition); }
.slide-up { animation: slideUp var(--transition); }

/* ============================================================================
   HOMEPAGE COMPONENTS
   ============================================================================ */

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, var(--bg-dark) 0%, #1a2949 100%);
    color: var(--text-primary);
    padding: 4rem 2rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
    max-width: 1400px;
    margin: 0 auto;
}

.hero-content h1 {
    font-size: 2.5rem;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    font-weight: 700;
}

.hero-content p {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    line-height: 1.6;
}

.hero-image {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.hero-image img {
    width: 100%;
    height: 400px;
    object-fit: cover;
}

.hero-cta-group {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.btn-hero {
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-md);
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all var(--transition);
    text-decoration: none;
    display: inline-block;
}

.btn-hero.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-hero.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-hero.btn-secondary {
    background: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
}

.btn-hero.btn-secondary:hover {
    background: var(--primary);
    color: white;
}

/* Features Grid */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-top: 3rem;
    max-width: 1400px;
    margin-left: auto;
    margin-right: auto;
    padding: 0 2rem;
}

.feature-card {
    background: var(--bg-card);
    padding: 1.5rem;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    gap: 1rem;
    transition: all var(--transition);
}

.feature-card:hover {
    border-color: var(--primary);
    transform: translateY(-4px);
}

.feature-icon {
    font-size: 2rem;
}

.feature-card h3 {
    color: var(--primary);
    font-size: 0.9rem;
    font-weight: 700;
    text-transform: uppercase;
}

.feature-card p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Section */
.section {
    padding: 4rem 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

.section-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.view-all {
    color: var(--primary-light);
    font-size: 0.9rem;
    cursor: pointer;
    text-decoration: none;
    transition: color var(--transition);
}

.view-all:hover {
    color: var(--primary);
}

/* Categories Grid */
.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.category-card {
    background: linear-gradient(135deg, rgba(22, 163, 74, 0.1) 0%, rgba(22, 163, 74, 0.05) 100%);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    cursor: pointer;
    transition: all var(--transition);
    position: relative;
    overflow: hidden;
}

.category-card:hover {
    border-color: var(--primary);
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.category-card img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: var(--radius-md);
    margin-bottom: 1rem;
}

.category-card h3 {
    color: var(--text-primary);
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.category-card p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Testimonials Grid */
.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.testimonial-card {
    background: var(--bg-card);
    padding: 1.5rem;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    transition: all var(--transition);
}

.testimonial-card:hover {
    border-color: var(--primary);
}

.testimonial-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.testimonial-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
}

.testimonial-info h4 {
    color: var(--text-primary);
    font-size: 0.95rem;
    margin-bottom: 0.25rem;
}

.testimonial-stars {
    color: var(--warning);
    font-size: 0.85rem;
}

.testimonial-text {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.6;
}

/* Merchants Grid */
.merchants-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.merchant-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--border);
    transition: all var(--transition);
}

.merchant-card:hover {
    border-color: var(--primary);
    transform: translateY(-4px);
}

.merchant-image {
    width: 100%;
    height: 150px;
    object-fit: cover;
}

.merchant-info {
    padding: 1.5rem;
}

.merchant-name {
    color: var(--text-primary);
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.merchant-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.merchant-rating {
    color: var(--warning);
}
