/* =========================================================
   CENTRALNI KVADRATNI PRIKAZ OGLASA — SuperOGLASI V4
   Jedini centralni CSS za kvadratnu karticu
   ========================================================= */

.so-kvadrat{
    --so-stil:#d7dde4;
    position:relative;
    display:flex;
    flex-direction:column;
    min-width:0;
    height:100%;
    padding:6px;
    overflow:hidden;
    background:#fff;
    border:2px solid var(--so-stil);
    border-radius:9px;
    box-shadow:0 2px 7px rgba(24,48,74,.07);
}

.so-kvadrat--super{
    --so-stil:#ed1c24;
}

.so-kvadrat--prodavnica{
    --so-stil:#ef8b24;
}

.so-kvadrat--sms{
    --so-stil:#e1b600;
}

.so-kvadrat--besplatni{
    --so-stil:#d7dde4;
}

.so-kvadrat-slika{
    position:relative;
    width:100%;
    height:142px;
    flex:0 0 142px;
    overflow:hidden;
    background:#eef1f4;
    border-radius:5px;
}

.so-kvadrat-slika-link{
    display:block;
    width:100%;
    height:100%;
    text-decoration:none;
}

.so-kvadrat-slika img{
    display:block;
    width:100%;
    height:100%;
    object-fit:cover;
    object-position:center;
}

.so-kvadrat-oznake{
    position:absolute;
    z-index:2;
    top:5px;
    left:5px;
    right:5px;
    display:flex;
    align-items:flex-start;
    gap:3px;
    pointer-events:none;
}

.so-kvadrat-oznake-lijevo{
    display:flex;
    align-items:center;
    flex:0 1 auto;
    min-width:0;
    gap:3px;
}

.so-kvadrat-stil{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    height:18px;
    min-height:18px;
    padding:0 5px;
    border-radius:3px;
    font-size:8px;
    line-height:18px;
    font-weight:600;
    white-space:nowrap;
    box-shadow:0 1px 2px rgba(0,0,0,.16);
    flex:0 0 auto;
    background:var(--so-stil);
    color:#fff;
}

.so-kvadrat-hitno{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    height:18px;
    min-height:18px;
    padding:0 5px;
    border-radius:3px;
    font-size:8px;
    line-height:18px;
    font-weight:600;
    white-space:nowrap;
    box-shadow:0 1px 2px rgba(0,0,0,.16);
    flex:0 0 auto;
    background:#34495e !important;
    color:#fff !important;
}

.so-kvadrat-vrsta{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    height:18px;
    min-height:18px;
    padding:0 5px;
    border-radius:3px;
    font-size:8px;
    line-height:18px;
    font-weight:600;
    white-space:nowrap;
    box-shadow:0 1px 2px rgba(0,0,0,.16);
    flex:0 1 auto;
    margin-left:auto;
    max-width:44%;
    overflow:hidden;
    text-overflow:ellipsis;
    color:#fff;
}

.so-kvadrat--besplatni .so-kvadrat-stil{
    background:#fff;
    color:#35485a;
    border:1px solid #cfd7df;
}

.so-kvadrat-vrsta--neutral{
    background:#53687c;
}

.so-kvadrat-vrsta--blue{
    background:#3478b9;
}

.so-kvadrat-vrsta--orange{
    background:#b56a25;
}

.so-kvadrat-vrsta--purple{
    background:#75558f;
}

.so-kvadrat-broj-slika{
    position:absolute;
    z-index:2;
    left:5px;
    bottom:5px;
    display:inline-flex;
    align-items:center;
    height:17px;
    padding:0 4px;
    border-radius:3px;
    background:rgba(24,39,54,.72);
    color:#fff;
    font-size:8px;
    line-height:17px;
    font-weight:700;
}

.so-kvadrat-omiljeni-form{
    position:static !important;
    z-index:3;
    right:5px;
    bottom:5px;
    margin:0 !important;
    flex:0 0 30px !important;
    padding:0 !important;
    width:30px !important;
    align-self:center !important;
    inset:auto !important;
}

.so-kvadrat-omiljeni{
    position:static;
    display:flex;
    align-items:center;
    justify-content:center;
    width:30px;
    height:30px;
    padding:0;
    border:0;
    border-radius:50%;
    background:transparent;
    color:#60768c;
    font-size:28px;
    line-height:30px;
    cursor:pointer;
    box-shadow:none;
    min-width:30px;
    margin:0;
    font-family:Arial, sans-serif;
    font-weight:400;
}

.so-kvadrat-omiljeni.saved{
    color:#ed1c24;
    background:transparent;
}

.so-kvadrat-sadrzaj{
    display:flex;
    flex:1 1 auto;
    flex-direction:column;
    min-width:0;
    padding:5px 3px 3px;
}

.so-kvadrat-meta{
    display:flex;
    grid-template-columns:minmax(0,1fr);
    min-width:0;
    margin:0 0 4px;
    color:#66788a;
    font-size:10px;
    line-height:14px;
    font-weight:400;
    flex-direction:column;
    gap:3px;
}

.so-kvadrat-meta > span{
    display:none;
}

.so-kvadrat-meta a{
    display:flex;
    min-width:0;
    overflow:hidden;
    color:#52677d;
    text-decoration:none !important;
    text-overflow:ellipsis;
    white-space:nowrap;
    font-weight:400;
    align-items:center;
    gap:6px;
    max-width:100%;
    font-size:11px;
    line-height:14px;
}

.so-kvadrat-meta a:first-child::before{
    content:"▦ ";
    font-weight:400;
    color:#52677b;
}

.so-kvadrat-meta a:last-child::before{
    content:"● ";
    font-size:8px;
    font-weight:400;
    color:var(--so-stil);
}

.so-kvadrat-meta a:hover{
    color:#263b50;
    text-decoration:none !important;
}

.so-kvadrat-naslov{
    display:-webkit-box;
    min-width:0;
    height:auto !important;
    min-height:34px !important;
    max-height:34px !important;
    margin:0 0 4px !important;
    overflow:hidden;
    color:#172b3e !important;
    font-size:14px;
    line-height:17px;
    font-weight:600;
    text-decoration:none !important;
    -webkit-box-orient:vertical;
    -webkit-line-clamp:2;
    letter-spacing:-0.1px;
}

.so-kvadrat-naslov:hover{
    color:#172b3e !important;
    text-decoration:none !important;
}

.so-kvadrat-cijene{
    display:flex !important;
    flex-direction:row !important;
    align-items:baseline !important;
    justify-content:flex-start !important;
    min-width:0 !important;
    min-height:0 !important;
    margin-top:auto;
    padding-top:5px;
    white-space:normal !important;
    flex:1 1 0 !important;
    flex-wrap:wrap !important;
    gap:2px 7px;
    align-content:flex-start !important;
    column-gap:6px !important;
    row-gap:0 !important;
    max-width:calc(100% - 36px) !important;
    margin:0 !important;
    padding:0 !important;
}

.so-kvadrat-cijena{
    display:block;
    max-width:100%;
    overflow:hidden;
    color:#ed1c24;
    font-size:15px;
    line-height:18px;
    font-weight:600;
    letter-spacing:-.2px;
    text-overflow:ellipsis;
    white-space:nowrap;
    order:1;
    margin:0 !important;
    min-width:0;
}

.so-kvadrat-stara-cijena{
    display:block;
    max-width:100%;
    overflow:hidden;
    color:#7d8996;
    font-size:10px;
    line-height:13px;
    text-decoration:line-through;
    text-overflow:ellipsis;
    white-space:nowrap;
    font-weight:400;
    order:2;
    margin:0 !important;
    min-width:0;
}

.so-kvadrat--super .so-kvadrat-cijena{
    color:#c91920;
}

.grid:not(.list-view) > .so-kvadrat-render{
    display:flex !important;
    min-width:0;
    height:100%;
}

.grid:not(.list-view) > .so-kvadrat-render > .so-kvadrat{
    width:100%;
}

.so-kvadrat-akcija{
    display:inline-flex;
    flex:0 0 auto;
    align-items:center;
    justify-content:center;
    height:18px;
    min-height:18px;
    padding:0 5px;
    border-radius:3px;
    background:#239b62 !important;
    color:#fff !important;
    font-size:8px;
    line-height:18px;
    font-weight:600;
    white-space:nowrap;
    box-shadow:0 1px 2px rgba(0,0,0,.16);
}

.so-kvadrat-meta a > span:last-child{
    display:block;
    min-width:0;
    overflow:hidden;
    white-space:nowrap;
    text-overflow:ellipsis;
}

.so-kvadrat-meta-ikona{
    display:inline-flex;
    flex:0 0 12px;
    width:12px;
    height:14px;
    align-items:center;
    justify-content:center;
    font-size:13px;
    line-height:14px;
    color:#6d7f91;
}

.so-kvadrat-kategorija-ikona{
    font-size:14px;
}

.so-kvadrat-pin{
    position:relative;
    display:inline-block;
    flex:0 0 10px;
    width:10px;
    height:10px;
    margin-left:1px;
    margin-right:1px;
    border:2px solid var(--so-stil, #64778a);
    border-radius:50% 50% 50% 0;
    transform:rotate(-45deg);
    box-sizing:border-box;
}

.so-kvadrat-pin::after{
    content:"";
    position:absolute;
    width:2px;
    height:2px;
    left:2px;
    top:2px;
    background:var(--so-stil, #64778a);
    border-radius:50%;
}

.so-kvadrat-dno{
    display:flex !important;
    align-items:center !important;
    justify-content:space-between !important;
    gap:6px !important;
    min-width:0;
    margin-top:0 !important;
    padding-top:0 !important;
    min-height:30px !important;
}

.so-kvadrat-omiljeni:hover{
    color:#ed1c24;
    background:transparent;
}

.so-kvadrat-omiljeni:disabled{
    opacity:.55;
    cursor:default;
}

.so-kvadrat-meta a::before{
    content:none !important;
    display:none !important;
}

.so-kvadrat-kategorija::before{
    content:none !important;
    display:none !important;
}

.so-kvadrat-lokacija::before{
    content:none !important;
    display:none !important;
}

.so-kvadrat-kategorija{
    padding-left:0 !important;
}

.so-kvadrat-lokacija{
    padding-left:0 !important;
}

.so-kvadrat-dno .so-kvadrat-omiljeni{
    position:static !important;
    inset:auto !important;
    margin:0 !important;
}

/* RESPONSIVE */
@media(max-width:1100px){

    .so-kvadrat-stil,
    .so-kvadrat-hitno,
    .so-kvadrat-vrsta{
        height:17px;
        min-height:17px;

        padding-left:4px;
        padding-right:4px;

        font-size:7.5px;
        line-height:17px;
    }

    .so-kvadrat-vrsta{
        max-width:43%;
    }

    .so-kvadrat-cijena{
        font-size:14px;
    }
}

/* =========================================================
   V4 — SRCE UVIJEK DESNO U KVADRATNOJ KARTICI
   ========================================================= */
.so-kvadrat-dno > .so-kvadrat-omiljeni-form{
    margin-left:auto !important;
}


/* =========================================================
   V4 — BOJA NASLOVA PREMA STILU OGLASA
   ========================================================= */
.so-kvadrat--super .so-kvadrat-naslov,
.so-kvadrat--super .so-kvadrat-naslov:hover,
.so-kvadrat--prodavnica .so-kvadrat-naslov,
.so-kvadrat--prodavnica .so-kvadrat-naslov:hover,
.so-kvadrat--sms .so-kvadrat-naslov,
.so-kvadrat--sms .so-kvadrat-naslov:hover{
    color:var(--so-stil) !important;
}

