/* Conteneur principal - pleine largeur */
.bwc-carousel-wrapper {
  position: relative;
  width: 100vw;
  max-width: 100vw;
  margin: 0 calc(50% - 50vw);
  overflow: hidden;
}

.bwc-carousel-container {
  position: relative;
  width: 100%;
  overflow: hidden;
}

.bwc-carousel-track-container {
  overflow: hidden;
  position: relative;
  width: 100%;
  cursor: grab;
  cursor: -webkit-grab;
}

.bwc-carousel-track.products {
  display: flex;
  flex-wrap: nowrap;
  gap: 1.25rem;
  align-items: stretch;
  list-style: none;
  margin: 0;
  padding: 0;
  will-change: transform;
  transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  padding: 2rem 0;
  cursor: grab;
  cursor: -webkit-grab;
}

.bwc-carousel-track.is-dragging {
  transition: none;
  cursor: grabbing;
  cursor: -webkit-grabbing;
  user-select: none;
}

.bwc-carousel-track.is-dragging *,
.bwc-carousel-track-container.is-dragging,
.bwc-carousel-track-container.is-dragging * {
  cursor: grabbing !important;
  cursor: -webkit-grabbing !important;
}

.bwc-carousel-track.paused {
  animation-play-state: paused;
}

.bwc-carousel-track > .product {
  flex: 0 0 auto;
  width: 320px;
  min-width: 320px;
  margin: 0;
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
  position: relative;
}

.bwc-carousel-track > .product:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

.bwc-carousel-wrapper .product figure {
  position: relative;
  margin: 0;
  overflow: hidden;
  background: transparent;
}

.bwc-carousel-wrapper .product figure::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 0.8rem;
  background-image: url("/wp-content/uploads/2025/12/wave-edge.svg");
  background-repeat: repeat-x;
  background-size: auto 100%;
  z-index: 2;
}

.bwc-carousel-wrapper .product figure a,
.bwc-carousel-wrapper .product figure img {
  aspect-ratio: 16 / 10;
  object-fit: cover;
  width: 100%;
  display: block;
  transition: transform 0.4s ease;
}

.bwc-carousel-wrapper .product:hover figure img {
  transform: scale(1.05);
}

/* Contenu - titre et prix sur la même ligne */
.bwc-carousel-wrapper .product .woocommerce-loop-product__link {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 1rem;
  text-decoration: none;
}

.bwc-carousel-wrapper .product .bwc-product-info {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.bwc-carousel-wrapper .woocommerce-loop-product__title {
  font-size: 15px;
  font-weight: 500;
  color: #4b574b;
  line-height: 1.4;
  margin: 0;
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  line-clamp: 2;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.bwc-carousel-wrapper .woocommerce-loop-product__title a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s ease;
}

.bwc-carousel-wrapper .product:hover .woocommerce-loop-product__title a {
  color: var(--theme-link-hover-color, #2c7a51);
}

.bwc-carousel-wrapper .price {
  font-size: 16px;
  font-weight: 600;
  color: #2c7a51;
  white-space: nowrap;
  margin: 0;
  flex-shrink: 0;
}

/* Masquer les boutons et éléments superflus */
.bwc-carousel-wrapper .product .button,
.bwc-carousel-wrapper .product .add_to_cart_button,
.bwc-carousel-wrapper .product .product_type_simple,
.bwc-carousel-wrapper .product .product_type_variable,
.bwc-carousel-wrapper .product .product_type_grouped,
.bwc-carousel-wrapper .product .product_type_external,
.bwc-carousel-wrapper .product .added_to_cart,
.bwc-carousel-wrapper .product .woocommerce-loop-product__button,
.bwc-carousel-wrapper .product .add-to-cart-button,
.bwc-carousel-wrapper .product .ajax_add_to_cart,
.bwc-carousel-wrapper .product a.button,
.bwc-carousel-wrapper .product button.button,
.bwc-carousel-wrapper .product .product-action-buttons,
.bwc-carousel-wrapper .product .woocommerce-loop-product__actions,
.bwc-carousel-wrapper .product .product-buttons,
.bwc-carousel-wrapper .product .add-to-wishlist,
.bwc-carousel-wrapper .product .compare,
.bwc-carousel-wrapper .product .quick-view {
  display: none !important;
  visibility: hidden !important;
}

/* Media Queries */
@media (max-width: 1200px) {
  .bwc-carousel-track > .product {
    width: 280px;
    min-width: 280px;
  }
}

@media (max-width: 768px) {
  .bwc-carousel-track > .product {
    width: 240px;
    min-width: 240px;
  }

  .bwc-carousel-track.products {
    gap: 1rem;
  }

  .bwc-carousel-wrapper .woocommerce-loop-product__title {
    font-size: 14px;
  }

  .bwc-carousel-wrapper .price {
    font-size: 15px;
  }
}

@media (max-width: 480px) {
  .bwc-carousel-track > .product {
    width: 200px;
    min-width: 200px;
  }

  .bwc-carousel-wrapper .product .woocommerce-loop-product__link {
    padding: 0.75rem;
  }

  .bwc-carousel-wrapper .woocommerce-loop-product__title {
    font-size: 13px;
  }

  .bwc-carousel-wrapper .price {
    font-size: 14px;
  }
}

.bwc-carousel-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid rgba(0, 0, 0, 0.1);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
}

.bwc-carousel-arrow:hover {
  background: #fff;
  transform: translateY(-50%) scale(1.1);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.bwc-carousel-arrow:active {
  transform: translateY(-50%) scale(0.95);
}

.bwc-carousel-arrow svg {
  width: 24px;
  height: 24px;
  color: #333;
}

.bwc-carousel-prev {
  left: 1rem;
}

.bwc-carousel-next {
  right: 1rem;
}

.bwc-carousel-arrow:focus-visible {
  outline: 3px solid #2c7a51;
  outline-offset: 2px;
}

@media (max-width: 768px) {
  .bwc-carousel-arrow {
    width: 40px;
    height: 40px;
  }

  .bwc-carousel-arrow svg {
    width: 20px;
    height: 20px;
  }

  .bwc-carousel-prev {
    left: 0.5rem;
  }

  .bwc-carousel-next {
    right: 0.5rem;
  }
}

.bwc-carousel-wrapper.loading {
  opacity: 0.6;
  pointer-events: none;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.bwc-carousel-wrapper {
  animation: fadeIn 0.6s ease-out;
}

@media (prefers-reduced-motion: reduce) {
  .bwc-carousel-track,
  .bwc-carousel-arrow {
    transition: none;
    animation: none;
  }

  .bwc-carousel-track {
    animation-play-state: paused;
  }

  .bwc-carousel-wrapper {
    animation: none;
  }
}
