.units-list {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 0;
    padding: 0 10px; /* مسافات جانبية متساوية */
    justify-content: center; /* توسيط العناصر أفقيًا */
    font-family: "Almarai", sans-serif;
}

.unit-item {
    position: relative;
    padding: 15px;
    border-radius: 5px 5px 0 0;
    width: calc(33.333% - 10px);
    box-sizing: border-box;
    background-color: #fff;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    margin-bottom: 40px;
    font-family: "Almarai", sans-serif;
}

.unit-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.unit-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    font-family: "Almarai", sans-serif;
}

.unit-title {
    font-weight: bold;
    font-size: 20px;
    color: #333;
    margin: 0;
    font-family: "Almarai", sans-serif;
}

.availability-status {
    padding: 6px 8px;
    border-radius: 5px;
    font-weight: 400;
    font-size: 14px;
    text-align: center;
    color: #fff;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: "Almarai", sans-serif;
}

.available {
    background-color: green;
}

.sold {
    background-color: #d10000;
}

.reserved {
    background-color: #d3a667;
}

.unit-price {
    font-size: 1rem;
    font-weight: bold;
    margin-top: 10px;
    color: #000;
    font-family: "Almarai", sans-serif;
}

.unit-details {
    margin-top: 10px;
    font-family: "Almarai", sans-serif;
}

.unit-details ul {
    display: flex;
    justify-content: space-between;
    padding: 0;
    list-style: none;
    margin: 0;
    font-family: "Almarai", sans-serif;
}

.unit-details li {
    font-size: 16px;
    display: flex;
    align-items: center;
    color: #d3a667;
    font-family: "Almarai", sans-serif;
}

.unit-details img {
    width: 24px;
    height: 24px;
    margin-left: 10px;
}

.currency {
    font-size: 1rem;
    font-weight: normal;
    color: #888;
    font-family: "Almarai", sans-serif;
}

/* زر التحكم في الوحدة */
.unit-button-wrapper {
    position: absolute;
    bottom: -40px; /* مسافة خارج مستطيل البيانات */
    left: 0;
    right: 0;
    text-align: center;
}

.unit-button {
    display: inline-block;
    width: 100%;
    max-width: 100%;
    font-weight: 300;
    margin: 0 auto;
    padding: 4px 8px;
    background-color: #d3a667;
    color: #fff;
    text-decoration: none;
    font-size: 16px;
    text-align: center;
    transition: background-color 0.3s ease;
}

.unit-button:hover {
    background-color: #000;
}

/*----------------- تنسيقات إضافية -------------------*/

.popup-unit-other-info-value {
    background-color: #d3a667;
    padding: 10px;
    margin: 5px 0px 20px 0px;
    font-size: 16px;
    color: #ffffff;
    text-align: center;
    font-family: "Almarai", sans-serif;
}

span.popup-unit-other-info-title {
    font-size: 16px;
    color: #d3a667;
    font-family: "Almarai", sans-serif;
}

.header-section {
    display: flex;
    align-items: center;
}

.header-title {
    flex-basis: 80%;
}

.header-status {
    flex-basis: 10%;
    justify-content: flex-end;
    text-align: right;
}

.header-share {
    flex-basis: 10%;
    justify-content: flex-end;
    position: relative;
    cursor: pointer;
    margin-top: 5px;
}

.share-toggle i {
    font-size: 18px;
    color: #333;
}

.share-dropdown {
    position: absolute;
    top: -6px;
    left: 23px;
    display: none;
    background: #fff;
    border: 1px solid #ddd;
    padding: 5px;
    border-radius: 6px;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
    z-index: 999;
}

.share-dropdown a {
    margin: 0 5px;
    color: #333;
    font-size: 16px;
}

.header-share:hover .share-dropdown {
    display: flex;
    gap: 6px;
}

/* تنسيقات أيقونة المشاركة */

.popup-share-wrapper {
    position: relative;
    display: inline-block;
    margin-right: 10px;
}

.popup-share-toggle {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 18px;
    color: #333;
}

.popup-share-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: #fff;
    border: 1px solid #ddd;
    padding: 8px;
    display: flex;
    gap: 8px;
    z-index: 999;
    border-radius: 5px;
}

.popup-share-menu a {
    font-size: 16px;
    color: #444;
    text-decoration: none;
}

/* تنسيقات النافذة المنبثقة */

.unit-popup-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background-color: rgba(0,0,0,0.5);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.unit-popup-content {
    position: relative;
    font-size: 16px;
    background-color: #fff;
    border-radius: 10px;
    padding: 20px;
    width: 80%;
    max-width: 800px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    overflow: hidden;
    font-family: "Almarai", sans-serif;
}

/* تصميم النافذة للهواتف */

@media (max-width: 768px) {
    .unit-popup-content {
        width: 90%;
        max-height: 70vh;
        overflow-y: auto;
    }
}

/* رأس النافذة المنبثقة */

.popup-unit-title {
    font-size: 24px;
    font-weight: bold;
    color: #333;
    margin: 0;
}

.popup-availability-status {
    padding: 6px 10px;
    border-radius: 5px;
    font-weight: 400;
    font-size: 14px;
    text-align: center;
    color: white;
    display: inline-block;
    font-family: "Almarai", sans-serif;
}

.popup-unit-price {
    font-size: 20px;
    font-weight: bold;
    margin-top: 15px;
    color: #000;
    font-family: "Almarai", sans-serif;
}

/* تفاصيل الوحدة في النافذة المنبثقة */

.popup-unit-details {
    margin-top: 15px;
}

.popup-unit-details ul {
    display: flex;
    justify-content: space-between;
    padding: 0;
    list-style: none;
    margin: 0;
    flex-wrap: wrap;
}

.popup-unit-details li {
    font-size: 16px;
    display: flex;
    align-items: center;
    color: #d3a667;
    font-family: "Almarai", sans-serif;
    margin: 5px 0;
}

.popup-unit-details img {
    width: 24px;
    height: 24px;
    margin-left: 10px;
}


/* استجابات */

@media (max-width: 1024px) {
    .unit-item {
        width: calc(50% - 10px);
    }
}

@media (max-width: 600px) {
    .unit-item {
        width: 100%;
    }

    .unit-details ul {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
}
