/* =========================================================
   property-mobile.css
   Parent class: .ons-prop  (sab styles isi ke andar scoped hain)
   Mobile-first: base = mobile, upar min-width se tablet/desktop
   ========================================================= */

/* NOTE: overflow hidden yahan mat lagana, wo position:sticky tod deta hai. clip safe hai */
.ons-prop { overflow-x: clip; }
.ons-prop *, .ons-prop *::before, .ons-prop *::after { box-sizing: border-box; }
.ons-prop img { max-width: 100%; height: auto; display: block; }
.ons-prop .wrap { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 16px; }

/* ---------- Hero ---------- */
.ons-prop .ons-p-hero { padding: 28px 0 18px; }
.ons-prop .ons-p-hero h1 { font-size: 24px; line-height: 1.25; margin: 6px 0 8px; word-break: break-word; }
.ons-prop .ons-p-hero p { font-size: 14px; line-height: 1.6; margin: 0; }
.ons-prop .ons-p-sec { padding: 8px 0 90px; } /* niche space = sticky bar ke liye */

/* ---------- Layout (mobile: single column) ---------- */
.ons-prop .ons-p-layout { display: grid; grid-template-columns: 1fr; gap: 20px; }
.ons-prop .ons-p-layout > * { min-width: 0; }

/* ---------- Cards ---------- */
.ons-prop .ons-p-card { padding: 16px; border-radius: 14px; }
.ons-prop .ons-prop__gap { margin-top: 16px; }
.ons-prop .ons-p-h2 { font-size: 18px; margin: 0 0 12px; }

/* ---------- Gallery ---------- */
.ons-prop .ons-p-gal .main { border-radius: 12px; overflow: hidden; aspect-ratio: 4 / 3; background: #eef0f4; }
.ons-prop .ons-p-gal .main img { width: 100%; height: 100%; object-fit: cover; }
.ons-prop .ons-p-gal .thumbs {
  display: flex; gap: 8px; margin-top: 10px;
  overflow-x: auto; -webkit-overflow-scrolling: touch;
  scroll-snap-type: x proximity; padding-bottom: 6px;
}
.ons-prop .ons-p-gal .thumbs img {
  flex: 0 0 76px; width: 76px; height: 58px; object-fit: cover;
  border-radius: 8px; cursor: pointer; scroll-snap-align: start;
  opacity: .7; border: 2px solid transparent;
}
.ons-prop .ons-p-gal .thumbs img.on { opacity: 1; border-color: var(--p-gold, #c9a24b); }

/* ---------- Meta chips ---------- */
.ons-prop .ons-prop__meta {
  display: flex; flex-wrap: wrap; gap: 8px 14px;
  margin: 16px 0 2px; font-size: 13px;
}
.ons-prop .ons-prop__meta span { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }

/* ---------- Description / location ---------- */
.ons-prop .ons-prop__desc { line-height: 1.75; color: #3a4561; font-size: 14.5px; word-break: break-word; }
.ons-prop .ons-prop__loc { color: #3a4561; line-height: 1.7; font-size: 14.5px; margin: 0; }
.ons-prop .ons-prop__loc i { color: var(--p-gold, #c9a24b); margin-right: 8px; }

/* ---------- Amenities (mobile: 2 columns) ---------- */
.ons-prop .ons-p-amen { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.ons-prop .ons-p-amen > div { display: flex; align-items: center; gap: 8px; font-size: 13.5px; line-height: 1.3; }

/* ---------- Booking card ---------- */
.ons-prop .ons-prop__price { display: flex; align-items: baseline; gap: 8px; }
.ons-prop .ons-prop__price b { font-size: 26px; color: var(--p-navy, #14213d); }
.ons-prop .ons-prop__price span { color: var(--p-mute, #6b7690); font-size: 13px; }
.ons-prop .ons-p-rates { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 12px 0; }
.ons-prop .ons-p-rates small { display: block; font-size: 11px; }

.ons-prop .ons-p-f .row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.ons-prop .ons-p-f .fld { margin-bottom: 12px; }
.ons-prop .ons-p-f label { display: block; font-size: 12px; margin-bottom: 4px; }

/* 16px font = iPhone par input zoom nahi hoga; 46px = easy tap */
.ons-prop .ons-p-f input,
.ons-prop .ons-p-f select {
  width: 100%; min-height: 46px; font-size: 16px;
  padding: 10px 12px; border-radius: 10px;
}

.ons-prop .ons-p-btn { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; min-height: 48px; font-size: 15px; border-radius: 10px; text-align: center; }
.ons-prop .ons-prop__ask { margin-top: 12px; }
.ons-prop .ons-prop__note { font-size: 12px; color: var(--p-mute, #6b7690); margin: 14px 0 0; text-align: center; }
.ons-prop .ons-p-sum { margin: 6px 0 16px; }
.ons-prop .ons-p-sum .line { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; padding: 4px 0; }
.ons-prop .ons-p-alert { font-size: 13.5px; padding: 10px 12px; border-radius: 10px; margin-bottom: 12px; }

/* anchor scroll par header ke neeche na chhupe */
.ons-prop #booking { scroll-margin-top: 80px; }

/* ---------- Sticky bottom bar (sirf mobile) ---------- */
.ons-prop .ons-prop__bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px 16px calc(10px + env(safe-area-inset-bottom, 0px));
  background: #fff; box-shadow: 0 -4px 18px rgba(0, 0, 0, .12);
}
.ons-prop .ons-prop__bar-price b { display: block; font-size: 18px; color: var(--p-navy, #14213d); line-height: 1.1; }
.ons-prop .ons-prop__bar-price small { font-size: 11px; color: var(--p-mute, #6b7690); }
.ons-prop .ons-prop__bar a {
  flex: 0 0 auto; min-height: 44px; padding: 0 22px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--p-gold, #c9a24b); color: #fff; font-weight: 600;
  border-radius: 10px; text-decoration: none; font-size: 15px;
}

/* ---------- Very small phones ---------- */
@media (max-width: 360px) {
  .ons-prop .ons-p-hero h1 { font-size: 21px; }
  .ons-prop .ons-p-f .row2 { grid-template-columns: 1fr; }
}

/* ---------- Tablet ---------- */
@media (min-width: 640px) {
  .ons-prop .wrap { padding: 0 24px; }
  .ons-prop .ons-p-hero { padding: 40px 0 24px; }
  .ons-prop .ons-p-hero h1 { font-size: 32px; }
  .ons-prop .ons-p-hero p { font-size: 15px; }
  .ons-prop .ons-p-card { padding: 22px; }
  .ons-prop .ons-p-amen { grid-template-columns: repeat(3, 1fr); }
  .ons-prop .ons-p-gal .thumbs img { flex-basis: 96px; width: 96px; height: 70px; }
}

/* ---------- Desktop: 2 columns + sticky sidebar ---------- */
@media (min-width: 992px) {
  .ons-prop .ons-p-sec { padding-bottom: 60px; }
  .ons-prop .ons-p-layout { grid-template-columns: minmax(0, 1fr) 380px; gap: 28px; align-items: start; }
  .ons-prop .ons-p-side {
    position: -webkit-sticky !important;
    position: sticky !important;
    top: 100px;               /* header ki height ke hisaab se kam/zyada karo */
    align-self: start;        /* grid me sticky ke liye zaroori */
    height: fit-content;
    max-height: calc(100vh - 120px);
    overflow-y: auto;         /* chhoti screen par card scroll ho jaye */
    scrollbar-width: thin;
  }
  .ons-prop .ons-p-hero h1 { font-size: 38px; }
  .ons-prop .ons-p-gal .main { aspect-ratio: 16 / 10; }
  .ons-prop .ons-prop__bar { display: none; } /* desktop par bar nahi chahiye */
}
