/* Custom styles for Liquid Glass design system */
:root {
    --font-outfit: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --font-inter: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

    /* Light Theme defaults */
    --bg-primary: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    --bg-solid: #f8fafc;
    --glass-bg: rgba(255, 255, 255, 0.45);
    --glass-border: rgba(255, 255, 255, 0.5);
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --accent: #6366f1;
    --accent-hover: #4f46e5;
    --accent-gradient: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    --card-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.06);
    --card-glow: rgba(99, 102, 241, 0.1);
    --success: #10b981;
    --danger: #ef4444;
}

html.theme-dark {
    /* Dark Theme */
    --bg-primary: linear-gradient(135deg, #0f172a 0%, #020617 100%);
    --bg-solid: #090d16;
    --glass-bg: rgba(15, 23, 42, 0.65);
    --glass-border: rgba(255, 255, 255, 0.08);
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --accent: #818cf8;
    --accent-hover: #6366f1;
    --accent-gradient: linear-gradient(135deg, #818cf8 0%, #a78bfa 100%);
    --card-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.4);
    --card-glow: rgba(129, 140, 248, 0.2);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease, box-shadow 0.3s ease;
}

body {
    font-family: var(--font-inter);
    background: var(--bg-primary);
    background-attachment: fixed;
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-outfit);
    font-weight: 600;
}

/* Glassmorphism utility */
.glass {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    box-shadow: var(--card-shadow);
}

/* Floating Navigation Header */
.header-glass {
    position: fixed;
    top: 1.5rem;
    left: 5%;
    right: 5%;
    height: 4.5rem;
    border-radius: 1.25rem;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2rem;
    margin: 0 auto;
    max-width: 1200px;
}

.logo {
    font-family: var(--font-outfit);
    font-size: 1.6rem;
    font-weight: 800;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-links {
    display: flex;
    gap: 2rem;
    list-style: none;
}

.nav-links a {
    color: var(--text-primary);
    text-decoration: none;
    font-family: var(--font-outfit);
    font-weight: 500;
    font-size: 1rem;
    position: relative;
    padding: 0.25rem 0;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent-gradient);
    transition: width 0.3s ease;
}

.nav-links a:hover::after {
    width: 100%;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* Theme Toggle Button */
.theme-toggle-btn {
    background: transparent;
    border: none;
    color: var(--text-primary);
    cursor: pointer;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
}

.theme-toggle-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 0 12px var(--card-glow);
}

/* Main content setup */
main {
    flex: 1;
    margin-top: 7.5rem;
    padding-bottom: 3rem;
}

/* Hero Section */
.hero {
    text-align: center;
    max-width: 800px;
    margin: 4rem auto 3rem auto;
    padding: 0 1.5rem;
}

.hero h1 {
    font-size: 3.5rem;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    letter-spacing: -0.02em;
}

.hero h1 span {
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero p {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: 2.5rem;
    line-height: 1.6;
}

/* Vertical Selector Grid */
.verticals-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 1.25rem;
    max-width: 1100px;
    margin: 0 auto 3.5rem auto;
    padding: 0 1.5rem;
}

.vertical-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1.5rem 1rem;
    border-radius: 1.25rem;
    text-decoration: none;
    color: var(--text-primary);
    text-align: center;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.3s ease, border-color 0.3s ease;
}

.vertical-card:hover {
    transform: translateY(-8px);
    border-color: var(--accent);
    box-shadow: 0 12px 24px var(--card-glow);
}

.vertical-card i {
    font-size: 2rem;
    margin-bottom: 0.75rem;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.vertical-card span {
    font-family: var(--font-outfit);
    font-weight: 600;
    font-size: 0.95rem;
}

/* Search bar on Homepage */
.search-container {
    max-width: 700px;
    margin: 0 auto 4rem auto;
    padding: 0 1.5rem;
}

.search-bar {
    display: flex;
    border-radius: 1.5rem;
    padding: 0.5rem;
    gap: 0.5rem;
}

.search-input-wrapper {
    flex: 1;
    display: flex;
    align-items: center;
    padding-left: 1rem;
    gap: 0.5rem;
}

.search-input-wrapper i {
    color: var(--text-secondary);
}

.search-bar input {
    width: 100%;
    background: transparent;
    border: none;
    outline: none;
    font-size: 1.1rem;
    color: var(--text-primary);
    font-family: var(--font-inter);
}

.search-bar button {
    background: var(--accent-gradient);
    border: none;
    color: white;
    font-family: var(--font-outfit);
    font-weight: 600;
    font-size: 1rem;
    padding: 0.75rem 2rem;
    border-radius: 1.1rem;
    cursor: pointer;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.search-bar button:hover {
    transform: scale(1.02);
    opacity: 0.95;
}

/* Section Title */
.section-title {
    max-width: 1200px;
    margin: 0 auto 2rem auto;
    padding: 0 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.section-title h2 {
    font-size: 2rem;
}

/* Listings Grid */
.listings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Product Card */
.listing-card {
    border-radius: 1.5rem;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: var(--text-primary);
    position: relative;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.3s ease;
}

.listing-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 15px 30px var(--card-glow);
}

.listing-img-wrapper {
    position: relative;
    height: 180px;
    background: #e2e8f0;
}

.listing-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.vertical-badge {
    position: absolute;
    top: 1rem;
    left: 1rem;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(8px);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 50px;
    font-size: 0.75rem;
    font-family: var(--font-outfit);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
}

.listing-price-badge {
    position: absolute;
    bottom: 1rem;
    right: 1rem;
    background: var(--accent-gradient);
    color: white;
    padding: 0.4rem 0.8rem;
    border-radius: 0.75rem;
    font-family: var(--font-outfit);
    font-weight: 700;
    font-size: 1rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.listing-info {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.listing-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin-bottom: 0.5rem;
}

.listing-title {
    font-size: 1.2rem;
    line-height: 1.4;
    margin-bottom: 0.75rem;
    font-weight: 600;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.listing-specs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1rem;
    margin-top: auto;
    padding-top: 1rem;
    border-top: 1px solid var(--glass-border);
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.listing-specs span {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

/* Split-screen Catalog Layout */
.catalog-split {
    display: grid;
    grid-template-columns: 350px 1fr;
    height: calc(100vh - 7.5rem);
    position: relative;
    max-width: 100vw;
    overflow: hidden;
}

.catalog-sidebar {
    padding: 1.5rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    border-right: 1px solid var(--glass-border);
}

.filter-section {
    padding: 1.25rem;
    border-radius: 1rem;
}

.filter-title {
    font-size: 1.1rem;
    margin-bottom: 1rem;
    font-family: var(--font-outfit);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
}

.filter-group label {
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.filter-group input[type="text"],
.filter-group select {
    width: 100%;
    padding: 0.6rem 0.8rem;
    border-radius: 0.75rem;
    border: 1px solid var(--glass-border);
    background: var(--glass-bg);
    color: var(--text-primary);
    outline: none;
}

.price-range {
    display: flex;
    gap: 0.5rem;
}

.price-range input {
    width: 50%;
    padding: 0.6rem 0.8rem;
    border-radius: 0.75rem;
    border: 1px solid var(--glass-border);
    background: var(--glass-bg);
    color: var(--text-primary);
    outline: none;
}

/* Catalog listings list in sidebar */
.catalog-main {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.catalog-toolbar {
    padding: 1rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--glass-border);
}

.catalog-results-split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    height: calc(100% - 4.5rem);
    overflow: hidden;
}

.catalog-list-pane {
    padding: 2rem;
    overflow-y: auto;
    height: 100%;
}

.catalog-map-pane {
    height: 100%;
    position: relative;
    border-left: 1px solid var(--glass-border);
}

#map {
    width: 100%;
    height: 100%;
    z-index: 1;
}

/* Map price marker */
.map-price-marker {
    background: var(--accent-gradient);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 0.5rem;
    font-weight: bold;
    font-size: 0.85rem;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.25);
    white-space: nowrap;
    border: 1px solid rgba(255, 255, 255, 0.3);
    text-align: center;
}

/* Details Page */
.detail-container {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 1.5rem;
    display: grid;
    grid-template-columns: 7fr 4fr;
    gap: 2rem;
}

.detail-main {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.detail-sidebar {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.gallery-container {
    border-radius: 1.5rem;
    overflow: hidden;
    height: 450px;
    position: relative;
}

.gallery-main-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gallery-thumbs {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.5rem;
    overflow-x: auto;
}

.gallery-thumb {
    width: 80px;
    height: 60px;
    border-radius: 0.5rem;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
}

.gallery-thumb.active {
    border-color: var(--accent);
}

.gallery-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.detail-card {
    padding: 2rem;
    border-radius: 1.5rem;
}

.detail-header {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.detail-header h1 {
    font-size: 2.2rem;
}

.detail-specs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1.5rem;
}

.spec-item {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.spec-item i {
    font-size: 1.5rem;
    color: var(--accent);
    width: 2.5rem;
    height: 2.5rem;
    background: var(--card-glow);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.spec-val {
    font-family: var(--font-outfit);
    font-weight: 600;
    font-size: 1.1rem;
}

.spec-lbl {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* Booking Widget */
.booking-widget {
    padding: 2rem;
    border-radius: 1.5rem;
    position: sticky;
    top: 7.5rem;
}

.booking-price {
    font-size: 2rem;
    font-weight: 800;
    font-family: var(--font-outfit);
    margin-bottom: 1.5rem;
}

.booking-price span {
    font-size: 1rem;
    color: var(--text-secondary);
    font-weight: normal;
}

.btn-book {
    width: 100%;
    padding: 1rem;
    background: var(--accent-gradient);
    border: none;
    border-radius: 1rem;
    color: white;
    font-family: var(--font-outfit);
    font-weight: 700;
    font-size: 1.1rem;
    cursor: pointer;
    box-shadow: 0 4px 15px var(--card-glow);
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.btn-book:hover {
    transform: scale(1.02);
    opacity: 0.95;
}

/* Blog / Articles */
.blog-container {
    max-width: 1000px;
    margin: 2rem auto;
    padding: 0 1.5rem;
}

.blog-post {
    padding: 3rem;
    border-radius: 2rem;
    line-height: 1.8;
}

.blog-post h1 {
    font-size: 3rem;
    margin-bottom: 1.5rem;
}

.blog-meta {
    color: var(--text-secondary);
    margin-bottom: 2.5rem;
}

.blog-content p {
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
}

/* Footer style */
footer {
    padding: 3rem 0;
    border-top: 1px solid var(--glass-border);
    margin-top: auto;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.footer-links {
    display: flex;
    gap: 1.5rem;
}

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
}

.footer-links a:hover {
    color: var(--text-primary);
}

/* Leaflet Popup style overrides for glass integration */
.leaflet-popup-content-wrapper {
    background: var(--bg-solid) !important;
    color: var(--text-primary) !important;
    border-radius: 1rem !important;
    border: 1px solid var(--glass-border) !important;
    font-family: var(--font-inter) !important;
}
.leaflet-popup-tip {
    background: var(--bg-solid) !important;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: var(--glass-border);
    border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--accent);
}

/* Responsive adjustment */
@media (max-width: 900px) {
    .catalog-split {
        grid-template-columns: 1fr;
        height: auto;
        overflow: visible;
    }
    .catalog-sidebar {
        border-right: none;
        border-bottom: 1px solid var(--glass-border);
    }
    .catalog-results-split {
        grid-template-columns: 1fr;
        height: auto;
    }
    .catalog-map-pane {
        height: 400px;
        border-left: none;
        border-top: 1px solid var(--glass-border);
    }
    .detail-container {
        grid-template-columns: 1fr;
    }
    .hero h1 {
        font-size: 2.5rem;
    }
    .header-glass {
        padding: 0 1rem;
    }
    .nav-links {
        display: none;
    }
}
