/* ════════════════════════════════════════════════
   ROOM DETAIL PAGE — The Green Homestay
   Loads after main.css and reuses its header, footer,
   modal, guest-panel, toast and date-picker styles.
   ════════════════════════════════════════════════ */

/* ── header ──
   main.css only gives the header a background once .scrolled is
   added, which suits the dark hero on the homepage. Room pages
   are light, so the header is solid from the top here. */
body.room-body header {
  background: rgba(11,61,46,.97);
  backdrop-filter: blur(12px);
  box-shadow: 0 2px 24px rgba(0,0,0,.15);
}

.room-page { padding-top: 78px; background: var(--cream, #FAF7F2); min-height: 100vh; }

/* ── breadcrumb ──
   main.css styles every <nav> as a flex row with space-between;
   reset that here so the crumb reads as a normal line. */
.rp-crumb {
  display: block; height: auto;
  max-width: 1180px; margin: 0 auto; padding: 18px 20px 0;
  font-size: .8rem; color: var(--text-light, #8a8580);
}
.rp-crumb a { color: inherit; text-decoration: none; }
.rp-crumb a:hover { color: var(--green-deep, #0B3D2E); }
.rp-crumb span { margin: 0 6px; opacity: .5; }

/* ── gallery ──
   Room photos are 1024×1536 (2:3 portrait), so the frames use that
   ratio and the images are never cropped. On desktop the tall photo
   sits beside a 2×2 thumbnail grid rather than dominating the page. */
.rp-gallery { max-width: 1180px; margin: 0 auto; padding: 16px 20px 0; }
@media (min-width: 768px) {
  .rp-gallery {
    display: grid; grid-template-columns: minmax(0, 400px) 1fr;
    gap: 14px; align-items: start;
  }
}
.rp-main-img {
  position: relative; width: 100%; aspect-ratio: 2 / 3;
  border-radius: 18px; overflow: hidden; background: #e8e4dd;
}
.rp-main-img img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  transition: opacity .25s ease;
}
.rp-badge {
  position: absolute; top: 14px; left: 14px; z-index: 2;
  background: var(--green-deep, #0B3D2E); color: #fff;
  padding: 6px 14px; border-radius: 50px;
  font-size: .68rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase;
}
.rp-thumbs {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 8px;
}
@media (min-width: 768px) {
  .rp-thumbs { grid-template-columns: 1fr 1fr; margin-top: 0; gap: 10px; }
}
.rp-thumb {
  aspect-ratio: 2 / 3; border-radius: 10px; overflow: hidden; cursor: pointer;
  border: 2px solid transparent; transition: border-color .2s, opacity .2s; opacity: .72;
  background: #e8e4dd; padding: 0;
}
@media (min-width: 768px) { .rp-thumb { aspect-ratio: 4 / 3; border-radius: 12px; } }
.rp-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.rp-thumb.active { border-color: var(--green-deep, #0B3D2E); opacity: 1; }
.rp-thumb:hover { opacity: 1; }

/* ── body layout ── */
.rp-body {
  max-width: 1180px; margin: 0 auto; padding: 26px 20px 60px;
  display: grid; grid-template-columns: 1fr; gap: 28px;
}
@media (min-width: 960px) {
  .rp-body { grid-template-columns: 1fr 1fr; gap: 44px; align-items: start; }
}

/* main.css styles the old #booking section (dark green panel, heavy
   padding). The scroll anchor below carries that id only so app.js's
   post-OTP scrollIntoView still resolves — strip the styling off it. */
.room-body #booking.rp-anchor {
  display: block; height: 0; padding: 0; margin: 0;
  background: none; border-radius: 0; overflow: hidden;
  scroll-margin-top: 96px;
}

/* ── left column ── */
.rp-title {
  font-family: 'Cormorant Garamond', serif; font-size: 2.1rem; font-weight: 600;
  color: var(--green-deep, #0B3D2E); line-height: 1.1; margin: 0;
}
@media (min-width: 768px) { .rp-title { font-size: 2.6rem; } }
.rp-sub { font-size: .9rem; color: var(--text-light, #8a8580); margin-top: 6px; }
.rp-price-line {
  display: flex; align-items: baseline; gap: 8px; margin-top: 14px;
  font-family: 'Cormorant Garamond', serif;
}
.rp-price { font-size: 1.9rem; font-weight: 700; color: var(--brown, #6F4E37); }
.rp-price-unit { font-family: 'Outfit', sans-serif; font-size: .84rem; color: var(--text-light, #8a8580); }

.rp-section { margin-top: 32px; }
.rp-section h2 {
  font-family: 'Cormorant Garamond', serif; font-size: 1.35rem; font-weight: 600;
  color: var(--green-deep, #0B3D2E); margin: 0 0 12px;
}
.rp-section p { font-size: .93rem; line-height: 1.75; color: var(--text-mid, #5a554f); margin: 0 0 12px; }

/* ── what's included ── */
.rp-amenities { display: flex; flex-direction: column; gap: 4px; }
.rp-feature {
  display: flex; gap: 14px; align-items: flex-start; padding: 14px 0;
  border-bottom: 1px solid #efece6;
}
.rp-feature:last-child { border-bottom: none; }
.rp-feat-icon {
  width: 40px; height: 40px; flex-shrink: 0; border-radius: 11px;
  background: rgba(11,61,46,.06); display: flex; align-items: center;
  justify-content: center; font-size: 1.15rem;
}
.rp-feat-body { min-width: 0; }
.rp-feat-title {
  font-size: .95rem; font-weight: 600; color: var(--green-deep, #0B3D2E);
  line-height: 1.3; margin-bottom: 3px;
}
.rp-feat-text {
  font-size: .86rem; color: var(--text-mid, #5a554f); line-height: 1.6; margin: 0;
}

.rp-facts { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (min-width: 640px) { .rp-facts { grid-template-columns: repeat(4, 1fr); } }
.rp-fact {
  background: #fff; border: 1px solid #efece6; border-radius: 12px; padding: 14px;
}
.rp-fact-lbl {
  font-size: .64rem; text-transform: uppercase; letter-spacing: .08em;
  color: var(--text-light, #8a8580); font-weight: 700;
}
.rp-fact-val {
  font-family: 'Cormorant Garamond', serif; font-size: 1.15rem; font-weight: 600;
  color: var(--green-deep, #0B3D2E); margin-top: 3px;
}

.rp-policy { list-style: none; padding: 0; margin: 0; }
.rp-policy li {
  display: flex; gap: 10px; padding: 9px 0; font-size: .88rem;
  color: var(--text-mid, #5a554f); border-bottom: 1px solid #efece6;
}
.rp-policy li:last-child { border-bottom: none; }
.rp-policy li b { color: var(--green-deep, #0B3D2E); font-weight: 600; min-width: 108px; }

/* ── booking card ── */
.rp-book-card {
  background: #fff; border: 1px solid #e9e5de; border-radius: 20px;
  padding: 24px; box-shadow: 0 6px 26px rgba(11,61,46,.07);
}
@media (min-width: 960px) { .rp-book-card { position: sticky; top: 96px; } }

/* explicit colours — the card must never inherit the old section's
   white-on-green treatment */
.rp-book-card, .rp-book-card p, .rp-book-card span, .rp-book-card div {
  color: var(--text-mid, #5a554f);
}
.rp-book-card .form-group label {
  color: var(--text-mid, #5a554f); font-size: .8rem; font-weight: 500;
}
.rp-book-card .form-control {
  background: #fff; color: var(--green-deep, #0B3D2E);
  border: 1px solid #e3ded6; border-radius: 10px;
  padding: 13px 14px; font-size: 16px; width: 100%;
}
.rp-book-card .form-control:focus {
  border-color: var(--green-deep, #0B3D2E);
  box-shadow: 0 0 0 3px rgba(11,61,46,.1); outline: none;
}
.rp-book-card .form-control::placeholder { color: #b5afa7; }
@media (min-width: 768px) { .rp-book-card .form-control { font-size: .92rem; padding: 12px 14px; } }

/* phone field — tap to open the OTP modal, then shows as verified */
.rp-book-card .phone-login-input {
  cursor: pointer; background: #fbfaf8;
}
.rp-book-card .phone-login-input:hover { border-color: var(--green-deep, #0B3D2E); }
.rp-book-card .phone-login-input.verified {
  background: #f0f8f3; border-color: #bfe3cd;
  color: var(--green-deep, #0B3D2E); font-weight: 600; cursor: default;
}
.rp-book-head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 10px; padding-bottom: 16px; border-bottom: 1px solid #f1eee9; margin-bottom: 18px;
}
.rp-book-head .amt {
  font-family: 'Cormorant Garamond', serif; font-size: 1.65rem;
  font-weight: 700; color: var(--green-deep, #0B3D2E);
}
.rp-book-card .rp-book-head .amt { color: var(--green-deep, #0B3D2E); }
.rp-book-card .rp-sum-row.total,
.rp-book-card .rp-sum-row.total span { color: var(--green-deep, #0B3D2E); }
.rp-book-card .rp-note { color: var(--text-light, #8a8580); }
.rp-book-head .per { font-size: .8rem; color: var(--text-light, #8a8580); }

/* login gate */
.rp-gate { text-align: center; padding: 8px 0 4px; }
.rp-gate-icon {
  width: 52px; height: 52px; margin: 0 auto 14px; border-radius: 16px;
  background: rgba(11,61,46,.07); display: flex; align-items: center;
  justify-content: center; font-size: 1.4rem;
}
.rp-gate h3 {
  font-family: 'Cormorant Garamond', serif; font-size: 1.25rem; font-weight: 600;
  color: var(--green-deep, #0B3D2E); margin: 0 0 6px;
}
.rp-gate p { font-size: .86rem; color: var(--text-light, #8a8580); line-height: 1.6; margin: 0 0 18px; }
.rp-gate-steps {
  display: flex; flex-direction: column; gap: 8px; margin: 0 0 18px;
  text-align: left; background: #faf8f5; border-radius: 12px; padding: 14px 16px;
}
.rp-gate-step { display: flex; gap: 10px; font-size: .82rem; color: var(--text-mid, #5a554f); }
.rp-gate-step b {
  width: 19px; height: 19px; border-radius: 50%; background: var(--green-deep, #0B3D2E);
  color: #fff; font-size: .66rem; display: flex; align-items: center;
  justify-content: center; flex-shrink: 0; font-weight: 600;
}
.rp-verified {
  display: flex; align-items: center; gap: 9px; padding: 11px 14px; margin-bottom: 16px;
  background: #e9f7ef; border: 1px solid #c7ebd5; border-radius: 12px;
  font-size: .82rem; color: #0f6b3d; font-weight: 500;
}
.rp-verified .chg {
  margin-left: auto; background: none; border: none; font-size: .74rem;
  color: #0f6b3d; text-decoration: underline; cursor: pointer; padding: 0; opacity: .8;
}

/* price summary */
.rp-summary { margin-top: 18px; padding-top: 16px; border-top: 1px solid #f1eee9; }
.rp-sum-row {
  display: flex; justify-content: space-between; align-items: center;
  font-size: .86rem; color: var(--text-mid, #5a554f); padding: 5px 0;
}
.rp-sum-row.total {
  font-family: 'Cormorant Garamond', serif; font-size: 1.2rem; font-weight: 700;
  color: var(--green-deep, #0B3D2E); padding-top: 12px; margin-top: 8px;
  border-top: 1px solid #f1eee9;
}
.rp-coupon-wrap { margin-top: 14px; padding-top: 14px; border-top: 1px solid #f1eee9; }
.rp-coupon-toggle {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  width: 100%; background: none; border: none; padding: 2px 0; cursor: pointer;
  font-family: 'Outfit', sans-serif; font-size: .82rem; color: var(--text-mid, #5a554f);
  text-align: left;
}
.rp-coupon-toggle span:first-child { text-decoration: underline; text-underline-offset: 3px; }
.rp-coupon-toggle:hover span:first-child { color: var(--green-deep, #0B3D2E); }
.rp-coupon-opt {
  font-size: .64rem; text-transform: uppercase; letter-spacing: .08em; font-weight: 600;
  color: var(--text-light, #8a8580); background: #f4f1ec; padding: 3px 8px; border-radius: 50px;
}
.rp-coupon-body { display: none; margin-top: 10px; }
.rp-coupon-body.open { display: block; }
.rp-coupon-row { display: flex; gap: 8px; }
.rp-coupon-row .form-control { flex: 1; text-transform: uppercase; }
.rp-coupon-btn {
  padding: 0 18px; background: var(--green-deep, #0B3D2E); color: #fff; border: none;
  border-radius: 10px; font-size: .82rem; font-weight: 600; cursor: pointer; white-space: nowrap;
}
.rp-btn-book {
  width: 100%; margin-top: 18px; padding: 15px; border: none; border-radius: 12px;
  background: var(--green-deep, #0B3D2E); color: #fff;
  font-family: 'Outfit', sans-serif; font-size: .96rem; font-weight: 600;
  cursor: pointer; transition: transform .15s, background .2s;
}
.rp-btn-book:hover { background: #0e4e3a; }
.rp-btn-book:active { transform: scale(.98); }
.rp-btn-book:disabled { background: #c9c5be; cursor: not-allowed; }
.rp-note { font-size: .74rem; color: var(--text-light, #8a8580); text-align: center; margin-top: 10px; line-height: 1.5; }

.rp-soldout {
  background: #fdeaea; border: 1px solid #f7c9c9; color: #a12727;
  border-radius: 12px; padding: 12px 14px; font-size: .84rem; margin-top: 14px;
}

/* ── sticky mobile book bar ── */
.rp-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 400;
  background: rgba(255,255,255,.96); backdrop-filter: blur(12px);
  border-top: 1px solid #e9e5de; padding: 12px 18px;
  padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px));
  display: flex; align-items: center; gap: 14px;
  transform: translateY(105%); transition: transform .3s ease;
}
.rp-bar.show { transform: translateY(0); }
@media (min-width: 960px) { .rp-bar { display: none; } }
.rp-bar-price { flex: 1; min-width: 0; }
.rp-bar-amt {
  font-family: 'Cormorant Garamond', serif; font-size: 1.25rem;
  font-weight: 700; color: var(--green-deep, #0B3D2E); line-height: 1.1;
}
.rp-bar-per { font-size: .7rem; color: var(--text-light, #8a8580); }
.rp-bar-btn {
  padding: 13px 26px; background: var(--green-deep, #0B3D2E); color: #fff; border: none;
  border-radius: 50px; font-family: 'Outfit', sans-serif; font-size: .88rem;
  font-weight: 600; cursor: pointer; white-space: nowrap;
}
.rp-bar-btn:active { transform: scale(.96); }

/* ── other rooms ── */
.rp-more { max-width: 1180px; margin: 0 auto; padding: 0 20px 90px; }
.rp-more h2 {
  font-family: 'Cormorant Garamond', serif; font-size: 1.5rem; font-weight: 600;
  color: var(--green-deep, #0B3D2E); margin: 0 0 16px;
}
.rp-more-grid { display: grid; grid-template-columns: 1fr; gap: 14px; }
@media (min-width: 640px) { .rp-more-grid { grid-template-columns: 1fr 1fr; } }
.rp-more-card {
  display: flex; gap: 14px; background: #fff; border: 1px solid #efece6;
  border-radius: 14px; padding: 12px; text-decoration: none;
  transition: box-shadow .2s, transform .2s;
}
.rp-more-card:hover { box-shadow: 0 6px 20px rgba(11,61,46,.08); transform: translateY(-2px); }
.rp-more-card img {
  width: 92px; height: 74px; object-fit: cover; border-radius: 10px; flex-shrink: 0;
}
.rp-more-name {
  font-family: 'Cormorant Garamond', serif; font-size: 1.1rem; font-weight: 600;
  color: var(--green-deep, #0B3D2E);
}
.rp-more-price { font-size: .84rem; color: var(--brown, #6F4E37); font-weight: 600; margin-top: 3px; }
.rp-more-meta { font-size: .74rem; color: var(--text-light, #8a8580); margin-top: 3px; }

/* mobile spacing so the sticky bar never covers content */
@media (max-width: 959px) { .rp-more { padding-bottom: 110px; } }
