/* ============================================================
   TipItaly Hotel Search — hotel-search.css
   ============================================================ */

/* ─── ROOT VARS ─────────────────────────────────────────── */
:root {
  --th-primary:    #1a6b3a;
  --th-primary-h:  #14522d;
  --th-secondary:  #ffd83d;
  --th-text:       #2c2c2c;
  --th-muted:      #666;
  --th-border:     #ddd;
  --th-bg:         #f2f2f2;
  --th-white:      #ffffff;
  --th-radius:     8px;
  --th-shadow:     0 1px 7px rgba(0,0,0,.12);
  --th-shadow-lg:  0 8px 32px rgba(0,0,0,.18);
}

/* ─── WRAPPER ───────────────────────────────────────────── */
.th-wrap {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--th-text);
  max-width: 1840px;
  margin: 0 auto;
  padding: 12px 16px 20px;
}

.th-results {
  margin-left: calc(50% - 50vw + 16px);
  margin-right: calc(50% - 50vw + 16px);
  max-width: none;
}

/* ─── SEARCH BOX ────────────────────────────────────────── */
.th-search-box {
  background: var(--th-white);
  border-radius: var(--th-radius);
  box-shadow: var(--th-shadow);
  padding: 28px 32px;
  margin-bottom: 28px;
}

.th-search-box--compact {
  border: 1px solid #f2d84d;
  border-radius: 12px;
  padding: 20px 24px;
}

.th-title {
  margin: 0 0 20px;
  font-size: 1.5rem;
  color: var(--th-primary);
}

.th-form {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: flex-end;
}

.th-form--primary {
  display: grid;
  grid-template-columns: minmax(260px, 1.45fr) minmax(160px, .65fr) minmax(160px, .65fr) minmax(150px, .6fr) minmax(150px, .5fr);
}

.th-form--advanced {
  border-top: 1px solid #edf0f2;
  margin-top: 18px;
  padding-top: 18px;
}

.th-advanced-title {
  color: #777;
  font-size: .9rem;
  font-weight: 600;
  margin-top: 18px;
}

/* ─── FIELDS ────────────────────────────────────────────── */
.th-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
  min-width: 140px;
}

.th-field--destination { flex: 2; min-width: 220px; position: relative; }
.th-field--submit       { flex: 0; }
.th-field--time { min-width: 190px; }
.th-field--occupancy { position: relative; }

.th-field label {
  font-size: .8rem;
  font-weight: 600;
  color: var(--th-muted);
  text-transform: uppercase;
  letter-spacing: .05em;
}

.th-input {
  border: 1px solid var(--th-border);
  border-radius: var(--th-radius);
  padding: 10px 14px;
  font-size: .95rem;
  color: var(--th-text);
  background: var(--th-bg);
  transition: border-color .2s, box-shadow .2s;
  width: 100%;
  box-sizing: border-box;
}

.th-search-box--compact .th-input {
  background: var(--th-white);
  border-color: #cfcfcf;
  border-radius: 11px;
}

.th-input:focus {
  outline: none;
  border-color: var(--th-primary);
  box-shadow: 0 0 0 3px rgba(26,107,58,.12);
}

.th-occupancy-toggle {
  align-items: center;
  background: var(--th-white);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  min-height: 43px;
  text-align: left;
}

.th-occupancy-toggle small {
  color: var(--th-muted);
  display: block;
  font-size: .72rem;
  line-height: 1;
}

.th-occupancy-toggle strong {
  color: var(--th-text);
  display: block;
  font-size: .95rem;
  line-height: 1.25;
}

.th-occupancy-toggle--open {
  border-color: #f2d84d;
  box-shadow: 0 0 0 3px rgba(255,223,77,.2);
}

.th-occupancy-chevron {
  color: var(--th-muted);
  font-size: 1.25rem;
  line-height: 1;
  transition: transform .2s;
}

.th-occupancy-toggle--open .th-occupancy-chevron {
  transform: rotate(180deg);
}

.th-occupancy-panel {
  background: var(--th-white);
  border: 1px solid var(--th-border);
  border-radius: 0 0 12px 12px;
  box-shadow: var(--th-shadow-lg);
  left: 0;
  min-width: 355px;
  padding: 18px;
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  z-index: 1200;
}

.th-rooms-list {
  display: grid;
  gap: 16px;
}

.th-room-box {
  display: grid;
  gap: 12px;
}

.th-room-box__header {
  align-items: center;
  display: flex;
  justify-content: space-between;
}

.th-room-box__header strong {
  font-size: 1.05rem;
}

.th-room-remove {
  background: none;
  border: none;
  color: #c62828;
  cursor: pointer;
  font-size: .8rem;
  font-weight: 700;
}

.th-room-box__controls {
  display: grid;
  grid-template-columns: 116px 1fr;
  gap: 18px;
  align-items: end;
}

.th-room-label {
  color: var(--th-text);
  display: block;
  font-size: .82rem;
  margin-bottom: 7px;
}

.th-stepper {
  align-items: center;
  border: 1px solid var(--th-border);
  border-radius: 11px;
  display: grid;
  grid-template-columns: 36px 42px 36px;
  height: 40px;
  width: 116px;
  overflow: hidden;
}

.th-stepper button {
  align-items: center;
  appearance: none;
  background: #f7f7f7;
  border: 0;
  border-radius: 0;
  color: #2f3337;
  cursor: pointer;
  display: flex;
  font-size: 1.25rem;
  font-weight: 700;
  height: 40px;
  justify-content: center;
  line-height: 1;
  margin: 0;
  min-width: 36px;
  padding: 0;
}

.th-stepper button:hover {
  background: #eeeeee;
}

.th-room-icon-btn {
  appearance: none;
  background: none;
  border: none;
  color: var(--th-muted);
  cursor: pointer;
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1;
  padding: 0;
}

.th-stepper span {
  align-items: center;
  background: var(--th-white);
  border-left: 1px solid var(--th-border);
  border-right: 1px solid var(--th-border);
  display: flex;
  font-weight: 700;
  height: 40px;
  justify-content: center;
  min-width: 42px;
}

.th-child-add {
  background: var(--th-white);
  border: 1px solid var(--th-border);
  border-radius: 11px;
  color: var(--th-text);
  cursor: pointer;
  min-height: 38px;
  padding: 0 14px;
  text-align: left;
  width: 100%;
}

.th-room-children {
  display: grid;
  gap: 8px;
}

.th-child-age-row {
  align-items: center;
  display: grid;
  grid-template-columns: 1fr 82px 30px;
  gap: 8px;
}

.th-child-age-row label {
  color: var(--th-muted);
  font-size: .78rem;
  letter-spacing: 0;
  text-transform: none;
}

.th-add-room {
  background: none;
  border: none;
  color: #2f6fdf;
  cursor: pointer;
  font-size: .95rem;
  font-weight: 600;
  margin-top: 18px;
  padding: 0;
}

.th-occupancy-done {
  background: #ffdf4d;
  color: #111;
  float: right;
  margin-top: 14px;
  min-width: 160px;
}

/* ─── AUTOCOMPLETE ──────────────────────────────────────── */
.th-suggest-list {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--th-white);
  border: 1px solid var(--th-border);
  border-top: none;
  border-radius: 0 0 var(--th-radius) var(--th-radius);
  box-shadow: var(--th-shadow);
  z-index: 1000;
  max-height: 260px;
  overflow-y: auto;
}

.th-suggest-item {
  padding: 10px 14px;
  cursor: pointer;
  font-size: .9rem;
  border-bottom: 1px solid #f0f0f0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.th-suggest-item:hover { background: #f0faf4; }
.th-suggest-item:last-child { border-bottom: none; }
.th-suggest-item .th-suggest-type { font-size: .75rem; color: var(--th-muted); }

/* ─── BUTTONS ───────────────────────────────────────────── */
.th-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: none;
  border-radius: var(--th-radius);
  padding: 11px 22px;
  font-size: .95rem;
  font-weight: 600;
  cursor: pointer;
  transition: background .2s, transform .1s;
  white-space: nowrap;
}

.th-btn--primary {
  background: var(--th-primary);
  color: var(--th-white);
}
.th-btn--primary:hover { background: var(--th-primary-h); transform: translateY(-1px); }

.th-search-box--compact .th-field--submit .th-btn--primary {
  background: #ffdf4d;
  color: #111;
  justify-content: center;
  min-height: 43px;
  width: 100%;
}

.th-search-box--compact .th-field--submit .th-btn--primary:hover {
  background: #f4cf28;
}

.th-filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  margin-top: 18px;
  align-items: flex-end;
}

.th-filter-group {
  border: 1px solid var(--th-border);
  border-radius: 11px;
  display: inline-flex;
  overflow: hidden;
  background: var(--th-white);
}

.th-filter-group--stars {
  flex: 1 1 560px;
}

.th-segment {
  cursor: pointer;
  min-width: 118px;
  position: relative;
}

.th-segment--small {
  min-width: 61px;
}

.th-segment--meal {
  min-width: 136px;
}

.th-segment input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.th-segment span {
  align-items: center;
  border-right: 1px solid var(--th-border);
  color: var(--th-text);
  display: flex;
  font-size: .9rem;
  font-weight: 600;
  justify-content: center;
  min-height: 46px;
  padding: 0 16px;
  position: relative;
  text-align: center;
}

.th-segment:last-child span {
  border-right: none;
}

.th-segment span::after {
  background: #ececec;
  bottom: 9px;
  content: "";
  height: 3px;
  left: 18px;
  position: absolute;
  right: 18px;
}

.th-segment input:checked + span {
  background: #f6f6f6;
  color: var(--th-primary);
}

.th-segment input:checked + span::after {
  background: var(--th-primary);
}

.th-checkbox {
  align-items: center;
  color: var(--th-text);
  cursor: pointer;
  display: inline-flex;
  font-size: .95rem;
  gap: 8px;
  min-height: 43px;
}

.th-checkbox input {
  accent-color: var(--th-primary);
  height: 16px;
  width: 16px;
}

.th-reset-filters {
  appearance: none;
  background: var(--th-white);
  border: 1px solid var(--th-border);
  border-radius: 11px;
  color: var(--th-muted);
  cursor: pointer;
  font-size: .9rem;
  font-weight: 700;
  min-height: 43px;
  padding: 0 16px;
}

.th-reset-filters:hover {
  border-color: var(--th-primary);
  color: var(--th-primary);
}

.th-btn--secondary {
  background: #eee;
  color: var(--th-text);
}
.th-btn--secondary:hover { background: #ddd; }

.th-btn--large { padding: 14px 30px; font-size: 1rem; width: 100%; justify-content: center; }

/* ─── LOADER ────────────────────────────────────────────── */
.th-loader {
  text-align: center;
  padding: 50px 20px;
  color: var(--th-muted);
}

.th-spinner {
  width: 44px;
  height: 44px;
  border: 4px solid #e0e0e0;
  border-top-color: var(--th-primary);
  border-radius: 50%;
  animation: th-spin .8s linear infinite;
  margin: 0 auto 16px;
}

@keyframes th-spin { to { transform: rotate(360deg); } }

/* ─── RESULTS ───────────────────────────────────────────── */
.th-results-header {
  align-items: center;
  display: flex;
  font-size: .9rem;
  gap: 16px;
  justify-content: space-between;
  color: var(--th-muted);
  background: var(--th-white);
  border-radius: 8px;
  box-shadow: var(--th-shadow);
  color: #2b2f36;
  font-size: 1.45rem;
  margin: 0 0 10px 240px;
  min-height: 66px;
  padding: 0 18px;
  font-weight: 600;
}

.th-results-layout {
  display: grid;
  grid-template-columns: 220px minmax(560px, 810px) minmax(460px, 1fr);
  gap: 14px;
  align-items: start;
}

.th-results-sidebar {
  display: grid;
  gap: 12px;
  position: sticky;
  top: 8px;
  max-height: calc(100vh - 16px);
  overflow-y: auto;
  padding-bottom: 16px;
}

.th-sidebar-card {
  background: var(--th-white);
  border: 0;
  border-radius: var(--th-radius);
  box-shadow: none;
  padding: 14px 16px;
}

.th-sidebar-card h3 {
  color: var(--th-text);
  font-size: .98rem;
  margin: 0 0 12px;
}

.th-side-checks {
  display: grid;
  gap: 9px;
}

.th-side-checks label {
  align-items: flex-start;
  color: var(--th-text);
  cursor: pointer;
  display: flex;
  font-size: .88rem;
  gap: 8px;
  line-height: 1.35;
}

.th-side-checks input {
  accent-color: var(--th-primary);
  margin-top: 2px;
}

.th-side-checks--muted label {
  color: #50545a;
}

.th-side-checks--muted input:disabled {
  opacity: .55;
}

.th-results-main {
  min-width: 0;
}

.th-results-map-panel {
  position: sticky;
  top: 0;
  height: 100vh;
}

.th-results-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

.th-results-empty {
  background: var(--th-white);
  border: 1px solid #edf0f2;
  border-radius: var(--th-radius);
  box-shadow: var(--th-shadow);
  color: var(--th-muted);
  padding: 22px;
}

.th-results-empty p {
  margin: 0;
}

.th-results-empty__hint {
  margin-top: 8px !important;
}

.th-results-map {
  height: 100vh;
  min-height: 620px;
  border: 0;
  border-radius: 0;
  box-shadow: var(--th-shadow);
  overflow: hidden;
}

.th-map-toolbar {
  display: flex;
  gap: 12px;
  left: 14px;
  position: absolute;
  top: 10px;
  z-index: 500;
}

.th-map-pill {
  align-items: center;
  appearance: none;
  background: var(--th-white);
  border: 0;
  border-radius: 8px;
  box-shadow: 0 2px 12px rgba(0,0,0,.18);
  color: #2b2f36;
  display: inline-flex;
  font-size: .88rem;
  font-weight: 700;
  min-height: 40px;
  padding: 0 16px;
}

.th-map-pill--check {
  font-size: .72rem;
  gap: 7px;
  line-height: 1.15;
  max-width: 170px;
}

/* ─── HOTEL CARD ─────────────────────────────────────────── */
.th-hotel-card {
  background: var(--th-white);
  border-radius: var(--th-radius);
  box-shadow: var(--th-shadow);
  overflow: hidden;
  transition: transform .2s, box-shadow .2s;
  cursor: pointer;
}

.th-hotel-card--horizontal {
  display: grid;
  grid-template-columns: 300px minmax(220px, 1fr) 190px;
  min-height: 240px;
}

.th-hotel-card:hover {
  transform: none;
  box-shadow: 0 4px 16px rgba(0,0,0,.14);
}

.th-hotel-card--highlight {
  outline: 3px solid rgba(26,107,58,.28);
  outline-offset: 3px;
}

.th-hotel-card__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #e8f5e9;
}

.th-hotel-card__img-placeholder {
  width: 100%;
  height: 100%;
  min-height: 240px;
  background: linear-gradient(135deg, #e8f5e9, #c8e6c9);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
}

.th-hotel-card--horizontal .th-hotel-card__media {
  background: #e8f5e9;
  min-height: 240px;
  position: relative;
}

.th-hotel-card--horizontal .th-hotel-card__img,
.th-hotel-card--horizontal .th-hotel-card__img-placeholder {
  height: 100%;
  min-height: 240px;
}

.th-hotel-card__body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  min-height: 258px;
}

.th-hotel-card--horizontal .th-hotel-card__body {
  min-height: 0;
  padding: 12px 14px;
}

.th-hotel-card__name {
  color: #2573d8;
  font-size: 1rem;
  font-weight: 700;
  margin: 0 0 2px;
  line-height: 1.2;
}

.th-hotel-card__stars {
  color: var(--th-secondary);
  font-size: .78rem;
  letter-spacing: 0;
  line-height: 1;
}

.th-hotel-card__topline {
  align-items: center;
  display: flex;
  gap: 6px;
  min-height: 16px;
}

.th-hotel-card__distance {
  color: #30343a;
  font-size: .75rem;
  line-height: 1.28;
  margin: 0 0 8px;
}

.th-hotel-card__address {
  color: #2573d8;
  font-size: .76rem;
  line-height: 1.25;
  margin-bottom: 2px;
}

.th-hotel-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}

.th-hotel-card__meta-item {
  background: #f5f7f8;
  border: 1px solid #edf0f2;
  border-radius: 999px;
  color: var(--th-muted);
  font-size: .72rem;
  line-height: 1.2;
  padding: 5px 8px;
}

.th-hotel-card__meta-item strong {
  color: var(--th-text);
  font-weight: 700;
}

.th-hotel-card__features {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 0;
}

.th-hotel-card__icons {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  justify-content: flex-end;
  margin-bottom: 6px;
}

.th-hotel-card__icons span {
  background: transparent;
  border: 0;
  border-radius: 0;
  color: #2f3337;
  font-size: .7rem;
  font-weight: 700;
  line-height: 1.2;
  padding: 5px 8px;
}

.th-hotel-card__feature {
  background: #fff8ea;
  border: 1px solid #f4dfb5;
  border-radius: 6px;
  color: #6b4a08;
  font-size: .75rem;
  font-weight: 600;
  line-height: 1.25;
  padding: 6px 8px;
}

.th-card-fav {
  align-items: center;
  appearance: none;
  background: rgba(255,255,255,.92);
  border: 0;
  border-radius: 50%;
  color: #6d737a;
  display: flex;
  font-size: 1.55rem;
  height: 42px;
  justify-content: center;
  left: 10px;
  line-height: 1;
  padding: 0;
  position: absolute;
  top: 10px;
  width: 42px;
  z-index: 2;
}

.th-card-gallery-count {
  background: rgba(0,0,0,.46);
  border-radius: 999px;
  bottom: 10px;
  color: var(--th-white);
  font-size: .8rem;
  font-weight: 700;
  left: 50%;
  padding: 4px 10px;
  position: absolute;
  transform: translateX(-50%);
}

.th-eco-badge {
  background: #74c365;
  border-radius: 5px;
  color: var(--th-white);
  font-size: .65rem;
  font-weight: 800;
  line-height: 1;
  padding: 2px 4px;
}

.th-hotel-card__ratebox {
  background: #f5f5f5;
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(0, 1.15fr) minmax(150px, .85fr);
  margin-top: auto;
  padding: 10px;
}

.th-hotel-card__room {
  color: #2f3337;
  font-size: .94rem;
  font-weight: 500;
  line-height: 1.18;
}

.th-hotel-card__room-sub {
  color: #2f3337;
  font-size: .75rem;
  line-height: 1.2;
  margin-top: 2px;
}

.th-hotel-card__meal {
  display: grid;
  gap: 4px;
}

.th-hotel-card__meal span {
  color: #2f3337;
  font-size: .75rem;
  line-height: 1.2;
}

.th-hotel-card__hid {
  color: var(--th-muted);
  display: inline-flex;
  font-size: .68rem;
  margin-top: 7px;
}

.th-hotel-card__feature--success {
  background: #eaf7ef;
  border-color: #bee3ca;
  color: var(--th-primary);
}

.th-hotel-card__feature--muted {
  background: #f5f7f8;
  border-color: #edf0f2;
  color: var(--th-muted);
}

.th-hotel-card__extra {
  display: grid;
  gap: 6px;
  margin-bottom: 14px;
}

.th-hotel-card__line {
  color: var(--th-muted);
  font-size: .78rem;
  line-height: 1.35;
}

.th-hotel-card__amenities {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.th-hotel-card__amenities span {
  background: #eef5ff;
  border: 1px solid #d9e8ff;
  border-radius: 999px;
  color: #174ea6;
  font-size: .72rem;
  font-weight: 600;
  line-height: 1.2;
  padding: 5px 8px;
}

.th-hotel-card__amenities--paid span {
  background: #fff4e5;
  border-color: #f4d1a3;
  color: #8a4b00;
}

.th-hotel-card__price {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin-bottom: 12px;
  margin-top: auto;
}

.th-hotel-card__deal {
  align-items: stretch;
  align-content: space-between;
  background: var(--th-white);
  border-left: 1px solid #edf0f2;
  display: grid;
  gap: 8px;
  grid-template-columns: 1fr;
  justify-items: stretch;
  padding: 12px 12px 12px 0;
}

.th-hotel-card__deal .th-btn {
  background: var(--th-secondary);
  border-radius: 9px;
  color: #1f2429;
  justify-content: center;
  min-height: 40px;
  min-width: 0;
  padding: 8px 10px;
  width: 100%;
}

.th-hotel-card__deal .th-btn:hover {
  background: #f2c91f;
  color: #1f2429;
}

.th-hotel-card__deal .th-hotel-card__price {
  display: grid;
  gap: 2px;
  margin: 0;
  text-align: left;
}

.th-hotel-card__deal .th-hotel-card__price-label {
  line-height: 1.25;
}

.th-cancel {
  color: #2f3337;
  font-size: .75rem;
  font-weight: 500;
  line-height: 1.15;
  text-align: left;
}

.th-cancel--free {
  color: #008a00;
}

.th-hotel-card__price-amount {
  color: #2f3337;
  font-size: 1.28rem;
  font-weight: 500;
}

.th-hotel-card__price-label {
  color: #2f3337;
  font-size: .7rem;
  line-height: 1.15;
}

.th-nightly-price {
  align-items: center;
  color: #4c5157;
  display: flex;
  font-size: .78rem;
  gap: 8px;
  justify-content: flex-start;
  line-height: 1.25;
  margin-top: 4px;
}

.th-nightly-price b {
  color: #66706a;
  font-weight: 600;
}

.th-nightly-price strong {
  color: var(--th-primary);
  font-size: .92rem;
  font-weight: 800;
}

.th-hotel-card__score {
  align-items: start;
  display: grid;
  gap: 2px;
  grid-template-columns: 1fr 42px;
  justify-items: end;
}

.th-hotel-card__score strong {
  align-items: center;
  background: #0bb000;
  border-radius: 0 0 0 6px;
  color: var(--th-white);
  display: flex;
  font-size: 1rem;
  font-weight: 800;
  grid-row: 1 / span 2;
  height: 54px;
  justify-content: center;
  width: 42px;
}

.th-score-dots {
  display: flex;
  gap: 4px;
  margin-top: 4px;
}

.th-score-dots i {
  background: #22b573;
  border-radius: 50%;
  display: block;
  height: 11px;
  width: 11px;
}

.th-review-count {
  color: #2f3337;
  font-size: .68rem;
  line-height: 1.1;
}

.th-map-price-marker {
  background: transparent;
  border: 0;
}

.th-map-price-marker span {
  background: var(--th-white);
  border-radius: 7px;
  box-shadow: 0 2px 10px rgba(0,0,0,.25);
  color: #2f3337;
  display: inline-flex;
  font-size: .76rem;
  font-weight: 800;
  padding: 5px 8px;
  white-space: nowrap;
}

.th-map-popup {
  display: grid;
  gap: 5px;
  min-width: 170px;
}

.th-map-popup img {
  border-radius: 4px;
  height: 74px;
  object-fit: cover;
  width: 100%;
}

.th-map-popup strong {
  font-size: .82rem;
}

.th-map-popup span {
  color: var(--th-muted);
  font-size: .78rem;
}

/* ─── HOTEL DETAIL PAGE ─────────────────────────────────── */
.th-hotel-detail-page {
  background: var(--th-white);
  margin-left: calc(50% - 50vw + 16px);
  margin-right: calc(50% - 50vw + 16px);
  padding: 10px 0 36px;
}

.th-detail-shell {
  display: grid;
  gap: 14px;
  margin: 0 auto;
  max-width: 1080px;
}

.th-detail-breadcrumb {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.th-detail-breadcrumb button,
.th-detail-breadcrumb span,
.th-detail-breadcrumb strong {
  background: var(--th-white);
  border: 0;
  border-radius: 7px;
  color: #2573d8;
  font-size: .86rem;
  min-height: 34px;
  padding: 8px 12px;
}

.th-detail-breadcrumb button {
  cursor: pointer;
}

.th-detail-breadcrumb strong {
  color: #2f3337;
  font-weight: 500;
}

.th-detail-hero,
.th-detail-section-card,
.th-detail-dates,
.th-detail-notice {
  background: var(--th-white);
  border-radius: 12px;
}

.th-detail-hero {
  align-items: center;
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(0, 1fr) auto;
  padding: 18px;
}

.th-detail-stars {
  color: var(--th-secondary);
  font-size: .86rem;
  line-height: 1;
  margin-bottom: 4px;
}

.th-detail-hero h2 {
  color: #2b2f36;
  font-size: 1.3rem;
  line-height: 1.2;
  margin: 0 0 6px;
}

.th-detail-hero p {
  color: #4c5157;
  font-size: .84rem;
  margin: 0;
}

.th-detail-hero__cta {
  align-items: end;
  display: grid;
  gap: 10px;
  justify-items: end;
}

.th-detail-hero__cta strong {
  color: #2f3337;
  font-size: 1.05rem;
}

.th-detail-hero__cta .th-nightly-price {
  justify-content: flex-end;
  margin-top: -4px;
}

.th-nightly-price--table {
  align-items: flex-start;
  flex-direction: column;
  gap: 1px;
}

.th-nightly-price--table strong {
  font-size: .85rem;
}

.th-detail-hero__cta .th-btn--primary,
.th-detail-rates-table .th-btn--primary {
  background: var(--th-secondary);
  border-radius: 10px;
  color: #1f2429;
}

.th-detail-gallery {
  display: grid;
  gap: 4px;
  grid-template-columns: 2fr 3fr;
  min-height: 400px;
}

.th-detail-gallery img {
  display: block;
  height: 100%;
  object-fit: cover;
  width: 100%;
}

.th-detail-gallery__main,
.th-detail-gallery__grid > div {
  background: #dfeee0;
  overflow: hidden;
  position: relative;
}

.th-detail-gallery__main {
  border-radius: 10px 0 0 10px;
}

.th-detail-gallery__grid {
  display: grid;
  gap: 4px;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(2, 1fr);
}

.th-detail-gallery__grid > div:nth-child(4) {
  grid-column: span 2;
}

.th-detail-gallery__grid > div:nth-child(3) {
  border-radius: 0 10px 0 0;
}

.th-detail-gallery__grid > div:nth-child(4) {
  border-radius: 0 0 0 0;
}

.th-detail-gallery__grid span {
  align-items: center;
  background: rgba(0,0,0,.45);
  color: var(--th-white);
  display: flex;
  font-size: 1.2rem;
  font-weight: 800;
  inset: 0;
  justify-content: center;
  position: absolute;
}

.th-detail-summary-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: 1.3fr .7fr .7fr;
}

.th-detail-summary-card {
  background: var(--th-white);
  border-radius: 12px;
  min-height: 132px;
  padding: 16px;
}

.th-detail-summary-card h3 {
  font-size: .98rem;
  margin: 0 0 10px;
}

.th-detail-review-card {
  display: grid;
  gap: 10px;
  grid-template-columns: 38px 1fr;
}

.th-detail-review-card p {
  color: #2f3337;
  font-size: .82rem;
  grid-column: 1 / -1;
  margin: 0;
}

.th-detail-score {
  align-items: center;
  background: #0bb000;
  border-radius: 6px 6px 0 0;
  color: var(--th-white);
  display: flex;
  font-size: 1rem;
  height: 44px;
  justify-content: center;
}

.th-detail-review-card b {
  display: block;
}

.th-detail-review-card span {
  color: #2573d8;
  font-size: .78rem;
}

.th-detail-list {
  display: grid;
  gap: 8px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.th-detail-list li {
  color: #2f3337;
  font-size: .86rem;
}

.th-detail-list li::before {
  color: #2573d8;
  content: "•";
  margin-right: 7px;
}

.th-detail-muted {
  color: var(--th-muted);
  font-size: .86rem;
  margin: 0;
}

.th-detail-notice {
  color: #2f3337;
  font-size: .82rem;
  padding: 12px 16px;
}

.th-detail-dates {
  align-items: center;
  display: grid;
  gap: 20px;
  grid-template-columns: auto auto 1fr;
  padding: 16px 20px;
}

.th-detail-dates b,
.th-detail-dates strong,
.th-detail-dates span {
  display: inline-block;
  margin-right: 8px;
}

.th-detail-dates strong {
  color: #2573d8;
}

.th-detail-dates span {
  color: var(--th-muted);
}

.th-detail-dates .th-btn {
  justify-self: end;
}

.th-detail-section-card {
  padding: 20px;
}

.th-detail-section-card h2 {
  color: #2b2f36;
  font-size: 1.25rem;
  margin: 0 0 4px;
}

.th-detail-section-card > p {
  color: #2f3337;
  font-size: .9rem;
  line-height: 1.5;
  margin: 0 0 14px;
}

.th-detail-rate-filters {
  background: #fff8dc;
  border-radius: 8px;
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 14px 0;
  padding: 18px 20px;
}

.th-detail-rate-filters span {
  background: var(--th-white);
  border: 1px solid var(--th-border);
  border-radius: 10px;
  color: #2f3337;
  font-size: .88rem;
  padding: 12px;
}

.th-detail-rates-table-wrap {
  border: 1px solid #d8d8d8;
  border-radius: 6px;
  overflow-x: auto;
}

.th-detail-rates-table {
  border-collapse: collapse;
  min-width: 940px;
  width: 100%;
}

.th-detail-rates-table th {
  background: #2d3238;
  color: var(--th-white);
  font-size: .82rem;
  font-weight: 500;
  padding: 8px;
  text-align: left;
}

.th-detail-rates-table td {
  border-bottom: 1px solid #e3e3e3;
  border-right: 1px solid #e3e3e3;
  color: #2f3337;
  font-size: .86rem;
  padding: 12px 8px;
  vertical-align: middle;
}

.th-detail-rates-table td:first-child {
  min-width: 250px;
}

.th-detail-rates-table td span,
.th-detail-rates-table td small {
  color: var(--th-muted);
  display: block;
  font-size: .76rem;
  line-height: 1.25;
  margin-top: 3px;
}

.th-detail-rates-table .th-rate-ok {
  color: #008a00;
}

.th-detail-rates-table .th-btn {
  justify-content: center;
  min-width: 104px;
}

.th-detail-map-preview {
  align-items: center;
  background: #dff1fb;
  border-radius: 10px;
  color: #2f3337;
  display: grid;
  min-height: 230px;
  padding: 26px;
  place-items: center;
  text-align: center;
}

.th-detail-map-preview span {
  background: var(--th-white);
  border-radius: 8px;
  box-shadow: var(--th-shadow);
  font-weight: 700;
  padding: 12px 16px;
}

.th-detail-map-preview small {
  display: block;
  margin-top: 8px;
}

.th-detail-map {
  background: #dff1fb;
  border-radius: 10px;
  height: 310px;
  min-height: 310px;
  overflow: hidden;
  position: relative;
  width: 100%;
}

.th-detail-map .leaflet-control-attribution {
  font-size: .68rem;
}

.th-detail-two-col {
  display: grid;
  gap: 32px;
  grid-template-columns: minmax(0, 1fr) 260px;
}

.th-detail-description-intro p {
  max-width: 880px;
}

.th-similar-section h2 {
  margin-bottom: 14px;
}

.th-similar-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.th-similar-card {
  background: var(--th-white);
  border: 1px solid var(--th-border);
  border-radius: 10px;
  box-shadow: var(--th-shadow);
  cursor: pointer;
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  min-height: 112px;
  overflow: hidden;
  padding: 0;
  text-align: left;
  transition: transform .16s ease, box-shadow .16s ease;
}

.th-similar-card:hover {
  box-shadow: var(--th-shadow-lg);
  transform: translateY(-1px);
}

.th-similar-card__image {
  align-items: center;
  background: #dfeee0;
  display: flex;
  justify-content: center;
  min-height: 112px;
  overflow: hidden;
}

.th-similar-card__image img {
  height: 100%;
  object-fit: cover;
  width: 100%;
}

.th-similar-card__placeholder {
  font-size: 2rem;
}

.th-similar-card__body {
  display: grid;
  gap: 4px;
  padding: 10px 12px;
}

.th-similar-card__stars {
  color: var(--th-secondary);
  font-size: .72rem;
  line-height: 1;
}

.th-similar-card__body strong {
  color: #2f3337;
  font-size: .88rem;
  line-height: 1.25;
}

.th-similar-card__body small {
  color: var(--th-muted);
  font-size: .76rem;
  line-height: 1.25;
}

.th-similar-card__body b {
  color: var(--th-primary);
  font-size: .88rem;
}

.th-detail-two-col aside {
  color: #2f3337;
}

.th-detail-amenities-grid {
  display: grid;
  gap: 24px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.th-detail-amenities-grid h3 {
  font-size: .98rem;
  margin: 0 0 10px;
}

.th-detail-amenities-grid ul {
  color: #2f3337;
  display: grid;
  font-size: .88rem;
  gap: 8px;
  line-height: 1.35;
  list-style: none;
  margin: 0;
  padding: 0;
}

.th-detail-amenities-grid li::before {
  color: #bbb;
  content: "•";
  margin-right: 7px;
}

.th-detail-image-missing .th-hotel-card__img-placeholder {
  min-height: 100%;
}

/* ─── MODAL ──────────────────────────────────────────────── */
.th-modal {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
}

.th-modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.55);
}

.th-modal-box {
  position: relative;
  background: var(--th-white);
  border-radius: var(--th-radius);
  max-width: 750px;
  width: 95%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--th-shadow-lg);
  z-index: 1;
}

.th-modal-close-btn {
  position: absolute;
  top: 14px;
  right: 14px;
  background: #eee;
  border: none;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  cursor: pointer;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
}

/* ─── HOTEL DETAIL ───────────────────────────────────────── */
.th-hotel-detail__gallery {
  width: 100%;
  height: 240px;
  object-fit: cover;
}

.th-hotel-detail__info {
  padding: 20px;
}

.th-hotel-detail__name {
  font-size: 1.4rem;
  font-weight: 700;
  margin: 0 0 8px;
}

.th-hotel-detail__desc {
  font-size: .9rem;
  color: var(--th-muted);
  line-height: 1.6;
  margin-bottom: 16px;
}

.th-detail-section {
  border-top: 1px solid #edf0f2;
  padding-top: 14px;
  margin-top: 14px;
}

.th-detail-section h4 {
  font-size: .95rem;
  margin: 0 0 10px;
  color: var(--th-text);
}

.th-detail-rows {
  display: grid;
  gap: 8px;
}

.th-detail-row {
  display: grid;
  grid-template-columns: minmax(120px, .45fr) minmax(0, 1fr);
  gap: 10px;
  font-size: .82rem;
}

.th-detail-row span {
  color: var(--th-muted);
}

.th-detail-row strong {
  color: var(--th-text);
  font-weight: 600;
  min-width: 0;
  overflow-wrap: anywhere;
}

.th-detail-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.th-detail-badges span {
  background: #eef5ff;
  border: 1px solid #d9e8ff;
  border-radius: 999px;
  color: #174ea6;
  font-size: .76rem;
  font-weight: 600;
  line-height: 1.25;
  padding: 6px 9px;
}

.th-detail-badges--paid span {
  background: #fff4e5;
  border-color: #f4d1a3;
  color: #8a4b00;
}

.th-detail-badges--compact span {
  font-size: .72rem;
  padding: 5px 8px;
}

.th-room-group {
  background: #fafafa;
  border: 1px solid #edf0f2;
  border-radius: var(--th-radius);
  display: grid;
  gap: 8px;
  margin-bottom: 8px;
  padding: 10px;
}

.th-policy-item {
  border-bottom: 1px solid #f0f0f0;
  display: grid;
  gap: 4px;
  padding: 8px 0;
}

.th-policy-item strong {
  font-size: .82rem;
}

.th-policy-item span,
.th-policy-text {
  color: var(--th-muted);
  font-size: .82rem;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.th-rates-title {
  font-size: 1rem;
  font-weight: 700;
  margin: 20px 0 12px;
  border-top: 1px solid var(--th-border);
  padding-top: 16px;
}

.th-rate-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid #f0f0f0;
  gap: 12px;
}

.th-rate-item__name { font-size: .9rem; font-weight: 600; }
.th-rate-item__desc { font-size: .8rem; color: var(--th-muted); }
.th-rate-item__price { font-size: 1.2rem; font-weight: 700; color: var(--th-primary); white-space: nowrap; }

/* ─── BOOKING FORM ───────────────────────────────────────── */
.th-booking-form {
  background: var(--th-white);
  border-radius: var(--th-radius);
  box-shadow: var(--th-shadow);
  padding: 28px 32px;
}

.th-booking-summary {
  background: var(--th-bg);
  border-radius: var(--th-radius);
  padding: 16px;
  margin-bottom: 20px;
  font-size: .9rem;
}

.th-booking-fields .th-row {
  display: flex;
  gap: 14px;
  margin-bottom: 14px;
}

.th-room-guests {
  border-top: 1px solid #edf0f2;
  display: grid;
  gap: 14px;
  margin-top: 18px;
  padding-top: 18px;
}

.th-room-guests h3 {
  font-size: 1.05rem;
  margin: 0;
}

.th-room-guests__help {
  color: var(--th-muted);
  font-size: .86rem;
  line-height: 1.45;
  margin: -6px 0 0;
}

.th-room-guests__room {
  background: #fafafa;
  border: 1px solid #edf0f2;
  border-radius: var(--th-radius);
  padding: 14px;
}

.th-room-guests__room h4 {
  font-size: .95rem;
  margin: 0 0 12px;
}

.th-room-guests__grid {
  display: grid;
  gap: 12px;
}

.th-room-guests__guest {
  background: var(--th-white);
  border: 1px solid #edf0f2;
  border-radius: var(--th-radius);
  padding: 12px;
}

.th-room-guests__label {
  color: var(--th-primary);
  font-size: .82rem;
  font-weight: 700;
  margin-bottom: 10px;
}

.th-back-btn {
  background: none;
  border: none;
  color: var(--th-primary);
  cursor: pointer;
  font-size: .9rem;
  margin-bottom: 16px;
  padding: 0;
  font-weight: 600;
}

/* ─── SUCCESS ────────────────────────────────────────────── */
.th-booking-success {
  text-align: center;
  padding: 50px 20px;
}

.th-success-icon { font-size: 4rem; margin-bottom: 16px; }

/* ─── ERROR ──────────────────────────────────────────────── */
.th-error {
  background: #fce8e8;
  border: 1px solid #f5c6c6;
  border-radius: var(--th-radius);
  padding: 12px 16px;
  color: #c62828;
  font-size: .9rem;
  margin-bottom: 16px;
}

.th-info {
  background: #eef5ff;
  border: 1px solid #b9d6ff;
  border-radius: var(--th-radius);
  padding: 12px 16px;
  color: #174ea6;
  font-size: .9rem;
  margin-bottom: 16px;
}

/* ─── PAGINATION ─────────────────────────────────────────── */
.th-pagination {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 28px;
}

.th-page-btn {
  border: 1px solid var(--th-border);
  background: var(--th-white);
  border-radius: var(--th-radius);
  padding: 8px 14px;
  cursor: pointer;
  font-size: .85rem;
  transition: background .2s;
}

.th-page-btn:hover, .th-page-btn--active {
  background: var(--th-primary);
  color: var(--th-white);
  border-color: var(--th-primary);
}

/* ─── RESPONSIVE ─────────────────────────────────────────── */
@media (max-width: 1180px) {
  .th-results-layout {
    grid-template-columns: 210px minmax(0, 1fr);
  }

  .th-results-map-panel {
    grid-column: 2;
    position: static;
    width: 100%;
    height: auto;
  }

  .th-results-map {
    height: 360px;
    min-height: 360px;
  }

  .th-map-toolbar {
    position: relative;
    left: auto;
    top: auto;
    margin-bottom: 8px;
  }

  .th-results-header {
    margin-left: 224px;
  }

  .th-detail-shell {
    padding: 0 14px;
  }
}

@media (max-width: 900px) {
  .th-form--primary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .th-results-layout {
    display: flex;
    flex-direction: column;
  }

  .th-results {
    margin-left: 0;
    margin-right: 0;
  }

  .th-results-header {
    font-size: 1.05rem;
    margin-left: 0;
    min-height: 48px;
  }

  .th-results-sidebar {
    position: static;
    width: 100%;
    max-height: none;
    overflow: visible;
  }

  .th-results-main,
  .th-results-map-panel {
    width: 100%;
  }

  .th-results-map {
    height: 340px;
    min-height: 340px;
  }

  .th-hotel-card--horizontal {
    grid-template-columns: 260px minmax(0, 1fr);
  }

  .th-hotel-card__deal {
    border-left: 0;
    border-top: 1px solid #edf0f2;
    grid-column: 1 / -1;
    grid-template-columns: 1fr 190px;
    padding: 12px;
  }

  .th-hotel-detail-page {
    margin-left: 0;
    margin-right: 0;
  }

  .th-detail-hero,
  .th-detail-summary-grid,
  .th-detail-dates,
  .th-detail-two-col {
    grid-template-columns: 1fr;
  }

  .th-detail-hero__cta,
  .th-detail-dates .th-btn {
    justify-items: start;
    justify-self: start;
  }

  .th-detail-gallery {
    grid-template-columns: 1fr;
  }

  .th-detail-gallery__main {
    border-radius: 10px 10px 0 0;
    min-height: 300px;
  }

  .th-detail-gallery__grid {
    min-height: 240px;
  }

  .th-detail-rate-filters,
  .th-detail-amenities-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .th-similar-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 600px) {
  .th-search-box { padding: 18px; }
  .th-search-box--compact { padding: 16px; }
  .th-form { flex-direction: column; }
  .th-form--primary { display: flex; }
  .th-field { min-width: 100%; }
  .th-occupancy-panel { min-width: 0; width: 100%; }
  .th-room-box__controls { grid-template-columns: 1fr; }
  .th-occupancy-done { float: none; width: 100%; }
  .th-filter-row { gap: 12px; }
  .th-filter-group { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); width: 100%; }
  .th-filter-group--stars { grid-template-columns: 1fr; }
  .th-segment { min-width: 0; }
  .th-segment span { border-bottom: 1px solid var(--th-border); border-right: none; }
  .th-hotel-card--horizontal {
    grid-template-columns: 1fr;
  }
  .th-hotel-card--horizontal .th-hotel-card__media,
  .th-hotel-card--horizontal .th-hotel-card__img,
  .th-hotel-card--horizontal .th-hotel-card__img-placeholder {
    min-height: 210px;
  }
  .th-hotel-card__ratebox {
    grid-template-columns: 1fr;
  }
  .th-hotel-card__deal {
    grid-column: auto;
    grid-template-columns: 1fr;
  }
  .th-hotel-card__score {
    justify-items: start;
  }
  .th-detail-shell {
    padding: 0 10px;
  }
  .th-detail-breadcrumb {
    gap: 6px;
  }
  .th-detail-hero,
  .th-detail-section-card,
  .th-detail-dates,
  .th-detail-summary-card {
    border-radius: 8px;
    padding: 14px;
  }
  .th-detail-gallery {
    min-height: 0;
  }
  .th-detail-gallery__grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .th-detail-gallery__grid > div:nth-child(3),
  .th-detail-gallery__main {
    border-radius: 8px;
  }
  .th-detail-rate-filters,
  .th-detail-amenities-grid {
    grid-template-columns: 1fr;
  }
  .th-detail-map {
    height: 280px;
    min-height: 280px;
  }
  .th-similar-grid {
    grid-template-columns: 1fr;
  }
  .th-detail-rates-table {
    min-width: 780px;
  }
  .th-booking-fields .th-row { flex-direction: column; }
  .th-results-header { align-items: stretch; flex-direction: column; }
  .th-results-map { height: 320px; min-height: 320px; width: 100%; }
  .th-results-list { grid-template-columns: 1fr; }
  .th-hotel-card--horizontal { display: grid; grid-template-columns: 1fr; }
  .th-hotel-card--horizontal .th-hotel-card__media,
  .th-hotel-card--horizontal .th-hotel-card__img,
  .th-hotel-card--horizontal .th-hotel-card__img-placeholder { min-height: 190px; height: 190px; }
  .th-hotel-card--horizontal .th-hotel-card__body { border-right: 0; }
  .th-hotel-card__deal {
    align-content: start;
    grid-template-columns: 1fr;
  }
  .th-hotel-card__deal .th-btn { min-width: 0; width: 100%; }
  .th-hotel-card__deal .th-hotel-card__price,
  .th-cancel { text-align: left; }
  .th-room-guests__guest .th-row { flex-direction: column; }
}
