:root {
  --azul: #1e3a8a;
  --azul-claro: #2563eb;
  --vermelho: #dc2626;
  --branco: #ffffff;
}

/* BOTÃO PRINCIPAL */
.btn-primary {
  background: var(--vermelho);
  color: white;
  padding: 12px 24px;
  border-radius: 8px;
  font-weight: bold;
  transition: 0.3s;
  animation: pulse 2s infinite;
  text-decoration: none;
}

.btn-primary:hover {
  background: #b91c1c;
}

/* NAVBAR */
nav {
  background: rgba(15, 35, 85, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

nav ul li a {
  color: #fff;
  transition: 0.3s;
  position: relative;
  text-decoration: none;
}

nav ul li a:hover {
  color: var(--vermelho);
}

nav ul li a::after {
  content: '';
  position: absolute;
  width: 0%;
  height: 2px;
  background: var(--vermelho);
  left: 0;
  bottom: -4px;
  transition: 0.3s;
}

nav ul li a:hover::after {
  width: 100%;
}

/* CARD GERAL */
.card {
  background: #fff;
  padding: 16px;
  border-radius: 16px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
  text-align: center;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border: 1px solid #eef0f3;
  overflow: hidden;
}

.card:hover {
  transform: translateY(-6px) scale(1.02);
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.14);
}

.card.produto {
  cursor: pointer;
}

.card.produto:active {
  transform: scale(0.98);
}

/* ÁREA DA IMAGEM */
.img-box,
.card .img-box {
  background: #f8fafc;
  border-radius: 12px;
  padding: 12px;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 180px;
  position: relative;
}

.card img {
  max-width: 100%;
  max-height: 150px;
  object-fit: contain;
  display: block;
}

/* NOME */
.nome-produto,
.card .nome-produto {
  font-size: 16px;
  font-weight: 700;
  color: #111827;
  line-height: 1.35;
  min-height: 44px;
  margin-bottom: 8px;
}

/* DESCRIÇÃO */
.descricao-produto,
.card .descricao-produto {
  font-size: 13px;
  color: #6b7280;
  line-height: 1.5;
  min-height: 40px;
  margin-bottom: 12px;
}

/* PREÇO */
.preco-produto,
.card .preco-produto {
  font-size: 24px;
  font-weight: 800;
  color: var(--vermelho);
  margin-bottom: 14px;
}

/* BOTÃO WHATS */
.btn-whats {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: auto;
  background: #22c55e;
  color: white;
  padding: 12px;
  border-radius: 10px;
  text-decoration: none;
  font-weight: 700;
  transition: 0.3s;
}

.btn-whats:hover {
  background: #16a34a;
  transform: translateY(-1px);
}

.card-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: auto;
}

/* BOTÃO FLUTUANTE */
.whatsapp-float {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: #25d366;
  color: white;
  font-size: 24px;
  padding: 15px;
  border-radius: 50%;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
  animation: float 2s infinite ease-in-out;
  z-index: 999;
  text-decoration: none;
}

/* ANIMAÇÕES */
/* CORREÇÃO: agora o conteúdo aparece normalmente mesmo se o JS falhar */
.fade-up {
  opacity: 1;
  transform: none;
  transition: all 0.8s ease;
}

/* Só anima se o JS ativar a classe .js no html */
.js .fade-up {
  opacity: 0;
  transform: translateY(40px);
}

.js .fade-up.show {
  opacity: 1;
  transform: translateY(0);
}

/* Remove o espaço em branco */
.hero {
  margin-top: 64px !important; /* Altura exata do novo header */
  padding: 0 !important;
  line-height: 0;
}

@media (max-width: 768px) {
  .hero {
    margin-top: 60px !important;
  }
}
@media (max-width: 768px) {
  .hero {
    margin-top: 130px; /* Altura do header no mobile */
  }
}

@media (max-width: 768px) {
  .hero {
    margin-top: 88px;
  }

  .hero-banner {
    width: 100%;
    height: auto;
  }
}

/* KEYFRAMES */
@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-40px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(220, 38, 38, 0.7); }
  70% { box-shadow: 0 0 0 15px rgba(220, 38, 38, 0); }
  100% { box-shadow: 0 0 0 0 rgba(220, 38, 38, 0); }
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}

@keyframes fadeModal {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* CARROSSEL */
#carousel {
  align-items: stretch;
}

.carousel-btn {
  position: absolute;
  top: 40%;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  padding: 10px;
  cursor: pointer;
  border-radius: 50%;
  transform: translateY(-50%);
  transition: 0.3s;
  z-index: 2;
  border: none;
}

.carousel-btn:hover {
  background: #000;
}

.carousel-btn.left-0 {
  left: 0;
}

.carousel-btn.right-0 {
  right: 0;
}

/* CARD ESPECÍFICO DO CARROSSEL DE DESTAQUE */
#carousel .carousel-card {
  padding: 12px;
}

#carousel .carousel-card img {
  width: 100%;
  height: 100px;
  object-fit: contain;
  display: block;
  margin: 0 auto 10px;
}

#carousel .carousel-card p {
  min-height: 42px;
  font-size: 14px;
  line-height: 1.3;
  margin-bottom: 8px;
}

#carousel .carousel-card span {
  margin-bottom: 10px;
}

/* HEADER / LOGO */
header {
  position: fixed;
  width: 100%;
  top: 0;
  z-index: 1000;
  background: rgba(15, 35, 85, 0.85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

header img {
  transition: all 0.3s ease;
}

header img:hover {
  transform: scale(1.05);
}

header.scrolled {
  background: rgba(10, 25, 60, 0.95);
}

/* MODAL */
.modal-produto {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 9999;
}

.modal-produto.ativo {
  display: flex;
}

.modal-conteudo {
  background: white;
  width: 100%;
  max-width: 900px;
  border-radius: 18px;
  padding: 24px;
  position: relative;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
  animation: fadeModal 0.25s ease;
}

.modal-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  align-items: center;
}

.modal-imagem-box {
  background: #f8fafc;
  border-radius: 14px;
  padding: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 320px;
}

.modal-imagem-box img {
  max-width: 100%;
  max-height: 280px;
  object-fit: contain;
}

.modal-info h3 {
  font-size: 28px;
  color: #111827;
  margin-bottom: 12px;
}

.modal-info p {
  color: #4b5563;
  font-size: 15px;
  line-height: 1.6;
  margin-bottom: 18px;
}

.modal-info span {
  display: block;
  font-size: 30px;
  font-weight: 800;
  color: var(--vermelho);
  margin-bottom: 20px;
}

.modal-btn-whats {
  max-width: 280px;
}

.fechar-modal {
  position: absolute;
  top: 12px;
  right: 14px;
  background: transparent;
  border: none;
  font-size: 32px;
  line-height: 1;
  cursor: pointer;
  color: #374151;
}

.fechar-modal:hover {
  color: var(--vermelho);
}

/* BOTÃO DETALHES */
.btn-detalhes-icon {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 36px;
  height: 36px;
  background: rgba(0, 0, 0, 0.7);
  color: #fff;
  border: none;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: 0.3s;
  z-index: 2;
}

.btn-detalhes-icon:hover {
  background: var(--vermelho);
  transform: scale(1.1);
}

/* RESPONSIVO */
@media (max-width: 768px) {
  header .max-w-7xl {
    padding-top: 12px;
    padding-bottom: 12px;
  }

  nav ul {
    gap: 12px;
    padding-top: 12px;
    padding-bottom: 12px;
    font-size: 14px;
    justify-content: center;
  }

  header img {
    height: 42px;
  }

  .hero {
    margin-top: 88px;
  }

  #searchInput {
    font-size: 16px;
    padding: 14px 16px;
    border-radius: 12px;
  }

  #productList {
    gap: 14px;
  }

  .card {
    padding: 12px;
    border-radius: 14px;
  }

  .img-box {
    height: 140px;
    padding: 10px;
    margin-bottom: 10px;
  }

  .nome-produto {
    font-size: 15px;
    min-height: auto;
    margin-bottom: 6px;
  }

  .descricao-produto {
    font-size: 12px;
    min-height: auto;
    margin-bottom: 10px;
  }

  .preco-produto {
    font-size: 20px;
    margin-bottom: 10px;
  }

  .btn-whats {
    padding: 12px;
    font-size: 15px;
    border-radius: 10px;
  }

  .modal-conteudo {
    padding: 16px;
    border-radius: 14px;
    max-height: 90vh;
    overflow-y: auto;
  }

  .modal-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .modal-imagem-box {
    min-height: 200px;
    padding: 14px;
  }

  .modal-info h3 {
    font-size: 20px;
    line-height: 1.3;
  }

  .modal-info p {
    font-size: 14px;
    line-height: 1.5;
  }

  .modal-info span {
    font-size: 24px;
  }

  .modal-btn-whats {
    max-width: 100%;
    width: 100%;
  }

  .fechar-modal {
    top: 8px;
    right: 10px;
    font-size: 28px;
  }

  .whatsapp-float {
    bottom: 16px;
    right: 16px;
    font-size: 22px;
    padding: 14px;
  }
}

@media (max-width: 420px) {
  #productList {
    grid-template-columns: 1fr;
  }
}
/* Ajuste para telas de celular */
@media (max-width: 768px) {
  .hero {
    /* Aumentamos a margem para empurrar o banner para baixo do menu mobile */
    margin-top: 180px !important; 
    background: #000;
  }

  .hero-banner {
    width: 100%;
    height: auto;
    /* No celular, garantimos que a imagem apareça 100% sem cortes */
    object-fit: contain; 
  }
}

/* Ajuste para celulares muito pequenos (telas estreitas) */
@media (max-width: 480px) {
  .hero {
    margin-top: 160px !important;
  }
}