/* --- OSNOVNI KONTEJNER --- */
.musashi-kolekcije-container {
    display: grid;
    width: 100%;
    margin: 0 auto;
}

/* --- LAYOUT: FEATURED (1+2) --- */
.layout-featured {
    display: grid;
    /* Osigurano da je grid aktivan */
    grid-template-columns: 710px 710px;
    grid-template-rows: 442px 442px;
    gap: 24px;
}

.layout-featured .m-card-big {
    grid-row: span 2;
    height: 900px;
    border-radius: 8px;
}

.layout-featured .m-card-small {
    height: 433px;
    border-radius: 8px;
}

.layout-featured .m-kolekcija-item {
    position: relative;
    overflow: hidden;
    background: #000;
}

.layout-featured .m-image-holder {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.layout-featured .m-image-holder img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 1.2s cubic-bezier(0.215, 0.61, 0.355, 1), opacity 0.6s ease;
}

.layout-featured .m-kolekcija-item:hover img {
    transform: scale(1.1);
    opacity: 0.7;
}

.layout-featured .m-overlay-content {
    position: absolute;
    inset: 0;
    padding: 40px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.85) 0%, rgba(0, 0, 0, 0.2) 50%, transparent 100%);
    z-index: 2;
    overflow: hidden;
}

.layout-featured .m-content-inner {
    transition: transform 0.5s cubic-bezier(0.25, 1, 0.5, 1);
    transform: translateY(65px);
}

.layout-featured .m-kolekcija-item:hover .m-content-inner {
    transform: translateY(0);
}

.layout-featured .m-title {
    color: #ffffff;
    font-size: 28px;
    font-weight: 500;
    margin-bottom: 8px;
}

.layout-featured .m-desc {
    color: rgba(255, 255, 255, 0.85);
    font-size: 16px;
    line-height: 1.4;
    margin-bottom: 25px;
}

.layout-featured .m-button-wrap {
    opacity: 0;
    transition: opacity 0.3s ease;
}

.layout-featured .m-kolekcija-item:hover .m-button-wrap {
    opacity: 1;
}

.layout-featured .m-btn-transparent {
    display: inline-flex;
    padding: 12px 20px;
    border: 1px solid #ffffff;
    border-radius: 50px;
    color: #ffffff;
    font-size: 16px;
    background: transparent;
    min-width: 188px;
    justify-content: space-between;
    height: 44px;
    align-items: center;
}

.layout-featured .m-btn-istrazi:hover {
    background: #ffffff;
    color: #000000;
}

/* --- LAYOUT: OBIČAN GRID (3 Kolone) --- */
.layout-grid {
    display: grid;
    /* Popravlja strukturu grida */
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    max-width: 1322px;
}

.layout-grid .m-kolekcija-item {
    position: relative;
    /* Ključno za ispravan hover i m-full-link */
    display: flex;
    flex-direction: column;
}

.layout-grid .m-image-holder {
    width: 100%;
    aspect-ratio: 16/10;
    overflow: hidden;
    margin-bottom: 15px;
    border-radius: 12px;
    /* Zaobljeni uglovi sa slike */
}

.layout-grid .m-image-holder img {
    transition: transform 0.5s ease;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.layout-grid .m-kolekcija-item:hover img {
    transform: scale(1.05);
}

.m-grid-title {
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 8px;
    color: #2E2A27;
}

.m-grid-desc {
    font-size: 18px;
    color: #2E2A27;
    margin-bottom: 25px;
    line-height: 1.5;
}

.m-grid-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: none;
    padding-top: 0;
}

.m-grid-btn {
    gap: 20px;
    font-size: 13px;
    font-weight: 600;
    border: 1px solid #2E2A27;
    padding: 10px 15px;
    border-radius: 50px;
    color: #2E2A27 !important;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    height: 44px;
}

/* .m-kolekcija-item:hover .m-grid-btn {
    background: #000;
    color: #fff;
} */

.m-grid-count {
    font-size: 12px;
    color: #2E2A2799;
}

/* --- FULL LINK --- */
.m-full-link {
    position: absolute;
    inset: 0;
    z-index: 5;
    display: block;
}

/* --- RESPONSIVE --- */

/* 1. Desktop / Laptop (do 1440px) - Da grid ne bi izlazio iz ekrana */
@media (max-width: 1440px) {
    .layout-featured {
        grid-template-columns: repeat(2, 1fr);
        /* Prelazimo sa px na frakcije */
        max-width: 100%;
        padding: 0 20px;
    }

    .layout-featured .m-card-big {
        height: auto;
        /* Dozvoljavamo da visina prati sadržaj ili gap */
        min-height: 600px;
    }
}

/* 2. Tablet (do 1024px) */
@media (max-width: 1024px) {

    /* Featured Layout: Stavke idu jedna ispod druge ili manji grid */
    .layout-featured {
        grid-template-columns: 1fr;
        /* Sve u jednu kolonu */
        grid-template-rows: auto;
    }

    .layout-featured .m-card-big {
        grid-row: span 1;
        height: 500px;
        /* Smanjujemo visinu za tablet */
    }

    .layout-featured .m-card-small {
        height: 350px;
    }

    /* Običan Grid: Sa 3 kolone na 2 kolone */
    .layout-grid {
        grid-template-columns: repeat(2, 1fr);
        padding: 0 20px;
    }
}

/* 3. Mobile (do 768px) */
@media (max-width: 768px) {

    /* Featured Layout */
    .layout-featured .m-title {
        font-size: 22px;
        /* Manji font za naslove */
    }

    .layout-featured .m-desc {
        font-size: 14px;
        margin-bottom: 15px;
    }

    .layout-featured .m-overlay-content {
        padding: 25px;
    }

    /* Običan Grid: Sve u jednu kolonu */
    .layout-grid {
        grid-template-columns: 1fr;
        gap: 40px;
        /* Veći razmak između kartica koje su sad jedna ispod druge */
    }

    .layout-featured .m-content-inner {
        transform: translateY(0);
        /* Na mobilnom gasimo translateY sakrivanje jer nema hovera */
    }

    .layout-featured .m-button-wrap {
        opacity: 1;
        /* Dugme je uvek vidljivo na mobilnom */
    }
}

/* 4. Small Mobile (do 480px) */
@media (max-width: 480px) {

    .layout-featured .m-card-big,
    .layout-featured .m-card-small {
        height: 400px;
        /* Ujednačavamo visinu za skroz male ekrane */
    }

    .m-grid-desc {
        font-size: 16px;
    }

    .m-grid-btn {
        padding: 8px 12px;
        font-size: 12px;
    }
}
