/* 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;
    }

    /* Diskretne akcije u gornjem desnom uglu */
    .tt-card-actions {
        position: absolute;
        top: 10px;
        right: 10px;
        z-index: 55;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 6px;
    }

    .tt-card-action {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 30px;
        height: 30px;
        padding: 0;
        border: 0;
        border-radius: 50%;
        background: rgba(255, 255, 255, .88);
        color: #8b9298;
        box-shadow: none;
        box-sizing: border-box;
        font-size: 15px;
        line-height: 1;
        cursor: pointer;
        transition:
            color .18s ease,
            background-color .18s ease,
            box-shadow .18s ease,
            transform .12s ease;
    }

    .tt-card-action:hover,
    .tt-card-action:focus {
        background: rgba(255, 255, 255, .98);
        color: #da004a;
        box-shadow: 0 3px 10px rgba(0, 0, 0, .10);
        outline: none;
    }

    .tt-card-action:active {
        transform: translateY(1px);
    }

    .tt-card-action.is-selected,
    .tt-compare-control[aria-pressed="true"] {
        background: #fff1f6;
        color: #da004a;
        box-shadow: 0 2px 8px rgba(218, 0, 74, .14);
    }

    .tt-card-action.is-busy {
        opacity: .55;
        pointer-events: none;
    }

    @media screen and (max-width: 600px) {
        .tt-card-actions {
            top: 7px;
            right: 7px;
            gap: 5px;
        }

        .tt-card-action {
            width: 29px;
            height: 29px;
            font-size: 14px;
        }
    }

/* =========================================================
   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;
}


/* Diskretni indikatori galerije */
.tt-gallery-segments {
    position: absolute;
    bottom: 7px;
    left: 50%;
    z-index: 6;
    display: flex;
    align-items: center;
    gap: 4px;
    width: 58%;
    height: 3px;
    padding: 0;
    opacity: .34;
    pointer-events: none;
    transform: translateX(-50%);
    transition: opacity .18s ease;
}

.tt-hover-gallery.has-multiple-images:hover .tt-gallery-segments {
    opacity: .82;
}

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

.tt-gallery-segment.is-active {
    background: rgba(218, 0, 74, .78);
    transform: scaleY(1.08);
}

.tt-gallery-counter {
    position: absolute;
    right: 10px;
    bottom: 13px;
    z-index: 7;
    min-width: 28px;
    padding: 2px 5px;
    border: 1px solid rgba(0, 0, 0, .04);
    border-radius: 9px;
    background: rgba(255, 255, 255, .82);
    color: rgba(52, 58, 63, .72);
    box-shadow: 0 1px 4px rgba(0, 0, 0, .05);
    font-size: 9px;
    line-height: 1.2;
    font-weight: 700;
    text-align: center;
    opacity: .62;
    pointer-events: none;
    transition: opacity .18s ease;
}

.tt-hover-gallery.has-multiple-images:hover .tt-gallery-counter {
    opacity: .92;
}


.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;
    }
}
/* =========================================================
   NOBLE THEME — UKLANJANJE PRAZNINE ISPOD GALERIJE
   ========================================================= */

.product-grid .product-item > .caption {
    margin-top: 0 !important;
    padding-top: 0 !important;
    min-height: 0 !important;
}

.product-grid .product-item > .caption > .details {
    margin-top: 0 !important;
    padding-top: 0 !important;
    min-height: 0 !important;
}

.product-grid .product-item .product-title {
    margin-top: 8px !important;
    padding-top: 0 !important;
}
/* =========================================================
   TEHNOTRON — OZNAKE CENE I PRAVILA PO BRENDU
   ========================================================= */

.tt-price-badge {
    position: absolute;
    top: 11px;
    left: 11px;
    z-index: 51;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 29px;
    padding: 5px 9px;
    border-radius: 15px;
    box-sizing: border-box;
    font-size: 11px;
    line-height: 1;
    font-weight: 700;
    text-decoration: none !important;
    white-space: nowrap;
    transition:
        background-color .18s ease,
        border-color .18s ease,
        color .18s ease,
        box-shadow .18s ease;
}

.tt-price-badge i {
    font-size: 13px;
}

.tt-price-badge-call,
.tt-price-badge-offer {
    border: 1px solid rgba(218, 0, 74, .14);
    background: rgba(255, 255, 255, .94);
    color: #da004a !important;
    box-shadow: 0 3px 10px rgba(0, 0, 0, .08);
}

.tt-price-badge-call:hover,
.tt-price-badge-call:focus,
.tt-price-badge-offer:hover,
.tt-price-badge-offer:focus {
    border-color: rgba(218, 0, 74, .34);
    background: #fff7fa;
    color: #b6003e !important;
}

.tt-price-badge.tt-discount-badge {
    border: 1px solid #da004a;
    background: #da004a;
    color: #fff !important;
    box-shadow: 0 3px 10px rgba(218, 0, 74, .20);
    font-size: 12px;
}

.tt-price-on-request {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    min-height: 55px;
    padding: 5px 8px;
    text-align: center;
}

.tt-price-on-request strong {
    color: #da004a;
    font-size: 21px;
    line-height: 1.15;
    font-weight: 800;
    text-transform: uppercase;
}

.tt-price-on-request a {
    color: #343a3f !important;
    font-size: 12px;
    font-weight: 700;
    text-decoration: none !important;
}

.tt-price-on-request a:hover,
.tt-price-on-request a:focus {
    color: #da004a !important;
}

.tt-single-public-price,
.tt-previous-price,
.tt-current-price {
    display: block;
    color: #2d2d2d;
    font-size: 14px;
    line-height: 1.35;
}

.tt-previous-price strong {
    color: #2d2d2d;
    font-size: 18px;
}

.tt-previous-price s {
    text-decoration-color: #da004a;
    text-decoration-thickness: 1px;
}

.tt-current-price strong,
.tt-single-public-price strong {
    color: #da004a;
    font-size: 26px;
    line-height: 1.15;
}

.tt-single-public-price {
    padding: 6px 0 8px;
}

.tt-call-price-circle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    border: 1px solid rgba(218, 0, 74, .22);
    border-radius: 50%;
    background: #fff7fa;
    color: #da004a !important;
    box-sizing: border-box;
    box-shadow: 0 3px 10px rgba(0, 0, 0, .08);
    font-size: 20px;
    text-decoration: none !important;
    transition:
        background-color .18s ease,
        color .18s ease,
        box-shadow .18s ease,
        transform .12s ease;
}

.tt-call-price-circle:hover,
.tt-call-price-circle:focus {
    background: #da004a;
    color: #fff !important;
    box-shadow: 0 5px 13px rgba(218, 0, 74, .22);
}

.tt-call-price-circle:active {
    transform: translateY(1px);
}

@media screen and (max-width: 600px) {
    .tt-price-badge {
        top: 8px;
        left: 8px;
        min-height: 27px;
        padding: 4px 8px;
        font-size: 10px;
    }

    .tt-current-price strong,
    .tt-single-public-price strong {
        font-size: 23px;
    }
}

/* =========================================================
   KOREKCIJA — SAMO IKONICA SLUŠALICE
   ========================================================= */

.tt-price-badge.tt-headphones-badge {
    top: 11px;
    left: 11px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 31px;
    min-width: 31px;
    height: 31px;
    min-height: 31px;
    padding: 0;
    border: 1px solid rgba(218, 0, 74, .16);
    border-radius: 50%;
    background: rgba(255, 255, 255, .95);
    color: #da004a !important;
    box-shadow: 0 3px 10px rgba(0, 0, 0, .08);
    font-size: 14px;
    line-height: 1;
}

.tt-price-badge.tt-headphones-badge i {
    margin: 0;
    font-size: 14px;
    line-height: 1;
}

.tt-price-badge.tt-headphones-badge:hover,
.tt-price-badge.tt-headphones-badge:focus {
    border-color: rgba(218, 0, 74, .38);
    background: #fff7fa;
    color: #b6003e !important;
}

@media screen and (max-width: 600px) {
    .tt-price-badge.tt-headphones-badge {
        top: 8px;
        left: 8px;
        width: 29px;
        min-width: 29px;
        height: 29px;
        min-height: 29px;
    }
}

/* =========================================================
   MODERNA CENA I KUPOVNE AKCIJE
   ========================================================= */

.tt-visually-hidden {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

.product-item .add-info table {
    width: 100%;
    table-layout: fixed;
}

.product-item .prices {
    display: flex !important;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100% !important;
    min-height: 65px;
    padding: 7px 6px 5px;
    box-sizing: border-box;
    text-align: center !important;
}

.tt-single-public-price,
.tt-previous-price,
.tt-current-price,
.tt-savings {
    display: block;
    width: 100%;
    margin: 0;
    text-align: center;
}

.tt-previous-price {
    color: #777;
    font-size: 13px;
    line-height: 1.25;
}

.tt-previous-price s {
    color: #777;
    text-decoration-color: #777;
    text-decoration-thickness: 1px;
}

.tt-current-price strong,
.tt-single-public-price strong {
    color: #da004a;
    font-size: 25px;
    line-height: 1.15;
    font-weight: 800;
}

.tt-single-public-price {
    padding: 3px 0;
}

.tt-savings {
    margin-top: 3px;
    color: #da004a;
    font-size: 11px;
    line-height: 1.25;
    font-weight: 700;
}

.tt-price-on-request {
    width: 100%;
    text-align: center;
}

.tt-purchase-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    width: 100%;
    min-height: 62px;
    padding: 7px 10px;
    box-sizing: border-box;
}

.tt-cart-action,
.tt-buy-now-action,
.tt-call-price-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    border-radius: 23px;
    box-sizing: border-box;
    font-family: inherit;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none !important;
    transition:
        background-color .18s ease,
        border-color .18s ease,
        color .18s ease,
        box-shadow .18s ease,
        transform .12s ease;
}

.tt-cart-action {
    flex: 0 0 46px;
    width: 46px;
    height: 46px;
    padding: 0;
    border: 1px solid rgba(218, 0, 74, .28);
    background: #fff;
    color: #da004a;
    box-shadow: 0 3px 9px rgba(0, 0, 0, .08);
    font-size: 20px;
}

.tt-cart-action:hover,
.tt-cart-action:focus {
    border-color: #da004a;
    background: #fff1f6;
    color: #b6003e;
    outline: none;
}

.tt-buy-now-action {
    flex: 1 1 auto;
    max-width: 148px;
    padding: 0 17px;
    border: 1px solid #da004a;
    background: #da004a;
    color: #fff;
    box-shadow: 0 5px 13px rgba(218, 0, 74, .18);
    font-size: 13px;
}

.tt-buy-now-action:hover,
.tt-buy-now-action:focus {
    border-color: #b6003e;
    background: #b6003e;
    color: #fff;
    box-shadow: 0 7px 16px rgba(182, 0, 62, .22);
    outline: none;
}

.tt-cart-action:active,
.tt-buy-now-action:active,
.tt-call-price-action:active {
    transform: translateY(1px);
}

.tt-buy-now-action.is-busy {
    opacity: .65;
    pointer-events: none;
}

.tt-call-price-action {
    width: calc(100% - 20px);
    max-width: 205px;
    padding: 0 18px;
    gap: 8px;
    border: 1px solid rgba(218, 0, 74, .28);
    background: #fff7fa;
    color: #da004a !important;
    font-size: 13px;
}

.tt-call-price-action:hover,
.tt-call-price-action:focus {
    border-color: #da004a;
    background: #da004a;
    color: #fff !important;
}

@media screen and (max-width: 600px) {
    .tt-current-price strong,
    .tt-single-public-price strong {
        font-size: 22px;
    }

    .tt-purchase-actions {
        gap: 7px;
        padding-right: 7px;
        padding-left: 7px;
    }

    .tt-buy-now-action {
        padding-right: 12px;
        padding-left: 12px;
        font-size: 12px;
    }
}


/* Završna poravnanja — moraju ostati na kraju fajla */
.product-item .prices,
.product-item .tt-single-public-price,
.product-item .tt-previous-price,
.product-item .tt-current-price,
.product-item .tt-savings {
    text-align: center !important;
}

.product-item .tt-single-public-price,
.product-item .tt-previous-price,
.product-item .tt-current-price {
    width: 100% !important;
}

/* =========================================================
   KOREKCIJA DUGMETA "KUPI ODMAH"
   ========================================================= */

.product-item .tt-purchase-actions {
    min-height: 58px;
    gap: 8px;
    padding: 6px 9px;
}

.product-item .tt-cart-action,
.product-item .tt-buy-now-action {
    min-height: 44px;
    height: 44px;
    border-radius: 22px;
}

.product-item .tt-cart-action {
    flex-basis: 44px;
    width: 44px;
    font-size: 19px;
}

.product-item .tt-buy-now-action {
    max-width: 142px;
    padding-right: 16px;
    padding-left: 16px;
    font-size: 14px;
    line-height: 1;
    font-weight: 800;
    letter-spacing: .05px;
}

@media screen and (max-width: 600px) {
    .product-item .tt-purchase-actions {
        min-height: 56px;
        gap: 7px;
        padding: 6px 7px;
    }

    .product-item .tt-buy-now-action {
        padding-right: 12px;
        padding-left: 12px;
        font-size: 13px;
    }
}

/* =========================================================
   TEHNOTRON MENI ZA DELJENJE
   ========================================================= */

.tt-share-overlay {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 18px;
    background: rgba(22, 25, 28, .48);
    opacity: 0;
    visibility: hidden;
    box-sizing: border-box;
    transition:
        opacity .18s ease,
        visibility .18s ease;
}

.tt-share-overlay.is-open {
    opacity: 1;
    visibility: visible;
}

.tt-share-panel {
    width: 100%;
    max-width: 430px;
    max-height: calc(100vh - 36px);
    overflow-y: auto;
    border: 1px solid rgba(0, 0, 0, .08);
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 20px 55px rgba(0, 0, 0, .24);
    box-sizing: border-box;
    transform: translateY(8px) scale(.985);
    transition: transform .18s ease;
}

.tt-share-overlay.is-open .tt-share-panel {
    transform: translateY(0) scale(1);
}

.tt-share-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    padding: 18px 18px 13px;
    border-bottom: 1px solid #eceff1;
}

.tt-share-heading {
    min-width: 0;
}

.tt-share-title {
    display: block;
    margin: 0 0 4px;
    color: #22272b;
    font-size: 18px;
    line-height: 1.25;
    font-weight: 800;
}

.tt-share-product-name {
    display: block;
    overflow: hidden;
    color: #6b7278;
    font-size: 12px;
    line-height: 1.35;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tt-share-close {
    display: inline-flex;
    flex: 0 0 32px;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: #f3f5f6;
    color: #545b60;
    font-size: 16px;
    cursor: pointer;
}

.tt-share-close:hover,
.tt-share-close:focus {
    background: #fff1f6;
    color: #da004a;
    outline: none;
}

.tt-share-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    padding: 17px;
}

.tt-share-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 7px;
    min-width: 0;
    min-height: 82px;
    padding: 10px 5px 7px;
    border: 1px solid transparent;
    border-radius: 10px;
    background: #fff;
    color: #333a3f !important;
    box-sizing: border-box;
    font-family: inherit;
    font-size: 11px;
    line-height: 1.2;
    text-align: center;
    text-decoration: none !important;
    cursor: pointer;
    transition:
        border-color .16s ease,
        background-color .16s ease,
        transform .12s ease;
}

.tt-share-option:hover,
.tt-share-option:focus {
    border-color: rgba(218, 0, 74, .18);
    background: #fff7fa;
    color: #da004a !important;
    outline: none;
}

.tt-share-option:active {
    transform: translateY(1px);
}

.tt-share-option-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: #f2f4f5;
    color: #30363a;
    font-size: 20px;
}

.tt-share-option:hover .tt-share-option-icon,
.tt-share-option:focus .tt-share-option-icon {
    background: #fff;
    color: #da004a;
    box-shadow: 0 3px 10px rgba(0, 0, 0, .08);
}

.tt-share-viber-mark,
.tt-share-x-mark {
    font-family: Arial, sans-serif;
    font-size: 17px;
    line-height: 1;
    font-weight: 800;
}

.tt-share-option-label {
    display: block;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tt-share-note {
    margin: 0;
    padding: 0 18px 17px;
    color: #7b8287;
    font-size: 11px;
    line-height: 1.45;
    text-align: center;
}

body.tt-share-menu-open {
    overflow: hidden;
}

@media screen and (max-width: 600px) {
    .tt-share-overlay {
        align-items: flex-end;
        padding: 0;
    }

    .tt-share-panel {
        max-width: none;
        max-height: 82vh;
        border-right: 0;
        border-bottom: 0;
        border-left: 0;
        border-radius: 16px 16px 0 0;
        transform: translateY(22px);
    }

    .tt-share-overlay.is-open .tt-share-panel {
        transform: translateY(0);
    }

    .tt-share-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 7px;
        padding: 14px 10px;
    }

    .tt-share-option {
        min-height: 78px;
        padding-right: 2px;
        padding-left: 2px;
        font-size: 10px;
    }

    .tt-share-option-icon {
        width: 40px;
        height: 40px;
        font-size: 19px;
    }
}

/* =========================================================
   ZAVRŠNA KOREKCIJA — JEDNAKE KARTICE I KOMPAKTNA KUPOVINA
   Ovaj blok mora ostati na samom kraju CSS fajla.
   ========================================================= */

/*
   Spoljni product-grid koristi Bootstrap kolone.
   Flex omogućava da sve kartice u istom redu imaju istu visinu.
*/

.product-grid.clearfix {
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: stretch !important;
}

.product-grid.clearfix::before,
.product-grid.clearfix::after {
    display: none !important;
    content: none !important;
}

.product-grid.clearfix > .item-box.product-grid {
    display: flex !important;
    float: none !important;
    align-items: stretch !important;
}

.product-grid.clearfix > .item-box.product-grid > .product-item {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
    height: 100% !important;
}

/*
   Caption i details zauzimaju preostalu visinu.
   add-info se gura na dno kartice bez obzira na broj redova cene.
*/

.product-grid .product-item > .caption {
    display: flex !important;
    flex: 1 1 auto !important;
    width: 100% !important;
}

.product-grid .product-item > .caption > .details {
    display: flex !important;
    flex: 1 1 auto !important;
    flex-direction: column !important;
    width: 100% !important;
}

.product-grid .product-item .add-info {
    width: 100% !important;
    margin-top: auto !important;
}

/*
   Zona cene je iste visine kod:
   - jedne javne cene;
   - stare i nove cene;
   - stare, nove cene i uštede;
   - cene na upit.
*/

.product-grid .product-item .prices {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    height: 82px !important;
    min-height: 82px !important;
    max-height: 82px !important;
    padding: 6px 5px !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
    text-align: center !important;
}

.product-grid .product-item .tt-single-public-price,
.product-grid .product-item .tt-previous-price,
.product-grid .product-item .tt-current-price,
.product-grid .product-item .tt-savings,
.product-grid .product-item .tt-price-on-request {
    width: 100% !important;
    text-align: center !important;
}

/*
   Naslov zadržava ujednačenu visinu. Duži nazivi ostaju najviše
   u tri reda i ne guraju cenu i dugmad naniže.
*/

.product-grid .product-item .product-title {
    display: -webkit-box !important;
    min-height: 51px !important;
    max-height: 51px !important;
    margin: 7px 8px 5px !important;
    overflow: hidden !important;
    line-height: 17px !important;
    -webkit-box-orient: vertical !important;
    -webkit-line-clamp: 3 !important;
}

/*
   Kompaktnija zona kupovine.
*/

.product-grid .product-item .tt-purchase-actions {
    min-height: 50px !important;
    height: 50px !important;
    gap: 7px !important;
    padding: 5px 8px !important;
    box-sizing: border-box !important;
}

.product-grid .product-item .tt-cart-action {
    flex: 0 0 38px !important;
    width: 38px !important;
    min-width: 38px !important;
    height: 38px !important;
    min-height: 38px !important;
    padding: 0 !important;
    border-radius: 50% !important;
    font-size: 17px !important;
}

.product-grid .product-item .tt-buy-now-action {
    flex: 1 1 auto !important;
    width: auto !important;
    max-width: 132px !important;
    height: 38px !important;
    min-height: 38px !important;
    padding: 0 14px !important;
    border-radius: 19px !important;
    font-size: 14px !important;
    line-height: 38px !important;
    font-weight: 800 !important;
    white-space: nowrap !important;
}

/*
   Mobilni prikaz: jedna kartica po širini ostaje prirodne visine,
   ali su cena i kupovne akcije i dalje ujednačene.
*/

@media screen and (max-width: 767px) {
    .product-grid.clearfix {
        display: block !important;
    }

    .product-grid.clearfix > .item-box.product-grid {
        display: block !important;
        float: left !important;
    }

    .product-grid.clearfix > .item-box.product-grid > .product-item {
        display: flex !important;
        min-height: 0 !important;
    }

    .product-grid .product-item .prices {
        height: 78px !important;
        min-height: 78px !important;
        max-height: 78px !important;
    }

    .product-grid .product-item .tt-purchase-actions {
        min-height: 48px !important;
        height: 48px !important;
        gap: 6px !important;
        padding: 5px 7px !important;
    }

    .product-grid .product-item .tt-cart-action {
        flex-basis: 36px !important;
        width: 36px !important;
        min-width: 36px !important;
        height: 36px !important;
        min-height: 36px !important;
        font-size: 16px !important;
    }

    .product-grid .product-item .tt-buy-now-action {
        max-width: 126px !important;
        height: 36px !important;
        min-height: 36px !important;
        padding: 0 12px !important;
        border-radius: 18px !important;
        font-size: 13px !important;
        line-height: 36px !important;
    }
}

/* =========================================================
   PROCENAT OD 5%+ I BEDŽ "NAJPRODAVANIJI"
   Ovaj blok mora ostati pri kraju CSS fajla.
   ========================================================= */

.product-item .tt-badge-stack {
    position: absolute;
    top: 11px;
    left: 11px;
    z-index: 58;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    max-width: calc(100% - 70px);
    pointer-events: none;
}

.product-item .tt-badge-stack > * {
    pointer-events: auto;
}

/*
   Postojeće price badge oznake više nisu pojedinačno apsolutne,
   jer njihov položaj kontroliše tt-badge-stack.
*/

.product-item .tt-badge-stack .tt-price-badge {
    position: static !important;
    top: auto !important;
    right: auto !important;
    bottom: auto !important;
    left: auto !important;
    margin: 0 !important;
}

/*
   BEST BUY medaljon
*/

.product-item .tt-best-buy-badge {
    position: relative;
    display: block;
    width: 47px;
    height: 54px;
    margin: 0 0 2px 1px;
    filter: drop-shadow(0 3px 6px rgba(0, 0, 0, .13));
    box-sizing: border-box;
}

.product-item .tt-best-buy-inner {
    position: absolute;
    top: 0;
    left: 50%;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 43px;
    height: 43px;
    border: 3px solid #fff;
    border-radius: 50%;
    background: #da004a;
    color: #fff;
    box-shadow:
        0 0 0 2px #da004a,
        inset 0 0 0 1px rgba(255, 255, 255, .34);
    box-sizing: border-box;
    line-height: .92;
    text-align: center;
    transform: translateX(-50%);
}

.product-item .tt-best-buy-inner::before {
    position: absolute;
    inset: 4px;
    border: 1px dashed rgba(255, 255, 255, .68);
    border-radius: 50%;
    content: "";
    pointer-events: none;
}

.product-item .tt-best-buy-top,
.product-item .tt-best-buy-bottom {
    position: relative;
    z-index: 1;
    display: block;
    letter-spacing: .25px;
    font-weight: 900;
}

.product-item .tt-best-buy-top {
    font-size: 8px;
}

.product-item .tt-best-buy-bottom {
    margin-top: 1px;
    font-size: 11px;
}

.product-item .tt-best-buy-ribbon {
    position: absolute;
    top: 34px;
    z-index: 1;
    width: 15px;
    height: 19px;
    background: #b6003e;
}

.product-item .tt-best-buy-ribbon::after {
    position: absolute;
    bottom: 0;
    width: 0;
    height: 0;
    border-top: 6px solid transparent;
    content: "";
}

.product-item .tt-best-buy-ribbon-left {
    left: 8px;
    transform: rotate(8deg);
}

.product-item .tt-best-buy-ribbon-left::after {
    left: 0;
    border-right: 7px solid transparent;
    border-bottom: 0;
    border-left: 8px solid #fff;
}

.product-item .tt-best-buy-ribbon-right {
    right: 8px;
    transform: rotate(-8deg);
}

.product-item .tt-best-buy-ribbon-right::after {
    right: 0;
    border-right: 8px solid #fff;
    border-bottom: 0;
    border-left: 7px solid transparent;
}

/*
   TOP PRODAJA ostaje kompaktan bedž ispod medaljona/procenta.
*/

.product-item .tt-top-sales-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    min-height: 25px;
    padding: 5px 9px;
    border: 1px solid rgba(218, 0, 74, .18);
    border-radius: 13px;
    background: rgba(255, 255, 255, .96);
    color: #34393d;
    box-shadow: 0 3px 9px rgba(0, 0, 0, .08);
    box-sizing: border-box;
    font-size: 9px;
    line-height: 1;
    font-weight: 900;
    letter-spacing: .15px;
    white-space: nowrap;
}

.product-item .tt-top-sales-badge i {
    color: #da004a;
    font-size: 10px;
    line-height: 1;
}


@media screen and (max-width: 600px) {
    .product-item .tt-badge-stack {
        top: 8px;
        left: 8px;
        gap: 5px;
        max-width: calc(100% - 62px);
    }

    .product-item .tt-best-buy-badge {
        width: 42px;
        height: 49px;
        margin-left: 0;
    }

    .product-item .tt-best-buy-inner {
        width: 38px;
        height: 38px;
        border-width: 2px;
        box-shadow:
            0 0 0 2px #da004a,
            inset 0 0 0 1px rgba(255, 255, 255, .34);
    }

    .product-item .tt-best-buy-top {
        font-size: 7px;
    }

    .product-item .tt-best-buy-bottom {
        font-size: 10px;
    }

    .product-item .tt-best-buy-ribbon {
        top: 30px;
        width: 13px;
        height: 17px;
    }

    .product-item .tt-best-buy-ribbon-left {
        left: 7px;
    }

    .product-item .tt-best-buy-ribbon-right {
        right: 7px;
    }

    .product-item .tt-top-sales-badge {
        min-height: 23px;
        padding: 4px 8px;
        border-radius: 12px;
        font-size: 8px;
    }

    .product-item .tt-top-sales-badge i {
        font-size: 9px;
    }
}

/* =========================================================
   KOMPAKTNI BEST BUY I TOP PRODAJA BEDŽEVI
   Ovaj blok mora ostati na samom kraju CSS fajla.
   ========================================================= */

.product-item .tt-badge-stack {
    gap: 5px !important;
}

.product-item .tt-compact-product-badge {
    position: relative !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 30px !important;
    min-width: 30px !important;
    height: 30px !important;
    min-height: 30px !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: visible !important;
    border: 1px solid rgba(218, 0, 74, .18) !important;
    border-radius: 50% !important;
    background: rgba(255, 255, 255, .96) !important;
    color: #da004a !important;
    box-shadow: 0 3px 9px rgba(0, 0, 0, .08) !important;
    box-sizing: border-box !important;
    line-height: 1 !important;
    text-align: center !important;
    cursor: default !important;
    filter: none !important;
}

.product-item .tt-compact-product-badge:hover {
    border-color: rgba(218, 0, 74, .40) !important;
    background: #fff7fa !important;
    box-shadow: 0 4px 11px rgba(218, 0, 74, .13) !important;
}

.product-item .tt-best-buy-badge {
    width: 30px !important;
    height: 30px !important;
}

.product-item .tt-best-buy-badge > .fa-certificate {
    position: static !important;
    margin: 0 !important;
    color: #da004a !important;
    font-size: 22px !important;
    line-height: 1 !important;
}

.product-item .tt-best-buy-badge .tt-badge-center-icon {
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    margin: 0 !important;
    color: #fff !important;
    font-size: 8px !important;
    line-height: 1 !important;
    transform: translate(-50%, -50%) !important;
}

.product-item .tt-top-sales-badge {
    width: 30px !important;
    height: 30px !important;
    min-height: 30px !important;
    padding: 0 !important;
    border-radius: 50% !important;
    font-size: 0 !important;
    letter-spacing: 0 !important;
    white-space: normal !important;
}

.product-item .tt-top-sales-badge > .fa-trophy {
    margin: 0 !important;
    color: #da004a !important;
    font-size: 15px !important;
    line-height: 1 !important;
}

/* Uklanjanje svih starih elemenata medaljona ako ostanu u keširanom HTML-u. */
.product-item .tt-best-buy-inner,
.product-item .tt-best-buy-ribbon,
.product-item .tt-best-buy-top,
.product-item .tt-best-buy-bottom,
.product-item .tt-top-sales-badge > span {
    display: none !important;
}

@media screen and (max-width: 600px) {
    .product-item .tt-compact-product-badge,
    .product-item .tt-best-buy-badge,
    .product-item .tt-top-sales-badge {
        width: 28px !important;
        min-width: 28px !important;
        height: 28px !important;
        min-height: 28px !important;
    }

    .product-item .tt-best-buy-badge > .fa-certificate {
        font-size: 20px !important;
    }

    .product-item .tt-top-sales-badge > .fa-trophy {
        font-size: 14px !important;
    }
}

/* =========================================================
   TEHNOTRON PRODUCT GRID HOTFIX
   PRETRAGA SA JEDNIM ILI MALIM BROJEM REZULTATA
   Ovaj blok mora ostati na samom kraju CSS fajla.
   ========================================================= */

/*
   Stvarna NobleTheme struktura je:

   .product-grid.clearfix
       > .row
           > .item-box.product-grid
               > .thumbnail
                   > .product-item

   Ranije pravilo je greškom postavilo spoljašnji
   .product-grid.clearfix kao flex kontejner i očekivalo da su
   .item-box elementi njegovi direktni potomci.

   Kod pretrage sa jednim proizvodom Bootstrap .row se zbog toga
   sužavao, a kartica je završavala zgnječena uz desnu ivicu.
*/

/* Spoljašnji katalog ponovo mora biti normalan blok. */
.product-grid.clearfix {
    display: block !important;
    width: 100% !important;
    min-width: 0 !important;
}

/*
   Flex se primenjuje na pravi red koji neposredno sadrži
   Bootstrap kolone proizvoda.
*/
.product-grid.clearfix > .row {
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: stretch !important;
    width: auto !important;
}

/* Bootstrap clearfix pseudo-elementi nisu potrebni na flex redu. */
.product-grid.clearfix > .row::before,
.product-grid.clearfix > .row::after {
    display: none !important;
    content: none !important;
}

/* Svaka Bootstrap kolona ostaje u svojoj originalnoj širini. */
.product-grid.clearfix
    > .row
    > .item-box.product-grid {
    display: flex !important;
    float: none !important;
    align-items: stretch !important;
    min-width: 0 !important;
}

/* Thumbnail wrapper mora preneti punu visinu na karticu. */
.product-grid.clearfix
    > .row
    > .item-box.product-grid
    > .thumbnail {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
    min-width: 0 !important;
    height: auto !important;
}

/* Sama kartica ostaje vertikalna i jednake visine u redu. */
.product-grid.clearfix
    > .row
    > .item-box.product-grid
    > .thumbnail
    > .product-item {
    display: flex !important;
    flex: 1 1 auto !important;
    flex-direction: column !important;
    width: 100% !important;
    min-width: 0 !important;
    height: 100% !important;
}

/*
   Dodatna zaštita za stranicu pretrage:
   rezultat nikada ne sme da se sabije na usku vertikalnu traku.
*/
.search-page .product-grid.clearfix,
.search-page .product-grid.clearfix > .row {
    min-width: 0 !important;
}

.search-page
    .product-grid.clearfix
    > .row
    > .item-box.product-grid {
    min-width: 0 !important;
}

/*
   List prikaz: hover galerija ne sme da preuzme 100% širine,
   jer NobleTheme u tom režimu postavlja sliku i opis paralelno.
*/
.search-page
    .item-box.product-list
    .tt-hover-gallery,
.product-list
    .item-box
    .tt-hover-gallery,
.item-box.product-list
    .tt-hover-gallery {
    width: 30% !important;
    max-width: 290px !important;
    min-width: 210px !important;
    flex: 0 0 30% !important;
    float: left !important;
    aspect-ratio: 4 / 3 !important;
}

.search-page
    .item-box.product-list
    .caption,
.product-list
    .item-box
    .caption,
.item-box.product-list
    .caption {
    width: 70% !important;
    min-width: 0 !important;
    flex: 1 1 auto !important;
    float: none !important;
}

/* Tablet i telefon zadržavaju prirodan raspored teme. */
@media screen and (max-width: 767px) {
    .product-grid.clearfix > .row {
        display: block !important;
    }

    .product-grid.clearfix
        > .row
        > .item-box.product-grid {
        display: block !important;
        float: left !important;
    }

    .product-grid.clearfix
        > .row
        > .item-box.product-grid
        > .thumbnail {
        display: block !important;
        height: auto !important;
    }

    .product-grid.clearfix
        > .row
        > .item-box.product-grid
        > .thumbnail
        > .product-item {
        display: flex !important;
        height: auto !important;
    }

    .search-page
        .item-box.product-list
        .tt-hover-gallery,
    .product-list
        .item-box
        .tt-hover-gallery,
    .item-box.product-list
        .tt-hover-gallery {
        width: 100% !important;
        max-width: none !important;
        min-width: 0 !important;
        flex: none !important;
        float: none !important;
    }

    .search-page
        .item-box.product-list
        .caption,
    .product-list
        .item-box
        .caption,
    .item-box.product-list
        .caption {
        width: 100% !important;
        float: none !important;
    }
}

/* =========================================================
   TEHNOTRON PRODUCT DETAILS — RELATED PRODUCTS HOTFIX
   POVEZANI I ZAJEDNO KUPLJENI PROIZVODI
   Ovaj blok mora ostati na samom kraju fajla.
   ========================================================= */

/*
   Ova pravila su strogo ograničena na produkt stranicu i na:
   - related-products-grid
   - also-purchased-products-grid

   Ne utiču na kategorije, pretragu i tag stranice.
*/

.html-product-details-page
    .related-products-grid,
.html-product-details-page
    .also-purchased-products-grid {
    display: block !important;
    width: 100% !important;
    margin: 26px 0 0 !important;
    padding: 0 !important;
    overflow: visible !important;
}

/* Uredno zaglavlje sekcije */
.html-product-details-page
    .related-products-grid
    > .title,
.html-product-details-page
    .also-purchased-products-grid
    > .title {
    display: flex !important;
    align-items: center !important;
    width: 100% !important;
    min-height: 42px !important;
    margin: 0 0 16px !important;
    padding: 0 0 10px !important;
    border-bottom: 2px solid #da004a !important;
    box-sizing: border-box !important;
    color: #343b40 !important;
    text-align: left !important;
}

.html-product-details-page
    .related-products-grid
    > .title strong,
.html-product-details-page
    .also-purchased-products-grid
    > .title strong {
    color: #343b40 !important;
    font-size: 16px !important;
    line-height: 1.35 !important;
    font-weight: 900 !important;
}

/*
   NobleTheme može koristiti .item-grid ili Bootstrap .row.
   Oba slučaja dobijaju isti kompaktan raspored.
*/
.html-product-details-page
    .related-products-grid
    > .item-grid,
.html-product-details-page
    .also-purchased-products-grid
    > .item-grid,
.html-product-details-page
    .related-products-grid
    > .row,
.html-product-details-page
    .also-purchased-products-grid
    > .row {
    display: grid !important;
    grid-template-columns:
        repeat(
            auto-fill,
            minmax(220px, 250px)
        ) !important;
    gap: 18px !important;
    align-items: stretch !important;
    justify-content: start !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* Bootstrap pseudo-elementi nisu potrebni u CSS grid rasporedu. */
.html-product-details-page
    .related-products-grid
    > .row::before,
.html-product-details-page
    .related-products-grid
    > .row::after,
.html-product-details-page
    .also-purchased-products-grid
    > .row::before,
.html-product-details-page
    .also-purchased-products-grid
    > .row::after {
    display: none !important;
    content: none !important;
}

/*
   Jedna kartica više ne sme da zauzme celu širinu.
*/
.html-product-details-page
    .related-products-grid
    > .item-grid
    > .item-box,
.html-product-details-page
    .also-purchased-products-grid
    > .item-grid
    > .item-box,
.html-product-details-page
    .related-products-grid
    > .row
    > .item-box,
.html-product-details-page
    .also-purchased-products-grid
    > .row
    > .item-box {
    display: flex !important;
    float: none !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 250px !important;
    height: auto !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* Dodatna zaštita kada tema dodaje Bootstrap col-* klase. */
.html-product-details-page
    .related-products-grid
    .item-box[class*="col-"],
.html-product-details-page
    .also-purchased-products-grid
    .item-box[class*="col-"] {
    float: none !important;
    width: 100% !important;
    max-width: 250px !important;
    flex: none !important;
}

/* Wrapper i kartica prenose jednaku visinu. */
.html-product-details-page
    .related-products-grid
    .item-box
    > .thumbnail,
.html-product-details-page
    .also-purchased-products-grid
    .item-box
    > .thumbnail {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
    min-width: 0 !important;
    height: 100% !important;
    margin: 0 !important;
}

.html-product-details-page
    .related-products-grid
    .item-box
    .product-item,
.html-product-details-page
    .also-purchased-products-grid
    .item-box
    .product-item {
    display: flex !important;
    flex: 1 1 auto !important;
    flex-direction: column !important;
    width: 100% !important;
    min-width: 0 !important;
    height: 100% !important;
    border: 1px solid #e0e5e7 !important;
    border-radius: 9px !important;
    background: #fff !important;
    box-shadow: 0 5px 16px rgba(25, 35, 40, .055) !important;
    overflow: hidden !important;
}

/*
   Slika ostaje kompaktna i ne razvlači karticu vertikalno.
*/
.html-product-details-page
    .related-products-grid
    .product-item
    .tt-hover-gallery,
.html-product-details-page
    .also-purchased-products-grid
    .product-item
    .tt-hover-gallery,
.html-product-details-page
    .related-products-grid
    .product-item
    > .picture,
.html-product-details-page
    .also-purchased-products-grid
    .product-item
    > .picture {
    width: 100% !important;
    height: 205px !important;
    min-height: 205px !important;
    max-height: 205px !important;
    aspect-ratio: auto !important;
    overflow: hidden !important;
}

.html-product-details-page
    .related-products-grid
    .product-item
    .tt-gallery-product-link,
.html-product-details-page
    .also-purchased-products-grid
    .product-item
    .tt-gallery-product-link {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    height: 100% !important;
}

.html-product-details-page
    .related-products-grid
    .product-item
    .tt-gallery-main-image,
.html-product-details-page
    .also-purchased-products-grid
    .product-item
    .tt-gallery-main-image,
.html-product-details-page
    .related-products-grid
    .product-item
    > .picture img,
.html-product-details-page
    .also-purchased-products-grid
    .product-item
    > .picture img {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    object-fit: contain !important;
}

/* Naslov i cena ostaju kompaktni. */
.html-product-details-page
    .related-products-grid
    .product-title,
.html-product-details-page
    .also-purchased-products-grid
    .product-title {
    min-height: 46px !important;
    max-height: 46px !important;
    margin: 8px 10px 5px !important;
    line-height: 15px !important;
    -webkit-line-clamp: 3 !important;
}

.html-product-details-page
    .related-products-grid
    .prices,
.html-product-details-page
    .also-purchased-products-grid
    .prices {
    height: 72px !important;
    min-height: 72px !important;
    max-height: 72px !important;
}

/* Jedan proizvod ostaje levo, ne centrira se i ne rasteže. */
.html-product-details-page
    .related-products-grid
    > .item-grid:has(> .item-box:only-child),
.html-product-details-page
    .also-purchased-products-grid
    > .item-grid:has(> .item-box:only-child),
.html-product-details-page
    .related-products-grid
    > .row:has(> .item-box:only-child),
.html-product-details-page
    .also-purchased-products-grid
    > .row:has(> .item-box:only-child) {
    grid-template-columns: 250px !important;
}

/* Tablet */
@media screen and (max-width: 991px) {
    .html-product-details-page
        .related-products-grid
        > .item-grid,
    .html-product-details-page
        .also-purchased-products-grid
        > .item-grid,
    .html-product-details-page
        .related-products-grid
        > .row,
    .html-product-details-page
        .also-purchased-products-grid
        > .row {
        grid-template-columns:
            repeat(
                auto-fill,
                minmax(205px, 1fr)
            ) !important;
    }

    .html-product-details-page
        .related-products-grid
        > .item-grid
        > .item-box,
    .html-product-details-page
        .also-purchased-products-grid
        > .item-grid
        > .item-box,
    .html-product-details-page
        .related-products-grid
        > .row
        > .item-box,
    .html-product-details-page
        .also-purchased-products-grid
        > .row
        > .item-box {
        max-width: none !important;
    }
}

/* Telefon */
@media screen and (max-width: 600px) {
    .html-product-details-page
        .related-products-grid
        > .item-grid,
    .html-product-details-page
        .also-purchased-products-grid
        > .item-grid,
    .html-product-details-page
        .related-products-grid
        > .row,
    .html-product-details-page
        .also-purchased-products-grid
        > .row {
        grid-template-columns: 1fr !important;
        gap: 14px !important;
    }

    .html-product-details-page
        .related-products-grid
        > .item-grid
        > .item-box,
    .html-product-details-page
        .also-purchased-products-grid
        > .item-grid
        > .item-box,
    .html-product-details-page
        .related-products-grid
        > .row
        > .item-box,
    .html-product-details-page
        .also-purchased-products-grid
        > .row
        > .item-box {
        width: 100% !important;
        max-width: 100% !important;
    }

    .html-product-details-page
        .related-products-grid
        .product-item
        .tt-hover-gallery,
    .html-product-details-page
        .also-purchased-products-grid
        .product-item
        .tt-hover-gallery,
    .html-product-details-page
        .related-products-grid
        .product-item
        > .picture,
    .html-product-details-page
        .also-purchased-products-grid
        .product-item
        > .picture {
        height: 230px !important;
        min-height: 230px !important;
        max-height: 230px !important;
    }
}
