/* ===== HERO ===== */
.katalozi-hero {
    background: linear-gradient(rgba(0,0,0,0.7), rgba(0,0,0,0.7)), url('https://images.unsplash.com/photo-1707989515910-6f572e2e1fcf?q=80&w=1170&auto=format&fit=crop&ixlib=rb-4.1.0&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D') center/cover no-repeat;
    min-height: 40vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--bijela);
    border-bottom: 3px solid var(--crvena);
}

.katalozi-hero h1 {
    font-size: 3.5rem;
    margin-bottom: 15px;
}

.katalozi-hero h1 span {
    color: var(--crvena);
}

.katalozi-hero p {
    font-size: 1.2rem;
    color: var(--siva-svijetla);
}

/* ===== GLAVNI SADRŽAJ ===== */
.katalozi-main {
    padding: 60px 0;
    background-color: #fafafa;
}

/* ===== KATEGORIJA ===== */
.katalog-kategorija {
    margin-bottom: 70px;
}

.katalog-kategorija:last-child {
    margin-bottom: 0;
}

.katalog-header {
    text-align: center;
    margin-bottom: 40px;
}

.katalog-header i {
    font-size: 3rem;
    color: var(--crvena);
    margin-bottom: 15px;
}

.katalog-header h2 {
    font-size: 2.2rem;
    color: var(--crna);
    margin-bottom: 10px;
}

.katalog-header p {
    color: var(--sivi-tekst);
    font-size: 1rem;
}

/* ===== GRID - CENTRIRANJE ===== */
.katalog-kategorije-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 80px;
    align-items: start; /* da se kategorije ne rastežu po visini */
}

/* ===== GRID KARTICA unutar kategorije ===== */
.katalog-grid {
    display: grid;
    grid-template-columns: repeat(1, 1fr); /* 2 kartice u redu unutar kategorije */
    gap: 20px;
    
}

/* Kartica */
.katalog-card {
    background: var(--bijela);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
    border: 1px solid rgba(211,47,47,0.1);
    /* bez width i flex-shrink */
}

.katalog-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(211,47,47,0.15);
    border-color: var(--crvena);
}

.katalog-card-link {
    text-decoration: none;
    display: block;
    color: inherit;
}

/* A4 OMJER (1 : 1.414) */
.katalog-card-slika {
    position: relative;
    width: 100%;
    background-color: #f5f5f5;
    overflow: hidden;
}

.katalog-card-slika::before {
    content: "";
    display: block;
    padding-bottom: 141.4%;
}

.katalog-card-slika img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.katalog-card:hover .katalog-card-slika img {
    transform: scale(1.05);
}

/* Placeholder */
.katalog-card-slika.placeholder {
    position: relative;
    background: linear-gradient(135deg, #f5f5f5, #e0e0e0);
    display: flex;
    align-items: center;
    justify-content: center;
}

.katalog-card-slika.placeholder::before {
    content: "";
    display: block;
    padding-bottom: 141.4%;
}

.katalog-card-slika.placeholder i {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 4rem;
    color: var(--crvena);
    opacity: 0.5;
}

/* NEMA TEKSTA */
.katalog-card-sadrzaj {
    display: none;
}

/* ===== RESPONZIVNOST ===== */
@media (max-width: 1200px) {
    .katalog-card {
        width: 260px;
    }
    .katalog-kategorije-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    .katalog-grid{
        place-items: center;
    }
}

@media (max-width: 992px) {
    .katalozi-hero h1 {
        font-size: 2.8rem;
    }
    
    .katalog-card {
        width: 280px;
    }
    .katalog-kategorije-grid {
        grid-template-columns: 1fr;
        gap: 50px;
    }
}

@media (max-width: 768px) {
    .katalozi-hero h1 {
        font-size: 2.2rem;
    }
    .katalog-card {
        width: 100%;
        max-width: 280px;
    }
    .katalog-header h2 {
        font-size: 1.8rem;
    }
    .katalog-kategorije-grid {
        grid-template-columns: 1fr;
        gap: 50px;
    }
    
    .katalog-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
}
@media (max-width: 480px) {
    .katalog-grid {
        grid-template-columns: 1fr;
    }
}