:root {
    --bg:#07111a;
    --bg-soft:#0b1721;
    --panel:#0f1b25;
    --panel-2:#121f2a;
    --line:#23313c;
    --line-soft:#1a2833;
    --text:#f5f7f8;
    --muted:#9ba7b1;
    --accent:#f47a12;
    --accent-2:#ff9a3c;
    --shadow:0 24px 70px rgba(0,0,0,.28)
}
* {
    box-sizing:border-box
}
html {
    scroll-behavior:smooth
}
body {
    margin:0;
    font-family:Inter,Segoe UI,Arial,sans-serif;
    background:radial-gradient(circle at 50% 0,#142b3d 0,#0b1823 34%,#08141d 100%);
    color:var(--text)
}
a {
    color:inherit;
    text-decoration:none
}
button,input {
    font:inherit
}
.site-header {
    position:sticky;
    top:0;
    z-index:50;
    background:rgba(4,11,17,.94);
    border-bottom:1px solid rgba(255,255,255,.07);
    backdrop-filter:blur(18px)
}
.nav-shell {
    width:min(1540px,calc(100% - 48px));
    min-height:74px;
    margin:auto;
    display:grid;
    grid-template-columns:250px minmax(320px,690px) 250px;
    align-items:center;
    justify-content:space-between;
    gap:28px
}
.brand {
    font-size:31px;
    font-weight:950;
    letter-spacing:-1.8px
}
.brand-cnc {
    color:var(--accent)
}
.search-wrap {
    position:relative
}
.search-wrap svg {
    position:absolute;
    left:17px;
    top:50%;
    width:22px;
    transform:translateY(-50%);
    fill:none;
    stroke:#91a0aa;
    stroke-width:2;
    stroke-linecap:round
}
.search-wrap input {
    width:100%;
    height:48px;
    padding:0 48px 0 52px;
    border:1px solid #263541;
    border-radius:12px;
    background:#0b151e;
    color:#eef3f5;
    outline:none;
    transition:.2s
}
.search-wrap input::placeholder {
    color:#7f8b95
}
.search-wrap input:focus {
    border-color:#b85e15;
    box-shadow:0 0 0 4px rgba(244,122,18,.12)
}
.search-wrap button {
    position:absolute;
    right:12px;
    top:50%;
    transform:translateY(-50%);
    border:0;
    background:transparent;
    color:#9aa6af;
    font-size:25px;
    cursor:pointer
}
.admin-link {
    justify-self:end;
    height:44px;
    padding:0 16px;
    display:inline-flex;
    align-items:center;
    gap:9px;
    border:1px solid #273541;
    border-radius:10px;
    background:#0a141d;
    color:#dce3e7;
    font-size:14px;
    font-weight:800;
    transition:.2s
}
.admin-link:hover {
    border-color:var(--accent);
    color:#fff
}
.admin-link svg {
    width:20px;
    fill:none;
    stroke:currentColor;
    stroke-width:1.7
}
.hero {
    border-bottom:1px solid rgba(255,255,255,.06);
    background:linear-gradient(90deg,#06121c 0%,#0b1b29 55%,#08141d 100%);
    overflow:hidden
}
.hero-shell {
    position:relative;
    width:min(1540px,100%);
    min-height:445px;
    margin:auto;
    display:grid;
    grid-template-columns:minmax(0,46%) minmax(0,54%);
    align-items:stretch
}
.hero-content {
    position:relative;
    z-index:2;
    display:flex;
    flex-direction:column;
    justify-content:center;
    padding:62px 28px 62px max(28px,calc((100vw - 1540px)/2 + 24px));
    background:linear-gradient(90deg,#06121c 0%,rgba(6,18,28,.98) 74%,rgba(6,18,28,.48) 100%)
}
.eyebrow {
    margin:0 0 18px;
    color:var(--accent);
    font-size:12px;
    font-weight:950;
    letter-spacing:2.2px;
    text-transform:uppercase
}
.hero h1 {
    max-width:690px;
    margin:0;
    font-size:clamp(44px,4vw,69px);
    line-height:1.03;
    letter-spacing:-3.2px
}
.hero-copy {
    max-width:650px;
    margin:20px 0 28px;
    color:#b3bec6;
    font-size:17px;
    line-height:1.65
}
.hero-button {
    align-self:flex-start;
    display:inline-flex;
    align-items:center;
    gap:15px;
    padding:14px 22px;
    border-radius:10px;
    background:linear-gradient(135deg,var(--accent),#e96400);
    box-shadow:0 12px 30px rgba(244,122,18,.2);
    font-weight:900
}
.hero-button:hover {
    transform:translateY(-2px);
    box-shadow:0 16px 36px rgba(244,122,18,.3)
}
.hero-image {
    position:relative;
    background-image:linear-gradient(90deg,#06121c 0%,rgba(6,18,28,.22) 18%,rgba(6,18,28,0) 48%),linear-gradient(0deg,rgba(4,12,18,.22),rgba(4,12,18,.02)),url('../images/hero-cnc-tools.webp');
    background-size:cover;
    background-position:center right
}
.hero-image:after {
    content:"";
    position:absolute;
    inset:0;
    background:radial-gradient(circle at 62% 58%,transparent 0 38%,rgba(2,8,12,.18) 74%)
}
.category-bar {
    background:#091620;
    border-bottom:1px solid rgba(255,255,255,.06)
}
.category-shell {
    width:min(1540px,calc(100% - 48px));
    margin:auto;
    padding:14px 0;
    display:flex;
    overflow:auto;
    scrollbar-width:none
}
.category-shell::-webkit-scrollbar {
    display:none
}
.category-filter {
    min-width:190px;
    height:58px;
    padding:0 22px;
    display:flex;
    align-items:center;
    justify-content:center;
    gap:11px;
    border:1px solid #21303b;
    border-right:0;
    background:#0a151e;
    color:#b9c3ca;
    cursor:pointer;
    transition:.2s
}
.category-filter:first-child {
    border-radius:12px 0 0 12px
}
.category-filter:last-child {
    border-right:1px solid #21303b;
    border-radius:0 12px 12px 0
}
.category-filter:hover,.category-filter.active {
    color:#fff;
    background:#0d1b25
}
.category-filter.active {
    box-shadow:inset 0 -3px 0 var(--accent)
}
.category-icon {
    color:var(--accent);
    font-size:20px
}
.ads-section {
    width:min(1540px,calc(100% - 48px));
    margin:0 auto;
    padding:48px 0 82px
}
.section-heading {
    display:flex;
    align-items:end;
    justify-content:space-between;
    gap:24px;
    margin-bottom:24px
}
.section-heading .eyebrow {
    margin-bottom:9px
}
.section-heading h2 {
    margin:0;
    font-size:36px;
    letter-spacing:-1.5px
}
.results-count {
    margin:0;
    padding:10px 14px;
    border:1px solid #25333e;
    border-radius:9px;
    background:#0b161f;
    color:#9ca8b1;
    font-size:13px;
    font-weight:800
}
.ads-grid {
    display:grid;
    grid-template-columns:repeat(4,minmax(0,1fr));
    gap:20px
}
.ad-card {
    display:flex;
    flex-direction:column;
    min-width:0;
    border:1px solid #24323d;
    border-radius:15px;
    overflow:hidden;
    background:linear-gradient(180deg,#111d27,#0d1821);
    box-shadow:0 12px 34px rgba(0,0,0,.16);
    transition:.25s
}
.ad-card:hover {
    transform:translateY(-5px);
    border-color:#3b4b58;
    box-shadow:var(--shadow)
}
.ad-image-link {
    position:relative;
    display:block;
    height:238px;
    overflow:hidden;
    background:radial-gradient(circle at 50% 25%,#263743,#101b24 68%)
}
.ad-image-link:after {
    content:"";
    position:absolute;
    inset:auto 0 0;
    height:60%;
    background:linear-gradient(transparent,rgba(5,11,16,.45));
    pointer-events:none
}
.ad-image-link img {
    width:100%;
    height:100%;
    object-fit:cover;
    transition:.45s
}
.ad-card:hover .ad-image-link img {
    transform:scale(1.045)
}
.image-placeholder {
    width:100%;
    height:100%;
    display:grid;
    place-content:center;
    text-align:center;
    background:radial-gradient(circle at 50% 38%,#2a3b47,#121d26 68%)
}
.image-placeholder span {
    font-size:43px;
    font-weight:950;
    letter-spacing:-3px;
    color:#526471
}
.image-placeholder small {
    margin-top:7px;
    color:#73818b
}
.featured-badge {
    position:absolute;
    z-index:2;
    top:14px;
    left:14px;
    padding:7px 9px;
    border-radius:7px;
    background:var(--accent);
    color:#fff;
    font-size:11px;
    font-weight:900
}
.card-arrow {
    position:absolute;
    z-index:2;
    top:14px;
    right:14px;
    width:34px;
    height:34px;
    display:grid;
    place-items:center;
    border:1px solid rgba(255,255,255,.18);
    border-radius:50%;
    background:rgba(7,17,26,.62);
    color:#fff
}
.ad-content {
    display:flex;
    flex-direction:column;
    flex:1;
    padding:18px
}
.ad-meta-top {
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:12px
}
.category-chip {
    padding:6px 8px;
    border-radius:6px;
    background:#192a37;
    color:#abc0cf;
    font-size:11px;
    font-weight:800
}
.code {
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
    color:#71808a;
    font-size:11px
}
.ad-content h3 {
    margin:15px 0 9px;
    font-size:19px;
    line-height:1.3;
    letter-spacing:-.35px
}
.ad-content h3 a:hover {
    color:var(--accent-2)
}
.description-preview {
    margin:0 0 19px;
    color:#8996a0;
    font-size:13px;
    line-height:1.55
}
.ad-footer {
    margin-top:auto;
    padding-top:15px;
    border-top:1px solid #21303a;
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:12px
}
.ad-footer strong {
    color:var(--accent);
    font-size:18px
}
.details-link {
    color:#cbd4d9;
    font-size:12px;
    font-weight:900
}
.details-link span {
    color:var(--accent);
    margin-left:4px
}
.empty-state {
    padding:70px 25px;
    border:1px dashed #2f404d;
    border-radius:15px;
    text-align:center;
    background:#0d1821;
    color:#9eabb4
}
.empty-icon {
    font-size:43px;
    color:#61717d
}
.search-empty {
    margin-top:22px
}
.site-footer {
    min-height:108px;
    padding:25px max(24px,calc((100% - 1540px)/2));
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:28px;
    border-top:1px solid #1c2a34;
    background:#050d14;
    color:#7f8d97
}
.site-footer div {
    display:flex;
    flex-direction:column;
    gap:6px
}
.site-footer strong {
    color:#fff
}
.ad-card[hidden] {
    display:none
}
@media(max-width:1250px) {
    .nav-shell {
        grid-template-columns:220px minmax(280px,1fr) 160px
    }
    .ads-grid {
        grid-template-columns:repeat(3,minmax(0,1fr))
    }
    .hero-shell {
        grid-template-columns:52% 48%
    }
    .hero h1 {
        font-size:56px
    }
}
@media(max-width:900px) {
    .nav-shell {
        grid-template-columns:auto 1fr auto;
        gap:14px
    }
    .brand {
        font-size:24px
    }
    .admin-link span {
        display:none
    }
    .admin-link {
        padding:0 12px
    }
    .hero-shell {
        grid-template-columns:1fr;
        min-height:410px
    }
    .hero-content {
        padding:58px 28px;
        background:linear-gradient(90deg,rgba(6,18,28,.98),rgba(6,18,28,.86))
    }
    .hero-image {
        position:absolute;
        inset:0;
        opacity:.34
    }
    .ads-grid {
        grid-template-columns:repeat(2,minmax(0,1fr))
    }
}
@media(max-width:650px) {
    .nav-shell {
        width:calc(100% - 24px);
        grid-template-columns:1fr auto;
        padding:12px 0
    }
    .search-wrap {
        grid-column:1/-1;
        grid-row:2
    }
    .hero-content {
        padding:48px 20px
    }
    .hero h1 {
        font-size:43px;
        letter-spacing:-2.2px
    }
    .hero-copy {
        font-size:15px
    }
    .category-shell,.ads-section {
        width:calc(100% - 24px)
    }
    .category-filter {
        min-width:160px;
        height:52px;
        padding:0 16px
    }
    .ads-section {
        padding:40px 0 60px
    }
    .ads-grid {
        grid-template-columns:1fr
    }
    .section-heading h2 {
        font-size:31px
    }
    .ad-image-link {
        height:250px
    }
    .site-footer {
        flex-direction:column;
        align-items:flex-start;
        padding:28px 20px
    }
}
.card-badges {
    position:absolute;
    left:14px;
    top:14px;
    display:flex;
    gap:7px;
    z-index:3
}
.condition-badge,.stock-badge {
    padding:7px 9px;
    border-radius:7px;
    background:rgba(7,17,26,.88);
    border:1px solid rgba(255,255,255,.12);
    font-size:10px;
    font-weight:900;
    color:#fff;
    backdrop-filter:blur(8px)
}
.stock-badge.available {
    color:#78d9a4;
    border-color:rgba(63,194,119,.38)
}
.stock-badge.unavailable {
    color:#ff9a91;
    border-color:rgba(233,83,69,.38)
}
.featured-badge {
    top:auto!important;
    bottom:14px!important;
    left:14px!important
}
.ad-meta-top {
    display:block
}
.code {
    display:none
}
/* Pojednostavljene kartice oglasa */ .card-badges,.condition-badge,.stock-badge,.featured-badge,.description-preview,.details-link {
    display:none!important
}
.category-chip {
    display:inline-flex;
    align-self:flex-start;
    width:auto;
    max-width:100%;
    padding:6px 10px
}
.ad-content h3 {
    margin-bottom:18px
}
.ad-footer {
    justify-content:flex-start
}
.ad-footer strong {
    font-variant-numeric:tabular-nums
}

/* Kompaktniji prikaz početne strane */
.nav-shell {
    grid-template-columns:250px minmax(300px,430px) 250px;
}

.hero-shell {
    min-height:350px;
}

.hero-content {
    padding-top:40px;
    padding-bottom:40px;
}

.hero h1 {
    font-size:clamp(40px,3.4vw,58px);
    max-width:620px;
}

.hero-copy {
    margin:15px 0 21px;
    font-size:16px;
}

.hero-button {
    padding:12px 19px;
}

.ads-grid {
    grid-template-columns:repeat(5,minmax(0,1fr));
    gap:16px;
}

.ad-image-link {
    height:205px;
}

.ad-content {
    padding:15px;
}

.ad-content h3 {
    font-size:17px;
}

.results-count {
    display:none;
}

@media(max-width:1250px) {
    .ads-grid {
        grid-template-columns:repeat(5,minmax(0,1fr));
    }
}
