/* skeleton animation fallback if not using Tailwind animate-pulse */
@keyframes mobile-pulse {
  0% {
    opacity: 1;
  }
  50% {
    opacity: 0.4;
  }
  100% {
    opacity: 1;
  }
}
.animate-pulse {
  animation: mobile-pulse 1.2s infinite;
}

/* modal basic */
.mobile-quickview {
  display: none;
}
.mobile-quickview .modal {
  z-index: 60;
  background: transparent;
}
.mobile-toast {
  z-index: 9999;
}

/* small accessibility focus */
.wishlist-btn:focus,
.quickview-btn:focus,
.ajax-add-to-cart:focus {
  box-shadow: 0 0 0 3px rgba(29, 164, 79, 0.15);
}

/* ensure product image fade */
.product-image.opacity-0 {
  transition: opacity 0.35s ease, transform 0.35s ease;
  transform: scale(1);
}
.product-image[data-loaded="true"] {
  opacity: 1;
}

/* Product card title clamp */
.product-card .product-title {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  height: 3rem; /* approx two lines */
}

.product-card {
  display: flex;
  flex-direction: column;
}

.product-card > div:last-child {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.product-card .price-wrap,
.product-card .price {
  min-height: 2.25rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Action buttons transition (desktop) */
.product-card .quickview-btn,
.product-card .wishlist-btn {
  transition: opacity 0.2s ease, transform 0.2s ease;
}

/* Ensure overlay add-to-cart is hidden on mobile */
.product-card .ajax-add-to-cart {
  display: inline-block;
}

/* Style for mobile inline add-to-cart */
.ajax-add-to-cart-mobile {
  background-color: #16a34a;
  border: none;
}

@media (min-width: 768px) {
  .ajax-add-to-cart-mobile {
    display: none;
  }
}
/*  */

/* Ensure card background and image area match across pages */
.product-card {
  background: #ffffff;
}
.product-card > div.relative {
  background: #fafafa; /* subtle image background to mask white-padded images */
}
