:root {
    --primary: #00b894; /* Modern Mint Green */
    --primary-dark: #00a383;
    --accent: #fdcb6e;
    --dark: #2d3436;
    --light: #dfe6e9;
    --bg: #f8f9fa;
    --white: #ffffff;
    --shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    --radius: 12px;
    --font: 'Poppins', sans-serif;
}

* {
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent; /* Remove tap blue box on Android */
}

body {
    margin: 0;
    font-family: var(--font);
    background: var(--bg);
    color: var(--dark);
    padding-bottom: 70px; /* Space for bottom nav on mobile */
}

/* --- Top Header (Desktop) --- */
.top-bar {
    background: var(--white);
    padding: 15px 5%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.logo {
    font-size: 22px;
    font-weight: 800;
    color: var(--primary);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Search Bar */
.search-container {
    flex: 1;
    max-width: 500px;
    margin: 0 20px;
    position: relative;
}

.search-container input {
    width: 100%;
    padding: 12px 20px;
    padding-left: 45px;
    border-radius: 50px;
    border: 1px solid #eee;
    background: #f1f3f5;
    transition: 0.3s;
    outline: none;
}

.search-container input:focus {
    background: var(--white);
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(0, 184, 148, 0.1);
}

.search-icon {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #999;
}

/* Header Actions */
.top-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

.icon-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--dark);
    text-decoration: none;
    background: #f1f3f5;
    transition: 0.2s;
    position: relative;
}

.icon-btn:hover {
    background: var(--primary);
    color: var(--white);
}

.badge {
    position: absolute;
    top: -2px;
    right: -2px;
    background: #e74c3c;
    color: white;
    font-size: 10px;
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    border: 2px solid var(--white);
}

.auth-btn {
    padding: 8px 20px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 14px;
    text-decoration: none;
    transition: 0.2s;
}

.btn-primary { background: var(--primary); color: white; }
.btn-primary:hover { background: var(--primary-dark); }
.btn-outline { border: 2px solid var(--primary); color: var(--primary); }

/* --- Mobile Bottom Nav --- */
.bottom-nav {
    display: none; /* Hidden on desktop */
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: var(--white);
    padding: 10px 0;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.05);
    z-index: 1000;
    justify-content: space-around;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: #999;
    font-size: 11px;
    gap: 4px;
}

.nav-item i { font-size: 20px; }
.nav-item.active { color: var(--primary); }

/* --- Hero Section --- */
.hero-section {
    padding: 20px 5%;
}

.hero-card {
    background: linear-gradient(135deg, var(--primary) 0%, #00cec9 100%);
    border-radius: 20px;
    padding: 40px;
    color: white;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 10px 30px rgba(0, 184, 148, 0.3);
    overflow: hidden;
    position: relative;
}

.hero-text h1 { margin: 0 0 10px; font-size: 2.5rem; }
.hero-text p { margin: 0 0 20px; opacity: 0.9; }
.hero-btn {
    background: var(--white);
    color: var(--primary);
    padding: 12px 30px;
    border-radius: 50px;
    border: none;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

/* --- Categories (Scrollable) --- */
.section-title { padding: 0 5%; font-size: 1.2rem; margin-bottom: 15px; display: flex; justify-content: space-between; align-items: center; }
.view-all { font-size: 14px; color: var(--primary); text-decoration: none; }

.category-scroll {
    display: flex;
    overflow-x: auto;
    gap: 15px;
    padding: 0 5% 20px;
    scrollbar-width: none; /* Firefox */
}
.category-scroll::-webkit-scrollbar { display: none; }

.cat-chip {
    flex: 0 0 auto;
    background: var(--white);
    padding: 10px 20px;
    border-radius: 50px;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: var(--shadow);
    color: var(--dark);
    text-decoration: none;
    font-size: 14px;
    border: 1px solid transparent;
}
.cat-chip:hover { border-color: var(--primary); color: var(--primary); }
.cat-chip img { width: 20px; }

/* --- Product Grid --- */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 20px;
    padding: 0 5%;
}

.product-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 15px;
    position: relative;
    transition: transform 0.2s;
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
}

.product-card:hover { transform: translateY(-5px); }

.product-img {
    width: 100%;
    height: 140px;
    object-fit: cover;
    border-radius: 10px;
    margin-bottom: 12px;
    background: #f1f3f5;
}

.p-title { font-size: 15px; margin: 0 0 5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.p-desc { font-size: 12px; color: #888; margin: 0 0 10px; }
.p-footer { margin-top: auto; display: flex; justify-content: space-between; align-items: center; }
.price { color: var(--primary); font-weight: 700; font-size: 16px; }

.add-btn {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: #f1f3f5;
    color: var(--primary);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.2s;
}
.add-btn:hover { background: var(--primary); color: white; }

/* --- Responsive Adjustments --- */
@media (max-width: 768px) {
    .top-bar { padding: 10px 5%; justify-content: center; }
    .logo span { display: none; } /* Show icon only */
    .search-container { margin: 0 10px; max-width: 100%; }
    .top-right { display: none; } /* Hide desktop menu */
    .bottom-nav { display: flex; } /* Show mobile nav */
    
    .hero-section { padding: 15px 5%; }
    .hero-card { padding: 25px; flex-direction: column; text-align: center; }
    .hero-text h1 { font-size: 1.8rem; }
    
    .product-grid { grid-template-columns: repeat(2, 1fr); gap: 15px; }
    .product-img { height: 120px; }
}