html[lang="ar"] body { font-family: 'Cairo', var(--sans); }
html[lang="ar"] h1, html[lang="ar"] h2, html[lang="ar"] h3 { font-family: 'Cairo', var(--serif); font-weight: 600; letter-spacing: 0; }

.top { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 16px; max-width: 1180px; margin: 0 auto; }
.top .logo { text-decoration: none; display: grid; line-height: 1.1; }
.top .logo strong { font: 400 26px var(--serif); }
.wrap { max-width: 1180px; margin: 0 auto; padding: 8px 16px 80px; display: grid; gap: 22px; }
.wrap > *, .listing > * { min-width: 0; }
body { overflow-x: hidden; }

.hero { display: grid; gap: 10px; padding: 18px 0 4px; }
.hero h1 { font-size: clamp(36px, 7vw, 64px); }
.hero h1 em { color: var(--cream-dim); }

.search { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; align-items: end; }
.search button { justify-content: center; }

.homes { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 16px; }
.home-card { text-decoration: none; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; overflow: hidden; display: grid; transition: border-color .2s; }
.home-card:hover { border-color: var(--cream-faint); }
.home-card img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; display: block; background: var(--surface-2); }
.home-card .body { padding: 16px; display: grid; gap: 6px; }
.home-card .price { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: 6px; flex-wrap: wrap; }
.home-card.unavailable { opacity: .55; }

.gallery { display: grid; grid-template-columns: 2fr 1fr; gap: 8px; border-radius: 18px; overflow: hidden; }
.gallery img { width: 100%; height: 100%; object-fit: cover; display: block; cursor: zoom-in; background: var(--surface-2); }
.gallery .main { aspect-ratio: 4 / 3; }
.gallery .side { display: grid; gap: 8px; grid-auto-rows: 1fr; }
@media (max-width: 760px) {
  .gallery { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; gap: 6px; border-radius: 14px; }
  .gallery .side { display: contents; }
  .gallery img, .gallery .main { flex: 0 0 88%; aspect-ratio: 4 / 3; scroll-snap-align: start; border-radius: 12px; }
}

.listing { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 28px; align-items: start; }
@media (max-width: 960px) { .listing { grid-template-columns: 1fr; } }
.listing .about { display: grid; gap: 14px; }
.features { display: flex; flex-wrap: wrap; gap: 8px; }
.book-box { position: sticky; top: 16px; display: grid; gap: 14px; }

.cal-head { display: flex; justify-content: space-between; align-items: center; }
.cal-head button { min-height: 36px; padding: 6px 12px; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; text-align: center; }
.cal-grid small { color: var(--cream-dim); font-size: 11px; padding: 4px 0; }
.cal-grid button { min-height: 44px; padding: 2px 0; border-radius: 10px; justify-content: center; background: transparent; border-color: transparent; font-variant-numeric: tabular-nums; flex-direction: column; gap: 0; line-height: 1.1; }
.cal-grid .day-price { font-size: 10px; color: var(--cream-dim); }
.cal-grid button.edge .day-price { color: var(--ink); }
.breakdown .discount span:last-child { color: var(--good); }
.cal-grid button:disabled { text-decoration: line-through; color: var(--cream-faint); opacity: 1; }
.cal-grid button.in-range { background: rgba(255, 237, 195, .14); border-radius: 0; }
.cal-grid button.edge { background: var(--cream); color: var(--ink); }
.cal-grid button:not(:disabled):hover { border-color: var(--cream-faint); }

.breakdown { display: grid; gap: 6px; font-size: 14px; }
.breakdown div { display: flex; justify-content: space-between; gap: 12px; }
.breakdown .total { border-top: 1px solid var(--line); padding-top: 8px; font-weight: 600; font-size: 16px; }
.note { font-size: 13px; color: var(--cream-dim); }
.badge { display: inline-flex; gap: 6px; align-items: center; font-size: 12px; color: var(--good); }

.lightbox { position: fixed; inset: 0; background: rgba(0,0,0,.92); display: grid; place-items: center; z-index: 20; padding: 16px; }
.lightbox img { max-width: 100%; max-height: 90vh; border-radius: 12px; }
.lightbox button { position: absolute; top: 16px; inset-inline-end: 16px; }

.confirm { max-width: 560px; margin: 40px auto; text-align: center; display: grid; gap: 14px; padding: 28px; }
.confirm .big { font: 400 54px/1 var(--serif); }

/* Spam trap: invisible without moving it off-screen (that breaks RTL pages). */
.hp { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); opacity: 0; pointer-events: none; }
