:root {
  --brand: #e61e4d;
  --brand-2: #d70466;
  --ink: #222;
  --muted: #6a6a6a;
  --line: #ddd;
  --bg: #fff;
  --soft: #f7f7f7;
  --range: #f2f2f2;
  --radius: 12px;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.5;
}
button { font: inherit; cursor: pointer; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 24px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.center { text-align: center; }

.topbar { border-bottom: 1px solid #ebebeb; position: sticky; top: 0; background: #fff; z-index: 10; }
.topbar-inner { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.logo { color: var(--brand); text-decoration: none; font-weight: 800; font-size: 22px; letter-spacing: -0.5px; }
.topbar-link { color: var(--ink); text-decoration: none; font-weight: 600; padding: 10px 16px; border-radius: 999px; }
.topbar-link:hover { background: var(--soft); }

.title-block h1 { font-size: 26px; margin: 24px 0 4px; }
.meta { display: flex; flex-wrap: wrap; gap: 6px; font-size: 14px; font-weight: 600; }
.dot { color: var(--muted); }

.gallery {
  position: relative;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  grid-template-rows: 200px 200px;
  gap: 8px;
  margin: 24px 0 32px;
  border-radius: var(--radius);
  overflow: hidden;
}
.gallery button { border: 0; padding: 0; background: #eee; overflow: hidden; }
.gallery img { width: 100%; height: 100%; object-fit: cover; display: block; transition: filter .2s; }
.gallery button:hover img { filter: brightness(.85); }
.gallery-main { grid-row: 1 / span 2; }
.gallery button:nth-child(4) { grid-column: 2 / span 2; }
.gallery .show-all {
  position: absolute; right: 16px; bottom: 16px;
  background: #fff; border: 1px solid var(--ink); border-radius: 8px;
  padding: 6px 14px; font-size: 14px; font-weight: 600;
}

.layout { display: grid; grid-template-columns: 1fr 380px; gap: 80px; align-items: start; }
.details section { border-bottom: 1px solid #ebebeb; padding: 24px 0; }
.details section:first-child { padding-top: 0; }
.details h2 { font-size: 22px; margin: 0; }
.details h3 { font-size: 20px; margin: 0 0 12px; }
.host-row { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.host-row p { margin: 4px 0 0; }
.avatar {
  flex: none; width: 56px; height: 56px; border-radius: 50%;
  background: linear-gradient(135deg, #1f3a5f, #4a6fa5); color: #fff;
  display: grid; place-items: center; font-weight: 700; font-size: 14px;
}
.hl { display: flex; gap: 20px; align-items: flex-start; margin-bottom: 18px; }
.hl:last-child { margin-bottom: 0; }
.hl-icon { font-size: 26px; width: 32px; text-align: center; }
.hl p { margin: 2px 0 0; font-size: 14px; }
.amenities ul { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

/* booking card */
.booking { position: sticky; top: 96px; }
.card { border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; box-shadow: 0 6px 16px rgba(0,0,0,.12); }
.price { font-size: 22px; margin-bottom: 16px; }
.price .muted { font-size: 16px; }
.date-summary { display: grid; grid-template-columns: 1fr 1fr; border: 1px solid #b0b0b0; border-radius: 8px; overflow: hidden; }
.date-summary > div { padding: 10px 12px; }
.date-summary > div + div { border-left: 1px solid #b0b0b0; }
.date-summary label { display: block; font-size: 10px; font-weight: 800; text-transform: uppercase; }
.date-summary span { font-size: 14px; }

.calendar { margin-top: 16px; user-select: none; }
.cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.cal-head strong { font-size: 15px; }
.cal-nav { border: 0; background: none; width: 32px; height: 32px; border-radius: 50%; font-size: 18px; }
.cal-nav:hover:not(:disabled) { background: var(--soft); }
.cal-nav:disabled { opacity: .25; cursor: default; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); }
.cal-dow { font-size: 11px; color: var(--muted); text-align: center; font-weight: 600; padding-bottom: 6px; }
.cal-day {
  aspect-ratio: 1; border: 0; background: none; font-size: 14px; font-weight: 600;
  position: relative; padding: 0;
}
.cal-day span { display: grid; place-items: center; width: 100%; height: 100%; border-radius: 50%; border: 1.5px solid transparent; }
.cal-day:hover:not(:disabled) span { border-color: var(--ink); }
.cal-day:disabled { color: #c4c4c4; text-decoration: line-through; cursor: default; }
.cal-day.in-range, .cal-day.hover-range { background: var(--range); }
.cal-day.start, .cal-day.end { background: var(--range); }
.cal-day.start { border-radius: 50% 0 0 50%; }
.cal-day.end { border-radius: 0 50% 50% 0; }
.cal-day.start.end { border-radius: 50%; background: none; }
.cal-day.start:not(.has-end) { background: none; }
.cal-day.start span, .cal-day.end span { background: var(--ink); color: #fff; }
.cal-actions { text-align: right; }
.link-btn { background: none; border: 0; text-decoration: underline; font-weight: 600; font-size: 13px; padding: 4px 0; }

.field { display: block; margin-top: 12px; }
.field span { display: block; font-size: 12px; font-weight: 700; margin-bottom: 4px; }
.field input, .field select, .field textarea {
  width: 100%; padding: 10px 12px; font: inherit; font-size: 15px;
  border: 1px solid #b0b0b0; border-radius: 8px; background: #fff;
}
.field input:focus, .field select:focus, .field textarea:focus { outline: 2px solid var(--ink); border-color: transparent; }
.hp { position: absolute; left: -9999px; }
.reserve {
  width: 100%; margin-top: 16px; padding: 14px; border: 0; border-radius: 8px;
  color: #fff; font-size: 16px; font-weight: 700;
  background: linear-gradient(to right, var(--brand), var(--brand-2));
}
.reserve:disabled { opacity: .6; cursor: default; }
.summary { border-top: 1px solid #ebebeb; margin-top: 12px; padding-top: 12px; font-size: 15px; }
.summary div { display: flex; justify-content: space-between; margin: 4px 0; }
.status { margin-top: 12px; font-size: 14px; }
.status.ok { color: #0a7a3b; font-weight: 600; }
.status.err { color: #c13515; font-weight: 600; }

.footer { padding: 48px 24px; border-top: 1px solid #ebebeb; margin-top: 48px; }

/* lightbox */
.lightbox {
  position: fixed; inset: 0; background: rgba(0,0,0,.92); z-index: 100;
  display: flex; align-items: center; justify-content: center;
}
.lightbox[hidden] { display: none; }
.lightbox img { max-width: 88vw; max-height: 86vh; border-radius: 6px; }
.lightbox button { position: absolute; background: rgba(255,255,255,.12); color: #fff; border: 0; border-radius: 50%; width: 48px; height: 48px; font-size: 28px; line-height: 1; }
.lightbox button:hover { background: rgba(255,255,255,.25); }
.lb-close { top: 20px; left: 20px; font-size: 20px !important; }
.lb-prev { left: 20px; }
.lb-next { right: 20px; }
.lb-count { position: absolute; top: 30px; color: #fff; font-size: 14px; }

@media (max-width: 860px) {
  .layout { grid-template-columns: 1fr; gap: 24px; }
  .booking { position: static; }
  .gallery { grid-template-columns: 1fr; grid-template-rows: 280px; }
  .gallery button:not(.gallery-main):not(.show-all) { display: none; }
  .gallery-main { grid-row: auto; }
  .wrap { padding: 0 16px; }
  .lb-prev, .lb-next { bottom: 24px; }
}
