/* Catálogo interativo — tela cheia responsiva */

:root {
  --yellow: #efce33;
  --green: #00c853;
  --black: #111;
  --text: #f5f5f5;
  --muted: #aaa;
  --header-h: 64px;
  --footer-h: 72px;
  --resumo-w: min(280px, 28vw);
  --ar-w: 763;
  --ar-h: 1363;
  /* fim do cabeçalho na imagem (abaixo de "ETAPA N — …") */
  --page-header-end: 17.02%;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* loading removido — esconde versão antiga em cache no celular */
#catalogo-loading,
.catalogo-loading {
  display: none !important;
  visibility: hidden !important;
  height: 0 !important;
  overflow: hidden !important;
  padding: 0 !important;
  margin: 0 !important;
}

html, body.catalogo-page {
  width: 100%;
  max-width: 100%;
  min-height: 100%;
  min-height: 100dvh;
  overflow-x: clip;
  overflow-y: auto;
  overscroll-behavior-x: none;
  font-family: "Montserrat", "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background: #1a1a1a;
}

.catalogo-shell {
  width: 100%;
  max-width: 100%;
  min-height: 100dvh;
  overflow-x: clip;
  background: #1a1a1a;
  color: var(--text);
  display: flex;
  flex-direction: column;
  position: relative;
}

.catalogo-header {
  height: var(--header-h);
  min-height: var(--header-h);
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 20px;
  background: var(--black);
  border-bottom: 3px solid var(--yellow);
  flex-shrink: 0;
}

.catalogo-logo {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--yellow);
  flex-shrink: 0;
}

.catalogo-header-text { flex: 1; min-width: 0; }
.catalogo-header-text h1 {
  font-size: clamp(13px, 1.4vw, 16px);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.catalogo-header-text p {
  font-size: 11px;
  color: var(--muted);
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.catalogo-header-right {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.catalogo-lang-float {
  position: fixed;
  z-index: 400;
  display: flex;
  border: 2px solid var(--yellow);
  border-radius: 5px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.55);
  pointer-events: auto;
}

.catalogo-lang-float .lang-btn {
  padding: 0.35em 0.75em;
  font-family: inherit;
  font-size: clamp(9px, 1.1vw, 11px);
  font-weight: 800;
  letter-spacing: 0.06em;
  color: var(--yellow);
  background: rgba(17, 17, 17, 0.92);
  border: none;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.catalogo-lang-float .lang-btn + .lang-btn {
  border-left: 2px solid var(--yellow);
}

.catalogo-lang-float .lang-btn:hover {
  background: rgba(255, 210, 0, 0.15);
}

.catalogo-lang-float .lang-btn.active {
  background: var(--yellow);
  color: var(--black);
}

.catalogo-progress {
  display: flex;
  gap: 6px;
  align-items: center;
  flex-shrink: 0;
  margin-left: auto;
}

/* legado — removido do header */
.catalogo-lang {
  display: flex;
  border: 2px solid var(--yellow);
  border-radius: 6px;
  overflow: hidden;
  flex-shrink: 0;
}

.lang-btn {
  padding: 4px 10px;
  font-family: inherit;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: var(--yellow);
  background: transparent;
  border: none;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.lang-btn + .lang-btn {
  border-left: 2px solid var(--yellow);
}

.lang-btn:hover {
  background: rgba(255, 210, 0, 0.12);
}

.lang-btn.active {
  background: var(--yellow);
  color: var(--black);
}

.progress-dot {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 2px solid #555;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 800;
  color: #888;
}

.progress-dot.active {
  background: var(--green);
  border-color: var(--green);
  color: #fff;
}

.progress-dot.done {
  background: #444;
  border-color: var(--green);
  color: var(--green);
}

.catalogo-main {
  flex: 1;
  display: flex;
  min-height: 0;
  min-width: 0;
  overflow: hidden;
  width: 100%;
}

.catalogo-stage {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px 12px;
  min-width: 0;
  width: 100%;
  overflow: hidden;
}

.catalogo-image-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  position: relative;
}

.catalogo-page-frame {
  position: relative;
  width: min(
    calc(100% - 24px),
    calc((100dvh - var(--header-h) - var(--footer-h) - 16px) * 763 / 1363)
  );
  max-width: 100%;
  max-height: calc(100dvh - var(--header-h) - var(--footer-h) - 16px);
  margin: 0 auto;
  flex-shrink: 0;
  display: flex;
  justify-content: center;
}

.catalogo-page-inner {
  position: relative;
  width: 100%;
  line-height: 0;
}

.catalogo-page-inner img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

.catalogo-page-frame img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

#hotspots {
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: 8px;
}

.frame-nav {
  display: none;
}

.frame-nav.hidden {
  display: none !important;
}

.hotspot {
  position: absolute;
  pointer-events: auto;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  padding: 0;
  background: transparent;
}

.hotspot:hover {
  background: transparent;
}

.hotspot.selected {
  background: transparent;
}

.hotspot.selected::after {
  content: "";
  position: absolute;
  top: 10px;
  right: 10px;
  width: 30px;
  height: 30px;
  border-radius: 6px;
  background-color: var(--green);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 18px 18px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
  pointer-events: none;
}

.hotspot-bone.selected::after {
  top: 28px;
}

.hotspot-nav {
  border-color: transparent;
  background: rgba(239, 206, 51, 0);
}

.hotspot-nav:hover:not(:disabled) {
  background: rgba(239, 206, 51, 0.12);
  border-color: rgba(239, 206, 51, 0.45);
}

.hotspot-nav:disabled {
  pointer-events: none;
  cursor: default;
}

.hotspot-subpage-nav {
  border: none;
  background: rgba(239, 206, 51, 0.94);
  border-radius: 10px;
  color: #111;
  font-size: 32px;
  font-weight: 700;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 14px rgba(0, 0, 0, 0.4);
  padding: 0;
}

.hotspot-subpage-nav:hover {
  background: var(--yellow);
}

.catalogo-erro {
  padding: 24px 20px;
  text-align: center;
  color: #fff;
  font-size: 14px;
  line-height: 1.5;
}

.catalogo-erro strong {
  display: block;
  color: var(--yellow);
  margin-bottom: 8px;
}

.catalogo-resumo {
  width: var(--resumo-w);
  background: #222;
  border-left: 1px solid #333;
  padding: 14px 16px;
  overflow-y: auto;
  flex-shrink: 0;
}

.catalogo-resumo h2 {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--yellow);
  margin-bottom: 10px;
}

#resumo-list {
  list-style: none;
  font-size: 11px;
  line-height: 1.5;
}

#resumo-list li {
  padding: 6px 0;
  border-bottom: 1px solid #333;
  color: #ddd;
}

#resumo-list li span {
  display: block;
  color: var(--muted);
  font-size: 10px;
  margin-bottom: 2px;
}

.catalogo-footer {
  height: var(--footer-h);
  min-height: var(--footer-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  background: var(--black);
  border-top: 1px solid #333;
  flex-shrink: 0;
  gap: 16px;
}

.footer-selecao {
  font-size: clamp(11px, 1.2vw, 13px);
  font-weight: 600;
  color: #ccc;
  flex: 1;
  min-width: 0;
}

.footer-selecao strong { color: var(--yellow); }

.footer-actions {
  display: flex;
  gap: 10px;
  flex-shrink: 0;
}

.btn-cat {
  font-family: inherit;
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 12px 28px;
  border: 2px solid var(--black);
  border-radius: 4px;
  cursor: pointer;
  transition: transform 0.1s, opacity 0.15s;
}

.btn-cat:disabled { opacity: 0.4; cursor: not-allowed; }

.btn-voltar { background: #333; color: #eee; border-color: #555; }

.btn-continuar { background: var(--yellow); color: var(--black); }

.btn-continuar:not(:disabled):hover {
  transform: translateY(-1px);
  box-shadow: 3px 3px 0 var(--black);
}

.catalogo-contato {
  position: absolute;
  inset: var(--header-h) 0 0 0;
  background: rgba(0, 0, 0, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 20;
}

.catalogo-contato.hidden { display: none; }

.contato-card {
  width: min(560px, 92vw);
  max-height: calc(100vh - var(--header-h) - 32px);
  overflow-y: auto;
  background: var(--yellow);
  color: var(--black);
  border: 3px solid var(--black);
  border-radius: 8px;
  padding: 28px 32px;
  box-shadow: 8px 8px 0 var(--black);
}

.contato-card h2 {
  font-size: 18px;
  font-weight: 800;
  text-transform: uppercase;
  margin-bottom: 4px;
}

.contato-card p {
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 18px;
}

.contato-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 12px;
}

.contato-field-full {
  grid-column: 1 / -1;
}

.phone-hint {
  display: block;
  margin-top: 2px;
  font-size: 10px;
  font-weight: 600;
  text-transform: none;
  letter-spacing: 0;
  color: rgba(17, 17, 17, 0.72);
}

.contato-card label {
  display: block;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.contato-card input,
.contato-card textarea {
  display: block;
  width: 100%;
  margin-top: 4px;
  padding: 10px 12px;
  border: 2px solid var(--black);
  border-radius: 4px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
}

.phone-field {
  display: flex;
  align-items: stretch;
  margin-top: 4px;
  width: 100%;
}

.phone-country {
  position: relative;
  flex-shrink: 0;
}

.phone-country-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 100%;
  min-height: 44px;
  min-width: 88px;
  padding: 0 12px;
  border: 2px solid var(--black);
  border-right: none;
  border-radius: 4px 0 0 4px;
  background: #fff;
  cursor: pointer;
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  color: var(--black);
  box-shadow: inset 0 -2px 0 rgba(0, 0, 0, 0.06);
}

.phone-country-btn:hover {
  background: #fff9d6;
}

.phone-flag {
  width: 26px;
  height: 18px;
  border-radius: 2px;
  border: 1px solid rgba(0, 0, 0, 0.25);
  flex-shrink: 0;
  display: inline-block;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.15);
}

.phone-flag.flag-br {
  background:
    linear-gradient(33deg, transparent 42%, #ffdf00 42%, #ffdf00 58%, transparent 58%),
    #009c3b;
}

.phone-flag.flag-py {
  background:
    linear-gradient(180deg, #d52b1e 0 33%, #fff 33% 66%, #0038a8 66% 100%);
}

.phone-dial {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.phone-chevron {
  font-size: 10px;
  opacity: 0.7;
}

.phone-field input[type="tel"] {
  flex: 1;
  margin-top: 0;
  border-radius: 0 4px 4px 0;
  min-width: 0;
}

.phone-country-menu {
  position: absolute;
  top: calc(100% + 2px);
  left: 0;
  z-index: 40;
  list-style: none;
  margin: 0;
  padding: 0;
  background: #fff;
  border: 2px solid var(--black);
  border-radius: 4px;
  min-width: 170px;
  box-shadow: 4px 4px 0 var(--black);
  overflow: hidden;
}

.phone-country-menu.hidden { display: none; }

.phone-country-menu li {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
}

.phone-country-menu li:hover,
.phone-country-menu li:focus {
  background: var(--yellow);
  outline: none;
}

.contato-actions {
  margin-top: 16px;
  justify-content: flex-end;
  display: flex;
  gap: 10px;
}

.obrigado-page {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--black);
  width: 100vw;
  height: 100vh;
}

.obrigado-card {
  width: min(520px, 92vw);
  background: var(--yellow);
  color: var(--black);
  border: 3px solid var(--black);
  border-radius: 8px;
  padding: 32px;
  text-align: center;
  box-shadow: 8px 8px 0 #000;
}

.catalogo-logo-lg {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--black);
  margin-bottom: 16px;
}

.obrigado-card h1 {
  font-size: 22px;
  font-weight: 800;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.obrigado-resumo {
  text-align: left;
  margin: 20px 0;
  background: rgba(255, 255, 255, 0.5);
  border: 2px solid var(--black);
  border-radius: 4px;
  padding: 12px;
}

.obrigado-resumo h2 {
  font-size: 11px;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.obrigado-resumo pre {
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  white-space: pre-wrap;
}

.obrigado-card .btn-continuar {
  display: inline-block;
  text-decoration: none;
}

@media (max-width: 1024px) {
  :root {
    --resumo-w: 0px;
    --header-h: 56px;
    --footer-h: 68px;
  }

  .catalogo-resumo { display: none; }

  .catalogo-shell {
    height: 100dvh;
    max-height: 100dvh;
    overflow: hidden;
  }

  html, body.catalogo-page {
    overflow: hidden;
  }

  .catalogo-header {
    padding: 0 10px;
    gap: 8px;
  }

  .catalogo-header-text h1 { font-size: 12px; }
  .catalogo-header-text p { font-size: 10px; }

  .catalogo-progress { gap: 4px; }

  .catalogo-lang-float .lang-btn {
    padding: 0.3em 0.6em;
    font-size: clamp(8px, 2.4vw, 10px);
  }

  .catalogo-lang .lang-btn {
    padding: 3px 7px;
    font-size: 10px;
  }

  .progress-dot {
    width: 22px;
    height: 22px;
    font-size: 9px;
  }

  .catalogo-main {
    flex: 1;
    min-height: 0;
    overflow: hidden;
  }

  .catalogo-stage {
    padding: 4px 6px 6px;
    align-items: center;
    overflow: hidden;
  }

  .catalogo-image-wrap {
    width: 100%;
    height: auto;
    display: block;
    position: relative;
  }

  .catalogo-page-frame {
    width: 100%;
    max-width: 100%;
    max-height: calc(100dvh - var(--header-h) - var(--footer-h) - 12px);
    overflow: hidden;
  }

  .catalogo-footer {
    display: flex;
    flex-direction: column;
    justify-content: center;
    height: auto;
    min-height: var(--footer-h);
    padding: 8px 12px max(10px, env(safe-area-inset-bottom));
    gap: 0;
  }

  .footer-left {
    display: none;
  }

  .footer-actions {
    width: 100%;
    justify-content: space-between;
    gap: 10px;
  }

  .footer-actions .btn-cat {
    flex: 1;
    padding: 12px 10px;
    font-size: 12px;
    min-height: 44px;
  }

  .frame-nav {
    display: none !important;
  }

  .hotspot-nav {
    display: none;
  }

  .contato-grid { grid-template-columns: 1fr; }

  .contato-card {
    padding: 20px 16px;
    margin: 12px;
  }
}
