﻿/* ======================================== */
/* home.css - Extracted from blade      */
/* ======================================== */

/* ========== HOMEPAGE ========== */
.home-page {
    padding: 0 0 64px;
}

/* ========== FILTER BOX ========== */
.home-filter {
    margin-top: 20px;
}

.filter-box {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 14px;
    padding: 22px 24px 16px;
}

/* Hero title */
.fh-title {
    font-size: 1.35rem;
    font-weight: 800;
    color: #1a1a1a;
    margin-bottom: 2px;
    line-height: 1.3;
}

.fh-sub {
    font-size: .78rem;
    color: #999;
    margin-bottom: 12px;
}

/* ── Top row: deal tabs + region + panel toggles ── */
.filter-top {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.deal-tabs {
    display: flex;
    gap: 0;
    border: 1.5px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
}

.deal-tab {
    padding: 7px 16px;
    font-size: .78rem;
    font-weight: 600;
    color: #555;
    cursor: pointer;
    background: #fff;
    border: none;
    border-right: 1px solid #e8e8e8;
    transition: all .12s;
    white-space: nowrap;
}

.deal-tab:last-child {
    border-right: none;
}

.deal-tab.active {
    background: #1a1a1a;
    color: #fff;
}

.deal-tab:hover:not(.active) {
    background: #f5f5f5;
}

.deal-tab.daily {
    display: flex;
    align-items: center;
    gap: 4px;
}

.deal-tab.daily .ck-box {
    width: 14px;
    height: 14px;
    border: 1.5px solid #ccc;
    border-radius: 3px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .5rem;
    transition: all .12s;
}

.deal-tab.daily.active .ck-box {
    background: #04A5B5;
    border-color: #04A5B5;
    color: #fff;
}

.deal-tab.daily.active .ck-box::after {
    content: '✓';
}

/* Region select */
.region-badge-select {
    max-width: 170px;
    border-radius: 18px;
    padding: 6px 26px 6px 12px;
    font-weight: 600;
    border: 1px solid #d0eef3;
    background-color: #e8f7f9;
    color: #04A5B5;
    font-size: .78rem;
    outline: none;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%2304A5B5'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    cursor: pointer;
}

.panel-toggles {
    display: flex;
    gap: 0;
    margin-left: auto;
    border: 1.5px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
}

.panel-btn {
    padding: 7px 14px;
    font-size: .78rem;
    font-weight: 600;
    color: #555;
    cursor: pointer;
    background: #fff;
    border: none;
    border-right: 1px solid #e8e8e8;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: all .12s;
}

.panel-btn:last-child {
    border-right: none;
}

.panel-btn.active {
    background: #024A57;
    color: #fff;
}

.panel-btn:hover:not(.active) {
    background: #f5f5f5;
}

/* ── Types Panel ── */
.types-panel {
    display: none;
    padding-top: 14px;
    border-top: 1px solid #f0f0f0;
    margin-top: 12px;
}

.types-panel.open {
    display: block;
}

.type-icons {
    display: flex;
    gap: 6px;
    margin-bottom: 14px;
    overflow-x: auto;
    padding-bottom: 2px;
}

.type-icon-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    padding: 8px 10px;
    border-radius: 10px;
    transition: all .15s;
    min-width: 58px;
    border: 2px solid transparent;
    text-decoration: none;
}

.type-icon-item:hover {
    background: #f8f8f8;
}

.type-icon-item.active {
    background: #e8f7f9;
    border-color: #04A5B5;
}

.type-icon-img {
    font-size: 1.5rem;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.type-icon-label {
    font-size: .65rem;
    font-weight: 600;
    color: #555;
    text-align: center;
    white-space: nowrap;
}

.type-icon-item.active .type-icon-label {
    color: #024A57;
}

.sub-cats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1px 20px;
}

.sub-cat {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 4px 0;
    cursor: pointer;
    transition: color .12s;
    text-decoration: none;
}

.sub-cat:hover .sub-cat-name {
    color: #04A5B5;
}

.sub-cat.active .sub-cat-name {
    color: #04A5B5;
    font-weight: 700;
}

.sub-cat-name {
    font-size: .84rem;
    color: #333;
    font-weight: 500;
    transition: color .12s;
}

.sub-cat-count {
    font-size: .72rem;
    color: #bbb;
    font-weight: 500;
}

/* ── Filter Panel ── */
.filter-panel-adv {
    display: none;
    padding-top: 14px;
    border-top: 1px solid #f0f0f0;
    margin-top: 12px;
}

.filter-panel-adv.open {
    display: block;
}

/* Uniform grid rows */
.fg-search {
    margin-bottom: 10px;
}

.fg-search .f-input {
    width: 100%;
}

.fg-row {
    display: grid;
    gap: 8px;
    margin-bottom: 8px;
}

.fg-row.cols-3 {
    grid-template-columns: 1fr 1fr 1fr;
}

.fg-row.cols-2 {
    grid-template-columns: 1fr 1fr;
}

.fg-row.cols-4 {
    grid-template-columns: 1fr 1fr 1fr 1fr;
}

.f-field {
    position: relative;
}

.f-range {
    display: flex;
    gap: 0;
}

.f-range .f-input {
    border-radius: 0;
    border-right: none;
    flex: 1;
}

.f-range .f-input:first-child {
    border-radius: 8px 0 0 8px;
}

.f-range .f-input:last-child {
    border-radius: 0 8px 8px 0;
    border-right: 1px solid #ddd;
}

.f-label {
    font-size: .72rem;
    color: #888;
    font-weight: 600;
    margin-bottom: 4px;
    display: block;
}

.f-select,
.f-input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: .78rem;
    color: #333;
    background: #fff;
    outline: none;
    transition: border .15s;
    appearance: none;
    -webkit-appearance: none;
    font-family: 'Inter', sans-serif;
    box-sizing: border-box;
    height: 36px;
}

.f-select {
    background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%23999'/%3E%3C/svg%3E") no-repeat right 10px center;
    padding-right: 28px;
    cursor: pointer;
}

.f-select:focus,
.f-input:focus {
    border-color: #04A5B5;
}

.f-input::placeholder {
    color: #bbb;
}

.rooms-wrap {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.rooms-group {
    display: flex;
    gap: 0;
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
    height: 36px;
}

.rooms-btn {
    padding: 0 13px;
    font-size: .78rem;
    font-weight: 600;
    color: #666;
    background: #fff;
    border: none;
    cursor: pointer;
    transition: all .12s;
    border-right: 1px solid #e8e8e8;
    flex: 1;
    text-align: center;
}

.rooms-btn:last-child {
    border-right: none;
}

.rooms-btn.active {
    background: #024A57;
    color: #fff;
}

.rooms-btn:hover:not(.active) {
    background: #f5f5f5;
}

.fg-row-reset {
    display: flex;
    justify-content: flex-end;
    margin-top: 4px;
}

.btn-reset {
    background: none;
    border: none;
    color: #999;
    font-size: .75rem;
    cursor: pointer;
    padding: 4px 8px;
    transition: color .12s;
}

.btn-reset:hover {
    color: #04A5B5;
}

/* ── Bottom bar ── */
.filter-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 12px;
    border-top: 1px solid #f0f0f0;
    margin-top: 12px;
    flex-wrap: wrap;
    gap: 8px;
}

.filter-stats {
    font-size: .8rem;
    color: #888;
}

.filter-stats strong {
    color: #04A5B5;
    font-weight: 800;
}

.filter-stats span {
    color: #555;
}

.filter-stats .loading {
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid #ddd;
    border-top-color: #04A5B5;
    border-radius: 50%;
    animation: spin .6s linear infinite;
    vertical-align: middle;
    margin-right: 4px;
}

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

.btn-show {
    padding: 11px 30px;
    border-radius: 25px;
    border: none;
    background: #04A5B5;
    color: #fff;
    font-weight: 700;
    font-size: .82rem;
    cursor: pointer;
    transition: all .15s;
    white-space: nowrap;
    text-decoration: none;
    display: inline-block;
}

.btn-show:hover {
    background: #038898;
}

/* ========== VALUATION WIDGET ========== */
.home-layout {
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 20px;
}

.val-widget {
    background: #1e2a3a;
    border: none;
    border-radius: 14px;
    padding: 20px;
    height: fit-content;
    position: sticky;
    top: 90px;
    color: #fff;
}

.val-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 6px;
    background: rgba(4, 165, 181, .2);
    color: #04A5B5;
    font-size: .65rem;
    font-weight: 700;
    margin-bottom: 8px;
    text-transform: lowercase;
    border: 1px solid rgba(4, 165, 181, .3);
}

.val-title {
    font-size: .88rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 12px;
    line-height: 1.4;
}

.val-input {
    width: 100%;
    padding: 9px 12px;
    border: 1px solid rgba(255, 255, 255, .15);
    border-radius: 8px;
    font-size: .78rem;
    margin-bottom: 6px;
    outline: none;
    transition: border .15s;
    background: rgba(255, 255, 255, .08);
    color: #fff;
}

.val-input::placeholder {
    color: rgba(255, 255, 255, .4);
}

.val-input:focus {
    border-color: #04A5B5;
}

.val-pair {
    display: flex;
    gap: 6px;
}

.val-pair .val-input {
    flex: 1;
}

.val-city {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
    font-size: .75rem;
}

.val-city-label {
    color: rgba(255, 255, 255, .5);
}

.val-city-val {
    color: #04A5B5;
    font-weight: 600;
}

.btn-val {
    width: 100%;
    padding: 9px;
    border-radius: 8px;
    border: none;
    font-weight: 600;
    font-size: .78rem;
    cursor: pointer;
    margin-bottom: 6px;
    transition: all .15s;
}

.btn-val-primary {
    background: #04A5B5;
    color: #fff;
}

.btn-val-primary:hover {
    background: #038898;
}

.btn-val-secondary {
    background: rgba(255, 255, 255, .08);
    color: rgba(255, 255, 255, .7);
    border: 1px solid rgba(255, 255, 255, .12);
}

.btn-val-secondary:hover {
    background: rgba(255, 255, 255, .12);
}

.val-note {
    font-size: .65rem;
    color: rgba(255, 255, 255, .35);
    line-height: 1.5;
    margin-top: 6px;
}

/* ========== LATEST LISTINGS ========== */
.latest-section {
    margin-top: 36px;
}

.latest-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.latest-title {
    font-size: 1.15rem;
    font-weight: 800;
    color: #1a1a1a;
}

.latest-sub {
    font-size: .78rem;
    color: #999;
    margin-top: 2px;
}

.latest-link {
    font-size: .78rem;
    font-weight: 600;
    color: #04A5B5;
    text-decoration: none;
}

.latest-link:hover {
    text-decoration: underline;
}

.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 16px;
}

.card {
    border-radius: 12px;
    overflow: hidden;
    background: #fff;
    border: 1px solid #eee;
    transition: all .2s;
}

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

.card-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.card-img {
    position: relative;
    aspect-ratio: 16/10;
    overflow: hidden;
    background: #f5f5f5;
}

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

.card-no-img {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #ccc;
    font-size: 1.8rem;
}

.card-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    padding: 3px 9px;
    border-radius: 12px;
    font-size: .66rem;
    font-weight: 600;
    color: #fff;
}

.badge-rent {
    background: rgba(4, 165, 181, .9);
}

.badge-sell {
    background: rgba(239, 68, 68, .85);
}

.card-fav {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .85);
    border: none;
    font-size: .85rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all .15s;
}

.card-fav:hover {
    background: #fff;
    transform: scale(1.1);
}

.card-fav.saved {
    color: #ef4444;
}

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

.card-price {
    font-size: .98rem;
    font-weight: 800;
    color: #024A57;
}

.card-period {
    font-size: .68rem;
    font-weight: 500;
    color: #888;
}

.card-title {
    font-size: .8rem;
    font-weight: 600;
    color: #333;
    margin: 3px 0 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.card-location {
    font-size: .72rem;
    color: #999;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 3px;
}

.card-features {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.card-features span {
    font-size: .68rem;
    color: #666;
    padding: 2px 6px;
    background: #f5f5f5;
    border-radius: 4px;
}

@media (max-width: 900px) {
    .home-layout {
        grid-template-columns: 1fr;
    }

    .val-widget {
        position: static;
    }
}

@media (max-width: 768px) {
    .filter-top {
        flex-direction: column;
        align-items: stretch;
    }

    .panel-toggles {
        margin-left: 0;
    }

    .sub-cats {
        grid-template-columns: repeat(2, 1fr);
    }

    .fg-row.cols-3,
    .fg-row.cols-4 {
        grid-template-columns: 1fr;
    }

    .fg-row.cols-2 {
        grid-template-columns: 1fr;
    }
}
    