/* Brand Carousel Styles for WooCommerce Brand Tiles */

/* Container with negative margins to offset slide gutters */
.brand-carousel {
  margin: 0 -10px;
  padding: 0;
}
.brand-carousel .slick-list,
.brand-carousel .slick-track {
  display: flex !important;
  align-items: stretch !important;
}

/* Each slide has horizontal gutters */
.brand-carousel .slick-slide {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex: 1;
  padding: 0 10px;
  box-sizing: border-box;
}
.brand-carousel .slick-slide > div {
  flex: 1;
  display: flex;
  align-items: stretch;
}

/* Tile wrapper */
.brand-carousel .brand-item {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  transition: box-shadow 0.2s ease;
  list-style: none;
}

/* Background image element */
.brand-carousel .brand-item .brand-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
  pointer-events: none;
}

/* Hover shadow */
.brand-carousel .brand-item:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Dark overlay */
.brand-carousel .brand-item::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.3);
  transition: background 0.3s ease;
  z-index: 2;
}
.brand-carousel .brand-item:hover::before {
  background: rgba(0, 0, 0, 0.5);
}

/* Centered logo wrapper */
.brand-carousel .brand-logo-wrap {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  max-width: 70%;
  max-height: 70%;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
}
.brand-carousel .brand-logo-wrap img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  display: block;
  transition: transform 0.3s ease;
  transform-origin: center;
}
.brand-carousel .brand-item:hover .brand-logo-wrap img {
  transform: scale(0.8);
}

/* Placeholder for no-image brands */
.brand-carousel .brand-item.no-image::before {
  background: rgba(0, 0, 0, 0.1);
}
.brand-carousel .brand-item.no-image .brand-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #777;
  font-size: 1rem;
  z-index: 3;
}

/* Hide textual overlays */
.brand-carousel .brand-title,
.brand-carousel .brand-description {
  display: none;
}

/* Slick arrows styling */
.brand-carousel .slick-prev,
.brand-carousel .slick-next {
  width: 30px;
  height: 30px;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 4;
}
.brand-carousel .slick-prev:before,
.brand-carousel .slick-next:before {
  content: '';
  display: inline-block;
  width: 10px;
  height: 10px;
  border-top: 2px solid #333;
  border-right: 2px solid #333;
}
.brand-carousel .slick-prev:before { transform: rotate(-135deg); }
.brand-carousel .slick-next:before { transform: rotate(45deg); }

/* Dots positioning */
.brand-carousel .slick-dots {
  bottom: -25px;
}

/* Responsive: adjust aspect ratio for mobile */
@media (max-width: 768px) {
  .brand-carousel .brand-item {
    aspect-ratio: 4 / 3;
  }
}
