/* ===== RESET & BASE ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --brand:    #FF385C;
  --brand-dk: #E00B41;
  --text:     #222222;
  --muted:    #717171;
  --border:   #DDDDDD;
  --surface:  #F7F7F7;
  --white:    #FFFFFF;
  --radius:   12px;
  --shadow:   0 2px 16px rgba(0,0,0,0.12);
  --shadow-sm:0 1px 6px rgba(0,0,0,0.08);
}

html { scroll-behavior: smooth; }

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

a { color: inherit; text-decoration: none; }
button { cursor: pointer; font-family: inherit; }
img { display: block; max-width: 100%; }

/* ===== HEADER ===== */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--white);
  border-bottom: 1px solid var(--border);
  padding: 0 24px;
}

.header-inner {
  max-width: 1280px;
  margin: 0 auto;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  text-decoration: none;
}

.logo-icon {
  width: 32px;
  height: 32px;
  background: var(--brand);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 16px;
}

.logo-text {
  font-size: 20px;
  font-weight: 700;
  color: var(--brand);
  letter-spacing: -0.5px;
}

/* Search bar */
.search-bar {
  display: flex;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 40px;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: box-shadow 0.2s;
  flex: 1;
  max-width: 580px;
}

.search-bar:hover { box-shadow: var(--shadow); }

.search-segment {
  display: flex;
  flex-direction: column;
  padding: 10px 20px;
  flex: 1;
  border: none;
  background: none;
  cursor: pointer;
  text-align: left;
}

.search-segment + .search-segment {
  border-left: 1px solid var(--border);
}

.search-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
}

.search-value {
  font-size: 13px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.search-btn {
  background: var(--brand);
  border: none;
  color: white;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 4px;
  flex-shrink: 0;
  transition: background 0.2s;
  font-size: 16px;
}

.search-btn:hover { background: var(--brand-dk); }

/* Nav actions */
.nav-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

.nav-btn {
  border: none;
  background: none;
  padding: 10px 16px;
  border-radius: 22px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  transition: background 0.15s;
  white-space: nowrap;
}

.nav-btn:hover { background: var(--surface); }

.user-menu {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--border);
  border-radius: 22px;
  padding: 6px 8px 6px 16px;
  background: var(--white);
  cursor: pointer;
  transition: box-shadow 0.15s;
}

.user-menu:hover { box-shadow: var(--shadow); }

.hamburger { font-size: 14px; color: var(--text); }

.avatar {
  width: 32px;
  height: 32px;
  background: var(--muted);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 16px;
}

/* ===== MAIN LAYOUT ===== */
.main { max-width: 1280px; margin: 0 auto; padding: 0 24px; }

/* ===== FILTERS ===== */
.filters {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 20px 0 12px;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.filters::-webkit-scrollbar { display: none; }

.filter-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--border);
  border-radius: 30px;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  background: var(--white);
  white-space: nowrap;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}

.filter-pill:hover { background: var(--surface); }
.filter-pill.active { background: var(--text); color: var(--white); border-color: var(--text); }

/* ===== LISTINGS GRID ===== */
.section-title {
  font-size: 22px;
  font-weight: 600;
  margin: 8px 0 24px;
  color: var(--text);
}

.listings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px 20px;
  padding-bottom: 48px;
}

/* ===== PROPERTY CARD ===== */
.property-card {
  cursor: pointer;
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.2s;
  text-decoration: none;
  color: inherit;
  display: block;
}

.property-card:hover { transform: translateY(-2px); }

.card-image-wrap {
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--surface);
}

.card-image-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.property-card:hover .card-image-wrap img { transform: scale(1.04); }

.card-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background: var(--white);
  border-radius: 6px;
  padding: 4px 8px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
  box-shadow: var(--shadow-sm);
}

.card-wishlist {
  position: absolute;
  top: 12px;
  right: 12px;
  background: none;
  border: none;
  color: var(--white);
  font-size: 22px;
  line-height: 1;
  text-shadow: 0 1px 4px rgba(0,0,0,0.3);
  transition: transform 0.15s;
  cursor: pointer;
}

.card-wishlist:hover { transform: scale(1.15); color: var(--brand); text-shadow: none; }
.card-wishlist.liked { color: var(--brand); text-shadow: none; }

.card-dots {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 4px;
}

.card-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255,255,255,0.6);
}

.card-dot.active { background: var(--white); }

.card-info { padding: 12px 0 4px; }

.card-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
}

.card-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  line-height: 1.35;
}

.card-rating {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 14px;
  font-weight: 500;
  flex-shrink: 0;
}

.card-rating .star { color: var(--text); font-size: 12px; }

.card-type {
  font-size: 14px;
  color: var(--muted);
  margin-top: 2px;
}

.card-price {
  font-size: 15px;
  color: var(--text);
  margin-top: 6px;
}

.card-price strong { font-weight: 600; }

/* ===== PROPERTY DETAIL PAGE ===== */
.property-header {
  padding: 24px 0 0;
}

.property-title {
  font-size: 26px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 8px;
  line-height: 1.3;
}

.property-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 14px;
  color: var(--text);
}

.property-meta .rating { display: flex; align-items: center; gap: 4px; font-weight: 600; }
.property-meta .dot { color: var(--muted); }
.property-meta .reviews { text-decoration: underline; cursor: pointer; font-weight: 500; }
.property-meta .type-badge {
  background: var(--surface);
  padding: 2px 10px;
  border-radius: 20px;
  font-weight: 500;
  font-size: 13px;
}

/* Photo gallery */
.photo-gallery {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 280px 280px;
  gap: 8px;
  border-radius: var(--radius);
  overflow: hidden;
  margin: 20px 0;
}

.photo-main {
  grid-row: span 2;
  position: relative;
}

.photo-grid-item {
  position: relative;
  overflow: hidden;
  background: var(--surface);
}

.photo-gallery img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  cursor: pointer;
  transition: transform 0.3s;
}

.photo-gallery img:hover { transform: scale(1.03); }

.show-all-btn {
  position: absolute;
  bottom: 16px;
  right: 16px;
  background: var(--white);
  border: 1.5px solid var(--text);
  border-radius: 8px;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: background 0.15s;
}

.show-all-btn:hover { background: var(--surface); }

/* Property detail layout */
.property-detail-layout {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 80px;
  padding-bottom: 60px;
}

.property-detail-left {}

.host-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 28px 0;
  border-bottom: 1px solid var(--border);
}

.host-info h2 { font-size: 20px; font-weight: 600; }
.host-info p { font-size: 15px; color: var(--muted); margin-top: 4px; }

.host-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--muted);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 24px;
  flex-shrink: 0;
}

.highlights {
  padding: 28px 0;
  border-bottom: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.highlight-item {
  display: flex;
  align-items: flex-start;
  gap: 16px;
}

.highlight-icon { font-size: 24px; flex-shrink: 0; margin-top: 2px; }

.highlight-text h4 { font-size: 15px; font-weight: 600; }
.highlight-text p { font-size: 14px; color: var(--muted); margin-top: 2px; }

.description {
  padding: 28px 0;
  border-bottom: 1px solid var(--border);
}

.description p {
  font-size: 15px;
  line-height: 1.7;
  color: var(--text);
}

.amenities-section {
  padding: 28px 0;
  border-bottom: 1px solid var(--border);
}

.amenities-section h3 { font-size: 20px; font-weight: 600; margin-bottom: 20px; }

.amenities-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.amenity-item {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 15px;
}

.amenity-icon { font-size: 20px; }

/* ===== BOOKING WIDGET ===== */
.booking-widget-wrap { position: sticky; top: 100px; }

.booking-widget {
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px;
  box-shadow: var(--shadow);
}

.widget-price {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 20px;
}

.widget-price span { font-size: 16px; font-weight: 400; color: var(--muted); }

.date-inputs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 12px;
}

.date-input-field {
  padding: 12px 14px;
  cursor: pointer;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
}

.date-input-field + .date-input-field { border-left: 1px solid var(--border); }

.date-input-field:hover { background: var(--surface); }

.date-label { font-size: 11px; font-weight: 700; letter-spacing: 0.05em; display: block; }

.date-val {
  font-size: 14px;
  color: var(--muted);
  display: block;
  margin-top: 2px;
}

.guests-input {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
  margin-bottom: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
}

.guests-input:hover { background: var(--surface); }

.guests-label-wrap {}
.guests-label { font-size: 11px; font-weight: 700; letter-spacing: 0.05em; display: block; }
.guests-val { font-size: 14px; color: var(--muted); display: block; margin-top: 2px; }

.guests-controls { display: flex; align-items: center; gap: 12px; }

.guest-btn {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1.5px solid var(--border);
  background: none;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  color: var(--muted);
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s;
}

.guest-btn:hover:not(:disabled) { border-color: var(--text); color: var(--text); }
.guest-btn:disabled { opacity: 0.3; cursor: not-allowed; }
.guest-count { font-size: 15px; font-weight: 500; min-width: 20px; text-align: center; }

.reserve-btn {
  width: 100%;
  background: linear-gradient(135deg, #E61E4D 0%, #E31C5F 30%, #C4113E 100%);
  color: white;
  border: none;
  border-radius: 10px;
  padding: 16px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.15s, transform 0.1s;
}

.reserve-btn:hover { opacity: 0.92; transform: scale(0.995); }
.reserve-btn:active { transform: scale(0.99); }

.no-charge-note {
  text-align: center;
  font-size: 13px;
  color: var(--muted);
  margin-top: 12px;
}

.price-breakdown {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

.price-row {
  display: flex;
  justify-content: space-between;
  font-size: 15px;
  color: var(--text);
  margin-bottom: 12px;
}

.price-row .underline { text-decoration: underline; cursor: pointer; }

.price-total {
  display: flex;
  justify-content: space-between;
  font-size: 16px;
  font-weight: 700;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  margin-top: 4px;
}

/* ===== LIGHTBOX ===== */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.92);
  z-index: 1000;
  align-items: center;
  justify-content: center;
}

.lightbox.open { display: flex; }

.lightbox-inner {
  position: relative;
  max-width: 90vw;
  max-height: 90vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox img {
  max-width: 90vw;
  max-height: 85vh;
  border-radius: 8px;
  object-fit: contain;
}

.lb-close {
  position: fixed;
  top: 20px;
  right: 24px;
  background: none;
  border: none;
  color: white;
  font-size: 36px;
  cursor: pointer;
  line-height: 1;
  z-index: 1001;
}

.lb-prev, .lb-next {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,0.15);
  border: none;
  color: white;
  font-size: 28px;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
  z-index: 1001;
}

.lb-prev { left: 20px; }
.lb-next { right: 20px; }
.lb-prev:hover, .lb-next:hover { background: rgba(255,255,255,0.25); }

.lb-counter {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  color: white;
  font-size: 14px;
  font-weight: 500;
}

/* ===== BACK BUTTON ===== */
.back-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  border: none;
  background: none;
  cursor: pointer;
  padding: 8px 0;
  text-decoration: none;
  margin-top: 20px;
}

.back-btn:hover { text-decoration: underline; }

/* ===== BOOKING PAGE ===== */
.booking-page {
  max-width: 760px;
  margin: 0 auto;
  padding: 40px 24px 80px;
}

.booking-page h1 { font-size: 26px; font-weight: 700; margin-bottom: 32px; }

.booking-section {
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 28px;
  margin-bottom: 24px;
}

.booking-section h2 { font-size: 18px; font-weight: 600; margin-bottom: 20px; }

.form-group { margin-bottom: 16px; }

.form-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 6px;
}

.form-input, .form-select {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 15px;
  font-family: inherit;
  color: var(--text);
  background: var(--white);
  transition: border-color 0.15s;
  outline: none;
}

.form-input:focus, .form-select:focus { border-color: var(--text); }

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.booking-summary {
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px;
  display: flex;
  gap: 20px;
  margin-bottom: 24px;
}

.summary-img {
  width: 120px;
  height: 100px;
  border-radius: 10px;
  object-fit: cover;
  flex-shrink: 0;
}

.summary-info h3 { font-size: 15px; font-weight: 600; line-height: 1.3; }
.summary-info p { font-size: 13px; color: var(--muted); margin-top: 4px; }
.summary-info .summary-rating { font-size: 13px; margin-top: 8px; display: flex; align-items: center; gap: 4px; font-weight: 500; }

.confirm-btn {
  width: 100%;
  background: linear-gradient(135deg, #E61E4D 0%, #E31C5F 30%, #C4113E 100%);
  color: white;
  border: none;
  border-radius: 10px;
  padding: 18px;
  font-size: 18px;
  font-weight: 700;
  cursor: pointer;
  transition: opacity 0.15s;
}

.confirm-btn:hover { opacity: 0.92; }

/* ===== SUCCESS / CONFIRMATION ===== */
.confirmation {
  text-align: center;
  max-width: 520px;
  margin: 80px auto;
  padding: 48px 32px;
  border: 1px solid var(--border);
  border-radius: 20px;
  box-shadow: var(--shadow);
}

.confirmation .check {
  width: 72px;
  height: 72px;
  background: #E8F5E9;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 36px;
  margin: 0 auto 24px;
}

.confirmation h1 { font-size: 24px; font-weight: 700; margin-bottom: 12px; }
.confirmation p { font-size: 15px; color: var(--muted); line-height: 1.6; }

.conf-ref {
  background: var(--surface);
  border-radius: 10px;
  padding: 16px 24px;
  margin: 24px 0;
  font-size: 15px;
}

.conf-ref strong { font-size: 22px; font-weight: 700; color: var(--brand); display: block; margin-top: 6px; }

.home-link {
  display: inline-block;
  margin-top: 8px;
  padding: 14px 32px;
  background: var(--text);
  color: var(--white);
  border-radius: 10px;
  font-weight: 600;
  font-size: 15px;
  text-decoration: none;
  transition: opacity 0.15s;
}

.home-link:hover { opacity: 0.85; }

/* ===== EMPTY STATE ===== */
.empty { text-align: center; padding: 80px 24px; color: var(--muted); }
.empty h3 { font-size: 20px; font-weight: 600; color: var(--text); margin-bottom: 8px; }
.empty p { font-size: 15px; }

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
  .property-detail-layout {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .booking-widget-wrap { position: static; margin-top: 40px; }

  .photo-gallery {
    grid-template-rows: 220px 220px;
  }
}

@media (max-width: 768px) {
  .header-inner { gap: 12px; }

  .search-bar {
    display: none;
  }

  .search-bar.mobile-open {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 80px;
    left: 0;
    right: 0;
    border-radius: 0;
    border: none;
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow);
    background: var(--white);
    z-index: 99;
  }

  .nav-btn { display: none; }

  .listings-grid { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }

  .photo-gallery {
    grid-template-columns: 1fr;
    grid-template-rows: 260px;
  }

  .photo-gallery .photo-grid-item { display: none; }
  .photo-gallery .photo-main { grid-row: span 1; }

  .property-title { font-size: 22px; }

  .amenities-grid { grid-template-columns: 1fr; }

  .form-row { grid-template-columns: 1fr; }
  .booking-summary { flex-direction: column; }
  .summary-img { width: 100%; height: 180px; }
}

@media (max-width: 480px) {
  .main { padding: 0 16px; }
  .header { padding: 0 16px; }
  .listings-grid { grid-template-columns: 1fr; }
  .property-detail-layout { gap: 0; }
  .booking-widget { padding: 20px; }
}

/* ===== UTILITIES ===== */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }

/* Flatpickr overrides */
.flatpickr-calendar { border-radius: 12px !important; box-shadow: var(--shadow) !important; border: 1px solid var(--border) !important; }
.flatpickr-day.selected { background: var(--text) !important; border-color: var(--text) !important; }
.flatpickr-day.inRange { background: var(--surface) !important; border-color: var(--surface) !important; }
.flatpickr-day:hover { background: var(--surface) !important; }
