:root{
        --stcart-red:#e31b23;
        --stcart-red-dark:#c9151c;
        --stcart-dark:#172033;
        --stcart-muted:#667085;
        --stcart-border:#e2e7ec;
        --stcart-soft:#f7f9fb;
        --stcart-green:#087a3c;
        --stcart-green-bg:#eaf7ef;
    }

    body.stcart-open{
        overflow:hidden !important;
    }

    /*
     * Dok je testna košarica aktivna, stari gumb "Pošalji upit"
     * na single proizvodu ne treba se prikazivati. Ne čekamo JS
     * da ga skriva pa nema vizualnog skakanja ni observera.
     */
    body.single-proizvod .stncs-inquiry-slot > .st-inq-chip{
        display:none !important;
    }

    .stcart-float{
        position:fixed;
        right:22px;
        bottom:22px;
        z-index:999990;
        display:none;
        align-items:center;
        gap:9px;
        min-height:48px;
        padding:8px 10px 8px 14px;
        background:#fff;
        color:var(--stcart-dark);
        border:1px solid #d9e0e7;
        border-radius:999px;
        box-shadow:0 12px 34px rgba(15,23,42,.16);
        font:800 13px/1.1 inherit;
        cursor:pointer;
        transition:transform .18s ease,border-color .18s ease,box-shadow .18s ease;
    }

    .stcart-float.is-visible{
        display:inline-flex;
    }

    .stcart-float:hover{
        transform:translateY(-2px);
        border-color:#f0a8ac;
        box-shadow:0 15px 38px rgba(15,23,42,.20);
    }

    .stcart-float-icon{
        width:22px;
        height:22px;
        color:var(--stcart-red);
        flex:0 0 auto;
    }

    .stcart-float-count{
        display:inline-flex;
        align-items:center;
        justify-content:center;
        min-width:28px;
        height:28px;
        padding:0 7px;
        background:var(--stcart-red);
        color:#fff;
        border-radius:999px;
        font-size:12px;
        font-weight:900;
    }

    .stcart-overlay{
        position:fixed;
        inset:0;
        z-index:999995;
        display:flex;
        justify-content:flex-end;
        visibility:hidden;
        opacity:0;
        background:rgba(15,23,42,.48);
        transition:opacity .20s ease,visibility .20s ease;
    }

    .stcart-overlay.is-open{
        visibility:visible;
        opacity:1;
    }

    .stcart-panel{
        position:relative;
        width:min(500px,100%);
        height:100%;
        background:#fff;
        transform:translateX(100%);
        transition:transform .24s ease;
        box-shadow:-18px 0 50px rgba(15,23,42,.18);
        overflow:hidden;
    }

    .stcart-overlay.is-open .stcart-panel{
        transform:translateX(0);
    }

    .stcart-panel-inner{
        display:flex;
        flex-direction:column;
        height:100%;
    }

    .stcart-head{
        display:flex;
        align-items:center;
        justify-content:space-between;
        gap:16px;
        padding:20px 22px;
        border-bottom:1px solid var(--stcart-border);
    }

    .stcart-head-title{
        margin:0;
        color:var(--stcart-dark);
        font-size:23px;
        line-height:1.15;
        font-weight:900;
    }

    .stcart-head-count{
        display:block;
        margin-top:4px;
        color:var(--stcart-muted);
        font-size:12px;
        font-weight:600;
    }

    .stcart-close{
        display:inline-flex;
        align-items:center;
        justify-content:center;
        width:42px;
        height:42px;
        padding:0;
        background:#f7f8fa;
        color:var(--stcart-dark);
        border:1px solid var(--stcart-border);
        border-radius:11px;
        font-size:27px;
        line-height:1;
        cursor:pointer;
    }

    .stcart-scroll{
        flex:1 1 auto;
        overflow-y:auto;
        overscroll-behavior:contain;
        padding:18px 22px 30px;
    }

    .stcart-empty{
        padding:34px 20px;
        text-align:center;
        background:var(--stcart-soft);
        border:1px solid var(--stcart-border);
        border-radius:14px;
    }

    .stcart-empty strong{
        display:block;
        margin-bottom:7px;
        color:var(--stcart-dark);
        font-size:17px;
    }

    .stcart-empty span{
        color:var(--stcart-muted);
        font-size:13px;
    }

    .stcart-empty a{
        display:inline-flex;
        align-items:center;
        justify-content:center;
        min-height:42px;
        margin-top:17px;
        padding:9px 16px;
        background:var(--stcart-red);
        color:#fff !important;
        border-radius:9px;
        font-size:12px;
        font-weight:900;
        text-decoration:none !important;
    }

    .stcart-items{
        display:grid;
        gap:11px;
    }

    .stcart-item{
        display:grid;
        grid-template-columns:78px minmax(0,1fr);
        gap:13px;
        padding:11px;
        border:1px solid var(--stcart-border);
        border-radius:13px;
        background:#fff;
    }

    .stcart-item-image{
        display:flex;
        align-items:center;
        justify-content:center;
        width:78px;
        height:78px;
        overflow:hidden;
        border-radius:9px;
        background:#f7f8fa;
    }

    .stcart-item-image img{
        width:100%;
        height:100%;
        object-fit:contain;
    }

    .stcart-item-title{
        margin:0 24px 5px 0;
        color:var(--stcart-dark);
        font-size:13px;
        line-height:1.3;
        font-weight:850;
    }

    .stcart-item-meta{
        display:flex;
        flex-wrap:wrap;
        gap:5px 10px;
        color:#7b8492;
        font-size:10px;
        line-height:1.3;
    }

    .stcart-item-price{
        margin-top:6px;
        color:var(--stcart-green);
        font-size:15px;
        font-weight:900;
        white-space:nowrap;
    }

    .stcart-item-bottom{
        display:flex;
        align-items:center;
        justify-content:space-between;
        gap:10px;
        margin-top:8px;
    }

    .stcart-qty{
        display:inline-flex;
        align-items:center;
        overflow:hidden;
        border:1px solid #d9e0e7;
        border-radius:8px;
        background:#fff;
    }

    .stcart-qty button{
        display:inline-flex;
        align-items:center;
        justify-content:center;
        width:31px;
        height:31px;
        padding:0;
        background:#f8fafb;
        color:var(--stcart-dark);
        border:0;
        cursor:pointer;
        font-size:18px;
        font-weight:800;
    }

    .stcart-qty span{
        display:inline-flex;
        align-items:center;
        justify-content:center;
        min-width:35px;
        height:31px;
        color:var(--stcart-dark);
        border-left:1px solid #e3e7eb;
        border-right:1px solid #e3e7eb;
        font-size:12px;
        font-weight:850;
    }

    .stcart-remove{
        padding:4px 0;
        background:transparent;
        color:#9b3b40;
        border:0;
        font-size:10px;
        font-weight:800;
        cursor:pointer;
        text-decoration:underline;
        text-underline-offset:2px;
    }

    .stcart-summary{
        margin-top:14px;
        padding:14px 15px;
        background:#f1f8f4;
        border:1px solid #d4eadc;
        border-radius:12px;
    }

    .stcart-summary-row{
        display:flex;
        align-items:center;
        justify-content:space-between;
        gap:16px;
    }

    .stcart-summary-row + .stcart-summary-row{
        margin-top:9px;
    }

    .stcart-summary-row.is-total{
        margin-top:12px;
        padding-top:12px;
        border-top:1px solid #cce2d5;
    }

    .stcart-summary-label{
        color:#52606e;
        font-size:12px;
        font-weight:750;
    }

    .stcart-summary-value{
        color:var(--stcart-dark);
        font-size:15px;
        font-weight:900;
        line-height:1.1;
        white-space:nowrap;
    }

    .stcart-summary-row.is-total .stcart-summary-label{
        color:var(--stcart-dark);
        font-size:13px;
        font-weight:900;
    }

    .stcart-summary-row.is-total .stcart-summary-value{
        color:var(--stcart-green);
        font-size:23px;
        font-weight:950;
    }

    .stcart-summary-note{
        display:none;
        margin-top:8px;
        color:#6f6655;
        font-size:10px;
        line-height:1.4;
    }

    .stcart-summary.has-unconfirmed .stcart-summary-note{
        display:block;
    }

    .stcart-order-box{
        margin-top:18px;
        padding-top:18px;
        border-top:1px solid var(--stcart-border);
    }

    .stcart-order-title{
        margin:0 0 5px;
        color:var(--stcart-dark);
        font-size:17px;
        font-weight:900;
    }

    .stcart-order-intro{
        margin:0 0 15px;
        color:var(--stcart-muted);
        font-size:11px;
        line-height:1.45;
    }

    .stcart-form-grid{
        display:grid;
        grid-template-columns:1fr 1fr;
        gap:11px;
    }

    .stcart-field{
        display:grid;
        gap:5px;
    }

    .stcart-field.is-full{
        grid-column:1 / -1;
    }

    .stcart-field label{
        color:#4e5968;
        font-size:10px;
        font-weight:850;
    }

    .stcart-field input,
    .stcart-field textarea{
        width:100%;
        min-height:43px;
        padding:10px 12px;
        background:#fff;
        color:var(--stcart-dark);
        border:1px solid #d8dfe6;
        border-radius:9px;
        outline:none;
        font:600 13px/1.35 inherit;
        transition:border-color .18s ease,box-shadow .18s ease;
    }

    .stcart-field textarea{
        min-height:92px;
        resize:vertical;
    }

    .stcart-field input:focus,
    .stcart-field textarea:focus{
        border-color:#e88a8f;
        box-shadow:0 0 0 3px rgba(227,27,35,.08);
    }

    .stcart-hp{
        position:absolute !important;
        left:-10000px !important;
        top:auto !important;
        width:1px !important;
        height:1px !important;
        overflow:hidden !important;
    }

    .stcart-submit{
        display:flex;
        align-items:center;
        justify-content:center;
        width:100%;
        min-height:49px;
        margin-top:13px;
        padding:12px 18px;
        background:var(--stcart-red);
        color:#fff;
        border:1px solid var(--stcart-red);
        border-radius:10px;
        font-size:13px;
        font-weight:950;
        letter-spacing:.01em;
        cursor:pointer;
        transition:background .18s ease,transform .18s ease,box-shadow .18s ease;
    }

    .stcart-submit:hover{
        background:var(--stcart-red-dark);
        transform:translateY(-1px);
        box-shadow:0 8px 18px rgba(227,27,35,.17);
    }

    .stcart-submit:disabled{
        opacity:.6;
        cursor:wait;
        transform:none;
        box-shadow:none;
    }

    .stcart-legal{
        margin:9px 2px 0;
        color:#7a8492;
        font-size:9px;
        line-height:1.45;
    }

    .stcart-message{
        display:none;
        margin:0 0 14px;
        padding:11px 12px;
        border-radius:9px;
        font-size:11px;
        font-weight:750;
        line-height:1.4;
    }

    .stcart-message.is-visible{
        display:block;
    }

    .stcart-message.is-error{
        background:#fff1f1;
        color:#a91c23;
        border:1px solid #f2c9cc;
    }

    .stcart-message.is-success{
        background:#edf8f1;
        color:#176b3c;
        border:1px solid #cce9d7;
    }

    .stcart-toast{
        position:fixed;
        left:50%;
        bottom:26px;
        z-index:999999;
        display:flex;
        align-items:center;
        gap:8px;
        max-width:calc(100% - 32px);
        padding:11px 16px;
        background:#172033;
        color:#fff;
        border-radius:999px;
        box-shadow:0 12px 30px rgba(15,23,42,.28);
        transform:translate(-50%,20px);
        opacity:0;
        pointer-events:none;
        font-size:12px;
        font-weight:800;
        transition:opacity .18s ease,transform .18s ease;
    }

    .stcart-toast.is-visible{
        opacity:1;
        transform:translate(-50%,0);
    }

    /* SINGLE — NOVI CTA */

    .stcart-single-add{
        display:inline-flex;
        align-items:center;
        justify-content:center;
        min-width:210px;
        min-height:46px;
        margin:0;
        padding:12px 22px;
        background:var(--stcart-red);
        color:#fff;
        border:1px solid var(--stcart-red);
        border-radius:10px;
        box-shadow:0 6px 14px rgba(227,27,35,.12);
        font-size:13px;
        font-weight:950;
        line-height:1.1;
        cursor:pointer;
        transition:background .18s ease,transform .18s ease,box-shadow .18s ease;
    }

    .stcart-single-add:hover{
        background:var(--stcart-red-dark);
        transform:translateY(-1px);
        box-shadow:0 8px 18px rgba(227,27,35,.18);
    }

    body.single-proizvod .stncs-inquiry-slot{
        min-height:46px;
    }

    /* KATALOG — tekst gumba mijenja JS, zadržava V9 dizajn */

    .stnc-list-details.stcart-buy-button,
    .stnc-details.stcart-buy-button{
        cursor:pointer;
    }

    .stnc-list-details.stcart-buy-button::before,
    .stnc-details.stcart-buy-button::before{
        content:'';
    }

    @media(max-width:650px){

        .stcart-float{
            right:14px;
            bottom:18px;
            min-height:45px;
            padding:7px 8px 7px 11px;
        }

        .stcart-float-label{
            display:none;
        }

        .stcart-panel{
            width:100%;
            height:100dvh;
        }

        .stcart-head{
            padding:16px 16px;
        }

        .stcart-head-title{
            font-size:21px;
        }

        .stcart-scroll{
            padding:14px 14px 26px;
        }

        .stcart-item{
            grid-template-columns:70px minmax(0,1fr);
            gap:11px;
            padding:10px;
        }

        .stcart-item-image{
            width:70px;
            height:70px;
        }

        .stcart-form-grid{
            grid-template-columns:1fr;
        }

        .stcart-field.is-full{
            grid-column:auto;
        }

        .stcart-summary-value{
            font-size:21px;
        }

        .stcart-single-add{
            width:100%;
            min-height:49px;
            font-size:14px;
        }

        .stcart-toast{
            bottom:76px;
        }
    }

    @media(prefers-reduced-motion:reduce){
        .stcart-float,
        .stcart-overlay,
        .stcart-panel,
        .stcart-toast,
        .stcart-submit,
        .stcart-single-add{
            transition:none !important;
            transform:none !important;
        }
    }
