/* components.css — Shared pieces: listing owner buttons, button spinner, page/home skeletons, verified badge.
   Moved out of the inline \3c style> in index.html (was lines 1685–1851). */

/* ── Button Spinner ── */
.btn-spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid transparent;
  border-top-color: currentColor;
  border-right-color: currentColor;
  border-radius: 50%;
  animation: spin 0.65s linear infinite;
  vertical-align: middle;
  flex-shrink: 0;
  opacity: 0.8;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ── Product page skeleton ── */
@keyframes skshimmer {
  0%   { background-position: -600px 0; }
  100% { background-position:  600px 0; }
}
.sk-pulse {
  background: linear-gradient(90deg, #f0f0f0 25%, #e4e4e4 50%, #f0f0f0 75%);
  background-size: 600px 100%;
  animation: skshimmer 1.3s ease-in-out infinite;
  border-radius: 10px;
}
.product-page-skeleton {
  display: none;
  padding: 0;
}
.product-page-skeleton .sk-img {
  width: 100%;
  height: 260px;
  border-radius: 14px;
  margin-bottom: 18px;
}
.product-page-skeleton .sk-details {
  padding: 0 4px;
}
.product-page-skeleton .sk-title {
  height: 22px;
  width: 70%;
  margin-bottom: 10px;
}
.product-page-skeleton .sk-price {
  height: 18px;
  width: 30%;
  margin-bottom: 18px;
}
.product-page-skeleton .sk-desc-line {
  height: 13px;
  margin-bottom: 8px;
}
.product-page-skeleton .sk-desc-line.w90 { width: 90%; }
.product-page-skeleton .sk-desc-line.w75 { width: 75%; }
.product-page-skeleton .sk-desc-line.w85 { width: 85%; }
.product-page-skeleton .sk-desc-line.w60 { width: 60%; }
.product-page-skeleton .sk-actions {
  margin-top: 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.product-page-skeleton .sk-btn {
  height: 46px;
  border-radius: 10px;
  width: 100%;
}

/* ── Skeleton placeholders for instant home load ── */
.skeleton-card {
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
.skeleton-card .sk-img {
  width: 100%; height: 120px;
  background: linear-gradient(90deg, #f0f0f0 25%, #e8e8e8 50%, #f0f0f0 75%);
  background-size: 600px 100%;
  animation: shimmer 1.2s infinite;
}
.skeleton-card .sk-line {
  height: 10px; margin: 8px 8px 4px;
  border-radius: 6px;
  background: linear-gradient(90deg, #f0f0f0 25%, #e8e8e8 50%, #f0f0f0 75%);
  background-size: 600px 100%;
  animation: shimmer 1.2s infinite;
}
.skeleton-card .sk-line.short { width: 55%; }
.skeleton-banner {
  min-width: 100%; width: 100%; height: calc(200px + env(safe-area-inset-top, 0px)); border-radius: 0;
  background: linear-gradient(90deg, #e8e8e8 25%, #d8d8d8 50%, #e8e8e8 75%);
  background-size: 600px 100%;
  animation: shimmer 1.2s infinite;
  flex-shrink: 0;
}
.skeleton-brand {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  flex-shrink: 0;
}
.skeleton-brand .sk-circle {
  width: 56px; height: 56px; border-radius: 50%;
  background: linear-gradient(90deg, #f0f0f0 25%, #e8e8e8 50%, #f0f0f0 75%);
  background-size: 600px 100%;
  animation: shimmer 1.2s infinite;
}
.skeleton-brand .sk-text {
  width: 44px; height: 8px; border-radius: 4px;
  background: linear-gradient(90deg, #f0f0f0 25%, #e8e8e8 50%, #f0f0f0 75%);
  background-size: 600px 100%;
  animation: shimmer 1.2s infinite;
}
.local-brands-verified-badge {
  display: inline-flex; align-items: center; gap: 3px;
  background: #dde4f0; color: #19378C;
  border: 1px solid #b8c4e0; border-radius: 20px;
  padding: 3px 9px; font-size: 11px; font-weight: 700;
  letter-spacing: .3px; vertical-align: middle;
  margin-left: 2px;
}
.local-brands-verified-badge .material-symbols-rounded { font-size: 13px; }
