/* ========= static\pages\css\base\detail-view.css - أنماط العرض التفصيلي للعقار/السيارة ========= */

.property-detail-view {
    display: none;
    animation: fadeIn 0.3s ease;
}
.property-detail-view.visible {
    display: block;
}
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ----- رأس التفاصيل ----- */
.detail-header {
    margin-bottom: 1.5rem;
    border-bottom: 1px solid rgba(212,175,55,0.3);
    padding: 0.8rem 1.5rem;
    text-align: center;
    background: rgba(0, 0, 0, 0.84);
    border-radius: 28px;
    transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease, opacity 0.3s ease;
    position: relative;
}
.detail-title {
    font-size: 1.8rem;
    font-family: 'Cinzel', serif;
    color: #d4af37;
    text-shadow: 0 0 5px rgba(0,0,0,0.5);
}
.detail-badge {
    display: inline-block;
    background: rgba(212,175,55,0.2);
    border-radius: 50px;
    padding: 0.2rem 1rem;
    font-size: 0.9rem;
    margin-right: 0.5rem;
    text-shadow: 0 0 3px rgba(0,0,0,0.3);
}

/* ----- الوصف ----- */
.detail-description {
    background: rgba(0, 0, 0, 0.78);
    padding: 1rem;
    border-radius: 20px;
    margin-bottom: 1.5rem;
    line-height: 1.6;
    text-align: right;
}

/* ----- شبكة المعلومات ----- */
.detail-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
    text-align: right;
}
.info-item {
    background: rgba(0, 0, 0, 0.6);
    border-radius: 20px;
    padding: 0.8rem;
    border-right: 3px solid #d4af37;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.info-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}
.info-label {
    font-size: 0.8rem;
    color: #f5e7b2;
    margin-bottom: 0.3rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.info-label i {
    font-size: 1.1rem;
    width: 24px;
    color: #d4af37;
}
.info-value {
    font-size: 1rem;
    font-weight: 500;
    color: #fff4e0;
    padding-right: 1.5rem;
}
.info-value i {
    margin-left: 6px;
    color: #d4af37;
    font-size: 1rem;
}
.info-item-full {
    grid-column: 1 / -1;
}

/* ----- المرافق (features) ----- */
.features-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    align-items: center;
}
.features-list span {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(212,175,55,0.15);
    padding: 0.4rem 1rem;
    border-radius: 30px;
    font-size: 0.85rem;
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease, opacity 0.2s ease;
}
.features-list span:hover {
    background: rgba(212,175,55,0.3);
    transform: translateY(-1px);
}
.features-list i {
    font-size: 1rem;
    margin-left: 0;
}

/* ----- أزرار الإجراءات ----- */
.detail-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 2rem;
    flex-wrap: wrap;
}
.detail-actions button {
    background: linear-gradient(135deg, rgba(212,175,55,0.2), rgba(0,0,0,0.4));
    border: 1px solid #d4af37;
    border-radius: 40px;
    padding: 0.6rem 1.5rem;
    font-size: 0.9rem;
    font-weight: 600;
    font-family: 'Cairo', sans-serif;
    color: #f5e7b2;
    cursor: pointer;
    transition: 0.3s;
}
.detail-actions button:hover {
    background: linear-gradient(135deg, #7a2e3a, #9e4a3a, #b87c1a);
    color: #f9eec1;
    border-color: #d4af37;
    box-shadow: 0 0 15px rgba(60, 179, 113, 0.5);
    transform: scale(1.02);
}
.detail-actions .contact-btn {
    background: linear-gradient(135deg, #d4af37, #b87c1a);
    color: #0a0515;
    border-color: #ffffff;
}
.detail-actions .contact-btn:hover {
    background: linear-gradient(135deg, #f5e7b2, #d4af37);
    box-shadow: 0 0 20px rgba(212,175,55,0.6);
}

/* ----- تأثيرات الخلفية عند عرض التفاصيل ----- */
body.property-detail-bg .image-bg {
    display: block !important;
}
body.property-detail-bg .video-bg {
    display: none !important;
}
body.property-detail-bg .bg-overlay {
    background: transparent !important;
    backdrop-filter: none !important;
}
body.property-detail-bg .ui-wrapper {
    background: transparent;
}
body.property-detail-bg .property-detail-view {
    background: rgba(0, 0, 0, 0.42);
    border-radius: 28px;
    padding: 1.5rem;
    animation: slideUpFade 0.4s ease;
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.6);
}
body.property-detail-bg .detail-title,
body.property-detail-bg .detail-badge,
body.property-detail-bg .detail-description,
body.property-detail-bg .info-label,
body.property-detail-bg .info-value {
    text-shadow: 0 0 8px rgba(0, 0, 0, 0.7);
}
body.property-detail-bg .info-item {
    background: rgba(0, 0, 0, 0.82);
    border-right-color: #d4af37;
}
body.property-detail-bg .detail-description {
    background: rgba(0, 0, 0, 0.82);
}
body.property-detail-bg .detail-info-grid {
    animation: fadeIn 0.5s ease 0.2s both;
}
body.property-detail-bg .detail-image-gallery {
    animation: fadeIn 0.5s ease 0.1s both;
}
body.property-detail-bg .detail-description {
    animation: fadeIn 0.5s ease 0.15s both;
}
body.property-detail-bg .detail-actions {
    animation: fadeIn 0.5s ease 0.25s both;
}
body.property-detail-bg .detail-image-gallery img {
    border: 2px solid #d4af37;
    box-shadow: 0 0 15px rgba(212,175,55,0.3);
}
body.property-detail-bg .detail-title {
    text-shadow: 0 0 15px rgba(212,175,55,0.8);
    font-size: 2rem;
}
body.property-detail-bg .detail-badge {
    background: rgba(212,175,55,0.3);
    box-shadow: 0 0 10px rgba(212,175,55,0.3);
}
body.property-detail-bg .expanded-sidebar {
    display: none !important;
}
body.property-detail-bg .expanded-main {
    width: 100%;
}

/* ----- الصورة الرئيسية ----- */
.main-image-container {
    width: 100%;
    height: 400px;
    margin-bottom: 1rem;
    border-radius: 20px;
    overflow: hidden;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
}
.main-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    cursor: pointer;
    transition: transform 0.2s;
}
.main-img:hover {
    transform: scale(1.01);
}
@media (max-width: 768px) {
    .main-image-container {
        height: 280px;
    }
}
@media (max-width: 480px) {
    .main-image-container {
        height: 220px;
    }
}

/* ----- شريط المصغرات ----- */
.thumbnails-container {
    position: relative;
    width: 100%;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.thumbnails-scroll {
    flex: 1;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-behavior: smooth;
    scrollbar-width: thin;
    scrollbar-color: #d4af37 #222;
    border-radius: 12px;
    max-width: calc(5 * (120px + 0.8rem) - 0.8rem);
}
.thumbnails-scroll::-webkit-scrollbar {
    height: 6px;
}
.thumbnails-scroll::-webkit-scrollbar-track {
    background: #222;
    border-radius: 10px;
}
.thumbnails-scroll::-webkit-scrollbar-thumb {
    background: #d4af37;
    border-radius: 10px;
}
.thumbnails-wrapper {
    display: flex;
    gap: 0.8rem;
    flex-wrap: nowrap;
    padding: 0.2rem 0;
}
.thumb-img {
    width: 120px;
    height: 90px;
    object-fit: cover;
    border-radius: 12px;
    border: 1px solid rgba(212,175,55,0.4);
    cursor: pointer;
    transition: 0.2s;
    flex-shrink: 0;
    background: rgba(0,0,0,0.6);
}
.thumb-img:hover {
    transform: scale(1.02);
    border-color: #d4af37;
}
.thumb-placeholder {
    width: 120px;
    height: 90px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.6);
    border-radius: 12px;
    color: #d4af37;
    font-size: 0.8rem;
    opacity: 0.5;
    flex-shrink: 0;
}
.thumb-placeholder::after {
    content: "✖";
}
.thumb-scroll-btn {
    background: rgba(0,0,0,0.6);
    border: 1px solid #d4af37;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: 0.2s;
    color: #d4af37;
    font-size: 1.2rem;
    flex-shrink: 0;
}
.thumb-scroll-btn:hover {
    background: rgba(212,175,55,0.2);
    transform: scale(1.05);
}
@media (max-width: 768px) {
    .thumb-img, .thumb-placeholder {
        width: 100px;
        height: 75px;
    }
    .thumbnails-scroll {
        max-width: calc(5 * (100px + 0.8rem) - 0.8rem);
    }
    .thumb-scroll-btn {
        width: 30px;
        height: 30px;
        font-size: 1rem;
    }
}
@media (max-width: 480px) {
    .thumb-img, .thumb-placeholder {
        width: 80px;
        height: 60px;
    }
    .thumbnails-scroll {
        max-width: calc(5 * (80px + 0.8rem) - 0.8rem);
    }
}

/* ----- زر المفضلة ----- */
.favorite-star {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(212, 175, 55, 0.1);
    border: 1px solid rgba(212, 175, 55, 0.4);
    border-radius: 50%;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease, opacity 0.3s ease;
    font-size: 1.5rem;
    color: #f5e7b2;
}
.favorite-star:hover {
    transform: translateY(-50%) scale(1.1);
    background: rgba(212, 175, 55, 0.2);
    border-color: #d4af37;
}
.favorite-star.active {
    color: #d4af37;
    background: rgba(212, 175, 55, 0.2);
    text-shadow: 0 0 8px rgba(212,175,55,0.5);
}
@media (max-width: 768px) {
    .favorite-star {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
        left: 10px;
    }
    .detail-title {
        padding-left: 50px;
    }
}