/* Skeleton Loading Animation */
@keyframes skeleton-loading {
    0% {
        background-position: -200px 0;
    }

    100% {
        background-position: calc(100% + 200px) 0;
    }
}

.skeleton {
    background-color: #f0f0f0;
    background-image: linear-gradient(90deg,
            #f0f0f0 0px,
            #f8f8f8 40px,
            #f0f0f0 80px);
    background-size: 200px 100%;
    background-repeat: no-repeat;
    animation: skeleton-loading 1.5s infinite linear;
    border-radius: 4px;
    /* Default border radius */
}

/* Skeleton Text */
.skeleton-text {
    display: inline-block;
    height: 1em;
    width: 80%;
    /* Default width */
    margin-bottom: 0.5rem;
    background-color: #ddd;
    /* Slightly darker */
}

/* Skeleton Image */
.skeleton-img {
    width: 100%;
    height: 100%;
    background-color: #ddd;
    display: block;
}

/* Skeleton for Category Card */
.ul-category.skeleton {
    border: 1px solid #eee;
    padding: 0;
    overflow: hidden;
    height: 100%;
    background: none;
    /* Reset background for container, apply to children */
}

.ul-category.skeleton .ul-category-img {
    width: 100%;
    aspect-ratio: 1/1;
    background-color: #f0f0f0;
    position: relative;
    overflow: hidden;
}

/* Add shimmer to the image container itself */
.ul-category.skeleton .ul-category-img::after {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    transform: translateX(-100%);
    background-image: linear-gradient(90deg,
            rgba(255, 255, 255, 0) 0,
            rgba(255, 255, 255, 0.2) 20%,
            rgba(255, 255, 255, 0.5) 60%,
            rgba(255, 255, 255, 0));
    animation: skeleton-loading 2s infinite;
}


.ul-category.skeleton .ul-category-txt {
    padding: 15px;
    display: flex;
    justify-content: center;
}

/* Skeleton for Product Card */
.ul-product.skeleton {
    border: 1px solid #eee !important;
    border-radius: 10px !important;
    padding: 15px !important;
    height: 100% !important;
    display: flex !important;
    flex-direction: column !important;
    background: white !important;
    box-shadow: none !important;
}

.ul-product.skeleton .ul-product-img {
    width: 100%;
    aspect-ratio: 1/1;
    background-color: #f0f0f0;
    margin-bottom: 15px;
    border-radius: 8px;
    position: relative;
    overflow: hidden;
}

.ul-product.skeleton .ul-product-img::after {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    transform: translateX(-100%);
    background-image: linear-gradient(90deg,
            rgba(255, 255, 255, 0) 0,
            rgba(255, 255, 255, 0.2) 20%,
            rgba(255, 255, 255, 0.5) 60%,
            rgba(255, 255, 255, 0));
    animation: skeleton-loading 2s infinite;
}

.ul-product.skeleton .ul-product-title {
    height: 20px;
    width: 90%;
    margin: 0 auto 10px !important;
    background-color: #f0f0f0;
    border-radius: 4px;
    min-height: 0 !important;
}

.ul-product.skeleton .ul-product-category {
    height: 15px;
    width: 60%;
    margin: 0 auto 10px !important;
    background-color: #f0f0f0;
    border-radius: 4px;
}

.ul-product.skeleton .ul-product-price {
    height: 20px;
    width: 40%;
    margin: 0 auto !important;
    background-color: #f0f0f0;
    border-radius: 4px;
}

/* Shop Details Skeleton */
.details-skeleton .skeleton-img-box {
    width: 100%;
    aspect-ratio: 1/1;
    background-color: #f0f0f0;
    border-radius: 40px;
    margin-bottom: 25px;
}

.details-skeleton .skeleton-thumb {
    width: 90px;
    height: 90px;
    background-color: #f0f0f0;
    border-radius: 20px;
}

.details-skeleton .skeleton-title {
    height: 50px;
    width: 80%;
    background-color: #f0f0f0;
    margin-bottom: 30px;
    border-radius: 10px;
}

.details-skeleton .skeleton-tag {
    height: 35px;
    width: 120px;
    background-color: #f0f0f0;
    margin-bottom: 20px;
    border-radius: 50px;
}

.details-skeleton .skeleton-price-box {
    height: 80px;
    width: 250px;
    background-color: #f0f0f0;
    margin-bottom: 35px;
    border-radius: 24px;
}

.details-skeleton .skeleton-desc-line {
    height: 15px;
    background-color: #f0f0f0;
    margin-bottom: 15px;
    border-radius: 4px;
}

.details-skeleton .skeleton-btn-group {
    display: flex;
    gap: 20px;
    margin-bottom: 60px;
}

.details-skeleton .skeleton-btn {
    height: 60px;
    flex-grow: 1;
    background-color: #f0f0f0;
    border-radius: 18px;
}

.details-skeleton .skeleton-wish {
    height: 60px;
    width: 60px;
    background-color: #f0f0f0;
    border-radius: 18px;
}

.details-skeleton .skeleton-meta {
    height: 150px;
    background-color: #f0f0f0;
    border-radius: 24px;
}

.skeleton-shimmer {
    position: relative;
    overflow: hidden;
}

.skeleton-shimmer::after {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    transform: translateX(-100%);
    background-image: linear-gradient(90deg,
            rgba(255, 255, 255, 0) 0,
            rgba(255, 255, 255, 0.2) 20%,
            rgba(255, 255, 255, 0.5) 60%,
            rgba(255, 255, 255, 0));
    animation: skeleton-loading 2s infinite;
}

/* Review Section Skeleton */
.review-skeleton-card {
    background: white;
    padding: 24px;
    border-radius: 20px;
    margin-bottom: 20px;
    border: 1px solid #f0f0f0;
}

.review-skeleton-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
}

.review-skeleton-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background-color: #f0f0f0;
}

.review-skeleton-info {
    flex-grow: 1;
}

.review-skeleton-name {
    height: 18px;
    width: 150px;
    background-color: #f0f0f0;
    margin-bottom: 8px;
    border-radius: 4px;
}

.review-skeleton-stars {
    height: 12px;
    width: 80px;
    background-color: #f0f0f0;
    border-radius: 4px;
}

.review-skeleton-comment {
    height: 14px;
    background-color: #f0f0f0;
    margin-bottom: 10px;
    border-radius: 4px;
}

.review-summary-skeleton {
    padding: 30px;
    background: #fff;
    border-radius: 24px;
    border: 1px solid #f0f0f0;
    margin-bottom: 40px;
}

.review-summary-skeleton .skeleton-rating {
    height: 60px;
    width: 80px;
    background-color: #f0f0f0;
    margin: 0 auto 15px;
    border-radius: 12px;
}

.review-summary-skeleton .skeleton-stars {
    height: 20px;
    width: 120px;
    background-color: #f0f0f0;
    margin: 0 auto 10px;
    border-radius: 4px;
}

.review-summary-skeleton .skeleton-text {
    height: 12px;
    width: 150px;
    background-color: #f0f0f0;
    margin: 0 auto;
    border-radius: 4px;
}

.review-summary-skeleton .skeleton-bar {
    height: 8px;
    background-color: #f0f0f0;
    margin-bottom: 15px;
    border-radius: 10px;
}