/* --- SEKCIJA 1: Product Hero (Prva Sekcija) --- */
.product-hero {
    /* PODRAZUMEVANI STILOVI (ZA MOBILNE I TABLETE DO 991px) */
    position: relative; /* Nije sticky na mobilnim */
    top: auto;
    height: auto;
    min-height: auto;
    overflow: visible;
    z-index: 1;
    background-color: #fff;
    background-attachment: scroll;
    padding-top: 60px;
    padding-bottom: 30px;
    display: flex;
    align-items: flex-start;
    justify-content: center;
}

.product-hero-content {
    margin: 0 auto;
    padding-top: 0;
    padding-bottom: 0;
    display: flex;
    flex-direction: column;
    height: auto;
    justify-content: center;
    position: relative;
    z-index: 2;
    overflow-y: visible;
}

.product-gallery {
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    align-self: flex-start;
}

/* --- Glavni slajder (.slider-for) --- */
.slider-for {
    margin: 0;
    padding: 0;
    width: 100%;
    overflow: hidden;
    position: relative;
}

.slider-for .slick-list,
.slider-for .slick-track {
    height: 100% !important;
}

.slider-for .slick-slide {
    display: flex !important;
    align-items: center;
    justify-content: center;
    height: 100% !important;
    overflow: hidden;
    min-height: auto !important;
}

.slider-for img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    margin: 0 auto;
}

.slider-nav {
    margin: 0 auto;
    padding: 0;
    max-width: 600px;
    width: 100%;
    overflow: hidden; 
}

.slider-nav .slick-slide {
    display: flex !important;
    align-items: center;
    justify-content: center;
    height: 90px;
    margin: 0 5px;
    border: 1px solid #BABABA;
    border-radius: 20px;
    overflow: hidden;
    flex-shrink: 0;
    flex-grow: 0;
    position: relative;
    min-width: 120px;
}

.slider-nav .slick-slide.slick-current {
    border: 2px solid #00D4E9 !important;
    box-shadow: none;
}

.slider-nav .slick-slide:hover {
    border-color: #ccc;
    cursor: pointer;
}

.invisible {
    opacity: 0;
    transition: opacity 0.1s;
    visibility: hidden;
}
.slick-initialized {
    opacity: 1 !important;
    visibility: visible !important;
}

.slider-nav img {
    max-width: 80%;
    max-height: 80%;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
    margin: auto;
    border: none;
    border-radius: 5px;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.slider-nav .slick-current img {
    border-color: transparent;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.slider-nav img:hover {
    border-color: transparent;
    opacity: 1;
}

/* Stilovi za detalje proizvoda */
.product-details-info {
    width: 100%;
    display: flex;
    flex-direction: column;
    text-align: center;
    margin-bottom: 10px;
    margin-top: 40px;
}

.product-title {    
    text-align: left;
    line-height: 1.2;   
}

.product-title span {
    color: #00D4E9;
}

.product-model {    
    font-weight: 500;
    color: #7A7A7A;
    margin-bottom: 20px;
    text-transform: uppercase;
    text-align: left;
}

.product-specifications {
    list-style: none;
    margin-top: 10px;
    font-size: 16px;
    line-height: 1.4;
    /* padding-left: 0; */
    text-align: left;
    max-width: none;
    margin-left: 0;
    margin-right: 0;
    color: #000;
}

.product-specifications li {
    position: relative;
}

.product-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-top: 20px;
    justify-content: flex-start;
    align-items: center;
    padding: 0 2rem;
}

.certification-badge-image {
    max-height: 80px;
    width: auto;
}
.product-title-mob {
    padding: 0 30px;
    margin-top: 25px;
    font-size: 36px;
    font-weight: 700;
    line-height: 42px;
}
.product-title-mob-inverter{
    padding: 0 30px;
    margin-top: -25px;
    font-size: 36px;
    font-weight: 700;
    line-height: 42px;
}
.product-title-black {
    color: #000;
    font-weight: 700;
}
.product-title-gray {
    color: #7A7A7A;
    font-weight: 500;
    font-size: 31px;
    line-height: 41px;
}
.product-title {
    display: none; /* Sakriva se na mobilnim uređajima */
}
/* SM - Mali uređaji (telefoni u pejzažnom režimu, 576px i više) */
@media (min-width: 576px) {
    /* .product-title {
        text-align: center;
    }
    .product-specifications {
        text-align: center;
    } */
}

/* MD - Srednji uređaji (tableti, 768px i više) */
@media (min-width: 768px) {
    .product-hero-content {
        flex-direction: row;
        justify-content: center;
        align-items: flex-end;
    }
    .slider-nav .slick-slide {
        margin-bottom: 10px
    }

    .product-gallery {
        flex-basis: 58.33%;
        max-width: 58.33%;
        padding: 0;
    }
    .product-details-info {
        flex-basis: 41.66%;
        max-width: 41.66%;
        padding-left: 40px;
        align-items: flex-start;
        text-align: left;
    }
    .product-title {
        text-align: left;
    }
   
    .product-specifications {      
        margin-left: 0;
        margin-right: 0;
        max-width: none;
        text-align: left;
    }
    .product-badges {
        justify-content: flex-start;
        margin-top: 40px;
    }
    .certification-badge-image {
        max-height: 70px;
    }
    .product-details-info-mob {
        display: none;
    }
    .product-title {
        display: block;
    }
    .product-specifications {
        padding-left: 0;
    }
    .product-badges {
        justify-content: center;
        padding: 0;
    }
}

/* LG - Veliki uređaji (desktop računari, 992px i više) */
@media (min-width: 992px) {
     /* sticky aktivira tek od 1200px */
    .slider-nav {
        max-width: 700px;
    }    
    .certification-badge-image {
        max-height: 90px;
    }
    .slick-slider {
        height: 360px;
    }
    .product-hero-content {
        height: calc(100vh - 70px);
    }
    .product-hero-content {
        align-items: flex-start;
    }
}

/* XL - Ekstra veliki uređaji (veliki desktop računari, 1200px i više) */
@media (min-width: 1200px) {
    .product-hero {
        position: sticky;
        top: 60px;
        height: 100vh;
        overflow: hidden;
        z-index: 1;
        background-attachment: fixed;
        padding-top: 0;
        padding-bottom: 0;
        align-items: center;       
    }
    .product-details-info {
        margin-bottom: 0px;
        margin-top: 0px;
    } 

    .product-hero-content {
        overflow-y: hidden;
    }

    .product-title {
        font-size: 36px;
    }
    .product-badges {
        margin-top: 15px;
    }
}

/* XXL - Ekstra ekstra veliki uređaji (veći desktop računari, 1400px i više) */
@media (min-width: 1400px) {    
    .product-title {
        font-size: 44px;
    }
    .product-model {
        font-size: 32px;
    }
    .product-specifications {
        font-size: 18px;
    }
}

@media (min-width: 1920px) {    
    .product-hero-content {
        top: -80px;
    }
    .slick-slider {
        height: auto;
    }
    .product-hero-content {
        height: auto;
        align-items: flex-end;
    }
    .product-badges {
        margin-top: 40px;
    }
}

/* === SAFARI & IPHONE OPTIMIZATIONS === */
/* Safari sticky positioning fix */
@supports (-webkit-touch-callout: none) {
    .product-hero {
        position: -webkit-sticky;
        position: sticky;
        -webkit-transform: translate3d(0, 0, 0);
        transform: translate3d(0, 0, 0);
    }
}

/* Safari touch improvements for sliders - iOS Safari only */
@supports (-webkit-touch-callout: none) and (pointer: coarse) {
    .slider-for,
    .slider-nav {
        -webkit-touch-callout: none;
        -webkit-user-select: none;
        -khtml-user-select: none;
        -moz-user-select: none;
        -ms-user-select: none;
        user-select: none;
        -webkit-overflow-scrolling: touch;
    }
    
    .slider-for .slick-slide,
    .slider-nav .slick-slide {
        -webkit-transform: translate3d(0, 0, 0);
        transform: translate3d(0, 0, 0);
    }
    
    .product-hero {
        -webkit-overflow-scrolling: touch;
    }
}

/* Force hardware acceleration - Safari/iOS only */
@supports (-webkit-touch-callout: none) {
    .product-hero,
    .product-gallery,
    .slider-for,
    .slider-nav {
        -webkit-transform: translateZ(0);
        transform: translateZ(0);
        will-change: transform;
    }
}