/* Stranica gotovog dizajna (sample_page.php) */

.pp_product {
    padding: 24px 0 0;
    font-family: var(--font-body, 'Figtree', 'Helvetica Neue', sans-serif);
    color: var(--color-text, #2E3D48);
    text-align: left;
}

.pp_product_top {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 520px;
    gap: 56px;
    align-items: start;
}

/* --- Galerija --- */
.pp_product_gallery {
    display: flex;
    gap: 16px;
    min-width: 0;
}

.pp_product_thumbs {
    display: flex;
    flex-direction: column;
    gap: 14px;
    width: 92px;
    flex: none;
    max-height: 620px;
    overflow-y: auto;
    scrollbar-width: none;
}

.pp_product_thumbs::-webkit-scrollbar {
    display: none;
}

.pp_product_thumbs .thumbnail_img {
    width: 92px;
    height: 92px;
    flex: none;
    box-sizing: border-box;
    border-radius: 8px;
    border: 2px solid #E3E9EF;
    object-fit: cover;
    cursor: pointer;
}

.pp_product_thumbs .thumbnail_img.active {
    border-color: var(--color-primary, #4F769C);
}

.pp_product_main_image {
    position: relative;
    flex: 1;
    min-width: 0;
    height: 620px;
    border-radius: 10px;
    overflow: hidden;
    background: var(--color-background-light, #F4F6F8);
}

.pp_product_main_image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* --- Detalji --- */
.pp_product_details {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.pp_product_details .product_title {
    margin: 0;
    font-size: 40px;
    line-height: 1.1;
    font-weight: 800;
    color: var(--color-text, #2E3D48);
}

.pp_product_details .product_subtitle,
.pp_product_details .product_description {
    margin: 14px 0 0;
    font-size: 17px;
    line-height: 1.6;
    color: var(--color-text-light, #5A646D);
    text-wrap: pretty;
}

.pp_product_details .product_subtitle:empty,
.pp_product_details .product_description:empty {
    display: none;
}

.pp_product_hidden {
    display: none;
}

/* kartice formata i cijene po količini: /css/product_formats.css */

.pp_product .color_swatches {
    margin-top: 12px;
}

.pp_product_note {
    margin-top: 22px;
    background: var(--color-primary-light, #E8EEF4);
    border-left: 4px solid var(--color-primary, #4F769C);
    border-radius: 8px;
    padding: 16px 18px;
    font-size: 16px;
    line-height: 1.5;
}

.pp_product_note strong {
    font-weight: 800;
}

/* --- Količina i košarica --- */
.pp_product_buy {
    margin-top: 22px;
    display: flex;
    gap: 12px;
    align-items: stretch;
}

.pp_product_qty {
    width: 150px;
    height: 60px;
    flex: none;
    display: flex;
    align-items: center;
    box-sizing: border-box;
    border: 2px solid var(--color-input-border, #DCE3E9);
    border-radius: 8px;
    overflow: hidden;
}

.pp_product_qty .quantity_btn {
    width: 42px;
    height: 100%;
    flex: none;
    padding: 0;
    border: 0;
    background: transparent;
    font-family: inherit;
    font-size: 22px;
    font-weight: 700;
    color: var(--color-text, #2E3D48);
    cursor: pointer;
}

.pp_product_qty .quantity_btn:hover:not(:disabled) {
    background: var(--color-background-light, #F4F6F8);
}

.pp_product_qty .quantity_btn:disabled {
    color: #B5BDC4;
    cursor: default;
}

.pp_product_qty input {
    flex: 1;
    min-width: 0;
    height: 100%;
    padding: 0;
    border: 0;
    outline: none;
    background: transparent;
    text-align: center;
    font-family: inherit;
    font-size: 18px;
    font-weight: 700;
    color: var(--color-text, #2E3D48);
    -moz-appearance: textfield;
}

.pp_product_qty input::-webkit-outer-spin-button,
.pp_product_qty input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.pp_product_cart_btn {
    flex: 1;
    height: 60px;
    border: 0;
    border-radius: 8px;
    background: var(--color-primary, #4F769C);
    color: #FFFFFF;
    font-family: inherit;
    font-size: 19px;
    font-weight: 700;
    cursor: pointer;
}

.pp_product_cart_btn:hover {
    background: var(--color-primary-dark, #3D5E80);
}

.pp_product_min {
    margin-top: 10px;
    font-size: 15px;
    color: var(--color-text-light, #5A646D);
}

.pp_product_min strong {
    font-weight: 800;
    color: var(--color-text, #2E3D48);
}

.pp_product_total {
    margin-top: 10px;
    font-size: 15px;
    color: var(--color-text-light, #5A646D);
}

.pp_product_total strong {
    font-weight: 800;
    color: var(--color-text, #2E3D48);
}

/* --- Informacije o proizvodu --- */
.pp_product .pp_section {
    margin-top: 80px;
}

.pp_product .pp_section h2 {
    font-size: 32px;
}

.pp_product_info {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 500px;
    gap: 44px;
    align-items: start;
}

.pp_product_info.pp_product_info__single {
    grid-template-columns: minmax(0, 1fr);
}

.pp_product_info__single .pp_product_info_image {
    display: none;
}

.pp_product_info_bar {
    margin-top: 12px;
    height: 5px;
    border-radius: 3px;
    background: #E3E9EF;
}

.pp_product_info_bar div {
    width: 26%;
    height: 5px;
    border-radius: 3px;
    background: var(--color-primary, #4F769C);
}

.pp_product_info_content {
    margin-top: 26px;
}

.pp_product_info_content .prod_topdesc,
.pp_product_info_content .prod_enddesc {
    margin: 0 0 20px;
    font-size: 17px;
    font-weight: 400;
    line-height: 1.6;
    color: var(--color-text-light, #5A646D);
}

.pp_product_info_content .prod_enddesc {
    margin: 20px 0 0;
    padding: 0;
}

.pp_product_info_content .prod_datadesc {
    border: 1px solid var(--color-line, #EDF0F2);
    border-radius: 12px;
    overflow: hidden;
}

/* tablica iz teksta info se ne prikazuje; umjesto nje product_page.html crta .pp_product_specs iz tehničkih specifikacija */
.pp_product_info_content .prod_datadesc:not(.pp_product_specs) {
    display: none;
}

.pp_product_info_content .prod_datael {
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr);
    gap: 24px;
    margin: 0;
    padding: 16px 22px;
    border-bottom: 1px solid var(--color-line, #EDF0F2);
    font-size: 17px;
    font-weight: 400;
    line-height: 1.5;
    color: var(--color-text-light, #5A646D);
}

.pp_product_info_content .prod_datael:nth-child(odd) {
    background: #F8FAFB;
}

.pp_product_info_content .prod_datael:last-child {
    border-bottom: 0;
}

.pp_product_info_content .prod_dataval {
    margin: 0;
    font-size: 17px;
    font-weight: 700;
    text-transform: lowercase;
    color: var(--color-text, #2E3D48);
}

.pp_product_info_image {
    height: 340px;
    border-radius: 12px;
    overflow: hidden;
    background: var(--color-background-light, #F4F6F8);
}

.pp_product_info_image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* --- Ostali dizajni --- */
.pp_others:not(:has(.pp_design_card)) {
    display: none;
}

.pp_others_row {
    margin-top: 26px;
    display: flex;
    gap: 24px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding-bottom: 14px;
    scrollbar-width: thin;
}

.pp_others_row a.pp_design_card {
    flex: none;
    width: 264px;
    scroll-snap-align: start;
}

.pp_others_row .pp_design_card_title {
    font-size: 19px;
}

.pp_others_row .pp_design_card_meta {
    font-size: 15px;
}

.pp_product .pp_section_head a.pp_link {
    font-size: 17px;
    font-weight: 600;
    white-space: nowrap;
}

@media (max-width: 1200px) {
    .pp_product_top {
        grid-template-columns: minmax(0, 1fr) 440px;
        gap: 36px;
    }

    .pp_product_main_image {
        height: 520px;
    }

    .pp_product_info {
        grid-template-columns: minmax(0, 1fr) 360px;
    }
}

@media (max-width: 1024px) {
    .pp_product_top,
    .pp_product_info,
    .pp_product .pp_panel,
    .pp_product .pp_contact {
        grid-template-columns: minmax(0, 1fr);
    }

    .pp_product_info_image {
        display: none;
    }
}

@media (max-width: 768px) {
    /* 63px = visina fiksnog mobilnog headera kad stranica nema #content wrapper */
    .pp_product {
        padding-top: 75px;
    }

    .pp_product .content_1280 {
        padding: 0 18px;
    }

    .pp_product_gallery {
        flex-direction: column-reverse;
        gap: 10px;
    }

    .pp_product_thumbs {
        flex-direction: row;
        gap: 10px;
        width: auto;
        max-height: none;
        overflow-x: auto;
    }

    .pp_product_thumbs .thumbnail_img {
        width: 66px;
        height: 66px;
        border-radius: 7px;
    }

    .pp_product_main_image {
        flex: none;
        height: 320px;
    }

    .pp_product_details .product_title {
        font-size: 28px;
    }

    .pp_product_details .product_subtitle,
    .pp_product_details .product_description {
        margin-top: 10px;
        font-size: 15px;
    }

    .pp_product_label {
        margin-top: 18px;
        font-size: 16px;
    }

    .pp_product_formats {
        margin-top: 10px;
        gap: 10px;
    }

    .pp_product_format {
        gap: 12px;
        padding: 12px;
        border-radius: 9px;
    }

    .pp_product_format_icon {
        width: 52px;
        height: 52px;
    }

    .pp_product_format_icon > span {
        padding: 3px;
    }

    .pp_product_format_name {
        font-size: 14px;
    }

    .pp_product_format_meta {
        font-size: 12px;
    }

    .pp_product_eyebrow {
        margin-top: 18px;
        font-size: 12px;
    }

    .pp_product_mainprice_value {
        font-size: 26px;
    }

    .pp_product_mainprice_qty {
        font-size: 14px;
    }

    .pp_product_tier {
        gap: 10px;
        padding: 10px 14px;
    }

    .pp_product_tier_qty {
        font-size: 14px;
    }

    .pp_product_tier_off {
        font-size: 11px;
        padding: 3px 8px;
    }

    .pp_product_tier_price {
        min-width: 62px;
        font-size: 16px;
    }

    .pp_product_note {
        margin-top: 16px;
        padding: 14px 16px;
        font-size: 14px;
    }

    .pp_product_buy {
        margin-top: 16px;
        gap: 10px;
    }

    .pp_product_qty {
        width: 124px;
        height: 54px;
    }

    .pp_product_qty .quantity_btn {
        width: 36px;
        font-size: 20px;
    }

    .pp_product_qty input {
        font-size: 16px;
    }

    .pp_product_cart_btn {
        height: 54px;
        font-size: 17px;
    }

    .pp_product_min {
        margin-top: 8px;
        font-size: 14px;
    }

    .pp_product_total {
        margin-top: 8px;
        font-size: 14px;
    }

    .pp_product .pp_section {
        margin-top: 30px;
    }

    .pp_product .pp_section h2 {
        font-size: 20px;
    }

    .pp_product_info_bar {
        margin-top: 10px;
        height: 4px;
    }

    .pp_product_info_bar div {
        height: 4px;
    }

    .pp_product_info_content {
        margin-top: 14px;
    }

    .pp_product_info_content .prod_topdesc,
    .pp_product_info_content .prod_enddesc {
        font-size: 15px;
    }

    .pp_product_info_content .prod_datadesc {
        border-radius: 10px;
    }

    .pp_product_info_content .prod_datael {
        grid-template-columns: minmax(0, 1fr);
        gap: 0;
        padding: 12px 14px;
        font-size: 14px;
        line-height: 1.45;
    }

    .pp_product_info_content .prod_dataval {
        font-size: 13px;
    }

    .pp_product .pp_panel {
        padding: 22px 18px;
        gap: 20px;
    }

    .pp_others_row {
        margin-top: 14px;
        gap: 14px;
        scrollbar-width: none;
    }

    .pp_others_row a.pp_design_card {
        width: 160px;
    }

    .pp_others_row .pp_design_card_title {
        font-size: 16px;
    }

    .pp_others_row .pp_design_card_meta {
        font-size: 13px;
    }

    .pp_product .pp_section_head a.pp_link {
        font-size: 14px;
    }
}

/* --- Zajedničko sa sample_page.js (boje, obavijest o dodavanju u košaricu, opis) --- */
.color_swatches {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-s);
}

.color_swatch {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 1px solid var(--border-grey);
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.color_swatch:hover {
    transform: scale(1.1);
}

.color_swatch.active {
    box-shadow: 0 0 0 2px var(--color-background), 0 0 0 4px var(--color-primary);
}

/* Toast (Add to cart) */
.toast_content {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.toast_header {
    padding: 12px 16px 0 16px;
}

.toast_title {
    font-family: var(--font-heading);
    font-size: 16px;
    font-weight: 700;
    line-height: 1.2;
    color: var(--color-text);
}

.toast_body {
    display: grid;
    grid-template-columns: 56px 1fr;
    gap: 12px;
    align-items: start;
    padding: 0 16px;
}

.toast_product_image {
    width: 56px;
    height: 56px;
    object-fit: cover;
    border-radius: 10px;
    border: 1px solid var(--border-grey);
}

.toast_details {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.toast_product_name {
    font-size: 16px;
    font-weight: 600;
}

.toast_product_meta {
    color: var(--muted-text, #6b7280);
    font-weight: 300;
    font-size: 13px;
}

.toast_product_price {
    font-size: 14px;
    font-weight: 600;
}

/* Print Pak nema bočnu košaricu (toggleCart), pa je u toastu samo gumb "U košaricu" */
.toast_actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 0 16px 16px 16px;
}

.toast_btn_cart,
.toast_btn_checkout {
    height: 48px;
    border-radius: 28px;
    border: 2px solid #0b0b0b;
    background: #fff;
    color: #0b0b0b;
    font-size: 18px;
    line-height: 18px;
    font-weight: 500;
}


.toast-close {
    position: absolute;
    top: 16px;
    right: 16px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    color: var(--color-text) !important;
}

.toast_btn_checkout {
    border-color: var(--main-color);
    border-radius: 8px;
    background: var(--main-color);
    color: #fff;
    font-weight: 700;
    cursor: pointer;
}

.toast_btn_checkout:hover {
    border-color: var(--color-primary-dark, #3D5E80);
    background: var(--color-primary-dark, #3D5E80);
}

@media (max-width: 640px) {
    .toast_title { font-size: 14px; }
    .toast_actions { grid-template-columns: 1fr; }
    .toast_btn_cart, .toast_btn_checkout { height: 44px; font-size: 16px; }
}

/* Product Description Show More/Less Styles */
.product_description {
    position: relative;
    overflow: visible;
}

.product_description.description_truncated {
    max-height: calc(1.7em * 5); /* 5 lines based on line-height */
    overflow: hidden;
    position: relative;
}

.product_description.description_expanded {
    max-height: none;
    overflow: visible;
}

.show_more_btn {
    color: var(--color-primary);
    font-weight: 400;
    transition: opacity 0.2s ease;
    user-select: none;
    font-size: inherit;
    display: inline;
    margin-left: 5px;
    cursor: pointer;
    text-decoration: underline;
}

.show_more_btn:hover {
    opacity: 0.8;
}

/* Ensure the button appears after the content when truncated */
.product_description.description_truncated .show_more_btn {
    position: absolute;
    bottom: -1px;
    right: 0;
    background: linear-gradient(to right, transparent 0%, var(--color-background) 50%);
    padding-left: 20px;
    padding-right: 5px;
    z-index: 10;
    white-space: nowrap;
}

.product_description.description_expanded .show_more_btn {
    position: static;
    background: none !important;
    padding-left: 0;
    padding-right: 0;
    margin-left: 5px;
    display: inline;
}

.fixoverlay {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	z-index: 2;
}
.fixoverlay.trgray {
	background-color: rgba(0,0,0,0.5);
}

.loginoverlay {
    z-index: 2000 !important;
}