/* Tehnotron product card, compare switch and hover gallery. */

.product-item {
        position: relative;
        transition: transform .3s ease, box-shadow .8s ease;
        box-shadow: 0 4px rgba(0, 0, 0, .1);
        outline: none;
    }

    .product-item:hover {
        transform: scale(1.01);
        box-shadow: 0 0 20px rgba(0, 0, 0, .2);
    }

    .product-item:focus {
        outline: none;
    }

    /* Compare switch */
    .tt-compare-control {
        position: absolute;
        top: 11px;
        right: 11px;
        z-index: 50;
        display: flex;
        align-items: center;
        gap: 7px;
        min-height: 31px;
        padding: 4px 8px 4px 10px;
        border: 1px solid rgba(0, 0, 0, .08);
        border-radius: 18px;
        background: rgba(255, 255, 255, .95);
        box-shadow: 0 3px 11px rgba(0, 0, 0, .1);
        box-sizing: border-box;
    }

    .tt-compare-label {
        color: #252a2e;
        font-size: 12px;
        line-height: 1;
        font-weight: 600;
        cursor: pointer;
        user-select: none;
    }

    .tt-compare-switch {
        position: relative;
        display: inline-block;
        flex: 0 0 auto;
        width: 39px;
        height: 22px;
        margin: 0;
        cursor: pointer;
    }

    .tt-compare-checkbox {
        position: absolute;
        width: 1px;
        height: 1px;
        margin: 0;
        opacity: 0;
        pointer-events: none;
    }

    .tt-compare-slider {
        position: absolute;
        inset: 0;
        border: 1px solid #ccd2d8;
        border-radius: 22px;
        background: #dce1e6;
        cursor: pointer;
        transition: background-color .2s ease, border-color .2s ease, box-shadow .2s ease;
    }

    .tt-compare-slider::before {
        position: absolute;
        top: 2px;
        left: 2px;
        width: 16px;
        height: 16px;
        border-radius: 50%;
        background: #fff;
        box-shadow: 0 1px 4px rgba(0, 0, 0, .25);
        content: "";
        transition: transform .2s ease;
    }

    .tt-compare-checkbox:checked + .tt-compare-slider {
        border-color: #da004a;
        background: #da004a;
    }

    .tt-compare-checkbox:checked + .tt-compare-slider::before {
        transform: translateX(17px);
    }

    .tt-compare-checkbox:focus + .tt-compare-slider {
        box-shadow: 0 0 0 3px rgba(218, 0, 74, .17);
    }

    .tt-compare-checkbox:disabled + .tt-compare-slider {
        opacity: .55;
        cursor: wait;
    }

    .tt-compare-control.is-selected {
        border-color: rgba(218, 0, 74, .25);
        background: #fff7fa;
    }

    .tt-compare-control.is-selected .tt-compare-label {
        color: #da004a;
    }

    .tt-compare-control.is-busy {
        opacity: .72;
        pointer-events: none;
    }

    @media screen and (max-width: 600px) {
        .tt-compare-control {
            top: 8px;
            right: 8px;
            min-height: 29px;
            padding: 3px 7px 3px 8px;
        }

        .tt-compare-label {
            font-size: 11px;
        }

        .tt-compare-switch {
            width: 36px;
            height: 21px;
        }

        .tt-compare-slider::before {
            width: 15px;
            height: 15px;
        }

        .tt-compare-checkbox:checked + .tt-compare-slider::before {
            transform: translateX(15px);
        }
    }

/* =========================================================
   TEHNOTRON HOVER GALERIJA PROIZVODA
   ========================================================= */

.tt-hover-gallery {
    position: relative !important;
    display: block !important;
    width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: 230px;
    aspect-ratio: 4 / 3;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
    line-height: 0 !important;
    box-sizing: border-box !important;
    isolation: isolate;
    background: #fff;
}

.tt-gallery-product-link {
    position: relative !important;
    z-index: 1;
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
    line-height: 0 !important;
    box-sizing: border-box !important;
    text-decoration: none !important;
}

.tt-gallery-product-link::before,
.tt-gallery-product-link::after,
.tt-hover-gallery::before,
.tt-hover-gallery::after {
    display: none !important;
    content: none !important;
}

.tt-hover-gallery .tt-gallery-main-image {
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    display: block !important;
    width: calc(100% - 12px) !important;
    max-width: calc(100% - 12px) !important;
    height: calc(100% - 12px) !important;
    max-height: calc(100% - 12px) !important;
    margin: 0 !important;
    padding: 0 !important;
    object-fit: contain !important;
    object-position: center center !important;
    transform: translate(-50%, -50%) !important;
    transition: opacity .14s ease;
    will-change: opacity;
}

.tt-hover-gallery.is-changing .tt-gallery-main-image,
.tt-hover-gallery.is-cropping .tt-gallery-main-image {
    opacity: .58;
}

.tt-gallery-sources {
    display: none !important;
}

/* Segmentirane linije: roze je aktivna slika. */
.tt-gallery-segments {
    position: absolute;
    right: 10px;
    bottom: 6px;
    left: 10px;
    z-index: 6;
    display: flex;
    align-items: center;
    gap: 4px;
    height: 4px;
    padding: 0;
    pointer-events: none;
}

.tt-gallery-segment {
    flex: 1 1 0;
    height: 4px;
    border-radius: 5px;
    background: rgba(70, 76, 82, .20);
    transition:
        background-color .15s ease,
        transform .15s ease;
}

.tt-gallery-segment.is-active {
    background: #da004a;
    transform: scaleY(1.15);
}

.tt-gallery-counter {
    position: absolute;
    right: 9px;
    bottom: 15px;
    z-index: 7;
    min-width: 31px;
    padding: 3px 6px;
    border: 1px solid rgba(0, 0, 0, .06);
    border-radius: 11px;
    background: rgba(255, 255, 255, .94);
    color: #343a3f;
    box-shadow: 0 2px 7px rgba(0, 0, 0, .09);
    font-size: 10px;
    line-height: 1.2;
    font-weight: 700;
    text-align: center;
    pointer-events: none;
}

.tt-gallery-arrow {
    position: absolute;
    top: 50%;
    z-index: 8;
    display: none;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    border: 1px solid rgba(0, 0, 0, .09);
    border-radius: 50%;
    background: rgba(255, 255, 255, .95);
    color: #33393e;
    box-shadow: 0 3px 10px rgba(0, 0, 0, .12);
    font-size: 17px;
    cursor: pointer;
    transform: translateY(-50%);
}

.tt-gallery-previous {
    left: 7px;
}

.tt-gallery-next {
    right: 7px;
}

.tt-gallery-arrow:hover,
.tt-gallery-arrow:focus {
    border-color: #da004a;
    color: #da004a;
}

@media (hover: none), (pointer: coarse) {
    .tt-hover-gallery.has-multiple-images .tt-gallery-arrow {
        display: flex;
    }
}

@media screen and (max-width: 600px) {
    .tt-hover-gallery {
        max-height: none;
        aspect-ratio: 4 / 3;
    }
}
