/**
 * Skeleton Loader Styles
 * Used for loading states on grid pages (qualities, samples)
 */

/* Skeleton Grid Container */
.skeleton-grid {
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    gap: 3rem 2rem;
}

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

@media (min-width: 1024px) {
    .skeleton-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 4rem 3rem;
    }
}

/* Skeleton Card */
.skeleton-card {
    display: flex;
    flex-direction: column;
    background: white;
    border-radius: 0.5rem;
    overflow: hidden;
}

/* Skeleton Image */
.skeleton-image {
    width: 100%;
    aspect-ratio: 4 / 5;
    background: linear-gradient(
        90deg,
        #f0f0f0 0%,
        #e0e0e0 20%,
        #f0f0f0 40%,
        #f0f0f0 100%
    );
    background-size: 200% 100%;
    animation: shimmer 2s infinite linear;
}

/* Skeleton Title */
.skeleton-title {
    height: 2rem;
    width: 70%;
    margin: 1rem auto 0.5rem;
    background: linear-gradient(
        90deg,
        #f0f0f0 0%,
        #e0e0e0 20%,
        #f0f0f0 40%,
        #f0f0f0 100%
    );
    background-size: 200% 100%;
    border-radius: 0.25rem;
    animation: shimmer 2s infinite linear;
}

/* Skeleton Text Lines */
.skeleton-text {
    height: 1rem;
    width: 50%;
    margin: 0.5rem auto;
    background: linear-gradient(
        90deg,
        #f0f0f0 0%,
        #e0e0e0 20%,
        #f0f0f0 40%,
        #f0f0f0 100%
    );
    background-size: 200% 100%;
    border-radius: 0.25rem;
    animation: shimmer 2s infinite linear;
    animation-delay: 0.2s;
}

.skeleton-text-short {
    width: 30%;
}

.skeleton-text-long {
    width: 60%;
}

/* Skeleton Badges */
.skeleton-badges {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    margin: 0.75rem 0;
}

.skeleton-badge {
    height: 1.5rem;
    width: 4rem;
    background: linear-gradient(
        90deg,
        #f0f0f0 0%,
        #e0e0e0 20%,
        #f0f0f0 40%,
        #f0f0f0 100%
    );
    background-size: 200% 100%;
    border-radius: 9999px;
    animation: shimmer 2s infinite linear;
    animation-delay: 0.3s;
}

/* Skeleton Specifications */
.skeleton-specs {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin: 1rem 0.5rem;
}

.skeleton-spec-line {
    height: 0.875rem;
    width: 90%;
    margin: 0 auto;
    background: linear-gradient(
        90deg,
        #f0f0f0 0%,
        #e0e0e0 20%,
        #f0f0f0 40%,
        #f0f0f0 100%
    );
    background-size: 200% 100%;
    border-radius: 0.25rem;
    animation: shimmer 2s infinite linear;
}

.skeleton-spec-line:nth-child(2) {
    animation-delay: 0.1s;
}

.skeleton-spec-line:nth-child(3) {
    animation-delay: 0.2s;
}

.skeleton-spec-line:nth-child(4) {
    animation-delay: 0.3s;
}

/* Shimmer Animation */
@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

/* Hidden State */
.skeleton-hidden {
    display: none;
}

/* Mobile Optimizations */
@media (max-width: 768px) {
    .skeleton-grid {
        gap: 2rem 1.5rem;
    }

    .skeleton-image {
        aspect-ratio: 3 / 4;
    }
}
