/* RESET e estilos básicos */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
  }
  html,
  body,
  input,
  select,
  button,
  textarea {
    font-family: 'Montserrat', sans-serif;
  }
  body {
    width: 100%;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: #f6f8fb;
    color: #333;
  }
  ::placeholder {
    color: #999;
    opacity: 1;
  }

  /* Classe para ocultar elementos */
  .hidden {
    display: none;
  }

  :root {
      --cor-primaria: #0e65e0;
      --cor-secundaria: #0b4ea9;
      --cor-texto: #333;
      --font-principal: 'Montserrat', sans-serif;
    }

    body, input, button, select, textarea {
      font-family: var(--font-principal);
    }
    /* Estilos do autocomplete */
    .autocomplete-suggestions {
      position: absolute;
      top: 100%;
      left: 0;
      right: 0;
      background: #fff;
      max-height: 200px;
      overflow-y: auto;
      z-index: 1000;
      border-radius: 0 0 4px 4px;
    }
    .autocomplete-suggestions div {
      padding: 8px;
      cursor: pointer;
      transition: background 0.2s ease-in-out;
    }
    .autocomplete-suggestions div:hover {
      background: #e9e9e9;
    }

  /* Loading Overlay: O conteúdo será carregado via loading.html */
  #loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #fff;
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
  }

  /* Oculta o conteúdo principal até que tudo esteja carregado */
  #hotelDetail {
    display: none;
  }

  /* HERO */
  .hero {
    width: 100%;
    min-height: 50vh;
    background: linear-gradient(to bottom right, #0e65e0, #1f3070);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #fff;
    padding: 2rem;
  }
  .hero h1 {
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 1rem;
  }
  .hero p {
    font-size: 1.1rem;
    opacity: 0.9;
  }

  /* CONTAINER DE BUSCA */
  .search-container {
    position: relative;
    width: 90%;
    max-width: 1200px;
    margin: -4rem auto 2rem auto;
    background: #fff;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
    border-radius: 1rem;
    padding: 1.5rem 2rem;
    z-index: 10;
  }

  /* TABS */
  .tabs {
    display: flex;
    align-items: center;
    gap: 1rem;
    border-bottom: 1px solid #eee;
    margin-bottom: 1rem;
    flex-wrap: wrap;
  }
  .tab {
    padding: 0.75rem 1rem;
    cursor: pointer;
    font-weight: 600;
    border-radius: 0.5rem 0.5rem 0 0;
    color: #555;
    background: #fafafa;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: background 0.3s, color 0.3s;
  }
  .tab .material-icons {
    font-size: 1.1rem;
    vertical-align: middle;
  }
  .tab.active {
    background: var(--button-color);
    color: #fff;
  }
  .tab-content {
    display: none;
  }
  .tab-content.active {
    display: block;
    animation: fadeIn 0.3s ease-in-out;
  }
  @keyframes fadeIn {
    from {
      opacity: 0;
      transform: translateY(10px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }

  /* FORMULÁRIOS */
  .form-group {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1rem;
    align-items: flex-end;
  }
  .form-field {
    flex: 1;
    min-width: 200px;
    display: flex;
    flex-direction: column;
    position: relative;
  }
  .form-field label {
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #555;
  }
  .form-field input,
  .form-field select {
    padding: 0.7rem;
    font-size: 0.95rem;
    border: 1px solid #ccc;
    border-radius: 0.4rem;
    outline: none;
    transition: border 0.3s, box-shadow 0.3s;
  }
  .form-field input:focus,
  .form-field select:focus {
    border-color: #0e65e0;
    box-shadow: 0 0 0 2px rgba(14, 101, 224, 0.1);
  }
  .form-field.button-field {
    flex: 0;
  }
  .search-button {
    background: #0e65e0;
    color: #fff;
    border: none;
    padding: 0.8rem 1.2rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 0.4rem;
    cursor: pointer;
    transition: background 0.3s, box-shadow 0.3s;
    margin-top: 0.5rem;
  }
  .search-button:hover {
    background: #0b4ea9;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  }

  /* DROPDOWN DE QUARTOS */
  .quartos-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    width: 320px;
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 0.4rem;
    padding: 1rem;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
    display: none;
    z-index: 9999;
  }
  .quartos-dropdown.active {
    display: block;
  }
  .qd-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
  }
  .qd-counter {
    display: flex;
    align-items: center;
    gap: 0.5rem;
  }
  .qd-counter button {
    width: 30px;
    height: 30px;
    border: 1px solid #ccc;
    background: #fff;
    font-size: 1.2rem;
    cursor: pointer;
    border-radius: 50%;
  }
  .qd-rooms-container {
    max-height: 300px;
    overflow-y: auto;
    margin-bottom: 1rem;
  }
  .qd-room-block {
    padding: 0.75rem 0;
    border-top: 1px solid #eee;
  }
  .qd-room-block:first-child {
    border-top: none;
    padding-top: 0;
  }
  .qd-room-title {
    font-weight: 600;
    margin-bottom: 0.5rem;
  }
  .qd-row {
    margin-bottom: 0.5rem;
  }
  .qd-label {
    font-weight: 600;
    font-size: 0.9rem;
  }
  .children-ages select {
    width: 100%;
    margin-bottom: 0.5rem;
  }
  .qd-apply {
    text-align: right;
  }
  .qd-apply button {
    background: #0e65e0;
    color: #fff;
    border: none;
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    font-weight: 600;
    border-radius: 0.4rem;
    cursor: pointer;
  }

  /* RESULTADOS + FILTROS */
  .results-container {
    width: 90%;
    max-width: 1200px;
    margin: 1rem auto 2rem auto;
    display: flex;
    gap: 1rem;
  }
  /* Painel de Filtros com design interativo */
  .filters-panel {
    width: 280px;
    background: #ffffff;
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    flex-shrink: 0;
    transition: transform 0.5s ease, opacity 0.5s ease;
    opacity: 0;
    transform: translateY(-20px);
    display: none;
  }
  .filters-panel.visible {
    opacity: 1;
    transform: translateY(0);
    display: block;
  }
  .filters-panel h2 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    font-weight: 700;
    color: #0e65e0;
    text-align: center;
  }
  .filter-group {
    margin-bottom: 1.5rem;
  }
  .filter-group h3 {
    font-size: 1.1rem;
    margin-bottom: 0.75rem;
    font-weight: 600;
    color: #555;
  }
  .filter-group label {
    display: flex;
    align-items: center;
    margin-bottom: 0.5rem;
    cursor: pointer;
    font-size: 0.95rem;
    transition: color 0.3s;
  }
  .filter-group label:hover {
    color: #0e65e0;
  }
  /* Checkbox customizado */
  .filter-group label input[type="checkbox"] {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border: 2px solid #0e65e0;
    border-radius: 4px;
    margin-right: 0.75rem;
    cursor: pointer;
    position: relative;
    transition: background 0.3s ease;
  }
  .filter-group label input[type="checkbox"]:checked {
    background: #0e65e0;
  }
  .filter-group label input[type="checkbox"]:checked::after {
    content: "";
    position: absolute;
    left: 5px;
    top: 1px;
    width: 4px;
    height: 9px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
  }
  .range-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
  }
  .range-group input[type="number"] {
    width: 60px;
    padding: 0.3rem;
    border: 1px solid #ccc;
    border-radius: 4px;
  }
  .filters-panel button.search-button {
    margin-top: 1rem;
    width: 100%;
  }

  /* EXEMPLO: PREÇO POR DIÁRIA COM SLIDER (opcional) */
  .price-range {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
  }
  .price-inputs {
    display: flex;
    gap: 0.5rem;
    justify-content: space-between;
  }
  .price-inputs > div {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
  }
  .price-inputs label {
    font-size: 0.85rem;
    color: #666;
  }
  .price-inputs input[type="number"] {
    width: 100%;
    padding: 0.4rem;
    border: 1px solid #ccc;
    border-radius: 4px;
  }
  .price-slider {
    display: flex;
    gap: 0.5rem;
    align-items: center;
  }
  .price-slider input[type="range"] {
    flex: 1;
    -webkit-appearance: none;
    width: 100%;
    height: 6px;
    background: #ddd;
    border-radius: 4px;
    outline: none;
    cursor: pointer;
  }
  .price-slider input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 16px;
    height: 16px;
    background: #0e65e0;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 0 2px rgba(0, 0, 0, 0.2);
  }
  .price-slider input[type="range"]::-moz-range-thumb {
    width: 16px;
    height: 16px;
    background: #0e65e0;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 0 2px rgba(0, 0, 0, 0.2);
  }

  /* EXEMPLO: BUSCAR POR NOME DA PROPRIEDADE */
  .property-search {
    display: flex;
    align-items: center;
    position: relative;
  }
  .property-search input[type="text"] {
    width: 100%;
    padding: 0.7rem 2.5rem 0.7rem 0.7rem;
    border: 1px solid #ccc;
    border-radius: 0.4rem;
    outline: none;
  }
  /* Ícone de busca no canto direito (opcional) */
  .property-search::before {
    content: '\f002';
    font-family: 'Font Awesome 5 Free';
    position: absolute;
    right: 1rem;
    font-weight: 900;
    color: #888;
  }

  /* Listagem de hotéis */
  #hotelResults {
    flex: 1;
  }
  #status {
    margin-top: 1rem;
    display: none;
    font-weight: 600;
    color: #555;
  }
  .hotels-list {
    margin-top: 1rem;
  }
  #pagination {
    display: none;
    gap: 1rem;
    margin-top: 1rem;
  }
  #pagination button {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 4px;
    background: #eee;
    cursor: pointer;
  }
  #pagination button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
  }

  /* HOTEL CARD */
  .hotel-card {
    display: flex;
    flex-direction: row;
    background-color: #fff;
    border-radius: 16px;
    padding: 20px;
    width: 100%;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease-in-out;
    gap: 20px;
    margin-bottom: 15px;
  }
  .hotel-card:hover {
    transform: translateY(-5px);
  }
  .hotel-image {
    width: 280px;
    max-width: 280px;
    border-radius: 16px;
    position: relative;
    overflow: hidden;
    margin: -20px 0 -20px -20px;
  }
  .carousel-track {
    display: flex;
    transition: transform 0.4s ease-in-out;
    width: 100%;
    height: 100%;
  }
  .carousel-slide {
    min-width: 100%;
    overflow: hidden;
  }
  .carousel-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
  }
  .carousel-slide img:hover {
    transform: scale(1.04);
  }
  .carousel-button {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    color: #fff;
    border: none;
    padding: 8px 12px;
    border-radius: 8px;
    cursor: pointer;
    z-index: 2;
    font-size: 1em;
  }
  .prev-button {
    left: 10px;
  }
  .next-button {
    right: 10px;
  }

  .hotel-info {
    flex: 2;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 10px;
  }
  .hotel-name {
    font-size: 1.4em;
    font-weight: 700;
    color: #333;
    margin-bottom: 5px;
    margin-right: 100px;
    margin-top: 15px;
    line-height: 1.2;
  }
  .hotel-rating {
    font-size: 1.1em;
    color: #888;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
  }
  .stars {
    color: #ffd700;
    display: flex;
  }
  .stars .empty {
    color: #ddd;
  }
  .rating-value {
    font-size: 0.9em;
    color: #333;
  }
  .rating-divider {
    margin: 0 2px;
    color: #ccc;
    font-weight: 600;
  }
  .facility-icons {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
  }
  .facility-icon {
    display: inline-flex;
    width: 24px;
    height: 24px;
    cursor: pointer;
    position: relative;
    color: #007aff;
    align-items: center;
    justify-content: center;
  }
  .facility-icon:hover .tooltip {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, 0);
  }
  .tooltip {
    position: absolute;
    left: 50%;
    bottom: calc(100% + 6px);
    background-color: rgba(0, 0, 0, 0.8);
    color: #fff;
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 0.8em;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translate(-50%, 10px);
    transition: all 0.2s ease;
    white-space: nowrap;
  }
  .tooltip::after {
    content: '';
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    top: 100%;
    border-width: 5px;
    border-style: solid;
    border-color: rgba(0, 0, 0, 0.8) transparent transparent transparent;
  }
  .hotel-address {
    font-size: 1em;
    color: #666;
    margin-bottom: 10px;
    line-height: 1.4;
    margin-top: 10px;
  }
  .hotel-details {
    font-size: 1em;
    color: #555;
    line-height: 1.5;
  }
  .hotel-details li {
    margin-bottom: 8px;
    font-size: 1em;
    color: #333;
    display: flex;
    align-items: center;
  }
  .hotel-details li i {
    color: #007aff;
    margin-right: 10px;
  }
  .hotel-price-details { /* Nova classe para o container do preço */
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
    gap: 10px;
    text-align: left;
    position: relative;
    min-width: 180px;
  }
  .pix-flag {
    position: absolute;
    top: 0;
    left: 0;
    background: #ff4d4d;
    color: #fff;
    font-size: 0.85em;
    font-weight: 700;
    padding: 5px 10px;
    border-radius: 0 0 8px 0;
  }
  .days-nights {
    font-size: 1.1em;
    color: #333;
    font-weight: 600;
    margin-top: 15px;
  }
  .price-starting {
    font-size: 1.4em;
    color: #333;
    font-weight: 700;
    margin-bottom: 3px;
  }
  .ten-installments {
    font-size: 0.95em;
    color: #555;
  }
  .btn-options {
    display: inline-block;
    margin-top: 12px;
    padding: 12px 24px;
    background-color: #007aff;
    color: #fff;
    border-radius: 10px;
    font-size: 1em;
    text-align: center;
    cursor: pointer;
    transition: background-color 0.3s ease;
    border: none;
  }
  .btn-options:hover {
    background-color: #005bb5;
  }

  /* BOTÃO FILTRAR (MOBILE) */
  .mobile-filter-toggle {
    display: none;
    background-color: #0e65e0;
    color: #fff;
    padding: 0.6rem 1rem;
    border: none;
    border-radius: 0.4rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    margin-bottom: 1rem;
  }

  /* MEDIA QUERIES */
  @media (max-width: 1024px) {
    .hotel-price {
      min-width: 160px;
    }
  }
  @media (max-width: 768px) {
    .search-container {
      padding: 1rem;
    }
    .filters-panel {
      display: none;
      position: fixed;
      top: 0;
      right: 0;
      width: 80%;
      max-width: 300px;
      height: 100%;
      z-index: 999;
      box-shadow: -2px 0 8px rgba(0, 0, 0, 0.2);
      overflow-y: auto;
      transform: translateX(100%);
    }
    .filters-panel.active {
      transform: translateX(0);
      display: block;
    }
    .results-container {
      flex-direction: column;
    }
    .mobile-filter-toggle {
      display: block;
    }
  }
  @media (max-width: 480px) {
    .hotel-name {
      font-size: 1.3em;
    }
    .hotel-address {
      font-size: 0.9em;
    }
    .search-button {
      padding: 10px 20px;
      height: auto;
      font-size: 14px;
    }
    .btn-options {
      padding: 8px 16px;
      font-size: 0.9em;
    }
  }
