:root {
  --accent: #ea5548;
  --accent-dark: #d1453c;
  --text: #222;
  --muted: #6b6b6b;
  --border: #dddddd;
  --radius: 14px;
  --font-body: "Open Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-heading: "DM Serif Display", Georgia, serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--text);
  background: #fff;
}

.topbar {
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background: #fff;
  z-index: 10;
}

.topbar-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 18px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
}

.logo img {
  height: 44px;
  display: block;
}

.topbar-link {
  color: var(--muted);
  font-size: 14px;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.lang-toggle {
  border: 1px solid var(--border);
  background: #fff;
  border-radius: 20px;
  padding: 6px 14px;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
}

.lang-toggle:hover {
  background: #f7f2f1;
  border-color: var(--accent);
}

.search-hero {
  text-align: center;
  padding: 48px 24px 32px;
  background: linear-gradient(180deg, #fff7f5 0%, #ffffff 100%);
}

.search-hero h1 {
  font-family: var(--font-heading);
  font-weight: 400;
  font-size: 44px;
  margin: 0 0 8px;
}

.subtitle {
  color: var(--muted);
  margin: 0 0 28px;
  font-size: 16px;
}

.search-wrap {
  position: relative;
  display: inline-block;
}

.search-bar {
  display: inline-flex;
  align-items: stretch;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 44px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  overflow: hidden;
}

.search-field {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 12px 26px;
  text-align: left;
  min-width: 150px;
  border: none;
  background: transparent;
  font-family: inherit;
  cursor: pointer;
  border-radius: 40px;
  transition: background 0.15s ease;
}

.search-field:hover {
  background: #f7f2f1;
}

.search-field label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--muted);
  margin-bottom: 2px;
}

.field-value {
  font-size: 14px;
  color: var(--text);
  white-space: nowrap;
}

.search-divider {
  width: 1px;
  background: var(--border);
  margin: 10px 0;
}

.search-button {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--accent);
  color: #fff;
  border: none;
  margin: 6px 6px 6px 0;
  padding: 0 28px;
  border-radius: 36px;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.15s ease;
}

.search-button:hover {
  background: var(--accent-dark);
}

/* Calendar popover */
.calendar-popover {
  position: absolute;
  top: calc(100% + 14px);
  left: 50%;
  transform: translateX(-50%);
  background: #fff;
  border-radius: 20px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.18);
  padding: 28px 32px 20px;
  z-index: 30;
  text-align: left;
}

.calendar-nav {
  display: flex;
  justify-content: space-between;
  margin-bottom: -8px;
}

.calendar-nav-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: #fff;
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.calendar-nav-btn:hover {
  background: #f7f2f1;
}

.calendar-nav-btn:disabled {
  opacity: 0.3;
  cursor: default;
}

.calendar-nav-btn:disabled:hover {
  background: #fff;
}

.calendar-months {
  display: flex;
  gap: 40px;
}

.calendar-month {
  width: 280px;
}

.calendar-month-header {
  text-align: center;
  font-weight: 700;
  font-size: 15px;
  margin: 4px 0 16px;
}

.calendar-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  margin-bottom: 4px;
}

.calendar-weekdays span {
  text-align: center;
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
}

.calendar-days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  row-gap: 2px;
}

.calendar-day {
  border: none;
  background: none;
  height: 50px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  font-size: 13px;
  font-family: inherit;
  color: var(--text);
  cursor: pointer;
  border-radius: 10px;
  position: relative;
}

.calendar-day-price {
  font-size: 10px;
  font-weight: 600;
  color: #b7b7b7;
  line-height: 1;
}

.calendar-day:hover:not(:disabled):not(.calendar-day-empty) {
  background: #f0f0f0;
}

.calendar-day:disabled {
  color: #ccc;
  cursor: default;
}

.calendar-day-empty {
  visibility: hidden;
  cursor: default;
}

.calendar-day.in-range {
  background: #fdeceb;
  border-radius: 0;
}

.calendar-day.range-start,
.calendar-day.range-end {
  background: var(--accent);
  color: #fff;
  border-radius: 10px;
}

.calendar-day.range-start .calendar-day-price,
.calendar-day.range-end .calendar-day-price {
  color: rgba(255, 255, 255, 0.85);
}

.calendar-day.range-start::before,
.calendar-day.range-end::before {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  width: 50%;
  background: #fdeceb;
  z-index: -1;
}

.calendar-day.range-start::before {
  right: 0;
}

.calendar-day.range-end::before {
  left: 0;
}

.calendar-day.range-start.range-end::before {
  content: none;
}

.calendar-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.calendar-selection {
  font-size: 14px;
  font-weight: 600;
}

.calendar-clear {
  border: none;
  background: none;
  font-size: 14px;
  text-decoration: underline;
  cursor: pointer;
  color: var(--text);
}

/* Guests popover */
.guests-popover {
  position: absolute;
  top: calc(100% + 14px);
  right: 90px;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.18);
  padding: 20px 22px;
  z-index: 30;
  min-width: 260px;
  text-align: left;
}

.stepper-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.stepper-label {
  font-size: 15px;
  font-weight: 600;
}

.stepper-hint {
  font-size: 12px;
  color: var(--muted);
}

.stepper {
  display: flex;
  align-items: center;
  gap: 14px;
}

.stepper-btn {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: #fff;
  font-size: 16px;
  cursor: pointer;
}

.stepper-btn:hover {
  border-color: var(--text);
}

.stepper-btn:disabled {
  opacity: 0.3;
  cursor: default;
}

.stepper-count {
  font-size: 15px;
  min-width: 16px;
  text-align: center;
}

.search-status {
  min-height: 20px;
  margin-top: 14px;
  color: var(--muted);
  font-size: 14px;
}

.search-status.error {
  color: #b3261e;
}

.listing-grid {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 28px 24px;
  /* Without this, grid stretches each card to match the tallest one in its
     row, and a <button>'s default content-centering then pushes the photo
     down inside the extra space - exactly the "jumping/misaligned" photos. */
  align-items: start;
}

.room-card {
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  border: none;
  background: none;
  padding: 0;
  text-align: left;
  font-family: inherit;
  display: block;
  width: 100%;
}

.room-card:hover .room-photo {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.18);
}

.room-photo {
  height: 200px;
  border-radius: var(--radius);
  display: flex;
  align-items: flex-end;
  justify-content: flex-start;
  padding: 12px;
  position: relative;
  color: #fff;
  font-size: 40px;
  background-size: cover;
  background-position: center;
}

.room-facts {
  font-size: 13px;
  color: var(--muted);
  margin: 0 0 6px;
}

.room-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  background: #fff;
  color: var(--text);
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 20px;
}

.room-badge.available {
  background: #1f8a4c;
  color: #fff;
}

.room-badge.unavailable {
  background: #6b6b6b;
  color: #fff;
}

.room-info {
  padding: 12px 2px;
}

.room-name {
  font-weight: 600;
  font-size: 16px;
  margin: 0 0 2px;
}

.room-tagline {
  color: var(--muted);
  font-size: 13px;
  margin: 0 0 8px;
}

.room-price {
  font-size: 14px;
}

.room-price strong {
  font-size: 16px;
}

.room-reason {
  font-size: 12px;
  color: #b3261e;
  margin-top: 4px;
}

.room-badge.hint {
  background: #b5651d;
  color: #fff;
}

.room-card-hint {
  cursor: default;
}

.room-card-hint .room-photo {
  opacity: 0.7;
}

.room-hint {
  font-size: 12px;
  color: var(--muted);
  margin: 4px 0 8px;
}

.room-extend-btn {
  width: 100%;
  border: 1.5px solid var(--accent);
  background: #fff;
  color: var(--accent);
  border-radius: 8px;
  padding: 8px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  transition: background 0.15s ease;
}

.room-extend-btn:hover {
  background: #fdeceb;
}

/* Room detail modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 24px;
}

.modal-overlay[hidden] {
  display: none;
}

.modal-card {
  background: #fff;
  border-radius: 20px;
  max-width: 920px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  display: flex;
  position: relative;
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  z-index: 2;
}

.modal-photo {
  width: 38%;
  flex-shrink: 0;
  background-size: cover;
  background-position: center;
  border-radius: 20px 0 0 20px;
}

.modal-body {
  padding: 32px 32px 32px 28px;
  flex: 1;
  min-width: 0;
}

.modal-body h2 {
  font-family: var(--font-heading);
  font-weight: 400;
  font-size: 28px;
  margin: 0 0 8px;
}

.modal-facts {
  color: var(--muted);
  font-size: 14px;
  margin-bottom: 16px;
}

.modal-stay {
  background: #f7f2f1;
  border-radius: 12px;
  padding: 14px 16px;
  font-size: 14px;
  margin-bottom: 20px;
}

.modal-stay strong {
  font-size: 18px;
}

.modal-book-btn {
  display: block;
  width: 100%;
  text-align: center;
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  border: none;
  padding: 14px;
  border-radius: 10px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  transition: background 0.15s ease;
}

.modal-book-btn:hover {
  background: var(--accent-dark);
}

.modal-book-btn:disabled {
  opacity: 0.6;
  cursor: default;
}

#payment-element {
  margin: 4px 0;
}

.payment-message {
  color: #b3261e;
  font-size: 13px;
  min-height: 18px;
  margin: 0;
}

.modal-fallback {
  text-align: center;
  font-size: 13px;
  color: var(--muted);
  margin: 14px 0 0;
}

.modal-fallback a {
  color: var(--accent);
  text-decoration: underline;
}

.booking-success {
  background: #eaf6ee;
  border: 1px solid #bfe3cb;
  border-radius: 12px;
  padding: 18px;
  text-align: center;
}

.booking-success h3 {
  margin: 0 0 6px;
  color: #1f8a4c;
}

.modal-divider {
  text-align: center;
  color: var(--muted);
  font-size: 13px;
  margin: 22px 0;
  position: relative;
}

.modal-divider::before,
.modal-divider::after {
  content: '';
  position: absolute;
  top: 50%;
  width: 40%;
  height: 1px;
  background: var(--border);
}

.modal-divider::before {
  left: 0;
}

.modal-divider::after {
  right: 0;
}

.inquiry-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.inquiry-form[hidden] {
  display: none;
}

.inquiry-row {
  display: flex;
  gap: 10px;
}

.inquiry-row input {
  flex: 1;
  min-width: 0;
}

.inquiry-form input,
.inquiry-form textarea {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 12px;
  font-family: var(--font-body);
  font-size: 14px;
  outline: none;
}

.inquiry-form input:focus,
.inquiry-form textarea:focus {
  border-color: var(--accent);
}

.inquiry-form textarea {
  resize: vertical;
}

.inquiry-submit {
  background: #fff;
  border: 1.5px solid var(--text);
  border-radius: 10px;
  padding: 12px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: background 0.15s ease;
}

.inquiry-submit:hover {
  background: #f7f2f1;
}

@media (max-width: 640px) {
  .modal-card {
    flex-direction: column;
    max-height: 95vh;
  }

  .modal-photo {
    width: 100%;
    height: 220px;
    border-radius: 20px 20px 0 0;
  }

  .modal-body {
    padding: 24px;
  }
}

.site-footer {
  text-align: center;
  padding: 32px 24px;
  color: var(--muted);
  font-size: 13px;
  border-top: 1px solid var(--border);
  margin-top: 24px;
}
