  body {
        overflow-x: hidden;
    }

    .modern-product-page {
        overflow-x: hidden;
    }

    /* Sticky image gallery on desktop - only when product details is taller */
    @media (min-width: 1024px) {
        .image-gallery-sticky {
            position: sticky;
            top: 150px;
            align-self: flex-start;
        }
    }
    .swatch-rail::-webkit-scrollbar {
        height: 8px;
    }

    .swatch-rail::-webkit-scrollbar-thumb {
        background: #e5e7eb;
        border-radius: 9999px;
    }

    @media (hover: hover) {
        .zoom-hover:hover img {
            transform: scale(1.05);
        }
    }

    @supports (padding: max(0px)) {
        .safe-bottom {
            padding-bottom: max(0.75rem, env(safe-area-inset-bottom));
        }
    }

    /* Horizontal thumbnail scrolling for all screen sizes */
    .modern-product-page .rightsideimage {
        display: flex;
        flex-direction: row;
        gap: 0.75rem;
        overflow-x: auto;
        overflow-y: visible;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: thin;
        scrollbar-color: #cbd5e1 #f1f5f9;
        padding: 0.5rem 0;
    }

    /* Mobile scrollbar */
    .modern-product-page .rightsideimage::-webkit-scrollbar {
        height: 6px;
    }

    .modern-product-page .rightsideimage::-webkit-scrollbar-track {
        background: #f8fafc;
        border-radius: 4px;
    }

    .modern-product-page .rightsideimage::-webkit-scrollbar-thumb {
        background-color: #cbd5e1;
        border-radius: 4px;
    }

    .modern-product-page .rightsideimage::-webkit-scrollbar-thumb:hover {
        background-color: #94a3b8;
    }

    /* Desktop: slightly larger scrollbar */
    @media (min-width: 1024px) {
        .modern-product-page .rightsideimage::-webkit-scrollbar {
            height: 8px;
        }

        .main-image-container {
            width: 100%;
        }
    }

    .modern-product-page .rightsideimage .gallery-thumb {
        flex: 0 0 auto;
        width: 4rem;
        height: 4rem;
    }

    @media (min-width: 1024px) {
        .modern-product-page .rightsideimage .gallery-thumb {
            width: 3.5rem;
            height: 3.5rem;
        }

        .modern-product-page .rightsideimage {
            max-width: 400px;
            margin: 0 auto;
        }
    }

    .modern-product-page .mainimage {
        width: 100% !important;
        display: block;
    }

    .modern-product-page .mainimage>div {
        width: 100%;
        height: 100%;
    }

    .modern-product-page #mainImage,
    .modern-product-page .mainimage img {
        width: 100% !important;
        height: auto;
        max-height: 560px;
        border-radius: 1.5rem;
        object-fit: contain;
        background: #f8fafc;
    }

    /* Desktop: Reduce main image size to match reference */
    @media (min-width: 1024px) {
        .modern-product-page #mainImage,
        .modern-product-page .mainimage img {
            max-height: 280px !important;
            max-width: 380px !important;
            margin: 0 auto;
        }

        .modern-product-page .mainimage,
        .modern-product-page .main-image-container {
            max-width: 400px;
            margin: 0 auto;
        }
    }

    .modern-product-page .variant-image-option img {
        border-radius: 9999px;
        border: 2px solid transparent;
    }

    .modern-product-page .variant-image-option img.active-variant {
        border-color: #ff4c3b;
    }

.theme-text {
    color: #ff4c3b
}

/* Checkmark circle (hidden by default) */
.variant-image-option .checkmark-icon {
    position: absolute;
    bottom: -6px;
    right: -6px;
    background: #ff4c3b; /* Indigo or your theme */
    color: white;
    width: 20px;
    height: 20px;
    border-radius: 9999px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    opacity: 0;
    transform: scale(0.5);
    transition: all 0.25s ease-in-out;
}

/* Show checkmark when selected */
.variant-image-option.active-variant-option .checkmark-icon {
    opacity: 1;
    transform: scale(1);
}

/* Mobile: reduce variant circle size & padding */
@media (max-width: 640px) {
    .variant-image-option {
        width: 36px !important;
        height: 36px !important;
        padding: 0 !important;
    }

    .variant-image-option img {
        width: 34px !important;
        height: 34px !important;
    }

    /* Adjust checkmark position for mobile */
    .variant-image-option .checkmark-icon {
        width: 16px !important;
        height: 16px !important;
        font-size: 10px !important;
        bottom: -4px !important;
        right: -4px !important;
    }
}

