/* ============================================================
   explore.css — Explore Page (mindtrip-style split layout)
   Brand: #1B3A5C   Accent: #E05A2B   Dark-mode first
   ============================================================ */

/* ── Split layout ────────────────────────────────────────────────────── */

.explore-layout {
    display: flex;
    height: calc(100vh - 64px);       /* subtract mobile bottom nav */
    overflow: hidden;
}

@media (min-width: 768px) {
    .explore-layout { height: 100vh; }
}

.explore-left {
    position: relative;
    flex: 1;
    min-width: 0;
    overflow-y: auto;
    overflow-x: hidden;
    padding-bottom: 80px;             /* clearance for mobile nav */
    /* hide scrollbar on all browsers */
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.explore-left::-webkit-scrollbar { display: none; }

/* On mobile, hide the left panel when map is visible */
@media (max-width: 1023px) {
    .explore-left.map-active { display: none; }
}

.explore-right {
    display: none;                    /* hidden on mobile by default */
    position: relative;
    width: 45%;
    min-width: 380px;
    flex-shrink: 0;
}

.explore-right.visible {
    display: block;
}

@media (min-width: 1024px) {
    .explore-right {
        display: block;               /* always show on desktop */
    }
}

.explore-map {
    width: 100%;
    height: 100%;
    background: #1a1f2e;
}

/* Mobile: map takes full screen as overlay */
@media (max-width: 1023px) {
    .explore-right.visible {
        position: fixed;
        inset: 0;
        width: 100%;
        z-index: 36;
    }
}

/* ── Map toggle (mobile) ─────────────────────────────────────────────── */

.map-toggle-btn {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    position: fixed;
    bottom: 80px;
    right: 1rem;
    z-index: 37;                      /* above map overlay */
    background: #1B3A5C;
    color: #fff;
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 9999px;
    padding: 0.5rem 0.875rem;
    font-size: 0.8125rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0,0,0,0.4);
    transition: transform 0.15s ease, background 0.15s ease;
}

.map-toggle-btn:hover { transform: scale(1.05); background: #254d7a; }

@media (min-width: 1024px) {
    .map-toggle-btn { display: none; } /* map always visible on desktop */
}

/* ── Map collapse button ─────────────────────────────────────────────── */

.map-collapse-btn {
    position: absolute;
    top: 0.75rem;
    left: 0.75rem;
    z-index: 5;
    width: 2rem;
    height: 2rem;
    border-radius: 0.5rem;
    background: #fff;
    border: 1px solid rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #333;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

.explore-this-area-btn {
    position: absolute;
    top: 1.25rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 20;
    padding: 0.625rem 1.25rem;
    background: #1e2535;
    color: #fff;
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 10px 25px rgba(0,0,0,0.5);
    white-space: nowrap;
    transition: background 0.15s ease, transform 0.15s ease, opacity 0.2s ease;
}

.explore-this-area-btn:hover {
    background: #2a3449;
    transform: translateX(-50%) translateY(-2px);
    border-color: rgba(255,255,255,0.4);
}

.explore-this-area-btn:active {
    transform: translateX(-50%) translateY(0);
}

.explore-this-area-btn.hidden {
    display: none;
    opacity: 0;
    pointer-events: none;
}

@media (max-width: 1023px) {
    .map-collapse-btn { display: none; }
}

/* ── City header ─────────────────────────────────────────────────────── */

.city-header {
    padding: 0.875rem 1rem 0;
}

.city-picker-btn {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
}

.city-name {
    font-size: 1.375rem;
    font-weight: 800;
    color: #fff;
}

.chevron-icon {
    color: rgba(255,255,255,0.5);
    transition: transform 0.2s ease;
}

.city-picker-btn[aria-expanded="true"] .chevron-icon {
    transform: rotate(180deg);
}

/* ── City picker dropdown ────────────────────────────────────────────── */

.city-picker-dropdown {
    position: absolute;
    top: 100%;
    margin-top: 0.25rem;
    left: 0.5rem;
    right: 0.5rem;
    max-width: 420px;
    z-index: 25;
    background: #1e2535;
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 1rem;
    padding: 0.75rem;
    box-shadow: 0 16px 48px rgba(0,0,0,0.6);
}

.city-picker-search-wrap {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.city-picker-search {
    flex: 1;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 9999px;
    padding: 0.5rem 0.875rem;
    color: #fff;
    font-size: 0.875rem;
    outline: none;
}

.city-picker-search:focus {
    border-color: #E05A2B;
}

.city-picker-close {
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.06);
    border: none;
    border-radius: 9999px;
    color: rgba(255,255,255,0.6);
    cursor: pointer;
}

.location-option {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
    padding: 0.625rem 0.5rem;
    background: none;
    border: none;
    border-radius: 0.5rem;
    color: rgba(255,255,255,0.8);
    font-size: 0.875rem;
    cursor: pointer;
    text-align: left;
    transition: background 0.12s ease;
}

.location-option:hover { background: rgba(255,255,255,0.06); }

.loc-icon { flex-shrink: 0; color: rgba(255,255,255,0.5); }

.recent-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: rgba(255,255,255,0.35);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.5rem 0.5rem 0.25rem;
}

.recent-list, .city-search-results {
    display: flex;
    flex-direction: column;
}

.recent-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: background 0.12s ease;
}

.recent-item:hover { background: rgba(255,255,255,0.06); }

.recent-thumb {
    width: 3rem;
    height: 3rem;
    border-radius: 0.5rem;
    object-fit: cover;
    background: rgba(255,255,255,0.06);
    flex-shrink: 0;
}

.recent-info { min-width: 0; }

.recent-city {
    font-size: 0.875rem;
    font-weight: 600;
    color: #fff;
}

.recent-region {
    font-size: 0.75rem;
    color: rgba(255,255,255,0.45);
}

/* ── Search bar ──────────────────────────────────────────────────────── */

.explore-search-bar {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
}

.search-input-wrap {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 9999px;
    padding: 0.5rem 0.875rem;
    transition: border-color 0.15s ease;
}

.search-input-wrap:focus-within {
    border-color: rgba(255,255,255,0.3);
}

.search-icon { flex-shrink: 0; color: rgba(255,255,255,0.4); }

.explore-search-input {
    flex: 1;
    background: none;
    border: none;
    color: #fff;
    font-size: 0.875rem;
    outline: none;
}

.explore-search-input::placeholder { color: rgba(255,255,255,0.35); }

.search-clear-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    color: rgba(255,255,255,0.4);
    cursor: pointer;
    padding: 0;
}

/* Compound selector — same specificity tie-break issue as .filter-bar. */
.search-clear-btn.hidden { display: none; }

.filters-btn {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    background: none;
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 9999px;
    padding: 0.5rem 0.875rem;
    color: rgba(255,255,255,0.6);
    font-size: 0.8125rem;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
    transition: border-color 0.15s ease, color 0.15s ease;
}

.filters-btn:hover {
    border-color: rgba(255,255,255,0.3);
    color: #fff;
}

/* ── Search dropdown ─────────────────────────────────────────────────── */

.search-dropdown {
    position: absolute;
    top: 100%;
    margin-top: 0.25rem;
    left: 1rem;
    right: 1rem;
    max-width: 600px;
    z-index: 25;
    background: #1e2535;
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 1rem;
    padding: 0.5rem;
    box-shadow: 0 16px 48px rgba(0,0,0,0.6);
    max-height: 400px;
    overflow-y: auto;
}

.search-result-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.625rem 0.5rem;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: background 0.12s ease;
}

.search-result-item:hover,
.search-result-item:focus { background: rgba(255,255,255,0.06); }

.search-result-thumb {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 0.375rem;
    object-fit: cover;
    background: rgba(255,255,255,0.06);
    flex-shrink: 0;
}

.search-result-icon {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 0.375rem;
    background: rgba(255,255,255,0.06);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: rgba(255,255,255,0.4);
}

.search-result-info { flex: 1; min-width: 0; }

.search-result-name {
    font-size: 0.875rem;
    font-weight: 600;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.search-result-sub {
    font-size: 0.75rem;
    color: rgba(255,255,255,0.45);
}

.search-result-dist {
    font-size: 0.75rem;
    color: rgba(255,255,255,0.35);
    white-space: nowrap;
}

/* ── Filter bar ──────────────────────────────────────────────────────── */

.filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    padding: 0.625rem 1rem;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}

/* Compound selector needed: `.filter-bar` and Tailwind's `.hidden` have
   the same (0,1,0) specificity, and explore.css loads later so
   `display: flex` wins, leaving the toggle inoperative. */
.filter-bar.hidden { display: none; }

.filter-group { display: flex; align-items: center; gap: 0.5rem; }
.filter-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: rgba(255,255,255,0.4);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.filter-chips { display: flex; gap: 0.25rem; }

.f-chip {
    padding: 0.25rem 0.625rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
    border: 1px solid rgba(255,255,255,0.12);
    background: transparent;
    color: rgba(255,255,255,0.55);
    cursor: pointer;
    transition: all 0.12s ease;
}

.f-chip:hover { border-color: rgba(255,255,255,0.3); color: #fff; }
.f-chip.active {
    background: #E05A2B;
    border-color: #E05A2B;
    color: #fff;
}

/* ── Category chip row ───────────────────────────────────────────────── */

.category-chips {
    display: flex;
    gap: 0.375rem;
    overflow-x: auto;
    padding: 0.5rem 1rem;
    scrollbar-width: none;
    -ms-overflow-style: none;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}

.category-chips::-webkit-scrollbar { display: none; }

.cat-chip {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 0.375rem 0.875rem;
    border-radius: 9999px;
    font-size: 0.8125rem;
    font-weight: 500;
    border: 1px solid rgba(255,255,255,0.12);
    color: rgba(255,255,255,0.55);
    background: transparent;
    cursor: pointer;
    white-space: nowrap;
    min-height: 34px;
    transition: all 0.12s ease;
    line-height: 1;
}

.cat-chip.active,
.cat-chip[aria-selected="true"] {
    background: #0d1117;
    border-color: rgba(255,255,255,0.7);
    color: #fff;
}

.cat-chip:hover:not(.active) {
    border-color: rgba(255,255,255,0.3);
    color: rgba(255,255,255,0.9);
}

.cat-chip:focus-visible { outline: 2px solid #E05A2B; outline-offset: 2px; }

/* ── Section headers ─────────────────────────────────────────────────── */

.explore-section {
    padding: 1rem 1rem 0.5rem;
}

.section-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 0.75rem;
}

.section-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: #fff;
    margin: 0;
}

.see-more-btn {
    background: none;
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 9999px;
    padding: 0.25rem 0.75rem;
    font-size: 0.75rem;
    color: rgba(255,255,255,0.5);
    cursor: pointer;
    transition: all 0.12s ease;
    white-space: nowrap;
    flex-shrink: 0;
}

.see-more-btn:hover { border-color: rgba(255,255,255,0.3); color: #fff; }

/* ── Card row wrapper (holds row + scroll arrow buttons) ── */

.explore-scroll-outer {
    position: relative;
}

/* ── Scroll arrow buttons ─────────────────────────────── */

.explore-scroll-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,0.15);
    background: #1a2233;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(0,0,0,0.4);
    transition: background 0.15s, transform 0.15s, box-shadow 0.15s;
    -webkit-tap-highlight-color: transparent;
    padding: 0;
}

.explore-scroll-arrow:hover {
    background: #253047;
    transform: translateY(-50%) scale(1.08);
    box-shadow: 0 4px 16px rgba(0,0,0,0.5);
}

.explore-scroll-arrow-prev { left: -10px; }
.explore-scroll-arrow-next { right: -10px; }

/* Hide arrows on mobile — touch scroll is natural there */
@media (max-width: 767px) {
    .explore-scroll-arrow { display: none !important; }
}

/* ── Card row (horizontal scroll per section on desktop, vertical on mobile) ── */

.card-row {
    display: flex;
    gap: 0.75rem;
    overflow-x: auto;
    padding-bottom: 0.75rem;
    scrollbar-width: none;
    -ms-overflow-style: none;
    scroll-snap-type: x mandatory;
}

.card-row::-webkit-scrollbar { display: none; }

/* Spacer at end so the last card is never clipped */
.card-row::after {
    content: '';
    display: block;
    min-width: 0.5rem;
    flex-shrink: 0;
}

/* On mobile: vertical 2-column grid instead of horizontal scroll */
@media (max-width: 767px) {
    .card-row {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        overflow-x: unset;
        overflow-y: visible;
        scroll-snap-type: none;
        padding-bottom: 0;
    }
    .card-row::after { display: none; }
}

/* ── Place card ──────────────────────────────────────────────────────── */

.place-card {
    flex-shrink: 0;
    width: 200px;
    border-radius: 0.75rem;
    overflow: hidden;
    background: rgba(255,255,255,0.03);
    cursor: pointer;
    scroll-snap-align: start;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    border: 1px solid transparent;
    display: block;
    text-decoration: none;
    color: inherit;
}

.place-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.4);
}

/* Highlighted state (from map hover) */
.place-card.map-highlighted {
    border-color: #E05A2B;
    box-shadow: 0 0 0 2px rgba(224,90,43,0.4);
}

.place-card:focus-within { outline: 2px solid #E05A2B; outline-offset: 0; border-radius: 0.75rem; }

@media (min-width: 640px) { .place-card { width: 220px; } }

/* On mobile grid mode: full width */
@media (max-width: 767px) {
    .place-card { width: 100%; }
}

/* Card image area */
.card-img-wrap {
    position: relative;
    width: 100%;
    aspect-ratio: 4/3;
    overflow: hidden;
    background: rgba(255,255,255,0.04);
}

.card-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.card-img-wrap img.loaded { opacity: 1; }

/* LCP: skip fade-in for the very first card image — eliminates ~300ms render delay */
.explore-section:first-child .card-row [role="listitem"]:first-child .card-img-wrap img {
    opacity: 1;
    transition: none;
}

/* BlurHash canvas */
.card-blurhash {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    transition: opacity 0.4s ease;
}
.card-blurhash.faded { opacity: 0; pointer-events: none; }

/* Carousel dots */
.carousel-dots {
    position: absolute;
    bottom: 0.375rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 0.25rem;
}

.carousel-dot {
    width: 5px;
    height: 5px;
    border-radius: 9999px;
    background: rgba(255,255,255,0.4);
    border: none;
    padding: 0;
    cursor: pointer;
    transition: background 0.15s ease, width 0.15s ease;
}

.carousel-dot.active {
    background: #fff;
    width: 12px;
}

/* Carousel nav arrows */
.carousel-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 1.75rem;
    height: 1.75rem;
    border-radius: 9999px;
    background: rgba(0,0,0,0.55);
    border: 1px solid rgba(255,255,255,0.2);
    color: #fff;
    display: none;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 2;
    font-size: 1rem;
    line-height: 1;
    transition: background 0.12s ease;
}

.place-card:hover .carousel-arrow { display: flex; }
.carousel-arrow:hover { background: rgba(0,0,0,0.8); }
.carousel-arrow.prev { left: 0.375rem; }
.carousel-arrow.next { right: 0.375rem; }

/* Save + add buttons on card */
.card-actions {
    position: absolute;
    top: 0.375rem;
    right: 0.375rem;
    display: flex;
    gap: 0.25rem;
    z-index: 2;
}

.card-action-btn {
    width: 1.75rem;
    height: 1.75rem;
    border-radius: 9999px;
    background: rgba(255,255,255,0.85);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.12s ease, transform 0.12s ease;
    color: #333;
}

.card-action-btn:hover { background: #fff; transform: scale(1.1); }
.card-action-btn.saved svg { fill: #E05A2B; stroke: #E05A2B; color: #E05A2B; }
.card-action-btn:focus-visible { outline: 2px solid #E05A2B; outline-offset: 2px; }

/* Info button on card image */
.card-info-btn {
    position: absolute;
    bottom: 0.375rem;
    right: 0.375rem;
    width: 1.5rem;
    height: 1.5rem;
    border-radius: 9999px;
    background: rgba(0,0,0,0.55);
    border: 1px solid rgba(255,255,255,0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: rgba(255,255,255,0.85);
    font-size: 0.6875rem;
    font-weight: 700;
    z-index: 2;
    transition: background 0.12s ease;
}

.card-info-btn:hover { background: rgba(0,0,0,0.8); }

/* Attribution tooltip */
.attribution-tooltip {
    position: absolute;
    bottom: calc(100% + 0.375rem);
    right: 0;
    background: rgba(0,0,0,0.85);
    color: rgba(255,255,255,0.85);
    font-size: 0.6875rem;
    padding: 0.375rem 0.5rem;
    border-radius: 0.375rem;
    white-space: nowrap;
    max-width: 180px;
    white-space: normal;
    z-index: 10;
    pointer-events: auto; /* enable link clicks inside tooltip */
    line-height: 1.35;
    box-shadow: 0 4px 12px rgba(0,0,0,0.5);
}

.attribution-link {
    color: rgba(255,255,255,0.9);
    text-decoration: underline;
}

.attribution-link:hover {
    color: #fff;
}

/* Card body */
.card-body {
    padding: 0.5rem 0.375rem 0.625rem;
}

.card-top-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.25rem;
}

.card-name {
    font-size: 0.8125rem;
    font-weight: 600;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin: 0;
    flex: 1;
    min-width: 0;
}

.card-rating {
    display: flex;
    align-items: center;
    gap: 0.125rem;
    font-size: 0.75rem;
    color: rgba(255,255,255,0.7);
    white-space: nowrap;
}

.card-rating svg { width: 12px; height: 12px; }

.card-meta {
    font-size: 0.6875rem;
    color: rgba(255,255,255,0.4);
    margin-top: 0.125rem;
}

.card-location {
    font-size: 0.6875rem;
    color: rgba(255,255,255,0.35);
}

.card-distance {
    font-size: 0.6875rem;
    color: rgba(255,255,255,0.3);
}

/* ── Skeleton card ───────────────────────────────────────────────────── */

.place-card.skeleton { pointer-events: none; }

.skeleton-img {
    width: 100%;
    aspect-ratio: 4/3;
    background: rgba(255,255,255,0.06);
    animation: sk-pulse 1.4s ease-in-out infinite;
}

.skeleton-line {
    height: 0.75rem;
    border-radius: 0.25rem;
    background: rgba(255,255,255,0.05);
    margin: 0.375rem 0.375rem 0;
    animation: sk-pulse 1.4s ease-in-out infinite;
}

.skeleton-line.w60 { width: 60%; }
.skeleton-line.w40 { width: 40%; }
.skeleton-line.w30 { width: 30%; margin-bottom: 0.375rem; }

@keyframes sk-pulse {
    0%, 100% { opacity: 1; }
    50%      { opacity: 0.3; }
}

/* ── Expanded section (See More view) ────────────────────────────────── */

.expanded-section-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1rem 0.5rem;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    position: sticky;
    top: 0;
    background: #0d1117;
    z-index: 5;
}

.expanded-back-btn {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    background: none;
    border: none;
    color: rgba(255,255,255,0.55);
    font-size: 0.8125rem;
    cursor: pointer;
    padding: 0.375rem 0;
    transition: color 0.12s ease;
    white-space: nowrap;
}

.expanded-back-btn:hover { color: #fff; }

.expanded-section-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: #fff;
    margin: 0;
    flex: 1;
}

.expanded-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
    padding: 0.875rem 1rem;
}

@media (min-width: 640px) {
    .expanded-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (min-width: 1024px) {
    .expanded-grid { grid-template-columns: repeat(4, 1fr); }
}

/* Cards inside expanded grid take full column width */
.expanded-grid .place-card {
    width: 100%;
    flex-shrink: unset;
}

.expanded-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    color: rgba(255,255,255,0.4);
    font-size: 0.875rem;
    gap: 0.5rem;
}

/* Compound selector to beat the bare `.expanded-loading { display: flex }`
   rule — same specificity (0,1,0) means the later declaration wins, and
   Tailwind's `.hidden` is loaded first, so a single-class selector
   wouldn't actually hide the spinner. */
.expanded-loading.hidden { display: none; }

.expanded-end-msg {
    text-align: center;
    padding: 1.5rem;
    color: rgba(255,255,255,0.3);
    font-size: 0.8125rem;
}

.expanded-end-msg.hidden { display: none; }

.expand-spinner {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255,255,255,0.2);
    border-top-color: #E05A2B;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ── Map info popup (Google Maps InfoWindow override) ────────────────── */

.gm-style .gm-style-iw-c {
    padding: 0 !important;
    border-radius: 16px !important;
    overflow: hidden !important;
    background: transparent !important;
    box-shadow: 0 12px 40px rgba(0,0,0,0.22) !important;
}

.gm-style .gm-style-iw-d {
    overflow: hidden !important;
}

.gm-style .gm-style-iw-tc { display: none !important; }

/* Hide the default Google Maps close (X) button — we don't need it */
.gm-style .gm-ui-hover-effect {
    display: none !important;
}

/* Hide the InfoWindow chrome/header strip (newer Maps API renders an empty
   white bar above the content otherwise). */
.gm-style .gm-style-iw-chr,
.gm-style .gm-style-iw-ch { display: none !important; }

/* ── Popup card v2 ───────────────────────────────────────────────────── */

.popup-v2 {
    width: 290px;
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    font-family: system-ui, -apple-system, 'Segoe UI', sans-serif;
}

/* Image area */
.popup-img-wrap {
    position: relative;
    height: 195px;
    overflow: hidden;
    background: #e2e8f0;
}

.popup-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Carousel prev/next arrows */
.popup-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255,255,255,0.88);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #1e293b;
    box-shadow: 0 2px 8px rgba(0,0,0,0.18);
    transition: background 0.15s, transform 0.12s;
    z-index: 4;
    padding: 0;
    line-height: 0;
}
.popup-arrow:hover {
    background: #fff;
    transform: translateY(-50%) scale(1.06);
}
.popup-arrow-prev { left: 10px; }
.popup-arrow-next { right: 10px; }

/* Carousel dots */
.popup-dots {
    position: absolute;
    bottom: 9px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 5px;
    z-index: 3;
}
.popup-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: rgba(255,255,255,0.5);
    transition: background 0.15s, transform 0.15s;
    cursor: default;
}
.popup-dot.active {
    background: #fff;
    transform: scale(1.25);
}

/* Save + Add action buttons (top-right overlay) */
.popup-actions {
    position: absolute;
    top: 10px;
    right: 10px;
    display: flex;
    gap: 7px;
    z-index: 5;
}
.popup-action-btn {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: rgba(255,255,255,0.92);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    color: #374151;
    transition: background 0.15s, transform 0.12s;
    flex-shrink: 0;
}
.popup-action-btn:hover {
    background: #fff;
    transform: scale(1.08);
}
.popup-save-btn.saved svg {
    fill: #E05A2B;
    stroke: #E05A2B;
    color: #E05A2B;
}

/* Card body */
.popup-body {
    padding: 13px 15px 15px;
    background: #fff;
}
.popup-title-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 3px;
}
.popup-name {
    font-size: 15px;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.3;
}
.popup-rating {
    display: flex;
    align-items: center;
    gap: 3px;
    font-size: 13px;
    font-weight: 600;
    color: #0f172a;
    white-space: nowrap;
    flex-shrink: 0;
}
.popup-review-count {
    color: #94a3b8;
    font-weight: 400;
    font-size: 12px;
}
.popup-meta {
    font-size: 12px;
    color: #64748b;
    margin-bottom: 1px;
}
.popup-location {
    font-size: 12px;
    color: #64748b;
    margin-bottom: 0;
}
.popup-desc {
    font-size: 12px;
    color: #475569;
    line-height: 1.55;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-top: 7px;
}

/* ── Popup card — dark mode overrides ───────────────────────────────── */

.dark .popup-v2 {
    background: #1e2535;
}
.dark .popup-img-wrap {
    background: #263147;
}
.dark .popup-body {
    background: #1e2535;
}
.dark .popup-name {
    color: #f1f5f9;
}
.dark .popup-rating {
    color: #f1f5f9;
}
.dark .popup-review-count {
    color: rgba(255,255,255,0.38);
}
.dark .popup-meta {
    color: rgba(255,255,255,0.5);
}
.dark .popup-location {
    color: rgba(255,255,255,0.5);
}
.dark .popup-desc {
    color: rgba(255,255,255,0.62);
}
/* Action buttons (save/add) get a frosted-glass dark look */
.dark .popup-action-btn {
    background: rgba(255,255,255,0.14);
    color: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.35);
}
.dark .popup-action-btn:hover {
    background: rgba(255,255,255,0.24);
}

/* ── Persona / For You banner ────────────────────────────────────────── */

.persona-banner {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0.25rem 1rem 0.75rem;
    padding: 0.5rem 0.75rem;
    background: rgba(224, 90, 43, 0.08);
    border: 1px solid rgba(224, 90, 43, 0.22);
    border-radius: 0.75rem;
    font-size: 0.8125rem;
}

.persona-banner--muted {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.10);
}

.persona-banner-icon {
    font-size: 1rem;
    flex-shrink: 0;
}

.persona-banner-text {
    flex: 1;
    color: rgba(255, 255, 255, 0.55);
    font-size: 0.75rem;
}

.persona-show-all-btn {
    background: none;
    border: 1px solid rgba(224, 90, 43, 0.40);
    border-radius: 9999px;
    color: #E05A2B;
    font-size: 0.6875rem;
    font-weight: 600;
    padding: 0.25rem 0.625rem;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.15s, color 0.15s;
    flex-shrink: 0;
}

.persona-show-all-btn:hover {
    background: rgba(224, 90, 43, 0.15);
}

.persona-banner--muted .persona-show-all-btn {
    border-color: rgba(255, 255, 255, 0.20);
    color: rgba(255, 255, 255, 0.50);
}

.persona-banner--muted .persona-show-all-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
}

/* ── Locations tab — Destination cards ──────────────────────────────── */

/* Unused: destinations now use .expanded-grid */
.destination-cards-grid {
    display: none;
}

.destination-card {
    display: block;
    border-radius: 0.75rem;
    overflow: hidden;
    background: rgba(255,255,255,0.03);
    text-decoration: none;
    transition: transform .15s, box-shadow .15s;
    border: 1px solid transparent;
}
.destination-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.4);
}

.dest-img {
    position: relative;
    width: 100%;
    aspect-ratio: 4/3;
    background-size: cover;
    background-position: center;
    background-color: rgba(255,255,255,0.04);
}

.dest-trending-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    background: rgba(0,0,0,0.65);
    color: #fff;
    font-size: 10px;
    font-weight: 600;
    padding: 2px 7px;
    border-radius: 999px;
    backdrop-filter: blur(4px);
}

.dest-info {
    padding: 10px 12px 12px;
}

.dest-name {
    font-size: 0.875rem;
    font-weight: 600;
    color: #fff;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dest-country {
    font-size: 11px;
    color: rgba(255,255,255,0.45);
    margin-top: 2px;
}

.dest-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 6px;
}

.dest-tag {
    font-size: 10px;
    color: rgba(255,255,255,0.5);
    background: rgba(255,255,255,0.07);
    border-radius: 4px;
    padding: 1px 6px;
}

/* Skeleton loaders */
/* Unused: destinations now use .expanded-grid */
.explore-skeleton-row {
    display: none;
}

.destination-card-skeleton {
    aspect-ratio: 4/3;
    border-radius: 0.75rem;
    background: linear-gradient(90deg, rgba(255,255,255,0.05) 25%, rgba(255,255,255,0.08) 50%, rgba(255,255,255,0.05) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.4s infinite;
}

@keyframes shimmer {
    0%   { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.explore-empty {
    padding: 2rem 1rem;
    color: rgba(255,255,255,0.4);
    font-size: 0.875rem;
    text-align: center;
}

/* ── Utility ─────────────────────────────────────────────────────────── */
/* NOTE: Do NOT add `.hidden { display: none !important }` here.
   Tailwind's `hidden md:flex` pattern relies on the responsive
   `md:flex` overriding the base `hidden`. An !important on .hidden
   breaks that cascade and hides elements even on desktop. */

/* ── Place card: social proof mentioners row ─────────────────────────── */
.card-mentioners {
    display: flex;
    align-items: center;
    gap: 7px;
    margin-top: 7px;
}

.card-mentioner-avatars {
    display: flex;
    flex-direction: row;
}

.card-mentioner-av {
    width: 22px; height: 22px;
    border-radius: 50%;
    border: 1.5px solid rgba(0,0,0,0.1);
    overflow: hidden;
    display: flex; align-items: center; justify-content: center;
    font-size: 9px; font-weight: 700;
    background: linear-gradient(135deg, rgba(99,102,241,0.55), rgba(139,92,246,0.55));
    color: #fff;
    flex-shrink: 0;
    margin-left: -7px;
}
.dark .card-mentioner-av { border-color: rgba(255,255,255,0.06); }
.card-mentioner-av:first-child { margin-left: 0; }

.card-mentioner-av img {
    width: 100%; height: 100%; object-fit: cover;
}

.card-mentioners-text {
    font-size: 11px;
    color: rgba(0,0,0,0.5);
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.dark .card-mentioners-text { color: rgba(255,255,255,0.5); }

/* ── Map popup: social proof mentioners row ─────────────────────────── */
.popup-mentioners {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 6px;
}
.popup-mentioner-avs {
    display: flex;
    flex-direction: row;
    flex-shrink: 0;
}
.popup-mentioner-av {
    width: 20px; height: 20px;
    border-radius: 50%;
    border: 1.5px solid rgba(0,0,0,0.1);
    overflow: hidden;
    display: flex; align-items: center; justify-content: center;
    font-size: 8px; font-weight: 700;
    background: linear-gradient(135deg, rgba(99,102,241,0.55), rgba(139,92,246,0.55));
    color: #fff;
    flex-shrink: 0;
    margin-left: -6px;
}
.popup-mentioner-av:first-child { margin-left: 0; }
.dark .popup-mentioner-av { border-color: rgba(255,255,255,0.06); }
.popup-mentioner-av img { width: 100%; height: 100%; object-fit: cover; }
.popup-mentioners-text {
    font-size: 10px;
    color: rgba(0,0,0,0.5);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.dark .popup-mentioners-text { color: rgba(255,255,255,0.5); }
