/* =========================
   RESET BÁSICO E GRID GERAL
========================= */
* {
  box-sizing: border-box;
}

/* Grid para os banners + destaque */
.produtos-topo {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 32px;
  align-items: stretch;
  margin-bottom: 32px;
}

/* container dos dois banners à esquerda */
.produtos-topo__banners {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* ========= BANNER PRINCIPAL (SEM <picture>) ========= */
.banner-principal {
  width: 100%;
  aspect-ratio: 690 / 160;
  border-radius: 16px;
  border: 0.5px solid #fff;
  overflow: hidden;
  background-color: #01102E;
  background-image: url('/src/assets/img/Ou.svg'); /* desktop padrão */
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  position: relative;
}

/* Texto sobreposto */
.banner-texto {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: #ffffff;
  font-weight: 700;
  font-size: 2rem;
  line-height: 1.2;
  padding: 24px;
  z-index: 2;
  text-shadow: 0 2px 8px rgba(0,0,0,0.35);
}

.banner-texto span {
  font-size: 0.95rem;
  font-weight: 300;
  display: block;
  margin-top: 4px;
}

/* ========= BANNER SECUNDÁRIO ========= */
.banner-secundario {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  font-size: 1.1rem;
  text-align: center;
  font-style: italic;
}

.banner-secundario img {
  width: 100%;
  height: auto;
  border-radius: 12px;
  object-fit: contain;
}

/* ========= DESTAQUE LATERAL ========= */
.produtos-topo__destaque {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 18px;
  object-fit: cover;
  text-align: center;
  background: rgba(255, 255, 255, 0.2);
  border: 0.5px solid #ffffff;
  color: #ffffff;
    overflow: hidden;
  background-color: #01102E;
  background-image: url('/src/assets/img/banner-maior-quadrado.svg'); /* desktop padrão */
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  position: relative;
}

.produtos-topo__destaque img{
    
}

/* ========= MASONRY DOS PRODUTOS ========= */
.produtos-masonry {
  column-count: 3;
  column-gap: 24px;
  width: 100%;
}

.produto-card {
  position: relative;
  break-inside: avoid;
  margin-bottom: 24px;
  border-radius: 16px;
  display: block;
  max-width: 340px;
  min-width: 180px;
  min-height: 200px;
  max-height: 500px;
  cursor: pointer;
}

.produto-card img {
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.08);
  border: 0.5px solid #fff;
  max-width: 340px;
  min-width: 180px;
  min-height: 200px;
  max-height: 500px;
  border-radius: 16px;
}

/* ========= SETAS DE NAVEGAÇÃO ========= */
.seta-proxima,
.seta-anterior {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background:rgba(255, 255, 255, 0.85);;
  border: none;
  border-radius: 50%;
  width: 38px;
  height: 38px;
  font-size: 1rem;
  color: #559d68;
  cursor: pointer;
  z-index: 3;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}

.seta-proxima { right: 12px; }
.seta-anterior { left: 12px; }

.produto-card:hover .seta-proxima,
.produto-card:hover .seta-anterior {
  opacity: 1;
  pointer-events: auto;
}

/* ========= INFO DO PRODUTO ========= */
.produto-info {
  width: 340px;
  background: rgba(236, 242, 233, 0.7);
  padding: 22px 0 18px 0;
  border-bottom-left-radius: 16px;
  border-bottom-right-radius: 16px;
  text-align: center;
  opacity: 0;
  transform: translateY(-164px);
  transition: opacity 0.3s, transform 0.3s;
}

.produto-info h3 {
  color: #3a7c53;
  font-weight: 300;
}

.produto-card:hover .produto-info {
  opacity: 1;
  transform: translateY(1);
}

.produto-info .preco {
  display: block;
  font-size: 2rem;
  color: #5fa770;
  font-weight: bold;
  margin: 8px 0 18px 0;
}

/* ========= AÇÕES DO PRODUTO ========= */
.produto-acoes {
  display: flex;
  justify-content: center;
  gap: 28px;
  margin-top: 6px;
}

.produto-acoes a,
.produto-acoes button {
  background: #5fa770;
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.18s, color 0.18s;
}

.produto-acoes a:hover,
.produto-acoes button:hover {
  background: #c4ecd1;
  color: #3a7c53;
}

.produto-card-link { text-decoration: none; }

/* ========= RESPONSIVO ========= */
@media (max-width: 1024px) {
  body { margin: 0; padding: 0; }
  .conteudo-principal { padding: 0; width: 100%; }

  .produtos-topo {
    display: flex;
    flex-direction: column;
    gap: 24px;
    margin-bottom: 32px;
  }

  .produtos-topo__banners,
  .produtos-topo__destaque {
    width: 100%;
  }

  /* Banner: troca o arquivo e mostra inteiro */
  .banner-principal {
    background-image: url('/src/assets/img/banner-principal-mobile160.svg') !important;
    background-position: center center;
    height: 160px;
    width: 365px;
    margin: 0 auto;
  }

  .banner-texto {
    font-size: 1.2rem;
    padding: 16px;
    line-height: 1.25;
  }

  .banner-texto span {
    font-size: 0.9rem;
  }

  .banner-secundario,
  .produtos-topo__destaque { display: none; }

  /* PRODUTOS EM 1 COLUNA */
  .produtos-masonry {
    column-count: 1 !important;
    padding: 0 16px;
  }

  .produto-card {
    width: 274px;
    max-width: 100%;
    margin: 0 auto 24px auto;
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0,0,0,0.05);
  }

  .produto-card img {
    width: 100%;
    max-height: 277px;
    display: block;
    object-fit: cover;
    border-bottom: 1px solid #ddd;
    border-top-left-radius: 16px;
    border-top-right-radius: 16px;
  }

  .produto-info {
    width: 100%;
    padding: 18px 16px;
    background: rgba(236,242,233,0.7);
    text-align: center;
    opacity: 1 !important;
    transform: none !important;
  }

  .produto-info h3 {
    font-size: 1rem;
    font-weight: 400;
    color: #3a7c53;
    margin: 0;
  }

  .produto-info .preco {
    font-size: 1.6rem;
    font-weight: bold;
    color: #5fa770;
    margin: 8px 0 12px;
  }

  .produto-acoes {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 8px;
  }

  .produto-acoes a,
  .produto-acoes button {
    background: #5fa770;
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 42px;
    height: 42px;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
  }

  .produto-acoes a:hover,
  .produto-acoes button:hover {
    background: #c4ecd1;
    color: #3a7c53;
  }

  .seta-proxima,
  .seta-anterior { display: none !important; }
}

@media (max-width: 399px) {
  .banner-texto {
    font-size: clamp(1rem, 5vw, 1.3rem);
    padding: 12px;
  }
  .produtos-masonry {
    padding: 0 12px;
    column-gap: 12px;
  }
  .produto-card { margin-bottom: 20px; }
  .produto-info { padding: 14px 12px; }
  .produto-acoes { gap: 14px; }
  .produto-acoes a, .produto-acoes button {
    width: 38px;
    height: 38px;
  }
}

/* ========= LIKE / CURTIDO ========= */
.produto-acoes .acao-like {
  background: #5fa770;
  color: #fff;
  transition: background .18s, color .18s, filter .18s, transform .08s;
}
.produto-acoes .acao-like:hover {
  background: #c4ecd1;
  color: #3a7c53;
}
.produto-card:hover .acao-like:not(.curtido):not(:hover) {
  background: #5fa770;
  color: #fff;
}
.produto-acoes .acao-like.curtido {
  background: #ffbdbd !important;
  color: #e74c3c !important;
  box-shadow: 0 0 0 2px rgba(255,189,189,.9);
}
.produto-acoes .acao-like.curtido:hover {
  background: #ffbdbd !important;
  color: #e74c3c !important;
  filter: brightness(.98);
}

/* ========= ALERTAS (TOASTS) ========= */
.alerta-carrinho {
  position: fixed;
  left: 50%;
  transform: translateX(-50%) translateY(16px);
  bottom: 24px;
  z-index: 9999;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: min(320px, 90vw);
  max-width: min(680px, 92vw);
  padding: clamp(10px, 2.5vw, 18px) clamp(16px, 4vw, 28px);
  background: #5da06a;
  color: #ffffff;
  font-weight: 600;
  font-size: clamp(14px, 2.6vw, 18px);
  line-height: 1.25;
  text-align: center;
  border-radius: 18px;
  box-shadow: 0 10px 25px rgba(0,0,0,0.18), 0 2px 8px rgba(0,0,0,0.12);
  opacity: 0;
  animation: alerta-enter 180ms ease-out forwards;
}

.alerta-carrinho + .alerta-carrinho {
  margin-top: 12px;
  bottom: auto;
  top: calc(100vh - 24px - 60px);
}

.alerta-carrinho.alerta--erro { background: #d05555; }

@keyframes alerta-enter {
  from { transform: translateX(-50%) translateY(28px); opacity: 0; }
  to   { transform: translateX(-50%) translateY(0); opacity: 1; }
}
@keyframes alerta-exit {
  from { transform: translateX(-50%) translateY(0); opacity: 1; }
  to   { transform: translateX(-50%) translateY(12px); opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .alerta-carrinho {
    animation: none;
    opacity: 1;
    transform: translateX(-50%);
  }
}

@media (max-height: 560px) {
  .alerta-carrinho { bottom: 12px; }
}
