/* --- style.css --- */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Inter', sans-serif;
}

#navbar {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    height: 65px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 50px;
    padding: 0 40px;
    display: flex;
    align-items: center;
    justify-content: space-evenly;
    z-index: 1000;
}
.full-logo {
    margin-top: 18px;
    height: 40px;
    width: auto;
} 

.logo-area { flex: 1; }
.logo-area a { text-decoration: none; }
.logo-area h1 {
    font-family: 'Oleo Script Swash Caps', cursive;
    color: #EB6753;
    font-size: 32px;
    margin: 0;
    white-space: nowrap;
}

.logo-area h1:hover {
    transform: translateY(-3px) scale(1.05);
    transition: all 0.3s ease;
    filter: drop-shadow(0 5px 15px rgba(235, 103, 83, 0.4));
}

.nav-wrapper { display: contents; }

.nav-center {
    flex: 2; 
    display: flex;
    justify-content: space-evenly;
    margin-left: 100px;
}

.nav-right {
    flex: 1;
    display: flex;
    justify-content: flex-end;
    gap: 30px; 
    align-items: center;
}

.nav-links {
    display: flex;
    list-style: none;
    align-items: center;
    width: 100%; 
    justify-content: space-evenly;
}

/* --- LINKS & UNDERLINE --- */
.nav-links li a {
    display: inline-block;
    text-decoration: none;
    font-size: 16px;
    font-weight: 600;
    color: #1a1a1a;
    position: relative;
    transition: all 0.3s ease; /* CONTROL SPEED HERE */
}
.signin-btn {
    background: #EB6753;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 25px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Inter', sans-serif;
    text-decoration: none;
}

.signin-btn:hover {
    transform: translateY(-2px);
    filter: drop-shadow(0 5px 15px rgba(235, 103, 83, 0.4));
}

/* Hide elements by default for the JS toggle */
.hidden {
    display: none !important;
}

.nav-links li a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0%;
    height: 3px;
    background-color: #EB6753;
    transition: width 0.3s ease;
    border-radius: 2px;
}

.nav-links li a:hover{
    color: #EB6753;
    transform: translateY(-3px) scale(1.1); 
    filter: drop-shadow(0 5px 15px rgba(235, 103, 83, 0.4));
}
.nav-links li a.active {
    color: #EB6753;
    transform: scale(1.03); /* CONTROL MOVEMENT & SIZE HERE */
    filter: drop-shadow(0 5px 15px rgba(235, 103, 83, 0.4));
}

.nav-links li a.active:hover {
    transform: translateY(-3px) scale(1.1); /* CONTROL MOVEMENT & SIZE HERE */
}

.nav-links li a:hover::after,
.nav-links li a.active::after {
    width: 50%; 
}

/* --- ICON LINKS FIX --- */
.icon-link {
    display: inline-block;
    text-decoration: none;
    /* Remove transition from here, it's the wrapper */
}

.icon-link i {
    font-size: 24px;
    color: #EB6753;
    display: inline-block;
    /* The transition must be on the element that is actually moving */
    transition: all 0.3s ease; 
}

.logo-area {
    flex: 0 1 auto; /* Don't let it hog space */
}
.logo-area a {
    display: inline-block; /* Crucial: restricts link area to the text only */
}

/* Apply the hover effect to the 'i' tag when the 'a' is hovered */
.icon-link:hover i {
    transform: translateY(-3px) scale(1.1); /* CONTROL ICON GROWTH HERE */
    filter: drop-shadow(0 5px 15px rgba(235, 103, 83, 0.4));
}

.icon-link:hover .fa-heart::before { content: "\f004"; font-weight: 900; }
.icon-link:hover .fa-circle-user::before { content: "\f2bd"; font-weight: 900; }


/* --- MOBILE VIEW --- */

.menu-open, .menu-close { display: none;}

.menu-open, .menu-close { display: none;}


@media (max-width: 900px) {
    #navbar {
        top: 0; left: 0; transform: none;
        width: 100%; border-radius: 0;
        height: 60px; padding: 0 20px;
        justify-content: space-between;
    }
    .full-logo {
        margin-left: 0; /* Reset */
        margin-top: 0; /* Reset desktop margin so it centers vertically */
        height: 32px; /* Slightly scaled down to fit the mobile navbar perfectly */
    }
    .logo-area {
        flex: none; /* Stops it from stretching */
        display: flex;
        align-items: center;
    }

    .nav-wrapper {
        position: fixed;
        right: -100%;
        top: 0;
        width: 280px;
        height: 100vh;
        background: #fff;
        display: flex;
        flex-direction: column;
        padding: 80px 30px;
        transition: 0.4s;
    }

    .nav-wrapper.active { right: 0; }

    .nav-center, .nav-right {
        flex: none;
        width: 100%;
        justify-content: flex-start;
        margin: 0;
        margin-top: -22px;
    }

    .nav-links {
        flex-direction: column;
        align-items: flex-start;
        gap: 25px;
        width: 100%;
    }

    /* FIX: ENABLING UNDERLINE ON MOBILE */
    .nav-links li a::after {
        display: block; /* Make sure it's not hidden */
    }

    .nav-right {
        flex-direction: row;
        justify-content: flex-start;
        margin-top: 20px;
        padding-top: 20px;
        border-top: 1px solid #eee;
        display: flex;
        gap: 20px;
    }

    .menu-open { display: block; font-size: 24px; cursor: pointer; }
    .menu-close {
        display: block;
        position: relative; top: -60px; right: -200px;
        font-size: 24px; cursor: pointer;
    }
}
/* ───── SHARED PROPERTY CARDS ───── */
.property-card {
    background: #fff; border-radius: 20px; overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.07);
    transition: transform 0.3s, box-shadow 0.3s;
    cursor: pointer; display: flex; flex-direction: column;
    text-decoration: none; color: inherit;
    min-width: 320px; /* Important for home carousel */
    flex-shrink: 0;
}
.property-card:hover { transform: translateY(-6px); box-shadow: 0 16px 40px rgba(0,0,0,0.13); }
.card-image {
    position: relative; height: 210px; overflow: hidden;
    background: #f0f0f0;
}
.card-image img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s; }
.property-card:hover .card-image img { transform: scale(1.06); }
.card-no-img { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; }
.cat-label {
    position: absolute; top: 14px; left: 14px;
    background: rgba(0,0,0,0.48); backdrop-filter: blur(6px);
    color: #fff; padding: 4px 10px; border-radius: 20px;
    font-size: 11px; font-weight: 600; text-transform: uppercase;
}
/* ───── SHARED PROPERTY CARDS ───── */
.card-heart {
    position: absolute; 
    top: 12px; 
    right: 12px;
    background: transparent; 
    width: 36px; /* Slightly larger to give the icon room to bounce */
    height: 36px; 
    border-radius: 50%;
    display: flex; 
    align-items: center; 
    justify-content: center;
    cursor: pointer; 
    z-index: 2;
    /* Removed transition from here, just like .icon-link */
}

.card-heart i { 
    color: #EB6753; 
    font-size: 24px; /* Scaled slightly to fit the circle */
    display: inline-block;
    transition: all 0.3s ease; /* The transition lives on the moving element */
}

/* Apply the hover effect to the 'i' tag when the background is hovered */
.card-heart:hover i {
    transform: translateY(-2px) scale(1.15); /* Controlled growth and bounce */
    filter: drop-shadow(0 4px 10px rgba(235, 103, 83, 0.4));
}

/* Magically fill the heart to solid on hover, just like the nav link! */
.card-heart:hover .fa-heart::before {
    content: "\f004";
    font-weight: 900;
}
/* Filled state when listing is favorited */
.card-heart.faved i { color: #EB6753; }
.card-heart.faved .fa-heart::before { content: "\f004"; font-weight: 900; }
.avail-strip {
    position: absolute; bottom: 0; left: 0; right: 0;
    padding: 5px 14px; font-size: 11px; font-weight: 700; color: #fff; text-align: right; text-transform: capitalize;
}
.avail-strip.available { background: rgba(46,204,113,0.82); }
.avail-strip.unavailable, .avail-strip.booked { background: rgba(231,76,60,0.82); }

.card-content { padding: 18px 20px; flex: 1; display: flex; flex-direction: column; gap: 10px; }
.card-content h3 { font-size: 17px; font-weight: 700; color: #1a1a1a; line-height: 1.3; margin: 0; }
.card-location { display: flex; align-items: center; gap: 6px; color: #888; font-size: 13px; margin: 0; }
.card-location i { color: #EB6753; }
.card-features { display: flex; gap: 16px; margin: 0; padding: 0;}
.feature { display: flex; align-items: center; gap: 5px; font-size: 12px; color: #777; }
.feature i { color: #EB6753; font-size: 12px; }
.card-footer {
    display: flex; align-items: center; justify-content: space-between;
    margin-top: auto; padding-top: 12px; border-top: 1px solid #f5f5f5;
}
.card-price { font-size: 20px; font-weight: 800; color: #EB6753; margin: 0; }
.card-price span { font-size: 13px; font-weight: 400; color: #aaa; text-transform: lowercase; }
.details-btn {
    background: #EB6753; color: #fff; border: none;
    padding: 9px 20px; border-radius: 20px;
    font-size: 13px; font-weight: 600; cursor: pointer;
    transition: all 0.3s; font-family: 'Inter', sans-serif;
}
.details-btn:hover { transform: translateY(-2px); filter: drop-shadow(0 5px 12px rgba(235,103,83,0.4)); }
/* ───── TOAST NOTIFICATIONS ───── */
#toast-container {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none; /* Let clicks pass through */
}

.toast {
    background: rgba(26, 47, 30, 0.95); /* var(--green-dark) */
    color: white;
    padding: 12px 24px;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 500;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    display: flex;
    align-items: center;
    gap: 10px;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.toast.show {
    opacity: 1;
    transform: translateY(0);
}

.toast i { color: #EB6753; font-size: 16px; }

/* ═══════════════════════════════════════
   RESPONSIVE — TABLET (≤ 1024px)
   ═══════════════════════════════════════ */
@media (max-width: 1024px) {
    /* Detail page: stack layout */
    .detail-grid { grid-template-columns: 1fr !important; }
    .info-card { position: static !important; top: auto !important; }

    /* Listings grid */
    .listings-grid, .cards-grid, [class*="grid"] {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

/* ═══════════════════════════════════════
   RESPONSIVE — MOBILE (≤ 768px)
   ═══════════════════════════════════════ */
@media (max-width: 768px) {
    /* ── Body padding above fixed navbar ── */
    body { padding-top: 60px; }

    /* ── Cards: single column ── */
    .listings-grid, .cards-grid, [class*="grid"],
    .profile-grid { grid-template-columns: 1fr !important; }

    /* ── Property card min-width on mobile (carousel) ── */
    .property-card { min-width: 0; width: 100%; }

    /* ── Page body padding ── */
    .page-body { padding: 80px 16px 48px !important; }

    /* ── Detail page ── */
    .detail-grid { grid-template-columns: 1fr !important; gap: 20px !important; }
    .listing-title { font-size: 22px !important; }
    .gallery-main img, #mediaViewer { height: 280px !important; }
    .info-card { position: static !important; padding: 20px !important; }

    /* ── Checkout page ── */
    .checkout-layout, .checkout-grid {
        grid-template-columns: 1fr !important;
        flex-direction: column !important;
    }
    .checkout-form-col, .checkout-summary-col { width: 100% !important; }

    /* ── Profile page sidebar + content ── */
    .profile-layout { flex-direction: column !important; }
    .profile-sidebar { width: 100% !important; min-width: 0 !important; }
    .profile-content { padding: 0 !important; }

    /* ── Dashboard table: horizontal scroll ── */
    .table-wrap, .data-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
    table { min-width: 600px; }

    /* ── Booking cards ── */
    .booking-card { flex-direction: column !important; }
    .booking-thumb { width: 100% !important; height: 160px !important; object-fit: cover; border-radius: 12px 12px 0 0 !important; }
    .booking-thumb-placeholder { width: 100% !important; height: 120px !important; border-radius: 12px 12px 0 0 !important; }

    /* ── Card footer: stack price + button ── */
    .card-footer { flex-direction: column; align-items: flex-start; gap: 10px; }
    .details-btn { width: 100%; text-align: center; }

    /* ── Meta chips wrap ── */
    .meta-chips { gap: 6px; }
    .meta-chip { font-size: 12px; padding: 4px 10px; }

    /* ── Auth page ── */
    .auth-card, .auth-box { width: 100% !important; max-width: 100% !important; margin: 0 16px; }

    /* ── Stat cards in dashboard/profile ── */
    .stat-cards, .stats-row { grid-template-columns: repeat(2, 1fr) !important; }

    /* ── Toast bottom offset ── */
    #toast-container { bottom: 16px; width: calc(100% - 32px); left: 16px; transform: none; }
    ._favToastBox { right: 12px !important; bottom: 12px !important; }
}

/* ═══════════════════════════════════════
   RESPONSIVE — SMALL PHONES (≤ 480px)
   ═══════════════════════════════════════ */
@media (max-width: 480px) {
    .stat-cards, .stats-row { grid-template-columns: 1fr !important; }
    .gallery-main img, #mediaViewer { height: 220px !important; }
    .listing-title { font-size: 19px !important; }
    .section-title { font-size: 15px; }

    /* Thumbs row: show on mobile but allow full scroll */
    .thumbs-row { gap: 6px !important; }

    /* Nav: slightly smaller logo text */
    .logo-area h1 { font-size: 26px; }
}
.toast a { color: #e8a94a; text-decoration: underline; pointer-events: auto; margin-left: 5px; }

/* ═══════════════════════════════════════════════════════════
   GLOBAL RESPONSIVE IMPROVEMENTS
   ═══════════════════════════════════════════════════════════ */

/* ── Nav: fix close-button position on mobile drawer ── */
@media (max-width: 900px) {
    .menu-close {
        position: absolute !important;
        top: 18px !important;
        right: 20px !important;
    }
    .nav-wrapper {
        padding: 64px 26px 32px !important;
    }

    /* ── Listings filter bar: horizontal scroll when it can't wrap ── */
    .filter-bar {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        flex-wrap: nowrap;
        scrollbar-width: thin;
        scrollbar-color: #e0e0e0 transparent;
        padding-bottom: 6px;
    }
    .filter-bar::-webkit-scrollbar { height: 3px; }
    .filter-bar::-webkit-scrollbar-thumb { background: #ddd; border-radius: 4px; }
    .cat-toggle  { flex-shrink: 0; }
    .filter-select { min-width: 118px; flex-shrink: 0; }
    .filter-sep  { display: none; }
    .results-count { display: none; }
}

/* ── Tablet: hero search bar stacks nicely ── */
@media (max-width: 680px) {
    .hero-search {
        flex-direction: column;
        border-radius: 16px;
        padding: 14px;
        gap: 10px;
    }
    .hero-search input {
        padding: 10px 6px;
        width: 100%;
    }
    .hero-search button {
        width: 100%;
        justify-content: center;
        padding: 13px;
        border-radius: 10px;
    }
}

/* ── Small phones: better sizing across all pages ── */
@media (max-width: 480px) {
    /* Minimum 44px touch targets */
    .signin-btn, .details-btn, .cta-btn, .search-btn {
        min-height: 44px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    /* Profile sidebar nav: horizontal scroll so tabs don't wrap messily */
    .sidebar-nav {
        overflow-x: auto;
        flex-wrap: nowrap !important;
        -webkit-overflow-scrolling: touch;
        padding: 10px 12px !important;
        gap: 6px !important;
        scrollbar-width: none;
    }
    .sidebar-nav::-webkit-scrollbar { display: none; }
    .nav-item {
        white-space: nowrap;
        flex-shrink: 0 !important;
        padding: 9px 14px !important;
        font-size: 12px !important;
    }

    /* Stats row: stack single column on very small phones */
    .stats-row { grid-template-columns: 1fr !important; }

    /* Property card footer: slightly more padding on phones */
    .card-content { padding: 14px 16px; }
    .card-price   { font-size: 17px; }

    /* Section headers */
    .section-header h2 { font-size: 20px !important; }

    /* Booking card buttons full width */
    .booking-actions button,
    .booking-actions a { width: 100%; text-align: center; }

    /* Checkout: stacked summary first on tiny screens */
    .pay-card { padding: 18px !important; }
}

/* ── Promo price display ── */
.promo-original {
    display: block;
    font-size: 12px;
    color: #bbb;
    text-decoration: line-through;
    font-weight: 400;
    margin-bottom: 2px;
    letter-spacing: 0;
}
.promo-badge {
    display: inline-block;
    background: #EB6753;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 20px;
    margin-left: 5px;
    vertical-align: middle;
    letter-spacing: 0.4px;
}
.promo-new-price {
    font-size: 16px;
    font-weight: 700;
    color: #1a1a1a;
}
/* Detail page promo price */
.detail-promo-wrap { display: flex; flex-direction: column; gap: 2px; }
.detail-promo-original {
    font-size: 14px;
    color: #bbb;
    text-decoration: line-through;
    font-weight: 400;
}
.detail-promo-badge {
    display: inline-block;
    background: #EB6753;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    padding: 2px 9px;
    border-radius: 20px;
    margin-left: 8px;
    vertical-align: middle;
}

/* ── Events grid: single column on phone ── */
@media (max-width: 500px) {
    .events-grid {
        grid-template-columns: 1fr !important;
        gap: 16px !important;
    }
    .ev-card { min-width: 0; }
}