/* ================== */
/* Estrutura Geral */
/* ================== */

.cpw-carousel {
  position: relative;
  padding: 20px 40px;
}

.cpw-item {
  padding: 0 10px;
}

/* ================== */
/* Card de Produto */
/* ================== */

.cpw-card {
  background: #ffffff;
  border-radius: 16px;
  padding: 20px 15px;
  text-align: center;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.cpw-img {
  height: 150px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 15px;
}

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

.cpw-title {
  font-weight: bold;
  font-size: 15px;
  color: #d62828;
  margin-bottom: 15px;
  text-transform: uppercase;
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.cpw-button {
  background: #f03e3e;
  color: #fff;
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 600;
  border: none;
  text-decoration: none;
  display: inline-block;
  transition: background 0.3s ease;
}

.cpw-button:hover {
  background: #d63333;
}

/* ================== */
/* Carrossel - Slick */
/* ================== */

.slick-prev,
.slick-next {
  background: #f8dcdc;
  border: none;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  font-size: 18px;
  color: #c92a2a;
  cursor: pointer;
}

.slick-prev:before,
.slick-next:before {
  content: '';
}

.slick-prev {
  left: -20px;
}

.slick-next {
  right: -20px;
}

@media (max-width: 768px) {
  .slick-prev {
    left: -10px;
  }

  .slick-next {
    right: -10px;
  }

  .cpw-title {
    font-size: 13px;
  }

  .cpw-button {
    padding: 6px 15px;
    font-size: 13px;
  }
}

/* ================== */
/* Destaque Popular */
/* ================== */

.cpw-card.cpw-popular {
  border: 2px solid #FFD600;
  position: relative;
}

.cpw-card.cpw-popular .cpw-badge {
  position: absolute;
  top: -12px;
  left: 0;
  right: 0;
  margin: 0 auto;
  background-color: #FFD600;
  color: #333;
  font-size: 14px;
  font-weight: bold;
  text-align: center;
  padding: 2px 8px;
  border-radius: 4px;
  width: 80px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

.cpw-carousel-destaque .cpw-card {
  min-height: 370px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

/* ================== */
/* Filtros por Categoria */
/* ================== */

.cpw-filtros-categoria {
  margin-bottom: 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.cpw-btn-cat {
  background-color: #f1f1f1;
  color: #333;
  border: none;
  border-radius: 20px;
  padding: 8px 16px;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.cpw-btn-cat:hover,
.cpw-btn-cat.active {
  background-color: #d62828;
  color: #fff;
}

/* ================== */
/* Grid Layout Produtos com efeito */
/* ================== */

.cpw-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.cpw-grid > * {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 20px 20px 60px #bebebe, -20px -20px 60px #ffffff;
  z-index: 1;
  transition: all 0.3s ease-in-out;
}

/* Pseudoelementos inicialmente ocultos */
.cpw-grid > *::before,
.cpw-grid > *::after {
  content: '';
  position: absolute;
  opacity: 0;
  transition: opacity 0.3s ease-in-out;
  pointer-events: none;
}

/* Blur de fundo */
.cpw-grid > *::before {
  top: 5px;
  left: 5px;
  width: calc(100% - 10px);
  height: calc(100% - 10px);
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(24px);
  border-radius: 10px;
  outline: 2px solid white;
  z-index: 1;
}

/* Blob animado */
.cpw-grid > *::after {
  top: 50%;
  left: 50%;
  width: 150px;
  height: 150px;
  background-color: #ff0000;
  filter: blur(12px);
  border-radius: 50%;
  transform: translate(-100%, -100%);
  animation: blob-bounce 2.5s infinite ease;
  z-index: 0;
}

/* Ativa o efeito no hover */
.cpw-grid > *:hover::before,
.cpw-grid > *:hover::after {
  opacity: 1;
}

/* Conteúdo sempre visível acima do fundo */
.cpw-grid > * > * {
  position: relative;
  z-index: 2;
}

/* Animação do blob */
@keyframes blob-bounce {
  0% {
    transform: translate(-100%, -100%) translate3d(0, 0, 0);
  }
  25% {
    transform: translate(-100%, -100%) translate3d(100%, 0, 0);
  }
  50% {
    transform: translate(-100%, -100%) translate3d(100%, 100%, 0);
  }
  75% {
    transform: translate(-100%, -100%) translate3d(0, 100%, 0);
  }
  100% {
    transform: translate(-100%, -100%) translate3d(0, 0, 0);
  }
}

/* ================== */
/* Responsivo - Mobile */
/* ================== */

@media (max-width: 768px) {
  /* Botão hamburguer aparece */
  .cpw-toggle-filtros {
    display: inline-block;
    background-color: #d62828;
    color: #fff;
    border: none;
    padding: 10px 14px;
    font-size: 16px;
    border-radius: 30px;
    cursor: pointer;
    margin-bottom: 10px;
  }

  .cpw-toggle-filtros::after {
    content: " ☰";
    font-size: 18px;
  }

  /* Filtros escondidos por padrão no mobile */
  .cpw-filtros-categoria {
    display: none;
    flex-direction: column;
    background-color: #fff;
    padding: 10px;
    border-radius: 10px;
    margin-bottom: 20px;
  }

  .cpw-filtros-categoria.show {
    display: flex;
  }

  .cpw-btn-cat {
    flex: 1 0 100%;
    text-align: center;
    max-width: 100%;
    font-size: 14px;
    padding: 10px 16px;
    border-radius: 25px;
  }

  .cpw-grid {
    grid-template-columns: 1fr !important;
    gap: 15px !important;
  }

  .cpw-grid > * {
    max-width: 100%;
    width: 100%;
    height: auto;
  }
}
