:root {
    --cpx-dot-size: 16px;
    --cpx-dot-color: #F7F7F7;
    --cpx-dot-active-color: #ACFFCF;
    --cpx-dot-dark-color: #171717;
    --cpx-dot-border: 2px;
    --cpx-dot-ring-size: 30px;

    --cpx-popup-bg: #ffffff;
    --cpx-popup-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    --cpx-popup-width: 400px;
    --cpx-popup-max-height: 600px;
    --cpx-popup-padding: 40px;

    --cpx-transition-fast: 250ms;

    /* DOT animation settings */
    --cpx-dot-anim-duration: 250ms;
    --cpx-dot-anim-ease: ease;
    --cpx-dot-scale-hover: 1.1;
    --cpx-dot-scale-active: 1.2;

    --cpx-z-glow: 0;
    --cpx-z-image: 1;
    --cpx-z-dots: 2;
    --cpx-z-popup: 3;
}

/* Container mag niets naar buiten laten scrollen */
.product-highlight__media {
    position: relative;
    overflow: visible;
    margin-left: auto;
    margin-right: auto;
    width: 1200px;
    max-width: 100%;
    /* voorkomt horizontale scroll bij animatie */
}

/* Afbeeldingen + glow */
.product-highlight__image {
    display: block;
    width: 100%;
    height: auto;
}

.product-highlight__image--main {
    position: relative;
    z-index: var(--cpx-z-image);
}

.product-highlight__image--glow {
    position: absolute;
    inset: 0;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    z-index: var(--cpx-z-glow);
    filter: blur(40px);
    transform: scale(1);
    /* mini stretch tegen harde randen na blur */
    pointer-events: none;
    opacity: .5;
}

.product-highlight__image--placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 200px;
    background: #f3f3f3;
    color: #888;
    font-size: 14px;
}

/* ----------------------------
   DOT BASIS
----------------------------- */
.product-highlight__dots {
    position: absolute;
    inset: 0;
    z-index: var(--cpx-z-dots);
}

/* Override Elementor button defaults */
.product-highlight__dot {
    position: absolute;
    width: var(--cpx-dot-size);
    height: var(--cpx-dot-size);
    margin-left: calc(var(--cpx-dot-size) * -0.5);
    margin-top: calc(var(--cpx-dot-size) * -0.5);
    border: var(--cpx-dot-border) solid rgba(0, 0, 0, 0.4) !important;
    border-radius: 50% !important;
    background: var(--cpx-dot-color) !important;
    padding: 0 !important;
    line-height: 1 !important;
    box-shadow: none !important;
    cursor: pointer;
}

.product-highlight__dot__inner {
    position: absolute;
    left: 50%;
    top: 50%;
    width: var(--cpx-dot-ring-size);
    height: var(--cpx-dot-ring-size);
    margin-left: calc(var(--cpx-dot-ring-size) * -0.5);
    margin-top: calc(var(--cpx-dot-ring-size) * -0.5);
    border-radius: 999px !important;
    border: none !important;
    background-color: var(--cpx-dot-color);
    box-shadow: 0 0 10px var(--cpx-dot-color);
}

.product-highlight__dot__inner:after {
    content: "";
    position: absolute;
    width: 50%;
    height: 50%;
    background-color: var(--cpx-dot-dark-color);
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    transform-origin: center;
}

/* ----------------------------
   DOT ANIMATIONS
----------------------------- */
.product-highlight__dot,
.product-highlight__dot:focus,
.product-highlight__dot:hover,
.product-highlight__dot.is-active,
.product-highlight__dot .product-highlight__dot__inner,
.product-highlight__dot .product-highlight__dot__inner:after {
    transition-duration: var(--cpx-dot-anim-duration);
    transition-timing-function: var(--cpx-dot-anim-ease);
}

.product-highlight__dot {
    transition-property: transform;
}

.product-highlight__dot .product-highlight__dot__inner {
    transition-property: background-color, box-shadow;
}

.product-highlight__dot .product-highlight__dot__inner:after {
    transition-property: transform, background-color;
}

.product-highlight__dot:hover,
.product-highlight__dot:focus {
    transform: scale(var(--cpx-dot-scale-hover));
    outline: none;
}

.product-highlight__dot.is-active {
    transform: scale(var(--cpx-dot-scale-active));
}

.product-highlight__dot.is-active .product-highlight__dot__inner {
    background-color: var(--cpx-dot-active-color);
    box-shadow: 0 0 16px var(--cpx-dot-active-color);
}

.product-highlight__dot:hover .product-highlight__dot__inner:after,
.product-highlight__dot:focus .product-highlight__dot__inner:after {
    transform: translate(-50%, -50%) scale(1.05);
}

/* ----------------------------
   POPUP
----------------------------- */
.product-highlight__popup {
    position: absolute;
    bottom: auto;
    top: 0;
    left: auto;
    right: 0;
    width: var(--cpx-popup-width);
    max-width: 100%;
    height: auto;
    max-height: var(--cpx-popup-max-height);
    margin: 0 auto;
    box-shadow: var(--cpx-popup-shadow);
    opacity: 0;
    pointer-events: none;
    transform: translateY(50px);
    /* startpositie onder */
    transition: transform var(--cpx-transition-fast) ease, opacity var(--cpx-transition-fast) ease;
    z-index: var(--cpx-z-popup);
    overflow: hidden;
    background-color: rgba(255, 255, 255, .5);
    backdrop-filter: blur(10px);

    iframe,
    video {
        width: 100%;
        height: auto;
        aspect-ratio: 16/9;
    }
}

/* Custom scrollbar styling */
.product-highlight__popup__inner::-webkit-scrollbar {
    width: 12px;
    background-color: transparent;
    /* White background */
}

.product-highlight__popup__inner::-webkit-scrollbar-thumb {
    /* background-color: #171717; */
    background-color: rgba(23, 23, 23, .5);
    /* Dark bar */
    border-radius: 0px;
    /* Rounded corners */
}

.product-highlight__popup__inner::-webkit-scrollbar-thumb:hover {
    background-color: rgba(23, 23, 23, .8);
    /* Slightly lighter dark bar on hover */
}

.product-highlight__popup__inner::-webkit-scrollbar-track {
    background-color: transparent;
    /* White background for the track */
    border-radius: 6px;
    /* Rounded corners for the track */
}

.product-highlight__popup--left {
    left: 0;
    right: auto;
}

.product-highlight__popup--open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
}

.product-highlight__popup__inner {
    position: relative;
    width: 100%;
    height: 100%;
    max-height: var(--cpx-popup-max-height);
    overflow: auto;
    padding: var(--cpx-popup-padding);
}

/* Close button – override Elementor */
.product-highlight__popup__close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 36px !important;
    height: 36px !important;
    border: 0 !important;
    border-radius: 50% !important;
    background: transparent !important;
    font-size: 20px !important;
    line-height: 36px !important;
    box-shadow: none !important;
    cursor: pointer;
    padding: 0 !important;
    transition: transform var(--cpx-transition-fast) ease;
}

.product-highlight__popup__close img {
    width: 100%;
}

.product-highlight__popup__close:hover {
    transform: scale(1.1);
    outline: none;
}

.product-highlight__popup__close:hover,
.product-highlight__popup__close:focus {
    outline: none !important;
}

.product-highlight__popup__content {
    margin-top: 20px;
}

.product-highlight__popup__title {
    font-size: 1.125rem;
    line-height: 1.3;
    margin: 0 0 20px 0;
}

.product-highlight__popup__text {
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 20px;
}

.product-highlight__popup__video {
    margin-top: 12px;
    margin-bottom: 20px;
}

.product-highlight__popup__afspraak a.elementor-button {
    border-color: var(--e-global-color-text);
}

/* Mobiel: fullscreen fixed overlay */
@media (max-width: 768px) {
    .product-highlight__popup {
        position: fixed;
        left: 0;
        right: 0;
        top: auto;
        bottom: 0;
        width: 100vw;
        height: 100vh;
        max-height: 100vh;
        transform: translateY(50px);
        /* start onder */
        z-index: 99999;
    }

    .product-highlight__popup--open {
        transform: translateY(0);
    }

    .product-highlight__popup__inner {
        height: 100%;
        max-height: 100%;
    }
}