/* ===========================================
   Hotel Finder — UX Builder Block
   =========================================== */

.hm-finder-wrap {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* ---- Title ---- */
.hm-finder-title {
    text-align: center;
    font-size: 28px;
    font-weight: 700;
    color: var(--hm-text, #1a1a2e);
    margin-bottom: 28px;
}

/* ---- Cities Tab ---- */
.hm-finder-cities {
    margin-bottom: 16px;
}

.hm-finder-cities-scroll {
    display: flex;
    gap: 8px;
    justify-content: center;
    flex-wrap: wrap;
}

.hm-finder-city-btn {
    display: inline-flex;
    align-items: center;
    height: 40px;
    padding: 0 24px;
    border: 1px solid var(--hm-border, #e8e8e8);
    border-radius: 24px;
    background: var(--hm-white, #ffffff);
    color: var(--hm-text, #1a1a2e);
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.25s ease;
    white-space: nowrap;
}

.hm-finder-city-btn:hover {
    border-color: var(--hm-text, #1a1a2e);
    background: var(--hm-bg, #f7f8fa);
}

.hm-finder-city-btn.active {
    background: var(--hm-text, #1a1a2e);
    color: #ffffff;
    border-color: var(--hm-text, #1a1a2e);
}

/* ---- Districts Tab ---- */
.hm-finder-districts {
    margin-bottom: 28px;
}

.hm-finder-districts-scroll {
    display: flex;
    gap: 6px;
    justify-content: center;
    flex-wrap: wrap;
}

.hm-finder-district-btn {
    display: inline-flex;
    align-items: center;
    height: 36px;
    padding: 0 18px;
    border: none;
    border-radius: 20px;
    background: transparent;
    color: var(--hm-muted, #666);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.hm-finder-district-btn:hover {
    color: var(--hm-text, #1a1a2e);
    background: var(--hm-bg, #f7f8fa);
}

.hm-finder-district-btn.active {
    color: var(--hm-accent, #063924);
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 4px;
}

/* ---- Loading ---- */
.hm-finder-loading {
    display: flex;
    justify-content: center;
    padding: 40px 0;
}

.hm-finder-spinner {
    width: 36px;
    height: 36px;
    border: 3px solid var(--hm-border, #e8e8e8);
    border-top-color: var(--hm-accent, #063924);
    border-radius: 50%;
    animation: hm-finder-spin 0.7s linear infinite;
}

@keyframes hm-finder-spin {
    to { transform: rotate(360deg); }
}

/* ---- Hotel Grid ---- */
.hm-finder-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-bottom: 40px;
}

@media (max-width: 960px) {
    .hm-finder-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .hm-finder-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
}

/* ---- Hotel Card ---- */
.hm-finder-card {
    background: var(--hm-white, #ffffff);
    border: 1px solid var(--hm-border, #e0e0e0);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
    transition: box-shadow 0.25s ease, transform 0.25s ease;
}

.hm-finder-card:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.hm-finder-card-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.hm-finder-card-img {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: var(--hm-bg, #f7f8fa);
}

.hm-finder-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.hm-finder-card:hover .hm-finder-card-img img {
    transform: scale(1.04);
}

.hm-finder-card-no-img {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    color: var(--hm-border, #e8e8e8);
}

.hm-finder-card-body {
    padding: 14px 16px 16px;
}

.hm-finder-card-name {
    font-size: 15px;
    font-weight: 700;
    color: var(--hm-text, #1a1a2e);
    margin: 0 0 4px;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.hm-finder-card-addr {
    display: none;
}

.hm-finder-card-addr i {
    color: var(--hm-accent, #063924);
    font-size: 12px;
}

.hm-finder-card-cta {
    font-size: 14px;
    font-weight: 600;
    color: var(--hm-accent, #063924);
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.hm-finder-card-cta i {
    font-size: 11px;
    transition: transform 0.2s ease;
}

.hm-finder-card:hover .hm-finder-card-cta i {
    transform: translate(2px, -2px);
}

/* ---- No Results ---- */
.hm-finder-no-results {
    text-align: center;
    padding: 60px 20px;
    color: var(--hm-muted, #666);
}

.hm-finder-no-results i {
    font-size: 48px;
    color: var(--hm-border, #e8e8e8);
    margin-bottom: 16px;
    display: block;
}

.hm-finder-no-results p {
    font-size: 16px;
    margin: 0;
}

/* ---- Empty State ---- */
.hm-finder-empty {
    text-align: center;
    padding: 40px 20px;
    color: var(--hm-muted, #666);
    font-size: 15px;
}

/* ---- Responsive: Cities Scroll on Mobile ---- */
@media (max-width: 600px) {
    .hm-finder-cities-scroll {
        justify-content: flex-start;
        overflow-x: auto;
        flex-wrap: nowrap;
        padding-bottom: 8px;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    .hm-finder-cities-scroll::-webkit-scrollbar {
        display: none;
    }

    .hm-finder-city-btn {
        flex-shrink: 0;
    }

    .hm-finder-districts-scroll {
        justify-content: flex-start;
        overflow-x: auto;
        flex-wrap: nowrap;
        padding-bottom: 8px;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    .hm-finder-districts-scroll::-webkit-scrollbar {
        display: none;
    }

    .hm-finder-district-btn {
        flex-shrink: 0;
    }
}
