/*
RENTPLAY Django - Real Estate Marketplace
Multi-Vendor Property Platform with Dynamic Booking Card & Location Filter
Arabic RTL support, Glassmorphism design
*/

:root {
  --primary: #4f46e5;
  --primary-dark: #4338ca;
  --primary-light: #e0e7ff;
  --success: #10b981;
  --success-light: #d1fae5;
  --danger: #ef4444;
  --danger-light: #fee2e2;
  --warning: #f59e0b;
  --warning-light: #fef3c7;
  --dark: #0f172a;
  --dark-800: #1e293b;
  --dark-700: #334155;
  --gray: #64748b;
  --gray-200: #e2e8f0;
  --gray-100: #f1f5f9;
  --white: #ffffff;
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
  --radius: 1rem;
  --radius-lg: 1.5rem;
  --radius-sm: 0.5rem;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Cairo', sans-serif;
  background: linear-gradient(135deg, #f8fafc 0%, #e0e7ff 50%, #f0fdf4 100%);
  background-attachment: fixed;
  color: var(--dark-800);
  min-height: 100vh;
  line-height: 1.6;
}
a { text-decoration: none; color: inherit; }
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--gray-100); }
::-webkit-scrollbar-thumb { background: var(--gray-200); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--gray); }

@keyframes fadeIn { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
@keyframes slideIn { from { opacity: 0; transform: translateX(30px); } to { opacity: 1; transform: translateX(0); } }

.animate-fade { animation: fadeIn 0.5s ease forwards; }

.container { max-width: 1280px; margin: 0 auto; padding: 0 1.5rem; }


/* ==================== LOGO STYLES ==================== */
.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    flex-shrink: 0;
}

.logo-box {
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
    background: linear-gradient(135deg, var(--primary) 0%, #7c3aed 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 14px rgba(79, 70, 229, 0.35);
    overflow: hidden;
    padding: 4px;
}

.logo-box .logo-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.logo-box-sm {
    width: 36px;
    height: 36px;
    min-width: 36px;
    min-height: 36px;
    border-radius: 10px;
    padding: 3px;
}

.logo-text {
    font-size: 1.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary) 0%, #7c3aed 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    white-space: nowrap;
}

.footer-logo {
    justify-content: center;
    margin-bottom: 1rem;
}

.footer-logo .logo-text {
    font-size: 1.25rem;
}

/* Remove old conflicting logo styles */
.logo-icon {
    display: none;
}

/* Navbar specific */
.navbar-inner .logo {
    margin-left: 0;
}

@media (max-width: 768px) {
    .logo-box {
        width: 38px;
        height: 38px;
        min-width: 38px;
        min-height: 38px;
    }
    .logo-text {
        font-size: 1.25rem;
    }
    .footer-logo .logo-text {
        font-size: 1.1rem;
    }
}

@media (max-width: 480px) {
    .logo-box {
        width: 34px;
        height: 34px;
        min-width: 34px;
        min-height: 34px;
        border-radius: 8px;
    }
    .logo-text {
        font-size: 1.1rem;
    }
}

/* ==================== NAVBAR ==================== */
.navbar { position: fixed; top: 0; left: 0; right: 0; z-index: 1000; background: rgba(255,255,255,0.9); backdrop-filter: blur(20px); border-bottom: 1px solid rgba(226,232,240,0.6); box-shadow: var(--shadow-sm); }
.navbar-inner { display: flex; align-items: center; justify-content: space-between; height: 70px; }
.logo { display: flex; align-items: center; gap: 0.75rem; font-size: 1.5rem; font-weight: 800; background: linear-gradient(135deg, var(--primary) 0%, #7c3aed 100%); -webkit-background-clip: text; -webkit-text-fill-color: transparent; cursor: pointer; text-decoration: none; }
.logo-icon { width: 42px; height: 42px; background: linear-gradient(135deg, var(--primary) 0%, #7c3aed 100%); border-radius: 12px; display: flex; align-items: center; justify-content: center; box-shadow: 0 4px 14px rgba(79,70,229,0.35); }
.logo-icon i { color: white; font-size: 1.1rem; }
.nav-links { display: flex; gap: 0.5rem; align-items: center; }
.nav-btn { display: flex; align-items: center; gap: 0.5rem; padding: 0.6rem 1.25rem; border-radius: 12px; border: none; background: transparent; font-family: inherit; font-size: 0.9rem; font-weight: 600; color: var(--gray); cursor: pointer; transition: all 0.3s; text-decoration: none; }
.nav-btn:hover { background: var(--gray-100); color: var(--dark-800); }
.nav-btn.active { background: var(--primary-light); color: var(--primary); box-shadow: var(--shadow-sm); }
.admin-link { background: linear-gradient(135deg, var(--dark-800) 0%, var(--dark-700) 100%); color: white !important; }
.admin-link:hover { background: linear-gradient(135deg, var(--dark-700) 0%, var(--dark-800) 100%); transform: translateY(-2px); }
.btn-login { color: var(--primary) !important; border: 2px solid var(--primary-light) !important; }
.btn-login:hover { background: var(--primary-light); color: var(--primary) !important; }
.btn-register { background: linear-gradient(135deg, var(--primary) 0%, #7c3aed 100%) !important; color: white !important; box-shadow: 0 4px 14px rgba(79,70,229,0.25); }
.btn-register:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(79,70,229,0.35); color: white !important; }
.lang-switcher { display: inline; }
.lang-switcher button { background: transparent; cursor: pointer; }
.mobile-toggle { display: none; background: none; border: none; font-size: 1.5rem; color: var(--dark-800); cursor: pointer; padding: 0.5rem; }

.main { padding-top: 90px; padding-bottom: 3rem; min-height: 100vh; }

/* ==================== HERO ==================== */
.hero { background: linear-gradient(135deg, var(--primary) 0%, #7c3aed 50%, #4f46e5 100%); border-radius: var(--radius-lg); padding: 3rem 2rem; margin-bottom: 2.5rem; color: white; position: relative; overflow: hidden; }
.hero::before { content: ''; position: absolute; top: -50%; right: -20%; width: 500px; height: 500px; background: rgba(255,255,255,0.05); border-radius: 50%; }
.hero-content { position: relative; z-index: 1; text-align: center; }
.hero-badge { display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.5rem 1rem; background: rgba(255,255,255,0.15); color: white; border-radius: 999px; font-size: 0.875rem; font-weight: 700; margin-bottom: 1rem; backdrop-filter: blur(10px); }
.hero h1 { font-size: 2.5rem; font-weight: 900; margin-bottom: 0.75rem; }
.hero p { font-size: 1.15rem; opacity: 0.9; max-width: 600px; margin: 0 auto; }

/* ==================== HERO BANNER SLIDER ==================== */
.hero-slider { position: relative; width: 100%; min-height: 280px; overflow: hidden; border-radius: var(--radius-lg); }
.hero-slide { position: absolute; top: 0; left: 0; width: 100%; height: 100%; opacity: 0; transition: opacity 0.6s ease; z-index: 1; display: flex; align-items: center; justify-content: center; }
.hero-slide.active { opacity: 1; z-index: 2; position: relative; }
.hero-slide-bg { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background-size: cover; background-position: center; z-index: 0; }
.hero-slide-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: linear-gradient(135deg, rgba(79,70,229,0.85) 0%, rgba(124,58,237,0.8) 50%, rgba(79,70,229,0.85) 100%); z-index: 1; }
.hero-slide .hero-content { position: relative; z-index: 2; padding: 2rem; }
.slider-btn { position: absolute; top: 50%; transform: translateY(-50%); z-index: 10; background: rgba(255,255,255,0.2); border: none; color: white; width: 40px; height: 40px; border-radius: 50%; cursor: pointer; font-size: 1rem; display: flex; align-items: center; justify-content: center; backdrop-filter: blur(10px); transition: all 0.3s; }
.slider-btn:hover { background: rgba(255,255,255,0.35); }
.slider-prev { left: 1rem; }
.slider-next { right: 1rem; }
.slider-dots { position: absolute; bottom: 1rem; left: 50%; transform: translateX(-50%); z-index: 10; display: flex; gap: 0.5rem; }
.slider-dot { width: 10px; height: 10px; border-radius: 50%; background: rgba(255,255,255,0.4); cursor: pointer; transition: all 0.3s; }
.slider-dot.active { background: white; width: 24px; border-radius: 999px; }

/* ==================== STATS BAR ==================== */
.stats-bar { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 1rem; margin-bottom: 2rem; }
.stat-card { background: var(--white); border-radius: var(--radius); padding: 1.25rem; box-shadow: var(--shadow-sm); border: 1px solid var(--gray-200); display: flex; align-items: center; gap: 1rem; transition: all 0.3s; }
.stat-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.stat-icon { width: 48px; height: 48px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 1.25rem; }
.stat-icon.blue { background: var(--primary-light); color: var(--primary); }
.stat-icon.green { background: var(--success-light); color: var(--success); }
.stat-icon.red { background: var(--danger-light); color: var(--danger); }
.stat-icon.orange { background: #fef3c7; color: #d97706; }
.stat-icon.purple { background: #ede9fe; color: #7c3aed; }
.stat-info h4 { font-size: 1.5rem; font-weight: 800; color: var(--dark); }
.stat-info span { font-size: 0.85rem; color: var(--gray); font-weight: 600; }

/* ==================== NAV TABS ==================== */
.nav-tabs { display: flex; gap: 0.5rem; margin-bottom: 1.5rem; flex-wrap: wrap; }
.nav-tab { display: flex; align-items: center; gap: 0.5rem; padding: 0.6rem 1.25rem; border-radius: 12px; font-family: inherit; font-size: 0.9rem; font-weight: 600; color: var(--gray); background: var(--white); border: 1px solid var(--gray-200); cursor: pointer; transition: all 0.3s; text-decoration: none; }
.nav-tab:hover { background: var(--gray-100); color: var(--dark-800); }
.nav-tab.active { background: var(--primary-light); color: var(--primary); border-color: var(--primary-light); }

/* ==================== FILTERS ==================== */
.filters-toggle-card { background: var(--white); border-radius: var(--radius); margin-bottom: 1rem; box-shadow: var(--shadow-sm); border: 1px solid var(--gray-200); }
.filters-toggle-btn { width: 100%; padding: 1rem 1.5rem; background: none; border: none; font-family: inherit; font-size: 1rem; font-weight: 700; color: var(--dark-700); cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; }
.filters-card { background: var(--white); border-radius: var(--radius-lg); padding: 1.75rem; margin-bottom: 2.5rem; box-shadow: var(--shadow); border: 1px solid var(--gray-200); }
.filters-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1rem; align-items: end; }

/* ==================== FORMS ==================== */
.form-group { display: flex; flex-direction: column; gap: 0.375rem; }
.form-label { font-size: 0.875rem; font-weight: 700; color: var(--dark-700); }
.form-label i { color: var(--primary); margin-left: 0.35rem; }
.form-input { padding: 0.75rem 1rem; border: 2px solid var(--gray-200); border-radius: 12px; font-family: inherit; font-size: 0.95rem; background: var(--white); transition: all 0.3s; outline: none; width: 100%; color: var(--dark-800); }
.form-input:focus { border-color: var(--primary); box-shadow: 0 0 0 4px var(--primary-light); }
.form-input:disabled { background: var(--gray-100); color: var(--gray); cursor: not-allowed; }
select.form-input { cursor: pointer; }
textarea.form-input { resize: vertical; min-height: 80px; }
.form-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1rem; }
.help-text { font-size: 0.8rem; color: var(--gray); margin-top: 0.25rem; }
.error { color: var(--danger); font-size: 0.85rem; font-weight: 600; }
.alert { padding: 1rem; border-radius: 12px; margin-bottom: 1rem; font-weight: 600; }
.alert-danger { background: var(--danger-light); color: var(--danger); }
.alert-success { background: var(--success-light); color: var(--success); }

/* ==================== BUTTONS ==================== */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem; padding: 0.75rem 1.5rem; border-radius: 12px; border: none; font-family: inherit; font-size: 0.95rem; font-weight: 700; cursor: pointer; transition: all 0.3s; text-decoration: none; }
.btn-primary { background: linear-gradient(135deg, var(--primary) 0%, #7c3aed 100%); color: white; box-shadow: 0 4px 14px rgba(79,70,229,0.35); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(79,70,229,0.45); }
.btn-success { background: linear-gradient(135deg, var(--success) 0%, #059669 100%); color: white; box-shadow: 0 4px 14px rgba(16,185,129,0.35); }
.btn-success:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(16,185,129,0.45); }
.btn-danger { background: linear-gradient(135deg, var(--danger) 0%, #dc2626 100%); color: white; }
.btn-secondary { background: var(--gray-100); color: var(--dark-700); border: 2px solid var(--gray-200); }
.btn-secondary:hover { background: var(--gray-200); }
.btn-whatsapp { background: linear-gradient(135deg, #25d366 0%, #128c7e 100%); color: white; }
.btn-call { background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%); color: white; }
.btn-location { background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%); color: white; }
.btn-book { background: linear-gradient(135deg, #ec4899 0%, #db2777 100%); color: white; }
.btn-sm { padding: 0.5rem 1rem; font-size: 0.875rem; }
.btn:disabled { opacity: 0.6; cursor: not-allowed; transform: none !important; }

/* ==================== PROPERTY GRID ==================== */
.properties-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(360px, 1fr)); gap: 1.75rem; }
.property-card { background: var(--white); border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow); border: 1px solid var(--gray-200); transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1); display: flex; flex-direction: column; }
.property-card:hover { transform: translateY(-8px); box-shadow: var(--shadow-xl); }
.property-image-wrap { position: relative; height: 260px; overflow: hidden; }
.property-image { width: 100%; height: 100%; object-fit: cover; transition: transform 0.7s cubic-bezier(0.4, 0, 0.2, 1); }
.property-card:hover .property-image { transform: scale(1.08); }
.property-image-overlay { position: absolute; inset: 0; background: linear-gradient(to top, rgba(15,23,42,0.8) 0%, transparent 50%, rgba(15,23,42,0.3) 100%); }
.property-badge { position: absolute; top: 1rem; right: 1rem; padding: 0.375rem 1rem; border-radius: 999px; font-size: 0.8rem; font-weight: 800; color: white; backdrop-filter: blur(10px); }
.badge-available { background: rgba(16,185,129,0.9); }
.badge-rented { background: rgba(239,68,68,0.9); }
.badge-warning { background: rgba(245,158,11,0.9); }
.badge-success { background: var(--success-light); color: var(--success); }
.badge-danger { background: var(--danger-light); color: var(--danger); }
.badge-info { background: var(--primary-light); color: var(--primary); }
.badge-secondary { background: var(--gray-100); color: var(--gray); }
.property-image-title { position: absolute; bottom: 1rem; right: 1.25rem; left: 1.25rem; color: white; font-size: 1.15rem; font-weight: 700; text-shadow: 0 2px 4px rgba(0,0,0,0.3); }
.property-image-counter { position: absolute; top: 1rem; left: 1rem; background: rgba(0,0,0,0.6); color: white; padding: 0.25rem 0.75rem; border-radius: 8px; font-size: 0.8rem; font-weight: 600; }
.property-unit-code { position: absolute; top: 3.5rem; left: 1rem; background: rgba(79, 70, 229, 0.9); color: white; padding: 0.25rem 0.75rem; border-radius: 8px; font-size: 0.8rem; font-weight: 700; z-index: 2; }
.property-video-badge { position: absolute; bottom: 1rem; left: 1rem; background: rgba(236, 72, 153, 0.9); color: white; padding: 0.375rem 0.75rem; border-radius: 8px; font-size: 0.8rem; font-weight: 700; }
.property-body { padding: 1.5rem; flex: 1; display: flex; flex-direction: column; }
.property-price { font-size: 1.5rem; font-weight: 800; background: linear-gradient(135deg, var(--success) 0%, #059669 100%); -webkit-background-clip: text; -webkit-text-fill-color: transparent; margin-bottom: 1rem; }
.property-price span { font-size: 0.875rem; font-weight: 600; -webkit-text-fill-color: var(--gray); }
.property-meta { display: flex; align-items: center; gap: 0.5rem; color: var(--dark-700); font-size: 0.9rem; margin-bottom: 0.5rem; }
.property-meta i { width: 20px; text-align: center; }
.property-meta .icon-map { color: var(--danger); }
.property-meta .icon-tag { color: var(--primary); }
.property-meta .icon-bed { color: #8b5cf6; }
.property-meta-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem; }
.icon-city { color: var(--primary); }
.property-features { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 0.75rem 0 1rem; }
.feature-tag { background: var(--gray-100); color: var(--dark-700); padding: 0.25rem 0.75rem; border-radius: 8px; font-size: 0.8rem; font-weight: 600; border: 1px solid var(--gray-200); }
.agency-badge { margin-bottom: 0.75rem; }
.agency-link { display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.35rem 0.75rem; background: var(--primary-light); color: var(--primary); border-radius: 8px; font-size: 0.8rem; font-weight: 700; transition: all 0.3s; }
.agency-link:hover { background: var(--primary); color: white; }
.property-actions { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.5rem; margin-top: auto; padding-top: 1.25rem; }
.property-actions .btn { font-size: 0.8rem; padding: 0.625rem 0.25rem; }
.actions-rented { grid-template-columns: repeat(3, 1fr); }
.property-rented { opacity: 0.5; filter: grayscale(0.6); }

/* ==================== PROPERTY DETAIL ==================== */
.breadcrumb { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 1.5rem; font-size: 0.9rem; color: var(--gray); }
.breadcrumb a { color: var(--primary); font-weight: 600; }
.property-detail { margin-bottom: 3rem; }
.detail-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 1.5rem; }
.detail-gallery { border-radius: var(--radius-lg); overflow: hidden; margin-bottom: 1.5rem; }
.detail-gallery img { width: 100%; height: 400px; object-fit: cover; }
.gallery-thumb-strip { display: flex; gap: 0.5rem; padding: 0.75rem; background: var(--dark); overflow-x: auto; }
.gallery-thumb-item { width: 80px; height: 60px; border-radius: 8px; overflow: hidden; cursor: pointer; border: 2px solid transparent; flex-shrink: 0; }
.gallery-thumb-item.active { border-color: var(--primary); }
.gallery-thumb-item img { width: 100%; height: 100%; object-fit: cover; }
.video-thumb { width: 100%; height: 100%; background: var(--dark-800); display: flex; align-items: center; justify-content: center; color: white; }

.detail-info-card { background: var(--white); border-radius: var(--radius-lg); padding: 1.5rem; box-shadow: var(--shadow); border: 1px solid var(--gray-200); }
.detail-header { margin-bottom: 1.25rem; }
.detail-header h1 { font-size: 1.75rem; font-weight: 800; color: var(--dark); margin-bottom: 0.75rem; }
.detail-badges { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.badge { display: inline-flex; align-items: center; gap: 0.25rem; padding: 0.375rem 0.875rem; border-radius: 999px; font-size: 0.8rem; font-weight: 700; }
.detail-price { font-size: 2rem; font-weight: 800; background: linear-gradient(135deg, var(--success) 0%, #059669 100%); -webkit-background-clip: text; -webkit-text-fill-color: transparent; margin-bottom: 1.25rem; }
.detail-meta-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 1rem; margin-bottom: 1.5rem; }
.detail-meta-item { background: var(--gray-100); padding: 1rem; border-radius: 12px; text-align: center; }
.detail-meta-item i { font-size: 1.25rem; margin-bottom: 0.25rem; display: block; }
.detail-meta-item label { font-size: 0.75rem; color: var(--gray); font-weight: 600; display: block; margin-bottom: 0.25rem; }
.detail-meta-item span { font-size: 1rem; font-weight: 700; color: var(--dark); }

.detail-sidebar { display: flex; flex-direction: column; gap: 1rem; }
.sidebar-card { background: var(--white); border-radius: var(--radius); padding: 1.25rem; box-shadow: var(--shadow); border: 1px solid var(--gray-200); }
.sidebar-card h3 { font-size: 1rem; font-weight: 800; color: var(--dark); margin-bottom: 1rem; display: flex; align-items: center; gap: 0.5rem; }
.sidebar-card h3 i { color: var(--primary); }
.agency-info { text-align: center; }
.agency-info .agency-logo { width: 60px; height: 60px; border-radius: 12px; object-fit: cover; margin: 0 auto 0.75rem; }
.agency-info h4 { font-size: 1.1rem; font-weight: 800; color: var(--dark); margin-bottom: 0.25rem; }
.contact-actions { display: flex; flex-direction: column; gap: 0.5rem; }

/* ==================================================================
   FEATURE 2: ADVANCED DYNAMIC BOOKING CARD - STYLES
   ================================================================== */
.booking-card-wrapper { border: 2px solid var(--primary-light); position: relative; }
.booking-card-wrapper::before {
    content: ''; position: absolute; top: 0; left: 0; right: 0; height: 4px;
    background: linear-gradient(90deg, var(--primary), #7c3aed, #ec4899);
    border-radius: var(--radius) var(--radius) 0 0;
}
.booking-section-title {
    font-size: 0.85rem; font-weight: 700; color: var(--dark-700);
    margin-bottom: 0.75rem; display: flex; align-items: center; gap: 0.5rem;
    padding-bottom: 0.5rem; border-bottom: 1px dashed var(--gray-200);
}
.booking-section-title i { color: var(--primary); }

.booking-dates-row { grid-template-columns: 1fr 1fr; gap: 0.75rem; }
.booking-dates-row .form-group { margin-bottom: 0; }

/* Duration Display Grid */
.duration-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.75rem; }
.duration-item { text-align: center; }
.duration-item label { font-size: 0.75rem; font-weight: 700; color: var(--gray); display: block; margin-bottom: 0.25rem; }
.duration-item .form-input { text-align: center; font-weight: 800; font-size: 1.1rem; color: var(--primary); background: var(--primary-light); border-color: var(--primary-light); }

/* Read-only duration fields */
.readonly-field { background: var(--gray-100) !important; cursor: default; text-align: center; }
.readonly-field:focus { border-color: var(--gray-200); box-shadow: none; }

/* Booking Duration Display Card */
.booking-duration-display {
    background: linear-gradient(135deg, var(--primary-light) 0%, #ede9fe 100%);
    border-radius: 12px; padding: 1rem; margin-top: 0.75rem;
    animation: fadeIn 0.3s ease;
}

/* Similar Properties */
.similar-section { margin-top: 3rem; }
.similar-section h2 { font-size: 1.5rem; font-weight: 800; color: var(--dark); margin-bottom: 1.5rem; display: flex; align-items: center; gap: 0.5rem; }

/* ==================== AGENCY PAGES ==================== */
.agency-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 1.75rem; }
.agency-card { background: var(--white); border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow); border: 1px solid var(--gray-200); transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1); display: flex; flex-direction: column; }
.agency-card:hover { transform: translateY(-8px); box-shadow: var(--shadow-xl); }
.agency-card-header { display: flex; align-items: center; gap: 1rem; padding: 1.5rem; border-bottom: 1px solid var(--gray-200); }
.agency-card-logo { width: 60px; height: 60px; border-radius: 12px; overflow: hidden; flex-shrink: 0; }
.agency-card-logo img { width: 100%; height: 100%; object-fit: cover; }
.agency-logo-placeholder { width: 100%; height: 100%; background: var(--primary-light); display: flex; align-items: center; justify-content: center; color: var(--primary); font-size: 1.5rem; }
.agency-card-info h3 { font-size: 1.1rem; font-weight: 800; color: var(--dark); margin-bottom: 0.25rem; }
.agency-card-info p { font-size: 0.85rem; color: var(--gray); }
.agency-card-body { padding: 1.25rem 1.5rem; flex: 1; }
.agency-card-stats { display: flex; gap: 1rem; font-size: 0.85rem; color: var(--dark-700); font-weight: 600; }
.agency-card-footer { padding: 1rem 1.5rem; border-top: 1px solid var(--gray-200); }

.agency-header { background: var(--white); border-radius: var(--radius-lg); padding: 2rem; margin-bottom: 2rem; box-shadow: var(--shadow); border: 1px solid var(--gray-200); }
.agency-header-content { display: flex; align-items: center; gap: 2rem; flex-wrap: wrap; }
.agency-logo-large { width: 80px; height: 80px; border-radius: 16px; overflow: hidden; flex-shrink: 0; }
.agency-logo-large img { width: 100%; height: 100%; object-fit: cover; }
.agency-info-header { flex: 1; }
.agency-info-header h1 { font-size: 1.75rem; font-weight: 800; color: var(--dark); margin-bottom: 0.5rem; }
.agency-location { color: var(--gray); font-size: 0.95rem; margin-bottom: 0.5rem; }
.agency-desc { color: var(--dark-700); font-size: 0.9rem; margin-bottom: 1rem; }
.agency-stats-inline { display: flex; gap: 1.5rem; font-size: 0.85rem; font-weight: 600; color: var(--dark-700); }
.agency-contact-header { display: flex; flex-direction: column; gap: 0.5rem; }

/* ==================== PAGINATION ==================== */
.pagination { display: flex; justify-content: center; align-items: center; gap: 1rem; margin-top: 2rem; }
.page-info { font-size: 0.9rem; color: var(--gray); font-weight: 600; }
.empty-state { text-align: center; padding: 5rem 2rem; grid-column: 1 / -1; }
.empty-state i { font-size: 4rem; color: var(--gray-200); margin-bottom: 1.5rem; }
.empty-state h3 { font-size: 1.25rem; color: var(--dark-700); margin-bottom: 0.5rem; }
.empty-state p { color: var(--gray); }

/* ==================== LOGIN / REGISTER ==================== */
.login-page { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 1rem; }
.login-container { background: var(--white); border-radius: var(--radius-lg); box-shadow: 0 20px 60px rgba(0,0,0,0.1); width: 100%; max-width: 450px; padding: 2.5rem; position: relative; overflow: hidden; }
.login-container::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 5px; background: linear-gradient(90deg, var(--primary), #7c3aed, var(--primary)); }
.login-subtitle { text-align: center; color: var(--gray); font-size: 0.95rem; margin-bottom: 2rem; font-weight: 600; }
.password-wrap { position: relative; }
.toggle-password { position: absolute; left: 1rem; top: 50%; transform: translateY(-50%); background: none; border: none; color: var(--gray); cursor: pointer; font-size: 1rem; padding: 0.25rem; }
.back-link { display: flex; align-items: center; justify-content: center; gap: 0.5rem; margin-top: 1.5rem; color: var(--gray); font-weight: 600; font-size: 0.9rem; transition: color 0.3s; }
.back-link:hover { color: var(--primary); }
.security-badge { display: flex; align-items: center; justify-content: center; gap: 0.5rem; margin-top: 1.5rem; padding: 0.75rem; background: var(--gray-100); border-radius: 10px; font-size: 0.8rem; color: var(--gray); font-weight: 600; }
.security-badge i { color: var(--success); }

/* ==================== PROFILE ==================== */
.profile-page { margin-bottom: 3rem; }
.profile-container { display: grid; grid-template-columns: 300px 1fr; gap: 1.5rem; }
.profile-sidebar { background: var(--white); border-radius: var(--radius-lg); padding: 2rem; box-shadow: var(--shadow); border: 1px solid var(--gray-200); text-align: center; height: fit-content; }
.profile-avatar { width: 100px; height: 100px; border-radius: 50%; overflow: hidden; margin: 0 auto 1rem; }
.profile-avatar img { width: 100%; height: 100%; object-fit: cover; }
.profile-avatar-placeholder { width: 100%; height: 100%; background: var(--primary-light); display: flex; align-items: center; justify-content: center; color: var(--primary); font-size: 2.5rem; }
.profile-sidebar h2 { font-size: 1.25rem; font-weight: 800; color: var(--dark); margin-bottom: 0.25rem; }
.profile-role { font-size: 0.85rem; color: var(--primary); font-weight: 700; margin-bottom: 0.5rem; }
.profile-agency { font-size: 0.85rem; color: var(--gray); }

/* ==================== DASHBOARD ==================== */
.dashboard-wrapper { display: flex; min-height: 100vh; margin: -90px -1.5rem -3rem; }
.dashboard-sidebar { position: fixed; top: 0; right: 0; bottom: 0; width: 260px; background: var(--dark); color: var(--white); z-index: 1000; overflow-y: auto; transition: transform 0.3s; }
.dashboard-sidebar-header { padding: 1.5rem; border-bottom: 1px solid var(--dark-700); display: flex; align-items: center; gap: 0.75rem; }
.dashboard-sidebar-logo { font-size: 1.35rem; font-weight: 800; background: linear-gradient(135deg, var(--primary) 0%, #7c3aed 100%); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.dashboard-sidebar-nav { padding: 1rem 0; }
.dashboard-sidebar-item { display: flex; align-items: center; gap: 0.75rem; padding: 0.875rem 1.5rem; color: #94a3b8; font-weight: 600; cursor: pointer; transition: all 0.3s; border-right: 3px solid transparent; text-decoration: none; font-size: 0.9rem; position: relative; }
.dashboard-sidebar-item:hover { background: var(--dark-800); color: var(--white); }
.dashboard-sidebar-item.active { background: var(--dark-800); color: var(--primary); border-right-color: var(--primary); }
.dashboard-sidebar-item i { width: 24px; text-align: center; }
.badge-count { position: absolute; left: 1.5rem; background: var(--danger); color: white; padding: 2px 8px; border-radius: 999px; font-size: 0.7rem; font-weight: 700; }
.badge-count.badge-danger { background: var(--danger); }
.dashboard-sidebar-footer { padding: 1rem 1.5rem; border-top: 1px solid var(--dark-700); position: absolute; bottom: 0; left: 0; right: 0; background: var(--dark); }
.dashboard-sidebar-user { display: flex; align-items: center; gap: 0.75rem; }
.dashboard-sidebar-avatar { width: 40px; height: 40px; background: linear-gradient(135deg, var(--primary) 0%, #7c3aed 100%); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 0.9rem; }
.dashboard-sidebar-user-info div { font-weight: 700; font-size: 0.9rem; }
.dashboard-sidebar-user-info span { font-size: 0.75rem; color: #94a3b8; }
.dashboard-main { margin-right: 260px; min-height: 100vh; padding: 2rem; flex: 1; }
.dashboard-topbar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 2rem; flex-wrap: wrap; gap: 1rem; }
.dashboard-topbar-title { font-size: 1.5rem; font-weight: 800; color: var(--dark); }
.dashboard-stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 1rem; margin-bottom: 2rem; }
.dashboard-stat-card { background: var(--white); border-radius: var(--radius); padding: 1.25rem; box-shadow: var(--shadow-sm); border: 1px solid var(--gray-200); display: flex; align-items: center; gap: 1rem; }
.dashboard-stat-icon { width: 48px; height: 48px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 1.25rem; }
.dashboard-stat-card.blue .dashboard-stat-icon { background: var(--primary-light); color: var(--primary); }
.dashboard-stat-card.green .dashboard-stat-icon { background: var(--success-light); color: var(--success); }
.dashboard-stat-card.red .dashboard-stat-icon { background: var(--danger-light); color: var(--danger); }
.dashboard-stat-card.orange .dashboard-stat-icon { background: var(--warning-light); color: #d97706; }
.dashboard-stat-card.purple .dashboard-stat-icon { background: #ede9fe; color: #7c3aed; }
.dashboard-stat-card.pink .dashboard-stat-icon { background: #fce7f3; color: #db2777; }
.dashboard-stat-info h3 { font-size: 1.5rem; font-weight: 800; color: var(--dark); margin: 0; }
.dashboard-stat-info span { font-size: 0.8rem; color: var(--gray); font-weight: 600; }
.dashboard-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; }
.dashboard-card { background: var(--white); border-radius: var(--radius-lg); box-shadow: var(--shadow); border: 1px solid var(--gray-200); overflow: hidden; }
.dashboard-card-header { display: flex; align-items: center; justify-content: space-between; padding: 1.25rem 1.5rem; border-bottom: 1px solid var(--gray-200); flex-wrap: wrap; gap: 0.75rem; }
.dashboard-card-header h3 { font-size: 1.1rem; font-weight: 800; color: var(--dark); margin: 0; display: flex; align-items: center; gap: 0.5rem; }
.dashboard-card-header h3 i { color: var(--primary); }
.dashboard-card-body { padding: 1.5rem; }
.table-wrap { overflow-x: auto; }
.dashboard-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.dashboard-table th, .dashboard-table td { padding: 0.875rem 1rem; text-align: right; border-bottom: 1px solid var(--gray-200); }
.dashboard-table th { font-weight: 700; color: var(--dark-700); background: var(--gray-100); font-size: 0.8rem; text-transform: uppercase; }
.dashboard-table tr:hover { background: var(--gray-100); }
.action-buttons { display: flex; gap: 0.35rem; }
.inquiry-detail-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 1rem; }
.inquiry-detail-item { background: var(--white); padding: 1rem; border-radius: 12px; }
.inquiry-detail-item label { font-size: 0.8rem; color: var(--gray); font-weight: 600; display: block; margin-bottom: 0.25rem; }
.inquiry-detail-item div { font-size: 1rem; font-weight: 700; color: var(--dark); }
.form-section-title { font-size: 1.1rem; font-weight: 800; color: var(--dark); margin: 1.5rem 0 1rem; display: flex; align-items: center; gap: 0.5rem; }
.form-section-title i { color: var(--primary); }
.form-actions { display: flex; gap: 0.75rem; margin-top: 2rem; padding-top: 1.5rem; border-top: 1px solid var(--gray-200); }
.current-images { margin-top: 1rem; }
.current-images h4 { font-size: 0.95rem; font-weight: 700; color: var(--dark); margin-bottom: 0.75rem; }
.image-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(80px, 1fr)); gap: 0.5rem; }
.image-thumb { position: relative; }
.image-thumb img { width: 100%; height: 80px; object-fit: cover; border-radius: 8px; }
.image-thumb .delete-img-form { position: absolute; top: 4px; right: 4px; margin: 0; }
[dir="rtl"] .image-thumb .delete-img-form { right: auto; left: 4px; }
.image-thumb .delete-img-form .btn-danger { width: 28px; height: 28px; padding: 0; border-radius: 50%; font-size: 12px; opacity: 0.8; transition: all 0.2s; }
.image-thumb:hover .delete-img-form .btn-danger { opacity: 1; transform: scale(1.1); }

/* ==================== TOAST ==================== */
.toast-container { position: fixed; bottom: 2rem; left: 2rem; z-index: 3000; display: flex; flex-direction: column; gap: 0.75rem; }
.toast { background: var(--dark); color: white; padding: 1rem 1.5rem; border-radius: 12px; box-shadow: var(--shadow-xl); display: flex; align-items: center; gap: 0.75rem; font-weight: 600; font-size: 0.95rem; animation: slideIn 0.4s ease; min-width: 280px; }
.toast.success { border-right: 4px solid var(--success); }
.toast.error { border-right: 4px solid var(--danger); }
.toast.info { border-right: 4px solid var(--primary); }

/* ==================== FOOTER ==================== */
.footer { background: var(--dark-800); color: white; padding: 2rem 0; margin-top: 3rem; text-align: center; }
.footer p { opacity: 0.7; font-size: 0.9rem; }

/* ==================== RESPONSIVE ==================== */
@media (max-width: 1024px) {
  .dashboard-sidebar { transform: translateX(100%); }
  .dashboard-sidebar.open { transform: translateX(0); }
  .dashboard-main { margin-right: 0; }
  .detail-grid { grid-template-columns: 1fr; }
  .profile-container { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
  .mobile-toggle { display: block; }
  .nav-links { position: fixed; top: 70px; right: 0; left: 0; background: var(--white); flex-direction: column; padding: 1rem; box-shadow: var(--shadow-lg); transform: translateY(-150%); transition: transform 0.3s; gap: 0.5rem; align-items: stretch; }
  .nav-links.open { transform: translateY(0); }
  .hero h1 { font-size: 1.75rem; }
  .properties-grid { grid-template-columns: 1fr; }
  .property-actions { grid-template-columns: repeat(2, 1fr); }
  .filters-grid { grid-template-columns: 1fr; }
  .stats-bar { grid-template-columns: repeat(2, 1fr); }
  .dashboard-stats-grid { grid-template-columns: repeat(2, 1fr); }
  .dashboard-grid-2 { grid-template-columns: 1fr; }
  .agency-grid { grid-template-columns: 1fr; }
  .agency-header-content { flex-direction: column; text-align: center; }
  .login-container { padding: 1.5rem; }
  .booking-dates-row { grid-template-columns: 1fr; }
  .duration-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 480px) {
  .property-actions { grid-template-columns: 1fr; }
  .actions-rented { grid-template-columns: repeat(2, 1fr) !important; }
  .duration-grid { grid-template-columns: repeat(3, 1fr); }
}

/* ==================== CARD IMAGE SLIDER ==================== */
.card-slider {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
    border-radius: 0;
}

.card-slider-track {
    display: flex;
    width: 100%;
    height: 100%;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* FIX: شلت opacity: 0 — دلوقتي كل slides ظاهرة */
.card-slide {
    width: 100%;
    height: 100%;
    flex-shrink: 0;
    flex-grow: 0;
    position: relative;
    overflow: hidden;
}

.card-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Slider Arrow Buttons - Always Visible */
.card-slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    background: rgba(255, 255, 255, 0.85);
    border: none;
    color: var(--dark-800);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
    opacity: 0.85;
}

.card-slider-btn:hover {
    background: rgba(255, 255, 255, 1);
    opacity: 1;
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

.card-slider-prev { right: 0.75rem; }
.card-slider-next { left: 0.75rem; }

/* Dots */
.card-slider-dots {
    position: absolute;
    bottom: 0.5rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    display: flex;
    gap: 0.375rem;
    padding: 0.25rem 0.5rem;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 999px;
    backdrop-filter: blur(4px);
}

.card-slider-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.3s ease;
}

.card-slider-dot.active {
    background: white;
    width: 18px;
    border-radius: 999px;
}


/* ==================== SKELETON LOADING ==================== */
.skeleton-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
    gap: 1.75rem;
}
.skeleton-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow);
    border: 1px solid var(--gray-200);
}
.skeleton-image {
    height: 260px;
    background: linear-gradient(90deg, var(--gray-100) 25%, var(--gray-200) 50%, var(--gray-100) 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
}
.skeleton-body {
    padding: 1.5rem;
}
.skeleton-line {
    height: 16px;
    background: linear-gradient(90deg, var(--gray-100) 25%, var(--gray-200) 50%, var(--gray-100) 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
    border-radius: 8px;
    margin-bottom: 0.75rem;
}
@keyframes skeleton-loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ==================== CHAT / MESSAGING ==================== */
.chat-container {
    display: flex;
    flex-direction: column;
    height: calc(100vh - 200px);
    min-height: 400px;
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    overflow: hidden;
}
.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
.chat-message {
    display: flex;
    flex-direction: column;
    max-width: 70%;
}
.chat-message.sent {
    align-self: flex-end;
    align-items: flex-end;
}
.chat-message.received {
    align-self: flex-start;
    align-items: flex-start;
}
.chat-bubble {
    padding: 0.875rem 1.25rem;
    border-radius: var(--radius);
    font-size: 0.95rem;
    line-height: 1.5;
    word-break: break-word;
}
.chat-message.sent .chat-bubble {
    background: linear-gradient(135deg, var(--primary) 0%, #7c3aed 100%);
    color: white;
    border-bottom-left-radius: 4px;
}
.chat-message.received .chat-bubble {
    background: var(--gray-100);
    color: var(--dark-800);
    border-bottom-right-radius: 4px;
}
.chat-time {
    font-size: 0.75rem;
    color: var(--gray);
    margin-top: 0.25rem;
}
.chat-form {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--gray-200);
    background: var(--white);
}
.chat-input-wrap {
    display: flex;
    gap: 0.75rem;
    align-items: flex-end;
}
.chat-input-wrap textarea {
    flex: 1;
    resize: none;
    min-height: 44px;
    max-height: 120px;
}
.chat-input-wrap .btn {
    padding: 0.75rem 1.25rem;
}

/* ==================== CONVERSATION LIST ==================== */
.conversation-list {
    display: flex;
    flex-direction: column;
}
.conversation-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--gray-200);
    transition: all 0.3s;
    text-decoration: none;
    color: inherit;
}
.conversation-item:hover {
    background: var(--gray-100);
}
.conversation-avatar {
    width: 50px;
    height: 50px;
    min-width: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary) 0%, #7c3aed 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    font-weight: 700;
}
.conversation-info {
    flex: 1;
    min-width: 0;
}
.conversation-name {
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 0.25rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.conversation-preview {
    color: var(--gray);
    font-size: 0.85rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.conversation-time {
    font-size: 0.8rem;
    color: var(--gray);
    white-space: nowrap;
}

/* ==================== NOTIFICATIONS ==================== */
.notification-list {
    display: flex;
    flex-direction: column;
}
.notification-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--gray-200);
    transition: all 0.3s;
}
.notification-item.unread {
    background: var(--primary-light);
}
.notification-item:hover {
    background: var(--gray-100);
}
.notification-icon {
    width: 44px;
    height: 44px;
    min-width: 44px;
    border-radius: 12px;
    background: var(--gray-100);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    color: var(--primary);
}
.notification-content {
    flex: 1;
    min-width: 0;
}
.notification-title {
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 0.25rem;
}
.notification-message {
    color: var(--gray);
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
}
.notification-time {
    font-size: 0.8rem;
    color: var(--gray);
}

/* ==================== WISHLIST BUTTON ==================== */
.btn-wishlist {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 2px solid var(--gray-200);
    background: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.25rem;
    color: var(--gray);
    transition: all 0.3s;
}
.btn-wishlist:hover {
    border-color: var(--danger);
    color: var(--danger);
    transform: scale(1.1);
}
.btn-wishlist.active {
    background: var(--danger);
    border-color: var(--danger);
    color: white;
}
.btn-wishlist.active:hover {
    background: var(--danger);
    opacity: 0.9;
}

/* ==================== STATUS BADGES ==================== */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.375rem 0.875rem;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 700;
}
.status-available {
    background: var(--success-light);
    color: var(--success);
}
.status-rented {
    background: var(--danger-light);
    color: var(--danger);
}
.status-maintenance {
    background: var(--warning-light);
    color: #d97706;
}
.status-pending {
    background: var(--warning-light);
    color: #d97706;
}
.status-confirmed {
    background: var(--success-light);
    color: var(--success);
}
.status-cancelled {
    background: var(--danger-light);
    color: var(--danger);
}
.status-completed {
    background: var(--primary-light);
    color: var(--primary);
}

/* ==================== RATINGS & REVIEWS ==================== */
.rating-summary {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
    padding: 0.75rem 1rem;
    background: var(--warning-light);
    border-radius: 12px;
}
.rating-stars {
    font-size: 1.25rem;
    font-weight: 800;
    color: #f59e0b;
}
.rating-stars i {
    color: #f59e0b;
}
.review-form {
    background: var(--gray-100);
    padding: 1.25rem;
    border-radius: 12px;
    margin-bottom: 1.5rem;
}
.reviews-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
.review-item {
    padding: 1.25rem;
    background: var(--white);
    border-radius: 12px;
    border: 1px solid var(--gray-200);
}
.review-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}
.review-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--primary-light);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1rem;
}
.review-meta {
    flex: 1;
}
.review-meta strong {
    display: block;
    color: var(--dark);
    font-size: 0.95rem;
}
.review-stars {
    color: #f59e0b;
    font-size: 0.85rem;
}
.review-stars i {
    margin-right: 2px;
}
.review-date {
    font-size: 0.8rem;
    color: var(--gray);
    white-space: nowrap;
}
.review-item p {
    color: var(--dark-700);
    line-height: 1.6;
}

/* ==================== WAITLIST CARD ==================== */
.waitlist-card {
    background: linear-gradient(135deg, var(--primary-light) 0%, #ede9fe 100%);
}

/* ==================== DETAIL FEATURES & DESCRIPTION ==================== */
.detail-features {
    margin: 1.5rem 0;
    padding: 1.25rem;
    background: var(--gray-100);
    border-radius: 12px;
}
.detail-features h3 {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--dark);
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.detail-features h3 i {
    color: var(--primary);
}
.detail-description {
    margin: 1.5rem 0;
}
.detail-description h3 {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--dark);
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.detail-description h3 i {
    color: var(--primary);
}
.detail-description p {
    color: var(--dark-700);
    line-height: 1.8;
    white-space: pre-line;
}

/* ==================== GALLERY CONTROLS ==================== */
.gallery-controls {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-between;
    padding: 0 1rem;
    transform: translateY(-50%);
    z-index: 10;
    pointer-events: none;
}
.gallery-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(255,255,255,0.85);
    border: none;
    color: var(--dark-800);
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    transition: all 0.3s;
    pointer-events: auto;
}
.gallery-btn:hover {
    background: white;
    transform: scale(1.1);
}
.gallery-counter {
    position: absolute;
    bottom: 4.5rem;
    right: 1rem;
    background: rgba(0,0,0,0.6);
    color: white;
    padding: 0.375rem 0.875rem;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    z-index: 10;
}
.detail-gallery {
    position: relative;
}

/* ==================== MOBILE OVERLAY ==================== */
.mobile-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 999;
}
.mobile-overlay.active {
    display: block;
}
.dashboard-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 999;
}
.dashboard-overlay.open {
    display: block;
}
.sidebar-close {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 1.25rem;
    cursor: pointer;
}
@media (max-width: 1024px) {
    .sidebar-close {
        display: block;
    }
}

/* ==================== MAP ==================== */
.map-container {
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    border: 1px solid var(--gray-200);
    overflow: hidden;
    margin-bottom: 2rem;
}

/* ==================== SORT OPTIONS ==================== */
.sort-bar {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}
.sort-label {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--gray);
}
.sort-options {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}
.sort-option {
    padding: 0.5rem 1rem;
    border-radius: 8px;
    border: 1px solid var(--gray-200);
    background: var(--white);
    font-family: inherit;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--gray);
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
}
.sort-option:hover {
    border-color: var(--primary);
    color: var(--primary);
}
.sort-option.active {
    background: var(--primary-light);
    border-color: var(--primary-light);
    color: var(--primary);
}

/* ==================== PROPERTY COMPARE ==================== */
.compare-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    border: 1px solid var(--gray-200);
}
.compare-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 700px;
}
.compare-table thead th {
    padding: 1.25rem 1rem;
    background: var(--dark-800);
    color: white;
    text-align: center;
    border: 1px solid var(--gray-200);
    min-width: 220px;
}
.compare-table thead th.compare-label-header {
    background: var(--dark-800);
    color: white;
    width: 160px;
    min-width: 160px;
    max-width: 160px;
    position: sticky;
    inset-inline-start: 0;
    z-index: 10;
    border-inline-end: 2px solid var(--gray-300);
}
.compare-prop-img {
    width: 100%;
    height: 140px;
    overflow: hidden;
    border-radius: var(--radius);
    margin-bottom: 0.75rem;
}
.compare-prop-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.compare-table thead th h3 {
    font-size: 0.95rem;
    font-weight: 700;
    margin: 0.5rem 0;
    color: white;
}
.compare-table tbody td {
    padding: 0.875rem 1rem;
    border: 1px solid var(--gray-200);
    text-align: center;
    vertical-align: middle;
}
.compare-table tbody td.compare-label {
    background: var(--gray-100);
    font-weight: 700;
    color: var(--gray);
    font-size: 0.85rem;
    text-align: start;
    width: 160px;
    min-width: 160px;
    max-width: 160px;
    position: sticky;
    inset-inline-start: 0;
    z-index: 5;
    border-inline-end: 2px solid var(--gray-300);
}
.compare-table tbody tr:nth-child(even) td.compare-label {
    background: #e8ecf1;
}
.compare-table tbody tr:nth-child(even) td:not(.compare-label) {
    background: var(--gray-50);
}
.compare-value.price {
    color: var(--success);
    font-size: 1.15rem;
    font-weight: 800;
}
.compare-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    justify-content: center;
}
.compare-actions .btn-sm {
    padding: 0.5rem 0.75rem;
    font-size: 0.8rem;
}
.compare-bar {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}
.compare-count {
    font-size: 0.9rem;
    color: var(--gray);
    font-weight: 600;
}
/* Scrollbar styling for compare wrapper */
.compare-wrapper::-webkit-scrollbar {
    height: 8px;
}
.compare-wrapper::-webkit-scrollbar-track {
    background: var(--gray-100);
    border-radius: 4px;
}
.compare-wrapper::-webkit-scrollbar-thumb {
    background: var(--gray-400);
    border-radius: 4px;
}
.compare-wrapper::-webkit-scrollbar-thumb:hover {
    background: var(--primary);
}

/* ==================== PRINT STYLES ==================== */
@media print {
    .navbar, .footer, .property-actions, .sidebar-card, .nav-tabs, .filters-toggle-card, .hero, .stats-bar {
        display: none !important;
    }
    .main {
        padding-top: 0 !important;
    }
    .property-card {
        break-inside: avoid;
        box-shadow: none !important;
        border: 1px solid #ccc !important;
    }
    .detail-grid {
        grid-template-columns: 1fr !important;
    }
    body {
        background: white !important;
    }
}
