:root {
    /* Airbnb Signature Palette */
    --primary: #FF385C;
    --primary-dark: #BD1E59;
    --text-main: #222222;
    --text-muted: #717171;
    --text-light: #B0B0B0;
    --bg-white: #ffffff;
    --bg-light: #F7F7F7;
    --border-light: #DDDDDD;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.08), 0 4px 12px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 6px 16px rgba(0, 0, 0, 0.12);
    --shadow-lg: 0 12px 24px rgba(0, 0, 0, 0.15);

    /* Layout Tokens */
    --header-height: 80px;
    --cat-nav-height: 98px;
    --container-max: 1600px;
    --transition-base: all 0.25s cubic-bezier(0.2, 0, 0, 1);
}

/* Base Reset & Typography */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    color: var(--text-main);
    background-color: var(--bg-white);
    line-height: 1.4;
    overflow-x: hidden;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: #EBEBEB;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: #DDDDDD;
}

.container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 80px;
}

@media (max-width: 1128px) {
    .container {
        padding: 0 40px;
    }
}

@media (max-width: 744px) {
    .container {
        padding: 0 24px;
    }
}

/* Header - Airbnb Modern Navigation */
header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: white;
    transition: var(--transition-base);
}

.nav-top {
    height: var(--header-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: white;
    position: relative;
    z-index: 1001;
}

.logo {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--primary);
    font-size: 1.6rem;
    font-weight: 800;
    text-decoration: none;
    flex: 1;
}

.logo i {
    font-size: 2rem;
}

.logo span {
    font-family: 'Outfit', sans-serif;
    letter-spacing: -0.5px;
}

/* Expanded/Compact Search Bar Logic */
.search-wrapper {
    flex: 2;
    display: flex;
    justify-content: center;
}

.search-bar-mini {
    display: flex;
    align-items: center;
    padding: 8px 8px 8px 24px;
    border: 1px solid var(--border-light);
    border-radius: 40px;
    box-shadow: var(--shadow-sm);
    cursor: pointer;
    transition: var(--transition-base);
    font-size: 0.9rem;
    background: white;
    user-select: none;
}

.search-bar-mini:hover {
    box-shadow: var(--shadow-md);
}

.search-bar-mini .divider {
    height: 24px;
    width: 1px;
    background: var(--border-light);
    margin: 0 16px;
}

.search-bar-mini .search-term {
    font-weight: 600;
}

.search-bar-mini .search-placeholder {
    color: var(--text-muted);
    padding: 0 8px;
}

.search-icon-circle {
    background: var(--primary);
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.user-nav {
    display: flex;
    align-items: center;
    gap: 8px;
    justify-content: flex-end;
    flex: 1;
}

.host-link {
    font-size: 0.9rem;
    font-weight: 600;
    padding: 12px 16px;
    border-radius: 24px;
    text-decoration: none;
    color: var(--text-main);
    transition: var(--transition-base);
}

.host-link:hover {
    background: #f7f7f7;
}

.globe-btn {
    padding: 12px;
    border-radius: 50%;
    cursor: pointer;
    transition: var(--transition-base);
}

.globe-btn:hover {
    background: #f7f7f7;
}

.user-menu-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 5px 5px 5px 12px;
    border: 1px solid var(--border-light);
    border-radius: 40px;
    cursor: pointer;
    transition: var(--transition-base);
}

.user-menu-btn:hover {
    box-shadow: var(--shadow-md);
}

.user-avatar {
    background: #717171;
    color: white;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    font-size: 0.8rem;
}

/* Category Filter Slider */
.categories-container {
    background: white;
    border-top: 1px solid #f1f1f1;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
}

.categories-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    /* Centering the icon menu */
    gap: 32px;
    padding: 12px 0 12px;
    overflow-x: auto;
    scrollbar-width: none;
    scroll-behavior: smooth;
}

.categories-nav::-webkit-scrollbar {
    display: none;
}

.cat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: var(--text-muted);
    cursor: pointer;
    min-width: fit-content;
    padding-bottom: 12px;
    border-bottom: 2px solid transparent;
    transition: var(--transition-base);
    opacity: 0.7;
}

.cat-item i {
    font-size: 1.5rem;
}

.cat-item span {
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
}

.cat-item:hover {
    color: var(--text-main);
    border-bottom-color: #DDDDDD;
    opacity: 1;
}

.cat-item.active {
    color: var(--text-main);
    border-bottom-color: var(--text-main);
    opacity: 1;
}

/* Listing Feed Grid */
.main-feed {
    padding-top: 24px;
    padding-bottom: 80px;
}

.listings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    /* Reduced min-width to make images smaller */
    column-gap: 24px;
    row-gap: 40px;
}

@media (min-width: 1640px) {
    .listings-grid {
        grid-template-columns: repeat(6, 1fr);
    }
}

@media (max-width: 1128px) {
    .listings-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 950px) {
    .listings-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 550px) {
    .listings-grid {
        grid-template-columns: 1fr;
    }
}

/* Listing Card Styles */
.listing-card {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
    position: relative;
    animation: revealCard 0.6s ease backwards;
}

@keyframes revealCard {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.image-shimmer {
    background: #ebebeb;
    border-radius: 20px;
    /* Increased for more rounded/oval corners */
    aspect-ratio: 1/0.95;
    position: relative;
    overflow: hidden;
}

.listing-image-container {
    position: absolute;
    inset: 0;
    border-radius: 20px;
    /* Matching the shimmer radius */
    overflow: hidden;
    z-index: 1;
}

.listing-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s cubic-bezier(0.2, 0, 0, 1);
}

.listing-card:hover .listing-image {
    transform: scale(1.05);
}

.heart-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    background: none;
    border: none;
    color: rgba(0, 0, 0, 0.5);
    -webkit-text-stroke: 2px white;
    font-size: 1.5rem;
    cursor: pointer;
    transition: var(--transition-base);
    z-index: 5;
}

.heart-btn:hover {
    transform: scale(1.1);
}

.heart-btn.active {
    color: var(--primary);
    -webkit-text-stroke: 0;
}

.listing-content {
    margin-top: 12px;
}

.listing-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.listing-title {
    font-weight: 700;
    font-size: 1rem;
    margin-bottom: 2px;
}

.listing-rating {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.9rem;
}

.listing-rating i {
    font-size: 0.75rem;
}

.listing-subtext {
    color: var(--text-muted);
    font-size: 0.95rem;
    display: flex;
    flex-direction: column;
}

.listing-price {
    margin-top: 6px;
    font-size: 1rem;
}

.price-num {
    font-weight: 700;
}

/* Sticky Map Button */
.floating-map-wrap {
    position: fixed;
    bottom: 48px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 500;
}

.map-btn {
    background: #222222;
    color: white;
    padding: 14px 24px;
    border-radius: 30px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
    cursor: pointer;
    transition: transform 0.2s cubic-bezier(0.2, 0, 0, 1);
    border: none;
}

.map-btn:hover {
    transform: scale(1.04);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

/* Skeletal Loading Mockup Utilities */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #f7f7f7 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
}

@keyframes skeleton-loading {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

/* Footer Refined */
.site-footer {
    background: var(--bg-light);
    border-top: 1px solid var(--border-light);
    padding: 48px 0 24px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
    padding-bottom: 48px;
}

@media (max-width: 744px) {
    .footer-grid {
        grid-template-columns: 1fr;
    }
}

.footer-section h6 {
    font-size: 0.9rem;
    font-weight: 700;
    margin-bottom: 16px;
    text-transform: capitalize;
}

.footer-section ul {
    list-style: none;
}

.footer-section li {
    margin-bottom: 12px;
}

.footer-section a {
    color: var(--text-main);
    font-size: 0.9rem;
    text-decoration: none;
    transition: var(--transition-base);
}

.footer-section a:hover {
    text-decoration: underline;
}

.footer-bar {
    border-top: 1px solid var(--border-light);
    padding-top: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
}

.footer-legal-links {
    display: flex;
    gap: 12px;
}

.footer-social-links {
    display: flex;
    gap: 16px;
    font-size: 1.1rem;
}

/* Responsive Adjustments */
@media (max-width: 950px) {
    .search-wrapper {
        display: none;
    }

    .nav-top {
        justify-content: space-between;
    }
}