body { font-family: "IRANYekanXFaNum", sans-serif; }
.bfont { font-family: "IRANYekanXFaNum", sans-serif !important; }

/* ============ LOADING OVERLAY ============ */
#houseLoadingOverlay {
    position: fixed; inset: 0;
    background: rgba(255,255,255,.9);
    backdrop-filter: blur(6px);
    z-index: 9999;
    display: flex; align-items: center; justify-content: center;
    flex-direction: column; gap: 20px;
    transition: opacity .35s ease;
}
#houseLoadingOverlay.hidden { opacity: 0; pointer-events: none; }
.house-spinner {
    width: 60px; height: 60px; border-radius: 50%;
    border: 4px solid #00aa6b;
    border-top-color: transparent;
    animation: spin 0.9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.house-loading-text {
    color: #3E3E64; font-weight: 700; font-size: 16px;
}

/* ============ SKELETON ============ */
.house-skeleton {
    background: #fff; border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,.06);
    overflow: hidden; border: 1px solid #f0f0f0;
    display: flex; flex-direction: row; height: 240px;
}
@media (max-width: 767px) {
    .house-skeleton { flex-direction: column; height: 380px; }
}
.skel-img { width: 320px; flex-shrink: 0; background: linear-gradient(90deg,#f0f0f0 25%,#f8f8f8 50%,#f0f0f0 75%); background-size: 200% 100%; animation: shimmer 1.5s infinite; }
@media (max-width: 767px) { .skel-img { width: 100%; height: 180px; } }
.skel-body { flex: 1; padding: 20px; display: flex; flex-direction: column; gap: 12px; }
.skel-line { height: 14px; border-radius: 6px; background: linear-gradient(90deg,#f0f0f0 25%,#f8f8f8 50%,#f0f0f0 75%); background-size: 200% 100%; animation: shimmer 1.5s infinite; }
.skel-line.short { width: 40%; }
.skel-line.medium { width: 70%; }
@keyframes shimmer { 0% { background-position: -200% 0; } 100% { background-position: 200% 0; } }

/* ============ HOUSE CARD ============ */
.house-card {
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,.06);
    overflow: hidden; background: #fff;
    border: 1px solid rgba(0,0,0,.05);
    transition: all .4s ease;
}
.house-card:hover {
    box-shadow: 0 20px 40px -10px rgba(0,0,0,.15);
    border-color: rgba(247,192,77,.4);
}
.house-card__inner {
    display: flex; flex-direction: column; height: 440px;
}
@media (min-width: 768px) {
    .house-card__inner { flex-direction: row; height: 260px; }
}
.house-card__imgwrap {
    position: relative; width: 100%; height: 200px;
    flex-shrink: 0; overflow: hidden; background: #f3f4f6;
}
@media (min-width: 768px) {
    .house-card__imgwrap { width: 340px; height: 100%; }
}
.house-card__img {
    width: 100%; height: 100%; object-fit: cover;
    transition: transform .7s ease;
}
.house-card:hover .house-card__img { transform: scale(1.06); }
.house-card__body {
    flex: 1; padding: 18px; display: flex; flex-direction: column; min-width: 0;
}
.house-card__title {
    font-weight: 700; font-size: 17px; color: #111827;
    line-height: 1.5; margin-bottom: 8px;
    display: -webkit-box; -webkit-line-clamp: 1;
    -webkit-box-orient: vertical; overflow: hidden;
    text-decoration: none;
}
.house-card__title:hover { color: #d4a12a; }
.house-card__meta {
    display: flex; align-items: center; gap: 6px;
    color: #6b7280; font-size: 13px; margin-bottom: 10px;
}
.house-card__meta svg { width: 15px; height: 15px; color: #00aa6b; flex-shrink: 0; }

.house-card__chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.house-chip {
    background: #f9fafb; border: 1px solid #e5e7eb;
    border-radius: 8px; padding: 4px 10px;
    font-size: 11px; color: #374151;
    display: inline-flex; align-items: center; gap: 4px;
}
.house-chip svg { width: 12px; height: 12px; }

.house-card__bottom {
    display: flex; align-items: flex-end; justify-content: space-between;
    gap: 12px; margin-top: auto; padding-top: 12px;
    border-top: 1px solid #f3f4f6;
}
.house-card__price-box {
    background: linear-gradient(135deg, rgba(62,62,100,.05), rgba(247,192,77,.06));
    border: 1px solid rgba(62,62,100,.08);
    padding: 8px 14px; border-radius: 12px; text-align: center;
}
.house-card__price-label { font-size: 10px; color: #6b7280; margin-bottom: 2px; }
.house-card__price {
    font-size: 22px; font-weight: 800;
    background: linear-gradient(to right, #3E3E64, #00aa6b);
    -webkit-background-clip: text; background-clip: text;
    color: transparent; line-height: 1.1;
}
.house-card__price-unit { font-size: 10px; color: #6b7280; display: block; margin-top: 3px; }
.house-card__cta {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    padding: 10px 20px;
    background: linear-gradient(135deg, #3E3E64, #00aa6b);
    color: #fff; border-radius: 10px;
    font-weight: 700; font-size: 13px;
    text-decoration: none; transition: all .25s;
    box-shadow: 0 4px 14px rgba(62,62,100,.2);
}
.house-card__cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(62,62,100,.3);
    color: #fff;
}

/* Badges */
.house-badge-rating {
    position: absolute; top: 12px; left: 12px;
    background: rgba(255,255,255,.95); backdrop-filter: blur(6px);
    border-radius: 999px; padding: 5px 10px;
    display: flex; align-items: center; gap: 4px;
    font-size: 12px; font-weight: 700; color: #111827;
    box-shadow: 0 4px 12px rgba(0,0,0,.08);
}
.house-badge-rating svg { width: 13px; height: 13px; fill: #FACC15; color: #FACC15; }
.house-badge-type {
    position: absolute; top: 12px; right: 12px;
    background: rgba(62,62,100,.9); backdrop-filter: blur(6px);
    border-radius: 999px; padding: 5px 12px;
    font-size: 11px; font-weight: 700; color: #fff;
}
.house-badge-cashback {
    position: absolute; bottom: 12px; right: 12px;
    background: linear-gradient(135deg, #00aa6b, #e0a93a);
    border-radius: 999px; padding: 5px 12px;
    font-size: 11px; font-weight: 700; color: #fff;
    box-shadow: 0 4px 12px rgba(247,192,77,.4);
    display: flex; align-items: center; gap: 4px;
}
.house-badge-cashback svg { width: 13px; height: 13px; fill: #fff; }

/* Empty state */
.house-empty { text-align: center; padding: 60px 20px; background: #fff; border-radius: 16px; border: 1px solid #eee; }
.house-empty svg { width: 80px; height: 80px; color: #d1d5db; margin-bottom: 20px; margin-inline: auto; }
.house-empty h3 { font-size: 22px; font-weight: 700; color: #111827; margin-bottom: 8px; }
.house-empty p  { color: #6b7280; max-width: 400px; margin: 0 auto 20px; }

/* Star rating tiny */
.star-tiny { display: inline-flex; gap: 1px; }
.star-tiny svg { width: 12px; height: 12px; fill: #FACC15; color: #FACC15; }

/* Helpers */
.is-hidden { display: none !important; }
.filter-check {
    display: flex; align-items: center; gap: 8px;
    font-size: 13px; cursor: pointer; color: #374151;
    padding: 5px 0; transition: color .15s;
}
.filter-check:hover { color: #00aa6b; }
.filter-check input[type="checkbox"] {
    width: 16px; height: 16px; accent-color: #00aa6b;
    cursor: pointer;
}
.filter-reset-btn {
    width: 100%; background: #f3f4f6; color: #374151;
    border: 1px solid #e5e7eb; font-weight: 600;
    padding: 8px; border-radius: 8px; font-family: inherit;
    cursor: pointer; font-size: 13px; transition: all .2s;
}
.filter-reset-btn:hover { background: #e5e7eb; }
.filter-reset-btn.active { background: #00aa6b; color: #fff; border-color: #00aa6b; }
.filter-reset-btn.active:hover { background: #009a60; }

/* Sort buttons */
.sort-btn {
    font-family: inherit;
    display: inline-flex; align-items: center; justify-content: center;
    height: 40px; padding: 0 14px;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
    background: #fff;
    color: #374151;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all .2s;
}
.sort-btn:hover {
    background: #f9fafb;
    border-color: #00aa6b;
    color: #00aa6b;
}
.sort-btn.active {
    background: linear-gradient(135deg, #3E3E64, #00aa6b);
    color: #fff;
    border-color: transparent;
    box-shadow: 0 4px 14px rgba(62,62,100,.25);
}
.sort-btn.active:hover {
    transform: translateY(-1px);
}

/* ============ SEARCH BAR ============ */
.house-search__field {
    display: flex; align-items: center; gap: 8px;
    height: 44px; padding: 0 14px;
    background: #fff; border: 1px solid #d1d5db; border-radius: 12px;
}
.house-search__field:focus-within { border-color: #00aa6b; }
.house-search__field select, .house-search__field input {
    border: 0; outline: 0; background: transparent; font: inherit; font-size: 14px; cursor: pointer;
}
.house-search__field input { width: 180px; text-align: right; }
.house-search__nights { font-size: 12px; color: #6b7280; white-space: nowrap; }
.house-search__btn {
    height: 44px; padding: 0 28px; border: 0; border-radius: 12px; cursor: pointer;
    background: linear-gradient(135deg, #3E3E64, #00aa6b); color: #fff; font: inherit; font-weight: 700; font-size: 14px;
}
.house-search__btn:hover { opacity: .92; }
.house-search__error { width: 100%; color: #dc2626; font-size: 13px; }
button.house-card__cta { border: 0; cursor: pointer; font-family: inherit; }
@media (max-width: 640px) {
    #houseSearch, .house-search__field { width: 100%; }
    .house-search__field input { flex: 1; width: auto; }
    .house-search__field select { flex: 1; }
    .house-search__btn { width: 100%; }
}

/* Map popup */
.house-map-btn { display: inline-flex; align-items: center; gap: 4px; padding: 10px 14px; border: 1px solid #d1d5db; border-radius: 10px; background: #fff; color: #3E3E64; font-weight: 700; font-size: 13px; cursor: pointer; }
.house-map-btn:hover { background: #f3f4f6; }
.house-map-modal { position: fixed; inset: 0; z-index: 2000; background: rgba(0,0,0,.55); display: flex; align-items: center; justify-content: center; padding: 16px; }
.house-map-modal[hidden] { display: none; }
.house-map-modal__box { background: #fff; border-radius: 14px; width: 100%; max-width: 720px; overflow: hidden; }
.house-map-modal__head { display: flex; justify-content: space-between; align-items: center; padding: 10px 16px; font-weight: 700; }
.house-map-modal__head button { border: 0; background: none; font-size: 26px; line-height: 1; cursor: pointer; color: #6b7280; }
#houseMap { height: min(70vh, 480px); }
