.residential {
    width: 1200px;
    margin: auto;
    background: #fff;
    box-shadow: 0px 9px 20px 0px rgba(153, 175, 224, 0.3);
    border-radius: 24px;
    margin-bottom: 67px;
}

.residential_tabs {
    display: flex;
    align-items: center;
    padding: 30px;
    gap: 24px;
    border-bottom: 1px solid #E6EAF3;
}

.residential_tabs_item {
    width: 252px;
    height: 40px;
    background: #fff;
    border-radius: 32px;
    border: 2px solid #DEDEDE;
    font-weight: 500;
    font-size: 16px;
    color: #090025;
    line-height: 40px;
    text-align: center;
    font-style: normal;
    cursor: pointer;
}
.mbx{
    margin-bottom: 24px;
}
.active {
    color: #6D4CD3;
    border: 2px solid #845CFF;

}

.Residential_top {
    padding: 30px;
    border-bottom: 1px solid #E6EAF3;
}

.Residential_top_top {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.Residential_top_title {
    font-weight: bold;
    font-size: 36px;
    color: #090025;
    line-height: 36px;
    text-align: center;
    font-style: normal;
}

.residentialModelLeft_headSearch {
    padding: 0 12px;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    width: 240px;
    height: 36px;
    border-radius: 18px;
    border: 1px solid #DFDFDF;
}

.residentialModelLeft_headSearch img {
    width: 16px;
    height: 16px;
    margin-right: 12px;
    vertical-align: middle;
}

.residentialModelLeft_headSearch input {
    border: none;
}

.residentialModelLeft_headSearch input::placeholder {
    font-weight: 400;
    font-size: 14px;
    color: #CCCCCC;
}

.Residential_top_top_right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.Residential_top_top_right_btn {
    width: 120px;
    height: 36px;
    border-radius: 18px;
    border: 1px solid #845CFF;
    font-weight: 400;
    font-size: 14px;
    color: #845CFF;
    line-height: 36px;
    text-align: center;
    font-style: normal;
    cursor: pointer;
}

.Residential_top_top_right_btn:hover {
    background: #845CFF;
    color: #fff;
}

.Residential_top_desc {
    margin-top: 18px;
}

.Residential_top_desc_span1 {
    font-weight: 400;
    font-size: 16px;
    color: #ACA8BA;
    line-height: 16px;
    text-align: left;
    font-style: normal;
    margin-right: 30px;
}

.Residential_top_desc_span2 {
    font-weight: 400;
    font-size: 16px;
    color: #845CFF;
    line-height: 16px;
    text-align: right;
    font-style: normal;
    cursor: pointer;
}

.Residential_con_item_list_item_right {
    flex: 1;
}

.Residential_con {
    height: 600px;
    overflow: auto;
    padding: 0 30px;
    padding-bottom: 30px;
}

.Residential_con_item {
    margin-top: 35px;
}

.Residential_con_item_title {
    font-weight: 500;
    font-size: 18px;
    color: #090025;
    line-height: 18px;
    text-align: left;
    font-style: normal;
    margin-bottom: 24px;
}

.Residential_con_item_list {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px 25px;
}

.Residential_con_item_list_item {
    display: flex;
    gap: 12px;
    border-radius: 12px;
    border: 1px solid #CFCFCF;
    padding: 18px;
    cursor: pointer;
}

.Residential_con_item_list_item:hover {
    border: 1px solid #845CFF;
}

.Residential_con_item_list_item_left {
    width: 20px;
    height: 20px;
}

.Residential_con_item_list_item_title {
    font-weight: 300;
    font-size: 14px;
    color: #181818;
    line-height: 14px;
    text-align: left;
    font-style: normal;
    margin-bottom: 12px;
}

.Residential_con_item_list_item_price_box {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.Residential_con_item_list_item_price {
    font-weight: 400;
    font-size: 18px;
    color: #FF6F3C;
    line-height: 24px;
    text-align: left;
    font-style: normal;
}

.quantity_control {
    display: flex;
    align-items: center;
    gap: 15px;
}

.quantity_control img {
    width: 24px;
    height: 24px;
}

.quantity_control span {
    font-weight: 400;
    font-size: 14px;
    color: #202124;
    line-height: 18px;
    text-align: center;
    font-style: normal;
}

.quantity_control img:hover {
    transform: scale(1.1);
}

.quantity-display {
    width: 30px;
    text-align: center;
    font-size: 14px;
    color: #333;
}

/* 数量为0时的默认状态 - 隐藏控件 */
.Residential_con_item_list_item:not(.has-quantity) .quantity_control,
.Residential_con_item_list_item:not(.has-quantity) .view-selection-btn {
    opacity: 0;
    transform: scale(0.8);
    pointer-events: none;
    transition: all 0.3s ease;
}

/* 鼠标移入时显示控件（数量为0时） */
.Residential_con_item_list_item:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.Residential_con_item_list_item:hover:not(.has-quantity) .quantity_control,
.Residential_con_item_list_item:hover:not(.has-quantity) .view-selection-btn {
    opacity: 1;
    transform: scale(1);
    pointer-events: auto;
}

/* 数量大于0时强制显示控件 */
.Residential_con_item_list_item.has-quantity .quantity_control,
.Residential_con_item_list_item.has-quantity .view-selection-btn {
    opacity: 1;
    transform: scale(1);
    pointer-events: auto;
}

.Residential_bottom {
    padding: 36px 30px;
    background: #FFFFFF;
    box-shadow: 0px -4px 4px 0px rgba(0, 0, 0, 0.08);
    border-radius: 0px 0px 24px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
}

.Residential_bottom_left_title {
    font-weight: bold;
    font-size: 20px;
    color: #090025;
    line-height: 20px;
    text-align: left;
    font-style: normal;
    margin-bottom: 18px;
}

.Residential_bottom_left_Location {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
}

.Residential_bottom_left_Location_left,
.Residential_bottom_left_Total_left {
    font-weight: 400;
    font-size: 14px;
    color: #ACA8BA;
    line-height: 14px;
    text-align: left;
    font-style: normal;
}

.Residential_bottom_left_Location_center {
    font-weight: 300;
    font-size: 14px;
    color: #090025;
    line-height: 14px;
    text-align: left;
    font-style: normal;
    margin-left: 7px;
    margin-right: 24px;
}

.Residential_bottom_left_Location_right {
    font-weight: 400;
    font-size: 14px;
    color: #845CFF;
    line-height: 14px;
    text-align: left;
    font-style: normal;
    cursor: pointer;
}

.Residential_bottom_left_Total {
    display: flex;
    align-items: center;
}

.Residential_bottom_left_Total_right {
    font-weight: 400;
    font-size: 14px;
    color: #090025;
    line-height: 14px;
    text-align: left;
    font-style: normal;
    margin-left: 7px;
}

.Residential_bottom_right {
    display: flex;
    align-items: center;
}

.Residential_bottom_right_left {
    font-weight: 400;
    font-size: 16px;
    color: #ACA8BA;
    line-height: 16px;
    text-align: left;
    font-style: normal;
    margin-right: 5px;
}

.Residential_bottom_right_center {
    font-weight: 500;
    font-size: 22px;
    color: #FF6F3C;
    line-height: 22px;
    text-align: left;
    font-style: normal;
}

.Residential_bottom_right_right {
    width: 196px;
    height: 48px;
    background: #845CFF;
    border-radius: 24px;
    font-weight: bold;
    font-size: 16px;
    color: #FFFFFF;
    line-height: 48px;
    text-align: center;
    font-style: normal;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-left: 24px;
}

.Residential_bottom_right_right:hover {
    background: #6a47e0;
}

.modal-overlay {
    position: absolute;
    right: 190px;
    bottom: 90px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
    background: none;
    pointer-events: none;

}

.modal-overlay.activem {
    opacity: 1;
    visibility: visible;
}

.modal {
    background: #fff;
    width: 90%;
    width: 538px;
    max-height: 60vh;
    padding: 24px 32px;
    overflow-y: auto;
    transform: translateY(-20px);
    transition: transform 0.3s;
    box-shadow: 0px 2px 12px 0px rgba(0, 0, 0, 0.15);
    border-radius: 8px;
    pointer-events: auto;
}

.modal-overlay.activem .modal {
    transform: translateY(0);
}


.selection-list {
    margin-bottom: 15px;
}

.selection-header {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 10px;
    padding: 8px 10px;
    border-bottom: 1px solid #eee;
    font-weight: 500;
    font-size: 16px;
    color: #090025;
    line-height: 18px;
    text-align: left;
    font-style: normal;
}

.selection-item {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 10px;
    padding: 13px 17px;
    font-size: 14px;
    align-items: center;
    border-bottom: 1px solid #E6EAF3;
}


.empty-tip {
    text-align: center;
    padding: 30px 0;
    color: #999;
    font-size: 14px;
}

.selection-item-name {
    font-weight: 300;
    color: #090025;
    line-height: 12px;
    text-align: left;
    font-style: normal;
}

.selection-item-price {
    display: flex;
    align-items: center;
}

.selection-item-price-num {
    font-weight: 300;
    font-size: 12px;
    color: #FF6F3C;
    line-height: 12px;
    text-align: center;
    font-style: normal;
}

.selection-item-price-unit {
    font-weight: 300;
    font-size: 12px;
    color: #181818;
    line-height: 12px;
    text-align: center;
    font-style: normal;
}

.selection-item-amount {
    font-weight: 300;
    font-size: 12px;
    color: #090025;
    line-height: 12px;
    text-align: center;
    font-style: normal;
}

.personalized {
    padding: 48px 0;
    background: rgba(108, 93, 211, 0.13);

}

.personalized_bg {
    width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
}

.personalized_bg_left_title {
    margin-bottom: 16px;
}

.personalized_bg_right {
    margin-left: 168px;
}

.personalized_bg_left_title {
    font-weight: bold;
    font-size: 28px;
    color: #090025;
    line-height: 28px;
    text-align: left;
    font-style: normal;
    text-transform: none;
}

.personalized_bg_right {
    width: 224px;
    height: 48px;
    background: #845CFF;
    box-shadow: 0px 10px 10px 0px rgba(108, 93, 211, 0.24);
    border-radius: 24px;
    font-weight: bold;
    font-size: 16px;
    color: #FFFFFF;
    line-height: 48px;
    text-align: center;
    font-style: normal;
    cursor: pointer;
    position: relative;
    text-transform: uppercase;
}

.personalized_bg_right:hover {
    background: #6a47e0;
}

.personalized_bg_right_fc {
    font-weight: 400;
    font-size: 12px;
    color: #845CFF;
    line-height: 22px;
    text-align: center;
    font-style: normal;
    width: 96px;
    height: 22px;
    background: #FFFFFF;
    border-radius: 11px;
    border: 1px solid #845CFF;
    position: absolute;
    right: 10px;
    top: -10px;
}

/* 响应式 */
@media screen and (max-width: 1200px) {
    .residential {
        width: 98%;
    }
    .personalized_bg{
        width: calc(100% - 40px);
        padding: 20px;
        flex-direction: column;
        gap: 20px;
    }
    .personalized_bg_right{
        margin-left: 0;
    }
    .personalized_bg_left_title{
        font-size: 16px;
    }
    .personalized_bg_left_descBox{
        font-size: 12px;
    }
    .personalized_bg_left_descBox span{
        display: block;
    }
    .personalized_bg{
        align-items: flex-start;
    }
}

@media screen and (max-width: 768px) {
    .selection-header {
        grid-template-columns: 2fr 1fr 1fr;
        font-size: 12px;
        text-align: center;
    }

    .selection-item {
        grid-template-columns: 2fr 1fr 1fr;
    }

    .modal-overlay {
        right: 0;
    }

    .modal {
        width: 90%;
    }
}