/* =====================================================
   Property Page Styles
   ===================================================== */
.property-page { padding-top: 24px; }

.property-breadcrumb {
    display: flex;
    gap: 8px;
    font-size: .85rem;
    color: var(--stone-700);
    margin-bottom: 16px;
}

.property-breadcrumb a:hover { color: var(--terracotta); }

.property-hero-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 24px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.property-hero-title {
    font-size: clamp(1.75rem, 3.5vw, 2.5rem);
    font-weight: 500;
    line-height: 1.15;
    margin-bottom: 12px;
    letter-spacing: -0.02em;
}

.property-hero-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    font-size: .9rem;
    color: var(--stone-900);
}

.property-hero-meta span { display: inline-flex; align-items: center; gap: 4px; }

.property-hero-actions {
    display: flex;
    gap: 8px;
}

.action-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: var(--radius-pill);
    font-size: .88rem;
    font-weight: 500;
    color: var(--ink);
    transition: background var(--transition);
}

.action-btn:hover { background: var(--stone-100); }
.action-btn svg { width: 16px; height: 16px; }
.action-btn.active { color: var(--terracotta); }

/* Gallery Grid */
.gallery-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    gap: 8px;
    border-radius: var(--radius-lg);
    overflow: hidden;
    aspect-ratio: 2/1;
    margin-bottom: 48px;
    position: relative;
}

.gallery-item {
    overflow: hidden;
    cursor: pointer;
    position: relative;
    background: var(--stone-100);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 600ms ease;
}

.gallery-item:hover img { transform: scale(1.05); }

.gallery-main {
    grid-row: span 2;
}

.gallery-all-btn {
    position: absolute;
    bottom: 20px;
    right: 20px;
    padding: 10px 18px;
    background: var(--white);
    border: 1px solid var(--ink);
    border-radius: var(--radius);
    font-weight: 600;
    font-size: .88rem;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: var(--shadow-md);
    z-index: 2;
}

[dir="rtl"] .gallery-all-btn { right: auto; left: 20px; }

.gallery-all-btn:hover { background: var(--stone-100); }

/* Property Main Layout */
.property-layout {
    display: grid;
    grid-template-columns: 1fr 420px;
    gap: 80px;
    margin-bottom: 80px;
}

.property-section {
    padding: 32px 0;
    border-bottom: 1px solid var(--stone-100);
}

.property-section:last-child { border-bottom: none; }

.property-section-title {
    font-size: 1.5rem;
    font-weight: 500;
    margin-bottom: 20px;
}

.property-host {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
}

.property-host-avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--ink);
    color: var(--saffron);
    display: grid;
    place-items: center;
    font-size: 1.5rem;
    font-weight: 700;
}

.property-highlights {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 32px;
}

.highlight-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 16px;
    background: var(--stone-50);
    border-radius: var(--radius);
}

.highlight-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--white);
    display: grid;
    place-items: center;
    color: var(--terracotta);
    margin-bottom: 10px;
}

.highlight-icon svg { width: 22px; height: 22px; }

.highlight-label { font-weight: 600; font-size: .88rem; }
.highlight-value { font-size: .78rem; color: var(--stone-700); margin-top: 2px; }

.property-description {
    color: var(--stone-900);
    line-height: 1.8;
    font-size: 1rem;
}

.amenities-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.amenity-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    background: var(--stone-50);
    border-radius: var(--radius);
    font-size: .92rem;
}

.amenity-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--white);
    display: grid;
    place-items: center;
    color: var(--terracotta);
}

.amenity-icon svg { width: 18px; height: 18px; }

/* Booking Card */
.booking-card {
    position: sticky;
    top: calc(var(--header-h) + 24px);
    background: var(--white);
    border: 1px solid var(--stone-300);
    border-radius: var(--radius-lg);
    padding: 28px;
    box-shadow: var(--shadow-md);
    height: fit-content;
}

.booking-card-price {
    display: flex;
    align-items: baseline;
    gap: 6px;
    margin-bottom: 20px;
}

.booking-card-price strong {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 500;
    color: var(--ink);
}

[dir="rtl"] .booking-card-price strong { font-family: var(--font-arabic); font-weight: 700; }

.booking-card-price span { color: var(--stone-700); font-size: .95rem; }

.booking-card-rating-row {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--stone-700);
    font-size: .88rem;
    margin-bottom: 20px;
}

.booking-dates-box {
    border: 1.5px solid var(--stone-300);
    border-radius: var(--radius);
    overflow: hidden;
    margin-bottom: 12px;
}

.booking-dates-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
}

.booking-date-field {
    padding: 12px 14px;
    cursor: pointer;
    transition: background var(--transition);
    border-right: 1px solid var(--stone-300);
}

[dir="rtl"] .booking-date-field { border-right: none; border-left: 1px solid var(--stone-300); }

.booking-date-field:last-child { border: none; }
.booking-date-field:hover { background: var(--stone-50); }

.booking-date-field label {
    display: block;
    font-size: .7rem;
    font-weight: 700;
    letter-spacing: .05em;
    text-transform: uppercase;
    margin-bottom: 4px;
}

.booking-date-field input,
.booking-date-field select {
    width: 100%;
    border: none;
    background: transparent;
    outline: none;
    font-size: .92rem;
    color: var(--charcoal);
}

.booking-guests-field {
    padding: 12px 14px;
    border-top: 1.5px solid var(--stone-300);
}

.booking-breakdown {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid var(--stone-100);
}

.breakdown-row {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    font-size: .92rem;
    color: var(--stone-900);
}

.breakdown-row.total {
    font-weight: 700;
    color: var(--ink);
    font-size: 1.05rem;
    border-top: 1px solid var(--stone-300);
    margin-top: 8px;
    padding-top: 16px;
}

/* Reviews */
.reviews-summary {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
    font-size: 1.1rem;
    font-weight: 600;
}

.reviews-summary .stars { font-size: 1.2rem; }

.review-card {
    padding: 20px;
    background: var(--stone-50);
    border-radius: var(--radius);
    margin-bottom: 16px;
}

.review-card-head {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
}

.review-card-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--terracotta);
    color: var(--white);
    display: grid;
    place-items: center;
    font-weight: 700;
}

.review-card-name { font-weight: 600; font-size: .95rem; }
.review-card-date { font-size: .8rem; color: var(--stone-700); }

.review-card-body { color: var(--stone-900); line-height: 1.7; }

/* Map */
.property-map {
    height: 400px;
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: var(--stone-100);
    background-image: url('https://maps.googleapis.com/maps/api/staticmap?center=31.6295,-7.9811&zoom=13&size=1200x400&maptype=roadmap&style=feature:all|element:labels|visibility:on&style=feature:road|color:0xffffff');
    background-size: cover;
    background-position: center;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.property-map::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(237, 232, 226, 0.4), rgba(237, 232, 226, 0.1));
    backdrop-filter: saturate(120%);
}

.map-pin {
    position: relative;
    z-index: 2;
    background: var(--white);
    padding: 16px 24px;
    border-radius: var(--radius-pill);
    box-shadow: var(--shadow-lg);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.map-pin svg { color: var(--terracotta); width: 20px; height: 20px; }

/* =====================================================
   Search/Listing Page
   ===================================================== */
.search-page-header {
    padding: 32px 0 24px;
    border-bottom: 1px solid var(--stone-100);
}

.search-results-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 24px;
    flex-wrap: wrap;
    gap: 16px;
}

.search-results-count {
    font-weight: 600;
    color: var(--ink);
}

.view-toggle {
    display: inline-flex;
    background: var(--stone-100);
    border-radius: var(--radius-pill);
    padding: 4px;
}

.view-toggle button {
    padding: 8px 16px;
    border-radius: var(--radius-pill);
    font-size: .85rem;
    font-weight: 500;
    transition: all var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.view-toggle button.active {
    background: var(--white);
    box-shadow: var(--shadow-sm);
    color: var(--ink);
}

.filters-sidebar {
    position: sticky;
    top: calc(var(--header-h) + 24px);
    background: var(--white);
    border: 1px solid var(--stone-100);
    border-radius: var(--radius-lg);
    padding: 24px;
    height: fit-content;
}

.filter-group {
    padding: 16px 0;
    border-bottom: 1px solid var(--stone-100);
}

.filter-group:last-child { border-bottom: none; }

.filter-title {
    font-weight: 700;
    margin-bottom: 12px;
    font-size: .95rem;
}

.filter-checkbox {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 0;
    cursor: pointer;
    font-size: .9rem;
}

.filter-checkbox input {
    width: 18px;
    height: 18px;
    accent-color: var(--terracotta);
}

.search-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 32px;
    padding: 32px 0;
}

/* =====================================================
   Checkout Page
   ===================================================== */
.checkout-layout {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 64px;
    padding: 32px 0 80px;
}

.checkout-title {
    font-size: 2rem;
    margin-bottom: 32px;
}

.checkout-section {
    margin-bottom: 32px;
    padding-bottom: 32px;
    border-bottom: 1px solid var(--stone-100);
}

.checkout-section h3 {
    font-size: 1.2rem;
    margin-bottom: 20px;
}

.payment-method {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    border: 1.5px solid var(--stone-300);
    border-radius: var(--radius);
    cursor: pointer;
    margin-bottom: 12px;
    transition: all var(--transition);
}

.payment-method:hover { border-color: var(--ink); }

.payment-method.active {
    border-color: var(--terracotta);
    background: rgba(200,90,62,.04);
}

.payment-method input { accent-color: var(--terracotta); }

.payment-icon {
    width: 40px;
    height: 28px;
    background: var(--stone-100);
    border-radius: 4px;
    display: grid;
    place-items: center;
    font-size: .7rem;
    font-weight: 700;
}

.booking-summary-card {
    background: var(--white);
    border: 1px solid var(--stone-300);
    border-radius: var(--radius-lg);
    padding: 24px;
    position: sticky;
    top: calc(var(--header-h) + 24px);
    height: fit-content;
}

.summary-property {
    display: flex;
    gap: 12px;
    padding-bottom: 20px;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--stone-100);
}

.summary-property-img {
    width: 80px;
    height: 80px;
    border-radius: var(--radius);
    overflow: hidden;
    flex-shrink: 0;
}

.summary-property-img img { width: 100%; height: 100%; object-fit: cover; }

/* =====================================================
   Dashboard
   ===================================================== */
.dashboard-layout {
    display: grid;
    grid-template-columns: 260px 1fr;
    min-height: calc(100vh - var(--header-h));
}

.dashboard-sidebar {
    background: var(--white);
    border-right: 1px solid var(--stone-100);
    padding: 32px 16px;
}

[dir="rtl"] .dashboard-sidebar {
    border-right: none;
    border-left: 1px solid var(--stone-100);
}

.dashboard-main {
    padding: 40px;
    background: var(--stone-50);
}

.dashboard-menu {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.dashboard-menu a {
    padding: 12px 16px;
    border-radius: var(--radius);
    font-size: .92rem;
    font-weight: 500;
    color: var(--stone-900);
    display: flex;
    align-items: center;
    gap: 12px;
    transition: all var(--transition);
}

.dashboard-menu a:hover { background: var(--stone-50); color: var(--ink); }
.dashboard-menu a.active { background: var(--ink); color: var(--white); }
.dashboard-menu a svg { width: 18px; height: 18px; }

.stat-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 40px;
}

.stat-card {
    background: var(--white);
    padding: 24px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--stone-100);
}

.stat-card-label {
    font-size: .85rem;
    color: var(--stone-700);
    margin-bottom: 8px;
}

.stat-card-value {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 500;
    color: var(--ink);
}

[dir="rtl"] .stat-card-value { font-family: var(--font-arabic); font-weight: 700; }

.stat-card-change {
    font-size: .8rem;
    margin-top: 6px;
    color: var(--success);
}

.dashboard-card {
    background: var(--white);
    border: 1px solid var(--stone-100);
    border-radius: var(--radius-lg);
    padding: 32px;
    margin-bottom: 24px;
}

.dashboard-card h2 {
    font-size: 1.4rem;
    margin-bottom: 24px;
}

/* Table */
.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th {
    text-align: start;
    padding: 12px 16px;
    background: var(--stone-50);
    font-size: .8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: var(--stone-700);
    border-bottom: 1px solid var(--stone-100);
}

.data-table td {
    padding: 14px 16px;
    border-bottom: 1px solid var(--stone-100);
    font-size: .92rem;
}

.status-pill {
    display: inline-block;
    padding: 4px 10px;
    border-radius: var(--radius-pill);
    font-size: .75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .03em;
}

.status-active, .status-confirmed { background: #E1EFDD; color: #2F5B27; }
.status-pending { background: #FDF1D6; color: #795B10; }
.status-cancelled, .status-rejected { background: #F9E5E5; color: #7A2424; }
.status-completed { background: #DCE8F2; color: #1E4166; }

/* =====================================================
   Lightbox
   ===================================================== */
.lightbox {
    position: fixed;
    inset: 0;
    z-index: 1000;
    background: rgba(28,26,23,.95);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 40px;
    animation: fadeIn 300ms;
}

.lightbox.open { display: flex; }

.lightbox-content {
    position: relative;
    max-width: 1200px;
    max-height: 90vh;
    width: 100%;
}

.lightbox-image {
    width: 100%;
    max-height: 85vh;
    object-fit: contain;
    border-radius: var(--radius);
}

.lightbox-close {
    position: absolute;
    top: -40px;
    right: 0;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--white);
    color: var(--ink);
    display: grid;
    place-items: center;
}

[dir="rtl"] .lightbox-close { right: auto; left: 0; }

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--white);
    color: var(--ink);
    display: grid;
    place-items: center;
    transition: transform var(--transition);
}

.lightbox-nav:hover { transform: translateY(-50%) scale(1.1); }

.lightbox-prev { left: 20px; }
.lightbox-next { right: 20px; }
[dir="rtl"] .lightbox-prev { left: auto; right: 20px; }
[dir="rtl"] .lightbox-next { right: auto; left: 20px; }

.lightbox-counter {
    position: absolute;
    bottom: -30px;
    left: 50%;
    transform: translateX(-50%);
    color: var(--white);
    font-size: .9rem;
    font-weight: 600;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* =====================================================
   Responsive Overrides
   ===================================================== */
@media (max-width: 1024px) {
    .property-layout { grid-template-columns: 1fr; gap: 40px; }
    .booking-card { position: static; margin: 0 auto; max-width: 480px; }
    .checkout-layout { grid-template-columns: 1fr; gap: 40px; }
    .booking-summary-card { position: static; }
    .search-layout { grid-template-columns: 1fr; }
    .filters-sidebar { position: static; margin-bottom: 24px; }
    .dashboard-layout { grid-template-columns: 1fr; }
    .dashboard-sidebar { border: none; padding: 16px; overflow-x: auto; }
    .dashboard-menu { flex-direction: row; }
    .dashboard-menu a { white-space: nowrap; }
    .stat-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    .gallery-grid {
        grid-template-columns: 1fr;
        grid-template-rows: auto;
        aspect-ratio: auto;
    }
    .gallery-main { aspect-ratio: 4/3; }
    .gallery-item:not(.gallery-main) { display: none; }
    .property-highlights { grid-template-columns: 1fr; }
    .amenities-grid { grid-template-columns: 1fr; }
    .stat-grid { grid-template-columns: 1fr; }
    .dashboard-main { padding: 24px 16px; }
}
