/* BDS hub layout — Nhà Tốt (nhatot.com) visual language */

body.aha-bds-shell {
    --bds-brand: #ff8800;
    --bds-brand-dark: #e67300;
    --bds-brand-deep: #cc6600;
    --bds-brand-rgb: 255, 136, 0;
    --bds-brand-soft: rgba(255, 136, 0, .08);
    --bds-brand-border: rgba(255, 136, 0, .18);
    --bds-brand-shadow: rgba(255, 136, 0, .24);
    --bds-page-bg: #f4f4f4;
}

.bds-subheader-zone {
    width: 100%;
    margin: 0 0 12px;
    padding: 0;
}

.bds-subheader-zone .bds-category-grid {
    margin-bottom: 16px;
}

body.aha-bds-shell .page-wrapper {
    background: var(--bds-page-bg);
}

.bds-category-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0;
    margin-bottom: 0;
    border-radius: 12px;
    background: #fff;
    border: 1px solid #ececec;
    box-shadow: 0 8px 24px rgba(15, 23, 42, .06);
    overflow: hidden;
}

.bds-category-card {
    display: flex;
    align-items: center;
    gap: 14px;
    min-height: 92px;
    padding: 16px 18px;
    color: inherit;
    text-decoration: none !important;
    border-right: 1px solid #ececec;
    transition: background .15s ease, box-shadow .15s ease;
}

.bds-category-card:last-child {
    border-right: 0;
}

.bds-category-card:hover,
.bds-category-card:focus {
    background: #fafafa;
    color: inherit;
}

.bds-category-card.is-active {
    background: rgba(255, 136, 0, .06);
    box-shadow: inset 0 -3px 0 var(--bds-brand);
}

.bds-category-card__visual {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    border-radius: 14px;
    flex: 0 0 auto;
    font-size: 1.65rem;
    overflow: hidden;
}

.bds-cat-icon-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.bds-category-card__visual--sale {
    background: linear-gradient(145deg, #fff4e8, #ffe8cc);
    color: #ea580c;
}

.bds-category-card__visual--rent {
    background: linear-gradient(145deg, #eef6ff, #dbeafe);
    color: #2563eb;
}

.bds-category-card__visual--project {
    background: linear-gradient(145deg, #ecfeff, #cffafe);
    color: #0891b2;
}

.bds-category-card__visual--broker {
    background: linear-gradient(145deg, #fdf2f8, #fce7f3);
    color: #db2777;
}

.bds-category-card__body {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.bds-category-card__title {
    font-size: 1.02rem;
    font-weight: 800;
    line-height: 1.2;
    color: #111;
}

.bds-category-card__meta {
    font-size: .84rem;
    font-weight: 500;
    line-height: 1.3;
    color: #6b7280;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.bds-intent-tabs {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
    padding: 0 2px;
}

.bds-intent-tabs__primary {
    display: flex;
    align-items: stretch;
    flex-wrap: nowrap;
    gap: 0;
    min-width: 0;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    border: 1px solid var(--bds-brand-border);
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 8px 22px rgba(255, 136, 0, .06);
}

.bds-intent-tabs__primary::-webkit-scrollbar {
    display: none;
}

.bds-intent-tab {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 22px;
    border: 0;
    border-right: 1px solid rgba(255, 136, 0, .12);
    background: transparent;
    color: #475569;
    font-size: .95rem;
    font-weight: 800;
    line-height: 1;
    text-decoration: none !important;
    white-space: nowrap;
    transition: background .15s ease, color .15s ease;
}

.bds-intent-tab:last-child {
    border-right: 0;
}

.bds-intent-tab:hover,
.bds-intent-tab:focus {
    background: var(--bds-brand-soft);
    color: var(--bds-brand-deep);
}

.bds-intent-tab.is-active {
    background: var(--bds-brand);
    color: #fff !important;
    box-shadow: inset 0 -2px 0 rgba(255, 255, 255, .22);
}

.bds-intent-tabs__actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 0 0 auto;
}

.bds-intent-post-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 18px;
    border-radius: 14px;
    border: 0;
    background: linear-gradient(180deg, #ff9920, var(--bds-brand));
    color: #fff !important;
    font-size: .9rem;
    font-weight: 800;
    text-decoration: none !important;
    white-space: nowrap;
    box-shadow: 0 10px 22px var(--bds-brand-shadow);
    transition: transform .15s ease, box-shadow .15s ease;
}

.bds-intent-post-cta:hover,
.bds-intent-post-cta:focus {
    color: #fff !important;
    transform: translateY(-1px);
    box-shadow: 0 14px 26px rgba(255, 136, 0, .32);
}

.bds-intent-tabs__more {
    flex: 0 0 auto;
}

.bds-intent-more-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 44px;
    padding: 0 16px;
    border-radius: 14px;
    border: 1px solid var(--bds-brand-border);
    background: #fff;
    color: #334155;
    font-size: .9rem;
    font-weight: 700;
    box-shadow: 0 8px 18px rgba(255, 136, 0, .05);
}

.bds-intent-more-btn:hover,
.bds-intent-more-btn:focus {
    border-color: rgba(255, 136, 0, .32);
    color: var(--bds-brand-deep);
}

.bds-intent-more-menu {
    min-width: 220px;
    border-radius: 14px;
    border: 1px solid var(--bds-brand-border);
    box-shadow: 0 16px 36px rgba(15, 23, 42, .12);
    padding: 8px;
}

.bds-intent-more-menu .dropdown-item {
    border-radius: 10px;
    font-weight: 700;
    padding: 10px 12px;
}

/* === Nhà Tốt search pill === */
.bds-nhatot-search {
    position: relative;
    z-index: 12;
    margin: 0 0 12px;
    padding: 0;
    background: transparent;
    border: 0;
    box-shadow: none;
}

.bds-subheader-zone .bds-nhatot-search {
    margin-top: 0;
}

.bds-nhatot-search__inner {
    width: min(100%, 960px);
    margin: 0 auto;
}

.bds-nhatot-search__pill {
    display: flex;
    align-items: stretch;
    gap: 0;
    min-height: 56px;
    padding: 6px;
    border-radius: 999px;
    background: #fff;
    border: 1px solid #e8e8e8;
    box-shadow: 0 8px 24px rgba(15, 23, 42, .08);
}

.bds-nhatot-search__keyword,
.bds-nhatot-search__filter {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    margin: 0;
    padding: 0 12px;
}

.bds-nhatot-search__keyword {
    flex: 1 1 auto;
    padding-left: 16px;
}

.bds-nhatot-search__filter {
    flex: 0 0 auto;
    border-left: 1px solid #ececec;
    padding-left: 14px;
    padding-right: 10px;
}

.bds-nhatot-search__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #9ca3af;
    font-size: 1.15rem;
    flex: 0 0 auto;
}

.bds-nhatot-search__icon--brand {
    color: var(--bds-brand);
}

.bds-nhatot-search__input,
.bds-nhatot-search__select {
    width: 100%;
    min-width: 0;
    min-height: 44px;
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    padding: 0 !important;
    font-size: .95rem !important;
    font-weight: 600 !important;
    color: #222 !important;
    appearance: none;
    -webkit-appearance: none;
}

.bds-nhatot-search__input::placeholder {
    color: #9ca3af;
    font-weight: 500;
}

.bds-nhatot-search__select {
    width: auto;
    min-width: 118px;
    max-width: 170px;
    padding-right: 22px !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8' fill='none'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%23222' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right center !important;
    background-size: 12px 8px !important;
    cursor: pointer;
}

.bds-nhatot-search__location .bds-nhatot-search__select {
    min-width: 132px;
    max-width: 190px;
}

.bds-nhatot-search__type .bds-nhatot-search__select {
    min-width: 128px;
    max-width: 168px;
}

.bds-nhatot-search__submit {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    padding: 0 4px 0 8px;
}

.bds-nhatot-search__btn,
.bds-nhatot-search__btn:hover,
.bds-nhatot-search__btn:focus {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    min-width: 108px;
    padding: 0 22px;
    border-radius: 999px !important;
    border: 0 !important;
    background: var(--bds-brand) !important;
    color: #fff !important;
    font-size: .95rem !important;
    font-weight: 800 !important;
    text-decoration: none !important;
    box-shadow: none !important;
}

.bds-nhatot-search__btn:hover,
.bds-nhatot-search__btn:focus {
    background: var(--bds-brand-dark) !important;
}

.bds-hero-search.bds-search-wrap.is-sticky-fixed {
    left: 0;
    right: 0;
    margin: 0;
    padding: 8px 12px;
    background: rgba(244, 244, 244, .96);
    backdrop-filter: blur(8px);
    box-shadow: 0 10px 24px rgba(15, 23, 42, .08);
}

.bds-hero-search.bds-search-wrap.is-sticky-fixed .bds-nhatot-search__pill {
    box-shadow: 0 8px 20px rgba(15, 23, 42, .1);
}

.bds-feed-section--linked .bds-feed-section__kicker {
    color: #ea580c;
}

.bds-category-shortcuts {
    display: flex;
    flex-wrap: nowrap;
    gap: 8px;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    padding: 2px 2px 6px;
    margin-bottom: 4px;
}

.bds-category-shortcuts::-webkit-scrollbar {
    display: none;
}

.bds-category-shortcut {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    min-height: 38px;
    padding: 0 16px;
    border-radius: 999px;
    border: 1px solid var(--bds-brand-border);
    background: #fff;
    color: var(--bds-brand-deep);
    font-size: .88rem;
    font-weight: 700;
    text-decoration: none !important;
    white-space: nowrap;
    box-shadow: 0 6px 16px rgba(37, 99, 235, .06);
    transition: transform .15s ease, border-color .15s ease, background .15s ease;
}

.bds-category-shortcut:hover,
.bds-category-shortcut:focus {
    transform: translateY(-1px);
    border-color: rgba(37, 99, 235, .32);
    background: rgba(37, 99, 235, .05);
    color: #1e3a8a;
}

.bds-promo-banner-wrap {
    margin: 4px 0 10px;
}

.bds-promo-banner {
    display: block;
    overflow: hidden;
    border-radius: 18px;
    box-shadow: 0 12px 28px rgba(37, 99, 235, .08);
}

.bds-promo-banner__image {
    display: block;
    width: 100%;
    height: auto;
    max-height: 250px;
    object-fit: cover;
    object-position: center 46%;
}

.bds-detail-topbar {
    padding: 4px 2px 0;
}

.bds-detail-topbar .bds-page-heading {
    font-size: clamp(1.2rem, 2.4vw, 1.65rem);
    line-height: 1.25;
    font-weight: 800;
    color: #1e3a8a;
}

.bds-feed-section {
    margin-bottom: 18px;
    padding: 0;
    background: transparent;
    border: 0;
    box-shadow: none;
}

.bds-feed-section__head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
    padding: 0 2px;
}

.bds-feed-section__kicker {
    font-size: 11px;
    line-height: 1;
    font-weight: 800;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--bds-brand);
    margin-bottom: 6px;
}

.bds-feed-section__title {
    margin: 0;
    font-size: 1.25rem;
    line-height: 1.15;
    font-weight: 900;
    letter-spacing: -.02em;
    color: #222;
}

.bds-feed-section__link {
    font-size: .9rem;
    font-weight: 700;
    color: var(--bds-brand);
    text-decoration: none !important;
    white-space: nowrap;
}

.bds-feed-section__link:hover,
.bds-feed-section__link:focus {
    color: var(--bds-brand-dark);
    text-decoration: underline !important;
}

.bds-feed-section__body {
    padding: 0;
}

.bds-page-hub .region-overview {
    border-radius: 18px;
    margin-bottom: 18px;
    border-color: rgba(255,136,0,.12);
    background: #fff;
    box-shadow: 0 4px 20px rgba(0,0,0,.06);
}

.bds-page-hub .region-overview-kicker {
    color: var(--bds-brand);
}

.bds-page-hub .bds-feed-section + .bds-feed-section .bds-feed-section__head {
    border-top: 2px solid rgba(0,0,0,.06);
    padding-top: 18px;
    margin-top: 2px;
}

/* === Listing pages (Nhà Tốt-style compact search + grid) === */
.bds-list-page,
.bds-rent-page,
.bds-project-page {
    padding-top: 0;
}

.bds-list-search-spacer {
    height: 0;
    pointer-events: none;
}

.bds-list-search {
    position: relative;
    z-index: 1036;
    margin-bottom: 10px;
}

.bds-list-search.is-sticky-fixed {
    position: fixed;
    left: 0;
    right: 0;
    top: var(--bds-list-sticky-top, 84px);
    z-index: 1038;
    margin: 0;
    padding: 8px 12px;
    background: rgba(241, 245, 249, .96);
    border-bottom: 1px solid var(--bds-brand-border);
    box-shadow: 0 10px 24px rgba(15, 23, 42, .08);
    backdrop-filter: blur(8px);
}

.bds-list-search .bds-results-search-bar {
    max-width: 920px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px;
    border-radius: 999px;
    background: #fff;
    border: 1px solid #e8e8e8;
    box-shadow: 0 8px 24px rgba(15, 23, 42, .08);
}

.bds-list-search .bds-results-search-input {
    min-height: 44px;
    border-radius: 999px !important;
    border: 0 !important;
    font-size: .94rem !important;
    font-weight: 600 !important;
    box-shadow: none !important;
    padding-left: 16px !important;
}

.bds-list-search .bds-results-search-submit {
    min-height: 44px;
    min-width: 108px;
    border-radius: 999px !important;
    font-weight: 800 !important;
    background: var(--bds-brand) !important;
    border-color: var(--bds-brand) !important;
    color: #fff !important;
    box-shadow: none !important;
}

.bds-list-search .bds-results-search-submit:hover,
.bds-list-search .bds-results-search-submit:focus {
    background: var(--bds-brand-dark) !important;
    border-color: var(--bds-brand-dark) !important;
    color: #fff !important;
}

.bds-list-search .bds-results-filter-toggle {
    min-height: 44px;
    border-radius: 999px !important;
    font-weight: 700 !important;
    border: 1px solid var(--bds-brand-border) !important;
    color: var(--bds-brand-deep) !important;
    background: #fff !important;
}

.bds-list-search .bds-filter-chip-row {
    max-width: 1240px;
    margin: 8px auto 0;
}

.bds-list-summary-bar {
    padding: 2px 2px 0;
}

.bds-list-page .bds-listing-card .card-body,
.bds-rent-page .bds-rent-card .card-body {
    gap: 5px !important;
    padding: 10px !important;
}

.bds-list-page .bds-listing-thumb,
.bds-rent-page .bds-rent-thumb,
.bds-list-page .bds-listing-card .bds-listing-thumb {
    aspect-ratio: 16 / 9 !important;
    border-radius: 10px !important;
}

.bds-list-page .bds-card-title,
.bds-rent-page .bds-card-title {
    font-size: .875rem !important;
    line-height: 1.4 !important;
    font-weight: 600 !important;
}

.bds-list-page .bds-price,
.bds-rent-page .bds-price {
    font-size: 17px !important;
    font-weight: 800 !important;
    color: var(--bds-brand) !important;
}

@media (min-width: 1200px) {
    .bds-list-page .bds-col-preview,
    .bds-rent-page .bds-col-preview {
        flex: 0 0 25%;
        max-width: 25%;
    }
}

@media (min-width: 480px) and (max-width: 767.98px) {
    .bds-list-page .bds-col-preview,
    .bds-rent-page .bds-col-preview {
        flex: 0 0 50%;
        max-width: 50%;
    }
}

.bds-project-page .bds-project-list-card {
    border-radius: 16px;
    border: 1px solid rgba(37, 99, 235, .08);
    box-shadow: 0 10px 22px rgba(37, 99, 235, .06);
    transition: transform .15s ease, box-shadow .15s ease;
}

.bds-project-page .bds-project-list-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 28px rgba(37, 99, 235, .12);
}

/* Footer SEO columns */
.bds-footer__seo {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid rgba(148, 163, 184, .22);
}

.bds-footer__seo-title {
    font-size: .82rem;
    font-weight: 800;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: #94a3b8;
    margin-bottom: 10px;
}

.bds-footer__seo-links {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.bds-footer__seo-links a {
    color: #cbd5e1;
    text-decoration: none;
    font-size: .88rem;
    font-weight: 600;
}

.bds-footer__seo-links a:hover,
.bds-footer__seo-links a:focus {
    color: #ffb366;
}

@media (max-width: 767.98px) {
    .bds-footer__seo {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .bds-list-search .bds-results-search-bar {
        flex-wrap: wrap;
    }

    .bds-list-search .bds-results-search-input {
        width: 100%;
        flex: 1 1 100%;
    }

    .bds-list-search .bds-results-search-submit,
    .bds-list-search .bds-results-filter-toggle {
        flex: 1 1 calc(50% - 5px);
        min-width: 0;
    }
}

@media (max-width: 991.98px) {
    .bds-category-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .bds-category-card:nth-child(2) {
        border-right: 0;
    }

    .bds-category-card:nth-child(1),
    .bds-category-card:nth-child(2) {
        border-bottom: 1px solid #ececec;
    }

    .bds-category-card:nth-child(3) {
        border-right: 1px solid #ececec;
    }

    .bds-nhatot-search__pill {
        flex-wrap: wrap;
        border-radius: 20px;
        padding: 10px;
    }

    .bds-nhatot-search__keyword {
        flex: 1 1 100%;
        border-left: 0;
        padding: 0 8px 8px;
        border-bottom: 1px solid #ececec;
    }

    .bds-nhatot-search__filter {
        flex: 1 1 auto;
        border-left: 0;
        padding: 8px 8px 0;
    }

    .bds-nhatot-search__submit {
        flex: 0 0 auto;
        padding: 8px 0 0 4px;
    }

    .bds-nhatot-search__btn {
        width: auto;
        min-width: 108px;
    }
}

@media (max-width: 767.98px) {
    .bds-category-card {
        min-height: 80px;
        gap: 10px;
        padding: 12px 14px;
    }

    .bds-category-card__visual {
        width: 48px;
        height: 48px;
        font-size: 1.35rem;
        border-radius: 12px;
    }

    .bds-category-card__title {
        font-size: .92rem;
    }

    .bds-category-card__meta {
        font-size: .76rem;
    }

    .bds-intent-tabs {
        flex-wrap: wrap;
    }

    .bds-intent-tabs__primary {
        flex: 1 1 100%;
        order: 1;
    }

    .bds-intent-tabs__actions {
        flex: 1 1 100%;
        order: 2;
        justify-content: space-between;
    }

    .bds-intent-post-cta {
        min-height: 40px;
        padding: 0 14px;
        font-size: .84rem;
    }

    .bds-intent-tab {
        min-height: 40px;
        padding: 0 16px;
        font-size: .86rem;
    }

    .bds-intent-more-btn {
        min-height: 40px;
        padding: 0 12px;
        font-size: .82rem;
    }

    .bds-page-hub .bds-feed-section__body > .row-cards {
        display: flex;
        flex-wrap: nowrap;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        gap: 12px;
        margin-left: 0;
        margin-right: 0;
        padding-bottom: 4px;
        scrollbar-width: none;
    }

    .bds-page-hub .bds-feed-section__body > .row-cards::-webkit-scrollbar {
        display: none;
    }

    .bds-page-hub .bds-feed-section__body > .row-cards > [class*="col-"] {
        flex: 0 0 72%;
        max-width: 72%;
        scroll-snap-align: start;
    }

    /* Single-row search pill on mobile — hide dropdowns */
    .bds-nhatot-search__pill {
        flex-wrap: nowrap;
        border-radius: 999px;
        padding: 6px;
    }

    .bds-nhatot-search__keyword {
        flex: 1 1 auto;
        border-bottom: 0;
        padding: 0 12px;
    }

    .bds-nhatot-search__filter {
        display: none;
    }

    .bds-nhatot-search__submit {
        flex: 0 0 auto;
        padding: 0 4px 0 6px;
    }

    .bds-nhatot-search__btn {
        width: auto;
        min-width: 88px;
    }

    .bds-feed-section__title {
        font-size: 1.08rem;
    }

    .bds-promo-banner__image {
        max-height: 164px;
        object-position: center 42%;
    }
}
