/* ===== PRODUCT SKELETON ===== */

.skeleton-wrapper {
  padding: 16px;
}

.skeleton-section {
  margin-bottom: 24px;
}

.skeleton-title {
  width: 140px;
  height: 18px;
  background: #eee;
  border-radius: 6px;
  margin-bottom: 12px;
}

.skeleton-products {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

/* Card mengikuti .product */
.product.skeleton-product {
  pointer-events: none;
}
.skeleton-product {
  border-radius: 12px;
  background: #fff;
  overflow: hidden;
}

/* Image */
.skeleton-image {
  width: 100%;
  height: 140px;
  background: #eee;
}

/* Body */
.skeleton-body {
  padding: 10px;
}

.skeleton-line {
  height: 14px;
  background: #eee;
  border-radius: 6px;
  margin-bottom: 8px;
}

.skeleton-line.w-80 { width: 80%; }
.skeleton-line.w-60 { width: 60%; }
.skeleton-line.w-40 { width: 40%; }

/* Shimmer */
.skeleton-animate {
  background: linear-gradient(
    90deg,
    #eee 25%,
    #f5f5f5 37%,
    #eee 63%
  );
  background-size: 400% 100%;
  animation: shimmer 1.3s infinite linear;
}

@keyframes shimmer {
  0% { background-position: 100% 0; }
  100% { background-position: -100% 0; }
}

.product,
.skeleton-product {
  min-height: 230px;
}

/* saat masih skeleton */
.lazy-img {
  background: linear-gradient(
    90deg,
    #eee 25%,
    #f5f5f5 37%,
    #eee 63%
  );
  background-size: 400% 100%;
  animation: shimmer 1.3s infinite linear;
}

.carousel-img {
  width: 100%;
  height: 320px;
  object-fit: cover;
  background: #eee;
}

/* skeleton */
.lazy-carousel {
  background: linear-gradient(
    90deg,
    #eee 25%,
    #f5f5f5 37%,
    #eee 63%
  );
  background-size: 400% 100%;
  animation: shimmer 1.3s infinite linear;
}


/* blur saat image baru muncul */
.lazy-img.is-loading {
  filter: blur(12px);
  transform: scale(1.05);
}

/* saat image siap */
.lazy-img.is-loaded {
  filter: blur(0);
  transform: scale(1);
  transition: filter 0.4s ease, transform 0.4s ease;
}

/* optional fade */
.lazy-img {
  transition: opacity 0.3s ease;
}

.lazy-img.is-loaded {
  opacity: 1;
}