.generated-page {
  background: var(--bg);
  min-height: 100vh;
}

.generated-page .navbar {
  position: sticky;
}

.generated-page .nav-logo,
.generated-page .nav-logo a {
  height: 34px;
  display: flex;
  align-items: center;
}

.generated-page .nav-logo img {
  height: 34px !important;
  width: auto !important;
  max-width: none;
}

.generated-main {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 56px 0 96px;
}

.generated-hero {
  padding: 72px 0 40px;
}

.generated-hero.compact {
  max-width: 780px;
}

.eyebrow {
  color: var(--brand-green);
  font-family: 'Outfit', sans-serif;
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.generated-hero h1,
.detail-hero h1 {
  font-family: 'Outfit', sans-serif;
  font-size: clamp(2.3rem, 6vw, 5rem);
  line-height: 0.96;
  letter-spacing: 0;
  margin-bottom: 18px;
}

.generated-hero p,
.detail-hero p,
.generated-section p {
  color: var(--text2);
  line-height: 1.65;
  font-size: 1rem;
}

.listing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 18px;
}

.listing-card {
  display: flex;
  min-height: 320px;
  flex-direction: column;
  justify-content: flex-end;
  gap: 8px;
  text-decoration: none;
  color: var(--text);
  background: #18181b;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 8px;
  overflow: hidden;
  padding: 18px;
  transition: transform 0.2s, border-color 0.2s;
}

.listing-card:hover {
  transform: translateY(-4px);
  border-color: rgba(150,251,85,0.35);
}

.listing-media {
  min-height: 170px;
  margin: -18px -18px 14px;
  background: linear-gradient(135deg, var(--brand-purple), var(--brand-green));
  background-position: center;
  background-size: cover;
}

.listing-meta {
  color: var(--brand-green);
  font-size: 0.76rem;
  font-weight: 800;
  text-transform: uppercase;
}

.listing-card strong {
  font-family: 'Outfit', sans-serif;
  font-size: 1.3rem;
}

.listing-card span:last-child {
  color: var(--text3);
  font-size: 0.9rem;
  line-height: 1.45;
}

.brand-listing-card {
  min-height: 260px;
}

.brand-logo-wrap {
  display: flex;
  min-height: 130px;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
}

.brand-logo-wrap img {
  max-width: 150px;
  max-height: 92px;
  object-fit: contain;
}

.brand-logo-placeholder {
  background: rgba(150,251,85,0.12);
  border-radius: 8px;
  width: 100%;
}

.brand-initials {
  font-family: 'Outfit', sans-serif;
  font-size: 2.2rem;
  font-weight: 900;
  color: var(--brand-purple);
  letter-spacing: -0.02em;
}

.detail-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(260px, 0.9fr);
  gap: 36px;
  align-items: center;
  padding: 52px 0;
}

.detail-hero img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.1);
  background: #18181b;
}

/* Sem imagem de capa: coluna da direita vira bloco de gradiente */
.detail-hero.no-cover {
  grid-template-columns: minmax(0, 1.3fr) minmax(220px, 0.7fr);
}

.detail-hero-gradient {
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: 12px;
  opacity: 0.55;
}

@media (max-width: 760px) {
  .detail-hero-gradient {
    aspect-ratio: 16 / 5;
    opacity: 0.45;
    border-radius: 8px;
  }
}

.detail-location {
  margin-top: 14px;
  color: var(--brand-green) !important;
  font-weight: 800;
}

.detail-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 24px;
}

.generated-section {
  padding: 34px 0;
  border-top: 1px solid rgba(255,255,255,0.08);
}

.generated-section h2 {
  font-family: 'Outfit', sans-serif;
  font-size: 1.8rem;
  margin-bottom: 12px;
}

.image-strip {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 12px;
  margin-top: 24px;
}

.image-strip img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 8px;
  background: #18181b;
}

.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 10px;
}

.photo-tile {
  border: 0;
  padding: 0;
  border-radius: 8px;
  overflow: hidden;
  background: #18181b;
  cursor: zoom-in;
}

.photo-tile img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  display: block;
  transition: transform 0.2s;
}

.photo-tile:hover img {
  transform: scale(1.035);
}

.empty-gallery {
  grid-column: 1 / -1;
  color: var(--text3);
  padding: 44px 0;
  text-align: center;
  line-height: 1.8;
}

/* Gallery page header */
.gallery-header {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 32px 0 28px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  margin-bottom: 28px;
}

.gallery-back {
  color: var(--text3);
  text-decoration: none;
  font-size: 0.88rem;
  white-space: nowrap;
  transition: color 0.18s;
  flex-shrink: 0;
}

.gallery-back:hover { color: var(--brand-green); }

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.92);
}

.lightbox.open { display: flex; }

.lightbox img {
  max-width: calc(100vw - 120px);
  max-height: calc(100vh - 40px);
  object-fit: contain;
  border-radius: 4px;
}

.lb-btn {
  position: absolute;
  border: 0;
  background: rgba(255,255,255,0.08);
  color: var(--text);
  cursor: pointer;
  border-radius: 8px;
  transition: background 0.15s;
  font-size: 1.5rem;
  line-height: 1;
}

.lb-btn:hover { background: rgba(255,255,255,0.18); }

.lb-close {
  top: 16px;
  right: 16px;
  width: 40px;
  height: 40px;
}

.lb-prev {
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 64px;
  font-size: 2rem;
}

.lb-next {
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 64px;
  font-size: 2rem;
}

@media (max-width: 760px) {
  .gallery-header { flex-direction: column; align-items: flex-start; gap: 8px; }
  .lightbox img { max-width: 100vw; max-height: calc(100vh - 100px); border-radius: 0; }
  .lb-prev { left: 4px; }
  .lb-next { right: 4px; }
}

/* Floating action buttons */
.fab-stack {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 200;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
}

.fab-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 52px;
  width: 52px;
  border: 0;
  border-radius: 26px;
  padding: 0;
  font-weight: 800;
  font-size: 0.88rem;
  white-space: nowrap;
  text-decoration: none;
  cursor: pointer;
  overflow: hidden;
  transition: width 0.28s cubic-bezier(.4,0,.2,1), box-shadow 0.2s, padding 0.28s;
  box-shadow: 0 6px 22px rgba(0,0,0,0.32);
}

.fab-btn:hover,
.fab-btn:focus-visible {
  width: 190px;
  padding: 0 18px 0 14px;
  justify-content: flex-start;
  gap: 10px;
  box-shadow: 0 10px 32px rgba(0,0,0,0.42);
}

.fab-icon {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  font-size: 1.3rem;
  line-height: 1;
}

.fab-label {
  opacity: 0;
  max-width: 0;
  overflow: hidden;
  transition: opacity 0.18s 0.08s, max-width 0.28s;
  pointer-events: none;
}

.fab-btn:hover .fab-label,
.fab-btn:focus-visible .fab-label {
  opacity: 1;
  max-width: 160px;
}

.fab-whatsapp {
  background: #fff;
  color: #000;
}

.fab-search {
  background: #fff;
  color: #000;
}

@media (max-width: 760px) {
  .fab-stack { right: 14px; bottom: 14px; }
  .fab-btn { height: 48px; width: 48px; border-radius: 24px; }
  .fab-btn:hover { width: 170px; }
}

.face-search-modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(0,0,0,0.72);
}

.face-search-modal.open {
  display: flex;
}

.face-search-dialog {
  width: min(520px, 100%);
  background: #18181b;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 8px;
  padding: 26px;
  position: relative;
}

.face-search-dialog h2 {
  font-family: 'Outfit', sans-serif;
  margin-bottom: 10px;
}

.face-search-dialog p,
.privacy-note {
  color: var(--text2);
  line-height: 1.55;
  font-size: 0.95rem;
}

/* LGPD consent box */
.fs-lgpd-box {
  background: rgba(150,251,85,0.08);
  border: 1px solid rgba(150,251,85,0.2);
  border-radius: 8px;
  padding: 14px 16px;
  margin: 14px 0;
}

.fs-lgpd-title {
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--text) !important;
  margin-bottom: 8px;
}

.fs-lgpd-list {
  padding-left: 18px;
  margin-bottom: 10px;
}

.fs-lgpd-list li {
  color: var(--text2);
  font-size: 0.88rem;
  line-height: 1.55;
  margin-bottom: 4px;
}

.fs-lgpd-base {
  font-size: 0.78rem !important;
  color: var(--text3) !important;
  margin: 0;
}

/* Upload zone */
.fs-upload-zone {
  border: 2px dashed rgba(255,255,255,0.15);
  border-radius: 10px;
  min-height: 140px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  overflow: hidden;
  margin: 14px 0;
  transition: border-color 0.2s;
  flex-direction: column;
}

.fs-upload-zone:hover { border-color: var(--brand-green); }

#fs-upload-placeholder {
  text-align: center;
  padding: 20px;
  color: var(--text3);
}

#fs-upload-placeholder p { margin-top: 8px; font-size: 0.88rem; }

/* Actions row */
.fs-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-top: 18px;
  flex-wrap: wrap;
}

.btn-ghost {
  background: transparent;
  border: none;
  color: var(--text3);
  cursor: pointer;
  font-size: 0.9rem;
  padding: 8px 4px;
  transition: color 0.2s;
}

.btn-ghost:hover { color: var(--text); }

.face-search-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 8px;
  background: transparent;
  color: var(--text);
  cursor: pointer;
}

.consent-row {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin: 18px 0;
  color: var(--text2);
  font-size: 0.92rem;
}

.face-search-dialog input[type="file"] {
  width: 100%;
  margin: 8px 0 18px;
  padding: 12px;
  border: 1px dashed rgba(255,255,255,0.18);
  border-radius: 8px;
  color: var(--text2);
}

@media (max-width: 760px) {
  .generated-main {
    width: min(100% - 24px, 1180px);
    padding-top: 24px;
  }

  .detail-hero {
    grid-template-columns: 1fr;
    padding-top: 28px;
  }

  .face-search-fab {
    left: 16px;
    right: 16px;
    bottom: 16px;
  }
}

/* ============================================================
   Câmera de selfie — mobile-first
   ============================================================ */
.fs-cam-stage {
  position: relative;
  width: 100%;
  aspect-ratio: 3 / 4;
  max-height: 60vh;
  margin: 14px auto;
  border-radius: 16px;
  overflow: hidden;
  background: #000;
  display: none;
}
.fs-cam-stage video,
.fs-cam-stage #fs-preview-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  margin: 0;
  border-radius: 0;
  max-height: none;
}
/* guia oval pro rosto */
.fs-face-guide {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 58%;
  aspect-ratio: 3 / 4;
  border: 3px dashed rgba(255,255,255,0.85);
  border-radius: 50%;
  box-shadow: 0 0 0 100vmax rgba(0,0,0,0.35);
  pointer-events: none;
}
/* botão trocar câmera */
.fs-flip {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: none;
  background: rgba(0,0,0,0.55);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  backdrop-filter: blur(4px);
}
.fs-flip:active { transform: scale(0.92); }

/* botão de captura redondo (estilo app de foto) */
.fs-shutter-row {
  display: flex;
  justify-content: center;
  margin: 6px 0 4px;
}
.fs-shutter {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: #fff;
  border: 5px solid rgba(255,255,255,0.35);
  background-clip: padding-box;
  cursor: pointer;
  transition: transform 0.1s;
  box-shadow: 0 0 0 2px rgba(255,255,255,0.9) inset;
}
.fs-shutter:active { transform: scale(0.9); }

.fs-cam-buttons {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 12px;
}
.btn-primary.fs-big {
  width: 100%;
  padding: 15px;
  font-size: 1.02rem;
  border-radius: 12px;
}
.fs-cam-buttons .btn-ghost { text-align: center; }
.fs-back-link { display: block; margin-top: 6px; }

/* Em telas de celular, o modal ocupa a tela toda pra caber a câmera */
@media (max-width: 560px) {
  .face-search-modal { padding: 0; }
  .face-search-dialog {
    width: 100%;
    height: 100%;
    max-height: 100%;
    border-radius: 0;
    padding: 20px 18px calc(20px + env(safe-area-inset-bottom));
    overflow-y: auto;
  }
  .fs-cam-stage { max-height: 50vh; }
  .fs-shutter { width: 78px; height: 78px; }
}
