
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --purple-dark: #5038C8;
    --purple: #9810FA;
    --main: #500EAF;
    --text: #1a1a2e;
    --text-mid: #4b5563;
    --text-light: #9ca3af;
    --white: #ffffff;
    --bg: #f8f7fd;
    --bg-light: #f3f4f6;
    --border: #e5e7eb;
    --green: #22C55E;
    --shadow: 0 2px 16px rgba(0, 0, 0, 0.07);
    --shadow-md: 0 6px 32px rgba(0, 0, 0, 0.11);
    --radius: 16px;
    --radius-sm: 10px;
}

html,
body {
    height: 100%;
    font-family: 'Satoshi', sans-serif;
    color: var(--text);
    background: var(--bg);
    overflow-x: hidden;
}

a {
    text-decoration: none;
}

.mob-header {
    display: none;
}


.page-layout {
    display: flex;
    height: calc(100vh);
    /* full height minus desktop navbar */
    overflow: hidden;
}

/* ── LEFT PANEL ── */
.left-panel {
    width: 52%;
    min-width: 420px;
    max-width: 680px;
    overflow-y: auto;
    padding: 28px 28px 40px;
    background: var(--bg);
    scrollbar-width: thin;
    scrollbar-color: #d1d5db transparent;
}

.left-panel::-webkit-scrollbar {
    width: 5px;
}

.left-panel::-webkit-scrollbar-thumb {
    background: #d1d5db;
    border-radius: 6px;
}

.desktop-page-title {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 20px;
}

.back-btn {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--white);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-mid);
    flex-shrink: 0;
    margin-top: 2px;
    transition: background 0.2s;
}

.back-btn:hover {
    background: var(--bg-light);
}

.page-title {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--text);
    line-height: 1.3;
}

.page-sub {
    font-size: 0.82rem;
    color: var(--text-light);
    margin-top: 3px;
}

.right-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    height: calc(100vh - 62px);
    overflow: hidden;
}

.map-actions {
    display: flex;
    gap: 10px;
    padding: 14px 16px 12px;
    justify-content: flex-end;
    background: var(--bg);
    flex-shrink: 0;
}

.map-action-btn {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 9px 18px;
    border-radius: 22px;
    font-size: 0.84rem;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    background: var(--white);
    border: 1.5px solid var(--border);
    color: var(--text-mid);
    transition: border-color 0.2s, color 0.2s, background 0.2s;
}

.map-action-btn:hover {
    border-color: var(--purple);
    color: var(--purple);
}

.map-action-btn.purple {
    border-color: var(--purple);
    color: var(--purple);
}

.map-action-btn.purple:hover {
    background: rgba(107, 72, 232, 0.06);
}

.mobile-only {
    display: none;
}

.mobile-bottom-actions {
    display: none;
}

/* Map container */
.map-container {
    flex: 1;
    position: relative;
    overflow: hidden;
}

.map-container iframe {
    width: 100%;
    height: 100%;
    border: none;
    display: block;
}

/* Price pins */
.map-pin {
    position: absolute;
    padding: 6px 13px;
    border-radius: 20px;
    background: var(--purple);
    color: var(--white);
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 3px 12px rgba(107, 72, 232, 0.35);
    transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
    z-index: 10;
    white-space: nowrap;
    user-select: none;
}

.map-pin::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 50%;
    transform: translateX(-50%);
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 6px solid var(--purple);
    transition: border-top-color 0.2s;
}

.map-pin.active,
.map-pin:hover {
    background: var(--text);
    transform: scale(1.1) translateY(-2px);
    box-shadow: 0 5px 18px rgba(0, 0, 0, 0.22);
}

.map-pin.active::after,
.map-pin:hover::after {
    border-top-color: var(--text);
}

.map-legend {
    position: absolute;
    bottom: 14px;
    right: 14px;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(6px);
    border-radius: 10px;
    padding: 8px 12px;
    font-size: 0.74rem;
    color: var(--text-mid);
    display: flex;
    flex-direction: column;
    gap: 5px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
}

.map-legend span {
    display: flex;
    align-items: center;
    gap: 6px;
}

.legend-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--main);
    flex-shrink: 0;
}


.location-card {
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    border: 1.5px solid var(--border);
    box-shadow: var(--shadow);
    transition: box-shadow 0.25s, border-color 0.25s, transform 0.25s;
    margin-bottom: 20px;
}

.location-card.hovered,
.location-card:hover {
    box-shadow: var(--shadow-md);
    border-color: rgba(107, 72, 232, 0.3);
    transform: translateY(-2px);
}

/* Card image */
.card-img-wrap {
    position: relative;
    overflow: hidden;
}

.featured-card .card-img-wrap {
    height: 200px;
}

.small-card .card-img-wrap {
    height: 160px;
}

.card-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.35s;
}

.location-card:hover .card-img-wrap img {
    transform: scale(1.04);
}

/* Image overlay bar */
.card-img-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 30px 12px 8px;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.72) 0%, transparent 100%);
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
}

.card-img-left {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.area-loc-icon {
    color: rgba(255, 255, 255, 0.85);
    line-height: 0;
}

.area-name {
    color: var(--white);
    font-weight: 700;
    font-size: 1rem;
    line-height: 1;
}

.best-badge {
    display: flex;
    align-items: center;
    gap: 4px;
    background: var(--green);
    color: var(--white);
    font-size: 0.68rem;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 10px;
}

/* Price badge on image */
.card-price-badge {
    background: var(--white);
    border-radius: var(--radius-sm);
    padding: 6px 10px;
    text-align: center;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

.card-price-badge.small {
    padding: 5px 9px;
}

.card-price-badge .price-amt {
    display: block;
    font-size: 1rem;
    font-weight: 800;
    color: var(--purple);
    line-height: 1.1;
}

.card-price-badge.small .price-amt {
    font-size: 0.9rem;
}

.card-price-badge .price-night {
    font-size: 0.65rem;
    color: var(--text-light);
    display: block;
}

/* Hotels row inside image */
.card-hotels-row {
    position: absolute;
    bottom: 8px;
    left: 12px;
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.73rem;
    color: rgba(255, 255, 255, 0.85);
    /* push down below overlay */
    bottom: 10px;
    pointer-events: none;
}


.card-img-overlay {
    align-items: center;
    padding: 20px 12px 10px;
}

.card-hotels-row {
    position: absolute;
    left: 12px;
    bottom: 10px;
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.72rem;
    color: rgba(255, 255, 255, 0.82);
}

.card-img-wrap {
    position: relative;
}

.card-img-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 36px 12px 10px;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.68) 0%, transparent 100%);
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
}

.card-hotels-row {
    position: absolute;
    left: 12px;
    bottom: 10px;
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.72rem;
    display: flex;
    align-items: center;
    gap: 4px;
    z-index: 2;
}

/* Card body */
.card-body {
    padding: 14px 16px 16px;
}

.card-desc {
    font-size: 0.84rem;
    color: var(--text-mid);
    line-height: 1.55;
    margin-bottom: 10px;
}

/* Tags */
.card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 10px;
}

.tag {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--purple);
    background: rgba(107, 72, 232, 0.08);
    padding: 3px 10px;
    border-radius: 12px;
    border: 1px solid rgba(107, 72, 232, 0.18);
}

/* Highlights */
.card-highlights {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin-bottom: 14px;
}

.card-highlights li {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 0.82rem;
    color: var(--text-mid);
}

/* Action buttons */
.card-actions {
    display: flex;
    gap: 10px;
}

.btn-select-primary {
    display: flex;
    flex: 1;
    padding: 11px 16px;
    border-radius: 22px;
    background: linear-gradient(135deg, #500EAF, #9810FA);
    color: var(--white);
    font-size: 0.88rem;
    font-weight: 700;
    border: none;
    cursor: pointer;
    font-family: inherit;
    box-shadow: 0 4px 14px rgba(107, 72, 232, 0.3);
    transition: opacity 0.2s, transform 0.2s;
    align-items: center;
    justify-content: center;
}

.btn-select-primary:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

.btn-itinerary {
    flex: 0 0 auto;
    padding: 11px 18px;
    border-radius: 22px;
    background: transparent;
    color: var(--purple);
    font-size: 0.88rem;
    font-weight: 700;
    border: 1.5px solid var(--purple);
    cursor: pointer;
    font-family: inherit;
    transition: background 0.2s;
}

.btn-itinerary:hover {
    background: rgba(107, 72, 232, 0.06);
}

/* Small cards grid */
.small-cards-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.small-cards-grid .location-card {
    margin-bottom: 0;
}

/* Responsive Code */
@media (max-width: 768px) {

    :root {
        --mob-header-h: 74px;
        --mob-map-h: clamp(210px, 50vh, 400px);
        --mob-bottom-actions-h: 88px;
    }

    /* ── Mobile header ── */
    .mob-header {
        display: block;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        z-index: 100;
        background: linear-gradient(135deg, #ede8fb 0%, #ddd4f7 100%);
        padding: 14px 16px 14px;
        border-bottom: 1px solid rgba(107, 72, 232, 0.1);
        box-shadow: 0 2px 10px rgba(107, 72, 232, 0.08);
    }

    .mob-header-inner {
        display: flex;
        align-items: center;
        gap: 12px;
    }

    .mob-back-btn {
        width: 36px;
        height: 36px;
        border-radius: 50%;
        background: rgba(255, 255, 255, 0.7);
        border: 1px solid rgba(107, 72, 232, 0.2);
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        color: var(--text);
        flex-shrink: 0;
    }

    .mob-header-title {
        font-size: 0.97rem;
        font-weight: 600;
        color: var(--text);
        line-height: 1.2;
    }

    .mob-header-sub {
        font-size: 0.74rem;
        color: var(--text-light);
        margin-top: 2px;
    }

    /* Hide desktop-only elements */
    .desktop-page-title {
        display: none;
    }

    .desktop-only {
        display: none !important;
    }

    .page-layout {
        display: block;
        min-height: 100vh;
        overflow: visible;
    }

    .right-panel {
        width: 100%;
        position: fixed;
        top: var(--mob-header-h);
        left: 0;
        right: 0;
        height: var(--mob-map-h);
        min-height: var(--mob-map-h);
        max-height: var(--mob-map-h);
        z-index: 10;
        flex-direction: column;
        overflow: visible;
    }


    .mobile-only {
        display: none !important;
    }

    .mobile-bottom-actions {
        display: flex;
        gap: 8px;
        padding: 10px 8px calc(env(safe-area-inset-bottom, 0px) + 10px);
        background: rgba(255, 255, 255, 0.1);
        backdrop-filter: blur(12px);
        border-top: .25px solid var(--border);
        justify-content: center;
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 500;
        box-shadow: 0 -6px 24px rgba(0, 0, 0, 0.08);
        min-height: var(--mob-bottom-actions-h);
    }

    .mobile-bottom-actions .map-action-btn {
        flex: 1;
        justify-content: center;
        
        font-size: 0.8rem;
        border-radius: 22px;
    }

    .map-container {
        height: 100%;
        flex: 1;
    }

    .map-pin {
        font-size: 0.72rem;
        padding: 5px 10px;
    }


    .left-panel {
        width: 100%;
        min-width: unset;
        max-width: unset;
        position: relative;
        z-index: 40;
        margin-top: calc(var(--mob-header-h) + (var(--mob-map-h) * 0.55));
        overflow: visible;
        padding: 18px 14px calc(var(--mob-bottom-actions-h) + 28px);
        background: transparent;
        border-radius: 24px 24px 0 0;
    }

    .left-panel::before {
        content: '';
        position: absolute;
        inset: 0;
        background: var(--bg);
        border-radius: 24px 24px 0 0;
        box-shadow: 0 -8px 26px rgba(80, 14, 175, 0.08);
        z-index: -1;
    }

    .featured-card .card-img-wrap {
        height: 200px;
    }

    .small-card .card-img-wrap {
        height: 140px;
    }

    .small-cards-grid {
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }

    .small-card .card-actions {
        flex-direction: column;
        gap: 10px;
    }

    .small-card .btn-select-primary,
    .small-card .btn-itinerary {
        width: 100%;
        flex: none;
    }

    .card-body {
        padding: 12px 12px 14px;
    }

    .card-desc {
        font-size: 0.8rem;
    }

    .btn-select-primary,
    .btn-itinerary {
        font-size: 0.82rem;
        padding: 10px 12px;
    }

    body {
        overflow-x: hidden;
        overflow-y: auto;
    }
}

/* Extra small */
@media (max-width: 380px) {
    .small-cards-grid {
        grid-template-columns: 1fr;
    }

    .right-panel {
        height: var(--mob-map-h);
        min-height: var(--mob-map-h);
        max-height: var(--mob-map-h);
    }
}
