/* ===== Paleta base ===== */
:root {
  --bg: #0b132b;              /* fundo principal azul profundo */
  --bg-alt: #1c2541;          /* fundo secundário */
  --accent: #38bdf8;          /* azul neon metálico */
  --metal: #3a506b;           /* azul aço */
  --whatsapp-start: #25d366;  /* verde do WhatsApp */
  --whatsapp-end: #1ebe5b;
  --text: #e0eaff;
  --muted: #94a3b8;
  --radius: 16px;
}

/* ===== Reset e base ===== */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  background: transparent;
  color: var(--text);
  font-family: 'Poppins', system-ui, sans-serif;
}

/* REMOVER/IGNORAR elemento <img class="site-bg"> se existir */
.site-bg { display: none; }

/* imagem de fundo via pseudo-elemento (cobre toda a viewport sem distorcer) */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background:
    linear-gradient(rgba(11,19,43,0.28), rgba(5,16,37,0.36)), /* overlay leve */
    url('imagens/jm_fundo.png') center/cover no-repeat;
  background-size: cover;
  background-position: center;
  will-change: transform;
}

/* dark mode: mesma imagem substituída por versão escura + overlay mais forte */
body.dark::before {
  background:
    linear-gradient(rgba(2,6,12,0.72), rgba(4,8,16,0.82)),
    url('imagens/jm_dark.png') center/cover no-repeat;
  background-size: cover;
  background-position: center;
}

/* fallback mobile: reduzir fixed heavy effects (opcional) */
@media (max-width: 600px) {
  body::before, body.dark::before {
    background-attachment: scroll; /* evita problemas em alguns mobiles */
  }
}

/* Navbar: semi-transparente para deixar a imagem visível atrás */
.navbar {
  background: rgba(11, 19, 43, 0.45);
  backdrop-filter: blur(8px) saturate(120%);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 4%;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  box-shadow: 0 6px 25px rgba(0,0,0,0.25);
  position: sticky;
  top: 0;
  z-index: 10;
  transition: all 0.3s ease;
}
.logo {
  color: var(--accent);
  font-weight: 700;
  font-size: 20px;
  letter-spacing: 0.5px;
}
.controls {
  display: flex;
  align-items: center;
  gap: 10px;
}
#search {
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.05);
  color: var(--text);
}
#search::placeholder { color: var(--muted); }
#search:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 10px rgba(56,189,248,0.25);
}

/* ===== Seções ===== */
.product-section {
  padding: 40px 4%;
  background: rgba(8,12,24,0.28); /* translúcido */
  border-top: 1px solid rgba(255,255,255,0.03);
  border-bottom: 1px solid rgba(255,255,255,0.03);
  backdrop-filter: blur(6px);
  transition: background 0.3s ease;
}
.section-inner {
  max-width: 1200px;
  margin: 0 auto;
}
.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}
.section-header h2 {
  font-size: 1.7rem;
  font-weight: 600;
  color: var(--text);
  border-left: 4px solid var(--accent);
  padding-left: 10px;
}
.section-sub {
  color: var(--muted);
  margin-top: 4px;
  font-size: 0.9rem;
}
.section-actions {
  display: flex;
  gap: 6px;
}
.scroll-btn {
  border: 0;
  background: #fff;
  color: var(--azul);
  width: 36px;
  height: 36px;
  border-radius: 8px;
  box-shadow: 0 6px 18px rgba(0,0,0,0.06);
  cursor: pointer;
  font-size: 20px;
  transition: all 0.25s ease;
}
.scroll-btn:hover {
  background: var(--metal);
  color: #fff;
  box-shadow: 0 0 10px rgba(56,189,248,0.3);
}

/* ===== Lista de produtos ===== */
.product-list {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  padding: 12px 4px;
  scroll-snap-type: x mandatory;
}
.product-list .card-prod {
  flex: 0 0 280px;
  scroll-snap-align: start;
  margin: 0;
}
.product-list::-webkit-scrollbar { height: 8px; }
.product-list::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.1);
  border-radius: 8px;
}

/* ===== Cards ===== */
.card-prod {
  flex: 0 0 280px;
  background: linear-gradient(180deg, rgba(17,26,46,0.36) 0%, rgba(10,16,30,0.24) 100%);
  backdrop-filter: blur(6px) saturate(120%);
  border-radius: var(--radius);
  border: 1px solid rgba(255,255,255,0.04);
  box-shadow: 0 8px 25px rgba(0,0,0,0.35);
  padding: 14px;
  scroll-snap-align: start;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.card-prod:hover {
  transform: translateY(-8px);
  box-shadow: 0 14px 40px rgba(56,189,248,0.2);
  border-color: rgba(56,189,248,0.25);
}
.card-prod img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  border-radius: 14px;
  margin-bottom: 10px;
}
.card-title {
  font-weight: 600;
  font-size: 1rem;
  color: #e2e8f0;
  margin-bottom: 4px;
}
.card-desc {
  color: #94a3b8;
  font-size: 0.88rem;
  margin-bottom: 10px;
}
.card-actions {
  display: flex;
  gap: 8px;
}

/* ===== Botão WhatsApp ===== */
.whatsapp-btn {
  background: linear-gradient(90deg, var(--whatsapp-start), var(--whatsapp-end));
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 10px 14px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 500;
  font-size: 0.9rem;
  box-shadow: 0 8px 24px rgba(37,211,102,0.25);
  cursor: pointer;
  transition: all 0.2s ease;
}
.whatsapp-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 12px 32px rgba(37,211,102,0.4);
}

/* ===== Botão flutuante ===== */
.whatsapp-float {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: linear-gradient(90deg, var(--whatsapp-start), var(--whatsapp-end));
  border: none;
  box-shadow: 0 10px 25px rgba(37,211,102,0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease;
  z-index: 40;
}
.whatsapp-float:hover {
  transform: scale(1.08);
  box-shadow: 0 16px 30px rgba(37,211,102,0.45);
}
.whatsapp-logo {
  width: 28px;
  height: auto;
  display: block;
}

/* ===== Modal ===== */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 50;
}
.modal[aria-hidden="false"] { display: flex; }
.modal-content {
  background: rgba(15,23,42,0.6);
  backdrop-filter: blur(8px);
  padding: 20px;
  border-radius: 16px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.6);
  color: var(--text);
}
.modal-content h3 {
  color: var(--accent);
  margin-bottom: 10px;
}
.modal-content input {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px;
  color: var(--text);
  padding: 8px;
  width: 100%;
  margin-top: 4px;
}
.modal-content button {
  background: var(--accent);
  color: #041827;
  font-weight: 600;
  border: none;
  border-radius: 8px;
  padding: 8px 12px;
  cursor: pointer;
  transition: all 0.2s ease;
}
.modal-content button:hover {
  background: #56d0ff;
}

/* ===== Carrinho ===== */
.carrinho {
  position: fixed;
  top: 0;
  right: 0;
  width: 340px;
  height: 100%;
  background: linear-gradient(180deg, rgba(15,23,42,0.6), rgba(14,20,36,0.5));
  backdrop-filter: blur(6px);
  box-shadow: -4px 0 25px rgba(0,0,0,0.55);
  transform: translateX(100%);
  transition: transform 0.4s ease;
  z-index: 30;
  padding: 20px;
}
.carrinho.open { transform: translateX(0); }

/* ===== Estilos da página de cadastro ===== */
.cadastro-container {
  min-height: calc(100vh - 72px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 16px;
  max-width: 1200px;
  margin: 0 auto;
}

.cadastro-box {
  width: 100%;
  max-width: 520px;
  background: linear-gradient(180deg, rgba(255,255,255,0.7), rgba(255,255,255,0.6));
  border-radius: 14px;
  padding: 28px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.08);
  border: 1px solid rgba(0,0,0,0.06);
  color: var(--texto);
}

body.dark .cadastro-box {
  background: linear-gradient(180deg, rgba(6,12,24,0.6), rgba(8,14,26,0.5));
  border: 1px solid rgba(255,255,255,0.04);
  color: #e6f0f8;
}

.cadastro-box h1 {
  margin: 0 0 6px 0;
  font-size: 22px;
  color: var(--azul);
}

.cadastro-box .muted {
  margin: 0 0 16px 0;
  color: var(--cinza);
  font-size: 13px;
}

.cad-form .field {
  display: block;
  margin-bottom: 12px;
}

.cad-form .label {
  display: block;
  font-size: 13px;
  color: var(--cinza);
  margin-bottom: 6px;
}

.cad-form input[type="text"],
.cad-form input[type="email"],
.cad-form input[type="password"] {
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(0,0,0,0.08);
  background: #fff;
  color: var(--texto);
  font-size: 14px;
}

body.dark .cad-form input {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.04);
  color: #e6eef8;
}

/* botões alinhados */
.cad-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-top: 8px;
}

/* reuse classes globais de botões se já existirem */
.btn-primary {
  padding: 10px 16px;
  border-radius: 10px;
  border: 0;
  background: var(--azul-claro);
  color: #fff;
  cursor: pointer;
  font-weight: 600;
  box-shadow: 0 8px 22px rgba(11,110,168,0.12);
}

.btn-secondary {
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid rgba(0,0,0,0.06);
  background: transparent;
  color: var(--texto);
  cursor: pointer;
}

/* mensagens de erro */
.error {
  color: #c0392b;
  margin-top: 10px;
  font-size: 13px;
}

/* Seção "Sobre" */
.about-section {
  padding: 36px 4%;
  background: rgba(255,255,255,0.04);
  border-top: 1px solid rgba(0,0,0,0.04);
  border-bottom: 1px solid rgba(0,0,0,0.04);
}
.about-section .section-inner { max-width: 1180px; margin: 0 auto; }

.about-grid {
  display: grid;
  grid-template-columns: 1fr 260px;
  gap: 20px;
  align-items: center;
}
.about-text h2 { margin: 0 0 8px 0; color: var(--azul); font-size: 20px; }
.about-text p { margin: 0 0 10px 0; color: var(--texto); line-height: 1.5; }

.about-social { display:flex; align-items:center; justify-content:flex-end; }

/* Link/ícone Instagram */
.social-link {
  display:inline-flex;
  align-items:center;
  gap:12px;
  text-decoration:none;
  background: linear-gradient(180deg, rgba(255,255,255,0.06), rgba(255,255,255,0.03));
  padding:10px 14px;
  border-radius:10px;
  border:1px solid rgba(0,0,0,0.06);
  box-shadow: 0 6px 18px rgba(0,0,0,0.06);
  color: var(--texto);
}
.social-link:hover { transform: translateY(-3px); box-shadow: 0 10px 26px rgba(0,0,0,0.08); }

.instagram-logo { width:36px; height:36px; flex:0 0 36px; }
.social-copy { display:flex; flex-direction:column; align-items:flex-start; }
.social-text { font-weight:700; color:var(--azul); font-size:14px; }
.followers { font-size:13px; color:var(--cinza); margin-top:2px; }

/* Responsivo */
@media (max-width: 780px) {
  .about-grid { grid-template-columns: 1fr; text-align: center; gap:12px; }
  .about-social { justify-content:center; }
  .social-copy { align-items:center; }
}

@media (max-width: 540px) {
  .cadastro-box { padding: 20px; border-radius: 12px; }
  .cad-form input { padding: 10px; }
  .btn-primary, .btn-secondary { flex: 1; }
}

@media (max-width: 768px) {
  .navbar { flex-direction: column; gap: 10px; }
  .section-header h2 { font-size: 1.3rem; }
  .card-prod { flex: 0 0 240px; }
  .card-prod img { height: 160px; }
  .product-section { padding: 24px 5%; }
}