/* =========================================
   1. GLOBAL & TYPOGRAPHY
   ========================================= */
body {
    font-family: "Plus Jakarta Sans", sans-serif !important;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    margin: 0;
}

.container {
    flex: 1;
}

a {
    text-decoration: none !important;
    color: inherit;
}

/* =========================================
   2. NAVBAR LAYOUT & ANIMATION
   ========================================= */
#main-navbar {
    height: auto !important;
    min-height: 140px;
    background-color: white !important;
    padding-top: 1rem;
    padding-bottom: 0.5rem;
    z-index: 1050;
    border-bottom: 1px solid #eaeaea;
}

.navbar-container {
    display: flex;
    flex-direction: column;
    width: 100%;
    padding: 0 1rem;
}

/* Row 1: Logo, Search, Profile */
.navbar-top-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    height: 80px;
    padding-top: 10px;
}

/* Row 2: Categories (Animated) */
.navbar-bottom-row {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    padding: 10px 0 !important;
    
    /* Animation Properties */
    transition: all 0.3s ease-in-out;
    height: 48px;
    opacity: 1;
    overflow: hidden;
    transform-origin: top;
}

/* Logo Image Styling */
.logo-img {
    width: 9rem; /* Adjust this to match your navbar height */
    object-fit: contain;
    display: block; /* Removes extra space below inline images */
}

/* Update navbar-brand to remove font-size (since we aren't using an icon anymore) */
.navbar-brand {
    margin-right: 1rem;
    display: flex;
    align-items: center;
}

/* Scrolled State: Hides Row 2 */
.is-scrolled .navbar-bottom-row {
    height: 0 !important;
    opacity: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    pointer-events: none;
    transform: translateY(-20px);
}

/* =========================================
   3. SEARCH BAR COMPONENT
   ========================================= */
.navbar-search-wrapper {
    flex-grow: 1;
    display: flex;
    justify-content: center;
}

.search-bar-container {
    display: flex;
    align-items: center;
    background-color: white;
    border: 1px solid #e0e0e0;
    border-radius: 50px;
    padding: 5px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    width: 100%;
    height: 48px;
    max-width: 700px;
    transition: all 0.3s ease;
    position: relative !important;
    overflow: visible !important;
    z-index: 1000;
}

.search-bar-container:hover {
    box-shadow: 0 6px 12px rgba(0,0,0,0.1);
    transform: translateY(-1px);
}

.search-input-wrapper {
    font-size: 14px;
    display: flex;
    align-items: center;
    width: 100%;
    height: 100%;
    line-height: 1.4;
}

.search-input {
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    font-size: 1rem;
    color: #222;
    background: transparent;
    width: 100%;
    height: 100%;
    padding-right: 35px !important; 
    padding-left: 15px !important;
}

/* Red Search Button (Pill Shape with Text) */
.search-btn {
    background-color: #fe424d !important;
    color: white !important;
    height: 40px; 
    border-radius: 50px !important; 
    cursor: pointer;
    display: flex !important;
    align-items: center;
    justify-content: center;
    padding: 0 16px !important; 
    gap: 8px;
    width: auto;
    border: none;
}

.search-btn:hover {
    background-color: #d93b43 !important;
}

.search-btn-text {
    display: inline-block;
    font-weight: 600;
}

.search-icon-left {
    color: #717171;
    margin-right: 10px;
}

/* Search Suggestions */
/* 1. Parent Container (CRITICAL) */
/* This ensures the box aligns with the search bar, not the whole page */
.search-bar-container {
    position: relative !important;
    overflow: visible !important; /* Lets the box hang out */
    z-index: 1000;
}

/* 2. The Suggestions Box */
.suggestions-box {
    position: absolute;
    top: 100%; /* Pushes it exactly below the input */
    left: 0;
    right: 0;  /* Stretches to full width */
    background-color: white !important;
    z-index: 99999 !important; /* Forces it on top of Map/Navbar */
    
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.15);
    border: 1px solid #ddd;
    border-top: none;
    margin: 5px;
    padding: 10px 0;
    
    
    display: block;
}

/* 3. The Individual Items */
.suggestion-item {
    padding: 12px 20px !important;
    border-bottom: 1px solid #f0f0f0;
    border-radius: 30px;
    cursor: pointer;
    background: white;
    
    display: flex;       /* Aligns icon and text */
    align-items: center;
    gap: 15px;
    
    color: #333; /* Ensures text is visible (not white-on-white) */
    transition: background 0.2s ease;
}

.suggestion-item:hover {
    background-color: #f7f7f7;
}

/* Styling for the expanded state */
.suggestions-box.scroll-active {
    max-height: 300px;
    overflow-y: auto; 
}

/* Styling for the Show More/Less buttons */
.show-more-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    color: #fe424d;
    cursor: pointer;
    background: white;
    border-top: 1px solid #eee;
    
}

.show-more-btn:hover {
    background-color: #fff0f1;
}

/* 4. The Icon Circle */
.suggestion-icon {
    width: 35px;
    height: 35px;
    background-color: #f1f1f1;
    border-radius: 50%;
    
    display: none;
    justify-content: center;
    align-items: center;
    color: #666;
    flex-shrink: 0;
}

/* 5. Utility to Hide (Bootstrap Standard) */
.d-none {
    display: none;
}
/* =========================================
   4. CATEGORIES & FILTERS
   ========================================= */
.filters-scroll {
    display: flex !important;
    align-items: center !important;
    gap: 2rem !important;
    overflow-x: auto !important;
    flex-grow: 0 !important;
    width: fit-content !important; 
    max-width: 80% !important;
    margin-right: 20px !important; 
    -ms-overflow-style: none;
    scrollbar-width: none;
}
.filters-scroll::-webkit-scrollbar { display: none; }

.filter {
    color: rgb(35, 33, 33);
    text-decoration: none;
    text-align: center;
    opacity: 0.7;
    flex-shrink: 0;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: 0.2s;
}

.filter:hover {
    opacity: 1;
    border-bottom: 2px solid #ccc;
}

.active-filter {
    opacity: 1 !important;
    border-bottom: 3px solid black !important;
    font-weight: 800;
}

.filter-icon {
    font-size: 1rem;
    margin-bottom: 0.3rem;
}

.filter-text {
    font-size: 0.8rem;
    margin: 0;
}

.tax-toggle-box {
    flex-shrink: 0;
    width: auto !important;
    border: 1px solid #ddd;
    border-radius: 12px;
    padding: 0 16px;
    display: flex;
    align-items: center;
    height: 48px; 
    white-space: nowrap;
    font-size: 1rem;
    font-weight: 600;
    background: white;
    cursor: pointer;
}

.tax-toggle-box:hover {
    border-color: #000;
    background-color: #f7f7f7;
}

.tax-info { display: none; }

/* =========================================
   5. PROFILE & BRANDING
   ========================================= */
.navbar-brand .fa-compass {
    color: #fe424d;
    font-size: 2rem;
}

.navbar-profile-zone {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-left: 1rem;
}

.host-btn {
    font-size: 0.9rem;
    font-weight: 600;
    color: #222 !important;
    white-space: nowrap;
    padding: 0.5rem 1rem;
    border-radius: 2rem;
    transition: 0.2s;
}
.host-btn:hover { background-color: #f7f7f7; }

/* Profile Button */
.profile-btn {
    display: flex !important;
    align-items: center;
    justify-content: center;
    width: 45px !important; /* Circle shape override */
    height: 45px !important;
    border-radius: 50% !important;
    padding: 0 !important;
    margin-left: 1rem;
    border: 1px solid #ddd;
    background: white;
    cursor: pointer;
    transition: box-shadow 0.2s ease;
}

.profile-btn:hover {
    box-shadow: 0 5px 5px rgba(0,0,0,0.18);
}

.user-icon-container {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background-color: #717171;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
}


.no-arrow::after { display: none !important; }

/* =========================================
   6. CARDS & LISTINGS
   ========================================= */
.listing-card {
    border: none !important;
    margin-bottom: 2rem;
}

.card-img-top {
    border-radius: 1rem !important;
    width: 100% !important;
    object-fit: cover !important;
}

.card-body {
    padding: 0 !important;
}

.card-text p {
    font-weight: 400 !important;
}

.card-img-overlay {
    opacity: 0;
}

.card-img-overlay:hover {
    opacity: 0.2;
    background-color: white;
}

.show-img {
    height: 30vh;
    width: 100%;
    object-fit: cover;
}

.btns {
    display: flex;
    gap: 1rem; /* Added gap for spacing between buttons */
}

.show-card {
    padding-left: 0;
    padding-right: 0;
}

.nav-link {
    color: #222222 !important;
}

.listing-link {
    text-decoration: none;
}
/* =========================================
   7. FOOTER
   ========================================= */
.f-info {
    text-align: center;
    display: flex;
    height: 8rem;
    background-color: #ebebeb;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
}

.f-info-links, .f-info-socials, .f-info-brand {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.f-info-links a {
    text-decoration: none;
    color: #222222;
}

.f-info-links a:hover {
    text-decoration: underline;
}

.f-info-socials i {
    margin-right: 1rem;
    font-size: 1.2rem;
}

.f-info-credit {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    color: #717171;
    margin-top: 10px;
    padding-bottom: 10px;
    gap: 5px;
}

.f-info-credit b {
    color: #222; /* Makes your name slightly darker */
    margin-left: 4px;
}

/* =========================================
   8. UTILITIES & BUTTONS
   ========================================= */
.add-btn, .edit-btn {
    background-color: #fe424d !important;
    border: none !important;
    color: white;
    width: 70px !important;
}

.d-none { display: none !important; }



/* ==================================================
   MOBILE RESPONSIVENESS (Max-Width: 768px ONLY)
   This section handles Phones & Tablets.
   ================================================== */

@media (max-width: 768px) {

    /* --- 1. GLOBAL MOBILE RESET --- */
    body, html {
        overflow-x: hidden; /* Stops side-scrolling bugs */
        width: 100%;
    }
    .container, .container-fluid {
        padding-left: 15px !important;
        padding-right: 15px !important;
        max-width: 100%;
    }

    /* --- 2. LINE 1: STICKY HEADER (Logo + Search + User) --- */
    /* Forces the top row to stay stuck to the top of the phone screen */
    .navbar-top-row {
        position: fixed !important;
        top: 0;
        left: 0;
        width: 100%;
        height: 70px; /* Fixed height for header */
        z-index: 1050;
        background-color: white;
        border-bottom: 1px solid #f2f2f2;
        
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
        padding: 0 15px !important;
    }

    /* Resize Logo for Mobile */
    .logo-img { 
        width: 70px !important;
    }

    /* --- 3. LINE 2 & 3: CONTENT SPACER --- */
    /* Pushes content down so it doesn't hide behind the sticky header */
    .navbar-bottom-row {
        margin-top: 70px !important; 
        display: flex !important;
        flex-direction: column !important; /* Forces vertical stacking */
        height: auto !important;
        padding-bottom: 10px !important;
        background-color: white;
        opacity: 1 !important; /* Ensure it stays visible */
        pointer-events: auto !important;
    }

    /* LINE 2: Categories (Horizontal Scroll) */
    .filters-scroll {
        width: 100% !important;
        max-width: 100% !important;
        display: flex !important;
        gap: 20px !important;
        overflow-x: auto !important;
        padding: 10px 5px;
        border-bottom: 1px solid #f8f8f8;
        margin-right: 0 !important;
    }
    .filters-scroll::-webkit-scrollbar { display: none; }

    /* LINE 3: Tax Toggle (Stacked Below) */
    .tax-toggle-box {
        width: 100% !important;
        padding: 10px 15px;
        display: block !important;
        margin-top: 5px;
        border: none !important;
    }

    /* Inner Toggle Styling */
    .tax-toggle-box .form-check-reverse {
        width: 100%;
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        border: 1px solid #ddd;
        padding: 10px 15px;
        border-radius: 12px;
        background-color: white;
        margin: 0;
    }
    
    /* Fix text alignment inside toggle */
    .form-check-label {
        order: 1 !important;        /* Visual position: 1st */
        margin-right: auto !important; /* Push everything else to the right */
        margin-bottom: 0 !important;
        flex-grow: 1 !important;    /* Take up available space */
        text-align: left !important;
    }
    .form-switch { padding-left: 0.8rem !important; padding-right: 3.5rem !important; margin-bottom: 0 !important; }
    .form-check-input {
        order: 2 !important;        /* Visual position: 2nd */
        margin-left: 10px !important; 
        margin-top: 0 !important;
        transform: scale(1.2);      /* Optional: Make switch slightly bigger for thumb */
    }

    /* --- 4. COMPACT SEARCH BAR --- */
    /* Squeezes search bar to fit next to user icon */
    .navbar-search-wrapper {
        flex-grow: 1;
        margin: 0 10px;
        display: flex;
        align-items: center;
        justify-content: flex-end; /* Align right */
    }

    .search-bar-container {
        width: 100% !important;
        background-color: white !important;
        border: 1px solid #ddd !important;
        border-radius: 30px !important;
        height: 40px !important;
        padding: 0 5px !important;
        display: flex !important;
        align-items: center !important;
        position: relative !important;
    }

    /* Hide the long input field on mobile (User clicks icon to search) */
    /* OR: If you want it visible, change width to 100px */
    .search-input {
        border-radius: 30px !important;
    }
    .search-btn {
        /* Force perfect square dimensions */
        width: 35px !important;
        height: 35px !important;
        min-width: 35px !important; /* Prevents squeezing */
        min-height: 35px !important;
        
        /* Make it round */
        border-radius: 50% !important;
        padding: 0 !important; /* Critical: remove padding to keep it round */
        
        /* Positioning */
        position: absolute !important;
        right: 5px !important;
        top: 50% !important;
        transform: translateY(-50%) !important;
        z-index: 10; /* Ensure it sits on top */
        
        /* Center the icon */
        display: flex !important;
        justify-content: center;
        align-items: center;
        background-color: #fe424d !important;
        color: white;
    }

    /* Make the button a standalone Circle Icon */
    .search-btn {
        width: 35px !important;
        height: 35px !important;
        padding: 0 !important;
        border-radius: 50% !important;
        background-color: #fe424d !important;
        display: flex !important;
        justify-content: center;
        align-items: center;
    }
    .search-btn span { display: none !important; } /* Hide text "Search" */

    /* --- 5. COMPACT "LIST PROPERTY" BUTTON --- */
    .host-btn {
        font-size: 9px !important;
        line-height: 1.1 !important;
        max-width: 55px !important;
        white-space: normal !important; /* Force 2 lines */
        padding: 0 !important;
        margin-right: 5px !important;
        text-align: center;
        background: transparent !important;
    }
    
    .navbar-profile-zone {
        margin-left: 5px !important;
        gap: 5px !important;
    }
    
    .profile-btn {
        width: 35px !important;
        height: 35px !important;
        margin-left: 0 !important;
    }

    /* --- 6. GRID FIX (1 Column Listings) --- */
    .row-cols-md-2 > *, .row-cols-lg-3 > * {
        width: 100% !important;
        flex: 0 0 100% !important;
    }
    
    /* Image Height Fix */
    .card-img-top { height: 250px !important; }
    
    /* Listing Details Page Full Width */
    .col-8.offset-3 {
        width: 100% !important;
        margin-left: 0 !important;
        padding: 0 15px !important;
    }
    
    /* Reduce side margins on buttons */
    .edit-btn { 
        margin-left: 10px !important;
        width: 70px !important;
    }
}