:root {
    --primary: #2874f0; /* Flipkart Blue Style */
    --secondary: #ffc107;
    --bg: #f1f3f6;
    --text-main: #212121;
    --text-muted: #878787;
    --white: #ffffff;
}

* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

body { 
    font-family: 'Inter', sans-serif; 
    background-color: var(--bg); 
    color: var(--text-main);
    line-height: 1.5;
}

.dashboard-wrapper { padding-bottom: 80px; }

/* 1. Modern Search Header */
.search-header { 
    background-color: var(--primary); 
    padding: 12px 16px; 
    position: sticky; 
    top: 0; 
    z-index: 1000;
}
.search-container { 
    background: var(--white); 
    height: 40px; 
    border-radius: 8px; 
    display: flex; 
    align-items: center; 
    padding: 0 12px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
.search-container i { color: #999; margin-right: 10px; font-size: 14px; }
.search-container input { 
    border: none; 
    width: 100%; 
    outline: none; 
    font-size: 14px; 
    font-family: inherit; 
}

/* 2. Location Bar */
.location-bar { 
    background: #fff; 
    padding: 10px 16px; 
    display: flex; 
    align-items: center; 
    border-bottom: 1px solid #ddd;
}
.loc-icon { color: var(--primary); margin-right: 10px; font-size: 18px; }
.loc-text { flex: 1; display: flex; flex-direction: column; overflow: hidden; }
.loc-label { font-size: 11px; color: var(--text-muted); }
.loc-address { 
    font-size: 13px; 
    font-weight: 500; 
    white-space: nowrap; 
    overflow: hidden; 
    text-overflow: ellipsis; 
}
.location-bar .fa-chevron-right { font-size: 12px; color: #999; }

/* 3. Section Styling */
/* 4. Category Cards (Updated - Smaller Icons) */
.section-container { 
    background: #fff; 
    margin-top: 8px; 
    padding: 12px 16px; /* একটু কম প্যাডিং */
}

.section-head { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    margin-bottom: 12px; 
}

.section-head h3 { 
    font-size: 15px; /* ফন্ট সাইজ সামান্য কমানো */
    font-weight: 700; 
}

.section-head a { 
    font-size: 12px; 
    color: var(--primary); 
    text-decoration: none; 
    font-weight: 600; 
}

.category-scroll { 
    display: flex; 
    overflow-x: auto; 
    gap: 15px; /* আইকনগুলোর মাঝের গ্যাপ */
    scrollbar-width: none; 
    padding: 5px 0;
}
.category-scroll::-webkit-scrollbar { display: none; }

.cat-card { 
    min-width: 60px; /* কার্ডের উইডথ কমানো */
    text-align: center; 
}

.cat-img { 
    width: 48px; /* আইকনের ব্যাকগ্রাউন্ড সাইজ আগে ৬০ ছিল, এখন ৪৮ করা হয়েছে */
    height: 48px; 
    border-radius: 50%; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    margin: 0 auto 6px; 
    font-size: 18px; /* আইকনের মেইন সাইজ কমানো */
    color: #444; 
    box-shadow: 0 2px 8px rgba(0,0,0,0.04); /* শ্যাডো হালকা করা */
    transition: transform 0.2s;
}

.cat-card span { 
    font-size: 11px; /* টেক্সট সাইজ ছোট করা */
    font-weight: 500; 
    color: #555;
    display: block;
    white-space: nowrap;
}

/* আইকন ক্লিক করলে ছোট এনিমেশন */
.cat-card:active .cat-img { 
    transform: scale(0.92); 
    background: var(--primary) !important; 
    color: #fff !important; 
}

/* 5. Banner */
.promo-banner { margin-top: 8px; width: 100%; padding: 0 8px; }
.promo-banner img { width: 100%; border-radius: 12px; display: block; }

/* 6. Advanced Product Grid Style (Updated for Compact Look) */
.product-grid { 
    display: grid; 
    grid-template-columns: 1fr 1fr; 
    gap: 8px; /* বক্সগুলোর মাঝে সুন্দর গ্যাপের জন্য */
    background: transparent; /* ব্যাকগ্রাউন্ড ট্রান্সপারেন্ট */
    padding: 5px 0;
}

.product-item { 
    background: #fff; 
    padding: 10px; /* প্যাডিং কিছুটা কমানো হয়েছে */
    display: flex; 
    flex-direction: column;
    border-radius: 12px; /* বক্সের কোণাগুলো গোল করা হয়েছে */
    box-shadow: 0 2px 8px rgba(0,0,0,0.06); /* হালকা শ্যাডো */
    transition: 0.3s;
    height: fit-content; /* বক্সটি যতটুকু কন্টেন্ট ততটুকুই লম্বা হবে */
}

.product-thumb { 
    position: relative; 
    text-align: center; 
    margin-bottom: 8px;
    height: 140px; /* হাইট ১৬০ থেকে কমিয়ে ১৪০ করা হয়েছে */
}

.product-thumb img { 
    width: 100%; 
    height: 100%; 
    object-fit: contain; 
}

/* স্পার্কলিং ডিসকাউন্ট ব্যাজ */
.sparkle-badge {
    position: absolute;
    top: -5px;
    left: -5px;
    background: linear-gradient(45deg, #2ecc71, #27ae60);
    color: #fff;
    font-size: 10px;
    font-weight: 800;
    padding: 4px 8px;
    border-radius: 8px 0 12px 0;
    box-shadow: 0 2px 8px rgba(46, 204, 113, 0.4);
    animation: sparkle-effect 1.5s infinite;
    z-index: 1;
}

/* প্রোডাক্ট টাইটেল - হালকা ব্ল্যাক এবং বোল্ড */
.product-name { 
    font-size: 14px; /* সাইজ সামান্য বাড়ানো হয়েছে */
    font-weight: 700; /* একদম বোল্ড করা হয়েছে */
    color: #111; /* গাঢ় ব্ল্যাক কালার */
    margin-bottom: 6px; 
    height: auto; /* ফিক্সড হাইট সরিয়ে দেওয়া হয়েছে */
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.price-container { margin-bottom: 8px; }

.main-price-row { display: flex; align-items: baseline; gap: 5px; }

.current-price { 
    font-size: 17px; 
    font-weight: 800; 
    color: #000; 
}

.old-price { 
    font-size: 12px; 
    text-decoration: line-through; 
    color: #999; 
}

.discount-label { 
    display: block; 
    font-size: 11px; 
    color: #388e3c; 
    font-weight: 600; 
    margin-top: 1px;
}

/* রেটিং ও সোল্ড সেকশন */
.product-footer { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    margin-top: 8px; 
    padding-top: 6px;
    border-top: 1px solid #f1f1f1;
}

.rating { 
    background: #388e3c; 
    color: #fff; 
    font-size: 10px; 
    padding: 2px 6px; 
    border-radius: 4px; 
    font-weight: 700; 
}

.sold-count { 
    font-size: 11px; 
    color: #999; 
}

/* 7. Modern Bottom Nav */
.bottom-nav { 
    position: fixed; 
    bottom: 0; 
    width: 100%; 
    background: #fff; 
    display: flex; 
    justify-content: space-around; 
    padding: 8px 0; 
    box-shadow: 0 -2px 10px rgba(0,0,0,0.1); 
    z-index: 2000;
}
.nav-link { text-decoration: none; color: #666; text-align: center; flex: 1; }
.nav-link i { font-size: 20px; display: block; margin-bottom: 2px; }
.nav-link span { font-size: 10px; font-weight: 500; }
.nav-link.active { color: var(--primary); }