/**
 * Skeleton Loading States - Modern loading placeholders
 * Similar to Flipkart/Amazon skeleton screens
 */

/* Skeleton Base */
.skeleton {
  background: linear-gradient(
    90deg,
    #f0f0f0 25%,
    #e0e0e0 50%,
    #f0f0f0 75%
  );
  background-size: 200% 100%;
  animation: skeleton-loading 1.5s ease-in-out infinite;
  border-radius: 0.5rem;
  overflow: hidden;
}

@keyframes skeleton-loading {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

/* Product Card Skeleton */
.skeleton-product-card {
  background: white;
  border-radius: 1rem;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  transition: transform 0.2s;
}

.skeleton-product-image {
  width: 100%;
  height: 200px;
  background: linear-gradient(
    90deg,
    #f0f0f0 25%,
    #e0e0e0 50%,
    #f0f0f0 75%
  );
  background-size: 200% 100%;
  animation: skeleton-loading 1.5s ease-in-out infinite;
}

.skeleton-product-content {
  padding: 1rem;
}

.skeleton-product-title {
  height: 1.25rem;
  width: 80%;
  margin-bottom: 0.75rem;
  border-radius: 0.25rem;
}

.skeleton-product-price {
  height: 1.5rem;
  width: 40%;
  margin-bottom: 0.5rem;
  border-radius: 0.25rem;
}

.skeleton-product-rating {
  height: 1rem;
  width: 30%;
  border-radius: 0.25rem;
}

/* Product Grid Skeleton */
.skeleton-products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1.5rem;
  padding: 1rem;
}

/* Search Bar Skeleton */
.skeleton-search {
  height: 3.5rem;
  width: 100%;
  border-radius: 9999px;
  margin-bottom: 1rem;
}

/* Category Skeleton */
.skeleton-category {
  height: 2rem;
  width: 100px;
  border-radius: 0.5rem;
  margin-right: 1rem;
}

.skeleton-categories {
  display: flex;
  gap: 1rem;
  padding: 1rem;
  overflow-x: auto;
}

/* Banner Skeleton */
.skeleton-banner {
  height: 300px;
  width: 100%;
  border-radius: 1rem;
  margin: 1rem 0;
}

/* Text Skeleton Variants */
.skeleton-text {
  height: 1rem;
  border-radius: 0.25rem;
}

.skeleton-text-sm {
  height: 0.875rem;
  width: 60%;
}

.skeleton-text-md {
  height: 1rem;
  width: 80%;
}

.skeleton-text-lg {
  height: 1.25rem;
  width: 100%;
}

.skeleton-text-xl {
  height: 1.5rem;
  width: 100%;
}

/* Button Skeleton */
.skeleton-button {
  height: 2.5rem;
  width: 120px;
  border-radius: 0.5rem;
}

/* Avatar Skeleton */
.skeleton-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
}

/* Card Skeleton */
.skeleton-card {
  background: white;
  border-radius: 1rem;
  padding: 1.5rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.skeleton-card-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.skeleton-card-title {
  flex: 1;
  height: 1.5rem;
  border-radius: 0.25rem;
}

.skeleton-card-content {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

/* List Skeleton */
.skeleton-list-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  border-bottom: 1px solid #f1f5f9;
}

.skeleton-list-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
}

.skeleton-list-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

/* Fade In Animation */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.skeleton-fade-in {
  animation: fadeIn 0.3s ease-out;
}

/* Pulse Animation (Alternative) */
@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

.skeleton-pulse {
  animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* Responsive Skeleton */
@media (max-width: 768px) {
  .skeleton-products-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 1rem;
  }
  
  .skeleton-product-image {
    height: 150px;
  }
}

