/* --- GLOBAL RESETS --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

body {
    background-color: #f2f4f8; /* Light gray background for desktop contrast */
    color: #333;
}

/* --- APP CONTAINER --- */
/* This controls the width. On mobile it's 100%, on Desktop it's centered */
.app-container {
    background-color: #fff;
    min-height: 100vh;
    padding-bottom: 70px; /* Space for mobile bottom nav */
}

/* --- HEADER --- */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background: #fff;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.brand-logo {
    font-size: 24px;
    font-weight: 800;
    color: #333;
}
.brand-logo span { color: #e91e63; }

.header-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.btn-advertise {
    background: #333;
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 20px;
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
}

.icon-btn { font-size: 20px; color: #333; cursor: pointer; }

/* Desktop Nav - Hidden by default (Mobile First) */
.desktop-nav { display: none; }

/* --- HERO & SEARCH --- */
.hero-section {
    padding: 15px;
    text-align: center;
}

.hero-section h1 {
    display: none; /* Hidden on mobile */
    font-size: 28px;
    margin-bottom: 20px;
    color: #2c3e50;
}

.search-box {
    display: flex;
    align-items: center;
    background: #f1f1f1;
    padding: 12px 15px;
    border-radius: 10px;
    border: 1px solid transparent;
    transition: 0.3s;
}

.search-box:focus-within {
    background: #fff;
    border-color: #e91e63;
    box-shadow: 0 4px 12px rgba(233, 30, 99, 0.15);
}

.search-box input {
    border: none;
    background: transparent;
    flex: 1;
    margin: 0 10px;
    outline: none;
    font-size: 15px;
}

.search-box i { color: #777; }

/* --- CATEGORIES --- */
.section-title {
    padding: 15px 15px 5px 15px;
    font-weight: 700;
    font-size: 16px;
    color: #444;
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr); /* 4 columns on mobile */
    gap: 15px;
    padding: 15px;
}

.cat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    cursor: pointer;
    transition: transform 0.2s;
}

.cat-item:hover { transform: translateY(-3px); }

.cat-icon {
    width: 50px;
    height: 50px;
    background: #fff0f5;
    color: #e91e63;
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    margin-bottom: 8px;
}

.cat-name { font-size: 11px; font-weight: 500; color: #555; line-height: 1.3; }

/* --- BANNER --- */
.banner-section { padding: 0 15px 20px 15px; }

.banner {
    background: linear-gradient(135deg, #e91e63, #ff6b6b);
    border-radius: 15px;
    padding: 20px;
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.banner-text h3 { font-size: 18px; margin-bottom: 5px; }
.banner-text p { font-size: 12px; margin-bottom: 15px; opacity: 0.9; }
.banner-btn {
    background: white;
    color: #e91e63;
    border: none;
    padding: 8px 15px;
    border-radius: 5px;
    font-weight: bold;
    font-size: 12px;
    cursor: pointer;
}

.banner-img i { font-size: 60px; opacity: 0.3; }

/* --- TRENDING (Horizontal Scroll) --- */
.trending-section { padding: 10px 15px; }

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}
.section-header h3 { font-size: 16px; font-weight: 700; }
.section-header a { font-size: 12px; color: #e91e63; text-decoration: none; }

.horizontal-scroll {
    display: flex;
    overflow-x: auto;
    gap: 15px;
    padding-bottom: 10px;
    scrollbar-width: none;
}
.horizontal-scroll::-webkit-scrollbar { display: none; }

.trend-card {
    min-width: 120px;
    cursor: pointer;
}

.card-img {
    width: 100%;
    height: 100px;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 8px;
}
.card-img img { width: 100%; height: 100%; object-fit: cover; transition: 0.3s; }
.trend-card:hover img { transform: scale(1.1); }
.trend-card span { font-size: 13px; font-weight: 500; display: block; text-align: center;}

/* --- OFFERS GRID --- */
.offers-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    padding: 15px;
    background: #f9f9f9;
}

.offer-card {
    background: white;
    padding: 15px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    font-weight: 600;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    cursor: pointer;
}
.offer-card i { color: #e91e63; width: 20px; text-align: center; }

/* --- MOBILE BOTTOM NAV --- */
.bottom-nav {
    position: fixed;
    bottom: 0;
    width: 100%;
    background: white;
    display: flex;
    justify-content: space-around;
    padding: 10px 0;
    border-top: 1px solid #eee;
    z-index: 1000;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    color: #999;
    font-size: 10px;
    gap: 5px;
    cursor: pointer;
    position: relative;
}

.nav-item.active { color: #e91e63; }
.nav-item i { font-size: 18px; }

/* --- FOOTER --- */
.yelp-style-footer {
    background: #333;
    color: #ccc;
    padding: 40px 20px 20px;
    margin-top: 20px;
}
.footer-content { display: grid; gap: 30px; }
.footer-col h3 { color: white; margin-bottom: 15px; font-size: 16px; }
.footer-col a { display: block; color: #999; text-decoration: none; margin-bottom: 8px; font-size: 13px; }
.footer-col a:hover { color: white; }
.footer-bottom { border-top: 1px solid #444; margin-top: 30px; padding-top: 20px; text-align: center; font-size: 12px; }


/* ========================================= */
/* DESKTOP RESPONSIVE STYLES          */
/* ========================================= */

@media (min-width: 768px) {
    
    /* 1. Center the app like a website */
    .app-container {
        max-width: 1200px;
        margin: 0 auto;
        padding-bottom: 0; /* No bottom nav needed */
        box-shadow: 0 0 20px rgba(0,0,0,0.05);
    }

    /* 2. Hide Mobile Bottom Nav */
    .bottom-nav { display: none; }

    /* 3. Show Desktop Top Nav */
    .desktop-nav {
        display: flex;
        gap: 30px;
    }
    .desktop-nav a {
        text-decoration: none;
        color: #555;
        font-weight: 600;
        font-size: 15px;
        transition: 0.3s;
    }
    .desktop-nav a:hover, .desktop-nav a.active {
        color: #e91e63;
    }
    
    /* 4. Fix Search Bar */
    .hero-section {
        background: linear-gradient(rgba(0,0,0,0.6), rgba(0,0,0,0.6)), url('https://images.unsplash.com/photo-1540555700478-4be289fbecef?w=1200');
        background-size: cover;
        background-position: center;
        padding: 80px 20px;
        color: white;
        border-radius: 0 0 20px 20px;
    }
    .hero-section h1 { display: block; color: white; text-shadow: 0 2px 4px rgba(0,0,0,0.5); }
    .search-box {
        max-width: 600px;
        margin: 0 auto;
        background: white;
    }

    /* 5. Improve Categories Grid */
    .category-grid {
        grid-template-columns: repeat(8, 1fr); /* 8 columns in one row */
        gap: 20px;
        padding: 40px;
    }
    .cat-icon { width: 70px; height: 70px; font-size: 28px; }
    .cat-name { font-size: 14px; margin-top: 10px; }

    /* 6. Fix Trending Section (No Scroll, Grid instead) */
    .trending-section { padding: 40px; }
    .horizontal-scroll {
        display: grid;
        grid-template-columns: repeat(5, 1fr); /* 5 cards in a row */
        gap: 25px;
        overflow: visible;
    }
    .trend-card { min-width: auto; }
    .card-img { height: 160px; }
    .trend-card span { margin-top: 10px; font-size: 16px; }

    /* 7. Offers Grid */
    .offers-grid {
        grid-template-columns: repeat(4, 1fr);
        padding: 40px;
        background: white;
    }
    .offer-card {
        justify-content: center;
        flex-direction: column;
        text-align: center;
        padding: 30px;
        border: 1px solid #eee;
    }
    .offer-card i { font-size: 24px; margin-bottom: 10px; width: auto; }

    /* 8. Banner Adjustments */
    .banner-section { padding: 0 40px 40px; }
    .banner { padding: 40px; }
    .banner-text h3 { font-size: 28px; }
    .banner-text p { font-size: 16px; }
    .banner-btn { padding: 12px 30px; font-size: 14px; }

    /* 9. Footer Columns */
    .footer-content { grid-template-columns: repeat(3, 1fr); text-align: left; }
}



/* --- DUAL SEARCH BAR STYLING --- */

.dual-search-box {
    display: flex;
    align-items: center;
    background: #fff;
    border-radius: 50px; /* Fully rounded pill shape */
    padding: 5px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    max-width: 700px;
    margin: 0 auto; /* Center it */
    border: 1px solid #ddd;
}

/* The individual input fields */
.search-field {
    display: flex;
    align-items: center;
    padding: 0 15px;
    flex: 1; /* Both take equal width */
}

.search-field i {
    color: #e91e63;
    margin-right: 10px;
    font-size: 14px;
}

.search-field input {
    border: none;
    outline: none;
    width: 100%;
    font-size: 14px;
    color: #333;
}

/* Vertical Divider line */
.divider {
    width: 1px;
    height: 30px;
    background-color: #ddd;
}

/* Search Button */
.search-submit-btn {
    background-color: #e91e63;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 40px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s;
}

.search-submit-btn:hover {
    background-color: #d81557;
}

/* Location Tag on Cards (Optional visual helper) */
.location-tag {
    display: block;
    text-align: center;
    font-size: 10px;
    color: #999;
    margin-top: 2px;
}

/* Responsive: Stack on mobile */
@media (max-width: 768px) {
    .dual-search-box {
        flex-direction: column;
        border-radius: 15px;
        padding: 10px;
    }
    
    .search-field {
        width: 100%;
        padding: 10px;
        border-bottom: 1px solid #f0f0f0;
    }
    
    .divider { display: none; } /* Hide vertical divider on mobile */
    
    .search-submit-btn {
        width: 100%;
        margin-top: 10px;
        border-radius: 10px;
    }
}




/* WhatsApp Style Search Box */
.custom-search-container {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    padding: 10px;
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
}

.search-row {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    border-bottom: 1px solid #eee;
}

.search-row:last-of-type {
    border-bottom: none;
}

.search-row i {
    color: #D3405B;
    margin-right: 12px;
    font-size: 18px;
    width: 20px;
    text-align: center;
}

.search-row input {
    border: none;
    outline: none;
    width: 100%;
    font-size: 16px;
    color: #333;
}

.gps-icon {
    cursor: pointer;
    color: #D3405B;
    font-size: 18px;
    padding-left: 10px;
}

.search-btn-mobile {
    background: #D3405B;
    color: white;
    width: 100%;
    padding: 14px;
    border-radius: 10px;
    font-weight: bold;
    font-size: 18px;
    margin-top: 10px;
    border: none;
}