/**
 * REF Skeleton Loading v8.0.80
 * [v8.0.80] Substituiu ref-grid-loading-overlay por skeleton cards
 * Previne CLS: mesma estrutura visual do card real
 */

/* ═══════════════════════════════════════════════════════════
   SKELETON CARDS (substitui .ref-grid-loading-overlay)
   ═══════════════════════════════════════════════════════════ */

.ref-skeleton-card {
    background: var(--ref-card-bg, #fff);
    border-radius: var(--ref-radius, 12px);
    overflow: hidden;
    box-shadow: var(--ref-card-shadow, 0 2px 8px rgba(0,0,0,0.06));
    /* Mesma altura mínima do card real para evitar CLS */
    min-height: 380px;
    display: flex;
    flex-direction: column;
}

/* Thumbnail placeholder (aspect ratio 3:2) */
.ref-skeleton-thumb {
    width: 100%;
    aspect-ratio: 3 / 2;
    background: linear-gradient(110deg, #f0f0f0 8%, #e8e8e8 18%, #f0f0f0 33%);
    background-size: 200% 100%;
    animation: ref-skeleton-shimmer 1.5s ease-in-out infinite;
}

/* Body placeholder */
.ref-skeleton-body {
    padding: var(--ref-card-padding, 16px);
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex: 1;
}

/* Lines placeholder */
.ref-skeleton-line {
    height: 14px;
    background: linear-gradient(110deg, #f0f0f0 8%, #e8e8e8 18%, #f0f0f0 33%);
    background-size: 200% 100%;
    animation: ref-skeleton-shimmer 1.5s ease-in-out infinite;
    border-radius: 4px;
}

.ref-skeleton-line.title {
    height: 18px;
    width: 85%;
}

.ref-skeleton-line.short {
    width: 50%;
}

.ref-skeleton-line.price {
    height: 22px;
    width: 40%;
    margin-top: auto;
}

/* ═══════════════════════════════════════════════════════════
   SHIMMER ANIMATION
   ═══════════════════════════════════════════════════════════ */

@keyframes ref-skeleton-shimmer {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

/* ═══════════════════════════════════════════════════════════
   GRID SKELETON STATE
   ═══════════════════════════════════════════════════════════ */

.ref-skeleton-active {
    pointer-events: none; /* Evita cliques durante skeleton */
}

/* Transição suave skeleton → conteúdo */
.ref-skeleton-fade-out .ref-skeleton-card {
    opacity: 0;
    transition: opacity 0.2s ease-out;
}