/* ==========================================================================
   Catalog product skeleton loaders
   ========================================================================== */

@keyframes catalog-skeleton-shimmer {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

.skeleton {
    background: linear-gradient(
        90deg,
        #f3f4f6 0%,
        #e5e7eb 40%,
        #f9fafb 60%,
        #f3f4f6 100%
    );
    background-size: 200% 100%;
    animation: catalog-skeleton-shimmer 1.35s ease-in-out infinite;
    border-radius: 6px;
}

.skeleton--image {
    width: 100%;
    aspect-ratio: 1;
    border-radius: 4px;
}

.skeleton--line {
    height: 12px;
    margin-bottom: 8px;
}

.skeleton--line-sm {
    width: 35%;
    height: 10px;
}

.skeleton--line-md {
    width: 72%;
}

.skeleton--line-lg {
    width: 92%;
    height: 14px;
}

.skeleton--line-price {
    width: 45%;
    height: 18px;
    margin-bottom: 0;
}

.skeleton--btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    flex-shrink: 0;
}

.skeleton--btn-wide {
    width: 100%;
    height: 38px;
    border-radius: 6px;
}

.skeleton--circle {
    width: 64px;
    height: 64px;
    border-radius: 8px;
    flex-shrink: 0;
}

/* Grid card skeleton */
.product-card--skeleton {
    pointer-events: none;
    user-select: none;
}

.product-card--skeleton .product-card__image {
    padding: 1.25rem 1.25rem 0;
}

.product-card--skeleton .product-card__info {
    padding: 1rem 1.25rem 0.5rem;
}

.product-card--skeleton .product-card__footer {
    padding: 0.75rem 1.25rem 1.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: auto;
}

/* List skeleton */
.product-list-item--skeleton {
    pointer-events: none;
    user-select: none;
}

.product-list-item--skeleton .product-list-image .skeleton {
    width: 100%;
    height: 100%;
    min-height: 160px;
}

.product-list-item--skeleton .product-list-actions {
    border-left: none;
    padding-left: 0;
    width: 100%;
}

/* Table skeleton */
.catalog-table-row--skeleton {
    pointer-events: none;
}

.catalog-table-row--skeleton td {
    padding: 16px 20px;
    vertical-align: middle;
}

.catalog-table-row--skeleton .skeleton--table-img {
    width: 56px;
    height: 56px;
    margin: 0 auto;
}

.catalog-table-row--skeleton .skeleton--table-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}

.catalog-table-row--skeleton .skeleton--table-btn {
    width: 36px;
    height: 36px;
    border-radius: 6px;
}

.catalog-skeleton-layer--append {
    display: contents;
}

.catalog-skeleton-layer--append-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    width: 100%;
}

.catalog-loading-status {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}