/* ============================================
   Zambia Marketplace - Modern CSS Styles
   ============================================ */

:root {
    /* Colors */
    --primary: #1a73e8;
    --primary-dark: #1557b0;
    --secondary: #34a853;
    --accent: #fbbc04;
    --danger: #ea4335;
    
    --dark: #1a1a2e;
    --dark-light: #16213e;
    --text-dark: #2d3748;
    --text-light: #5c6b80;
    
    --bg-primary: #ffffff;
    --bg-secondary: #f7fafc;
    --bg-tertiary: #edf2f7;
    
    --border-color: #e2e8f0;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.1);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 25px rgba(0,0,0,0.1);
    --shadow-xl: 0 20px 40px rgba(0,0,0,0.15);
    
    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2rem;
    --spacing-xl: 3rem;
    
    /* Border Radius */
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    
    /* Transitions */
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);

    /* ============================================================
       v0.1 brand tokens -- the single source of truth.
       Declared last so they win over the legacy literals above,
       which stay as aliases because hundreds of existing rules
       still reference them.
       ============================================================ */

    /* Ink: navy is text, not a background. */
    --ink-900: #0f1b3d;
    --ink-700: #24304a;
    --ink-600: #3d4a63;
    --ink-500: #64748b;
    --ink-400: #94a3b8;

    /* Action: blue stays the colour of "do this". */
    --action: #1a73e8;
    --action-hover: #1557b0;
    --action-active: #134a97;
    --action-tint: rgba(26, 115, 232, 0.08);
    --action-ring: rgba(26, 115, 232, 0.28);

    /* Accent: one gold, shared by every sheet. Marks position and
       live money -- active nav, active filter, focus on a figure. */
    --gold: #d7a13b;
    --gold-ink: #8a6423;
    --gold-tint: rgba(215, 161, 59, 0.13);

    /* Surfaces: page is --surface-2, cards are --surface, so a
       card reads as raised without needing a border. */
    --surface: #ffffff;
    --surface-2: #f6f8fb;
    --surface-3: #eef2f7;

    /* Lines */
    --line: #e3e8ef;
    --line-strong: #cbd5e1;

    /* Status */
    --success: #1e8e5a;
    --success-tint: #e7f4ee;
    --warning: #b45309;
    --warning-tint: #fdf3e3;
    --danger: #c62828;
    --danger-tint: #fdeaea;

    /* Radii */
    --r-sm: 6px;
    --r-md: 10px;
    --r-lg: 14px;
    --r-pill: 999px;

    /* Elevation -- navy-tinted, never grey-black */
    --sh-1: 0 1px 2px rgba(15, 27, 61, 0.06), 0 1px 3px rgba(15, 27, 61, 0.05);
    --sh-2: 0 2px 4px rgba(15, 27, 61, 0.05), 0 8px 24px rgba(15, 27, 61, 0.08);
    --sh-pop: 0 12px 32px rgba(15, 27, 61, 0.16), 0 2px 6px rgba(15, 27, 61, 0.08);

    /* Motion -- dense tool surfaces want 150-200ms, not 300ms */
    --t-fast: 140ms cubic-bezier(0.2, 0, 0, 1);
    --t-base: 190ms cubic-bezier(0.2, 0, 0, 1);

    /* Legacy aliases */
    --primary: var(--action);
    --primary-dark: var(--action-hover);
    --secondary: var(--success);
    --accent: var(--gold);
    --dark: var(--ink-900);
    --dark-light: var(--ink-700);
    --text-dark: var(--ink-600);
    --text-light: var(--ink-500);
    --bg-primary: var(--surface);
    --bg-secondary: var(--surface-2);
    --bg-tertiary: var(--surface-3);
    --border-color: var(--line);
    --radius-sm: var(--r-sm);
    --radius-md: var(--r-md);
    --radius-lg: var(--r-lg);
    --radius-xl: var(--r-lg);
    --shadow-sm: var(--sh-1);
    --shadow-md: var(--sh-2);
    --shadow-lg: var(--sh-pop);
}

/* ============================================
   Global Styles
   ============================================ */

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

html {
    /* Was on body, but any ancestor with non-visible overflow (even just
       on the x-axis) breaks position:sticky for every descendant -- that's
       why the sticky nav/sidebar never stuck. html can carry the horizontal
       clip instead; it doesn't sit between body's children and the
       viewport the way body itself does, so sticky keeps working. */
    overflow-x: hidden;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: var(--text-dark);
    background: var(--bg-secondary);
    line-height: 1.6;
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

img {
    max-width: 100%;
    display: block;
}

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

/* ============================================
   Navigation
   ============================================ */

.navbar {
    /* One background, not two. The translucent + blur treatment made the
       bar's contents shimmer against whatever scrolled behind it and cost
       a repaint on every scroll; a solid bar with a hairline reads
       calmer and is cheaper. */
    background: var(--surface);
    box-shadow: var(--sh-1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--spacing-sm) 0;
    gap: var(--spacing-md);
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--dark);
}


.logo i {
    color: var(--primary);
    font-size: 1.8rem;
}

.logo strong {
    color: var(--primary);
}

.search-bar {
    flex: 1;
    max-width: 500px;
    position: relative;
}





.search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    margin-top: 0.5rem;
    max-height: 400px;
    overflow-y: auto;
    display: none;
}

/* Live-search dropdown items (public-footer.php / footer.php build this
   markup via JS) -- had no styling anywhere in any stylesheet, on any
   page, public or dashboard. Rendered as plain unstyled links/images. */
.search-result-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.6rem 0.9rem;
    color: var(--text-dark);
    border-bottom: 1px solid var(--border-color);
}

.search-result-item:last-child {
    border-bottom: none;
}

.search-result-item:hover {
    background: var(--bg-secondary);
}

.search-result-item img {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
    object-fit: cover;
    flex-shrink: 0;
}

/* Icon variant for page/data results (globalSearch -- no product image
   to show), same slot size as .search-result-item img above so rows
   line up whichever kind of result is shown. */
.search-result-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
    background: var(--bg-secondary);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 1rem;
}

.search-section-label {
    padding: 0.5rem 0.9rem 0.25rem;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-light);
}

.search-result-item strong,
.search-result-item .search-result-name {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-dark);
}

.search-result-item span,
.search-result-item .search-result-price {
    display: block;
    font-size: 0.85rem;
    color: var(--primary);
    font-weight: 600;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-md);
    color: var(--text-dark);
    font-weight: 500;
    transition: var(--transition);
    background: transparent;
    border: none;
    cursor: pointer;
}

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

.cart-btn {
    position: relative;
}

.cart-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: var(--danger);
    color: white;
    font-size: 0.7rem;
    padding: 0.15rem 0.4rem;
    border-radius: 999px;
    font-weight: 600;
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--dark);
}

/* ============================================
   Buttons
   ============================================ */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    text-align: center;
}

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

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

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

.btn-secondary:hover {
    background: #2d8e46;
    transform: translateY(-2px);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--bg-tertiary);
    color: var(--bg-tertiary);
}

.btn-outline:hover {
    background: var(--primary);
    color: white;
    border: 2px solid var(--primary);
}

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

.btn-danger:hover {
    background: #c8311f;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

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

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

.btn-block {
    width: 100%;
}

.btn-icon {
    padding: 0.5rem;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.btn-icon:hover {
    background: var(--primary);
    color: white;
    transform: scale(1.1);
}

/* ============================================
   Hero Section
   ============================================ */

.hero {
    position: relative;
    padding: 4rem 0;
    overflow: hidden;
    background: linear-gradient(135deg, #4c5eb1 0%, #5a3281 100%);
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1440 320"><path fill="%23ffffff" fill-opacity="0.1" d="M0,96L48,112C96,128,192,160,288,160C384,160,480,128,576,122.7C672,117,768,139,864,138.7C960,139,1056,117,1152,112C1248,107,1344,117,1392,122.7L1440,128L1440,320L1392,320C1344,320,1248,320,1152,320C1056,320,960,320,864,320C768,320,672,320,576,320C480,320,384,320,288,320C192,320,96,320,48,320L0,320Z"></path></svg>') no-repeat bottom;
    background-size: cover;
    opacity: 0.3;
}

.hero-content {
    position: relative;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-xl);
    align-items: center;
}

.hero-text {
    color: white;
}

.badge {
    display: inline-block;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    padding: 0.5rem 1rem;
    border-radius: 999px;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: var(--spacing-md);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: var(--spacing-md);
}

.gradient-text {
    background: linear-gradient(135deg, #ffa600 0%, #00c3ff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
}

.hero-subtitle {
    font-size: 1.25rem;
    margin-bottom: var(--spacing-lg);
    opacity: 0.9;
    line-height: 1.7;
}

.hero-buttons {
    display: flex;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-xl);
    color: var(--text-light);
}

.hero-stats {
    display: flex;
    gap: var(--spacing-lg);
}

.stat {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.stat i {
    font-size: 2rem;
    opacity: 0.8;
}

.stat strong {
    display: block;
    font-size: 1.5rem;
}

.stat span {
    font-size: 0.875rem;
    opacity: 0.8;
}

/* Hero Image with Floating Cards */
.hero-image {
    position: relative;
    height: 500px;
}

.floating-card {
    position: absolute;
    background: white;
    border-radius: var(--radius-lg);
    padding: 1rem;
    box-shadow: var(--shadow-xl);
    animation: float 3s ease-in-out infinite;
}

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

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

.card-1 {
    top: 50px;
    left: 50px;
    animation-delay: 0s;
}

.card-2 {
    top: 200px;
    right: 100px;
    animation-delay: 1s;
}

.card-3 {
    bottom: 50px;
    left: 150px;
    animation-delay: 2s;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
}

/* ============================================
   Sections
   ============================================ */

.categories-section,
.featured-products,
.how-it-works {
    padding: 4rem 0;
}

.section-header {
    text-align: center;
    margin-bottom: var(--spacing-xl);
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: var(--spacing-sm);
}

.section-subtitle {
    font-size: 1.125rem;
    color: var(--text-light);
}

.view-all {
    color: var(--primary);
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.view-all:hover {
    gap: 0.75rem;
}

/* ============================================
   Categories Grid
   ============================================ */

.categories-grid {
  display: flex;
  gap: 1rem;
  overflow-x: scroll !important;
  padding: 1rem 0;
  scroll-behavior: smooth;
}

.categories-grid::-webkit-scrollbar {
  height: 8px;
}

.categories-grid::-webkit-scrollbar-thumb {
  background-color: #ccc;
  border-radius: 4px;
}
.categories-grid::-webkit-scrollbar-track {
  background-color: #f1f1f1;
}


.category-card {
    background: white;
    padding: var(--spacing-lg);
    border-radius: var(--radius-lg);
    text-align: center;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.category-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto var(--spacing-sm);
    font-size: 2rem;
    color: white;
}

.category-card .card-title {
    font-size: 1.125rem;
    margin-bottom: 0.25rem;
    color: var(--dark);
}

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

/* ============================================
   Products Grid
   ============================================ */

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: var(--spacing-lg);
}

.product-card {
    background: white;
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
    position: relative;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}
.product-body {
    padding: var(--spacing-md);
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.product-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--dark);
    margin: 0;
}

.product-price {
    font-size: 1.25rem;
    font-weight: 700;
    color: #28a745;
    margin: 5px 0;
}

.product-description {
    font-size: 0.85rem;
    color: var(--text-light);
    margin: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.product-vendor-line {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    font-size: 0.78rem;
    color: var(--text-light);
    margin: 2px 0 4px;
}

.product-vendor-line i { margin-right: 3px; }

.product-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin: 2px 0 6px;
}

.product-badges .badge,
.product-meta-line .badge {
    font-size: 0.72rem;
    padding: 2px 8px;
    border-radius: 999px;
}

.badge-outline {
    background: transparent;
    border: 1px solid var(--border-color, #d0d5dd);
    color: var(--text-light);
}

.product-meta-line {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    margin: 4px 0 10px;
}

.product-actions {
    display: flex;
    gap: 10px;
    margin-top: auto;
}

.product-actions .btn {
    flex: 1;
    text-align: center;
}

.product-badge {
    position: absolute;
    top: 1rem;
    left: 1rem;
    background: var(--accent);
    color: var(--dark);
    padding: 0.25rem 0.75rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 700;
    z-index: 10;
}

.product-image {
    position: relative;
    height: 250px;
    overflow: hidden;
    background: var(--bg-secondary);
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.product-card:hover .product-image img {
    transform: scale(1.1);
}

.product-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    gap: 0.5rem;
    opacity: 0;
    transition: var(--transition);
}

.product-card:hover .product-overlay {
    opacity: 1;
}

.product-info {
    padding: var(--spacing-md);
}

.product-vendor {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.product-vendor img {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    object-fit: cover;
}

.product-vendor span {
    font-size: 0.875rem;
    color: var(--text-light);
}

.product-title {
    font-size: 1rem;
    margin-bottom: 0.5rem;
    color: var(--dark);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-rating {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    margin-bottom: 0.75rem;
}

.product-rating i {
    color: var(--accent);
    font-size: 0.875rem;
}

.product-rating span {
    font-size: 0.875rem;
    color: var(--text-light);
    margin-left: 0.25rem;
}

/* Social proof badge. The view only renders once the figure clears
   SOCIAL_PROOF_MINIMUM, so this never has to style a "1 sold". Scoped through
   the rating row so it beats the `.product-rating span` rule above. */
.product-rating .card-proof,
.pd-rating .pd-sold {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.8rem;
    color: var(--text-light);
    margin-left: 0.35rem;
}

.product-rating .card-proof i,
.pd-rating .pd-sold i {
    font-size: 0.7rem;
}

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

.product-price {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.current-price {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
}

.old-price {
    font-size: 1rem;
    color: var(--text-light);
    text-decoration: line-through;
}

/* ============================================
   How It Works
   ============================================ */

.steps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--spacing-lg);
}

.step-card {
    background: white;
    padding: var(--spacing-lg);
    border-radius: var(--radius-lg);
    text-align: center;
    position: relative;
    box-shadow: var(--shadow-sm);
}

.step-number {
    position: absolute;
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 40px;
    background: var(--primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.25rem;
}

.step-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, rgba(26, 115, 232, 0.1), rgba(52, 168, 83, 0.1));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 2rem auto 1rem;
    font-size: 2rem;
    color: var(--primary);
}

.step-card .card-title {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    color: var(--dark);
}

.step-card p {
    color: var(--text-light);
}

/* --- TOAST-SPECIFIC STYLES --- */

/* The container positions the toasts in the bottom-right corner */
#toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 10px;
    /* Ensure only toasts inside this container use the modern style */
}

/* Base modern styling for the notifications */
.notification {
    position: fixed;
    top: 100px;
    right: 20px;
    min-width: 280px;
    max-width: 350px;
    padding: 15px 20px;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    color: #fff;
    opacity: 0; /* Hidden by default */
    transform: translateX(100%);
    transition: all 0.3s ease-out; /* Smooth slide-in/out */
}

/* Class added by JS to show the notification */
.notification.show {
    opacity: 1;
    transform: translateX(0);
}

.notification-content {
    display: flex;
    align-items: center;
    font-size: 15px;
}

.notification-content i {
    font-size: 20px;
    margin-right: 10px;
    line-height: 1;
}

/* Type-specific colors */
.notification-success {
    background-color: #4CAF50; /* Green */
    border-left: 5px solid #388E3C;
}

.notification-error {
    background-color: #F44336; /* Red */
    border-left: 5px solid #D32F2F;
}

.notification-warning {
    background-color: #FF9800; /* Orange/Warning */
    border-left: 5px solid #FB8C00;
}

.notification-info {
    background-color: #2196F3; /* Blue/Info */
    border-left: 5px solid #1976D2;
}


/* ====================================
    FORM STYLES
   ==================================== */
.auth-container {
            min-height: 100vh;
            display: flex;
            align-items: center;
            justify-content: center;
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            padding: 2rem;
        }
        .auth-card {
            background: white;
            border-radius: 1rem;
            box-shadow: 0 20px 60px rgba(0,0,0,0.3);
            max-width: 600px;
            width: 100%;
            padding: 3rem;
            max-height: 90vh;
            overflow-y: auto;
        }
        .auth-header {
            text-align: center;
            margin-bottom: 2rem;
        }
        .auth-logo {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 0.5rem;
            font-size: 2rem;
            font-weight: 700;
            color: var(--primary);
            margin-bottom: 1rem;
        }
        .auth-logo img {
            width: 44px;
            height: 44px;
        }
        .auth-title {
            font-size: 1.75rem;
            font-weight: 700;
            color: var(--dark);
            margin-bottom: 0.5rem;
        }
        .auth-subtitle {
            color: var(--text-light);
        }
        .role-selector {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 1rem;
            margin-bottom: 2rem;
        }
        .role-option {
            border: 2px solid var(--border-color);
            border-radius: var(--radius-md);
            padding: 1.5rem;
            text-align: center;
            cursor: pointer;
            transition: var(--transition);
        }
        .role-option input {
            display: none;
        }
        .role-option:hover {
            border-color: var(--primary);
        }
        .role-option input:checked + .role-content {
            color: var(--primary);
        }
        .role-option input:checked ~ .role-option {
            border-color: var(--primary);
            background: rgba(26, 115, 232, 0.1);
        }
        .role-content i {
            font-size: 2.5rem;
            margin-bottom: 0.5rem;
        }
        .role-content h3 {
            font-size: 1.125rem;
            margin-bottom: 0.25rem;
        }
        .form-group {
            margin-bottom: 1.5rem;
        }
        .form-label {
            display: block;
            font-weight: 600;
            margin-bottom: 0.5rem;
            color: var(--dark);
        }
        .form-input, .form-select, .form-textarea {
            width: 100%;
            padding: 0.875rem 1rem;
            border: 2px solid var(--border-color);
            border-radius: var(--radius-md);
            font-size: 1rem;
            transition: var(--transition);
        }
        .form-input:focus, .form-select:focus, .form-textarea:focus {
            outline: none;
            border-color: var(--primary);
        }
        .form-textarea {
            resize: vertical;
            min-height: 100px;
        }
        .error-message {
            color: var(--danger);
            font-size: 0.875rem;
            margin-top: 0.25rem;
        }
        .form-row {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 1rem;
        }
        .vendor-fields {
            display: none;
        }
        .vendor-fields.active {
            display: block;
        }
        .auth-footer {
            text-align: center;
            margin-top: 1.5rem;
            color: var(--text-light);
        }
        .auth-footer a {
            color: var(--primary);
            font-weight: 600;
        }
        .alert {
            padding: 1rem;
            border-radius: var(--radius-md);
            margin-bottom: 1.5rem;
        }
        .alert-error {
            background: #f8d7da;
            color: #721c24;
            border: 1px solid #f5c6cb;
        }


/* ============================================
   Footer
   ============================================ */

.footer {
    background: var(--dark);
    color: rgba(255, 255, 255, 0.8);
    padding: 3rem 0 1rem;
}

.footer-content {
    display: grid;
    /* brand + Quick Links + For Vendors + Help & Legal.
       These four must stay direct children of .footer-content --
       wrapping the link columns in an extra div puts them all in a
       single (1fr) track and leaves the last two tracks empty. */
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: var(--spacing-xl);
    margin-bottom: var(--spacing-lg);
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.5rem;
    font-weight: 600;
    color: white;
    margin-bottom: 1rem;
}

.footer-logo img {
    width: 34px;
    height: 34px;
}

.footer-column p {
    margin-bottom: 1rem;
    line-height: 1.7;
}

.social-links {
    display: flex;
    gap: 0.75rem;
}

.social-links a {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.social-links a:hover {
    background: var(--primary);
    transform: translateY(-3px);
}

.footer-column h4 {
    color: white;
    margin-bottom: 1rem;
}

.footer-column ul {
    list-style: none;
}

.footer-column ul li {
    margin-bottom: 0.5rem;
}

/* Keep link labels on one line so "Terms of Service" / "Become a
   Vendor" never break across two lines in the narrow columns. */
.footer-column ul li a {
    display: inline-block;
    line-height: 1.5;
}

.footer-column ul li a:hover {
    color: var(--primary);
    padding-left: 0.5rem;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-links {
    display: flex;
    gap: 1.5rem;
}

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

/* "Developed by <Genptech>" credit. It only had rules inside the
   max-width:768px block, so on desktop the link fell back to the
   browser's default link colour, which is unreadable on the dark
   footer. Inherit the footer colour instead; the mobile block below
   still recolours the inner <span> with --accent. */
.developer a {
    color: inherit;
}

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

/* ============================================
   Cart Modal
   ============================================ */

.cart-modal {
    position: fixed;
    top: 0;
    right: -100%;
    width: 100%;
    max-width: 400px;
    height: 100vh;
    background: white;
    box-shadow: var(--shadow-xl);
    z-index: 9999;
    transition: right 0.3s ease;
}

.cart-modal.active {
    right: 0;
}
.cart-modal::before {
    /* Was position:absolute with left:-60px -- relative to the drawer's
       OWN 400px-wide fixed box, not the viewport. On any screen wider than
       ~460px that put the "backdrop" almost entirely off-screen to the
       right of the drawer instead of dimming the page behind it.
       position:fixed anchors it to the viewport instead, independent of
       the drawer's width, so it actually covers the page. */
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    z-index: -1;
}

.cart-modal.active::before {
    opacity: 1;
    pointer-events: all;
}

.cart-content {
    /* .cart-modal::before is the dimmed backdrop for the rest of the page,
       but as a pseudo-element it lives *inside* .cart-modal's own box, so
       without an opaque background here the drawer's own content was
       transparent and the 50%-black backdrop showed straight through it —
       washing the whole panel (and its lighter icon/text colors) out to
       grey. Giving the drawer panel itself a solid background keeps the
       backdrop where it belongs: dimming the page behind the drawer only. */
    background: var(--bg-primary);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.cart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--spacing-md);
    border-bottom: 1px solid var(--border-color);
}

.cart-header h3 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--dark);
}

.close-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-light);
    transition: var(--transition);
}

.close-btn:hover {
    color: var(--danger);
    transform: rotate(90deg);
}

.cart-body {
    flex: 1;
    overflow-y: auto;
    padding: var(--spacing-md);
}

.empty-cart {
    text-align: center;
    padding: var(--spacing-xl);
}

.empty-cart i {
    font-size: 4rem;
    color: var(--text-light);
    margin-bottom: 1rem;
}

.cart-footer {
    padding: var(--spacing-md);
    border-top: 1px solid var(--border-color);
}

.cart-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    font-size: 1.25rem;
}

/* ============================================
   Responsive Design
   ============================================ */

@media (max-width: 1024px) {
    .hero-content {
        grid-template-columns: 1fr;
    }
    
    .hero-image {
        display: none;
    }
    
    .footer-content {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .mobile-menu-btn {
        display: block;
    }
    
    .nav-links {
        display: none;
    }
    
    .search-bar {
        max-width: none;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-buttons {
        flex-direction: column;
    }
    
    .hero-stats {
        flex-direction: row;
    }
    
    /* Brand spans the full width, the three link columns sit two-up. */
    .footer-content {
        grid-template-columns: 1fr 1fr;
    }
    .footer-content > .footer-column:first-child {
        grid-column: 1 / -1;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    .footer-bottom p{
        font-size: 12px;
    }
    .footer-links{
        font-size: 12px;

    }
    .developer{
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
        font-size: 12px;
    }
    .developer span{
        color: var(--accent);

    }

}

/* ------------------------------------------------------------------
   NOTE: A duplicate ~480-line block that re-declared .navbar,
   .search-bar, .nav-links, .user-menu, .user-dropdown etc a second
   time (wrapped in a stray "@media (max-width: 567px)") lived here
   again in this snapshot -- it was removed once already (see the
   supertrade-fixed.zip from the previous session) but came back
   in whatever branch/copy this upload was taken from. Removing it
   again for the same reason: it conflicts with the rules already
   defined earlier in this file, with dashboard.css, and with
   editorial.css's consolidated mobile-nav fix. Nothing here isn't
   already handled above (768px block) or in editorial.css.
   ------------------------------------------------------------------ */
