/* =====================================================
   SINGLE PRODUCT – STABILIZACIJA LAYOUTA (TheGem)
   ===================================================== */

/* -----------------------------------------------------
   1. GENERAL RESET (ne diramo strukturu teme)
----------------------------------------------------- */

.single-product-content {
    box-sizing: border-box;
	margin-bottom:20px !important;
}

/* -----------------------------------------------------
   2. PRODUCT NAV (PREV / NEXT) – VIDLJIVO I ČITLJIVO
----------------------------------------------------- */

.product-page__nav {
    margin: 20px 0 10px;
}

.product-page__nav-list {
    display: flex;
    align-items: center;
    gap: 15px;
}

.product-page__nav--prev,
.product-page__nav--next {
    font-weight: 500;
    text-decoration: none;
}

.product-page__nav--prev span::before {
    content: "← ";
}

.product-page__nav--next span::after {
    content: " →";
}

/* isključujemo TheGem pseudo-ikonice bez brisanja HTML-a */
.product-page__nav--prev:before,
.product-page__nav--next:before {
    content: none !important;
}

/* preview tooltip – da ne iskače van ekrana */
.product-page__nav-preview-wrap {
    max-width: 260px;
}

/* -----------------------------------------------------
   3. DESNA KOLONA – VRAĆAMO NORMALAN FLOW
   (namerno NEMA flex / order)
----------------------------------------------------- */

.product-page__right-column {
    display: block;
}

/* -----------------------------------------------------
   4. PRICE + ADD TO CART – SMIREN I ČIST PRIKAZ
----------------------------------------------------- */

.woocommerce .product-page__wrapper .price {
    font-size: 20px !important;
    font-weight: 600;
}

.single_add_to_cart_button {
    border-radius: 25px;
}

/* -----------------------------------------------------
   5. ACCORDION (OPISI) – NORMALAN TEKST
----------------------------------------------------- */

.thegem-accordion__item-title,
.thegem-accordion__item {
    text-transform: none !important;
}


/* -----------------------------------------------------
   6. RELATED PRODUCTS – KNJIGE BEZ CROPOVANJA
----------------------------------------------------- */

/* fiksni odnos stranica (knjiga) */
.woocommerce .products .product-image-inner {
    aspect-ratio: 2 / 3;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

/* slika se uvek vidi cela */
.woocommerce .products .product-image-inner img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* naslov ispod slike – centriran */
.woocommerce .products .product-title {
    text-align: center;
}

/* -----------------------------------------------------
   7. CONTAINER FIX – DA GRID NE PUKNE
----------------------------------------------------- */

.container.container-fullwidth.container-offset {
    max-width: 1280px;
    margin-left: auto;
    margin-right: auto;
}

/* -----------------------------------------------------
   8. MINI CART (SIDEBAR) – VIZUELNO SMIREN
----------------------------------------------------- */

.remove_from_cart_button {
    font-size: 25px;
    display: flex;
    justify-content: center;
    align-items: center;
    color: lightcoral !important;
}

.minicart-image,
.woocommerce-mini-cart-item__total {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 15px;
}

.widget_shopping_cart_content .quantity {
    visibility: hidden;
}

.widget_shopping_cart_content .quantity .amount {
    visibility: visible !important;
    display: block;
    text-align: center;
}

.widget_shopping_cart_content .product-title {
    display: block;
    width: 100%;
    text-align: center;
}

/* -----------------------------------------------------
   9. RESPONSIVE SITNICE
----------------------------------------------------- */

@media (max-width: 768px) {
    .product-page__nav-list {
        flex-wrap: wrap;
        gap: 8px;
    }

    .woocommerce .products .product-title {
        font-size: 14px;
    }
}

#page-title{
	display:none;
}

/* =====================================================
   PRODUCT DESCRIPTION – O KNJIZI (ČITLJIVOST)
   ===================================================== */

/* Accordion title (O knjizi, Dodatne informacije) */
.single-product .thegem-accordion__item-title span {
    font-size: 18px;
	color:black;
	font-weight:700 !important
}

.single-product 
.thegem-accordion__item--active 
.thegem-accordion__item-title span {
    font-weight: 700 !important;
}


/* Sam tekst opisa */
.thegem-accordion__item-body {
    font-size: 16px;
    line-height: 1.7;
    color: #333;
}

/* Paragrafi – malo vazduha */
.thegem-accordion__item-body p {
    margin-bottom: 14px;
}


/* =====================================================
   SINGLE PRODUCT – EDITORIAL UX (KNJIGE / IEF)
   ===================================================== */

/* ---------------------------------------------
   1. HERO / BUY SECTION (DESNA KOLONA)
--------------------------------------------- */

.product-page__right-column {
    background: #ffffff;
    border-radius: 12px;
	padding: 5px 36px 30px 36px;
    box-shadow: 0 8px 28px rgba(0,0,0,0.05);
    position: relative;
    z-index: 2;
}

/* Naslov knjige */
.product-page__right-column .product_title {
    margin-bottom: 8px;
}

/* Autor */
.custom_book_author {
    font-size: 16px;
    font-weight: 500;
    color: #555;
    margin-bottom: 18px;
}

/* Cena */
.woocommerce .product-page__wrapper .price {
    font-size: 18px !important;
    font-weight: 600;
    margin: 0px 0 12px;
}

/* CTA dugme – malo „teže“ */
.single_add_to_cart_button {
    border-radius: 24px;
    padding: 10px 22px;
    font-size: 15px;
}

/* ---------------------------------------------
   2. NAVIGACIJA (PRETHODNA / NAREDNA)
--------------------------------------------- */

.product-page__nav {
    margin: 15px 0 10px;
}

.product-page__nav-list {
    display: flex;
    align-items: center;
    gap: 14px;
}

/* ---------------------------------------------
   3. SECTION: O KNJIZI (ODVOJENA CELINA)
--------------------------------------------- */

.gem-woocommerce-tabs {
    margin-top: 25px;
    background: #f7f8fa;
}

/* centralna širina teksta */
.gem-woocommerce-tabs .thegem-accordion {
    max-width: 840px;
    margin: 0 auto;
}


/* Separator između accordion sekcija */
.thegem-accordion__item {
    border-bottom: 1px solid rgba(0,0,0,0.08);
}

/* Tekst opisa */
.thegem-accordion__item-body {
    font-size: 16px;
    line-height: 1.7;
    color: #333;
	padding:20px 20px 40px 10px !important;
}

/* ---------------------------------------------
   4. RELATED PRODUCTS – JASNO ODVOJENI
--------------------------------------------- */

.related-products {
    border-top: 1px solid rgba(0,0,0,0.08);
    background: #ffffff;
}

/* Knjige – uvek ceo prikaz */
.woocommerce .products .product-image-inner {
    aspect-ratio: 2 / 3;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.woocommerce .products .product-image-inner img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* ---------------------------------------------
   5. RESPONSIVE DORADA
--------------------------------------------- */

@media (max-width: 768px) {

    .product-page__right-column {
        padding: 24px;
        box-shadow: none;
        border-radius: 0;
    }

    .gem-woocommerce-tabs {
        padding: 40px 15px;
    }
}

.gem-woocommerce-tabs .thegem-accordion {
	background:white;
}

.gem-woocommerce-tabs
 {
	background:white;
}

/* FIX: TheGem sečenje Add to Cart dugmeta */
.single-product form.cart,
.single-product .product-page__right-column,
.single-product .product-page__right-column form.cart {
    overflow: visible !important;
}

.single-product .single_add_to_cart_button {
    line-height: 1;
    height: auto;
    min-height: 38px;
    padding-top: 10px;
    padding-bottom: 5px;
}


.single-product-content-bottom{
	display:none;
}

body.woocommerce .product-page__elements-title{
	padding-top:0px !important;
	padding-bottom:0px !important;
}

/* =====================================================
   MOBILNA RESPONSIVNOST - SLIKA PROIZVODA
   ===================================================== */

@media (max-width: 768px) {
    /* Glavna slika proizvoda - ograniči visinu */
    .product-page__image img,
    .woocommerce-product-gallery__image img {
        max-height: 60vh !important;
        width: auto !important;
        max-width: 100% !important;
        height: auto !important;
        object-fit: contain !important;
        margin: 0 auto !important;
        display: block !important;
    }
    
    /* Kontejner za sliku */
    .product-page__image,
    .woocommerce-product-gallery__image {
        text-align: center !important;
        overflow: hidden !important;
        max-height: 70vh !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }
    
    /* Fiks za TheGem galeriju */
    .product-gallery-slider .slider-wrapper,
    .product-gallery .slider-wrapper {
        max-height: 60vh !important;
    }
    
    /* Thumbnail slike */
    .product-gallery-thumbs .slider-wrapper,
    .flex-control-thumbs {
        max-height: 100px !important;
    }
    
    /* Dodatni responsive stilovi iz originalnog CSS-a */
    .product-page__nav-list {
        flex-wrap: wrap;
        gap: 8px;
    }

    .woocommerce .products .product-title {
        font-size: 14px;
    }
    
    .product-page__right-column {
        padding: 24px;
        box-shadow: none;
        border-radius: 0;
    }

    .gem-woocommerce-tabs {
        padding: 40px 15px;
    }
}

/* Za ekstremno male ekrane */
@media (max-width: 480px) {
    .product-page__image img,
    .woocommerce-product-gallery__image img {
        max-height: 50vh !important;
    }
    
    .product-page__image,
    .woocommerce-product-gallery__image {
        max-height: 60vh !important;
    }
    
    /* Dodatna prilagodba za male telefone */
    .product-page__right-column {
        padding: 20px 15px !important;
    }
    
    .single_add_to_cart_button {
        padding: 12px 20px !important;
        font-size: 14px !important;
        width: 100% !important;
    }
}

/* Fiks za vertikalne mobilne uređaje */
@media (max-height: 700px) and (max-width: 768px) {
    .product-page__image img,
    .woocommerce-product-gallery__image img {
        max-height: 50vh !important;
    }
}

/* Osiguraj da se slika uvek vidi cela */
.woocommerce-product-gallery__image {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: #f8f8f8 !important;
}

/* Fiks za zoom funkciju */
.zoomImg {
    max-height: 80vh !important;
}

/* Ako koristite TheGem slider galeriju */
.product-gallery .gem-slider-item img {
    max-width: 100% !important;
    max-height: 70vh !important;
    object-fit: contain !important;
}

/* Alternativni pristup - ograniči direktno */
@media (max-width: 768px) {
    /* Pokušajte ovo ako prvo ne radi */
    .product-page__image {
        height: auto !important;
        max-height: 500px !important;
    }
    
    .product-page__image .wp-post-image {
        max-height: 400px !important;
        width: auto !important;
    }
    
    /* Force container to limit image */
    .product-page__left-column {
        overflow: hidden !important;
    }
}

/* Emergency fix - hard limit */
@media (max-width: 768px) {
    div[data-large_image_width],
    div[data-large_image_height] {
        max-height: 60vh !important;
        overflow: hidden !important;
    }
    
    div[data-large_image_width] img,
    div[data-large_image_height] img {
        max-height: 60vh !important;
        object-fit: contain !important;
    }
}

/* Dodatni fiks za layout na mobilnim */
@media (max-width: 768px) {
    .single-product .product-page__wrapper {
        flex-direction: column !important;
    }
    
    .product-page__left-column,
    .product-page__right-column {
        width: 100% !important;
        max-width: 100% !important;
        flex: 0 0 100% !important;
    }
    
    .product-page__left-column {
        margin-bottom: 30px !important;
    }
}

/* Tablet optimizacija */
@media (min-width: 769px) and (max-width: 1024px) {
    .product-page__image img,
    .woocommerce-product-gallery__image img {
        max-height: 50vh !important;
    }
}

/* POVEĆANJE SCROLLBAR-a – samo za single product */
.single-product ::-webkit-scrollbar {
    width: 12px;      /* ← širina scrollbara */
}

.single-product ::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 8px;
}

.single-product ::-webkit-scrollbar-thumb {
    background: #999;
    border-radius: 8px;
}

.single-product ::-webkit-scrollbar-thumb:hover {
    background: #666;
}

/* =========================================
   MINI CART – OSTAVI KOLIČINU, UKLONI DUGMIĆE
   ========================================= */

/* ukloni samo interaktivni quantity blok */
.widget_shopping_cart_content 
.woocommerce-mini-cart-item__qty {
    display: none !important;
}

/* =====================================================
   RELATED PRODUCTS – FIXED 4-COLUMN EDITORIAL GRID
   ===================================================== */

/* wrapper */
.related-products .products {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    margin-top: 20px;
}

/* ugasi bootstrap kolone */
.related-products .inline-column {
    width: 100% !important;
    max-width: 100% !important;
    float: none !important;
}

/* kartica */
.related-products .product-inner {
    background: #fff;
    border: 1px solid rgba(0,0,0,0.08);
    border-radius: 10px;
    padding: 14px;
    height: 100%;
    display: flex;
    flex-direction: column;
}

/* slika knjige */
.related-products .product-image-inner {
    aspect-ratio: 2 / 3;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
}

.related-products .product-image-inner img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* naslov */
.related-products .product-title {
    text-align: center;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.3;
    margin: 6px 0 4px;
}

/* cena */
.related-products .product-price {
    text-align: center;
    font-weight: 600;
    margin-bottom: 10px;
}

/* dugme */
.related-products .product-bottom {
    margin-top: auto;
}

.related-products .product-bottom .button {
    width: 100%;
    border-radius: 20px;
    font-size: 13px;
}

.row::before,
.row::after {
    display: none !important;
    content: none !important;
}


/* =====================================================
   RELATED PRODUCTS – UOKVIRENA SEKCIJA SA POZADINOM
   ===================================================== */

.related-products {
    background: #f8f9fa;              /* blago siva pozadina */
    border-radius: 16px;              /* zaobljeni uglovi */
    border: 1px solid rgba(0,0,0,0.06); /* suptilna ivica */
	padding: 0px 30px;               /* unutrašnji razmak */

}

/* Naslov sekcije "Slični proizvodi" */
.related-products .related-title,
.related-products > h3,
.related-products .title-h3 {
    text-align: center;
    font-size: 22px;
    font-weight: 600;
}

/* Responsive */
@media (max-width: 768px) {
    .related-products {
        padding: 30px 15px;
        border-radius: 0;             /* bez zaobljenja na mobilnom */
        margin-left: -15px;
        margin-right: -15px;
    }
}

/* Forsiraj prikaz akcijske cene (TheGem fix) */
.price del {
    display: inline !important;
    opacity: 0.6;
    margin-right: 8px;
	font-size: 22px;
	color:red !important;
}

.price ins {
    display: inline !important;
    text-decoration: none;
    font-weight: 700;
    font-size: 22px;
}



