/* ===== CAROUSEL ARTICLES ===== */
.wallaby-carousel-wrapper {
  position: relative;
  overflow: hidden;
  padding: 0 1rem;
}

/* ===== Carousel Container ===== */
.is-product-collection-layout-carousel {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  gap: 1rem;
  padding-bottom: 1rem;
  margin: 0 auto;
}

/* ===== Article Item ===== */
.article-item {
  position: relative;
  flex: 0 0 calc(50% - 0.5rem); /* 2 par ligne sur desktop */
  overflow: hidden;
  scroll-snap-align: start;
}

/* ===== Image Wrapper ===== */
.article-image-wrapper {
  position: relative;
  width: 100%;
  padding-bottom: 50%; /* ratio 2:1 */
  overflow: hidden;
}

.article-image-wrapper img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.article-image-wrapper img:hover {
  transform: scale(1.05);
}

/* ===== Overlay ===== */
.article-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(0,0,0,0.6);
  color: #fff;
  padding: 1rem;
  box-sizing: border-box;
}

.article-overlay h3,
.article-overlay h3 a {
  margin: 0 0 0.5rem 0;
  font-size: 1.1rem;
  color: #fff !important;
  font-weight: bold !important; 
}

.article-overlay p {
  margin: 0;
  font-size: 0.9rem;
}

/* Cacher la scrollbar pour tous les navigateurs */
.is-product-collection-layout-carousel {
  -ms-overflow-style: none;  /* IE et Edge */
  scrollbar-width: none;      /* Firefox */
}

.is-product-collection-layout-carousel::-webkit-scrollbar {
  display: none;             /* Chrome, Safari, Opera */
}

/* ===== Buttons ===== */
.wc-block-next-previous-buttons {
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  display: flex;
  justify-content: space-between;
  transform: translateY(-50%);
  pointer-events: none;
  padding: 0 0.5rem;
  z-index: 10;
}

.wc-block-next-previous-buttons__button {
  pointer-events: all;
  background: rgba(0,0,0,0.25);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  color: white;
  font-size: 20px;
  border: none;
  cursor: pointer;
}

.wc-block-next-previous-buttons__button:hover {
  background: rgba(0,0,0,0.4);
}


/* ===== Responsive ===== */
@media (max-width: 768px) {
  .article-item {
    flex: 0 0 100%; /* 1 article par ligne sur mobile */
  }
}
@media (max-width: 768px) {
  .article-item {
    flex: 0 0 100%; /* 1 article par ligne sur mobile */
  }

  /* Cacher l'extrait sur mobile */
  .article-overlay p {
    display: none;
  }
}