@charset "utf-8";

/* ==========================================================================
   AGENCY HUB (TRANG CHỦ HỆ THỐNG ĐẠI LÝ)
   ========================================================================== */
.agency-hub-wrapper {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif !important;
    padding: 12px;
    background: #f8f9fa;
    box-sizing: border-box;
    text-align: left !important;
}

/* Tiêu đề trang */
.agency-hub-title {
    font-size: 18px !important;
    font-weight: 800 !important;
    color: #1b5e20 !important;
    text-transform: uppercase;
    margin: 4px 0 14px 0;
    padding-bottom: 8px;
    border-bottom: 2px solid #2e7d32;
    text-align: left !important;
}

/* Danh sách khu vực dạng Lưới (Grid) */
.agency-hub-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-bottom: 16px;
}

/* Card bấm chọn từng Khu vực / Tỉnh thành */
.agency-hub-item {
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    padding: 12px 10px;
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none !important;
    box-shadow: 0 2px 5px rgba(0,0,0,0.04);
    transition: all 0.2s ease;
}
.agency-hub-item:active {
    background: #e8f5e9;
    border-color: #2e7d32;
}

.agency-hub-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    fill: #2e7d32;
}

.agency-hub-name {
    font-size: 14px !important;
    font-weight: 700 !important;
    color: #222222 !important;
    line-height: 1.3;
    text-align: left !important;
}

/* Khung ảnh Banner Showroom */
.agency-hub-banner {
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 6px rgba(0,0,0,0.05);
    margin-top: 10px;
}
.agency-hub-banner img {
    width: 100% !important;
    height: auto !important;
    display: block;
}
.agency-hub-banner-caption {
    padding: 10px;
    font-size: 13px;
    font-weight: 600;
    color: #555;
    text-align: center;
    background: #fff;
}


/* ==========================================================================
   1. DANH SÁCH ĐẠI LÝ MOBILE (KHẮC PHỤC LỖI CĂN GIỮA)
   ========================================================================== */
.agency-mb-container {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif !important;
    padding: 10px;
    color: #333;
    box-sizing: border-box;
    text-align: left !important;
}

/* Breadcrumb SEO */
.agency-mb-breadcrumb {
    font-size: 13px;
    margin-bottom: 12px;
    line-height: 1.4;
    text-align: left !important;
}
.agency-mb-breadcrumb a {
    color: #2e7d32;
    text-decoration: none;
    font-weight: 500;
}
.agency-mb-breadcrumb h1 {
    font-size: 13px;
    display: inline;
    font-weight: 600;
    margin: 0;
    padding: 0;
}

/* Bộ lọc Select */
.agency-mb-filters {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
}
.agency-mb-select {
    flex: 1;
    height: 38px;
    padding: 0 10px;
    font-size: 13px;
    border: 1px solid #ccc;
    border-radius: 6px;
    background-color: #fff;
    outline: none;
    text-overflow: ellipsis;
    white-space: nowrap;
    overflow: hidden;
}

/* Danh sách Card đại lý */
.agency-mb-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
}
.agency-mb-card {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.04);
    text-align: left !important; /* Ép toàn bộ card căn trái */
}

/* Header của Card đại lý */
.agency-mb-header {
    background-color: #f4f4f4;
    padding: 10px 12px;
    border-bottom: 1px solid #e0e0e0;
    text-align: left !important;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.agency-mb-title {
    font-size: 14px !important;
    font-weight: 700 !important;
    margin: 0;
    line-height: 1.35;
    text-align: left !important;
    flex-grow: 1;
}
.agency-mb-title a {
    color: #222 !important;
    text-decoration: none;
    text-align: left !important;
    display: block;
}

/* Nội dung địa chỉ */
.agency-mb-body {
    padding: 10px 12px;
    font-size: 13px !important;
    color: #555;
    line-height: 1.45;
    text-align: left !important; /* Đảm bảo địa chỉ căn trái */
}

/* Nút bấm xem chi tiết */
.agency-mb-footer {
    padding: 0 12px 12px;
    text-align: center !important; /* Giữ riêng nút bấm ở giữa */
}
.agency-mb-btn {
    display: inline-block;
    padding: 6px 18px;
    font-size: 12px;
    font-weight: 600;
    color: #2e7d32;
    border: 1px solid #2e7d32;
    border-radius: 20px;
    text-decoration: none;
    background: #fff;
}

/* Đại lý nổi bật (Trang danh sách) */
.agency-mb-card.featured {
    border: 2px solid #2e7d32;
    box-shadow: 0 4px 12px rgba(46, 125, 50, 0.18);
    position: relative;
}
.agency-mb-card.featured .agency-mb-header {
    background: linear-gradient(135deg, #2e7d32 0%, #1b5e20 100%);
    color: #fff;
}
.agency-mb-card.featured .agency-mb-title a {
    color: #ffffff !important;
}
.agency-badge-hot {
    background-color: #ffeb3b;
    color: #1b5e20;
    font-size: 10px;
    font-weight: 800;
    padding: 2px 7px;
    border-radius: 10px;
    text-transform: uppercase;
    white-space: nowrap;
    margin-left: 6px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
    flex-shrink: 0;
}
.agency-mb-card.featured .agency-mb-btn {
    background-color: #2e7d32;
    color: #fff;
    box-shadow: 0 2px 5px rgba(46, 125, 50, 0.3);
}

/* Phân trang */
.agency-mb-pagination {
    margin-top: 20px;
    margin-bottom: 10px;
    text-align: center !important;
    font-size: 14px;
}
.agency-mb-pagination a, .agency-mb-pagination span {
    display: inline-block;
    padding: 5px 11px;
    margin: 0 2px;
    border: 1px solid #ddd;
    border-radius: 4px;
    color: #333;
    text-decoration: none;
    font-size: 13px;
}
.agency-mb-pagination span.hientai {
    background-color: #2e7d32;
    color: #fff;
    border-color: #2e7d32;
    font-weight: bold;
}


/* ==========================================================================
   2. CHI TIẾT ĐẠI LÝ
   ========================================================================== */
.agency-detail-wrapper {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif !important;
    padding: 10px;
    color: #333333;
    box-sizing: border-box;
    text-align: left !important;
}

.agency-detail-breadcrumb {
    font-size: 14px !important;
    margin-bottom: 14px;
    line-height: 1.4;
    text-align: left !important;
}
.agency-detail-breadcrumb a {
    color: #2e7d32;
    text-decoration: none;
    font-weight: 500;
}

.agency-detail-card {
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
    margin-bottom: 16px;
    text-align: left !important;
}

.agency-detail-header {
    background: #f4f4f4;
    color: #222222;
    padding: 16px;
    border-bottom: 1px solid #e0e0e0;
    text-align: left !important;
}
.agency-detail-title {
    font-size: 19px !important;
    font-weight: 700 !important;
    margin: 0;
    line-height: 1.35;
    color: #222222 !important;
    text-align: left !important;
}

/* Kiểu dáng cho Đại lý nổi bật */
.agency-detail-card.featured {
    border: 2px solid #2e7d32;
    box-shadow: 0 4px 14px rgba(46, 125, 50, 0.18);
}
.agency-detail-card.featured .agency-detail-header {
    background: linear-gradient(135deg, #2e7d32 0%, #1b5e20 100%);
    border-bottom: none;
}
.agency-detail-card.featured .agency-detail-title {
    color: #ffffff !important;
}

.agency-detail-body {
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    text-align: left !important;
}

.agency-info-row {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    text-align: left !important;
}
.agency-info-icon {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
    margin-top: 2px;
}
.agency-info-content {
    flex: 1;
    line-height: 1.5;
    text-align: left !important;
}
.agency-info-label {
    font-size: 12px !important;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #666666 !important;
    font-weight: 700 !important;
    display: block;
    margin-bottom: 3px;
    text-align: left !important;
}

/* Địa chỉ & Số điện thoại */
.agency-info-address {
    font-size: 16px !important;
    font-weight: 700 !important;
    color: #1b5e20 !important;
    line-height: 1.5;
    text-align: left !important;
}

.agency-info-phone {
    font-size: 17px !important;
    font-weight: 800 !important;
    color: #d32f2f !important;
    line-height: 1.5;
    text-align: left !important;
}

/* Card Mô tả thông tin bài viết */
.agency-desc-card {
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    padding: 16px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
    text-align: left !important;
}
.agency-desc-heading {
    font-size: 14px !important;
    font-weight: 800 !important;
    color: #2e7d32 !important;
    text-transform: uppercase;
    border-bottom: 2px solid #2e7d32;
    padding-bottom: 6px;
    margin-bottom: 12px;
    letter-spacing: 0.5px;
    text-align: left !important;
}

/* Ghi đè Font, Size, Căn Lề dính từ CSDL */
.agency-desc-text,
.agency-desc-text * {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif !important;
    font-size: 15px !important;
    line-height: 1.65 !important;
    color: #333333 !important;
    text-align: left !important;
}

/* Giữ lại thuộc tính In đậm & In nghiêng */
.agency-desc-text strong, 
.agency-desc-text strong *,
.agency-desc-text b,
.agency-desc-text b * {
    font-weight: 700 !important;
}
.agency-desc-text em,
.agency-desc-text i {
    font-style: italic !important;
}

/* Tự động co giãn hình ảnh trong bài viết mô tả */
.agency-desc-text img {
    max-width: 100% !important;
    height: auto !important;
    display: block !important;
    margin: 12px auto !important;
    border-radius: 8px;
}