/* ============================================
   SKELETON LOADERS - Placeholders Animados
   ============================================ */

/* Animação de shimmer */
@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }
    100% {
        background-position: 1000px 0;
    }
}

.skeleton {
    background: linear-gradient(
        90deg,
        #f0f0f0 0%,
        #e0e0e0 20%,
        #f0f0f0 40%,
        #f0f0f0 100%
    );
    background-size: 1000px 100%;
    animation: shimmer 2s infinite linear;
    border-radius: 8px;
}

/* Skeleton para produtos */
.skeleton-product-card {
    background: white;
    border-radius: 12px;
    padding: 1rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.skeleton-product-image {
    width: 100%;
    height: 200px;
    margin-bottom: 1rem;
}

.skeleton-product-title {
    height: 20px;
    width: 80%;
    margin-bottom: 0.5rem;
}

.skeleton-product-price {
    height: 24px;
    width: 40%;
    margin-bottom: 1rem;
}

.skeleton-product-button {
    height: 44px;
    width: 100%;
}

/* Skeleton para banners */
.skeleton-banner {
    width: 100%;
    height: 400px;
    border-radius: 12px;
}

@media (max-width: 768px) {
    .skeleton-banner {
        height: 250px;
    }
}

/* Skeleton para mini banners */
.skeleton-mini-banner {
    width: 100%;
    height: 150px;
    border-radius: 12px;
}

/* Skeleton para tabela (admin) */
.skeleton-table-row {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    border-bottom: 1px solid #f0f0f0;
}

.skeleton-table-cell {
    height: 20px;
    flex: 1;
}

.skeleton-table-cell.small {
    flex: 0.5;
}

.skeleton-table-cell.large {
    flex: 2;
}

/* Skeleton para cards do dashboard */
.skeleton-dashboard-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.skeleton-card-title {
    height: 16px;
    width: 60%;
    margin-bottom: 1rem;
}

.skeleton-card-value {
    height: 32px;
    width: 40%;
    margin-bottom: 0.5rem;
}

.skeleton-card-subtitle {
    height: 14px;
    width: 50%;
}

/* Skeleton para gráficos */
.skeleton-chart {
    width: 100%;
    height: 300px;
    border-radius: 12px;
}

/* Container de skeleton */
.skeleton-container {
    display: grid;
    gap: 1.5rem;
}

.skeleton-container.products {
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
}

@media (max-width: 768px) {
    .skeleton-container.products {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
}

/* Fade in quando dados carregam */
.fade-in {
    animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Ocultar skeleton quando dados carregam */
.skeleton-hidden {
    display: none;
}


/* Skeleton para produtos relacionados */
.skeleton-card {
    background: #f5f5f5;
    border-radius: 12px;
    padding: 1rem;
    min-width: 200px;
    animation: skeleton-pulse 1.5s ease-in-out infinite;
}

.skeleton-card::before {
    content: '';
    display: block;
    width: 100%;
    height: 200px;
    background: linear-gradient(90deg, #e0e0e0 25%, #f0f0f0 50%, #e0e0e0 75%);
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.5s ease-in-out infinite;
    border-radius: 8px;
    margin-bottom: 1rem;
}

.skeleton-card::after {
    content: '';
    display: block;
    width: 80%;
    height: 20px;
    background: linear-gradient(90deg, #e0e0e0 25%, #f0f0f0 50%, #e0e0e0 75%);
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.5s ease-in-out infinite;
    border-radius: 4px;
    margin-bottom: 0.5rem;
}
