@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800&display=swap');


* { box-sizing: border-box; margin: 0; padding: 0; font-family: 'Poppins', sans-serif; -webkit-tap-highlight-color: transparent; }

:root {
    --brand-color:#FF7A00; /* Your new Golden Yellow */
    --brand-bg: #f0f4f8;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --blue-accent:#FFA726; /* Your new matching Royal Blue */
}

body { background: #e0e0e0; display: flex; justify-content: center; }

.app-container {
    background: var(--brand-bg); width: 100%; max-width: 480px; min-height: 100vh;
    box-shadow: 0 0 30px rgba(0,0,0,0.1); position: relative; display: flex; flex-direction: column;
}

/* --- HEADER --- */
.header { background: white; padding: 20px; position: sticky; top: 0; z-index: 100; box-shadow: 0 2px 10px rgba(0,0,0,0.02); }
/* 🚀 FIX: OLD LOGO TEXT STYLES REMOVED */
/* .logo { font-size: 22px; font-weight: 800; color: var(--brand-color); margin-bottom: 15px; letter-spacing: -0.5px; } */

/* 🚀 FIX: NEW LOGO IMAGE STYLES (RESPONSIVE) */
.logo-link {
    display: flex;
    align-items: center;
    text-decoration: none;
    margin-bottom: 15px; /* Keeps same spacing above search box */
    transition: 0.2s; /* Smooth click animation */
}
.logo-link:active {
    transform: scale(0.95); /* Mobile-app click effect */
}
.header-logo {
    max-height: 45px; /* Adjust this number to make the logo larger or smaller vertically */
    height: auto;
    width: auto;
    max-width: 100%; /* Makes it responsive: it won't overflow small screens */
    display: block;
}
.search-box { background: #f1f5f9; border-radius: 12px; display: flex; align-items: center; padding: 12px 15px; }
.search-icon { color: #94a3b8; margin-right: 10px; cursor: pointer; }
.search-box input { border: none; background: transparent; outline: none; width: 100%; font-size: 14px; color: var(--text-main); }
/* 🚀 NOTIFICATIONS & SMART DOTS */
.header-top { display: flex; justify-content: space-between; align-items: center; width: 100%; }
.notify-icon-container { position: relative; font-size: 22px; color: var(--brand-color); text-decoration: none; margin-right: 5px; transition: 0.2s; }
.notify-icon-container:active { transform: scale(0.9); }
.red-dot { position: absolute; top: -2px; right: -2px; width: 10px; height: 10px; background: #ef4444; border-radius: 50%; border: 2px solid white; display: none; }

.nav-item { position: relative; } /* Allows the red dot to stick to the nav icon */
.msg-dot { top: 5px; right: 15px; border: 2px solid var(--brand-bg); }

/* 🚀 FIX: Removed padding-bottom here to allow footer to reach the bottom */
.content-area { flex: 1; overflow-y: auto; }

/* --- CATEGORIES (HOMEPAGE) --- */
.category-grid {
    display: grid; grid-template-columns: repeat(4, 1fr); gap: 15px 10px;
    padding: 20px; background: white; margin-bottom: 10px;
}
.cat-item { display: flex; flex-direction: column; align-items: center; text-decoration: none; }
.cat-icon-box {
    width: 55px; height: 55px; border-radius: 16px;
    display: flex; justify-content: center; align-items: center; font-size: 24px; margin-bottom: 8px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.03); transition: transform 0.2s;
}
.cat-item:active .cat-icon-box { transform: scale(0.9); }
.cat-name { font-size: 11px; text-align: center; color: var(--text-main); font-weight: 600; line-height: 1.2; }

/* --- SECTIONS SHARED --- */
.section-wrapper { padding: 0 20px 20px; }
.section-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 15px; }
.section-title { font-size: 17px; font-weight: 800; color: var(--text-main); }
.see-all { font-size: 13px; color: var(--blue-accent); font-weight: 600; text-decoration: none; }

/* --- GRIDS (Items & Vendors) --- */
.product-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.card {
    background: white; border-radius: 16px; padding: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.03); cursor: pointer; border: 1px solid #f1f5f9;
    display: flex; flex-direction: column; height: 100%; overflow: hidden;
}
.card-img { width: 100%; height: 140px; object-fit: cover; border-radius: 10px; background: #eee; margin-bottom: 10px; flex-shrink: 0; }
.card-price { font-size: 16px; font-weight: 800; color: var(--blue-accent); margin-bottom: 4px; }
.card-title { font-size: 12px; color: var(--text-main); line-height: 1.4; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;}
.card-desc { font-size: 11px; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 2px;}

/* --- REVIEWS SLIDER --- */
.reviews-slider { display: flex; gap: 15px; overflow-x: auto; padding-bottom: 10px; scrollbar-width: none; scroll-behavior: smooth; }
.reviews-slider::-webkit-scrollbar { display: none; }
.review-card { min-width: 260px; max-width: 260px; background: white; padding: 15px; border-radius: 16px; box-shadow: 0 4px 15px rgba(0,0,0,0.03); border: 1px solid #f1f5f9; scroll-snap-align: start; }
.rev-header { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.rev-img { width: 40px; height: 40px; border-radius: 50%; background: #eee; object-fit: cover; }
.rev-name { font-size: 13px; font-weight: bold; color: var(--text-main); }
.rev-stars { color: #f59e0b; font-size: 10px; }
.rev-text { font-size: 12px; color: var(--text-muted); line-height: 1.5; font-style: italic; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;}

/* --- BLOG LIST --- */
.blog-card { display: flex; gap: 15px; background: white; padding: 12px; border-radius: 16px; margin-bottom: 12px; box-shadow: 0 4px 15px rgba(0,0,0,0.03); border: 1px solid #f1f5f9; cursor: pointer; }
.blog-img { width: 80px; height: 80px; border-radius: 12px; object-fit: cover; background: #eee; flex-shrink: 0; }
.blog-info { flex: 1; display: flex; flex-direction: column; justify-content: center; min-width: 0; }
.blog-cat-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 4px; }
.blog-cat { font-size: 10px; font-weight: 800; color: var(--brand-color); text-transform: uppercase; }
.blog-date { font-size: 10px; color: #94a3b8; font-weight: 600; }
.blog-title { font-size: 14px; font-weight: 800; color: var(--text-main); margin-bottom: 4px; line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.blog-desc { font-size: 12px; color: var(--text-muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* 🚀 THE FIXED EXPANDABLE FOOTER */
/* 🚀 THE FIXED EXPANDABLE FOOTER */
.footer {
    background: var(--brand-color); color: #1e293b; 
    padding: 30px 20px 100px; 
    border-radius: 24px 24px 0 0; position: relative;
    overflow: hidden; transition: max-height 0.4s ease-in-out;
    margin-top: 10px;
}
.footer.collapsed { max-height: 160px; } 
.footer.expanded { max-height: 500px; }

.footer-toggle { position: absolute; top: 10px; left: 50%; transform: translateX(-50%); color: rgba(30, 41, 59, 0.5); font-size: 14px; cursor: pointer; padding: 10px; width: 60px; text-align: center; }
.footer-top-collapsed { display: flex; justify-content: space-between; align-items: center; margin-top: 20px; }
.footer-logo-box { font-size: 18px; font-weight: 800; letter-spacing: -0.5px; opacity: 0.9; margin: 0; color: #1e293b; }

.download-app-btn {
    background: var(--blue-accent); color: white; border: none; padding: 10px 18px; 
    border-radius: 8px; font-size: 13px; font-weight: 800; cursor: pointer; transition: 0.2s;
}
.download-app-btn:active { transform: scale(0.95); opacity: 0.9; }

.footer-expanded-links { margin-top: 30px; border-top: 1px solid rgba(30, 41, 59, 0.1); padding-top: 25px; display: none; }
.footer.expanded .footer-expanded-links { display: block; animation: fadeIn 0.4s; }
.footer-links-grid { display: flex; justify-content: center; gap: 20px; flex-wrap: wrap; margin-bottom: 25px; }
.footer-links-grid a { color: #1e293b; text-decoration: none; font-size: 14px; font-weight: 800; }
.copyright-text { font-size: 12px !important; color: rgba(30, 41, 59, 0.7) !important; text-align: center; margin: 0; font-weight: 600; }
.copyright-text a { color: var(--blue-accent); text-decoration: none; font-weight: 800; }
@keyframes fadeIn { from {opacity: 0;} to {opacity: 1;} }

/* --- BOTTOM NAV --- */
.bottom-nav {
    position: fixed; bottom: 0; width: 100%; max-width: 480px; 
    background: rgba(255, 255, 255, 0.95); backdrop-filter: blur(10px); 
    display: flex; justify-content: space-around; align-items: center;
    padding: 10px 0 20px; border-radius: 24px 24px 0 0;
    box-shadow: 0 -5px 25px rgba(0,0,0,0.05); z-index: 1000; border-top: 1px solid rgba(0,0,0,0.05);
}
.nav-item { display: flex; flex-direction: column; align-items: center; color: #94a3b8; text-decoration: none; font-size: 10px; font-weight: 600; transition: 0.2s; width: 60px; }
.nav-item i { font-size: 20px; margin-bottom: 4px; transition: 0.2s; }
.nav-item.active { color: var(--brand-color); }
.nav-item.active i { transform: translateY(-2px); }
.nav-fab {
    width: 50px; height: 50px; background: var(--brand-color); color: white;
    border-radius: 50%; display: flex; justify-content: center; align-items: center;
    font-size: 20px; margin-top: -25px; box-shadow: 0 8px 20px rgba(43, 43, 43, 0.3);
    cursor: pointer; transition: 0.2s; border: 4px solid white;
}
.nav-fab:active { transform: scale(0.95); }

/* --- FULL CATEGORY LIST (Directory Page) --- */
.full-cat-list { display: flex; flex-direction: column; gap: 12px; }
.full-cat-item { display: flex; align-items: center; background: white; padding: 15px; border-radius: 16px; text-decoration: none; box-shadow: 0 4px 15px rgba(0,0,0,0.02); border: 1px solid #f1f5f9; transition: transform 0.2s; }
.full-cat-item:active { transform: scale(0.98); background: #f8fafc; }
.full-cat-icon { width: 48px; height: 48px; border-radius: 14px; display: flex; justify-content: center; align-items: center; font-size: 22px; margin-right: 15px; flex-shrink: 0; }
.full-cat-text { flex: 1; display: flex; flex-direction: column; justify-content: center; }
.full-cat-title { font-size: 15px; font-weight: 800; color: var(--text-main); margin-bottom: 3px; }
.full-cat-desc { font-size: 11px; color: var(--text-muted); }
/* --- SKELETON LOADERS --- */
.sk-shimmer { background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 50%, #f1f5f9 75%); background-size: 200% 100%; animation: shimmer 1.5s infinite; }
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

.sk-card { background: white; border-radius: 16px; padding: 10px; border: 1px solid #f1f5f9; display: flex; flex-direction: column; height: 100%; }
.sk-img { width: 100%; height: 140px; border-radius: 10px; margin-bottom: 10px; flex-shrink: 0; }
.sk-line { height: 12px; border-radius: 4px; margin-bottom: 8px; }
.sk-line.short { width: 40%; }
.sk-line.medium { width: 70%; }
.sk-line.long { width: 100%; }

.sk-avatar { width: 40px; height: 40px; border-radius: 50%; flex-shrink: 0; }
.sk-v-avatar { width: 60px; height: 60px; border-radius: 50%; margin: 0 auto 10px; flex-shrink: 0; }
.sk-b-img { width: 80px; height: 80px; border-radius: 12px; flex-shrink: 0; }

/* ========================================= */
/* 🌙 GLOBAL DARK MODE STYLES                */
/* ========================================= */
body.dark-mode {
    --brand-bg: #0f172a;
    --text-main: #f1f5f9;
    --text-muted: #94a3b8;
    background-color: #020617; /* Very dark background */
}

/* Force App Container to be dark */
body.dark-mode .app-container {
    background: var(--brand-bg);
    box-shadow: 0 0 30px rgba(0,0,0,0.8);
}

/* Turn all white elements dark */
body.dark-mode .header,
body.dark-mode .bottom-nav,
body.dark-mode .card,
body.dark-mode .product-card,
body.dark-mode .vendor-mini-card,
body.dark-mode .blog-card,
body.dark-mode .profile-card,
body.dark-mode .reviews-section,
body.dark-mode .chat-header,
body.dark-mode .input-area,
body.dark-mode .footer,
body.dark-mode .modal-content,
body.dark-mode .auth-card,
body.dark-mode .chat-card,
body.dark-mode .req-card,
body.dark-mode .sticky-top-bar {
    background: #1e293b !important;
    border-color: #334155 !important;
    color: var(--text-main);
}

/* Fix Input fields and search boxes */
body.dark-mode input,
body.dark-mode textarea,
body.dark-mode .search-box,
body.dark-mode .rev-input,
body.dark-mode .msg-input {
    background: #0f172a !important;
    color: #f1f5f9 !important;
    border-color: #334155 !important;
}

/* Fix specific text colors */
body.dark-mode .section-title,
body.dark-mode .card-title,
body.dark-mode .product-title,
body.dark-mode .v-name,
body.dark-mode .rev-title,
body.dark-mode .page-title,
body.dark-mode .chat-name,
body.dark-mode h1, 
body.dark-mode h2, 
body.dark-mode h3 {
    color: #f1f5f9 !important;
}

body.dark-mode .card-desc,
body.dark-mode .v-desc,
body.dark-mode .r-text,
body.dark-mode .chat-last-msg {
    color: #cbd5e1 !important;
}

/* Bottom Nav adjustments */
body.dark-mode .nav-item { color: #64748b; }
body.dark-mode .nav-item.active { color: var(--brand-color); }
body.dark-mode .nav-fab { border-color: #0f172a; }

/* Fix Empty states and Skeleton loaders for Dark Mode */
body.dark-mode .sk-shimmer {
    background: linear-gradient(90deg, #1e293b 25%, #334155 50%, #1e293b 75%);
    background-size: 200% 100%;
}
body.dark-mode .sk-card, 
body.dark-mode .sk-vendor {
    background: #1e293b !important;
    border-color: #334155 !important;
}
/* 🚀 FIX: MISSING DARK MODE EDGE CASES */

/* 1. Remove the solid white background from the Category Grid */
body.dark-mode .category-grid {
    background: transparent !important;
}
body.dark-mode .cat-name {
    color: #f1f5f9 !important;
}

/* 2. Fix the Review Cards (they were staying white) */
body.dark-mode .review-card {
    background: #1e293b !important;
    border-color: #334155 !important;
}

/* 3. Force stubborn inline Vendor Names and Descriptions to turn white/gray */
body.dark-mode .card div {
    color: #f1f5f9 !important;
}
body.dark-mode .card-price {
    color: var(--blue-accent) !important; 
}
body.dark-mode .card div[style*="color: #64748b"] {
    color: #94a3b8 !important; /* Keeps the tiny description text slightly faded */
}

/* 4. Fix all Footer Text, Links, and the Dropdown Arrow */
body.dark-mode .footer-logo-box,
body.dark-mode .footer-links-grid a,
body.dark-mode .copyright-text,
body.dark-mode .footer-toggle,
body.dark-mode #footer-arrow-icon {
    color: #f1f5f9 !important;
}
body.dark-mode .copyright-text a {
    color: var(--blue-accent) !important;
}
/* 5. Force bright pastel category boxes to become dark slate */
body.dark-mode .cat-icon-box {
    background: #1e293b !important;
    box-shadow: none !important;
}
/* Keep the price orange in dark mode - High Specificity */
body.dark-mode .card .card-price {
    color: var(--blue-accent) !important; 
}
.view-all-btn-home { display: block; text-align: center; background: #f1f5f9; color: var(--text-main); font-weight: 800; font-size: 13px; padding: 12px; border-radius: 12px; text-decoration: none; margin-top: 15px; transition: 0.2s; }
.view-all-btn-home:active { transform: scale(0.98); background: #e2e8f0; }
body.dark-mode .view-all-btn-home { background: #1e293b !important; color: #f1f5f9 !important; }
body.dark-mode .view-all-btn-home:active { background: #334155 !important; }

/* 🚀 AD POPUP DARK MODE FIXES */
@keyframes popUp { from { transform: scale(0.9); opacity: 0; } to { transform: scale(1); opacity: 1; } }

body.dark-mode .ad-modal-content {
    background: #0f172a !important;
    border: 1px solid #334155 !important;
}
body.dark-mode #ad-title {
    color: #f1f5f9 !important;
}
body.dark-mode #ad-content {
    color: #cbd5e1 !important;
}