/**
 * Sam BDS - Frontend CSS
 * 
 * Style cho trang chi tiết BĐS, danh sách BĐS
 */

/* ============================================
   BIẾN MÀU CHỦ ĐẠO
   ============================================ */
:root {
    --sb-blue-dark: #1B4F8C;
    --sb-blue-light: #2DAEE5;
    --sb-orange: #F26522;
    --sb-white: #FFFFFF;
    --sb-gray-50: #F8F9FA;
    --sb-gray-100: #F1F3F5;
    --sb-gray-200: #E9ECEF;
    --sb-gray-300: #DEE2E6;
    --sb-gray-500: #ADB5BD;
    --sb-gray-700: #495057;
    --sb-gray-900: #212529;
}


/* ============================================
   CONTAINER
   ============================================ */
.sambds-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 20px;
}


/* ============================================
   BREADCRUMB
   ============================================ */
.sambds-breadcrumb {
    background: var(--sb-gray-50);
    padding: 12px 0;
    border-bottom: 1px solid var(--sb-gray-200);
    font-size: 13px;
    margin-bottom: 24px;
}

.sambds-breadcrumb a {
    color: var(--sb-blue-light);
    text-decoration: none;
    transition: color 0.2s;
}

.sambds-breadcrumb a:hover {
    color: var(--sb-orange);
}

.sambds-breadcrumb .sep {
    color: var(--sb-gray-500);
    margin: 0 8px;
}

.sambds-breadcrumb .current {
    color: var(--sb-gray-700);
    font-weight: 500;
}


/* ============================================
   TITLE & META
   ============================================ */
.sambds-header {
    margin-bottom: 24px;
}

.sambds-title {
    font-size: 28px;
    font-weight: 700;
    color: var(--sb-blue-dark);
    margin: 0 0 12px;
    line-height: 1.3;
}

.sambds-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    color: var(--sb-gray-700);
    font-size: 14px;
}

.sambds-meta-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.sambds-meta-item strong {
    color: var(--sb-blue-dark);
    background: var(--sb-gray-100);
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 13px;
}


/* ============================================
   GALLERY FRONTEND
   ============================================ */
.sambds-gallery-frontend {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 12px;
    margin-bottom: 32px;
    border-radius: 12px;
    overflow: hidden;
}

.sambds-gallery-main {
    aspect-ratio: 4/3;
    background: var(--sb-gray-100);
    overflow: hidden;
    border-radius: 12px;
}

.sambds-gallery-main a,
.sambds-gallery-main img {
    width: 100%;
    height: 100%;
    display: block;
}

.sambds-gallery-main img {
    object-fit: cover;
    transition: transform 0.4s;
}

.sambds-gallery-main a:hover img {
    transform: scale(1.03);
}

.sambds-gallery-thumbs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.sambds-gallery-thumb,
.sambds-gallery-more {
    aspect-ratio: 1;
    background: var(--sb-gray-100);
    border-radius: 8px;
    overflow: hidden;
    position: relative;
    display: block;
}

.sambds-gallery-thumb img,
.sambds-gallery-more img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s;
}

.sambds-gallery-thumb:hover img,
.sambds-gallery-more:hover img {
    transform: scale(1.05);
}

.sambds-gallery-more {
    position: relative;
}

.sambds-gallery-more::after {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(27, 79, 140, 0.7);
}

.sambds-gallery-more span {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--sb-white);
    font-weight: 600;
    font-size: 16px;
    z-index: 2;
}


/* ============================================
   LAYOUT 2 CỘT
   ============================================ */
.sambds-layout {
    display: grid;
    grid-template-columns: 1fr 360px;
    gap: 32px;
    margin-bottom: 40px;
}


/* ============================================
   PRICE BOX
   ============================================ */
.sambds-price-box {
    background: linear-gradient(135deg, #FFF3E0 0%, #FFE0B2 100%);
    border: 2px solid var(--sb-orange);
    border-radius: 12px;
    padding: 20px 24px;
    margin-bottom: 24px;
}

.sambds-price-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--sb-orange);
    letter-spacing: 1px;
    margin-bottom: 6px;
}

.sambds-price-value {
    font-size: 32px;
    font-weight: 700;
    color: var(--sb-orange);
    line-height: 1.2;
}

.sambds-price-value > span {
    font-size: 32px !important;
    color: var(--sb-orange) !important;
    font-weight: 700 !important;
}

.sambds-price-per-m2 {
    margin-top: 8px;
    color: var(--sb-gray-700);
    font-size: 14px;
}


/* ============================================
   QUICK INFO GRID
   ============================================ */
.sambds-quick-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px;
    margin-bottom: 32px;
}

.sambds-info-item {
    background: var(--sb-white);
    border: 1px solid var(--sb-gray-200);
    border-radius: 10px;
    padding: 16px 12px;
    text-align: center;
    transition: all 0.2s;
}

.sambds-info-item:hover {
    border-color: var(--sb-blue-light);
    box-shadow: 0 4px 12px rgba(45, 174, 229, 0.1);
    transform: translateY(-2px);
}

.sambds-info-icon {
    font-size: 24px;
    margin-bottom: 6px;
}

.sambds-info-label {
    font-size: 12px;
    color: var(--sb-gray-700);
    margin-bottom: 4px;
}

.sambds-info-value {
    font-size: 16px;
    font-weight: 600;
    color: var(--sb-blue-dark);
}


/* ============================================
   SECTIONS
   ============================================ */
.sambds-section {
    margin-bottom: 36px;
}

.sambds-section-title {
    font-size: 22px;
    font-weight: 700;
    color: var(--sb-blue-dark);
    margin: 0 0 16px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--sb-blue-light);
}

.sambds-description {
    font-size: 16px;
    line-height: 1.8;
    color: var(--sb-gray-900);
}

.sambds-description h2 {
    font-size: 20px;
    color: var(--sb-blue-dark);
    margin: 24px 0 12px;
    font-weight: 600;
}

.sambds-description ul {
    padding-left: 24px;
}

.sambds-description ul li {
    margin-bottom: 6px;
}


/* ============================================
   SPECS TABLE
   ============================================ */
.sambds-specs-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--sb-white);
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--sb-gray-200);
}

.sambds-specs-table th,
.sambds-specs-table td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid var(--sb-gray-200);
    font-size: 14px;
}

.sambds-specs-table tr:last-child th,
.sambds-specs-table tr:last-child td {
    border-bottom: none;
}

.sambds-specs-table th {
    width: 40%;
    color: var(--sb-gray-700);
    font-weight: 500;
    background: var(--sb-gray-50);
}

.sambds-specs-table td {
    color: var(--sb-gray-900);
}


/* ============================================
   AMENITIES GRID
   ============================================ */
.sambds-amenities-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 12px;
}

.sambds-amenity-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background: var(--sb-white);
    border: 1px solid var(--sb-gray-200);
    border-radius: 10px;
    transition: all 0.2s;
}

.sambds-amenity-item:hover {
    border-color: var(--sb-blue-light);
    background: #F0F9FF;
}

.sambds-amenity-icon {
    font-size: 22px;
}

.sambds-amenity-label {
    font-size: 14px;
    color: var(--sb-gray-900);
    font-weight: 500;
}


/* ============================================
   MAP
   ============================================ */
.sambds-map-wrapper {
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--sb-gray-200);
}


/* ============================================
   SIDEBAR - CONTACT BOX
   ============================================ */
.sambds-sidebar {
    position: sticky;
    top: 24px;
    align-self: start;
}

.sambds-contact-box {
    background: var(--sb-white);
    border: 2px solid var(--sb-orange);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 16px;
}

.sambds-contact-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--sb-gray-200);
}

.sambds-contact-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--sb-blue-dark), var(--sb-blue-light));
    color: var(--sb-white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 18px;
}

.sambds-contact-name {
    font-size: 16px;
    font-weight: 600;
    color: var(--sb-blue-dark);
    line-height: 1.2;
}

.sambds-contact-role {
    font-size: 12px;
    color: var(--sb-gray-700);
}


/* ============================================
   BUTTONS
   ============================================ */
.sambds-btn {
    display: block;
    width: 100%;
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    margin-bottom: 8px;
    color: var(--sb-white);
}

.sambds-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    color: var(--sb-white);
    text-decoration: none;
}

.sambds-btn-call {
    background: var(--sb-orange);
}

.sambds-btn-call:hover {
    background: #E55510;
}

.sambds-btn-zalo {
    background: var(--sb-blue-light);
}

.sambds-btn-zalo:hover {
    background: #1E94CA;
}

.sambds-btn-mess {
    background: #1877F2;
}

.sambds-btn-mess:hover {
    background: #1062CC;
}

.sambds-btn-submit {
    background: var(--sb-blue-dark);
    margin-top: 8px;
}

.sambds-btn-submit:hover {
    background: #143D6F;
}


/* ============================================
   BOOKING FORM
   ============================================ */
.sambds-booking-box {
    background: var(--sb-white);
    border: 1px solid var(--sb-gray-200);
    border-radius: 12px;
    padding: 20px;
}

.sambds-booking-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--sb-blue-dark);
    margin: 0 0 4px;
}

.sambds-booking-desc {
    font-size: 13px;
    color: var(--sb-gray-700);
    margin: 0 0 16px;
}

.sambds-booking-form input,
.sambds-booking-form textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--sb-gray-300);
    border-radius: 6px;
    font-size: 14px;
    margin-bottom: 10px;
    font-family: inherit;
    transition: border 0.2s;
    box-sizing: border-box;
}

.sambds-booking-form input:focus,
.sambds-booking-form textarea:focus {
    outline: none;
    border-color: var(--sb-blue-light);
    box-shadow: 0 0 0 3px rgba(45, 174, 229, 0.1);
}

.sambds-booking-form textarea {
    resize: vertical;
    min-height: 80px;
}

.sambds-booking-note {
    font-size: 11px;
    color: var(--sb-gray-500);
    font-style: italic;
    text-align: center;
    margin: 12px 0 0;
}


/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1024px) {
    .sambds-layout {
        grid-template-columns: 1fr;
    }

    .sambds-sidebar {
        position: static;
    }
}

@media (max-width: 768px) {
    .sambds-title {
        font-size: 22px;
    }

    .sambds-gallery-frontend {
        grid-template-columns: 1fr;
    }

    .sambds-gallery-thumbs {
        grid-template-columns: repeat(4, 1fr);
    }

    .sambds-quick-info {
        grid-template-columns: repeat(2, 1fr);
    }

    .sambds-price-value {
        font-size: 26px;
    }

    .sambds-meta {
        gap: 10px;
        font-size: 13px;
    }

    .sambds-section-title {
        font-size: 18px;
    }
}


/* ============================================
   HIDE ASTRA DEFAULT TITLE & ENTRY-HEADER 
   trên trang single BĐS (vì đã có title riêng)
   ============================================ */
.single-bat_dong_san .entry-header,
.single-bat_dong_san .ast-archive-title,
.single-bat_dong_san header.entry-header,
.single-bat_dong_san .ast-blog-single-element {
    display: none !important;
}

.single-bat_dong_san .site-content > .ast-container {
    max-width: 100%;
    padding: 0;
}

.single-bat_dong_san .ast-article-single {
    padding: 0;
    border: none;
    background: transparent;
}

.single-bat_dong_san .entry-content {
    margin-top: 0;
}
