@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

/* --- 1. VARIABLES & RESET --- */
:root {
    --purple-main: #6b3fa0;
    --purple-light: #8e5cd0;
    --purple-pale: #f3ebff;
    --white: #ffffff;
    --bg-light: #f8f9fa;
    --text-dark: #333333;
    --text-muted: #888888;
    --glass: rgba(255, 255, 255, 0.12);
    --glass-dark: rgba(255, 255, 255, 0.95);
    --shadow: 0 10px 25px rgba(0,0,0,0.05);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
    -webkit-tap-highlight-color: transparent;
}

body, html {
    height: 100%;
    width: 100%;
    background-color: var(--bg-light);
    color: var(--text-dark);
    overflow-x: hidden;
}

.hidden { display: none !important; }

/* --- 2. SPLASH SCREEN --- */
.splash-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: linear-gradient(rgba(0,0,0,0.4), rgba(0,0,0,0.8)), 
                url('../images/splash-bg.jpg') center/cover no-repeat;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    transition: opacity 0.8s ease-in-out;
}

.animate-logo {
    width: 180px;
    filter: drop-shadow(0px 10px 20px rgba(0,0,0,0.3));
    opacity: 0;
    transform: scale(0.5);
    animation: logoEntrance 1.5s forwards ease-out;
}

@keyframes logoEntrance {
    0% { opacity: 0; transform: scale(0.5) rotate(-5deg); }
    70% { opacity: 1; transform: scale(1.1) rotate(0deg); }
    100% { opacity: 1; transform: scale(1); }
}

/* --- 3. HEADER & MARKETPLACE --- */
.app-header {
    background: var(--white);
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 900;
}

.greeting { font-weight: 700; font-size: 1.1rem; }
.icon-purple { color: var(--purple-main); width: 24px; }

.section-title { font-size: 1.1rem; font-weight: 700; margin: 20px 20px 10px; }

/* Category Scroll */
.category-scroll {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding: 10px 20px;
    scrollbar-width: none;
}
.category-scroll::-webkit-scrollbar { display: none; }

.cat-chip {
    background: var(--white);
    padding: 10px 22px;
    border-radius: 25px;
    font-size: 0.85rem;
    font-weight: 500;
    box-shadow: var(--shadow);
    white-space: nowrap;
    border: 1px solid transparent;
    transition: 0.3s;
}
.cat-chip.active {
    background: var(--purple-main);
    color: var(--white);
}

/* Product Cards */
.product-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    padding: 10px 20px 100px; /* Space for Nav */
}

.product-card {
    background: var(--white);
    padding: 12px;
    border-radius: 22px;
    box-shadow: var(--shadow);
    position: relative;
    text-align: left;
}

.product-card img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: 18px;
    margin-bottom: 8px;
}

.product-card h4 { font-size: 0.9rem; font-weight: 600; color: #444; }
.product-card .price { color: var(--purple-main); font-weight: 700; margin: 4px 0; }

.add-btn {
    position: absolute;
    bottom: 12px; right: 12px;
    background: var(--purple-main);
    color: white; border: none;
    width: 32px; height: 32px;
    border-radius: 10px;
    font-size: 1.2rem; cursor: pointer;
}

/* --- 4. 5-ITEM BOTTOM NAVIGATION --- */
.bottom-nav {
    position: fixed;
    bottom: 0; left: 0;
    width: 100%; height: 75px;
    background: var(--white);
    display: flex;
    justify-content: space-around;
    align-items: center;
    box-shadow: 0 -5px 20px rgba(0,0,0,0.05);
    z-index: 999;
    padding-bottom: 10px;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.7rem;
    font-weight: 500;
    width: 20%;
}

.nav-item.active { color: var(--purple-main); }

/* The Middle Floating Cart */
.nav-cart-center {
    position: relative;
    top: -25px; /* Pull it up */
}

.cart-circle {
    width: 60px; height: 60px;
    background: var(--purple-main);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 8px 20px rgba(107, 63, 160, 0.4);
    border: 5px solid var(--bg-light); /* Creates the "cutout" look */
}

.cart-circle i { color: white; width: 28px; height: 28px; }

/* --- 5. AUTH MODAL (Popup) --- */
.modal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 11000;
    padding: 20px;
}

.modal-content.glass-popup {
    background: var(--glass-dark);
    backdrop-filter: blur(10px);
    width: 100%; max-width: 400px;
    padding: 40px 30px;
    border-radius: 35px;
    text-align: center;
    box-shadow: 0 20px 40px rgba(0,0,0,0.3);
}

.auth-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 20px;
}

.btn-primary {
    background: var(--purple-main);
    color: white;
    padding: 16px;
    border-radius: 18px;
    text-decoration: none;
    font-weight: 600;
}

.btn-outline-purple {
    border: 2px solid var(--purple-main);
    color: var(--purple-main);
    padding: 14px;
    border-radius: 18px;
    text-decoration: none;
    font-weight: 600;
}

/* Add this to the very bottom of style.css to fix the Home Page look */
.bg-light {
    background-color: #f8f9fa !important; /* Force the light background for Home */
    color: #333 !important;
}

.marketplace-container {
    background-color: #f8f9fa;
    min-height: 100vh;
    width: 100%;
    display: block; /* Ensure it's not flex-centered like the splash */
}