/* === Reset & Base === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif; background: #fff; color: #222; line-height: 1.6; }
h1, h2, h3, h4 { font-family: 'Nunito', -apple-system, sans-serif; }
img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }
button, input, select, textarea { font-family: inherit; }

/* === Tokens === */
:root {
  --primary: hsl(215, 100%, 50%);
  --primary-hover: hsl(215, 100%, 45%);
  --bg: #fff;
  --fg: #222;
  --muted: #717171;
  --border: #e0e0e0;
  --card: #fff;
  --secondary-bg: #f5f5f5;
  --radius: 0.75rem;
  --gradient: linear-gradient(to right, hsl(215, 100%, 50%), hsl(225, 100%, 45%));
}

/* === Utilities === */
.container { max-width: 1120px; margin: 0 auto; padding: 0 1rem; }
.text-muted { color: var(--muted); }
.text-sm { font-size: 0.875rem; }
.text-xs { font-size: 0.75rem; }
.text-lg { font-size: 1.125rem; }
.text-xl { font-size: 1.25rem; }
.fw-600 { font-weight: 600; }
.fw-700 { font-weight: 700; }
.underline { text-decoration: underline; }
.dot { color: var(--muted); }

/* === Header === */
.header { border-bottom: 1px solid var(--border); background: var(--card); position: sticky; top: 0; z-index: 40; }
.header-inner { display: flex; align-items: center; justify-content: space-between; padding: 0.5rem 1rem; }
.logo-area { display: flex; align-items: center; gap: 0.75rem; }
.logo-svg { height: 3.5rem; width: auto; }
.logo-text { font-weight: 700; font-size: 1.125rem; color: #0891b2; }

/* === Title === */
.title-section { margin-bottom: 1.5rem; padding-top: 1rem; }
.title-section h1 { font-size: 1.625rem; font-weight: 800; }
.title-meta { margin-top: 0.25rem; }
.rating-inline { display: flex; align-items: center; gap: 0.25rem; font-size: 0.875rem; flex-wrap: wrap; }
.star-icon { color: var(--fg); }

/* === Gallery === */
.gallery { display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem; border-radius: 1rem; overflow: hidden; height: 480px; }
.gallery-main { cursor: pointer; overflow: hidden; }
.gallery-main img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s; }
.gallery-main:hover img { transform: scale(1.05); }
.gallery-grid { display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; gap: 0.5rem; }
.gallery-thumb { cursor: pointer; overflow: hidden; position: relative; }
.gallery-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s; }
.gallery-thumb:hover img { transform: scale(1.05); }
.gallery-more .gallery-overlay { position: absolute; inset: 0; background: rgba(34,34,34,0.4); display: flex; align-items: center; justify-content: center; }
.gallery-overlay span { color: #fff; font-weight: 600; font-size: 1.125rem; }

@media (max-width: 768px) {
  .gallery { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; height: 280px; gap: 0; border-radius: 0; }
  .gallery-main { flex: 0 0 85%; scroll-snap-align: start; }
  .gallery-grid { display: flex; gap: 0; }
  .gallery-grid .gallery-thumb { flex: 0 0 85vw; height: 280px; scroll-snap-align: start; }
  .gallery-overlay { display: none; }
  .gallery::-webkit-scrollbar { display: none; }
}

/* === Content Grid === */
.content-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 75px; margin-top: 3rem; }
.left-col { display: flex; flex-direction: column; gap: 2rem; }
.section-border { border-bottom: 1px solid var(--border); padding-bottom: 2rem; }
.section-border h2 { font-size: 1.375rem; font-weight: 700; margin-bottom: 1rem; }
.section-border p { margin-bottom: 1rem; }

@media (max-width: 1024px) {
  .content-grid { grid-template-columns: 1fr; gap: 2rem; }
}

/* === Favorite Badge === */
.favorite-badge { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 1rem; }
.favorite-left { display: flex; align-items: center; gap: 0.5rem; }
.emoji-big { font-size: 1.75rem; }
.favorite-right { display: flex; align-items: center; gap: 0; }
.favorite-stat { text-align: center; padding: 0 1.5rem; }
.favorite-stat.border-left { border-left: 1px solid var(--border); }
.stars-small { color: var(--fg); font-size: 0.75rem; letter-spacing: 1px; }

/* === Amenities === */
.amenities-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; }
.amenity { display: flex; align-items: center; gap: 0.75rem; padding: 0.5rem 0; font-size: 0.9375rem; }

/* === Big Score === */
.big-score { display: flex; flex-direction: column; align-items: center; margin-bottom: 2rem; }
.score-row { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 0.5rem; }
.score-number { font-size: 5rem; font-weight: 800; letter-spacing: -2px; }

/* === Rating Categories === */
.rating-categories { display: grid; grid-template-columns: repeat(7, 1fr); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; text-align: left; }
.rating-cat { padding: 1rem; border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); min-height: 100px; display: flex; flex-direction: column; justify-content: space-between; }
.rating-cat:last-child { border-right: none; }
.rating-bars { width: 100%; }
.bar-row { display: flex; align-items: center; gap: 0.375rem; margin-bottom: 0.125rem; }
.bar-row span { font-size: 0.625rem; color: var(--muted); width: 0.75rem; text-align: right; }
.bar-bg { flex: 1; height: 4px; background: var(--border); border-radius: 2px; overflow: hidden; }
.bar-fill { height: 100%; background: var(--fg); border-radius: 2px; }

@media (max-width: 768px) {
  .rating-categories { grid-template-columns: repeat(2, 1fr); }
}

/* === Reviews === */
.reviews-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
.review-header { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 0.75rem; }
.avatar { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; }

@media (max-width: 768px) { .reviews-grid { grid-template-columns: 1fr; } }

/* === Host === */
.host-section { display: flex; gap: 1.5rem; border-top: 1px solid var(--border); padding-top: 2rem; }
.host-avatar { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.host-info h2 { font-size: 1.375rem; font-weight: 700; margin-bottom: 0.25rem; }
.host-meta { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-bottom: 1rem; }

/* === Booking Card === */
.right-col { position: relative; }
.booking-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: 0 6px 16px rgba(0,0,0,0.12); padding: 1.5rem; position: sticky; top: 5rem; }
.price-row { margin-bottom: 0.25rem; }
.price { font-size: 1.375rem; font-weight: 700; }

.booking-inputs { border: 1px solid var(--fg); border-radius: 0.5rem; overflow: hidden; margin-bottom: 1rem; }
.date-row { display: grid; grid-template-columns: 1fr 1fr; }
.date-field { padding: 0.75rem; }
.date-field:first-child { border-right: 1px solid var(--fg); }
.date-field label, .guests-field label { font-size: 0.625rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.05em; display: block; margin-bottom: 0.25rem; }
.date-field input { border: none; background: transparent; font-size: 0.875rem; width: 100%; outline: none; color: var(--fg); }
.guests-field { border-top: 1px solid var(--fg); padding: 0.75rem; }
.guests-field select { border: none; background: transparent; font-size: 0.875rem; width: 100%; outline: none; color: var(--fg); cursor: pointer; }

.btn-primary { width: 100%; background: var(--gradient); color: #fff; border: none; padding: 0.875rem; border-radius: 0.5rem; font-weight: 700; font-size: 1rem; cursor: pointer; transition: opacity 0.2s; }
.btn-primary:hover { opacity: 0.9; }
.btn-primary:disabled { background: #ddd; color: #999; cursor: not-allowed; }
.btn-sm { width: auto; padding: 0.75rem 1.5rem; font-size: 0.875rem; }

.btn-outline { width: 100%; border: 1px solid var(--border); background: transparent; color: var(--fg); padding: 0.625rem; border-radius: 0.5rem; font-size: 0.875rem; cursor: pointer; transition: background 0.2s; margin-bottom: 1rem; }
.btn-outline:hover { background: var(--secondary-bg); }

.price-summary { margin-top: 1rem; }
.price-line { display: flex; justify-content: space-between; font-size: 0.875rem; padding: 0.375rem 0; }
.price-line.total { border-top: 1px solid var(--border); padding-top: 0.75rem; margin-top: 0.5rem; font-weight: 700; font-size: 1rem; }

/* === Map === */
.map-section { border-top: 1px solid var(--border); padding: 3rem 0; }
.map-section h2 { font-size: 1.375rem; font-weight: 700; margin-bottom: 1rem; }
.map-wrapper { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); }

/* === Footer === */
.footer { border-top: 1px solid var(--border); margin-top: 3rem; background: var(--secondary-bg); padding: 2rem 1rem; }

/* === Mobile CTA === */
.mobile-cta { display: none; position: fixed; bottom: 0; left: 0; right: 0; background: var(--card); border-top: 1px solid var(--border); padding: 1rem; z-index: 40; justify-content: space-between; align-items: center; }
@media (max-width: 1024px) { .mobile-cta { display: flex; } .footer { padding-bottom: 6rem; } }

/* === WhatsApp === */
.whatsapp-btn { position: fixed; bottom: 5rem; right: 1.5rem; z-index: 50; background: hsl(142, 70%, 45%); color: #fff; border-radius: 50%; width: 56px; height: 56px; display: flex; align-items: center; justify-content: center; font-size: 1.5rem; box-shadow: 0 4px 12px rgba(0,0,0,0.15); transition: transform 0.2s; }
.whatsapp-btn:hover { transform: scale(1.1); }
@media (min-width: 1025px) { .whatsapp-btn { bottom: 1.5rem; } }

/* === Lightbox === */
.lightbox { position: fixed; inset: 0; z-index: 50; background: rgba(34,34,34,0.9); backdrop-filter: blur(8px); display: flex; flex-direction: column; align-items: center; overflow-y: auto; padding: 2rem; }
.lightbox-close { align-self: flex-end; color: #fff; background: rgba(255,255,255,0.15); border: none; border-radius: 2rem; padding: 0.5rem 1rem; font-size: 0.875rem; cursor: pointer; margin-bottom: 1rem; font-weight: 500; }
.lightbox-content { max-width: 56rem; width: 100%; }
.lightbox-content img { width: 100%; border-radius: var(--radius); margin-bottom: 1rem; }

/* === Modal === */
.modal-overlay { position: fixed; inset: 0; z-index: 50; background: rgba(34,34,34,0.6); backdrop-filter: blur(4px); display: flex; align-items: center; justify-content: center; padding: 1rem; }
.modal { background: var(--card); border-radius: var(--radius); box-shadow: 0 25px 50px rgba(0,0,0,0.25); max-width: 28rem; width: 100%; padding: 1.5rem; position: relative; max-height: 90vh; overflow-y: auto; }
.modal-close { position: absolute; top: 1rem; right: 1rem; background: none; border: none; color: var(--muted); font-size: 1.25rem; cursor: pointer; }
.modal h3 { font-size: 1.25rem; font-weight: 700; margin-bottom: 1rem; }

.checkout-summary { background: var(--secondary-bg); border-radius: 0.5rem; padding: 1rem; margin-bottom: 1.25rem; }

.form-group { margin-bottom: 0.75rem; }
.form-group label { font-size: 0.625rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.05em; display: block; margin-bottom: 0.25rem; }
.form-group input { width: 100%; border: 1px solid var(--border); border-radius: 0.5rem; padding: 0.625rem 0.75rem; font-size: 0.875rem; outline: none; }
.form-group input:focus { border-color: var(--primary); box-shadow: 0 0 0 2px hsla(215, 100%, 50%, 0.2); }

.terms-check { display: flex; align-items: flex-start; gap: 0.75rem; margin-top: 1.25rem; cursor: pointer; }
.terms-check input { margin-top: 0.25rem; width: 1rem; height: 1rem; }

.payment-options { display: flex; flex-direction: column; gap: 0.75rem; margin-bottom: 1rem; }
.payment-opt { display: flex; align-items: center; gap: 1rem; padding: 1rem; border: 2px solid var(--border); border-radius: 0.5rem; background: transparent; cursor: pointer; text-align: left; width: 100%; transition: border-color 0.2s; }
.payment-opt.active { border-color: var(--primary); background: hsla(215, 100%, 50%, 0.05); }
.payment-opt.disabled { opacity: 0.6; cursor: not-allowed; }
.radio-dot { width: 1.25rem; height: 1.25rem; border-radius: 50%; border: 2px solid var(--border); display: flex; align-items: center; justify-content: center; margin-left: auto; }
.radio-dot.active { border-color: var(--primary); }
.radio-dot.active::after { content: ''; width: 0.625rem; height: 0.625rem; border-radius: 50%; background: var(--primary); }

.info-box { background: var(--secondary-bg); border-radius: 0.5rem; padding: 0.75rem; }
.error-msg { color: hsl(0, 84%, 60%); font-size: 0.875rem; margin-top: 0.75rem; }

.qr-container { background: var(--secondary-bg); border-radius: var(--radius); padding: 1.5rem; margin-bottom: 1rem; display: flex; align-items: center; justify-content: center; }
.qr-container canvas { border-radius: 0.5rem; }
