
html,
body {
    font-size: 16px;
}

body {
    font-family: system-ui, -apple-system, "Segoe UI", Roboto,
        "Helvetica Neue", Arial;
    font-family: "Roboto", sans-serif;
    font-family: "Epunda Slab", serif;
    margin: 0;
    color: #111827;
    background: #ffffff;
    line-height: 1.45;
}

a {
    color: #111827;
    text-decoration: underline;
}

a:hover {
    text-decoration: none;
}

h2 {
    margin: 20px 0 8px;
    font-size: 1.05rem;
}

div.logo {
    font-family: "Sedgwick Ave Display", cursive;
    font-weight: 700;
    font-size: 4rem;
    letter-spacing: 2px;
    line-height: 0;
}

div.logo a, .row-wrap a {
    color: #111827;
    text-decoration: none;
}

div.logo a {
    color: indianred;
}

h3 {
    font-weight: bold;
    font-size: 1.5rem;
    margin-bottom: 8px;
    font-family: "Epunda Slab", serif;
    min-height: 3rem;
    margin-top: 0;
}

h3 span {
    font-weight: normal;
    font-size: 1.1rem;
    color: #555;
    display: block;
}

header {
    position: sticky;  
    top: 0;           
    left: 0;
    z-index: 1000; 
    background-color: white;
    padding-top: 40px;
    border-bottom: solid 1px #000;
}



.teaser {
    max-width: 60%;
    margin: 0 auto 0 auto;
    font-size: 2rem;
    line-height: 1.6;
    color: #333;
    padding: 1.5rem 1rem;
    text-align: center;
}


header > div {
    display: flex;
    align-items: center;
    gap: 4rem;
    padding: 0 10%;
}

nav {
    margin-bottom: 2rem;
    margin-top: 3rem;
    padding-bottom: 0rem;
    padding-left: 10%;
    padding-right: 10%;
    position: relative;
}


nav a {
    margin-right: 1.25rem;
    color: #111827;
    text-decoration: none;
    font-weight: bold;
    font-size: 1.1rem;
    border: solid 2px #000;
    padding: 0.25rem 0.5rem;
    border-radius: 16px;
    background-color: white;
}


nav a.active {
    background: #111827;
    color: white;
}

nav a:hover {
    background: #111827;
    color: white;
    transition: background 220ms cubic-bezier(0.2, 0.9, 0.3, 1),
        color 220ms cubic-bezier(0.2, 0.9, 0.3, 1);
}

header > div > div:nth-child(1) {
    flex: 0 0 50%;
}



header > div > div:last-child {
    flex: 1;
    text-align: right;
}

header > div > div:last-child a {
    color: #111827;
    text-decoration: none;
    font-weight: bold;
    font-size: 2rem;
}

.row-wrap {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    flex-wrap: wrap; /* ako nema mjesta, kolone idu u novi red */
    max-width: 2300px;
    margin: 0 auto;
    justify-content: center;
}

.col {
    flex: 1 1 240px; 
    padding: 16px;
    min-width: calc(20% - 50px);
    max-width: calc(20% - 50px);
    font-size: 1rem;
    /* border-bottom: solid 1px #ccc; */
}

.col .pill {
    display: inline-block;
    background: white;
    border-bottom: dotted 1px #000;
    font-size: 1rem;
    margin-bottom: 8px;
    margin-right: .5rem;
}


.col img {
    max-width: 100%;
    height: auto;
    display: block;
    margin-bottom: 8px;
    border-radius: 14px;
    transition: transform 220ms cubic-bezier(0.2, 0.9, 0.3, 1),
        box-shadow 220ms cubic-bezier(0.2, 0.9, 0.3, 1);
    will-change: transform, box-shadow;
    transform: translateZ(0); /* potiče GPU akceleraciju */
    cursor: pointer;
    outline: none;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.09);
    /* -webkit-filter: grayscale(100%); */
    /* filter: grayscale(100%); */
}

.col img:hover,
.col img:focus {
    transform: translateY(-8px);
    box-shadow: 0 18px 20px rgba(0, 0, 0, 0.18);
    transform: translateY(-8px);
    /* filter: none; */
}

.slika {
    position: relative;
}

.slika p.cijena {
    position: absolute;
    bottom: 1rem;
    right: 1rem;
    background: indianred;
    color: white;
    padding: 1rem 0.75rem;
    font-weight: bold;
    font-size: 1.25rem;
    line-height: 0;
    margin-bottom: 0;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    /* transform: rotate(10deg); */
    text-shadow: 4px 4px 6px rgba(0, 0, 0, 0.2);
    box-shadow: 0 12px 20px rgba(0, 0, 0, 0.2);
    font-family: "Roboto", sans-serif;
}

.opis {
    min-height: 3rem;
}

.opis p {
    margin: 0;
    padding: 0;
}

/* Na manjim ekranima (npr. telefon) sve u jedan stupac */
@media (max-width: 520px) {
    /* .row-wrap {
        flex-direction: column;
    } */
}


article {
    font-family: "Epunda Slab", serif;
    font-size: 1.5rem;
    margin: 0 auto;
    width: 100%;
    max-width: 1280px;
    margin-bottom: 6rem;
    display: flex;
    gap: 2rem;
}

article > div.roba-opis {
    flex: 0 0 40%;
}

article > div.roba-opis .cijena {
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: dashed 1px #999;
}

article > div.roba-slike {
    flex: 0 0 60%;
}

article p {
    padding: 0;
    margin: 0;
}

article img {
    width: 100%;
    height: auto;
    display: block;
    margin: 1rem auto;
    border-radius: 14px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.09);
}

h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    font-family: "Epunda Slab", serif;
}

h1 span {
    font-weight: normal;
    font-size: 1.5rem;
    color: #555;
    display: block;
    margin-top: 0.5rem;
}

.images {
    position: relative;
    height: auto;
}

.thumbs {
    position: absolute;
    left: -100px;
}

.thumbs img {
    margin-top: 0;
    max-width: 80px;
    border-radius: 6px;
    display: block;
    border: solid 4px white;
    cursor: pointer;
}

.thumbs img.active {
    border: solid 4px indianred;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
}


article p.cijena {
    font-size: 2rem;
    font-weight: bold;
    color: indianred;
    margin-top: -1rem;
    margin-bottom: 0;
}



.thumbnails {
    display: flex;
    margin: 1rem auto 0;
    padding: 0;
    justify-content: center;
    background-color: #eee;
    border-radius: 14px;
}

.thumbnail {
    width: 70px;
    height: auto;
    overflow: hidden;
    list-style: none;
    margin: 0 0.2rem;
    cursor: pointer;
}

.thumbnail.is-active img {
    border: 3px solid #20b2aa;
    opacity: 1;
}

.thumbnail img {
    border: 3px solid transparent;
    width: calc(100% - 6px);
    height: auto;
    border-radius: 8px;
}

.splide__list {
  height: auto !important;
}

.related {
    margin-top: 1.5rem;
    padding-top: 2rem;
    border-top: dashed 1px #999;
}


.related {
    font-size: 1.2rem;
}


p.subtitle {
    color: #555;
    margin-top: 0;
    margin-bottom: 0;
}

.stanje-container {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
}

.stanje-bar {
    margin-top: 0;
    display: inline-block;
}

.stanje-bar img {
    width: 24px;
    height: auto;
    display: inline-block;
    margin-right: 2px;
}






@media (max-width: 1600px) {
    .col {
        min-width: calc(25% - 50px);
        max-width: calc(25% - 50px);
    }


    div.logo {
        font-size: 3rem;
    }

    header > div > div:last-child a {
        font-size: 1.5rem;
    }

}


header > div {
    padding: 0 5%;
}

nav {
    padding-left: 5%;
    padding-right: 5%;
}


.hamby {
    display: none;
}

#content {
    padding-inline: 1.5rem;
}

.show-related  {
    display: none;
}
    

@media (max-width: 1200px) {
    .col {
        min-width: calc(33.33333333% - 50px);
        max-width: calc(33.33333333% - 50px);
    }

} 


@media (max-width: 920px) {
    .col {
        min-width: calc(50% - 50px);
        max-width: calc(50% - 50px);
    }

    .teaser {
        max-width: 85%;
    }
} 

@media (max-width: 768px) {

    header {
        padding-top: 20px;
        padding-bottom: 10px;
        margin-bottom: 1.5rem;
    }

    .teaser {
        padding-top: 0;
    }

    nav {
        display: none;
        background-color: #eee;
        position: fixed;
        top: 0;
        left: 0;
        width: 70%;
        height: 100vh;
        z-index: 2000;
        margin: 0;
        padding: 0;
        animation: slideOut 250ms cubic-bezier(0.2, 0.9, 0.3, 1);
    }

    nav.open {
        display: block;
        box-shadow: 4px 0 12px rgba(0, 0, 0, 0.1);
        animation: slideIn 250ms cubic-bezier(0.2, 0.9, 0.3, 1);
    }

    @keyframes slideIn {
        from {
            transform: translateX(-100%);
        }
        to {
            transform: translateX(0);
        }
    }

    @keyframes slideOut {
        from {
            transform: translateX(0);
        }
        to {
            transform: translateX(-100%);
        }
    }

    nav .hamby {
        padding-top: 20px;
        padding-left: calc(5% + 6px);
    }


    nav::after {
        content: "";
        position: absolute;
        top: 0;
        left: 100%;
        width: 200%;
        height: 100vh;
        background: rgba(0, 0, 0, 0.2);
        z-index: -1;
    }

    nav a {
        display: block;
        margin: 1.5rem;
        font-size: 1.5rem;
        border-width: 0;

    }

    div.logo {
        letter-spacing: 0;
        font-size: 2rem;
    }

    .hamby {
        display: inline-block;
    }

    .teaser {
        font-size: 1.5rem;
        line-height: 1.4;
    }

    article {
        flex-direction: column;
        gap: .5rem;
    }

    .related {
        display: none;
    }

    #main-carousel {
        padding-top: 0;
    }

    .show-related {
        display: block;
    }

} 


@media (max-width: 650px) {

    .row-wrap {
        justify-content: start;
    }

    .row-wrap a {
        display: flex;
        flex-direction: column;
    }

    .row-wrap a h3 {
        order: 2;
        font-size: 1.25rem;
    }

    .row-wrap a h3 span {
        font-size: .85rem;
    }
    
    .row-wrap a div.slika {
        order: 1;
    }

    .row-wrap a span.pill {
        order: 3;
    }

    .row-wrap a div.opis {
        order: 4;
        font-size: .85rem;
    }

    .col .pill {
        font-size: .85rem;
    }

    div.logo {
        letter-spacing: 0;
        font-size: 1.5rem;
        display: flex;
        align-items: center;
        gap: 16px;
    }

    .slika p.cijena {
        font-size: 1rem;
        padding: 1rem .4rem;
    }

    header > div > div:last-child a {
        font-size: 1.2rem;
    }

    header > div > div:nth-child(1) {
        flex: 0 0 48%;
    }


    .col {
        min-width: 47%;
        max-width: 47%;
        padding: 0;
        padding-bottom: 1rem;
    }

    .col img {
        width: 100%;
        border-radius: 7px;
    }

    .teaser {
        font-size: 1.25rem;
        line-height: 1.3;
        max-width: 95%;
    }

    article {
        font-size: 1.25rem;
    }

    .related {
        margin-top: 1rem;
        padding-top: 1rem;
    }

    h1 {
        font-size: 2rem;
    }

    .splide {
        padding: 0;
    }

} 

@media (max-width: 400px) {

    header > div > div:nth-child(1) {
        flex: 0 0 46%;
    }

    div.logo {
        letter-spacing: 0;
        font-size: 1.3rem;
    }

    header > div > div:last-child a {
        font-size: 1rem;
    }

    .teaser {
        font-size: 1rem;
        line-height: 1.2;
    }

}