/* Product presentation page styles */

.page-product-detail {
    background:
        radial-gradient(circle at 11% 14%, rgba(86, 143, 175, 0.18) 0%, transparent 24%),
        radial-gradient(circle at 88% 18%, rgba(214, 132, 66, 0.11) 0%, transparent 22%),
        radial-gradient(circle at 76% 68%, rgba(73, 110, 136, 0.14) 0%, transparent 28%),
        linear-gradient(180deg, #dbe7ea 0%, #d5e1e5 36%, #cfdadf 68%, #d5e0e4 100%);
    background-attachment: fixed;
}

.product-page-content {
    padding-top: 7rem;
    padding-bottom: 4rem;
    position: relative;
}

.product-page-content::after {
    content: '';
    position: absolute;
    right: 0;
    bottom: 6%;
    width: min(420px, 46vw);
    height: 340px;
    background: radial-gradient(circle at center, rgba(214, 130, 53, 0.12), transparent 72%);
    pointer-events: none;
    z-index: 0;
}

.product-page-content > * {
    position: relative;
    z-index: 1;
}

.product-page-content .breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.75rem;
    color: #60728f;
    padding: 0 0 1.4rem;
}

.product-page-content .breadcrumb a,
.product-page-content .breadcrumb > span {
    font-size: inherit;
    line-height: 1.25;
}

.product-page-content .breadcrumb a {
    color: #0e4d80;
    text-decoration: none;
    font-weight: 600;
}

.product-page-content .breadcrumb a:hover {
    color: #f58220;
}

.product-header {
    position: relative;
    margin-bottom: 2rem;
    padding: clamp(1.2rem, 2.4vw, 2rem);
    border-radius: 1.25rem;
    border: 1px solid rgba(124, 162, 198, 0.32);
    background:
        linear-gradient(132deg, rgba(240, 247, 249, 0.9) 0%, rgba(232, 241, 245, 0.88) 62%, rgba(224, 235, 240, 0.86) 100%),
        radial-gradient(circle at 88% 14%, rgba(66, 108, 136, 0.16), transparent 45%);
    box-shadow: 0 18px 44px rgba(31, 64, 98, 0.1);
    backdrop-filter: blur(14px);
}

.product-header-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
}

.product-title-section h1 {
    margin: 0.65rem 0 0;
    font-size: clamp(1.9rem, 4.2vw, 2.9rem);
    line-height: 1.05;
    letter-spacing: -0.03em;
    color: #153a60;
}

.product-category {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    padding: 0.38rem 0.75rem;
    background: rgba(66, 108, 136, 0.13);
    color: #0f4a78;
}

.product-badge-pill {
    background: linear-gradient(135deg, rgba(245, 130, 32, 0.13) 0%, rgba(244, 157, 69, 0.12) 100%);
    color: #c35f08;
    border-radius: 10px;
}

.product-context-chips {
    margin-top: 1rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
}

.context-chip {
    display: inline-flex;
    align-items: center;
    border-radius: 10px;
    border: 1px solid rgba(146, 176, 207, 0.42);
    padding: 0.34rem 0.72rem;
    background: rgba(239, 246, 249, 0.78);
    font-size: 0.75rem;
    font-weight: 600;
    color: #21496d;
}

.context-chip-muted {
    color: #697b95;
}

.short-description {
    margin-top: 1rem;
    font-size: 1rem;
    color: #32516f;
    line-height: 1.75;
    max-width: 78ch;
    padding-left: 1rem;
    border-left: 3px solid #f58220;
}

.product-main {
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
    gap: clamp(1.25rem, 2.6vw, 2.1rem);
    align-items: start;
    margin-bottom: 2.25rem;
}

.gallery,
.info-box,
.full-description,
.specifications,
.product-variants,
.related-products {
    border-radius: 1.15rem;
    border: 1px solid rgba(132, 166, 198, 0.28);
    background: linear-gradient(165deg, rgba(239, 246, 248, 0.88) 0%, rgba(232, 241, 245, 0.86) 100%);
    box-shadow: 0 16px 38px rgba(26, 58, 90, 0.09);
    backdrop-filter: blur(12px);
}

.gallery {
    padding: clamp(0.9rem, 1.9vw, 1.25rem);
    position: sticky;
    top: 92px;
}

.main-image {
    position: relative;
    margin-bottom: 0.95rem;
    height: clamp(320px, 44vw, 520px);
    border-radius: 0.95rem;
    border: 1px solid rgba(123, 156, 190, 0.34);
    overflow: hidden;
    background:
    radial-gradient(circle at 16% 10%, rgba(213, 229, 239, 0.82), transparent 52%),
    linear-gradient(145deg, #edf4f7 0%, #e3edf3 100%);
}

.main-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #fff;
}

.image-counter {
    position: absolute;
    left: 0.8rem;
    bottom: 0.8rem;
    padding: 0.3rem 0.62rem;
    border-radius: 999px;
    font-size: 0.75rem;
    color: #fff;
    background: rgba(11, 30, 54, 0.84);
}

.gallery-nav,
.gallery-zoom {
    position: absolute;
    z-index: 3;
    width: 40px;
    height: 40px;
    border: 1px solid rgba(255, 255, 255, 0.7);
    border-radius: 50%;
    color: #fff;
    background: rgba(9, 25, 45, 0.68);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.2s ease, background-color 0.2s ease;
}

.gallery-nav:hover {
    transform: translateY(-50%) scale(1.04);
    background: rgba(9, 25, 45, 0.9);
}

.gallery-zoom:hover {
    transform: scale(1.04);
    background: rgba(9, 25, 45, 0.9);
}

.gallery-prev {
    left: 0.8rem;
    top: 50%;
    transform: translateY(-50%);
}

.gallery-next {
    right: 0.8rem;
    top: 50%;
    transform: translateY(-50%);
}

.gallery-zoom {
    right: 0.8rem;
    bottom: 0.8rem;
}

.image-badge {
    position: absolute;
    top: -5px;
    left: -5px;
    width: 190px;
    z-index: 10;
    pointer-events: none;
    transition: 0.4s;
    overflow: hidden;
    border-top-left-radius: 24px;
}

.gallery:hover .image-badge {
    top: -2px;
    left: -2px;
}

.image-badge .badge-shape {
    display: block;
    width: 100%;
    height: auto;
    fill: var(--color-accent);
    filter: drop-shadow(4px 6px 14px rgb(0, 0, 0));
    transform: scaleX(-1);
    transition: 0.5s;
}

.gallery:hover .image-badge .badge-shape {
    filter: drop-shadow(4px 6px 14px rgba(0, 0, 0, 0.293));
}

.image-badge .badge-label {
    position: absolute;
    top: 23%;
    left: 39%;
    transform: translate(-50%, -50%);
    color: #fff;
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    white-space: nowrap;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.thumbnail-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(76px, 1fr));
    gap: 0.55rem;
}

.thumbnail-btn {
    width: 100%;
    aspect-ratio: 1 / 1;
    border-radius: 0.72rem;
    border: 1px solid rgba(131, 166, 198, 0.46);
    background: rgba(242, 247, 249, 0.92);
    overflow: hidden;
    padding: 0;
    cursor: pointer;
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.thumbnail-btn img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.thumbnail-btn:hover,
.thumbnail-btn.active {
    border-color: #2f79b4;
    transform: translateY(-1px);
    box-shadow: 0 8px 16px rgba(26, 71, 110, 0.16);
}

.thumbnail-label {
    margin: 0;
    font-size: 0.8125rem;
    line-height: 1.55;
    color: #5b6f8a;
}

.thumbnail-note {
    margin-top: 0.9rem;
    text-align: left;
}

.product-info {
    display: flex;
    flex-direction: column;
    gap: 0.95rem;
}

.info-box {
    padding: clamp(1rem, 2.4vw, 1.6rem);
}

.info-box h3 {
    margin: 0 0 0.8rem;
    font-size: 0.875rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #1c4b75;
}

.info-row {
    display: grid;
    grid-template-columns: minmax(120px, 38%) 1fr;
    gap: 0.8rem;
    padding: 0.54rem 0;
    border-bottom: 1px solid rgba(133, 165, 195, 0.25);
}

.info-row:last-child {
    border-bottom: none;
}

.info-label {
    font-size: 0.875rem;
    color: #60738d;
    font-weight: 600;
}

.info-value {
    font-size: 0.9375rem;
    color: #1d3f62;
    font-weight: 600;
}

.material-box {
    border-radius: 0.82rem;
    border-left: 3px solid #f58220;
    padding: 0.9rem;
    background: rgba(245, 130, 32, 0.06);
    color: #244360;
    line-height: 1.7;
}

.info-note {
    margin: 0;
    line-height: 1.72;
    color: #355472;
}

.action-buttons {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    row-gap: 0.55rem;
}

.btn-email {
    color: #fff;
    border-color: #0c6545;
    background: linear-gradient(120deg, #138a5e 0%, #0c6545 100%);
}

.btn-share-crumb {
    position: absolute;
    top: clamp(0.9rem, 1.8vw, 1.4rem);
    right: clamp(0.9rem, 1.8vw, 1.4rem);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid rgba(124, 162, 198, 0.55);
    background: rgba(255, 255, 255, 0.92);
    color: #21496d;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 2px 8px rgba(31, 64, 98, 0.1);
    z-index: 2;
}

.btn-share-crumb:hover {
    background: #0e4d80;
    color: #fff;
    border-color: #0e4d80;
    box-shadow: 0 4px 14px rgba(14, 77, 128, 0.28);
}

.product-page-content .btn {
    width: 100%;
    border-radius: 0.78rem;
    border: 1px solid transparent;
    padding: 0.72rem 0.95rem;
    font-size: 0.875rem;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.product-page-content .btn:hover {
    transform: translateY(-1px);
}

.btn-outline {
    color: #174b77;
    border-color: rgba(69, 112, 148, 0.5);
    background: rgba(255, 255, 255, 0.9);
}

.btn-disabled {
    pointer-events: none;
    cursor: not-allowed;
}
.btn-disabled span {
    opacity: .55;
}
.btn-disabled svg {
    opacity: .55;
}
.btn-disabled::after {
    opacity: .55;
}

/* ── Hero pill shape design za action buttons ── */
.action-buttons .btn {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    border-radius: 0;
    border: none;
    background: transparent;
    padding: 0.82rem 1rem;
}

.action-buttons .btn:hover {
    transform: none;
}

/* Primarni (ispunjeni pill) — Pozovite nas + Preuzmi PDF */
.action-buttons .btn-contact {
    color: #fff;
}
.action-buttons .btn-pdf span{
    color: var(--color-accent);
    z-index: 3;
}
.action-buttons .btn-pdf svg{
    fill: var(--color-accent);
    z-index: 3;
}

.action-buttons .btn-contact::before,
.action-buttons .btn-pdf::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 0;
    background: var(--color-accent);
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 24.05' preserveAspectRatio='none'%3E%3Cpath d='M114 7c-2.82-1.65-3.06-4.36-6-6a9.06 9.06 0 0 0-5-1H12A12.22 12.22 0 0 0 0 12 12.19 12.19 0 0 0 11 24h92a8.89 8.89 0 0 0 5-1c2.94-1.63 3.18-4.35 6-6a9.4 9.4 0 0 1 6-1V8a9.27 9.27 0 0 1-6-1Z'/%3E%3C/svg%3E");
    -webkit-mask-repeat: no-repeat;
    -webkit-mask-position: center;
    -webkit-mask-size: 100% 100%;
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 24.05' preserveAspectRatio='none'%3E%3Cpath d='M114 7c-2.82-1.65-3.06-4.36-6-6a9.06 9.06 0 0 0-5-1H12A12.22 12.22 0 0 0 0 12 12.19 12.19 0 0 0 11 24h92a8.89 8.89 0 0 0 5-1c2.94-1.63 3.18-4.35 6-6a9.4 9.4 0 0 1 6-1V8a9.27 9.27 0 0 1-6-1Z'/%3E%3C/svg%3E");
    mask-repeat: no-repeat;
    mask-position: center;
    mask-size: 100% 100%;
    transition: filter 0.25s ease;
}

.action-buttons .btn-contact > *,
.action-buttons .btn-pdf > * {
    position: relative;
    z-index: 1;
}


/* Sekundarni (obrubljen pill) — Pošalji upit + Štampaj */
.action-buttons .btn-email {
    color: var(--color-accent);
    transform: translateX(-1px);
}
.action-buttons .btn-print {
    color: var(--color-white);
    transform: translateX(-1px);
}

.action-buttons .btn-email::after,
.action-buttons .btn-pdf::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 90%;
    z-index: 1;
    border-radius: 23px;
    border: 2px solid var(--color-accent);
    background-color: var(--color-gray-100);
}
.action-buttons .btn-pdf::after {
    left: 0;
}

.action-buttons .btn-email::before,
.action-buttons .btn-print::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 0;
    transform: scaleX(-1);
    transform-origin: center;
    background: var(--color-accent);
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 24.05' preserveAspectRatio='none'%3E%3Cpath d='M114 7c-2.82-1.65-3.06-4.36-6-6a9.06 9.06 0 0 0-5-1H12A12.22 12.22 0 0 0 0 12 12.19 12.19 0 0 0 11 24h92a8.89 8.89 0 0 0 5-1c2.94-1.63 3.18-4.35 6-6a9.4 9.4 0 0 1 6-1V8a9.27 9.27 0 0 1-6-1Z'/%3E%3C/svg%3E");
    -webkit-mask-repeat: no-repeat;
    -webkit-mask-position: center;
    -webkit-mask-size: 100% 100%;
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 24.05' preserveAspectRatio='none'%3E%3Cpath d='M114 7c-2.82-1.65-3.06-4.36-6-6a9.06 9.06 0 0 0-5-1H12A12.22 12.22 0 0 0 0 12 12.19 12.19 0 0 0 11 24h92a8.89 8.89 0 0 0 5-1c2.94-1.63 3.18-4.35 6-6a9.4 9.4 0 0 1 6-1V8a9.27 9.27 0 0 1-6-1Z'/%3E%3C/svg%3E");
    mask-repeat: no-repeat;
    mask-position: center;
    mask-size: 100% 100%;
}

.action-buttons .btn-email > *,
.action-buttons .btn-print > * {
    position: relative;
    z-index: 3;
}

.action-buttons .btn-email:hover,
.action-buttons .btn-print:hover {
    transform: scaleX(1.05) translateX(-1px);
    transform-origin: center right;
}
.action-buttons .btn-contact:hover,
.action-buttons .btn-pdf:hover {
    transform: scaleX(1.05) translateX(-1px);
    transform-origin: center left;
}

.action-buttons .btn-pdf.btn-disabled::before {
    background: linear-gradient(
        90deg,
        rgba(254, 254, 254, 0.771) 0%,
        rgba(254, 255, 255, 0.737) 81%,
        rgba(0, 85, 143, 0.72) 94%,
        var(--color-accent) 100%
    );
    border: 1px solid rgba(0, 85, 143, 0.72);
    
}

.full-description,
.specifications,
.product-variants,
.related-products {
    padding: clamp(1rem, 2.4vw, 1.6rem);
    margin-bottom: 1.35rem;
}

.full-description h2,
.specifications h2,
.product-variants h2,
.related-products h2 {
    margin: 0 0 1rem;
    font-size: clamp(1.32rem, 2.6vw, 1.78rem);
    line-height: 1.15;
    letter-spacing: -0.02em;
    color: #14395f;
}

.full-description p,
.spec-content p {
    color: #32506d;
    line-height: 1.82;
    margin: 0;
}

.spec-content {
    border-radius: 0.8rem;
    border-left: 3px solid #f58220;
    background: rgba(245, 130, 32, 0.06);
    padding: 1rem;
}

.variants-table-wrap {
    overflow-x: auto;
    border-radius: 0.95rem;
    border: 1px solid rgba(124, 158, 191, 0.35);
    background: rgba(255, 255, 255, 0.95);
}

.variants-table {
    width: 100%;
    min-width: 720px;
    border-collapse: collapse;
}

.variants-table th,
.variants-table td {
    padding: 0.9rem 0.95rem;
    text-align: left;
    font-size: 0.875rem;
    border-bottom: 1px solid rgba(129, 161, 191, 0.24);
}

.variants-table th {
    background: linear-gradient(180deg, #1b3f64 0%, #264f77 100%);
    color: #f6f9fe;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.08em;
}

.variants-table tbody tr:nth-child(even) {
    background: rgba(66, 108, 136, 0.04);
}

.variants-table td::before {
    content: none;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
    gap: 0.9rem;
    align-items: stretch;
}

.related-grid .featured-product-card {
    width: 100%;
    height: 100%;
    min-height: 100%;
    max-width: none;
}

@media (min-width: 981px) {
    .related-grid:has(> .featured-product-card:only-child) {
        grid-template-columns: minmax(260px, 380px);
        justify-content: start;
    }

    .related-grid:has(> .featured-product-card:first-child:nth-last-child(2)) {
        grid-template-columns: repeat(2, minmax(260px, 380px));
        justify-content: start;
    }
}

.image-modal {
    position: fixed;
    inset: 0;
    z-index: 3000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1.2rem;
    background: rgba(9, 23, 41, 0.9);
}

.image-modal.open {
    display: flex;
}

.image-modal img {
    max-width: min(92vw, 1240px);
    max-height: 86vh;
    border-radius: 0.9rem;
    background: #fff;
}

.image-modal-nav {
    z-index: 2;
}

.image-modal .gallery-prev {
    left: 1rem;
}

.image-modal .gallery-next {
    right: 1rem;
}

.image-modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 42px;
    height: 42px;
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    color: #fff;
    background: rgba(9, 23, 41, 0.72);
    font-size: 1.25rem;
    cursor: pointer;
}

@media (max-width: 1100px) {
    .product-main {
        grid-template-columns: 1fr;
    }

    .gallery {
        position: static;
    }
}

@media (max-width: 768px) {
    .product-page-content {
        padding-top: 7rem;
        padding-bottom: 2.5rem;
    }

    .product-page-content .breadcrumb {
        gap: 0.2rem;
        font-size: 0.7rem;
    }

    .product-header {
        margin-bottom: 1.35rem;
        padding: 1rem;
    }

    .gallery,
    .info-box,
    .full-description,
    .specifications,
    .product-variants,
    .related-products {
        padding: 0.95rem;
    }

    .short-description {
        font-size: 0.95rem;
        line-height: 1.68;
    }

    .image-modal {
        padding-inline: 0.8rem;
    }

    .image-modal .gallery-nav {
        width: 38px;
        height: 38px;
    }

    .image-modal .gallery-prev {
        left: 0.35rem;
    }

    .image-modal .gallery-next {
        right: 0.35rem;
    }

    .product-context-chips {
        gap: 0.36rem;
    }

    .context-chip {
        font-size: 0.72rem;
    }

    .thumbnail-gallery {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .info-row {
        grid-template-columns: 1fr;
        gap: 0.22rem;
    }

    .action-buttons {
        grid-template-columns: 1fr 1fr;
    }

    .related-grid {
        grid-template-columns: 1fr;
    }

    .variants-table-wrap {
        border: none;
        background: transparent;
        overflow: visible;
    }

    .variants-table {
        min-width: 0;
        display: block;
    }

    .variants-table thead {
        display: none;
    }

    .variants-table tbody {
        display: grid;
        gap: 0.8rem;
    }

    .variants-table tr {
        display: grid;
        gap: 0.1rem;
        padding: 0.85rem;
        border-radius: 0.9rem;
        border: 1px solid rgba(124, 158, 191, 0.35);
        background: rgba(255, 255, 255, 0.95);
        box-shadow: 0 10px 22px rgba(26, 58, 90, 0.08);
    }

    .variants-table td {
        display: grid;
        grid-template-columns: minmax(96px, 38%) 1fr;
        gap: 0.7rem;
        padding: 0.35rem 0;
        border-bottom: 1px solid rgba(129, 161, 191, 0.18);
    }

    .variants-table tr td:last-child {
        border-bottom: none;
    }

    .variants-table td::before {
        content: attr(data-label);
        display: block;
        color: #5d7390;
        font-size: 0.75rem;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 0.06em;
    }
}

@media (max-width: 520px) {
    .product-page-content .breadcrumb {
        padding-top: 0;
    }

    .main-image {
        height: 300px;
    }

    .thumbnail-gallery {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .variants-table td {
        grid-template-columns: 1fr;
        gap: 0.18rem;
    }
}
