:root {
  --bb-primary: #0d3b4c;
  --bb-primary-hover: #145369;
  --bb-accent: #c84b1f;
  --bb-accent-hover: #a83b14;
  --bb-amber: #e07a22;
  --bb-emerald: #0f766e;
  --bb-whatsapp: #15803d;
  --bb-bg: #f7f9f9;
  --bb-card: #ffffff;
  --bb-border: #d9e2ec;
  --bb-text: #102a43;
  --bb-muted: #486581;
  --bb-radius: 14px;
  --bb-shadow: 0 4px 20px rgba(13, 59, 76, 0.07);
}

.bb-wrap {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Inter, sans-serif;
  color: var(--bb-text);
  max-width: 1280px;
  margin: 0 auto;
  padding: 16px;
}

.bb-wrap * {
  box-sizing: border-box;
}

/* Hero & Search Bar stile Booking */
.bb-hero {
  background: linear-gradient(135deg, #0d3b4c 0%, #115e67 60%, #1d6f72 100%);
  color: #ffffff;
  border-radius: 18px;
  padding: 28px 24px 34px;
  margin-bottom: 24px;
  position: relative;
}

.bb-hero-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 18px;
}

.bb-hero h1 {
  margin: 0 0 6px;
  font-size: 1.75rem;
  font-weight: 800;
  line-height: 1.2;
  color: #ffffff;
}

.bb-hero p {
  margin: 0;
  color: #dbeafe;
  font-size: 1rem;
}

.bb-hero-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.bb-btn-outline-light {
  background: rgba(255,255,255,0.12);
  color: #ffffff;
  border: 1px solid rgba(255,255,255,0.35);
  padding: 9px 15px;
  border-radius: 10px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  transition: 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.bb-btn-outline-light:hover {
  background: #ffffff;
  color: var(--bb-primary);
}

.bb-searchbar {
  background: #e9a84c;
  padding: 5px;
  border-radius: 12px;
  display: grid;
  grid-template-columns: minmax(170px, 1.7fr) minmax(210px, 1.45fr) minmax(105px, 0.72fr) minmax(105px, 0.72fr) auto auto;
  gap: 5px;
  margin-top: 20px;
  align-items: stretch;
  box-shadow: 0 10px 25px rgba(0,0,0,0.18);
}

.bb-search-cell {
  background: #ffffff;
  border-radius: 9px;
  padding: 8px 11px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
}

.bb-search-cell label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--bb-muted);
  margin-bottom: 2px;
}

.bb-search-cell input,
.bb-search-cell select {
  border: none;
  outline: none;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--bb-text);
  background: transparent;
  width: 100%;
  min-width: 0;
  padding: 2px 0;
}

.bb-btn-gps {
  background: #ffffff;
  color: var(--bb-accent);
  border: none;
  border-radius: 9px;
  padding: 0 14px;
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  transition: 0.2s;
}

.bb-btn-gps:hover, .bb-btn-gps.active {
  background: #eff6ff;
  color: #1d4ed8;
}

.bb-btn-search {
  background: var(--bb-accent);
  color: #ffffff;
  border: none;
  border-radius: 9px;
  padding: 0 24px;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  transition: 0.2s;
}

.bb-btn-search:hover {
  background: var(--bb-accent-hover);
}

/* GPS Radius Banner */
.bb-gps-banner {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 12px;
  padding: 12px 16px;
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.bb-radius-pills {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.bb-radius-pill {
  padding: 5px 12px;
  border-radius: 999px;
  border: 1px solid #93c5fd;
  background: #ffffff;
  color: #1e40af;
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  text-decoration: none;
}

.bb-radius-pill.active {
  background: var(--bb-accent);
  color: #ffffff;
  border-color: var(--bb-accent);
}

/* Two-column Booking layout */
.bb-layout {
  display: grid;
  grid-template-columns: 290px 1fr;
  gap: 24px;
  align-items: start;
}

.bb-sidebar {
  background: var(--bb-card);
  border: 1px solid var(--bb-border);
  border-radius: var(--bb-radius);
  padding: 16px;
  box-shadow: var(--bb-shadow);
}

.bb-map-preview {
  height: 150px;
  border-radius: 10px;
  overflow: hidden;
  position: relative;
  margin-bottom: 16px;
  border: 1px solid var(--bb-border);
}

.bb-map-preview-btn {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 500;
  background: var(--bb-accent);
  color: #ffffff;
  border: none;
  padding: 7px 14px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
  white-space: nowrap;
}

.bb-filter-group {
  border-top: 1px solid var(--bb-border);
  padding-top: 14px;
  margin-top: 14px;
}

.bb-filter-group h4 {
  margin: 0 0 10px;
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--bb-text);
}

.bb-check {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 7px;
  font-size: 0.88rem;
  color: var(--bb-muted);
  cursor: pointer;
}

.bb-check input {
  width: 16px;
  height: 16px;
  accent-color: var(--bb-accent);
}

/* Results header & Horizontal Booking Cards */
.bb-results-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 16px;
}

.bb-results-count {
  font-size: 1.2rem;
  font-weight: 800;
  margin: 0;
}

.bb-sort-select {
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid var(--bb-border);
  background: #ffffff;
  font-weight: 600;
  font-size: 0.88rem;
  color: var(--bb-text);
}

.bb-card {
  background: var(--bb-card);
  border: 1px solid var(--bb-border);
  border-radius: var(--bb-radius);
  padding: 16px;
  margin-bottom: 16px;
  display: grid;
  grid-template-columns: 245px 1fr 205px;
  gap: 18px;
  box-shadow: var(--bb-shadow);
  transition: transform 0.15s, box-shadow 0.15s;
}

.bb-card:hover {
  box-shadow: 0 10px 28px rgba(15, 41, 66, 0.1);
  border-color: #cbd5e1;
}

.bb-card.featured {
  border: 2px solid #f59e0b;
  background: #fffbeb33;
}

.bb-card-media {
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  height: 195px;
  background: #e2e8f0;
}

.bb-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.bb-badge-featured {
  position: absolute;
  top: 10px;
  left: 10px;
  background: #f59e0b;
  color: #ffffff;
  font-size: 0.75rem;
  font-weight: 800;
  padding: 4px 9px;
  border-radius: 6px;
}

.bb-badge-offer {
  position: absolute;
  bottom: 10px;
  left: 10px;
  background: #dc2626;
  color: #ffffff;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 9px;
  border-radius: 6px;
}

.bb-fav-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(255,255,255,0.92);
  border: none;
  cursor: pointer;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

.bb-fav-btn.active {
  color: #e11d48;
}

/* Review Score Overlay on Photo Thumbnail */
.bb-photo-score {
  position: absolute;
  bottom: 10px;
  right: 10px;
  background: rgba(15, 41, 66, 0.92);
  color: #ffffff;
  padding: 4px 8px;
  border-radius: 7px;
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.78rem;
  font-weight: 700;
}

.bb-photo-score span.num {
  background: var(--bb-accent);
  padding: 2px 5px;
  border-radius: 4px;
  font-weight: 800;
}

.bb-card-body h3 {
  margin: 0 0 4px;
  font-size: 1.22rem;
  font-weight: 800;
}

.bb-card-body h3 a {
  color: var(--bb-accent);
  text-decoration: none;
}

.bb-card-body h3 a:hover {
  text-decoration: underline;
}

.bb-stars {
  color: #f59e0b;
  font-size: 0.95rem;
  margin-left: 6px;
}

.bb-type-pill {
  display: inline-block;
  background: #e2e8f0;
  color: #334155;
  font-size: 0.74rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 5px;
  margin-right: 6px;
}

.bb-loc-line {
  font-size: 0.86rem;
  color: var(--bb-accent);
  font-weight: 600;
  margin: 6px 0 8px;
}

.bb-dist-badge {
  background: #dcfce7;
  color: #166534;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  margin-left: 6px;
}

.bb-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 8px 0;
}

.bb-tag {
  background: #f1f5f9;
  color: #334155;
  font-size: 0.78rem;
  padding: 3px 8px;
  border-radius: 6px;
}

.bb-direct-trust {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--bb-emerald);
  margin-top: 8px;
}

.bb-card-aside {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: flex-end;
  text-align: right;
  border-left: 1px solid var(--bb-border);
  padding-left: 14px;
}

.bb-rating-box {
  display: flex;
  align-items: center;
  gap: 8px;
}

.bb-rating-text {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--bb-text);
}

.bb-rating-sub {
  font-size: 0.75rem;
  color: var(--bb-muted);
  display: block;
  font-weight: 400;
}

.bb-rating-badge {
  background: var(--bb-primary);
  color: #ffffff;
  font-weight: 800;
  font-size: 0.98rem;
  padding: 6px 9px;
  border-radius: 8px 8px 8px 2px;
}

.bb-price-box {
  margin-top: auto;
}

.bb-price-label {
  font-size: 0.76rem;
  color: var(--bb-muted);
}

.bb-price-val {
  font-size: 1.45rem;
  font-weight: 800;
  color: var(--bb-text);
  line-height: 1.1;
}

.bb-btn-cta {
  display: inline-block;
  margin-top: 10px;
  background: var(--bb-accent);
  color: #ffffff !important;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.88rem;
  padding: 9px 14px;
  border-radius: 8px;
  text-align: center;
  width: 100%;
  border: none;
  cursor: pointer;
}

.bb-btn-cta:hover {
  background: var(--bb-accent-hover);
}

/* Full Interactive Map Modal */
.bb-map-modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.72);
  z-index: 9999;
  padding: 20px;
}

.bb-map-modal.open {
  display: flex;
  align-items: center;
  justify-content: center;
}

.bb-map-modal-inner {
  background: #ffffff;
  width: 100%;
  max-width: 1200px;
  height: 85vh;
  border-radius: 16px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.bb-map-modal-head {
  padding: 12px 18px;
  background: var(--bb-primary);
  color: #ffffff;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

#bb-full-map {
  flex: 1;
  width: 100%;
}

/* Forms & Detail Pages */
.bb-panel {
  background: #ffffff;
  border: 1px solid var(--bb-border);
  border-radius: var(--bb-radius);
  padding: 22px;
  box-shadow: var(--bb-shadow);
  margin-bottom: 20px;
}

.bb-form-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.bb-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.bb-field.full {
  grid-column: 1 / -1;
}

.bb-field label {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--bb-text);
}

.bb-field input,
.bb-field select,
.bb-field textarea {
  border: 1px solid #cbd5e1;
  border-radius: 9px;
  padding: 10px 12px;
  font-size: 0.95rem;
  font-family: inherit;
  width: 100%;
}

.bb-field input:focus,
.bb-field select:focus,
.bb-field textarea:focus {
  outline: none;
  border-color: var(--bb-accent);
  box-shadow: 0 0 0 3px rgba(0, 108, 228, 0.14);
}

.bb-alert {
  padding: 13px 16px;
  border-radius: 10px;
  margin-bottom: 16px;
  font-weight: 600;
  font-size: 0.92rem;
}

.bb-alert.success {
  background: #dcfce7;
  color: #166534;
  border: 1px solid #86efac;
}

.bb-alert.error {
  background: #fee2e2;
  color: #991b1b;
  border: 1px solid #fca5a5;
}

.bb-alert.info {
  background: #eff6ff;
  color: #1e40af;
  border: 1px solid #bfdbfe;
}

/* Detail View */
.bb-detail-grid {
  display: grid;
  grid-template-columns: 1fr 370px;
  gap: 24px;
  align-items: start;
}

.bb-sticky-box {
  position: sticky;
  top: 20px;
}

.bb-gallery-main {
  width: 100%;
  height: 410px;
  object-fit: cover;
  border-radius: 14px;
  margin-bottom: 10px;
}

.bb-gallery-thumbs {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
  gap: 8px;
}

.bb-gallery-thumbs img {
  width: 100%;
  height: 68px;
  object-fit: cover;
  border-radius: 8px;
  cursor: pointer;
  border: 2px solid transparent;
}

.bb-gallery-thumbs img:hover {
  border-color: var(--bb-accent);
}

.bb-btn-wa {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--bb-whatsapp);
  color: #ffffff !important;
  text-decoration: none;
  font-weight: 700;
  padding: 11px 16px;
  border-radius: 9px;
  margin-top: 10px;
}

/* Subito-style Messaging Thread */
.bb-chat-layout {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 18px;
  min-height: 480px;
}

.bb-thread-list {
  border: 1px solid var(--bb-border);
  border-radius: 12px;
  overflow: hidden;
  background: #ffffff;
}

.bb-thread-item {
  display: block;
  padding: 13px 15px;
  border-bottom: 1px solid var(--bb-border);
  text-decoration: none;
  color: var(--bb-text);
}

.bb-thread-item:hover, .bb-thread-item.active {
  background: #eff6ff;
}

.bb-chat-box {
  border: 1px solid var(--bb-border);
  border-radius: 12px;
  background: #ffffff;
  display: flex;
  flex-direction: column;
  padding: 16px;
}

.bb-msg-bubble {
  max-width: 78%;
  padding: 11px 14px;
  border-radius: 12px;
  margin-bottom: 10px;
  font-size: 0.93rem;
  line-height: 1.45;
}

.bb-msg-bubble.guest {
  background: #f1f5f9;
  align-self: flex-start;
}

.bb-msg-bubble.owner {
  background: #dbeafe;
  align-self: flex-end;
}

/* Booking-style Review Bars */
.bb-score-bars {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px 24px;
  margin: 16px 0;
}

.bb-bar-track {
  height: 8px;
  background: #e2e8f0;
  border-radius: 999px;
  overflow: hidden;
  margin-top: 4px;
}

.bb-bar-fill {
  height: 100%;
  background: var(--bb-primary);
}

@media (max-width: 1180px) {
  .bb-searchbar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .bb-searchbar .bb-btn-gps,
  .bb-searchbar .bb-btn-search {
    min-height: 44px;
  }
}

@media (max-width: 640px) {
  .bb-searchbar {
    grid-template-columns: 1fr;
  }
  .bb-layout,
  .bb-detail-grid,
  .bb-chat-layout {
    grid-template-columns: 1fr;
  }
  .bb-card {
    grid-template-columns: 1fr;
  }
  .bb-card-aside {
    border-left: none;
    border-top: 1px solid var(--bb-border);
    padding-left: 0;
    padding-top: 12px;
    flex-direction: row;
    align-items: center;
    text-align: left;
  }
  .bb-form-grid,
  .bb-score-bars {
    grid-template-columns: 1fr;
  }
}
