cat > /home/aqarnet/public_html/wp-content/themes/houzez-child/style.css <<'EOF'
/*
Theme Name: Houzez Child
Theme URI: http://www.favethemes.com/
Author: Favethemes
Author URI: http://www.favethemes.com/
Description: Houzez Child Theme
Version: 1.0
Template: houzez
*/

@import url("../houzez/style.css");

/* ==========================================================================
   1. حماية لوحة التحكم وصفحة إضافة عقار (Dashboard Protection)
   ========================================================================== */
body.page-template-template-user-dashboard-submit .listing-tabs,
body.page-template-template-user-dashboard-submit .tab-content,
body.page-template-template-user-dashboard-submit .tab-pane {
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
}

/* ==========================================================================
   2. تنسيقات خاصة بصفحة عرض العقار فقط (Single Property Only)
   ========================================================================== */

.single-property .listing-tabs.horizontal-listing-tabs,
.single-property .listing-tabs.vertical-listing-tabs {
    display: none !important;
}

.single-property #frm_check,
.single-property #frm_add_prop,
.single-property #btn_get_ad,
.single-property #btn_add_property,
.single-property #btn_save_draft,
.single-property #btn_view_property {
    display: none !important;
}

.single-property .tab-content > .tab-pane {
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
}

/* ==========================================================================
   3. تنسيقات القالب الموحد (Unified Template Styles)
   ========================================================================== */

.property-unified {
    max-width: 1200px;
    margin: 0 auto;
}

.property-unified .section {
    margin: 24px 0;
    clear: both;
}

.property-unified .section-title {
    font-size: 20px;
    font-weight: 700;
    background: #2b3554;
    color: #fff;
    padding: 8px 14px;
    display: inline-block;
    border-radius: 4px;
    margin-bottom: 15px;
}

.property-unified .box {
    background: #fff;
    border: 1px solid #e7e9ee;
    border-radius: 8px;
    padding: 20px;
}

/* تنسيق صورة الغلاف (Hero) */
.aqar-hero img {
    width: 100%;
    height: auto;
    max-height: 550px;
    object-fit: cover;
    display: block;
}

/* تنسيق شبكة الصور الفرعية */
.property-unified .hz-gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    grid-gap: 10px;
}

.property-unified .hz-gallery-grid .gallery-thumb img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-radius: 6px;
    display: block;
    transition: opacity 0.3s;
}

.property-unified .hz-gallery-grid .gallery-thumb img:hover {
    opacity: 0.9;
}

/* === تنسيق الحقول (الألوان الجديدة) === */
.property-unified .hz-field {
    display: flex;
    align-items: baseline;
    padding: 10px 0;
    border-bottom: 1px solid #f0f0f0;
}

.property-unified .hz-field:last-child {
    border-bottom: none;
}

/* العنوان: ذهبي */
.property-unified .hz-label {
    font-weight: 700;
    color: #c6a35a;
    min-width: 140px;
    font-size: 15px;
}

.property-unified .hz-label:after {
    content: ":";
    margin: 0 5px;
}

/* القيمة: أزرق غامق وعريض */
.property-unified .hz-value {
    color: #2b3554;
    font-weight: 700;
    font-size: 15px;
    line-height: 1.6;
    flex: 1;
}

/* شبكة العمودين (Details Grid) */
.property-unified .hz-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 40px;
}

@media (max-width: 768px) {
    .property-unified .hz-grid-2 {
        grid-template-columns: 1fr;
        gap: 0;
    }
    .property-unified .hz-field {
        flex-direction: column;
    }
    .property-unified .hz-label {
        margin-bottom: 5px;
    }
}

/* === قسم نظرة عامة (Overview) === */
.property-unified .ov-line {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.property-unified .ov-item {
    display: flex;
    align-items: center;
    background: #f9f9f9;
    padding: 10px 15px;
    border-radius: 6px;
    border: 1px solid #eee;
}

.property-unified .ov-item i {
    color: #c6a35a;
    font-size: 18px;
    margin-left: 10px;
}

.property-unified .ov-item .ov-label {
    font-weight: 700;
    margin-left: 5px;
    color: #c6a35a;
}

.property-unified .ov-item .ov-label:after {
    content: ":";
}

.property-unified .ov-item .ov-value {
    color: #2b3554;
    font-weight: 700;
}

/* === تنسيق الخريطة المخصصة === */
.aqar-custom-map-container {
    width: 100%;
    margin-top: 15px;
    border: 1px solid #eee;
    border-radius: 8px;
    overflow: hidden;
}

.aqar-iframe-map {
    display: block;
    width: 100%;
    height: 400px;
    border: 0;
}

/* === الباركود === */
.qr-wrap {
    margin-top: 20px;
    text-align: center;
    display: inline-block;
    padding: 10px;
    border: 1px solid #eee;
    border-radius: 8px;
}

.qr-caption {
    margin-top: 5px;
    font-size: 13px;
}

/* ==========================================================================
   4. إخفاء العناصر القديمة المكررة (داخل صفحة العرض فقط)
   ========================================================================== */
.single-property .property-detail-v5, 
.single-property .property-address-v5,
.single-property .property-description-v5,
.single-property .property-features-v5 {
    display: none !important;
}

.property-unified {
    display: block !important;
    visibility: visible !important;
}

/* ==========================================================================
   5. إصلاحات لوحة تحكم العضو (إزالة الخطوط وتوحيد الأزرار) - التحديث القوي
   ========================================================================== */

/* إجبار إزالة الحدود من الهيدر والفوتر ولوحة التحكم */
body.page-template-template-user-dashboard-submit header,
body.page-template-template-user-dashboard-submit footer,
body.page-template-template-user-dashboard-submit .dashboard-page-header,
body.page-template-template-user-dashboard-submit .dashboard-with-sidebar,
.houzez-dashboard-main,
.dashboard-header-search, 
.dashboard-sidebar,
.dashboard-content-area {
    border-top: 0 none !important;
    border-bottom: 0 none !important;
    border: none !important;
    box-shadow: none !important; /* إزالة أي ظل قد يبدو كحدود */
}

/* استهداف دقيق لزر "العين" (المشاهدة) في قائمة العقارات */
.dashboard-table-properties .btn-view,
.dashboard-table-properties a[data-original-title*="View"],
.dashboard-table-properties a[data-original-title*="مشاهدة"],
.action-btn-view,
a.btn-view {
    background-color: #2b3554 !important; /* الأزرق */
    color: #ffffff !important;            /* الأبيض */
    border: 1px solid #2b3554 !important;
    opacity: 1 !important;                /* إلغاء الشفافية */
    visibility: visible !important;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    padding: 6px 12px;
    border-radius: 4px;
}

/* إجبار لون الأيقونة داخل الزر على الأبيض */
.dashboard-table-properties .btn-view i,
.dashboard-table-properties a[data-original-title*="View"] i,
.dashboard-table-properties a[data-original-title*="مشاهدة"] i {
    color: #ffffff !important;
}

/* حالة التحويم (Hover) */
.dashboard-table-properties .btn-view:hover,
.dashboard-table-properties a[data-original-title*="View"]:hover,
.dashboard-table-properties a[data-original-title*="مشاهدة"]:hover {
    background-color: #1f263e !important;
    border-color: #1f263e !important;
    color: #ffffff !important;
}
EOF
/* إخفاء تاريخ الانتهاء الافتراضي (Never) في لوحة التحكم */
.dashboard-table-properties .expiration_date {
    display: none;
}

/* إظهار تاريخ الانتهاء المخصص (الأحمر) فقط */
.dashboard-table-properties span[style*="color:#c62828"] {
    display: inline-block !important;
}
