/* Carrossel de produtos - estilos centralizados (importado em partials/head.ejs) */

.product-list,
.product-item {
  user-select: none;
  -webkit-user-drag: none;
}

/* Adicione esta classe para ter a transição de opacidade na imagem */
.product-image {
  /* Define que qualquer mudança na opacidade leve 0.3 segundos */
  transition: opacity .9s ease-in-out;
}

/* Opcional: Classe para o efeito visual de carregamento/transição */
.product-image.fade-out {
  opacity: 0.1;
  /* Diminui a opacidade para forçar o fade-in ao carregar o novo SRC */
}

.product-list {
  cursor: pointer !important;
}

.product-item {
  position: relative;
}

@media (max-width: 600px) {
  .product-list {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    /* mantém o scroll horizontal */
    scroll-snap-type: x mandatory;
    -ms-overflow-style: none;
    /* IE e Edge antigo */
    scrollbar-width: none;
    /* Firefox */
  }

  .product-list::-webkit-scrollbar {
    display: none;
    /* Chrome, Safari e Edge moderno */
  }

  .area-thumb-item-product {
    background-color: rgb(255, 255, 255);
    width: 100%;
    height: 200px;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
  }

  .area-thumb-item-product img {
    width: 100%;
    height: 100%;
    object-fit: contain;
  }

  .product-caption {

    color: #000;
    height: 60px;
    font-size: 0.8em;
    overflow: hidden;
  }

  .product-item {
    flex: 0 0 calc(50% - 10px);
    /* sempre 2 itens por vez */
    scroll-snap-align: start;
    /* opcional: ajuda no snap */
    min-height: 200px;
    max-height: max-content;
    background-color: #ffffff;
    padding: 5px;
    text-decoration: none;
    cursor: none !important;
  }

  .product-item a {
    text-decoration: none;
    font-weight: 500;
  }

  .area-price-whats {
    width: 100%;
    display: flex;
  }

  .icon-whats-price svg {
    color: #25d366 !important;
    width: 50px;
  }

  .old-price {
    font-size: 0.8em;
    color: gray;
    text-decoration: line-through;
  }

  .btn-buy {
    width: 100% !important;
  }


  .carousel-container {
    overflow: hidden;
    width: 100%;
    cursor: default !important;
    margin-top: 20px;
  }

}

@media (min-width: 601px) and (max-width: 1024px) {
  .product-list {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    /* mantém o scroll horizontal */
    scroll-snap-type: x mandatory;
    -ms-overflow-style: none;
    /* IE e Edge antigo */
    scrollbar-width: none;
    /* Firefox */
  }

  .product-list::-webkit-scrollbar {
    display: none;
    /* Chrome, Safari e Edge moderno */
  }

  .area-thumb-item-product {
    background-color: rgb(255, 255, 255);
    width: 100%;
    height: 200px;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
  }

  .area-thumb-item-product img {
    width: 100%;
    height: 100%;
    object-fit: contain;
  }

  .product-caption {
    color: #000;
    height: 60px;
    font-size: 0.8em;
    overflow: hidden;
  }

  .product-item {
    flex: 0 0 calc(33.333% - 10px) !important;
    /* sempre 3 itens por vez */
    scroll-snap-align: start;
    min-height: 200px;
    max-height: max-content;
    background-color: #ffffff;
    padding: 5px;
    text-decoration: none;
  }

  .product-item a {
    text-decoration: none;
    font-weight: 500;
  }

  .area-price-whats {
    width: 100%;
    display: flex;
  }

  .icon-whats-price svg {
    color: #25d366 !important;
    width: 50px;
  }

  .old-price {
    font-size: 0.8em;
    color: gray;
    text-decoration: line-through;
  }

  .btn-buy {
    width: 100% !important;
  }

  .carousel-container {
    overflow: hidden;
    width: 100%;
    cursor: default !important;
    margin-top: 20px;
  }

}

@media (min-width: 1025px) {
  .product-list {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    /* mantém o scroll horizontal */
    scroll-snap-type: x mandatory;
    -ms-overflow-style: none;
    /* IE e Edge antigo */
    scrollbar-width: none;
    /* Firefox */
  }

  .product-list::-webkit-scrollbar {
    display: none;
    /* Chrome, Safari e Edge moderno */
  }

  .area-thumb-item-product {
    background-color: rgb(255, 255, 255);
    width: 100%;
    height: 200px;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
  }

  .area-thumb-item-product img {
    width: 100%;
    height: 100%;
    object-fit: contain;
  }

  .product-caption {
    margin-top: 20px !important;
    color: #000;
    height: 75px;
    font-size: 1em !important;
    overflow: hidden;
  }

  .product-item {
    flex: 0 0 calc(25% - 10px) !important;
    /* sempre 4 itens por vez */
    scroll-snap-align: start;
    min-height: 200px;
    max-height: max-content;
    background-color: #ffffff;
    padding: 15px !important;
    text-decoration: none;
  }

  .product-item a {
    text-decoration: none;
    font-weight: 500;
  }

  .area-price-whats {
    width: 100%;
    display: flex;
  }

  .icon-whats-price svg {
    color: #25d366 !important;
    width: 50px;
  }

  .old-price {
    font-size: 0.8em;
    color: gray;
    text-decoration: line-through;
  }

  .btn-buy {
    width: 100% !important;
  }

  .carousel-container {
    overflow: hidden;
    width: 100%;
    cursor: default !important;
    margin-top: 20px;
  }

  .carousel-container {
    position: relative;
    width: 100%;
    overflow: hidden;
    cursor: default !important;
  }

  .product-list {
    display: flex;
    gap: 15px;
    padding: 0;
    margin: 0;
    list-style: none;
    scroll-behavior: smooth;
    overflow-x: hidden;
    /* esconde barra */
  }

  .product-item {
    flex: 0 0 calc(20% - 10px);
    /* 5 itens por vez */
    scroll-snap-align: start;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 6px;
    text-align: center;
    user-select: none !important;
  }

  .carousel-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: #fff;
    color: #000;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    cursor: pointer;
    z-index: 10;
    opacity: 1;
    transition: 0.3s;
  }

  .carousel-arrow:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
  }

  .carousel-arrow.left {
    left: 5px;
  }

  .carousel-arrow.right {
    right: 5px;
  }

}
