/**
 * AngelLust - Product Cards & Boutique Grid UI
 * Clean 42Lolita Boutique Architecture (UI Only)
 * Version: 1.0.0
 */

/* ==========================================================================
   1. UNIFORM ASPECT RATIO ENFORCEMENT (3:4 PORTRAIT)
   ========================================================================== */
ul.products li.product figure,
ul.products li.product .ct-media-container,
.alpc-card figure,
.alpc-card .ct-media-container,
.wc-block-grid__product-image,
.wc-block-components-product-image {
  position: relative !important;
  display: block !important;
  width: 100% !important;
  aspect-ratio: var(--alpc-aspect-ratio, 3 / 4) !important;
  overflow: hidden !important;
  border-radius: 4px !important;
  background-color: #f7f7f7 !important;
  margin-bottom: 8px !important;
  box-sizing: border-box !important;
}

/* Primary Image - Locked to 3:4, no hover distortion, perfectly stable */
ul.products li.product figure img,
ul.products li.product .ct-media-container img,
ul.products li.product figure a img,
ul.products li.product img.wp-post-image,
.alpc-card img.wp-post-image,
.wc-block-grid__product-image img,
.wc-block-components-product-image img {
  position: relative !important;
  top: 0 !important;
  left: 0 !important;
  width: 100% !important;
  height: 100% !important;
  max-width: 100% !important;
  max-height: 100% !important;
  aspect-ratio: var(--alpc-aspect-ratio, 3 / 4) !important;
  object-fit: cover !important;
  object-position: center !important;
  display: block !important;
  margin: 0 !important;
  padding: 0 !important;
  transform: none !important;
  transition: none !important;
}

/* Strictly disable any hover zoom, scaling, or expansion on images */
ul.products li.product:hover img,
ul.products li.product:hover figure img,
ul.products li.product:hover .ct-media-container img,
ul.products li.product .ct-media-container:hover img,
ul.products li.product figure:hover img,
.alpc-card:hover img,
.has-hover-effect:hover img,
.has-hover-effect img {
  transform: none !important;
  scale: 1 !important;
  transition: none !important;
}

/* Ensure no secondary image or swap elements appear */
.alpc-secondary-image-wrap,
.alpc-secondary-image,
.ct-swap-image,
.ct-image-container-second,
.secondary-image,
.product-image-hover {
  display: none !important;
}

/* ==========================================================================
   2. UNIFORM 2-LINE TITLE CLAMPING & PETITE SCALE
   ========================================================================== */
ul.products li.product .woocommerce-loop-product__title,
ul.products li.product h2,
ul.products li.product h3,
.wc-block-grid__product-title,
.wc-block-components-product-title {
  font-family: var(--al-font-ui, 'Figtree', sans-serif) !important;
  font-size: var(--alpc-title-font-size, 12.5px) !important;
  font-weight: 500 !important;
  line-height: 1.4 !important;
  color: var(--alpc-color-text, #1a1a1a) !important;
  letter-spacing: -0.01em !important;
  margin: 4px 0 6px 0 !important;
  padding: 0 !important;
  text-align: left !important;
  aspect-ratio: auto !important;
  background: transparent !important;

  /* Strict Line Clamping */
  display: -webkit-box !important;
  -webkit-box-orient: vertical !important;
  -webkit-line-clamp: var(--alpc-title-clamp, 2) !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  height: calc(var(--alpc-title-font-size, 12.5px) * 1.4 * var(--alpc-title-clamp, 2)) !important;
  min-height: calc(var(--alpc-title-font-size, 12.5px) * 1.4 * var(--alpc-title-clamp, 2)) !important;
  max-height: calc(var(--alpc-title-font-size, 12.5px) * 1.4 * var(--alpc-title-clamp, 2)) !important;
  transition: color 0.2s ease;
}

ul.products li.product .woocommerce-loop-product__title a,
ul.products li.product h2 a,
ul.products li.product h3 a,
ul.products li.product a.woocommerce-loop-product__link,
ul.products li.product a.woocommerce-LoopProduct-link {
  color: inherit !important;
  text-decoration: none !important;
  display: inline !important;
  aspect-ratio: auto !important;
  width: auto !important;
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  background: transparent !important;
  margin: 0 !important;
  padding: 0 !important;
  border-radius: 0 !important;
  overflow: visible !important;
}

ul.products li.product:hover .woocommerce-loop-product__title,
ul.products li.product:hover .woocommerce-loop-product__title a {
  color: var(--alpc-color-sale, #913b59) !important;
}

/* ==========================================================================
   3. SINGLE MICRO-BRAND / SERIES TAG
   ========================================================================== */
.al-micro-vendor-tag,
.alpc-micro-tag {
  font-family: var(--al-font-ui, 'Figtree', sans-serif) !important;
  font-size: 10.5px !important;
  font-weight: 600 !important;
  text-transform: uppercase !important;
  letter-spacing: 1px !important;
  color: var(--alpc-color-subdued, #777777) !important;
  margin: 6px 0 2px 0 !important;
  line-height: 1.2 !important;
  display: block !important;
  text-align: left !important;
}

/* ==========================================================================
   4. DELICATE BOUTIQUE BADGES (SALE, PRE-ORDER, SOLD OUT)
   ========================================================================== */
.alpc-badges-wrap {
  position: absolute !important;
  top: 8px !important;
  left: 8px !important;
  z-index: 4 !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 4px !important;
  pointer-events: none !important;
}

.alpc-badge {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-family: var(--al-font-ui, 'Figtree', sans-serif) !important;
  line-height: 1 !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06) !important;
}

/* Pastel Pink Style (Default Angel Lust Signature) */
.alpc-badges-pastel-pink .alpc-badge-sale {
  background: var(--alpc-color-badge-pink-bg, #ffecf2) !important;
  color: var(--alpc-color-badge-pink-text, #a84368) !important;
  border: 1px solid var(--alpc-color-badge-pink-border, #f9ccd9) !important;
  border-radius: 999px !important;
  font-size: 10px !important;
  font-weight: 700 !important;
  padding: 3px 8px !important;
  text-transform: uppercase !important;
  letter-spacing: 0.2px !important;
}

.alpc-badges-pastel-pink .alpc-badge-preorder {
  background: rgba(26, 26, 26, 0.85) !important;
  color: #ffffff !important;
  border-radius: 3px !important;
  font-size: 9.5px !important;
  font-weight: 600 !important;
  padding: 3px 6px !important;
  text-transform: uppercase !important;
  letter-spacing: 0.5px !important;
}

.alpc-badges-pastel-pink .alpc-badge-soldout {
  background: #f3f3f3 !important;
  color: #777777 !important;
  border: 1px solid #e2e2e2 !important;
  border-radius: 3px !important;
  font-size: 9.5px !important;
  font-weight: 600 !important;
  padding: 3px 6px !important;
  text-transform: uppercase !important;
}

/* Dark Luxury Style */
.alpc-badges-dark-luxury .alpc-badge {
  background: #1a1a1a !important;
  color: #ffffff !important;
  border: none !important;
  border-radius: 2px !important;
  font-size: 9.5px !important;
  font-weight: 600 !important;
  padding: 3px 7px !important;
  letter-spacing: 0.5px !important;
}

/* Outline Style */
.alpc-badges-outline .alpc-badge {
  background: #ffffff !important;
  color: #1a1a1a !important;
  border: 1px solid #1a1a1a !important;
  border-radius: 2px !important;
  font-size: 9.5px !important;
  font-weight: 600 !important;
  padding: 2px 6px !important;
  letter-spacing: 0.5px !important;
}

/* Unconditionally hide all theme & WooCommerce default duplicate sale badges */
ul.products li.product span.onsale,
ul.products li.product .onsale,
ul.products li.product figure span.onsale,
ul.products li.product figure .onsale,
ul.products li.product .ct-woo-badge-container,
.wc-block-grid__product-onsale {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
}

/* ==========================================================================
   5. HIGH-CONTRAST PRICE HIERARCHY (42LOLITA SIGNATURE LAYOUT)
   ========================================================================== */
ul.products li.product .price,
.wc-block-grid__product-price {
  font-family: var(--al-font-ui, 'Figtree', sans-serif) !important;
  font-size: 13.5px !important;
  line-height: 1.3 !important;
  margin: 0 !important;
  text-align: left !important;
  display: flex !important;
  align-items: baseline !important;
  gap: 6px !important;
  flex-wrap: wrap !important;
}

/* 42Lolita Container: [Sale Price] [Strikethrough Regular] [XX% OFF] */
.alpc-price-42lolita {
  display: inline-flex !important;
  align-items: baseline !important;
  gap: 6px !important;
  flex-wrap: wrap !important;
  line-height: 1.3 !important;
}

/* 1. Current Active Sale Price (Bold, Black) */
.alpc-price-current,
.alpc-price-current .amount,
.alpc-price-current bdi,
ul.products li.product .price ins,
ul.products li.product .price ins .amount,
ul.products li.product .price ins bdi {
  color: #111111 !important;
  font-size: 13.5px !important;
  font-weight: 700 !important;
  text-decoration: none !important;
}

/* 2. Original Regular Price (Strikethrough, Grey) */
.alpc-price-original,
.alpc-price-original .amount,
.alpc-price-original bdi,
ul.products li.product .price del,
ul.products li.product .price del .amount,
ul.products li.product .price del bdi,
ul.products li.product .price .sale-price del,
ul.products li.product .price .sale-price del .amount {
  color: #888888 !important;
  font-size: 11.5px !important;
  font-weight: 400 !important;
  text-decoration: line-through !important;
  opacity: 0.7 !important;
}

/* 3. Discount Percentage Badge (42Lolita Signature Vibrant Red) */
.alpc-price-discount {
  color: #e53935 !important;
  font-size: 11.5px !important;
  font-weight: 700 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.2px !important;
}

/* Clean up card spacing */
ul.products li.product {
  text-align: left !important;
  margin-bottom: 24px !important;
}
