/* === CSS Variables for Theming === */
:root {
    --primary: #2d9636;
    /* --primary: #46f20d; */
    --bg-light: #f6f8f5;
    --bg-dark: #000000;

    /* Light Theme Defaults */
    --bg-main: var(--bg-light);
    --text-main: #0f172a;
    --text-muted: #64748b;
    --card-bg: #ffffff;
    --card-border: #f1f5f9;
    --input-bg: #f1f5f9;
    --nav-bg: rgba(255, 255, 255, 0.95);
    --badge-bg: #e2e8f0;
}

/* Dark Mode */
/* @media (prefers-color-scheme: dark) {
    :root {
        --bg-main: var(--bg-dark);
        --text-main: #f8fafc;
        --text-muted: #94a3b8;
        --card-bg: #303030;
        --card-border: #334155;
        --input-bg: #1e293b;
        --nav-bg: rgba(15, 23, 42, 0.95);
        --badge-bg: #1e293b;
    }
} */

/* === Base Styles === */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
      -webkit-tap-highlight-color: transparent; /* Makes the highlight invisible */
  -webkit-touch-callout: none; /* iOS Safari */
  -webkit-user-select: none; /* Safari, Chrome, Opera */
  -khtml-user-select: none; /* Konqueror HTML */
  -moz-user-select: none; /* Firefox */
  -ms-user-select: none; /* Internet Explorer/Edge */
  user-select: none; /* Standard property for modern browsers */
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-main);
    color: var(--text-main);
    min-height: 100vh;
    padding-bottom: 5rem;
    transition: background-color 0.3s, color 0.3s;
}

a {
    text-decoration: none;
    color: inherit;
}

button {
    border: none;
    background: none;
    cursor: pointer;
    font-family: inherit;
}

input {
    font-family: inherit;
}

.text-muted {
    color: var(--text-muted);
}

/* === Layout & Containers === */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* === Header === */
.header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(var(--bg-main), 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 1rem 1rem 0.5rem;
    border-bottom-left-radius: 1.5rem;
    border-bottom-right-radius: 1.5rem;
}

.header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--primary);
}

.logo h1 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-main);
    letter-spacing: -0.025em;
}

.cart-btn {
    position: relative;
    padding: 0.5rem;
    border-radius: 50%;
    background-color: var(--badge-bg);
    color: var(--text-main);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
}

.cart-badge {
    position: absolute;
    top: -2px;
    right: -2px;
    height: 1.1rem;
    width: 1.1rem;
    background-color: var(--primary);
    color: var(--bg-dark);
    font-size: 0.625rem;
    font-weight: 700;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* === Search & Filters === */
.search-container {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    max-width: 800px;
    margin: 0 auto;
}

.search-bar {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background-color: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 2rem;
    padding: 0.7rem 1rem;
}

.search-bar input {
    background: transparent;
    border: none;
    outline: none;
    width: 100%;
    font-size: 0.875rem;
    color: var(--text-main);
}

.filter-scroll {
    display: flex;
    gap: 0.5rem;
    overflow-x: auto;
    padding-bottom: 0.25rem;
    scrollbar-width: none;
}

.filter-scroll::-webkit-scrollbar {
    display: none;
}

.chip {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    background-color: var(--input-bg);
    color: var(--text-muted);
    padding: 0.375rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
    white-space: nowrap;
}

.chip.active {
    background-color: rgba(70, 242, 13, 0.15);
    color: var(--primary);
    border: 1px solid rgba(70, 242, 13, 0.3);
}

/* === Main Content === */
.main-content {
    padding: 1.5rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    max-width: 1200px;
    margin: 0 auto;
}

/* Hero Banner */
.hero {
    position: relative;
    height: 12rem;
    border-radius: 1rem;
    overflow: hidden;
    background-color: #0f172a;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.hero-bg {
    position: absolute;
    inset: 0;
    background-image: linear-gradient(to right, rgba(0, 0, 0, 0.8), rgba(0, 0, 0, 0.2)), url('https://lh3.googleusercontent.com/aida-public/AB6AXuC1bsC3jxx0AxhfJswmZX2F9VcYvg4co2VDn0j4heTxLaf-DxVRgLhpcPJjJrBl5YNpTtHAKS-PC_kJ90CgQZcYADLn5Ftq-yC2--rdICc_-pOHGnZxLUCtz4c4Wwcy-xDgRjNd8QURLR5Gc8g5oVoIeId2HfAPJvw0xJlOmGqdHMfDT1oLO4yza1JjuLZBmsCpgxdXcyG8Q66oS4lPtGcOaiHlS1SVtA13D4oYMU-ltBYJiabMvWYdXUbNHz3sZxcdKACDj12WCF24');
    background-size: cover;
    background-position: center;
    transition: transform 0.5s;
}

.hero:hover .hero-bg {
    transform: scale(1.05);
}

.hero-content {
    position: relative;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 0 1.5rem;
    gap: 0.5rem;
}

.hero-tag {
    background-color: var(--primary);
    color: var(--bg-dark);
    font-size: 0.625rem;
    font-weight: 700;
    text-transform: uppercase;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    width: fit-content;
    letter-spacing: 0.05em;
}

.hero-title {
    color: white;
    font-size: 1.5rem;
    font-weight: 700;
}

.hero-desc {
    color: #e2e8f0;
    font-size: 0.875rem;
    max-width: 250px;
}

/* === Product Grid === */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.section-title {
    font-size: 1.125rem;
    font-weight: 700;
}

.section-link {
    color: var(--primary);
    font-size: 0.875rem;
    font-weight: 600;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 3rem;
}

.product-card {
    background-color: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 1rem;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

.product-img-wrapper {
    height: 8rem;
    position: relative;
    background-color: var(--badge-bg);
}

.product-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.fav-btn {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    padding: 0.4rem;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(4px);
    border-radius: 50%;
    color: #0f172a;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
}

.fav-btn:hover i {
    color: #ef4444;
    font-weight: 900;
}

/* FontAwesome fill on hover */

.product-info {
    padding: 0.75rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.farm-name {
    font-size: 0.625rem;
    color: var(--primary);
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 0.25rem;
}

.product-title {
    font-size: 0.875rem;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.product-weight {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.product-bottom {
    margin-top: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.product-price {
    font-weight: 700;
    color: var(--primary);
}

.add-btn {
    background-color: var(--primary);
    color: var(--bg-dark);
    height: 2rem;
    width: 2rem;
    border-radius: 50%;
    /* border-radius: 0.5rem; */
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.2s;
    font-size: 1rem;
}

.add-btn:hover {
    opacity: 0.9;
}

/* === Featured Producer === */
.featured-box {
    background-color: rgba(70, 242, 13, 0.08);
    border: 1px solid rgba(70, 242, 13, 0.2);
    border-radius: 1rem;
    padding: 1rem;
}

.featured-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.75rem;
}

.avatar {
    width: 3.5rem;
    height: 3.5rem;
    border-radius: 50%;
    border: 2px solid var(--primary);
    overflow: hidden;
}

.avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.featured-info h4 {
    font-weight: 700;
}

.featured-info p {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.arrow-btn {
    margin-left: auto;
    color: var(--primary);
    font-size: 0.875rem;
}

.featured-quote {
    font-size: 0.875rem;
    color: var(--text-muted);
    font-style: italic;
    line-height: 1.5;
}

/* === Mobile Navigation (Bottom) === */
.side-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--nav-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-top: 1px solid var(--card-border);
    padding: 0.75rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 100;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    color: var(--text-muted);
    transition: color 0.2s;
}

.nav-icon {
    font-size: 1.25rem;
    transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.nav-item.active {
    color: var(--primary);
}

.nav-item.active .nav-icon {
    transform: scale(1.15);
}

/* Pop effect for active icon */
.nav-label {
    font-size: 0.625rem;
    font-weight: 500;
    letter-spacing: -0.025em;
}

.nav-item.active .nav-label {
    font-weight: 700;
}

/* === DESKTOP DISCORD-STYLE SIDEBAR === */
@media (min-width: 768px) {
    body {
        padding-bottom: 0;
        padding-left: 80px;
    }

    .header-top {
        margin-bottom: 0;
    }

    .search-container {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        width: 100%;
        margin-top: 1rem;
    }

    .search-bar {
        flex: 1;
        /* max-width: 400px; */
    }

    .side-nav {
        top: 0;
        bottom: 0;
        left: 0;
        right: auto;
        width: 80px;
        flex-direction: column;
        justify-content: flex-start;
        padding: 2rem 0;
        gap: 2rem;
        border-top: none;
        border-right: 1px solid var(--card-border);
    }

    .nav-item {
        position: relative;
        width: 100%;
    }

    .nav-item:hover {
        color: var(--primary);
    }

    /* Discord-style left pill indicator */
    .nav-item::before {
        content: '';
        position: absolute;
        left: 0;
        top: 50%;
        transform: translateY(-50%) scaleY(0);
        width: 4px;
        height: 1.5rem;
        background-color: var(--primary);
        border-radius: 0 4px 4px 0;
        transition: transform 0.2s ease;
    }

    .nav-item.active::before {
        transform: translateY(-50%) scaleY(1);
    }
}
















/* =========================================
   === CART PAGE SPECIFIC STYLES === 
   ========================================= */

.back-btn {
    font-size: 1.25rem;
    color: var(--text-main);
    padding: 0.5rem;
    border-radius: 50%;
    transition: background-color 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}
.back-btn:hover { background-color: var(--badge-bg); }

.page-title {
    flex-grow: 1;
    text-align: center;
    font-size: 1.125rem;
    font-weight: 700;
}

.cart-subtitle {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

/* Base Mobile Layout */
.cart-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

.cart-items-section {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.cart-item {
    display: flex;
    gap: 1rem;
    background-color: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 1rem;
    padding: 0.75rem;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

.cart-item-img {
    width: 5rem;
    height: 5rem;
    border-radius: 0.5rem;
    object-fit: cover;
    background-color: var(--badge-bg);
    flex-shrink: 0;
}

.cart-item-details {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.cart-item-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}
.cart-item-header h4 { font-size: 1rem; font-weight: 700; line-height: 1.2; }

.remove-btn { color: var(--text-muted); transition: color 0.2s; padding: 0.25rem; }
.remove-btn:hover { color: #ef4444; }

.cart-item-desc {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
    margin-bottom: 0.5rem;
}

.cart-item-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
}

.cart-item-price { font-weight: 700; color: var(--text-main); }

.qty-control {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background-color: var(--input-bg);
    padding: 0.25rem 0.5rem;
    border-radius: 9999px;
}

.qty-btn {
    width: 1.5rem;
    height: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background-color: var(--card-bg);
    color: var(--text-main);
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
    font-size: 0.75rem;
}
.qty-btn.add {
    background-color: var(--primary);
    color: var(--bg-dark);
}

.qty-num {
    font-size: 0.875rem;
    font-weight: 700;
    min-width: 1rem;
    text-align: center;
}

/* Delivery Note */
.delivery-note {
    display: flex;
    gap: 0.75rem;
    background-color: rgba(45, 150, 54, 0.1);
    border: 1px solid rgba(45, 150, 54, 0.2);
    padding: 1rem;
    border-radius: 1rem;
    margin-top: 0.5rem;
    align-items: center;
}
.delivery-note i { color: var(--primary); font-size: 1.5rem; }
.delivery-note h5 { font-weight: 700; font-size: 0.875rem; color: var(--text-main); }
.delivery-note p { font-size: 0.75rem; color: var(--text-muted); margin-top: 0.1rem; }

/* Summary Section */
.cart-summary-section {
    background-color: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 1rem;
    padding: 1.5rem;
    height: fit-content;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
}
.summary-row .font-medium { color: var(--text-main); font-weight: 600; }
.summary-row .text-primary { color: var(--primary); font-weight: 700;}

.summary-total {
    display: flex;
    justify-content: space-between;
    font-size: 1.125rem;
    font-weight: 700;
    padding-top: 1rem;
    border-top: 1px solid var(--card-border);
    margin-top: 1rem;
    margin-bottom: 1.5rem;
}

.checkout-btn {
    width: 100%;
    background-color: var(--primary);
    color: var(--bg-dark);
    font-weight: 700;
    padding: 1rem;
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: opacity 0.2s;
    font-size: 1rem;
}
.checkout-btn:hover { opacity: 0.9; }

/* Large Screen Responsive Cart Layout */
@media (min-width: 1024px) {
    .cart-layout {
        grid-template-columns: 2fr 1fr; /* Splits layout into 2 columns */
        align-items: start;
    }
    .cart-summary-section {
        position: sticky; /* Makes the summary box stick while you scroll items */
        top: 6rem;
    }
}











/* =========================================
   === ORDER STATUS BADGES === 
   ========================================= */
.status-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    display: inline-block;
}

/* Orange for Processing */
.status-processing { 
    background: rgba(245, 158, 11, 0.1); 
    color: #f59e0b; 
}
/* Blue for Shipped */
.status-shipped { 
    background: rgba(59, 130, 246, 0.1); 
    color: #3b82f6; 
}
/* Green for Delivered */
.status-delivered { 
    background: rgba(45, 150, 54, 0.1); 
    color: var(--primary); 
}
/* Red for Cancelled */
.status-cancelled { 
    background: rgba(239, 68, 68, 0.1); 
    color: #ef4444; 
}

/* =========================================
   === CUSTOM MODALS & RECEIPT UI === 
   ========================================= */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(20, 34, 16, 0.6);
    backdrop-filter: blur(4px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0rem;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}
.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}
.modal-content {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 1.5rem;
    width: 100%;
    max-width: 500px;
    transform: translateY(20px);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    overflow: hidden;
}
.modal-overlay.active .modal-content {
    transform: translateY(0);
}


/* =========================================
   === APP AUTHENTICATION PAGES (LOGIN/SIGNUP) === 
   ========================================= */

/* Body wrapper specifically for auth pages */
.auth-page-body {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background-color: var(--bg-main);
    padding: 0;
}

/* Mobile App style container */
.app-container {
    width: 100%;
    max-width: 480px;
    background-color: var(--card-bg);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.1);
    position: relative;
}

/* On desktop, make it look like a floating card */
@media (min-width: 480px) {
    .auth-page-body { padding: 1.5rem; }
    .app-container {
        min-height: auto;
        /* height: 95vh; */
        border-radius: 1.5rem;
        overflow-y: auto;
    }
}

.app-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
}

.app-header .back-btn {
    width: 3rem;
    height: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    color: var(--text-main);
    border-radius: 50%;
    transition: background 0.2s;
}
.app-header .back-btn:hover { background: var(--input-bg); }

.app-title {
    flex: 1;
    text-align: center;
    font-weight: 700;
    font-size: 1.125rem;
    padding-right: 3rem; /* Offsets the back button to center text perfectly */
}

/* Login Hero Banner */
.hero-banner { padding: 0 1rem; }
.hero-img {
    width: 100%;
    height: 16rem;
    background-image: url('https://lh3.googleusercontent.com/aida-public/AB6AXuAhp09T5aJOvukaKARyF21TBnezyYuJoBWHazzR520A2584YiWrphjMc7ydpPUGmdvyKTS5UZEbVXXsdFlAlkHIjpUPoZ2Cl5M0IYNfVaia2vZ93MJyjKhzPWMhUj204H73_X2rqj_rle9bHcj1yZow7e5m6QwC-RtgEf-vkVHG38gCfP5MryFZ44-Cai7HZbseFqCyTqN_rhMzAGNzMAG4R_FGoh52BJkQTclJLh7eC_EDPywns2T2ITYge6iIh9EWWqh2FPtJANz6');
    background-size: cover;
    background-position: center;
    border-radius: 1rem;
}

/* Welcome Texts & Icons */
.welcome-text {
    padding: 1.5rem 1.5rem 1rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.icon-circle {
    width: 5rem;
    height: 5rem;
    background-color: rgba(45, 150, 54, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
}
.icon-circle i { font-size: 2.5rem; color: var(--primary); }
.welcome-text h1 { font-size: 2rem; font-weight: 700; margin-bottom: 0.5rem; letter-spacing: -0.025em; line-height: 1.2;}
.welcome-text p { color: var(--text-muted); font-size: 1rem; }

/* Forms & Inputs */
.auth-form {
    padding: 1rem 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.input-group { display: flex; flex-direction: column; gap: 0.5rem; width: 100%; }
.input-label { font-size: 0.875rem; font-weight: 600; color: var(--text-main); margin-left: 0.25rem; display: flex; justify-content: space-between; align-items: center;}
.forgot-link { color: var(--primary); font-size: 0.875rem; font-weight: 600; transition: opacity 0.2s; }
.forgot-link:hover { text-decoration: underline; }

.input-wrapper { position: relative; display: flex; align-items: center; width: 100%; }
.input-icon { position: absolute; left: 1rem; color: var(--text-muted); font-size: 1.25rem; }
.input-wrapper input {
    width: 100%;
    height: 3.5rem;
    border-radius: 0.75rem;
    border: 1px solid var(--card-border);
    background-color: var(--input-bg);
    padding: 0 1rem 0 3rem; /* 3rem left padding leaves room for the icon */
    font-size: 1rem;
    color: var(--text-main);
    transition: all 0.2s;
}
.input-wrapper input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(45, 150, 54, 0.15); }
.input-wrapper .toggle-pass { position: absolute; right: 1rem; color: var(--text-muted); cursor: pointer; font-size: 1.25rem;}

/* Separators */
.separator {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.5rem;
}
.separator .line { flex: 1; height: 1px; background-color: var(--card-border); }
.separator span { color: var(--text-muted); font-size: 0.875rem; font-weight: 500; }

/* Social Login Buttons */
.social-auth {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    padding: 0 1.5rem;
}
.social-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    height: 3rem;
    border: 1px solid var(--card-border);
    border-radius: 0.75rem;
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--text-main);
    transition: background-color 0.2s;
    background: transparent;
}
.social-btn:hover { background-color: var(--input-bg); }
.social-btn i { font-size: 1.25rem; }

/* Footer Links & Terms */
.auth-footer {
    margin-top: auto;
    padding: 2.5rem 1.5rem 1rem;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.875rem;
    font-weight: 500;
}
.auth-footer a { color: var(--primary); font-weight: 700; transition: opacity 0.2s; margin-left: 0.25rem;}
.auth-footer a:hover { text-decoration: underline; }

.terms-text {
    text-align: center;
    padding: 0 2rem 2rem;
    font-size: 0.65rem;
    color: var(--text-muted);
    line-height: 1.5;
}
.terms-text a { text-decoration: underline; color: var(--text-main); }



























/* =========================================
   === START PAGE STYLES === 
   ========================================= */

/* Body wrapper specifically for the start page */
.start-page-body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    position: relative;
    padding-bottom: 0;
    background-color: var(--bg-main);
}

/* Background Glow Effects */
.glow-bg {
    position: fixed;
    width: 20rem;
    height: 20rem;
    border-radius: 50%;
    filter: blur(80px);
    z-index: -1;
    opacity: 0.5;
}

.glow-bg.top-right {
    background-color: rgba(45, 150, 54, 0.15);
    top: -5rem;
    right: -5rem;
}

.glow-bg.bottom-left {
    background-color: rgba(45, 150, 54, 0.2);
    bottom: -5rem;
    left: -5rem;
    width: 24rem;
    height: 24rem;
}

/* Start Container */
.start-container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    width: 100%;
}

/* Header */
.start-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.5rem;
    background: rgba(var(--bg-main), 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(45, 150, 54, 0.1);
}

.start-logo-icon {
    color: var(--primary);
    background: rgba(45, 150, 54, 0.1);
    width: 2.5rem;
    height: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.5rem;
    font-size: 1.5rem;
}

.start-brand {
    font-size: 1.125rem;
    font-weight: 800;
    color: var(--text-main);
    text-align: center;
    flex: 1;
}

.start-help {
    width: 2.5rem;
    display: flex;
    justify-content: flex-end;
    color: var(--text-muted);
    font-size: 1.25rem;
}

/* Main Content */
.start-main {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
    padding: 0;
}

/* Hero Image Section */
.start-hero-wrapper {
    width: 100%;
    padding: 1.5rem 1rem;
}

.start-hero-img {
    width: 100%;
    min-height: 350px;
    background-size: cover;
    background-position: center;
    border-radius: 1rem;
    position: relative;
    overflow: hidden;
    box-shadow: 0 20px 25px -5px rgba(45, 150, 54, 0.15);
}

.start-hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(20, 34, 16, 0.6), transparent);
}

/* Text Content */
.start-content {
    max-width: 540px;
    padding: 0 1.5rem;
    text-align: center;
}

.start-title {
    font-size: 2rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 1rem;
    letter-spacing: -0.025em;
}

.start-desc {
    font-size: 1.125rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
    line-height: 1.6;
}

/* Action Buttons */
.start-buttons {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    width: 100%;
    margin-bottom: 3rem;
}

.btn-main, .btn-outline {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 3.5rem;
    border-radius: 0.75rem;
    font-size: 1.125rem;
    font-weight: 700;
    transition: all 0.2s;
    cursor: pointer;
}

.btn-main {
    background-color: var(--primary);
    color: var(--bg-dark);
    box-shadow: 0 10px 15px -3px rgba(45, 150, 54, 0.3);
}

.btn-main:active {
    transform: scale(0.98);
}

.btn-main:hover {
    opacity: 0.9;
}

.btn-outline {
    background-color: rgba(45, 150, 54, 0.1);
    border: 2px solid rgba(45, 150, 54, 0.2);
    color: var(--text-main);
}

.btn-outline:hover {
    background-color: rgba(45, 150, 54, 0.2);
}

/* Footer Features / Perks */
.start-features {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    width: 100%;
    max-width: 480px;
    padding: 0 1.5rem 3rem;
}

.feature-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.feature-icon {
    background: rgba(45, 150, 54, 0.1);
    color: var(--primary);
    padding: 0.75rem;
    border-radius: 50%;
    font-size: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.feature-item span {
    font-size: 0.65rem;
    text-transform: uppercase;
    font-weight: 700;
    color: var(--text-muted);
    letter-spacing: 0.1em;
}

/* Desktop Adjustments for Start Page */
@media (min-width: 768px) {
    .start-hero-wrapper {
        padding: 2rem;
    }
    .start-hero-img {
        min-height: 450px;
    }
}

























/* =========================================
   === CHECKOUT PAGE STYLES === 
   ========================================= */

.checkout-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 1rem;
    padding: 1.5rem;
    margin-bottom: 1rem;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

.checkout-title {
    font-size: 1.125rem;
    font-weight: 700;
    margin-bottom: 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-main);
}
.checkout-title i { color: var(--primary); font-size: 1.25rem;}

.checkout-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}
.checkout-form-grid .input-group { grid-column: span 2; position: relative;}
.checkout-form-grid .input-group.half { grid-column: span 1; }

/* Reusing auth input styles for checkout */
.checkout-form-grid input {
    width: 100%;
    height: 3.5rem;
    border-radius: 0.75rem;
    border: 1px solid var(--card-border);
    background-color: var(--input-bg);
    padding: 0 1rem;
    font-size: 0.875rem;
    color: var(--text-main);
    transition: all 0.2s;
}
.checkout-form-grid input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(45, 150, 54, 0.15); }

/* Payment Selection Radio Buttons */
.payment-methods { display: flex; gap: 1rem; }
.payment-option {
    flex: 1;
    border: 1px solid var(--card-border);
    border-radius: 0.75rem;
    padding: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    cursor: pointer;
    font-weight: 600;
    background: var(--input-bg);
    color: var(--text-main);
    transition: all 0.2s;
}
.payment-option input { display: none; }
.payment-option.active, .payment-option:has(input:checked) {
    border-color: var(--primary);
    background: rgba(45, 150, 54, 0.05);
    color: var(--primary);
}

.mt-3 { margin-top: 1rem; }





























/* =========================================
   === PRODUCT DETAILS PAGE STYLES === 
   ========================================= */

.product-main { padding: 0; padding-bottom: 6rem; max-width: 800px; margin: 0 auto; }

/* Transparent Header */
.product-header {
    position: absolute;
    top: 0; left: 0; right: 0;
    padding: 1rem 1.5rem;
    display: flex;
    justify-content: space-between;
    z-index: 10;
}
.icon-btn {
    width: 2.5rem; height: 2.5rem;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(4px);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    color: #0f172a; font-size: 1.25rem;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}
.icon-btn.fav-btn:hover { color: #ef4444; }

/* Image Gallery */
.product-gallery {
    background-color: var(--badge-bg);
    display: flex; flex-direction: column;
}
.main-image {
    width: 100%; height: 350px;
    object-fit: cover;
}
.thumbnail-list {
    display: flex; gap: 0.75rem;
    padding: 1rem 1.5rem;
    overflow-x: auto;
    background: var(--bg-main);
    border-radius: 1.5rem 1.5rem 0 0;
    margin-top: -1.5rem;
    position: relative;
    scrollbar-width: none;
}
.thumb {
    width: 4rem; height: 4rem;
    border-radius: 0.5rem; overflow: hidden;
    border: 2px solid transparent;
    flex-shrink: 0; cursor: pointer;
}
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb.active { border-color: var(--primary); }

/* Details Content */
.product-details-content { padding: 0 1.5rem; }
.product-meta { display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.5rem; }
.product-meta .farm-name { font-size: 0.875rem; display: flex; align-items: center; gap: 0.25rem; }
.product-badge { background: rgba(45, 150, 54, 0.1); color: var(--primary); font-size: 0.65rem; font-weight: 700; padding: 0.25rem 0.5rem; border-radius: 0.25rem; text-transform: uppercase; }

.product-title-large { font-size: 1.5rem; font-weight: 800; line-height: 1.2; margin-bottom: 0.25rem; }
.product-unit { color: var(--text-muted); font-size: 0.875rem; margin-bottom: 1.5rem; }

.product-price-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 2rem; }
.product-price-large { font-size: 1.75rem; font-weight: 800; color: var(--primary); }

.qty-control.large { padding: 0.5rem; gap: 1rem; }
.qty-control.large .qty-btn { width: 2.25rem; height: 2.25rem; font-size: 1rem; }
.qty-num-input { background: transparent; border: none; width: 2rem; text-align: center; font-weight: 700; color: var(--text-main); font-size: 1rem;}
.qty-num-input:focus { outline: none; }

/* Tabs */
.product-tabs { margin-bottom: 2rem; border-top: 1px solid var(--card-border); padding-top: 1rem;}
.tab-headers { display: flex; gap: 1.5rem; border-bottom: 1px solid var(--card-border); margin-bottom: 1rem; }
.tab-btn { padding: 0.5rem 0; font-size: 0.875rem; font-weight: 600; color: var(--text-muted); border-bottom: 2px solid transparent; transition: all 0.2s; }
.tab-btn.active { color: var(--primary); border-bottom-color: var(--primary); }
.tab-content { display: none; font-size: 0.875rem; color: var(--text-muted); line-height: 1.6; }
.tab-content.active { display: block; animation: fadeIn 0.3s ease; }

.sticky-add-btn { position: fixed; bottom: 5rem; left: 1.5rem; right: 1.5rem; width: auto; z-index: 40; box-shadow: 0 10px 15px -3px rgba(45, 150, 54, 0.3); }

/* Desktop adjustments for product page */
@media (min-width: 768px) {
    .product-main { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; padding: 2rem; margin-top: 2rem; max-width: 1000px; }
    .product-header { position: relative; padding: 0; margin-bottom: 1rem;}
    .product-gallery { border-radius: 1rem; overflow: hidden; }
    .thumbnail-list { margin-top: 0; background: transparent; padding: 1rem 0; }
    .sticky-add-btn { position: relative; bottom: auto; left: auto; right: auto; width: 100%; margin-top: 2rem; }
}

@keyframes fadeIn { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: translateY(0); } }


/* =========================================
   === USER PROFILE PAGE STYLES === 
   ========================================= */

/* .profile-header-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 1rem;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.profile-avatar {
    width: 4rem; height: 4rem;
    background: rgba(45, 150, 54, 0.1);
    color: var(--primary);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 2rem;
}

.profile-info { flex: 1; }
.profile-info h3 { font-size: 1.125rem; font-weight: 700; margin-bottom: 0.25rem; }
.profile-info p { font-size: 0.875rem; color: var(--text-muted); }

.edit-profile-btn {
    width: 2.5rem; height: 2.5rem;
    background: var(--input-bg);
    border-radius: 50%;
    color: var(--text-main);
    display: flex; align-items: center; justify-content: center;
    transition: background 0.2s;
}
.edit-profile-btn:hover { background: var(--card-border); }

.profile-menu {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 1rem;
    overflow: hidden;
    margin-bottom: 2rem;
}

.profile-menu-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--card-border);
    color: var(--text-main);
    font-weight: 500;
    transition: background 0.2s;
}
.profile-menu-item:last-child { border-bottom: none; }
.profile-menu-item:hover { background: var(--input-bg); }

.menu-icon {
    width: 2rem; height: 2rem;
    background: rgba(45, 150, 54, 0.1);
    color: var(--primary);
    border-radius: 0.5rem;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.125rem;
}

.profile-menu-item .arrow { margin-left: auto; color: var(--text-muted); font-size: 0.875rem; }

.logout-btn-full {
    width: 100%;
    padding: 1.25rem;
    background: #fee2e2;
    color: #ef4444;
    border-radius: 1rem;
    font-weight: 700;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: opacity 0.2s;
}
.logout-btn-full:hover { opacity: 0.8; } */










/* =========================================
   === ENHANCED USER PROFILE PAGE === 
   ========================================= */

/* Centered Header Identity */
.profile-card-centered {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    margin-bottom: 1.5rem;
}

.avatar-wrapper {
    position: relative;
    margin-bottom: 1rem;
}

.profile-avatar-large {
    width: 6rem; 
    height: 6rem;
    background: rgba(45, 150, 54, 0.1);
    color: var(--primary);
    border-radius: 50%;
    display: flex; 
    align-items: center; 
    justify-content: center;
    font-size: 3rem;
    box-shadow: 0 10px 25px -5px rgba(45, 150, 54, 0.2);
}

.edit-avatar-btn {
    position: absolute;
    bottom: 0; 
    right: 0;
    width: 2rem; 
    height: 2rem;
    background: var(--primary);
    color: var(--bg-dark);
    border-radius: 50%;
    display: flex; 
    align-items: center; 
    justify-content: center;
    font-size: 0.875rem;
    border: 3px solid var(--bg-main); /* Creates a cutout effect */
    transition: transform 0.2s;
}
.edit-avatar-btn:hover { transform: scale(1.1); }

.profile-card-centered h3 { 
    font-size: 1.5rem; 
    font-weight: 800; 
    color: var(--text-main); 
    margin-bottom: 0.25rem;
    letter-spacing: -0.025em;
}
.profile-card-centered p { 
    font-size: 0.875rem; 
    color: var(--text-muted); 
    margin-bottom: 0.75rem;
}

.profile-badge {
    background: var(--badge-bg);
    color: var(--text-main);
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    letter-spacing: 0.05em;
}

/* Quick Stats Row */
.profile-stats {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 1rem;
    padding: 1.25rem;
    margin-bottom: 2rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.stat-box {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
}
.stat-value { font-size: 1.25rem; font-weight: 800; color: var(--text-main); }
.stat-label { font-size: 0.75rem; color: var(--text-muted); font-weight: 500; }

.profile-stats .divider {
    width: 1px;
    height: 2.5rem;
    background-color: var(--card-border);
}

/* Grouped Menu Sections */
.menu-section {
    margin-bottom: 1.5rem;
}
.menu-section-title {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--text-muted);
    letter-spacing: 0.05em;
    margin-bottom: 0.75rem;
    margin-left: 1rem;
}

.profile-menu {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.profile-menu-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--card-border);
    color: var(--text-main);
    font-weight: 600;
    font-size: 0.95rem;
    transition: background 0.2s;
}
.profile-menu-item:last-child { border-bottom: none; }
.profile-menu-item:hover { background: var(--input-bg); }

/* Colorful Menu Icons */
.menu-icon {
    width: 2.25rem; height: 2.25rem;
    border-radius: 0.5rem;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.25rem;
}
.icon-blue { color: #3b82f6; background: rgba(59, 130, 246, 0.1); }
.icon-orange { color: #f59e0b; background: rgba(245, 158, 11, 0.1); }
.icon-purple { color: #8b5cf6; background: rgba(139, 92, 246, 0.1); }
.icon-red { color: #ef4444; background: rgba(239, 68, 68, 0.1); }
.icon-dark { color: var(--text-main); background: var(--badge-bg); }

.profile-menu-item .arrow { margin-left: auto; color: var(--text-muted); font-size: 0.875rem; }

/* Notification Badge */
.badge-new {
    margin-left: auto;
    margin-right: 0.5rem;
    background: #ef4444;
    color: white;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 0.15rem 0.5rem;
    border-radius: 9999px;
}

/* iOS Style Toggle Switch */
.toggle-switch {
    margin-left: auto;
    width: 3rem;
    height: 1.75rem;
    background-color: var(--badge-bg);
    border-radius: 9999px;
    position: relative;
    transition: background-color 0.3s;
}
.toggle-switch.active { background-color: var(--primary); }

.toggle-knob {
    width: 1.35rem;
    height: 1.35rem;
    background-color: white;
    border-radius: 50%;
    position: absolute;
    top: 0.2rem;
    left: 0.2rem;
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}
.toggle-switch.active .toggle-knob {
    transform: translateX(1.25rem);
}

/* Refined Outline Logout Button */
.logout-btn-full {
    width: 100%;
    padding: 1.125rem;
    background: transparent;
    color: #ef4444;
    border: 2px solid #fee2e2;
    border-radius: 1rem;
    font-weight: 700;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.2s;
    margin-top: 1rem;
}
.logout-btn-full:hover { 
    background: #fee2e2; 
    border-color: #fca5a5;
}





























/* =========================================
   === PAGE ENTRY ANIMATIONS === 
   ========================================= */

/* The core smooth slide-up and fade-in keyframe */
@keyframes slideUpFade {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 1. Animate the main containers of every page on load */
.main-content,
.app-container,
.start-main {
    animation: slideUpFade 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* 2. Staggered Animations for Product Cards (Store Page) */
.product-card {
    opacity: 0; /* Hide initially so they don't pop in before animation */
    animation: slideUpFade 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
.product-card:nth-child(1) { animation-delay: 0.1s; }
.product-card:nth-child(2) { animation-delay: 0.2s; }
.product-card:nth-child(3) { animation-delay: 0.3s; }
.product-card:nth-child(4) { animation-delay: 0.4s; }
.product-card:nth-child(n+5) { animation-delay: 0.5s; }

/* 3. Staggered Animations for Cart Items */
.cart-item {
    opacity: 0;
    animation: slideUpFade 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
.cart-item:nth-child(1) { animation-delay: 0.1s; }
.cart-item:nth-child(2) { animation-delay: 0.2s; }
.cart-item:nth-child(3) { animation-delay: 0.3s; }
.cart-item:nth-child(n+4) { animation-delay: 0.4s; }

/* 4. Staggered Animations for Profile Menu Items */
.profile-menu-item {
    opacity: 0;
    animation: slideUpFade 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
.profile-menu-item:nth-child(1) { animation-delay: 0.10s; }
.profile-menu-item:nth-child(2) { animation-delay: 0.15s; }
.profile-menu-item:nth-child(3) { animation-delay: 0.20s; }
.profile-menu-item:nth-child(4) { animation-delay: 0.25s; }
.profile-menu-item:nth-child(n+5) { animation-delay: 0.30s; }

/* 5. Smooth Header drop-down */
@keyframes slideDownFade {
    from { opacity: 0; transform: translateY(-15px); }
    to { opacity: 1; transform: translateY(0); }
}
.header, .app-header, .start-header {
    animation: slideDownFade 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}















/* =========================================
   === SMART SEARCH SUGGESTIONS === 
   ========================================= */
   
.search-suggestions {
    position: absolute;
    top: 110%; /* Just below the search bar */
    left: 0;
    right: 0;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 0.75rem;
    box-shadow: 0 15px 30px -5px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.search-suggestions.hidden {
    display: none;
}

.suggestion-item {
    padding: 0.75rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    border-bottom: 1px solid var(--card-border);
    transition: background 0.2s;
    color: var(--text-main);
    text-decoration: none;
}

.suggestion-item:last-child {
    border-bottom: none;
}

.suggestion-item:hover {
    background: var(--input-bg);
}

.suggestion-img {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 0.5rem;
    object-fit: cover;
    background-color: var(--badge-bg);
}

.suggestion-info {
    display: flex;
    flex-direction: column;
}

.suggestion-title {
    font-weight: 700;
    font-size: 0.875rem;
}

.suggestion-farm {
    font-size: 0.7rem;
    color: var(--text-muted);
}
















/* =========================================
   === FULL SCREEN FIREBASE LOADER === 
   ========================================= */

.global-loader {
    position: fixed;
    inset: 0; /* Takes up full width and height */
    background-color: var(--bg-main);
    z-index: 99999; /* Stays on top of everything */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

/* Added via JS when Firebase is ready */
.global-loader.hidden {
    opacity: 0;
    visibility: hidden;
}

.loader-content {
    position: relative;
    width: 6rem;
    height: 6rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
}

/* Center Plant Icon */
.loader-icon {
    font-size: 3rem;
    color: var(--primary);
    animation: loaderPulse 1.5s infinite ease-in-out;
    z-index: 2;
}

/* Modern Spinning Gradient Ring */
.loader-ring {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 4px solid rgba(45, 150, 54, 0.1);
    border-top-color: var(--primary);
    
    border-radius: 50%;
    animation: loaderSpin 1s cubic-bezier(0.68, -0.55, 0.265, 1.55) infinite;
}

/* Text pulse */
.loader-text {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-main);
    letter-spacing: 0.05em;
    animation: loaderPulse 1.5s infinite ease-in-out;
}

/* Keyframes */
@keyframes loaderSpin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes loaderPulse {
    0%, 100% { opacity: 0.6; transform: scale(0.95); }
    50% { opacity: 1; transform: scale(1.05); }
}
/* =========================================
   === SMART SEARCH ANIMATIONS === 
   ========================================= */

@keyframes dropDownBounce {
    0% { 
        opacity: 0; 
        transform: translateY(-10px); 
    }
    100% { 
        opacity: 1; 
        transform: translateY(0); 
    }
}

.search-suggestions:not(.hidden) {
    animation: dropDownBounce 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    transform-origin: top center;
}






























/* =========================================
   === PROFILE SUB-PAGES (ORDERS/ADDRESSES) === 
   ========================================= */

/* General List Card */
.list-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 1rem;
    padding: 1.25rem;
    margin-bottom: 1rem;
    box-shadow: 0 2px 5px rgba(0,0,0,0.02);
    opacity: 0;
    animation: slideUpFade 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Staggered animation for list items */
.list-card:nth-child(1) { animation-delay: 0.1s; }
.list-card:nth-child(2) { animation-delay: 0.2s; }
.list-card:nth-child(3) { animation-delay: 0.3s; }
.list-card:nth-child(n+4) { animation-delay: 0.4s; }

/* Add New Button */
.add-new-btn {
    width: 100%;
    padding: 1.25rem;
    background: transparent;
    border: 2px dashed var(--card-border);
    border-radius: 1rem;
    color: var(--primary);
    font-weight: 700;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    transition: all 0.2s;
    cursor: pointer;
}
.add-new-btn:hover {
    background: rgba(45, 150, 54, 0.05);
    border-color: var(--primary);
}

/* Order Specifics */
.order-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--card-border);
}
.order-header h4 { font-weight: 800; color: var(--text-main); font-size: 1rem;}
.order-date { font-size: 0.75rem; color: var(--text-muted); }

.status-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
}
.status-processing { background: rgba(245, 158, 11, 0.1); color: #f59e0b; }
.status-delivered { background: rgba(45, 150, 54, 0.1); color: var(--primary); }

.order-items {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}
.order-img-stack { display: flex; align-items: center; }
.order-img-stack img, .img-placeholder {
    width: 2.5rem; height: 2.5rem;
    border-radius: 0.5rem;
    object-fit: cover;
    border: 2px solid var(--card-bg);
    background: var(--badge-bg);
    margin-left: -10px;
}
.order-img-stack img:first-child, .order-img-stack .img-placeholder:first-child { margin-left: 0; }
.img-placeholder { display: flex; align-items: center; justify-content: center; color: var(--primary); }
.order-desc { font-size: 0.875rem; color: var(--text-main); font-weight: 500;}

.order-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.order-total { font-weight: 800; font-size: 1.125rem; color: var(--text-main); }
.btn-outline-small {
    padding: 0.5rem 1rem;
    border: 1px solid var(--primary);
    color: var(--primary);
    border-radius: 0.5rem;
    font-size: 0.75rem;
    font-weight: 700;
    transition: all 0.2s;
}
.btn-outline-small:hover { background: var(--primary); color: var(--bg-dark); }

/* Addresses & Payments Specifics */
.address-header, .payment-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}
.address-title, .payment-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}
.address-title h4, .payment-title h4 { font-weight: 700; font-size: 1rem; color: var(--text-main); }
.default-badge {
    background: var(--badge-bg);
    color: var(--text-muted);
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    padding: 0.2rem 0.5rem;
    border-radius: 0.25rem;
}
.address-body {
    font-size: 0.875rem;
    color: var(--text-muted);
    line-height: 1.5;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--card-border);
}

.payment-logo {
    font-size: 2rem;
    background: var(--input-bg);
    width: 3rem; height: 2rem;
    border-radius: 0.25rem;
    display: flex; align-items: center; justify-content: center;
}
.payment-header { margin-bottom: 1rem; padding-bottom: 1rem; border-bottom: 1px solid var(--card-border); }

/* Card Actions */
.card-actions {
    display: flex;
    gap: 1rem;
}
.action-btn {
    font-size: 0.875rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    transition: opacity 0.2s;
}
.action-btn:hover { opacity: 0.7; }
.text-red { color: #ef4444; }










/* =========================================
   === MODAL / POPUP STYLES === 
   ========================================= */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(20, 34, 16, 0.6);
    backdrop-filter: blur(4px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}
.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}
.modal-content {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 1.5rem;
    padding: 1.5rem;
    width: 100%;
    max-width: 500px;
    transform: translateY(20px);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}
.modal-overlay.active .modal-content {
    transform: translateY(0);
}
.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}
.modal-title {
    font-size: 1.25rem;
    font-weight: 800;
}
.close-modal-btn {
    font-size: 1.5rem;
    color: var(--text-muted);
    transition: color 0.2s;
}
.close-modal-btn:hover { color: #ef4444; }



/* =========================================
   === ALERT MODAL BUTTONS === 
   ========================================= */

.btn-cancel {
    background: var(--input-bg);
    color: var(--text-main);
    border: 1px solid var(--card-border);
    border-radius: 0.75rem;
    font-weight: 700;
    transition: all 0.2s;
    cursor: pointer;
}
.btn-cancel:hover { background: var(--card-border); }

.btn-danger {
    background: #ef4444;
    color: white;
    border-radius: 0.75rem;
    font-weight: 700;
    transition: all 0.2s;
    box-shadow: 0 10px 15px -3px rgba(239, 68, 68, 0.3);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}
.btn-danger:hover { background: #dc2626; }




/* =========================================
   === SUCCESS SCREEN ANIMATION === 
   ========================================= */

.success-animation-circle {
    width: 5rem;
    height: 5rem;
    border-radius: 50%;
    background: var(--primary);
    color: var(--bg-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    margin: 0 auto 1.5rem;
    box-shadow: 0 15px 30px -5px rgba(45, 150, 54, 0.4);
    animation: scalePop 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes scalePop {
    0% { transform: scale(0); opacity: 0; }
    80% { transform: scale(1.1); opacity: 1;}
    100% { transform: scale(1); opacity: 1;}
}















/* =========================================
   === TOAST NOTIFICATIONS === 
   ========================================= */
#toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    background: var(--card-bg);
    border-left: 4px solid #ef4444; /* Default red for errors */
    color: var(--text-main);
    padding: 1rem 1.5rem;
    border-radius: 0.5rem;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 280px;
    font-weight: 500;
    font-size: 0.875rem;
    transform: translateX(120%);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
    opacity: 0;
}

.toast.toast-show {
    transform: translateX(0);
    opacity: 1;
}

.toast-success {
    border-left-color: var(--primary);
}

.toast-icon {
    font-size: 1.25rem;
}

.toast-success .toast-icon {
    color: var(--primary);
}

.toast-error .toast-icon {
    color: #ef4444;
}