/* ========== SHIMMER BASE ========== */
@keyframes sm-shimmer {
  0% { background-position: -468px 0; }
  100% { background-position: 468px 0; }
}

.sk,
.skeleton {
  background: linear-gradient(90deg, #ececec 0%, #f5f5f5 40%, #ececec 80%);
  background-size: 936px 100%;
  animation: sm-shimmer 1.4s ease-in-out infinite;
  border-radius: 8px;
  color: transparent !important;
  pointer-events: none;
  user-select: none;
}

.sk-line { height: 12px; margin-bottom: 8px; border-radius: 6px; }
.sk-line.sm { height: 10px; margin-bottom: 6px; }
.sk-line.lg { height: 16px; margin-bottom: 10px; }
.sk-line.xl { height: 22px; margin-bottom: 12px; }
.sk-line.short { width: 55%; }
.sk-line.med { width: 75%; }
.sk-line.full { width: 100%; }

.sk-img { display: block; width: 100%; border-radius: inherit; }
.sk-circle { border-radius: 50%; flex-shrink: 0; }
.sk-pill { height: 24px; width: 80px; border-radius: 50px; }
.sk-btn { height: 36px; width: 100%; border-radius: 50px; margin-top: 4px; }

/* ========== PRODUCT CARD SKELETON ========== */
.product-card.sk-card,
.sk-product-card {
  pointer-events: none; overflow: hidden;
  background: #fff; border: 1px solid #e5e7eb; border-radius: 14px;
  display: flex; flex-direction: column; height: 100%;
}
.sk-product-card .sk-img-wrap {
  height: 200px; background: #f3f4f6; position: relative;
}
.sk-product-card .sk-img-wrap .sk-img { height: 100%; border-radius: 0; }
.sk-product-card .sk-body { padding: 14px 15px 16px; flex: 1; display: flex; flex-direction: column; }
.sk-product-card .sk-rating { height: 12px; width: 90px; margin: 8px 0; }
.sk-product-card .sk-price { height: 18px; width: 110px; margin-bottom: 12px; }

.product-grid .sk-product-card,
.product-grid-6 .sk-product-card { height: 100%; }

.product-grid-6 .sk-product-card .sk-img-wrap,
.sk-grid .sk-product-card .sk-img-wrap { height: 180px; }

.ad-banner-card.is-skeleton {
  pointer-events: none;
  background: #f9fafb !important;
  background-image: none !important;
}

/* ========== HERO SKELETON ========== */
.sk-hero-slide {
  min-height: 320px; display: flex; align-items: center; justify-content: space-between;
  padding: 32px 40px; gap: 24px; background: #f3f4f6; border-radius: 20px;
}
.sk-hero-text { flex: 1; max-width: 420px; }
.sk-hero-img { width: 240px; height: 240px; border-radius: 16px; flex-shrink: 0; }

/* ========== CATEGORY SKELETON ========== */
.sk-cat-item { height: 14px; margin-bottom: 10px; border-radius: 6px; }
.sk-cat-card {
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  padding: 16px 10px; background: #fff; border: 1px solid #e5e7eb; border-radius: 14px;
}
.sk-cat-card .sk-circle { width: 56px; height: 56px; }
.sk-cat-card .sk-line { width: 70px; height: 10px; margin: 0; }

/* ========== BANNER SKELETON ========== */
.sk-banner-card {
  min-height: 280px; border-radius: 20px; border: 1px solid #e5e7eb;
  padding: 24px 20px; display: flex; flex-direction: column; align-items: center;
  justify-content: center; gap: 12px; background: #f9fafb;
}
.sk-banner-card .sk-img { width: 120px; height: 120px; border-radius: 12px; }
.sk-banner-card .sk-line.title { width: 140px; height: 16px; }
.sk-banner-card .sk-line.desc { width: 180px; height: 12px; }
.sk-banner-card .sk-btn { width: 120px; height: 32px; }

/* ========== BRAND STRIP ========== */
.sk-brand-strip { display: flex; flex-wrap: wrap; gap: 20px; justify-content: center; padding: 20px; }
.sk-brand-strip .sk-line { width: 90px; height: 28px; margin: 0; border-radius: 6px; }

/* ========== FILTER SKELETON ========== */
.sk-filter-row { height: 14px; margin-bottom: 10px; border-radius: 6px; }
.sk-filter-row:nth-child(odd) { width: 85%; }
.sk-filter-row:nth-child(even) { width: 70%; }

/* ========== PRODUCT DETAIL SKELETON ========== */
.sk-detail-wrap { padding: 24px 0 40px; }
.sk-detail-gallery .sk-main-img { width: 100%; height: 420px; border-radius: 16px; margin-bottom: 14px; }
.sk-detail-thumbs { display: flex; gap: 10px; }
.sk-detail-thumbs .sk { width: 72px; height: 72px; border-radius: 10px; flex-shrink: 0; }
.sk-detail-info { padding-top: 8px; }
.sk-detail-info .sk-line.cat { width: 120px; height: 10px; }
.sk-detail-info .sk-line.title { width: 90%; height: 28px; margin: 12px 0; }
.sk-detail-info .sk-line.price { width: 160px; height: 24px; }
.sk-detail-info .sk-line.desc { width: 100%; height: 12px; }
.sk-detail-info .sk-btn-row { display: flex; gap: 10px; margin-top: 20px; }
.sk-detail-info .sk-btn-row .sk { height: 46px; border-radius: 50px; flex: 1; }
.sk-detail-info .sk-btn-row .sk.sq { flex: 0 0 46px; width: 46px; border-radius: 12px; }

/* ========== TRACKING SKELETON ========== */
.sk-order-card {
  background: #fff; border: 1px solid #e5e7eb; border-radius: 20px;
  padding: 20px 24px; margin-bottom: 14px;
}
.sk-tracking-card {
  background: #fff; border: 1px solid #e5e7eb; border-radius: 20px; padding: 30px;
}
.sk-timeline-h { display: flex; gap: 0; padding: 16px 0; overflow: hidden; }
.sk-timeline-step { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 8px; min-width: 90px; }
.sk-timeline-step .sk-circle { width: 38px; height: 38px; }
.sk-timeline-step .sk-line { width: 70px; height: 10px; margin: 0; }

/* ========== SEARCH SUGGESTIONS ========== */
.sk-search-item {
  display: flex; align-items: center; gap: 12px; padding: 10px 14px;
  border-bottom: 1px solid #f3f4f6;
}
.sk-search-item .sk { width: 52px; height: 52px; border-radius: 8px; flex-shrink: 0; }
.sk-search-item .sk-lines { flex: 1; }
.sk-search-item .sk-price { width: 60px; height: 14px; flex-shrink: 0; }

/* ========== CHECKOUT (optional lines) ========== */
.sk-checkout-item {
  display: flex; gap: 12px; padding: 12px 0; border-bottom: 1px solid #f3f4f6;
}
.sk-checkout-item .sk { width: 56px; height: 56px; border-radius: 10px; flex-shrink: 0; }

@media (max-width: 768px) {
  .sk-hero-slide { flex-direction: column; min-height: 280px; padding: 24px; text-align: center; }
  .sk-hero-img { width: 180px; height: 180px; }
  .sk-detail-gallery .sk-main-img { height: 300px; }
}
