/* ========== Loader / Skeleton ========== */
.products-loader-overlay {
    position: absolute;
    inset: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(250, 250, 250, 0.85);
    backdrop-filter: blur(6px);
}

.products-loader-spinner {
    width: 48px;
    height: 48px;
    border: 3px solid var(--tw-neutral-200, #e5e5e5);
    border-top-color: var(--tw-neutral-900, #171717);
    border-radius: 50%;
    animation: products-loader-spin 0.9s linear infinite;
}

@keyframes products-loader-spin {
    to { transform: rotate(360deg); }
}

.product-skeleton-image,
.product-skeleton-line {
    background: linear-gradient(
        90deg,
        var(--tw-neutral-150, #eeeeee) 0%,
        var(--tw-neutral-200, #e5e5e5) 50%,
        var(--tw-neutral-150, #eeeeee) 100%
    );
    background-size: 200% 100%;
    animation: product-skeleton-shimmer 1.4s ease-in-out infinite;
}

.product-skeleton-line {
    min-height: 0.5rem;
}

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

/* Stagger skeleton cards for a wave effect (optional) */
.product-skeleton:nth-child(1) .product-skeleton-image { animation-delay: 0s; }
.product-skeleton:nth-child(2) .product-skeleton-image { animation-delay: 0.08s; }
.product-skeleton:nth-child(3) .product-skeleton-image { animation-delay: 0.16s; }
.product-skeleton:nth-child(4) .product-skeleton-image { animation-delay: 0.24s; }
.product-skeleton:nth-child(5) .product-skeleton-image { animation-delay: 0.32s; }
.product-skeleton:nth-child(6) .product-skeleton-image { animation-delay: 0.08s; }
.product-skeleton:nth-child(7) .product-skeleton-image { animation-delay: 0.16s; }
.product-skeleton:nth-child(8) .product-skeleton-image { animation-delay: 0.24s; }
.product-skeleton:nth-child(9) .product-skeleton-image { animation-delay: 0.32s; }
.product-skeleton:nth-child(10) .product-skeleton-image { animation-delay: 0.4s; }

/* Descrizione breve in modal anteprima */
.product-short-desc {
    line-height: 1.5;
    word-wrap: break-word;
}

/* Descrizione breve nelle card: max 2 righe con ellissi */
.product-card-desc {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    word-break: break-word;
}

.product-card {
    transition: all 0.3s ease;
}

.product-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.product-image {
    transition: transform 0.4s ease;
}

.product-card:hover .product-image {
    transform: scale(1.03);
}

.modal-backdrop {
    backdrop-filter: blur(4px);
    animation: fadeIn 0.2s ease-out;
}

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

.modal-content {
    animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
