/* ===============================================
   ALOPAK – oprema, proizvodi, partneri, footer
   =============================================== */

/* PODSTRANICE: normalan scroll, bez snap-a */

body.subpage .page-scroll--subpage {
    scroll-snap-type: none;
}

@media (min-width: 901px) {
    body.subpage .page-scroll--subpage {
        height: calc(100vh - var(--header-height));
        overflow-y: auto;
    }
}

/* BREADCRUMBS */

.breadcrumbs {
    width: min(1320px, 100%);
    margin: 0 auto;
    padding: 22px clamp(20px, 4vw, 64px) 0;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: #8aa0b2;
    font-size: 14px;
}

.breadcrumbs a {
    color: #486173;
    text-decoration: none;
    transition: color 0.18s ease;
}

.breadcrumbs a:hover,
.breadcrumbs a:focus-visible {
    color: #0e548f;
    text-decoration: underline;
}

.breadcrumbs [aria-current="page"] {
    color: #12344d;
    font-weight: 600;
}

/* =========== OPREMA – ALATNA TRAKA =========== */

.catalog-hero {
    width: min(1320px, 100%);
    margin: 0 auto;
    padding: clamp(26px, 4vh, 46px) clamp(20px, 4vw, 64px) 8px;
}

.catalog-hero .section-label {
    margin-bottom: 8px;
}

.catalog-hero h1 {
    color: #12344d;
    font-size: clamp(28px, 3.4vw, 46px);
    line-height: 1.05;
    margin-bottom: 10px;
}

.catalog-hero p {
    max-width: 680px;
    color: #486173;
    font-size: clamp(15px, 1.2vw, 17px);
    line-height: 1.6;
}

.catalog-toolbar {
    width: min(1320px, 100%);
    margin: 0 auto;
    padding: 18px clamp(20px, 4vw, 64px) 6px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.catalog-search {
    position: relative;
    max-width: 460px;
}

.catalog-search input {
    width: 100%;
    padding: 13px 16px 13px 46px;
    border: 1px solid rgba(0, 52, 98, 0.18);
    border-radius: 14px;
    background: #ffffff;
    color: #12344d;
    font-size: 16px;
    font-family: inherit;
    box-shadow: 0 6px 18px rgba(0, 52, 98, 0.06);
    transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.catalog-search input::placeholder {
    color: #8aa0b2;
}

.catalog-search input:focus {
    outline: none;
    border-color: #0e548f;
    box-shadow: 0 0 0 3px rgba(14, 84, 143, 0.14);
}

.catalog-search svg {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    width: 19px;
    height: 19px;
    stroke: #8aa0b2;
    pointer-events: none;
}

.catalog-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
}

.filter-pill {
    padding: 9px 17px;
    border: 1px solid rgba(0, 52, 98, 0.2);
    border-radius: 999px;
    background: #ffffff;
    color: #12344d;
    font-size: 14.5px;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}

.filter-pill:hover {
    border-color: #0e548f;
    color: #0e548f;
    transform: translateY(-1px);
}

.filter-pill:focus-visible {
    outline: 3px solid rgba(14, 84, 143, 0.35);
    outline-offset: 2px;
}

.filter-pill.active {
    background: linear-gradient(135deg, #0e548f, #003462);
    border-color: transparent;
    color: #ffffff;
}

.catalog-count {
    color: #8aa0b2;
    font-size: 14px;
}

/* =========== MREŽA PROIZVODA =========== */

.catalog-grid {
    width: min(1320px, 100%);
    margin: 0 auto;
    padding: 14px clamp(20px, 4vw, 64px) clamp(44px, 6vh, 72px);
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
}

.product-card {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: #ffffff;
    border: 1px solid rgba(0, 52, 98, 0.12);
    border-radius: 16px;
    box-shadow: 0 10px 26px rgba(0, 52, 98, 0.07);
    text-decoration: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.product-card:hover,
.product-card:focus-visible {
    transform: translateY(-5px);
    border-color: rgba(14, 84, 143, 0.35);
    box-shadow: 0 18px 40px rgba(0, 52, 98, 0.14);
    outline: none;
}

.product-card__media {
    aspect-ratio: 4 / 3;
    background: #f7fafc;
    border-bottom: 1px solid rgba(0, 52, 98, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.product-card__media img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 14px;
    transition: transform 0.35s ease;
}

.product-card:hover .product-card__media img {
    transform: scale(1.05);
}

.product-card__body {
    display: flex;
    flex-direction: column;
    flex: 1;
    gap: 7px;
    padding: 16px 18px 18px;
}

.product-card__cat {
    color: #0e548f;
    font-size: 11.5px;
    font-weight: 900;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.product-card__body h3 {
    color: #12344d;
    font-size: 17.5px;
    line-height: 1.25;
}

.product-card__body p {
    color: #486173;
    font-size: 14px;
    line-height: 1.45;
}

.product-card__link {
    margin-top: auto;
    padding-top: 10px;
    color: #0e548f;
    font-size: 14px;
    font-weight: 800;
}

.product-card__link::after {
    content: " \203A";
    transition: margin-left 0.18s ease;
}

.product-card:hover .product-card__link::after {
    margin-left: 4px;
}

.catalog-empty {
    grid-column: 1 / -1;
    padding: 56px 20px;
    text-align: center;
    color: #486173;
    font-size: 17px;
}

.catalog-empty strong {
    display: block;
    margin-bottom: 6px;
    color: #12344d;
    font-size: 20px;
}

/* =========== STRANICA PROIZVODA =========== */

.product-detail {
    width: min(1180px, 100%);
    margin: 0 auto;
    padding: clamp(24px, 4vh, 44px) clamp(20px, 4vw, 64px) clamp(30px, 4vh, 50px);
    display: grid;
    grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
    gap: clamp(28px, 4vw, 56px);
    align-items: start;
}

.product-detail__media {
    position: sticky;
    top: 24px;
    background: #ffffff;
    border: 1px solid rgba(0, 52, 98, 0.12);
    border-radius: 20px;
    box-shadow: 0 14px 34px rgba(0, 52, 98, 0.08);
    overflow: hidden;
}

.product-detail__media img {
    display: block;
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: contain;
    padding: 22px;
}

.product-detail__category {
    display: inline-block;
    margin-bottom: 10px;
    color: #0e548f;
    font-size: 13px;
    font-weight: 900;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.product-detail__info h1 {
    color: #12344d;
    font-size: clamp(26px, 3vw, 40px);
    line-height: 1.1;
    margin-bottom: 16px;
}

.product-detail__desc {
    color: #486173;
    font-size: 16.5px;
    line-height: 1.65;
    margin-bottom: 26px;
}

.product-detail__specs-title {
    color: #12344d;
    font-size: 19px;
    margin-bottom: 12px;
}

.product-detail__specs {
    width: 100%;
    margin-bottom: 28px;
    border: 1px solid rgba(0, 52, 98, 0.12);
    border-radius: 14px;
    border-collapse: separate;
    border-spacing: 0;
    overflow: hidden;
    font-size: 15px;
}

.product-detail__specs th,
.product-detail__specs td {
    padding: 12px 16px;
    text-align: left;
    vertical-align: top;
}

.product-detail__specs th {
    width: 38%;
    color: #12344d;
    font-weight: 700;
    background: #f4f8fc;
}

.product-detail__specs td {
    color: #486173;
}

.product-detail__specs tr+tr th,
.product-detail__specs tr+tr td {
    border-top: 1px solid rgba(0, 52, 98, 0.1);
}

.product-detail__actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 18px;
}

.product-detail__back {
    color: #486173;
    font-size: 15px;
    font-weight: 700;
    text-decoration: none;
    transition: color 0.18s ease;
}

.product-detail__back:hover,
.product-detail__back:focus-visible {
    color: #0e548f;
    text-decoration: underline;
}

/* SLIČNI PROIZVODI */

.related {
    width: min(1180px, 100%);
    margin: 0 auto;
    padding: 0 clamp(20px, 4vw, 64px) clamp(44px, 6vh, 72px);
}

.related h2 {
    color: #12344d;
    font-size: 22px;
    margin-bottom: 16px;
}

.related__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 18px;
}

/* =========== PARTNERI =========== */

.partners-section {
    background: linear-gradient(180deg, #f4f8fc 0%, #ffffff 100%);
}

/* Uvodni tekst staje u jedan red */
.partners-section .section-content>p {
    max-width: none;
    font-size: clamp(15px, 1.05vw, 18px);
}

.partners-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 16px;
    margin-top: 28px;
    text-align: left;
}

.partner-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px 20px;
    background: #ffffff;
    border: 2px solid rgba(0, 52, 98, 0.12);
    border-radius: 16px;
    box-shadow: 0 10px 24px rgba(0, 52, 98, 0.06);
    text-decoration: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.partner-card:hover,
.partner-card:focus-visible {
    transform: translateY(-4px);
    border-color: rgba(14, 84, 143, 0.32);
    box-shadow: 0 16px 34px rgba(0, 52, 98, 0.13);
    outline: none;
}

.partner-card__mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 64px;
    width: 64px;
    height: 64px;
    border-radius: 14px;
    background: linear-gradient(135deg, #0e548f, #003462);
    color: #ffffff;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0.02em;
}

.partner-card__name {
    color: #12344d;
    font-size: 16.5px;
    font-weight: 800;
    line-height: 1.2;
}

.partner-card__url {
    display: block;
    margin-top: 3px;
    color: #8aa0b2;
    font-size: 13px;
    font-weight: 500;
}

/* =========== FOOTER =========== */

.site-footer {
    background: linear-gradient(135deg, #0e3a63, #001f3b);
    color: rgba(255, 255, 255, 0.82);
}

.site-footer__inner {
    width: min(1320px, 100%);
    margin: 0 auto;
    padding: clamp(36px, 5vh, 56px) clamp(20px, 4vw, 64px) 26px;
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr);
    gap: clamp(24px, 4vw, 56px);
}

.site-footer__brand img {
    height: 44px;
    margin-bottom: 14px;
    background: #ffffff;
    padding: 6px 12px;
    border-radius: 10px;
}

.site-footer__brand p {
    max-width: 380px;
    font-size: 14.5px;
    line-height: 1.6;
}

.site-footer__col h3 {
    margin-bottom: 12px;
    color: #ffffff;
    font-size: 15px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.site-footer__col a {
    display: block;
    margin-bottom: 9px;
    color: rgba(255, 255, 255, 0.82);
    font-size: 15px;
    text-decoration: none;
    transition: color 0.18s ease;
}

.site-footer__col a:hover,
.site-footer__col a:focus-visible {
    color: #ffffff;
    text-decoration: underline;
}

.site-footer__bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.14);
    padding: 16px 20px;
    text-align: center;
    font-size: 13.5px;
    color: rgba(255, 255, 255, 0.6);
}

/* =========== RESPONSIVE =========== */

@media (max-width: 900px) {
    .product-detail {
        grid-template-columns: 1fr;
    }

    .product-detail__media {
        position: static;
        max-width: 480px;
        margin: 0 auto;
        width: 100%;
    }

    .site-footer__inner {
        grid-template-columns: 1fr;
        gap: 26px;
    }
}

@media (max-width: 600px) {
    .catalog-grid {
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }

    .product-card__body {
        padding: 12px 13px 14px;
    }

    .product-card__body h3 {
        font-size: 15px;
    }

    .product-card__body p {
        display: none;
    }

    .related__grid {
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }
}

@media (prefers-reduced-motion: reduce) {

    .product-card,
    .partner-card,
    .filter-pill,
    .product-card__media img {
        transition: none;
    }
}

/* Pravi logo partnera (ako postoji fajl u images/partneri/) zamenjuje monogram */

.partner-card__logo {
    flex: 0 0 52px;
    width: 64px;
    height: 64px;
    object-fit: contain;
    border-radius: 12px;
    background: #ffffff;
}

.partner-card__logo+.partner-card__mark {
    display: none;
}

/* =========== CENE =========== */

/* Cena na kartici kataloga (iznad linka "Detaljnije") */
.catalog-grid .product-card__price {
    margin-top: auto;
    padding-top: 12px;
    color: #0e548f;
    font-size: 18px;
    font-weight: 900;
}

.catalog-grid .product-card__price.is-upit {
    color: #486173;
    font-size: 15px;
    font-weight: 800;
}

.catalog-grid .product-card__link {
    margin-top: 8px;
    padding-top: 0;
}

/* Cena na stranici proizvoda */
.product-detail__price {
    display: flex;
    align-items: baseline;
    gap: 12px;
    margin-bottom: 24px;
    padding: 14px 18px;
    background: #f4f8fc;
    border: 1px solid rgba(0, 52, 98, 0.1);
    border-radius: 14px;
}

.product-detail__price-label {
    color: #486173;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.product-detail__price-value {
    color: #0e548f;
    font-size: 26px;
    font-weight: 900;
    line-height: 1;
}

.product-detail__price-value.is-upit {
    font-size: 20px;
}