/* ── Variables ──────────────────────────────────────────────── */
:root {
  --cream:      #FAF7F2;
  --warm-white: #FFFFFF;
  --sand:       #F0E9DC;
  --terracotta: #C4714F;
  --terra-dark: #A85C3A;
  --dark:       #1C1C1E;
  --text-1:     #2D2D2D;
  --text-2:     #6B6B6B;
  --text-3:     #9B9B9B;
  --border:     #E8E0D4;
  --radius:     12px;
  --radius-sm:  8px;
  --shadow-sm:  0 2px 8px rgba(0,0,0,.07);
  --shadow-md:  0 8px 32px rgba(0,0,0,.10);
  --shadow-lg:  0 16px 56px rgba(0,0,0,.14);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--text-1);
  background: var(--warm-white);
  -webkit-font-smoothing: antialiased;
}

/* ── Utility ────────────────────────────────────────────────── */
.section-pad  { padding: 96px 0; }
.bg-warm      { background: var(--cream); }

.section-label {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--terracotta);
  margin-bottom: 12px;
}

.section-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: clamp(1.75rem, 3.5vw, 2.5rem);
  font-weight: 700;
  color: var(--dark);
  line-height: 1.2;
  margin-bottom: 16px;
}

.section-subtitle {
  font-size: 1rem;
  color: var(--text-2);
  max-width: 520px;
  margin: 0 auto;
  line-height: 1.6;
}

.section-text {
  font-size: 1rem;
  color: var(--text-2);
  line-height: 1.7;
  margin-bottom: 16px;
}

/* ── Buttons ────────────────────────────────────────────────── */
.btn-book {
  display: inline-block;
  background: var(--terracotta);
  color: #fff;
  padding: 12px 28px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s, box-shadow 0.2s;
  letter-spacing: 0.3px;
}
.btn-book:hover {
  background: var(--terra-dark);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(196,113,79,.35);
}
.btn-book--hero {
  padding: 16px 36px;
  font-size: 1rem;
  margin-top: 32px;
}
.btn-book--full {
  width: 100%;
  text-align: center;
  padding: 14px;
  font-size: 1rem;
}

/* ── Navbar ─────────────────────────────────────────────────── */
.navbar {
  background: rgba(255,255,255,0.96);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: 0.875rem 0;
  position: sticky;
  top: 0;
  z-index: 1000;
  transition: box-shadow 0.2s;
}
.navbar.scrolled {
  box-shadow: var(--shadow-sm);
}
.navbar-brand {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--dark) !important;
  letter-spacing: -0.3px;
}
.navbar-nav .nav-link {
  color: var(--text-1) !important;
  font-weight: 500;
  font-size: 0.9rem;
  padding: 0.375rem 0.875rem !important;
  transition: color 0.2s;
}
.navbar-nav .nav-link:hover { color: var(--terracotta) !important; }

/* ── Hero ───────────────────────────────────────────────────── */
.hero {
  position: relative;
  min-height: 92vh;
  display: flex;
  align-items: center;
  overflow: hidden;
}
.hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  transform: scale(1.04);
  transition: transform 8s ease-out;
}
.hero-bg.loaded { transform: scale(1); }
.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to right, rgba(28,28,30,.7) 0%, rgba(28,28,30,.3) 60%, rgba(28,28,30,.1) 100%);
  z-index: 1;
}
.hero-content {
  position: relative;
  z-index: 2;
  width: 100%;
  padding: 80px 0;
}
.hero-badge {
  display: inline-block;
  background: rgba(255,255,255,.15);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,.25);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  padding: 6px 16px;
  border-radius: 50px;
  margin-bottom: 24px;
}
.hero h1 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 700;
  color: #fff;
  line-height: 1.1;
  margin-bottom: 20px;
}
.hero h1 em {
  font-style: italic;
  color: #f0c9a0;
}
.hero-lead {
  font-size: 1.15rem;
  color: rgba(255,255,255,.85);
  max-width: 480px;
  line-height: 1.6;
}
.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin-top: 28px;
  color: rgba(255,255,255,.8);
  font-size: 0.9rem;
  font-weight: 500;
}
.hero-meta span {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* ── About photos ───────────────────────────────────────────── */
.about-photo-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 260px 160px;
  gap: 12px;
}
.about-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--radius);
  display: block;
}
.about-photo--tall { grid-row: span 2; }

/* ── About ──────────────────────────────────────────────────── */
.amenities-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}
.amenity {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-1);
  background: var(--cream);
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}
.amenity-icon { font-size: 1.1rem; }

.about-photo-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 260px 160px;
  gap: 12px;
}
.photo-placeholder {
  background: var(--sand);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--text-3);
  font-size: 0.8rem;
  border: 2px dashed var(--border);
}
.photo-placeholder--tall {
  grid-row: span 2;
}
.photo-placeholder--sm { }

/* ── Gallery ────────────────────────────────────────────────── */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-auto-rows: 240px;
  gap: 12px;
}
.gallery-item {
  border-radius: var(--radius);
  overflow: hidden;
  position: relative;
  cursor: pointer;
  background: var(--sand);
}
.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}
.gallery-item:hover img { transform: scale(1.05); }
.gallery-item--wide { grid-column: span 2; }
.gallery-zoom {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  opacity: 0;
  transition: opacity 0.25s, background 0.25s;
}
.gallery-item:hover .gallery-zoom {
  opacity: 1;
  background: rgba(0,0,0,.3);
}

/* ── Lightbox ───────────────────────────────────────────────── */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.92);
  z-index: 2000;
  align-items: center;
  justify-content: center;
}
.lightbox.open { display: flex; }
.lightbox img {
  max-width: 90vw;
  max-height: 90vh;
  object-fit: contain;
  border-radius: 4px;
  box-shadow: 0 8px 64px rgba(0,0,0,.5);
}
.lb-close, .lb-prev, .lb-next {
  position: absolute;
  background: rgba(255,255,255,.12);
  border: none;
  color: #fff;
  cursor: pointer;
  border-radius: 50%;
  width: 44px;
  height: 44px;
  font-size: 1.4rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}
.lb-close:hover, .lb-prev:hover, .lb-next:hover { background: rgba(255,255,255,.25); }
.lb-close { top: 20px; right: 20px; font-size: 1.8rem; }
.lb-prev   { left: 20px;  top: 50%; transform: translateY(-50%); }
.lb-next   { right: 20px; top: 50%; transform: translateY(-50%); }

/* ── Availability calendar ──────────────────────────────────── */
.avail-wrap {
  max-width: 380px;
  margin: 0 auto;
}
.avail-calendar-wrap {
  background: var(--warm-white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  padding: 32px 28px;
  border: 1px solid var(--border);
}
.avail-loading {
  text-align: center;
  color: var(--text-3);
  padding: 40px 0;
  font-size: 0.9rem;
}

/* Calendar shell */
.avail-cal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}
.avail-months {
  display: flex;
  gap: 0;
  flex: 1;
  justify-content: space-around;
}
.avail-months span {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--dark);
  text-align: center;
  flex: 1;
}
.avail-nav {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--warm-white);
  color: var(--text-1);
  font-size: 1.4rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
  flex-shrink: 0;
  line-height: 1;
  padding: 0;
}
.avail-nav:hover {
  background: var(--terracotta);
  border-color: var(--terracotta);
  color: #fff;
}

/* Two-month grid layout */
.avail-grids {
  display: block;
}

/* Day-of-week headers */
.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
}
.cal-dow {
  text-align: center;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 4px 0 8px;
}

/* Day cells */
.cal-cell {
  position: relative;
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  overflow: hidden;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-1);
  user-select: none;
}
.cal-cell--empty   { background: transparent; }
.cal-cell--past    { color: var(--text-3); }
.cal-cell--free    { background: #eef7f0; color: #2d6a4f; }
.cal-cell--occupied {
  background: #fde8e6;
  color: #9b2a25;
}
.cal-cell--blocked {
  background: #f0f0f0;
  color: var(--text-3);
}

/* Checkout: top-left red (occupied until morning), bottom-right free */
.cal-cell--checkout {
  background: linear-gradient(
    to bottom right,
    #fde8e6 50%,
    #eef7f0 50%
  );
  color: var(--text-1);
}

/* Checkin: left free, right triangle red */
.cal-cell--checkin {
  background: linear-gradient(
    to bottom right,
    #eef7f0 50%,
    #fde8e6 50%
  );
  color: var(--text-1);
}

/* Back-to-back: top-left red (checkout), white gap, bottom-right red (checkin) */
.cal-cell--both {
  background: linear-gradient(
    to bottom right,
    #fde8e6 calc(50% - 4px),
    #fff    calc(50% - 4px), #fff calc(50% + 4px),
    #fde8e6 calc(50% + 4px)
  );
  color: var(--text-1);
}

.cal-num {
  position: relative;
  z-index: 1;
  line-height: 1;
}

/* Legend */
.avail-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: center;
  margin-top: 20px;
}
.legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  color: var(--text-2);
}
.legend-item::before {
  content: '';
  display: inline-block;
  width: 20px;
  height: 14px;
  border-radius: 4px;
  flex-shrink: 0;
}
.legend-item--free::before {
  background: #eef7f0;
  border: 1px solid #a8d5b0;
}
.legend-item--checkinout::before {
  background: linear-gradient(
    to bottom right,
    #eef7f0 calc(50% - 2px),
    #e8837a calc(50% - 2px), #e8837a calc(50% + 2px),
    #eef7f0 calc(50% + 2px)
  );
  border: 1px solid var(--border);
}
.legend-item--booked::before {
  background: #fde8e6;
  border: 1px solid #f4a099;
}

/* Flatpickr overrides (for inquiry pickers only) */
.flatpickr-day.flatpickr-disabled,
.flatpickr-day.flatpickr-disabled:hover {
  background: #fde8e6 !important;
  color: #c0574f !important;
  border-color: #f4a099 !important;
  text-decoration: line-through;
  opacity: 1 !important;
}
.flatpickr-day.selected,
.flatpickr-day.selected:hover {
  background: var(--terracotta) !important;
  border-color: var(--terracotta) !important;
}
.flatpickr-months .flatpickr-month,
.flatpickr-weekdays,
span.flatpickr-weekday {
  background: var(--warm-white) !important;
  color: var(--text-1) !important;
}
.flatpickr-current-month .cur-month,
.flatpickr-current-month input.cur-year {
  font-family: 'Playfair Display', serif;
  font-weight: 700;
}

/* ── Inquiry form ───────────────────────────────────────────── */
.inquiry-card {
  background: var(--warm-white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  padding: 40px;
  border: 1px solid var(--border);
}
.form-label-custom {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-1);
  margin-bottom: 6px;
}
.form-label-custom .req { color: var(--terracotta); }
.input-custom {
  display: block;
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: 'Inter', sans-serif;
  font-size: 0.9rem;
  color: var(--text-1);
  background: var(--warm-white);
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
  appearance: none;
}
.input-custom:focus {
  border-color: var(--terracotta);
  box-shadow: 0 0 0 3px rgba(196,113,79,.12);
}
.input-custom::placeholder { color: var(--text-3); }
.input-custom.error { border-color: #e53e3e; }

.inq-success {
  margin-top: 16px;
  padding: 14px 18px;
  background: #e6f4ea;
  border: 1px solid #a8d5b0;
  border-radius: var(--radius-sm);
  color: #276749;
  font-size: 0.9rem;
  font-weight: 500;
}
.inq-error {
  margin-top: 16px;
  padding: 14px 18px;
  background: #fce8e6;
  border: 1px solid #f4a099;
  border-radius: var(--radius-sm);
  color: #c0392b;
  font-size: 0.9rem;
}

/* ── Reviews ────────────────────────────────────────────────── */
.reviews-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
}
.review-card {
  background: var(--warm-white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow-sm);
}
.review-stars {
  color: #f59e0b;
  font-size: 1rem;
  margin-bottom: 12px;
  letter-spacing: 2px;
}
.review-text {
  font-size: 0.95rem;
  color: var(--text-1);
  line-height: 1.65;
  margin-bottom: 16px;
  font-style: italic;
}
.review-author {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-2);
}
.review-date {
  font-size: 0.8rem;
  color: var(--text-3);
  margin-top: 2px;
}
.review-loading {
  color: var(--text-3);
  font-size: 0.9rem;
}

/* ── Location ───────────────────────────────────────────────── */
.location-list {
  list-style: none;
  padding: 0;
  margin-top: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.location-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.95rem;
  color: var(--text-2);
}
.location-list li svg { color: var(--terracotta); flex-shrink: 0; }
.location-address {
  margin-top: 16px;
  font-weight: 600;
  color: var(--text-1, inherit);
  line-height: 1.5;
}
.location-map {
  display: block;
  width: 100%;
  height: 380px;
  border: 0;
  border-radius: var(--radius);
  background: var(--sand);
}
.location-link {
  display: inline-block;
  margin-top: 10px;
  font-size: 0.9rem;
  color: var(--terracotta);
  text-decoration: none;
}
.location-link:hover { text-decoration: underline; }
@media (max-width: 767px) { .location-map { height: 300px; } }

/* ── Footer ─────────────────────────────────────────────────── */
.site-footer {
  background: var(--dark);
  color: rgba(255,255,255,.7);
  padding: 56px 0 32px;
}
.footer-inner {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(255,255,255,.1);
}
.footer-brand {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.3rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 8px;
}
.footer-tagline {
  font-size: 0.85rem;
  color: rgba(255,255,255,.5);
}
.footer-links {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.footer-links a {
  color: rgba(255,255,255,.6);
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.2s;
}
.footer-links a:hover { color: #fff; }
.footer-contact p { font-size: 0.85rem; margin-bottom: 6px; }
.footer-contact a {
  display: block;
  margin-bottom: 4px;
  color: var(--terracotta);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.9rem;
}
.footer-bottom {
  text-align: center;
  padding-top: 28px;
  font-size: 0.8rem;
  color: rgba(255,255,255,.35);
}
.footer-bottom a { color: rgba(255,255,255,.5); }

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 991px) {
  .section-pad { padding: 72px 0; }
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
    grid-auto-rows: 200px;
  }
  .gallery-item--wide { grid-column: span 2; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 767px) {
  .section-pad { padding: 56px 0; }
  .hero { min-height: 80vh; }
  .about-photo-grid {
    grid-template-columns: 1fr;
    grid-template-rows: 220px 150px 150px;
  }
  .about-photo--tall { grid-row: span 1; }
  .gallery-grid {
    grid-template-columns: 1fr 1fr;
    grid-auto-rows: 180px;
  }
  .gallery-item--wide { grid-column: span 2; }
  .lb-prev { left: 8px; }
  .lb-next { right: 8px; }
  .avail-calendar-wrap { padding: 20px 12px; }
  .inquiry-card { padding: 24px 20px; }
  .footer-inner { grid-template-columns: 1fr; gap: 28px; }
  .cal-cell { font-size: 0.75rem; }
}

/* ── Bocalio availability: two months, clickable days, selection ── */
.avail-wrap { max-width: 780px; }
.avail-grids {
  display: grid;
  grid-template-columns: repeat(var(--months, 1), minmax(0, 1fr));
  gap: 32px;
}
button.cal-cell {
  border: 0;
  padding: 0;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 500;
  width: 100%;
  cursor: pointer;
}
button.cal-cell:disabled { cursor: default; }
button.cal-cell:not(:disabled):hover { box-shadow: inset 0 0 0 2px var(--dark); }
button.cal-cell:focus-visible { outline: 2px solid var(--terracotta); outline-offset: 1px; }
.cal-cell--past { background: transparent; }
.cal-cell--occupied { text-decoration: line-through; }
.cal-cell--selected,
.cal-cell--selected.cal-cell--checkin,
.cal-cell--selected.cal-cell--checkout {
  background: var(--terracotta);
  color: #fff;
  text-decoration: none;
}
.avail-nav:disabled { opacity: 0.35; cursor: default; }
.avail-nav:disabled:hover { background: var(--warm-white); border-color: var(--border); color: var(--text-1); }
.legend-item--selected::before { background: var(--terracotta); }
.avail-selection {
  margin: 20px 0 0;
  text-align: center;
  font-size: 0.9rem;
  color: var(--text-2);
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  align-items: center;
  justify-content: center;
}
.avail-selection:empty { display: none; }
.btn-book--small { padding: 8px 18px; font-size: 0.85rem; }
.flatpickr-alt-input.error, .input-custom.error + .input-custom { border-color: #e53e3e; }

.footer-address { margin: 8px 0 0; font-size: 0.85rem; color: rgba(255,255,255,.55); }

/* ── Price quote ────────────────────────────────────────────── */
.avail-price { display: inline-flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.price-total { font-weight: 700; font-size: 1.15rem; color: var(--text-1); }
.price-muted { color: var(--text-2); font-size: 0.9rem; }
.price-warn  { color: #A4462B; font-size: 0.9rem; }
.inq-price {
  background: var(--sand);
  border-radius: var(--radius);
  padding: 14px 18px;
  margin-bottom: 14px;
}
.inq-price-row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; flex-direction: row-reverse; }
.inq-price-row .price-total { font-size: 1.35rem; }
.inq-price-note { margin: 6px 0 0; font-size: 0.8rem; color: var(--text-3, var(--text-2)); }

.footer-host { color: rgba(255,255,255,.85); }
.location-contact { margin-top: -6px; color: var(--text-2); line-height: 1.6; }
.location-contact a { color: var(--terracotta); text-decoration: none; }
.location-contact a:hover { text-decoration: underline; }

.btn-wa {
  display: inline-flex; align-items: center; gap: 8px;
  margin: 4px 0 8px; padding: 9px 18px;
  background: #1f9d55; color: #fff; border-radius: 999px;
  font-size: 0.9rem; font-weight: 600; text-decoration: none;
}
.btn-wa:hover { background: #188046; color: #fff; }
