/**
 * AWL Melaka Integration Styles
 *
 * Ensures Advanced Woo Labels display correctly in Melaka UI blocks
 */

/* Ensure product containers can position labels */
.best-selling .product,
.hot-deals-products .product {
  position: relative;
}

/* Ensure product image containers can position labels */
.best-selling .product__image,
.hot-deals-products .product__image {
  position: relative;
}

/* AWL labels positioning and z-index */
.best-selling .advanced-woo-labels,
.hot-deals-products .advanced-woo-labels {
  z-index: 20; /* Above product image, below carousel navigation */
}

/* On-image position labels (absolute positioning) */
.product__image > .advanced-woo-labels {
  position: absolute !important;
  /* Let AWL's inline styles control top/left/right/bottom positioning */
  /* Don't override: top, left, right, bottom, transform */
}

/* Before/after title and price positions (relative positioning) */
.product__name > .advanced-woo-labels,
.price > .advanced-woo-labels {
  position: relative !important;
  display: inline-block;
  margin: 0 0 8px 0;
}

/* Prevent label interference with carousel drag */
.vanilla-carousel-track .advanced-woo-labels {
  pointer-events: none;
}

/* Allow clicks on label links if AWL has clickable labels */
.vanilla-carousel-track .advanced-woo-labels a {
  pointer-events: auto;
}

/* Ensure labels in cloned cells are visible */
.vanilla-carousel-cell .advanced-woo-labels {
  display: block !important;
  display: flex !important;
  visibility: visible !important;
  width: 100%;
  height: 100%;
  justify-content: flex-end !important;
}

/* Ensure labels don't interfere with product swatches */
.product__swatches-container {
  position: relative;
  z-index: 10;
}

/* Mobile responsive adjustments */
@media (max-width: 768px) {
  .vanilla-carousel-track .advanced-woo-labels {
    /* Adjust label size for mobile if needed */
    font-size: 0.9em;
  }

  .vanilla-carousel-track .awl-product-label {
    /* Adjust label padding for mobile */
    padding: 4px 8px;
  }
}
