/* Skeleton loading indicators */
.skeleton {
  position: relative;
  overflow: hidden;
}
.skeleton__bar {
  position: relative;
  overflow: hidden;
  background: #e2e2e2;
  border-radius: 4px;
  margin-bottom: 0.5rem;
}
.skeleton__bar::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.6), transparent);
  animation: skeleton-shimmer 1.4s infinite;
}
@keyframes skeleton-shimmer {
  0%   { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

/* --- Product card grid skeleton (matches prod-card-grid layout) --- */
.skeleton-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
}
.skeleton-card {
  border-radius: 8px;
  overflow: hidden;
}
.skeleton-card__thumb {
  width: 100%;
  aspect-ratio: 1 / 1;
  background: #dcdcdc;
  border-radius: 8px;
}
.skeleton-card__brand {
  width: 60%;
  height: 0.75rem;
  margin: 0.75rem 0 0.4rem;
}
.skeleton-card__code {
  width: 40%;
  height: 0.6rem;
  margin-bottom: 0.4rem;
}
.skeleton-card__name {
  width: 100%;
  height: 0.85rem;
  margin-bottom: 0.3rem;
}
.skeleton-card__price {
  width: 50%;
  height: 1.1rem;
}

/* --- Product detail offer skeleton --- */
.skeleton-product-detail {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-top: 1rem;
}
.skeleton-product-detail__image {
  width: 100%;
  aspect-ratio: 1 / 1;
  background: #dcdcdc;
  border-radius: 8px;
}
.skeleton-product-detail__name {
  width: 80%;
  height: 1.2rem;
  margin-top: 1rem;
}
.skeleton-product-detail__code {
  width: 50%;
  height: 0.7rem;
  margin-top: 0.5rem;
}
.skeleton-product-detail__price {
  width: 60%;
  height: 1.5rem;
  margin-top: 1rem;
}
.skeleton-product-detail__qty {
  width: 40%;
  height: 2.5rem;
  margin-top: 1rem;
}

/* --- Basket popup skeleton --- */
.skeleton-basket {
  padding: 1rem;
}
.skeleton-basket__item {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}
.skeleton-basket__thumb {
  width: 2.5rem;
  height: 2.5rem;
  flex-shrink: 0;
  background: #dcdcdc;
  border-radius: 4px;
}
.skeleton-basket__name {
  width: 70%;
  height: 0.8rem;
  margin-bottom: 0.3rem;
}
.skeleton-basket__price {
  width: 40%;
  height: 0.6rem;
}
.skeleton-basket__total {
  width: 80%;
  height: 1rem;
  margin-top: 0.5rem;
}

/* --- Filter catalog list skeleton (full-width placeholder) --- */
.skeleton-catalog-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 1rem 0;
}
.skeleton-catalog-list__row {
  height: 2rem;
}

/* --- Spinner (small) --- */
.skeleton-spinner {
  display: inline-block;
  width: 1.2rem;
  height: 1.2rem;
  border: 2px solid #ccc;
  border-top-color: #555;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* --- Fade-out utility --- */
.skeleton-hidden {
  opacity: 0;
  transition: opacity .3s ease;
}