/* ═══════════════════════════════════════════
   WhoFound — style.css
   ═══════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Syne:wght@400;600;700;800&family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;1,9..40,300&display=swap');

/* ── Reset & Variáveis ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:       #08080e;
  --bg2:      #10101a;
  --bg3:      #181824;
  --card:     #13131d;
  --border:   #25253a;
  --accent:   #f0c040;
  --accent2:  #e07830;
  --text:     #ede9e2;
  --muted:    #7777a0;
  --radius:   14px;
  --font-display: 'Syne', sans-serif;
  --font-body:    'DM Sans', sans-serif;
  --transition: .2s ease;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ── Header ── */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 36px;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
  position: sticky;
  top: 0;
  z-index: 100;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 22px;
  color: var(--accent);
  text-decoration: none;
  cursor: pointer;
  user-select: none;
}

.logo svg { width: 32px; height: 32px; }

/* Botão admin invisível — apenas a lupa no footer */
.admin-trigger {
  background: transparent;
  border: none;
  cursor: pointer;
  opacity: 0;
  width: 28px;
  height: 28px;
  position: fixed;
  bottom: 12px;
  right: 14px;
  z-index: 50;
  transition: opacity .4s;
}
.admin-trigger:hover { opacity: .18; }

/* ── Hero ── */
.hero {
  text-align: center;
  padding: 72px 24px 48px;
}

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(40px, 7vw, 80px);
  font-weight: 800;
  line-height: 1.03;
  letter-spacing: -2.5px;
}

.hero h1 em {
  font-style: normal;
  color: var(--accent);
}

.hero p {
  color: var(--muted);
  font-size: 17px;
  margin-top: 16px;
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.6;
}

/* ── Barra de busca ── */
.search-wrap {
  max-width: 500px;
  margin: 32px auto 0;
  display: flex;
  align-items: center;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 50px;
  padding: 8px 8px 8px 22px;
  gap: 10px;
  transition: border-color var(--transition);
}

.search-wrap:focus-within {
  border-color: var(--accent);
}

.search-wrap input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 15px;
}

.search-wrap input::placeholder { color: var(--muted); }

.search-wrap button {
  background: var(--accent);
  color: #000;
  border: none;
  border-radius: 50px;
  padding: 10px 24px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  transition: opacity var(--transition);
}

.search-wrap button:hover { opacity: .85; }

/* ── Section label ── */
.section-label {
  font-size: 11px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 500;
  padding: 0 36px 20px;
}

/* ── Grid de produtos ── */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 22px;
  padding: 0 36px 80px;
}

/* ── Card ── */
.product-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition);
}

.product-card:hover {
  transform: translateY(-5px);
  border-color: var(--accent);
  box-shadow: 0 10px 36px rgba(240, 192, 64, .1);
}

.card-thumb {
  width: 100%;
  aspect-ratio: 4/3;
  background: var(--bg3);
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.card-thumb img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .4s ease;
}

.product-card:hover .card-thumb img { transform: scale(1.04); }

.card-no-img {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
}

.card-no-img svg {
  width: 32px;
  height: 32px;
  opacity: .4;
}

.card-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  background: var(--accent);
  color: #000;
  font-family: var(--font-display);
  font-size: 10px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 50px;
  letter-spacing: .4px;
}

.card-body { padding: 18px; }

.card-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 17px;
  margin-bottom: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card-desc {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.55;
  margin-bottom: 14px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.card-video-tag {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  color: var(--accent2);
}

.card-video-tag svg { width: 14px; height: 14px; }

.btn-primary {
  background: var(--accent);
  color: #000;
  border: none;
  border-radius: 8px;
  padding: 8px 16px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  transition: opacity var(--transition);
}

.btn-primary:hover { opacity: .85; }

/* ── Estado vazio ── */
.empty-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 80px 24px;
  color: var(--muted);
}

.empty-state svg {
  width: 52px;
  height: 52px;
  margin-bottom: 16px;
  opacity: .25;
}

.empty-state h2 {
  font-family: var(--font-display);
  font-size: 22px;
  margin-bottom: 8px;
  color: var(--muted);
}

.empty-state p { font-size: 14px; }

/* ── Modal produto ── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .78);
  backdrop-filter: blur(5px);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s;
}

.modal-overlay.open {
  opacity: 1;
  pointer-events: all;
}

.modal {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 22px;
  max-width: 560px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  transform: translateY(16px);
  transition: transform .25s;
}

.modal-overlay.open .modal { transform: translateY(0); }

.modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  background: rgba(255,255,255,.07);
  border: none;
  color: var(--muted);
  width: 34px;
  height: 34px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 5;
  transition: background var(--transition);
}

.modal-close:hover { background: rgba(255,255,255,.14); }

.modal-hero {
  width: 100%;
  aspect-ratio: 16/9;
  background: var(--bg3);
  border-radius: 18px 18px 0 0;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.modal-hero img { width: 100%; height: 100%; object-fit: cover; }

.modal-body { padding: 26px; }

.modal-title {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 800;
  margin-bottom: 10px;
}

.modal-desc {
  color: var(--muted);
  font-size: 15px;
  line-height: 1.65;
  margin-bottom: 22px;
}

.video-block {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 18px;
  text-decoration: none;
  margin-bottom: 20px;
  transition: border-color var(--transition);
}

.video-block:hover { border-color: var(--accent2); }

.video-icon {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--accent2);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.video-icon svg { width: 18px; height: 18px; fill: #fff; }

.video-info .label {
  font-size: 11px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .8px;
}

.video-info .title {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  margin-top: 2px;
}

.link-btn {
  display: block;
  width: 100%;
  background: var(--accent);
  color: #000;
  border: none;
  border-radius: 12px;
  padding: 16px;
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  text-align: center;
  cursor: pointer;
  text-decoration: none;
  transition: opacity var(--transition);
}

.link-btn:hover { opacity: .87; }

/* ── Toast ── */
.toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%) translateY(12px);
  background: var(--text);
  color: #000;
  padding: 12px 24px;
  border-radius: 50px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 14px;
  z-index: 999;
  opacity: 0;
  transition: opacity .3s, transform .3s;
  pointer-events: none;
  white-space: nowrap;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ── Footer ── */
footer {
  text-align: center;
  padding: 24px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 12px;
}

/* ════════════════════════════════════════════
   RESPONSIVO — Mobile First
   ════════════════════════════════════════════ */

/* ── Tablet (≤ 768px) ── */
@media (max-width: 768px) {
  /* Header */
  .site-header {
    padding: 14px 20px;
  }

  .logo { font-size: 20px; }
  .logo svg { width: 28px; height: 28px; }

  /* Tagline some no tablet para não apertar */
  .site-header > span[style] { display: none; }

  /* Hero */
  .hero {
    padding: 52px 20px 36px;
  }

  .hero h1 {
    letter-spacing: -1.5px;
  }

  .hero p { font-size: 15px; }

  /* Busca */
  .search-wrap {
    margin-top: 24px;
    padding: 7px 7px 7px 18px;
  }

  /* Grid — 2 colunas no tablet */
  .product-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    padding: 0 20px 72px;
  }

  .section-label { padding: 0 20px 16px; }

  /* Modal */
  .modal {
    border-radius: 18px;
  }

  .modal-body { padding: 20px; }

  .modal-title { font-size: 22px; }
}

/* ── Mobile (≤ 480px) ── */
@media (max-width: 480px) {
  /* Header compacto */
  .site-header {
    padding: 12px 16px;
  }

  .logo { font-size: 19px; gap: 8px; }
  .logo svg { width: 26px; height: 26px; }

  /* Hero menor */
  .hero {
    padding: 40px 16px 28px;
  }

  .hero h1 {
    font-size: clamp(32px, 10vw, 48px);
    letter-spacing: -1px;
    line-height: 1.08;
  }

  .hero p {
    font-size: 14px;
    margin-top: 12px;
  }

  /* Busca — botão menor */
  .search-wrap {
    padding: 6px 6px 6px 16px;
    margin-top: 20px;
  }

  .search-wrap input { font-size: 14px; }

  .search-wrap button {
    padding: 9px 18px;
    font-size: 13px;
  }

  /* Grid — 1 coluna no mobile pequeno */
  .product-grid {
    grid-template-columns: 1fr;
    gap: 14px;
    padding: 0 16px 80px;
  }

  .section-label { padding: 0 16px 14px; }

  /* Card — thumb menor no mobile */
  .card-thumb { aspect-ratio: 16/9; }

  .card-body { padding: 14px; }

  .card-name { font-size: 15px; }

  /* Botões — área de toque maior (mínimo 44px) */
  .btn-primary {
    padding: 10px 18px;
    font-size: 13px;
    min-height: 40px;
  }

  /* Modal — ocupa a tela toda no mobile */
  .modal-overlay {
    padding: 0;
    align-items: flex-end;
  }

  .modal {
    border-radius: 22px 22px 0 0;
    max-height: 92vh;
    width: 100%;
  }

  /* Indicador de drag no modal mobile */
  .modal::before {
    content: '';
    display: block;
    width: 36px;
    height: 4px;
    background: var(--border);
    border-radius: 2px;
    margin: 12px auto 0;
  }

  .modal-hero {
    border-radius: 0;
    aspect-ratio: 16/9;
  }

  .modal-body { padding: 18px 18px 32px; }

  .modal-title { font-size: 20px; margin-bottom: 8px; }

  .modal-desc { font-size: 14px; margin-bottom: 16px; }

  .modal-close {
    top: 12px;
    right: 12px;
    width: 32px;
    height: 32px;
    font-size: 16px;
  }

  .link-btn {
    padding: 15px;
    font-size: 15px;
    /* Sempre visível acima do safe-area no iPhone */
    margin-bottom: env(safe-area-inset-bottom, 0px);
  }

  .video-block {
    padding: 12px 14px;
    gap: 12px;
  }

  .video-icon {
    width: 38px;
    height: 38px;
  }

  /* Toast — centralizado e mais largo */
  .toast {
    width: calc(100% - 32px);
    text-align: center;
    white-space: normal;
    bottom: 20px;
  }

  /* Admin trigger — área de toque maior no mobile */
  .admin-trigger {
    width: 44px;
    height: 44px;
    bottom: 8px;
    right: 8px;
  }
}

/* ── Telas muito pequenas (≤ 360px) ── */
@media (max-width: 360px) {
  .hero h1 {
    font-size: 28px;
  }

  .product-grid {
    padding: 0 12px 80px;
    gap: 12px;
  }
}

/* ── Suporte a notch/safe-area (iPhone X+) ── */
@supports (padding: env(safe-area-inset-bottom)) {
  .site-header {
    padding-left: max(16px, env(safe-area-inset-left));
    padding-right: max(16px, env(safe-area-inset-right));
  }

  footer {
    padding-bottom: max(24px, env(safe-area-inset-bottom));
  }
}

/* ── Sem animações para quem prefere (acessibilidade) ── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
