/* ===============================
   Responsive System
   =============================== */
:root {
  --container-gutter: clamp(1rem, 3vw, 2rem);
  --section-spacing: clamp(2.75rem, 6vw, 4.5rem);
}

body {
  overflow-x: hidden;
}

.container,
.navegacao-principal {
  width: min(1100px, calc(100vw - (var(--container-gutter) * 2)));
  padding-left: 0;
  padding-right: 0;
}

.secao-conteudo {
  padding-block: var(--section-spacing);
}

h2,
.titulo-confirmacao,
.titulo-recados {
  font-size: clamp(1.9rem, 4vw, 2.6rem);
  line-height: 1.15;
  text-wrap: balance;
}

p.intro-secao,
#intro-presentes,
#intro-confirmacao,
#texto-casal {
  max-width: min(68ch, 100%);
  margin-left: auto;
  margin-right: auto;
  overflow-wrap: anywhere;
}

.menu-nav {
  flex-wrap: wrap;
  justify-content: center;
}

.botao,
.resultado-nome,
.item-resumo-checkout,
.nome-item {
  overflow-wrap: anywhere;
}

.botoes-destaque {
  flex-wrap: wrap;
  justify-content: center;
}

.botoes-destaque .botao {
  text-align: center;
}

.detalhes-evento,
.checkout-layout {
  align-items: start;
}

.mapa-evento,
.foto-cerimonia,
.video-player,
.cartao-presente,
.cartao-busca-confirmacao,
.cartao-recado,
.checkout-box,
.carrinho-box,
.checkout-formulario,
.resumo-compra,
.item-carrinho,
.valor-acao-carrinho,
.checkout-acoes,
.pix-acoes,
.item-evento {
  min-width: 0;
}

.mapa-evento {
  aspect-ratio: 16 / 10;
  height: auto;
  min-width: 0;
}

.lista-presentes {
  grid-template-columns: repeat(3, minmax(240px, 240px));
  justify-content: center;
  gap: 20px;
}

.cartao-presente,
.presente.center-block {
  width: 240px;
  max-width: 240px;
  height: 420px;
  padding: 16px;
}

.cartao-presente h3,
.presente.center-block h3,
.presente.center-block .nome-presente,
.presente.center-block .titulo-presente {
  font-size: 16px;
  line-height: 1.28;
}

.cartao-presente img,
.presente.center-block img {
  height: 208px;
}

.cartao-presente .card-presente__preco,
.presente.center-block .preco-presente,
.presente.center-block .preco,
.presente.center-block [class*="preco"] {
  font-size: 20px;
}

.input-checkout,
.textarea-checkout,
.entrada-confirmacao,
.guest-field input,
.guest-field select,
#input-validacao-telefone {
  width: 100%;
  max-width: 100%;
}

.selecao-formulario {
  width: auto;
  max-width: 100%;
}

.textarea-checkout,
.entrada-recado {
  overflow-wrap: anywhere;
}

.modal-pagamento-box,
.modal-pix-form,
.modal-cartao-form,
.pix-modal,
.cartao-preview-modal {
  width: min(100%, 720px);
  max-width: calc(100vw - 1rem);
}

.grid-cartoes {
  overscroll-behavior-x: contain;
}

@media (min-width: 1025px) {
  .detalhes-evento {
    grid-template-columns: minmax(320px, 0.92fr) minmax(420px, 1.08fr);
    gap: clamp(1.75rem, 3vw, 2.5rem);
    align-items: stretch;
  }

  .info-evento {
    display: flex;
    flex-direction: column;
    justify-content: center;
  }

  .mapa-evento {
    width: 100%;
    max-width: 640px;
    min-height: 420px;
    margin-left: auto;
    aspect-ratio: auto;
  }
}

@media (max-width: 1024px) {
  .navegacao-principal {
    justify-content: center;
  }

  .marca-nav {
    position: absolute;
    left: 0;
    margin-right: 0;
  }

  .menu-nav {
    flex-wrap: nowrap;
    max-width: none;
    justify-content: center;
    gap: 0.65rem;
    row-gap: 0.4rem;
  }

  .menu-nav a {
    font-size: 0.74rem;
    letter-spacing: 0.08em;
    overflow-wrap: normal;
    word-break: normal;
    white-space: nowrap;
  }

  .detalhes-evento {
    grid-template-columns: 1fr;
    gap: 1.5rem;
    padding: clamp(1.25rem, 3vw, 2rem);
  }

  .info-evento {
    min-width: 0;
  }

  .mapa-evento {
    aspect-ratio: 16 / 9;
  }

  .checkout-layout {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }

  .checkout-box,
  .carrinho-box,
  .cartao-busca-confirmacao,
  .cartao-recado {
    padding: clamp(1.1rem, 3vw, 1.8rem);
  }
}

@media (max-width: 768px) {
  :root {
    --container-gutter: 1rem;
  }

  .btn-topo-mobile {
    position: fixed;
    right: 1rem;
    bottom: calc(1rem + env(safe-area-inset-bottom, 0px));
    width: 48px;
    height: 48px;
    border: 0;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #5f544d;
    color: #fff;
    box-shadow: 0 14px 30px rgba(95, 84, 77, 0.22);
    opacity: 0;
    pointer-events: none;
    transform: translateY(14px);
    transition:
      opacity 0.22s ease,
      transform 0.22s ease,
      box-shadow 0.22s ease,
      background-color 0.22s ease;
    z-index: 90;
  }

  .btn-topo-mobile span {
    font-size: 1.2rem;
    line-height: 1;
    font-weight: 700;
  }

  .btn-topo-mobile.is-visible {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
  }

  .btn-topo-mobile:active {
    background: #4f4640;
    box-shadow: 0 10px 20px rgba(95, 84, 77, 0.2);
  }

  .cabecalho-principal {
    padding-inline: 0;
  }

  .navegacao-principal {
    width: min(100%, calc(100vw - 2rem));
  }

  .marca-nav {
    position: static;
    margin-right: auto;
  }

  .menu-nav {
    max-width: none;
    justify-content: flex-start;
    align-content: flex-start;
    background-color: #fff;
  }

  .menu-nav-top {
    background: #fff;
  }

  .destaque {
    min-height: auto;
  }

  .titulo-destaque {
    font-size: clamp(2.9rem, 12vw, 4.1rem);
    line-height: 0.95;
  }

  .data-destaque {
    font-size: clamp(1.35rem, 5vw, 2rem);
  }

  .local-rd {
    font-size: clamp(1rem, 4vw, 1.35rem);
  }

  .titulo-contagem-hero {
    font-size: clamp(2rem, 8vw, 3rem);
  }

  .botoes-destaque {
    flex-direction: column;
    width: 100%;
    max-width: 300px;
  }

  .botoes-destaque .botao {
    width: 100%;
    min-height: 54px;
  }

  .cabecalho-casal {
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
  }

  .foto-circular {
    width: 160px;
    height: 160px;
  }

  .galeria-cerimonia {
    gap: 0.9rem;
  }

  .info-evento,
  .info-evento h3 {
    text-align: left;
  }

  .item-evento {
    flex-direction: row;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 0.8rem;
    padding: 0.9rem 1rem;
  }

  .icone-evento {
    width: 42px;
    height: 42px;
    border-radius: 13px;
    flex: 0 0 42px;
  }

  .texto-evento {
    flex: 1;
    min-width: 0;
    text-align: left;
  }

  .texto-evento strong,
  .texto-evento span {
    overflow-wrap: anywhere;
  }

  .texto-evento strong {
    font-size: 1rem;
    margin-bottom: 0.15rem;
  }

  .texto-evento span {
    font-size: 0.98rem;
    line-height: 1.45;
  }

  .acao-local {
    margin-top: 0.65rem;
  }

  #link-local-evento {
    margin: 0;
    width: 100%;
    justify-content: center;
  }

  .lista-presentes {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    justify-content: stretch;
  }

  .lista-presentes > .cartao-presente,
  .lista-presentes > .presente.center-block {
    width: 100%;
    max-width: none;
    justify-self: stretch;
    height: auto;
    min-height: 0;
  }

  .controles-presentes,
  .ordenacao-presentes {
    width: 100%;
  }

  .resultado-resumo,
  .resultado-nova-link {
    max-width: 100%;
  }

  .resultados-confirmacao {
    width: 100%;
    max-width: 100%;
    gap: 0.72rem;
  }

  .item-resultado {
    max-width: 100%;
    padding: 0.92rem 0.85rem 0.88rem 0.95rem;
    border-radius: 14px;
  }

  .item-resultado::before {
    top: 10px;
    bottom: 10px;
    width: 3px;
  }

  .resultado-nome {
    font-size: 1.03rem;
    padding-left: 0.3rem;
  }

  .resultado-telefone {
    font-size: 0.88rem;
    padding-left: 0.3rem;
  }

  .resultado-acao.botao-pequeno {
    margin-left: 0.3rem;
    min-height: 36px;
  }

  .valor-acao-carrinho {
    width: 100%;
    flex-wrap: wrap;
    gap: 0.65rem;
  }

  .checkout-acoes,
  .acoes-carrinho,
  .pix-acoes {
    flex-direction: column;
    align-items: stretch;
    gap: 0.65rem;
  }

  .cartao-presente .botao,
  .cartao-presente .btn-add-presente,
  .checkout-btn,
  .acoes-carrinho .botao,
  .pix-acoes .botao {
    width: 100%;
    max-width: none;
  }

  .checkout-espaco {
    display: none;
  }

  .compra-segura-img--checkout,
  .compra-segura-img--rodape,
  .compra-segura-img--form {
    width: min(100%, 240px);
  }

  .modal-pagamento-overlay,
  .pix-overlay {
    align-items: center;
    padding: 0.5rem;
  }

  .modal-pagamento-box,
  .modal-pix-form,
  .modal-cartao-form,
  .pix-modal {
    width: min(100%, 560px);
    max-height: calc(100dvh - 1rem - env(safe-area-inset-bottom));
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
  }

  .modal-pix-form .entrada-confirmacao,
  .modal-cartao-form .entrada-confirmacao,
  .modal-cartao-form .pix-campos label,
  .modal-pix-form .pix-campos label,
  .modal-cartao-form .pix-termo,
  .modal-pix-form .pix-termo,
  .modal-cartao-form .pix-campos,
  .modal-pix-form .pix-campos {
    text-align: left;
  }

  .video-range {
    display: block !important;
    flex: 1;
    min-width: 0;
    height: 6px;
  }

  .video-volume {
    display: none !important;
  }

  .video-controls {
    justify-content: flex-start;
    gap: 0.5rem;
    padding: 0.58rem 0.72rem;
    background: linear-gradient(
      180deg,
      rgba(0, 0, 0, 0) 0%,
      rgba(0, 0, 0, 0.74) 100%
    );
  }

  .video-toggle {
    width: 34px;
    height: 34px;
  }

  .video-time {
    margin-left: auto;
    min-width: 42px;
    font-size: 0.88rem;
    text-align: right;
  }
}

@media (max-width: 640px) {
  .linha-tempo-casal {
    padding-left: 0;
    padding-right: 0;
  }

  .linha-tempo-casal::before {
    left: 50%;
    transform: translateX(-50%);
  }

  .linha-tempo-item,
  .linha-tempo-item:nth-child(even) {
    grid-template-columns: minmax(110px, 1fr) 34px minmax(110px, 1fr);
    gap: 0.45rem;
    min-height: 110px;
    align-items: center;
    margin-bottom: 0.35rem;
  }

  .linha-tempo-centro {
    grid-column: 2;
    grid-row: auto;
    justify-content: center;
    padding-top: 0;
  }

  .linha-tempo-lado--icone,
  .linha-tempo-lado--texto {
    grid-column: auto;
    max-width: 100%;
    justify-content: center;
    text-align: center;
  }

  .linha-tempo-lado--icone {
    order: 0;
  }

  .linha-tempo-lado--texto {
    order: 0;
  }

  .linha-tempo-ponto {
    width: 16px;
    height: 16px;
    border-width: 3px;
  }

  .linha-tempo-icone {
    width: clamp(46px, 15vw, 64px);
    height: clamp(46px, 15vw, 64px);
  }

  .linha-tempo-lado--texto h4 {
    font-size: clamp(1.02rem, 4.4vw, 1.3rem);
  }

  .linha-tempo-lado--texto p {
    font-size: clamp(0.84rem, 3.7vw, 1rem);
    line-height: 1.2;
  }

  .linha-tempo-item--final {
    min-height: 72px;
  }

  .linha-tempo-final {
    text-align: center;
  }
}

@media (max-width: 480px) {
  .container,
  .navegacao-principal {
    width: min(100%, calc(100vw - 1.25rem));
  }

  .destaque {
    min-height: 100dvh;
    padding-top: calc(112px + env(safe-area-inset-top, 0px));
    padding-bottom: 38px;
  }

  .titulo-destaque {
    font-size: clamp(2.95rem, 13vw, 3.35rem);
  }

  .titulo-contagem-hero {
    font-size: 2.6rem;
  }

  .data-destaque {
    font-size: 1.9rem;
  }

  .local-rd {
    font-size: 1.2rem;
  }

  .detalhes-evento {
    padding: 1rem 0.85rem;
    gap: 1rem;
  }

  .item-evento {
    gap: 0.7rem;
    padding: 0.8rem 0.85rem;
    border-radius: 12px;
  }

  .icone-evento {
    width: 38px;
    height: 38px;
    flex-basis: 38px;
  }

  .texto-evento strong {
    font-size: 0.95rem;
  }

  .texto-evento span {
    font-size: 0.92rem;
    line-height: 1.4;
  }

  .lista-presentes {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.6rem;
  }

  .cartao-presente,
  .presente.center-block {
    padding: 0.58rem 0.52rem 0.58rem;
  }

  .cartao-presente h3,
  .presente.center-block h3,
  .presente.center-block .nome-presente,
  .presente.center-block .titulo-presente {
    font-size: 0.9rem;
  }

  .cartao-presente .card-presente__preco,
  .presente.center-block .preco-presente,
  .presente.center-block .preco,
  .presente.center-block [class*="preco"] {
    font-size: 1rem;
  }

  .cartao-presente img,
  .presente.center-block img {
    height: 106px;
  }

  .container-contagem {
    margin-bottom: 1.4rem;
  }

  .temporizador-contagem {
    flex-wrap: nowrap;
    gap: 0.55rem;
  }

  .cartao-contagem {
    width: clamp(60px, 18vw, 68px);
    height: clamp(60px, 18vw, 68px);
    margin: 0;
  }

  .cartao-contagem span:first-child {
    font-size: 1.35rem;
    margin-bottom: 0.15rem;
  }

  .cartao-contagem .rotulo {
    font-size: 0.5rem;
    letter-spacing: 0.02em;
    padding: 0 2px;
  }

  .modal-pagamento-overlay,
  .pix-overlay,
  .cartao-preview-overlay {
    padding: 0.4rem;
  }
}

@media (min-width: 481px) and (max-width: 767px) {
  .lista-presentes {
    grid-template-columns: repeat(2, minmax(210px, 210px));
    justify-content: center;
  }
}

@media (min-width: 768px) and (max-width: 1024px) {
  .lista-presentes {
    grid-template-columns: repeat(3, minmax(220px, 220px));
    justify-content: center;
  }
}

@media (min-width: 769px) {
  .btn-topo-mobile {
    display: none !important;
  }

  .menu-nav {
    flex-wrap: nowrap;
  }
}
