/* ===========================================================
   A Rosa e o Rei - Motor de Reservas (site publico)
   Estilo proprio, independente do painel administrativo:
   editorial, claro, serifado nos titulos, rapido de carregar.
   =========================================================== */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,400;9..144,600;9..144,700&family=Inter:wght@400;500;600;700&family=IBM+Plex+Mono:wght@500;600&display=swap');

:root {
  --ink: #1a1a1c;
  --ink-soft: #6b6b73;
  --bg: #ffffff;
  --card: #ffffff;
  --card-line: #e6e4de;
  --raised: #f6f5f1;
  --accent: #2563eb;
  --accent-soft: rgba(37,99,235,0.08);
  --accent-line: rgba(37,99,235,0.3);
  --on-accent: #ffffff;
  --gold: #b8862f;
  --ok: #1e8a4c;
  --erro: #c8462f;
  --shadow: 0 20px 50px rgba(20,20,20,0.10);
  --radius: 16px;
  --radius-sm: 10px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--ink);
  font-family: 'Inter', system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
h1, h2, h3 { font-family: 'Fraunces', serif; font-weight: 600; margin: 0; letter-spacing: -0.01em; }
p { margin: 0; line-height: 1.6; }
button { font-family: inherit; cursor: pointer; }
input { font-family: inherit; }
.mono { font-family: 'IBM Plex Mono', monospace; }

@keyframes floatSlow { 0%, 100% { transform: translate(0,0) scale(1); } 50% { transform: translate(0,-22px) scale(1.03); } }
@keyframes floatSlower { 0%, 100% { transform: translate(0,0) scale(1); } 50% { transform: translate(24px,16px) scale(1.06); } }
@keyframes fadeInUp { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes shimmer { 0% { background-position: -400px 0; } 100% { background-position: 400px 0; } }
@keyframes popCheck { 0% { transform: scale(0.6); opacity: 0; } 60% { transform: scale(1.08); opacity: 1; } 100% { transform: scale(1); } }

/* ---------- TOPO ---------- */
.topo {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px clamp(20px, 5vw, 64px);
  background: rgba(255,255,255,0.78);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--card-line);
}
.topo-marca { display: flex; align-items: center; gap: 12px; }
.topo-marca img { height: 34px; width: auto; }
.topo-marca span { font-family: 'Fraunces', serif; font-size: 18px; }
.topo a.voltar {
  color: var(--ink-soft); text-decoration: none; font-size: 14px;
  border: 1px solid var(--card-line); padding: 8px 16px; border-radius: 999px;
  transition: border-color 0.2s ease, color 0.2s ease;
}
.topo a.voltar:hover { border-color: var(--accent-line); color: var(--ink); }

/* ---------- HERO ---------- */
.hero {
  position: relative;
  padding: clamp(56px, 10vw, 108px) clamp(20px, 5vw, 64px) 40px;
  overflow: hidden;
  text-align: center;
}
.hero .blob {
  position: absolute; border-radius: 50%; filter: blur(80px); opacity: 0.22; z-index: 0;
}
.hero .blob-1 { width: 420px; height: 420px; background: var(--accent); top: -140px; left: -100px; animation: floatSlow 16s ease-in-out infinite; }
.hero .blob-2 { width: 360px; height: 360px; background: var(--gold); top: -60px; right: -120px; animation: floatSlower 20s ease-in-out infinite; }
.hero-conteudo { position: relative; z-index: 1; max-width: 720px; margin: 0 auto; animation: fadeInUp 0.8s ease both; }
.hero-conteudo .eyebrow {
  display: inline-block; font-size: 13px; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 18px; font-weight: 600;
}
.hero-conteudo h1 { font-size: clamp(32px, 5.5vw, 56px); line-height: 1.08; }
.hero-conteudo p.sub { margin-top: 18px; color: var(--ink-soft); font-size: clamp(15px, 2vw, 18px); }

/* ---------- BUSCA ---------- */
.busca-card {
  position: relative; z-index: 2;
  max-width: 980px; margin: 44px auto 0;
  background: var(--card);
  border: 1px solid var(--card-line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: clamp(18px, 3vw, 28px);
  animation: fadeInUp 0.9s 0.1s ease both;
}
.busca-grade {
  display: grid;
  grid-template-columns: repeat(4, 1fr) auto;
  gap: 14px;
  align-items: end;
}
@media (max-width: 860px) { .busca-grade { grid-template-columns: 1fr 1fr; } }
.campo { text-align: left; position: relative; }
.campo label {
  display: block; font-size: 12px; text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--ink-soft); margin-bottom: 8px;
}
.input-data {
  width: 100%; background: var(--raised); border: 1px solid var(--card-line); color: var(--ink);
  border-radius: var(--radius-sm); padding: 12px 14px; font-size: 14px; cursor: pointer;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.input-data:focus { outline: none; border-color: var(--accent-line); box-shadow: 0 0 0 3px var(--accent-soft); }
.input-data::placeholder { color: var(--ink-soft); }

/* ---------- CALENDARIO CUSTOMIZADO ---------- */
.calendario-painel {
  position: fixed; z-index: 200;
  width: 280px; background: var(--card); border: 1px solid var(--card-line); border-radius: var(--radius-sm);
  box-shadow: var(--shadow); padding: 14px;
  animation: fadeInUp 0.2s ease both;
}
.calendario-cabecalho { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.calendario-cabecalho .cal-mes-ano { font-family: 'Fraunces', serif; font-size: 15px; font-weight: 600; }
.cal-nav {
  width: 28px; height: 28px; border-radius: 50%; border: 1px solid var(--card-line);
  background: transparent; color: var(--ink); font-size: 16px; line-height: 1;
  transition: background 0.2s ease, border-color 0.2s ease;
}
.cal-nav:hover { background: var(--accent-soft); border-color: var(--accent-line); }
.calendario-semana, .calendario-dias { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.calendario-semana { margin-bottom: 4px; }
.calendario-semana span { text-align: center; font-size: 11px; color: var(--ink-soft); font-weight: 600; }
.cal-dia {
  aspect-ratio: 1; border: none; background: transparent; border-radius: 50%;
  font-size: 13px; color: var(--ink); cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}
.cal-dia:hover:not(:disabled) { background: var(--accent-soft); color: var(--accent); }
.cal-dia.hoje { border: 1px solid var(--accent-line); }
.cal-dia.selecionado { background: var(--accent); color: var(--on-accent); font-weight: 600; }
.cal-dia:disabled { color: var(--card-line); cursor: default; }
.stepper {
  display: flex; align-items: center; justify-content: space-between;
  background: var(--raised); border: 1px solid var(--card-line); border-radius: var(--radius-sm);
  padding: 6px 8px;
}
.stepper button {
  width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--card-line);
  background: transparent; color: var(--ink); font-size: 16px; line-height: 1;
  transition: background 0.2s ease, border-color 0.2s ease;
}
.stepper button:hover { background: var(--accent-soft); border-color: var(--accent-line); }
.stepper span { font-family: 'IBM Plex Mono', monospace; font-size: 14px; }
.btn-buscar {
  background: var(--accent); color: var(--on-accent); border: none; border-radius: var(--radius-sm);
  padding: 13px 26px; font-weight: 600; font-size: 14px; white-space: nowrap;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}
.btn-buscar:hover { transform: translateY(-2px); box-shadow: 0 10px 28px rgba(37,99,235,0.28); }
.btn-buscar:disabled { opacity: 0.6; cursor: default; transform: none; box-shadow: none; }
.busca-erro { color: var(--erro); font-size: 13px; margin-top: 12px; text-align: left; min-height: 18px; }

.info-rapida {
  width: 100%; max-width: 980px;
  display: flex; flex-wrap: wrap; justify-content: center; gap: 8px;
}

/* ---------- RESULTADOS ---------- */
.resultados { padding: 20px clamp(20px, 5vw, 64px) 100px; max-width: 1240px; margin: 0 auto; }
.resultados-header { text-align: center; margin-bottom: 34px; }
.resultados-header h2 { font-size: clamp(24px, 3.5vw, 32px); }
.resultados-header p { color: var(--ink-soft); margin-top: 10px; }
.grupos-quartos { display: flex; flex-direction: column; gap: 40px; }
.grupo-categoria { animation: fadeInUp 0.6s ease both; }
.grupo-titulo {
  font-size: clamp(19px, 2.4vw, 23px); margin-bottom: 18px;
  padding-bottom: 10px; border-bottom: 1px solid var(--card-line);
}
.grade-quartos { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 22px; }

.skeleton {
  height: 340px; border-radius: var(--radius); background: linear-gradient(90deg, #f2f1ec 0%, #e8e6df 50%, #f2f1ec 100%);
  background-size: 800px 100%; animation: shimmer 1.4s infinite linear;
  border: 1px solid var(--card-line);
}

.quarto-card {
  background: var(--card); border: 1px solid var(--card-line); border-radius: var(--radius);
  overflow: hidden; display: flex; flex-direction: column; cursor: pointer;
  opacity: 0; animation: fadeInUp 0.6s ease forwards;
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}
.quarto-card:hover { transform: translateY(-6px); border-color: var(--accent-line); box-shadow: 0 18px 40px rgba(20,20,20,0.12); }
.quarto-card.indisponivel { opacity: 0.55 !important; }
.quarto-card.indisponivel:hover { transform: none; box-shadow: none; }

.quarto-foto {
  height: 180px; position: relative;
  background: linear-gradient(135deg, #f2f0ea, #e6e3da);
  display: flex; align-items: center; justify-content: center;
}
.quarto-foto img { width: 100%; height: 100%; object-fit: cover; }
.quarto-foto .inicial { font-family: 'Fraunces', serif; font-size: 40px; color: var(--accent); opacity: 0.45; }
.quarto-categoria-tag {
  position: absolute; top: 12px; left: 12px; background: rgba(255,255,255,0.85);
  border: 1px solid var(--card-line); color: var(--ink); font-size: 11px; letter-spacing: 0.04em;
  text-transform: uppercase; padding: 5px 10px; border-radius: 999px;
}
.tag-indisponivel {
  position: absolute; top: 12px; right: 12px; background: var(--erro); color: #ffffff;
  font-size: 11px; font-weight: 600; padding: 5px 10px; border-radius: 999px;
}

.quarto-corpo { padding: 18px 20px 20px; display: flex; flex-direction: column; gap: 12px; flex: 1; }
.quarto-corpo h3 { font-size: 19px; }
.quarto-corpo .descricao { color: var(--ink-soft); font-size: 13.5px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  font-size: 11.5px; padding: 4px 10px; border-radius: 999px; background: var(--accent-soft);
  color: var(--accent); border: 1px solid var(--accent-line);
}
.quarto-rodape {
  margin-top: auto; display: flex; align-items: center; justify-content: space-between;
  padding-top: 12px; border-top: 1px dashed var(--card-line);
}
.quarto-preco .valor { font-family: 'IBM Plex Mono', monospace; font-size: 18px; font-weight: 600; }
.quarto-preco .por-noite { font-size: 11px; color: var(--ink-soft); }
.btn-reservar {
  background: var(--accent); color: var(--on-accent); border: none; border-radius: var(--radius-sm);
  padding: 10px 18px; font-weight: 600; font-size: 13.5px;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.btn-reservar:hover { transform: translateY(-2px); box-shadow: 0 8px 22px rgba(37,99,235,0.25); }
.btn-reservar:disabled { background: #e6e4de; color: var(--ink-soft); cursor: default; transform: none; box-shadow: none; }

.vazio { text-align: center; padding: 60px 20px; color: var(--ink-soft); }

/* ---------- MODAL ---------- */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(20,20,18,0.45); backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center; padding: 20px; z-index: 100;
  opacity: 0; pointer-events: none; transition: opacity 0.25s ease;
}
.modal-overlay.aberto { opacity: 1; pointer-events: auto; }
.modal {
  position: relative;
  width: 100%; max-width: 620px; max-height: 88vh; overflow-y: auto;
  background: var(--card); border: 1px solid var(--card-line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 26px;
  transform: translateY(24px) scale(0.98); opacity: 0;
  transition: transform 0.3s cubic-bezier(.2,.8,.2,1), opacity 0.3s ease;
}
.modal-overlay.aberto .modal { transform: translateY(0) scale(1); opacity: 1; }
.modal-topo { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.modal-topo h3 { font-size: 20px; }
.btn-fechar {
  background: transparent; border: 1px solid var(--card-line); color: var(--ink-soft);
  width: 30px; height: 30px; border-radius: 50%; font-size: 15px; flex-shrink: 0;
  transition: border-color 0.2s ease, color 0.2s ease;
}
.btn-fechar:hover { border-color: var(--accent-line); color: var(--ink); }
.resumo-estadia {
  margin-top: 16px; background: var(--raised); border: 1px solid var(--card-line); border-radius: var(--radius-sm);
  padding: 14px 16px; display: flex; flex-direction: column; gap: 6px; font-size: 13.5px;
}
.resumo-linha { display: flex; justify-content: space-between; color: var(--ink-soft); }
.resumo-linha strong { color: var(--ink); font-weight: 600; }
.resumo-linha.total { border-top: 1px dashed var(--card-line); padding-top: 8px; margin-top: 4px; }
.resumo-linha.total strong { font-family: 'IBM Plex Mono', monospace; font-size: 16px; }

.galeria-principal {
  position: relative; height: 300px; border-radius: var(--radius-sm); overflow: hidden;
  background: linear-gradient(135deg, #f2f0ea, #e6e3da);
  display: flex; align-items: center; justify-content: center;
}
.galeria-principal img { width: 100%; height: 100%; object-fit: cover; }
.galeria-principal .inicial { font-family: 'Fraunces', serif; font-size: 48px; color: var(--accent); opacity: 0.45; }
.galeria-nav button {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 32px; height: 32px; border-radius: 50%; border: 1px solid var(--card-line);
  background: rgba(255,255,255,0.9); color: var(--ink); font-size: 18px; line-height: 1;
  transition: background 0.2s ease;
}
.galeria-nav button:hover { background: #fff; }
.galeria-nav .prev { left: 10px; }
.galeria-nav .next { right: 10px; }
.galeria-dots { display: flex; justify-content: center; gap: 6px; margin-top: 10px; }
.galeria-dots button {
  width: 7px; height: 7px; border-radius: 50%; background: var(--card-line); border: none; padding: 0;
  transition: background 0.2s ease, transform 0.2s ease;
}
.galeria-dots button.ativo { background: var(--accent); transform: scale(1.3); }

.form-reserva { margin-top: 18px; display: flex; flex-direction: column; gap: 12px; }
.form-reserva label { font-size: 12px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--ink-soft); }
.form-reserva input {
  width: 100%; margin-top: 6px; background: var(--raised); border: 1px solid var(--card-line); color: var(--ink);
  border-radius: var(--radius-sm); padding: 11px 13px; font-size: 14px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.form-reserva input:focus { outline: none; border-color: var(--accent-line); box-shadow: 0 0 0 3px var(--accent-soft); }
.linha-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.pagamento-opcoes { display: flex; gap: 10px; margin-top: 6px; }
.pagamento-opcao {
  flex: 1; display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 12px; border: 1px solid var(--card-line); border-radius: var(--radius-sm);
  background: var(--raised); font-size: 13.5px; font-weight: 500; text-transform: none;
  letter-spacing: normal; color: var(--ink); cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease;
}
.pagamento-opcao input { width: auto; margin: 0; }
.pagamento-opcao:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }
.aviso-pagamento {
  font-size: 12.5px; color: var(--ink-soft); background: var(--accent-soft); border: 1px solid var(--accent-line);
  border-radius: var(--radius-sm); padding: 10px 12px;
}
.form-erro { color: var(--erro); font-size: 13px; min-height: 16px; }
.btn-confirmar {
  background: var(--accent); color: var(--on-accent); border: none; border-radius: var(--radius-sm);
  padding: 13px; font-weight: 700; font-size: 14.5px; margin-top: 4px;
  transition: transform 0.18s ease, box-shadow 0.18s ease, opacity 0.18s ease;
}
.btn-confirmar:hover { transform: translateY(-2px); box-shadow: 0 10px 26px rgba(37,99,235,0.28); }
.btn-confirmar:disabled { opacity: 0.6; transform: none; box-shadow: none; }

.confirmacao { text-align: center; padding: 10px 0 4px; }
.confirmacao .check {
  width: 64px; height: 64px; border-radius: 50%; background: var(--ok); color: #ffffff;
  display: flex; align-items: center; justify-content: center; margin: 0 auto 18px;
  font-size: 30px; animation: popCheck 0.5s cubic-bezier(.2,.8,.2,1) both;
}
.confirmacao h3 { font-size: 22px; margin-bottom: 6px; }
.confirmacao .numero { color: var(--accent); font-family: 'IBM Plex Mono', monospace; font-size: 15px; margin-bottom: 18px; }
.confirmacao .btn-confirmar { max-width: 220px; margin: 22px auto 0; }

/* ---------- RODAPE ---------- */
.rodape {
  margin-top: auto;
  border-top: 1px solid var(--card-line); padding: 24px clamp(20px, 5vw, 64px) 28px;
  display: flex; flex-direction: column; align-items: center; gap: 16px;
  color: var(--ink-soft); font-size: 13px;
}
.rodape a { color: var(--ink-soft); }
.rodape-linha {
  width: 100%; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px;
}

.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.in-view { opacity: 1; transform: translateY(0); }

@media (max-width: 520px) {
  .linha-2 { grid-template-columns: 1fr; }
  .busca-grade { grid-template-columns: 1fr 1fr; }
}
