<style>
/* ============================================================================
   SKELETON LOADING STYLES
   ============================================================================ */

/* Skeleton Container */
.product-image-skeleton {
    position: relative;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-image-skeleton {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-image-skeleton {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, #fff5eb 25%, #ffe8cc 50%, #fff5eb 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
}

/* Trenva Logo in Skeleton */
.skeleton-trenva-logo {
    width: 130px;           /* Adjust based on your logo */
    height: 130px;          /* Adjust based on your logo */
    max-width: 45%;         /* Responsive sizing */
    max-height: 45%;        /* Responsive sizing */
    opacity: 0.25;          /* Subtle appearance */
    animation: pulse 1.5s ease-in-out infinite;
    display: flex;
    align-items: center;
    justify-content: center;
}

.skeleton-trenva-logo img {
    width: 100%;
    height: 100%;
}

.skeleton-trenva-logo.effect-1 img {
    filter: grayscale(100%) sepia(20%) hue-rotate(10deg) brightness(1.1);
}

/* Shimmer Animation */
@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

/* Icon in Skeleton */
.skeleton-icon {
    color: #d0d0d0;
    font-size: 48px;
    opacity: 0.5;
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 0.5;
    }
    50% {
        opacity: 0.3;
    }
}

/* Image Wrapper - Contains both skeleton and actual image */
.product-image-wrapper {
    position: relative;
    width: 100%;
    height: 180px;
    /*overflow: hidden;*/
}

/* Actual Product Image */
.product-image-wrapper .lazy-product-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /*object-fit: cover;*/
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}

/* When image is loaded */
.product-image-wrapper .lazy-product-image.loaded {
    opacity: 1;
}

/* Hide skeleton when image is loaded */
.product-image-wrapper.image-loaded .product-image-skeleton {
    display: none;
}

/* Alternative Skeleton Styles - Choose one you like */

/* STYLE 1: Gradient Shimmer (Default - already shown above) */

/* STYLE 2: Pulsing Background */
.product-image-skeleton.pulse-style {
    background: #f0f0f0;
    animation: skeleton-pulse 1.5s ease-in-out infinite;
}

@keyframes skeleton-pulse {
    0%, 100% {
        background-color: #f0f0f0;
    }
    50% {
        background-color: #e0e0e0;
    }
}

/* STYLE 3: Wave Effect */
.product-image-skeleton.wave-style {
    background: linear-gradient(
        90deg,
        #f0f0f0 0%,
        #f0f0f0 40%,
        #e0e0e0 50%,
        #e0e0e0 55%,
        #f0f0f0 65%,
        #f0f0f0 100%
    );
    background-size: 400% 100%;
    animation: wave 2s ease-in-out infinite;
}

@keyframes wave {
    0% {
        background-position: 100% 0;
    }
    100% {
        background-position: -100% 0;
    }
}

/* STYLE 4: Grid Pattern */
.product-image-skeleton.grid-style {
    background-color: #f0f0f0;
    background-image: 
        linear-gradient(90deg, transparent 24%, rgba(224, 224, 224, 0.5) 25%, rgba(224, 224, 224, 0.5) 26%, transparent 27%, transparent 74%, rgba(224, 224, 224, 0.5) 75%, rgba(224, 224, 224, 0.5) 76%, transparent 77%, transparent),
        linear-gradient(rgba(224, 224, 224, 0.5) 24%, transparent 25%, transparent 26%, rgba(224, 224, 224, 0.5) 27%, rgba(224, 224, 224, 0.5) 74%, transparent 75%, transparent 76%, rgba(224, 224, 224, 0.5) 77%, rgba(224, 224, 224, 0.5));
    background-size: 50px 50px;
    animation: grid-move 2s linear infinite;
}

@keyframes grid-move {
    0% {
        background-position: 0 0;
    }
    100% {
        background-position: 50px 50px;
    }
}

/* STYLE 5: Modern Trenva Brand Colors */
.product-image-skeleton.trenva-style {
    background: linear-gradient(
        90deg,
        #fff5eb 25%,
        #ffe8cc 50%,
        #fff5eb 75%
    );
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

.trenva-style .skeleton-icon {
    color: #ff9b00;
    opacity: 0.3;
}

/* Flash Sale Product Image Wrapper */
.flash-product-image-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
    border-radius: 8px;
    overflow: hidden;
    /*background: #f9f9f9;*/
}

/* Error State */
.product-image-error {
    width: 100%;
    height: 100%;
    background: #f8f8f8;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    border: 1px dashed #ddd;
}

.product-image-error i {
    font-size: 40px;
    color: #ccc;
    margin-bottom: 8px;
}

.product-image-error span {
    font-size: 12px;
    color: #999;
}
</style>
