/* =========================================================
   Katooni City Premium Cart v1.20
   WooCommerce-native cart logic + LOZI-inspired visual system
   ========================================================= */

body.kc-premium-cart{
    --kcc-bg:#f4f7fb;
    --kcc-card:#fff;
    --kcc-text:#111827;
    --kcc-muted:#7d8797;
    --kcc-line:#e7ebf1;
    --kcc-soft:#f8fafc;
    --kcc-dark:#111827;
    --kcc-red:#e5484d;
    --kcc-green:#0c9a68;
    --kcc-shadow:0 18px 60px rgba(19,31,52,.07);
    --kcc-radius:24px;
    background:var(--kcc-bg)!important;
    color:var(--kcc-text);
}

body.kc-premium-cart .main-page-wrapper>.page-title,
body.kc-premium-cart .breadcrumbs-location-summary,
body.kc-premium-cart .wd-prefooter,
body.kc-premium-cart .footer-container,
body.kc-premium-cart .scrollToTop{
    display:none!important;
}

body.kc-premium-cart .website-wrapper,
body.kc-premium-cart .wd-page-wrapper,
body.kc-premium-cart .wd-page-content,
body.kc-premium-cart .main-page-wrapper,
body.kc-premium-cart .wd-content-area,
body.kc-premium-cart .site-content{
    background:transparent!important;
}

body.kc-premium-cart .main-page-wrapper{
    padding-top:0!important;
    margin-top:0!important;
}

body.kc-premium-cart main#main-content.wd-content-layout,
body.kc-premium-cart .site-content{
    width:100%!important;
    max-width:none!important;
    padding-inline:0!important;
    margin-inline:auto!important;
}

body.kc-premium-cart .kc-cart-shell{
    width:min(1240px,calc(100% - 34px));
    margin-inline:auto;
    padding:34px 0 58px;
}

body.kc-premium-cart .kc-cart-top{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:18px;
    margin-bottom:18px;
}

body.kc-premium-cart .kc-cart-brand{
    display:flex;
    align-items:center;
    gap:13px;
}

body.kc-premium-cart .kc-cart-mark{
    width:50px;
    height:50px;
    display:grid;
    place-items:center;
    border:1px solid var(--kcc-line);
    border-radius:16px;
    background:#fff;
    box-shadow:0 8px 28px rgba(17,24,39,.05);
}

body.kc-premium-cart .kc-cart-mark svg,
body.kc-premium-cart .kc-cart-quick svg,
body.kc-premium-cart .kc-cart-btn svg,
body.kc-premium-cart .kc-cart-checkout-btn svg,
body.kc-premium-cart .kc-cart-secure svg,
body.kc-premium-cart .kc-cart-remove svg,
body.kc-premium-cart .kc-cart-empty-icon svg{
    stroke:currentColor;
    stroke-width:1.8;
    stroke-linecap:round;
    stroke-linejoin:round;
}

body.kc-premium-cart .kc-cart-mark svg{
    width:24px;
    height:24px;
}

body.kc-premium-cart .kc-cart-eyebrow{
    color:#9aa3b2;
    font-size:11px;
    line-height:1.4;
}

body.kc-premium-cart .kc-cart-brand h1{
    margin:2px 0 0;
    font-size:25px;
    line-height:1.35;
    font-weight:850;
    letter-spacing:-.35px;
}

body.kc-premium-cart .kc-cart-top-tools{
    display:flex;
    align-items:center;
    gap:8px;
}

body.kc-premium-cart .kc-cart-quick{
    height:40px;
    padding:0 12px;
    display:inline-flex;
    align-items:center;
    gap:7px;
    border:1px solid var(--kcc-line);
    border-radius:12px;
    background:rgba(255,255,255,.9);
    color:#4c5565;
    font-size:9.5px;
    font-weight:800;
    transition:.17s ease;
}

body.kc-premium-cart .kc-cart-quick:hover{
    transform:translateY(-2px);
    box-shadow:0 11px 26px rgba(17,24,39,.065);
}

body.kc-premium-cart .kc-cart-quick svg{
    width:15px;
    height:15px;
}

body.kc-premium-cart .kc-cart-badge{
    display:flex;
    align-items:center;
    gap:8px;
    padding:9px 14px;
    border:1px solid var(--kcc-line);
    border-radius:999px;
    background:#fff;
    color:#606a79;
    font-size:11px;
    box-shadow:0 7px 22px rgba(17,24,39,.035);
}

body.kc-premium-cart .kc-cart-badge i{
    width:7px;
    height:7px;
    border-radius:99px;
    background:var(--kcc-dark);
}

body.kc-premium-cart .kc-cart-journey{
    margin:-2px 0 16px;
    padding:10px 14px;
    display:flex;
    align-items:center;
    justify-content:center;
    gap:10px;
    border:1px solid rgba(225,230,237,.9);
    border-radius:15px;
    background:rgba(255,255,255,.72);
    color:#a0a8b5;
    font-size:9px;
}

body.kc-premium-cart .kc-cart-journey>b{
    width:44px;
    height:1px;
    background:linear-gradient(90deg,#e2e7ee,#cfd6e0);
}

body.kc-premium-cart .kc-cart-step{
    display:flex;
    align-items:center;
    gap:6px;
    white-space:nowrap;
}

body.kc-premium-cart .kc-cart-step i{
    width:20px;
    height:20px;
    display:grid;
    place-items:center;
    border-radius:7px;
    background:#eef1f5;
    font-style:normal;
    font-size:8px;
}

body.kc-premium-cart .kc-cart-step.is-active{
    color:#111827;
    font-weight:850;
}

body.kc-premium-cart .kc-cart-step.is-active i{
    background:#111827;
    color:#fff;
    box-shadow:0 6px 13px rgba(17,24,39,.15);
}

body.kc-premium-cart .kc-cart-grid{
    display:grid;
    grid-template-columns:minmax(0,1fr) 360px;
    gap:20px;
    align-items:start;
}

body.kc-premium-cart .kc-cart-products-card,
body.kc-premium-cart .kc-cart-summary-card,
body.kc-premium-cart .kc-cart-empty-card{
    overflow:hidden;
    border:1px solid rgba(225,230,237,.95);
    border-radius:var(--kcc-radius);
    background:linear-gradient(180deg,rgba(255,255,255,.99),rgba(255,255,255,.96));
    box-shadow:var(--kcc-shadow);
}

body.kc-premium-cart .kc-cart-products-card{
    margin:0!important;
}

body.kc-premium-cart .kc-cart-summary-card{
    position:sticky;
    top:18px;
}

body.kc-premium-cart .kc-cart-summary-card:before{
    content:"";
    position:absolute;
    inset:0 0 auto;
    height:3px;
    background:linear-gradient(90deg,#111827,#536179,#111827);
    opacity:.92;
}

body.kc-premium-cart .kc-cart-card-head{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:16px;
    padding:22px 24px;
    border-bottom:1px solid var(--kcc-line);
    background:linear-gradient(180deg,#fff,#fcfdff);
}

body.kc-premium-cart .kc-cart-card-head h2,
body.kc-premium-cart .kc-cart-summary-head h2{
    margin:0;
    font-size:15px;
    font-weight:850;
}

body.kc-premium-cart .kc-cart-card-head span,
body.kc-premium-cart .kc-cart-summary-head p{
    margin:0;
    color:var(--kcc-muted);
    font-size:10.5px;
}

body.kc-premium-cart .kc-cart-item{
    position:relative;
    display:grid;
    grid-template-columns:90px minmax(0,1fr) 160px 142px 42px;
    gap:18px;
    align-items:center;
    padding:20px 24px;
    border-bottom:1px solid var(--kcc-line);
    transition:background .18s ease;
}

body.kc-premium-cart .kc-cart-item:hover{
    background:#fcfdff;
}

body.kc-premium-cart .kc-cart-pic{
    width:90px;
    height:90px;
    overflow:hidden;
    display:grid;
    place-items:center;
    border:1px solid #e9edf2;
    border-radius:19px;
    background:linear-gradient(145deg,#f8fafc,#f1f4f8);
}

body.kc-premium-cart .kc-cart-pic a,
body.kc-premium-cart .kc-cart-pic img{
    width:100%;
    height:100%;
}

body.kc-premium-cart .kc-cart-pic img{
    object-fit:cover;
}

body.kc-premium-cart .kc-cart-product-name{
    color:var(--kcc-text);
    font-size:13px;
    font-weight:800;
    line-height:1.9;
}

body.kc-premium-cart .kc-cart-product-name a{
    color:inherit;
}

body.kc-premium-cart .kc-cart-meta{
    margin-top:4px;
    color:#8a94a4;
    font-size:9.5px;
}

body.kc-premium-cart .kc-cart-meta dl,
body.kc-premium-cart .kc-cart-meta p{
    margin:0!important;
}

body.kc-premium-cart .kc-cart-line-price small{
    display:block;
    margin-bottom:2px;
    color:#9aa3b1;
    font-size:9px;
}

body.kc-premium-cart .kc-cart-line-price strong{
    color:var(--kcc-text);
    font-size:12px;
    font-weight:800;
    white-space:nowrap;
}

body.kc-premium-cart .kc-cart-quantity .quantity{
    --wd-form-height:44px;
    display:grid!important;
    grid-template-columns:42px minmax(42px,1fr) 42px;
    width:142px;
    height:44px;
    overflow:hidden;
    border:1px solid #e4e9f0;
    border-radius:13px;
    background:#fafbfc;
}

body.kc-premium-cart .kc-cart-quantity .quantity .btn{
    min-width:42px!important;
    height:42px!important;
    padding:0!important;
    border:0!important;
    border-radius:0!important;
    background:transparent!important;
    color:#192234!important;
    font-size:18px!important;
    box-shadow:none!important;
}

body.kc-premium-cart .kc-cart-quantity .quantity .btn:hover{
    background:#f0f3f7!important;
}

body.kc-premium-cart .kc-cart-quantity .quantity input.qty,
body.kc-premium-cart .kc-cart-quantity .quantity input[type=number],
body.kc-premium-cart .kc-cart-quantity .quantity input[type=text]{
    width:100%!important;
    min-width:0!important;
    height:42px!important;
    min-height:42px!important;
    padding:0!important;
    border-block:0!important;
    border-inline:1px solid #edf0f4!important;
    border-radius:0!important;
    background:#fff!important;
    color:#101827!important;
    font-size:11px!important;
    text-align:center!important;
    box-shadow:none!important;
}

body.kc-premium-cart .kc-cart-remove{
    display:grid;
    place-items:center;
}

body.kc-premium-cart .kc-cart-remove .remove{
    width:40px!important;
    height:40px!important;
    display:grid!important;
    place-items:center!important;
    border:1px solid #e6eaf0!important;
    border-radius:12px!important;
    background:#fff!important;
    color:#9ca5b3!important;
    font-size:0!important;
    transition:.18s ease;
}

body.kc-premium-cart .kc-cart-remove .remove:before,
body.kc-premium-cart .kc-cart-remove .remove:after{
    display:none!important;
}

body.kc-premium-cart .kc-cart-remove .remove svg{
    width:17px;
    height:17px;
}

body.kc-premium-cart .kc-cart-remove .remove:hover{
    color:var(--kcc-red)!important;
    border-color:#f1c9cc!important;
    background:#fff7f7!important;
    transform:translateY(-1px);
}

body.kc-premium-cart .kc-cart-actions{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:12px;
    padding:16px 20px;
    background:#fcfdff;
}

body.kc-premium-cart .kc-cart-action-set{
    display:flex;
    gap:10px;
}

body.kc-premium-cart .kc-cart-btn{
    min-height:44px;
    padding:0 15px;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    gap:8px;
    border:1px solid #e2e7ed;
    border-radius:13px;
    background:#fff;
    color:#1c2535;
    font-size:11px;
    font-weight:700;
    transition:.16s ease;
}

body.kc-premium-cart .kc-cart-btn:hover{
    transform:translateY(-1px);
    box-shadow:0 8px 20px rgba(17,24,39,.06);
}

body.kc-premium-cart .kc-cart-btn svg{
    width:16px;
    height:16px;
}

body.kc-premium-cart button.kc-cart-btn{
    text-transform:none!important;
    font-family:inherit!important;
}

body.kc-premium-cart .kc-cart-danger{
    color:var(--kcc-red)!important;
    border-color:#f1c9cc!important;
}

body.kc-premium-cart .kc-cart-summary-head{
    padding:23px 22px 11px;
}

body.kc-premium-cart .kc-cart-summary-body{
    padding:6px 22px 22px;
}

body.kc-premium-cart .kc-cart-summary-row{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:20px;
    padding:14px 0;
    border-bottom:1px dashed #e5e9ee;
    color:#596273;
    font-size:11px;
}

body.kc-premium-cart .kc-cart-summary-row strong{
    color:#111827;
    font-size:11px;
    font-weight:800;
    white-space:nowrap;
}

body.kc-premium-cart .kc-cart-summary-row.is-total{
    padding:18px 0 16px;
    border-bottom:0;
    color:#111827;
    font-size:13px;
    font-weight:850;
}

body.kc-premium-cart .kc-cart-summary-row.is-total strong{
    font-size:14px;
}

body.kc-premium-cart .kc-cart-coupon>p{
    margin:0 0 8px;
    color:#7f8897;
    font-size:10px;
}

body.kc-premium-cart .kc-cart-coupon-box{
    display:grid;
    grid-template-columns:minmax(0,1fr) 90px;
    gap:8px;
}

body.kc-premium-cart .kc-cart-coupon-box input{
    height:44px!important;
    min-height:44px!important;
    padding:0 12px!important;
    border:1px solid #dfe5ec!important;
    border-radius:12px!important;
    background:#fff!important;
    font-size:10.5px!important;
}

body.kc-premium-cart .kc-cart-coupon-box button{
    border:0!important;
    border-radius:12px!important;
    background:#f2f4f7!important;
    color:#263043!important;
    font-size:10.5px!important;
    font-weight:750!important;
    text-transform:none!important;
}

body.kc-premium-cart .kc-cart-coupon-tags{
    display:flex;
    flex-wrap:wrap;
    gap:6px;
    margin-top:8px;
}

body.kc-premium-cart .kc-cart-coupon-tag{
    display:inline-flex;
    align-items:center;
    gap:5px;
    padding:5px 9px;
    border:1px solid #e5e9ef;
    border-radius:999px;
    background:#f4f7fa;
    font-size:9px;
}

body.kc-premium-cart .kc-cart-coupon-tag a{
    color:#8e97a4;
    font-size:14px;
    line-height:1;
}

body.kc-premium-cart .kc-cart-checkout-btn{
    position:relative;
    isolation:isolate;
    overflow:hidden;
    min-height:57px;
    margin-top:17px;
    display:flex;
    align-items:center;
    justify-content:center;
    gap:9px;
    border-radius:16px;
    background:var(--kcc-dark);
    color:#fff!important;
    font-size:12px;
    font-weight:850;
    box-shadow:0 12px 26px rgba(17,24,39,.14);
    transition:.18s ease;
}

body.kc-premium-cart .kc-cart-checkout-btn:before{
    content:"";
    position:absolute;
    z-index:-1;
    inset:-70% -30%;
    background:linear-gradient(105deg,transparent 39%,rgba(255,255,255,.16) 50%,transparent 61%);
    transform:translateX(72%);
    animation:kccShine 4.8s 1.5s ease-in-out infinite;
}

body.kc-premium-cart .kc-cart-checkout-btn:hover{
    transform:translateY(-2px);
    box-shadow:0 17px 35px rgba(17,24,39,.18);
}

body.kc-premium-cart .kc-cart-checkout-btn svg{
    width:17px;
    height:17px;
}

body.kc-premium-cart .kc-cart-secure{
    display:flex;
    align-items:center;
    justify-content:center;
    gap:6px;
    margin-top:12px;
    color:#9aa3b2;
    font-size:8.7px;
    text-align:center;
}

body.kc-premium-cart .kc-cart-secure svg{
    width:13px;
    height:13px;
}

/* Notices */
body.kc-premium-cart .woocommerce-notices-wrapper{
    width:min(1240px,calc(100% - 34px));
    margin:16px auto 0;
}

body.kc-premium-cart .woocommerce-message,
body.kc-premium-cart .woocommerce-error,
body.kc-premium-cart .woocommerce-info{
    border-radius:15px!important;
}

/* Empty cart */
body.kc-premium-cart .kc-cart-empty-shell{
    padding-top:44px;
}

body.kc-premium-cart .kc-cart-empty-card{
    position:relative;
    isolation:isolate;
    max-width:760px;
    margin-inline:auto;
    padding:78px 24px;
    text-align:center;
}

body.kc-premium-cart .kc-cart-empty-glow{
    position:absolute;
    z-index:-1;
    width:320px;
    height:180px;
    top:-50px;
    right:50%;
    transform:translateX(50%);
    background:radial-gradient(circle,rgba(99,102,241,.12),transparent 68%);
}

body.kc-premium-cart .kc-cart-empty-icon{
    width:72px;
    height:72px;
    margin:0 auto 15px;
    display:grid;
    place-items:center;
    border-radius:22px;
    background:linear-gradient(145deg,#111827,#29364b);
    color:#fff;
    box-shadow:0 20px 46px rgba(17,24,39,.20);
}

body.kc-premium-cart .kc-cart-empty-icon svg{
    width:29px;
    height:29px;
}

body.kc-premium-cart .kc-cart-empty-card h2{
    margin:0 0 6px;
    font-size:22px;
}

body.kc-premium-cart .kc-cart-empty-card p{
    max-width:520px;
    margin:0 auto 20px;
    color:var(--kcc-muted);
    font-size:10.5px;
}

body.kc-premium-cart .kc-cart-empty-actions{
    display:flex;
    justify-content:center;
    gap:9px;
    flex-wrap:wrap;
}

body.kc-premium-cart .kc-cart-empty-primary{
    background:#111827!important;
    color:#fff!important;
    border-color:#111827!important;
}

@keyframes kccShine{
    0%,68%{transform:translateX(72%)}
    86%,100%{transform:translateX(-72%)}
}

@media(max-width:980px){
    body.kc-premium-cart .kc-cart-grid{
        grid-template-columns:1fr;
    }

    body.kc-premium-cart .kc-cart-products-card{
        order:1;
    }

    body.kc-premium-cart .kc-cart-summary-card{
        position:static;
        order:2;
    }
}

@media(max-width:760px){
    body.kc-premium-cart .kc-cart-shell{
        width:min(100% - 20px,1240px);
        padding:20px 0 38px;
    }

    body.kc-premium-cart .kc-cart-top{
        align-items:flex-start;
        margin-bottom:13px;
    }

    body.kc-premium-cart .kc-cart-top-tools{
        flex-wrap:wrap;
        justify-content:flex-end;
    }

    body.kc-premium-cart .kc-cart-quick{
        width:40px;
        padding:0;
        justify-content:center;
    }

    body.kc-premium-cart .kc-cart-quick span{
        display:none;
    }

    body.kc-premium-cart .kc-cart-mark{
        width:44px;
        height:44px;
        border-radius:14px;
    }

    body.kc-premium-cart .kc-cart-brand h1{
        font-size:20px;
    }

    body.kc-premium-cart .kc-cart-journey{
        overflow:hidden;
        gap:7px;
    }

    body.kc-premium-cart .kc-cart-journey>b{
        width:22px;
    }

    body.kc-premium-cart .kc-cart-step{
        font-size:8px;
    }

    body.kc-premium-cart .kc-cart-step i{
        width:18px;
        height:18px;
    }

    body.kc-premium-cart .kc-cart-card-head{
        padding:18px 16px;
    }

    body.kc-premium-cart .kc-cart-item{
        grid-template-columns:72px minmax(0,1fr) 38px;
        gap:11px;
        padding:15px 14px;
    }

    body.kc-premium-cart .kc-cart-pic{
        width:72px;
        height:72px;
        border-radius:15px;
    }

    body.kc-premium-cart .kc-cart-line-price{
        grid-column:2/3;
    }

    body.kc-premium-cart .kc-cart-line-price small{
        display:none;
    }

    body.kc-premium-cart .kc-cart-quantity{
        grid-column:2/3;
        width:122px;
    }

    body.kc-premium-cart .kc-cart-quantity .quantity{
        width:122px;
        height:39px;
        grid-template-columns:37px minmax(36px,1fr) 37px;
    }

    body.kc-premium-cart .kc-cart-quantity .quantity .btn{
        min-width:37px!important;
        height:37px!important;
    }

    body.kc-premium-cart .kc-cart-quantity .quantity input.qty,
    body.kc-premium-cart .kc-cart-quantity .quantity input[type=number],
    body.kc-premium-cart .kc-cart-quantity .quantity input[type=text]{
        height:37px!important;
        min-height:37px!important;
    }

    body.kc-premium-cart .kc-cart-remove{
        grid-column:3/4;
        grid-row:1/2;
    }

    body.kc-premium-cart .kc-cart-remove .remove{
        width:38px!important;
        height:38px!important;
    }

    body.kc-premium-cart .kc-cart-actions{
        align-items:stretch;
        flex-direction:column;
    }

    body.kc-premium-cart .kc-cart-action-set{
        display:grid;
        grid-template-columns:1fr 1fr;
    }

    body.kc-premium-cart .kc-cart-summary-head{
        padding:19px 16px 9px;
    }

    body.kc-premium-cart .kc-cart-summary-body{
        padding:4px 16px 18px;
    }

    body.kc-premium-cart .kc-cart-empty-card{
        padding:58px 16px;
    }
}

@media(max-width:430px){
    body.kc-premium-cart .kc-cart-brand{
        gap:9px;
    }

    body.kc-premium-cart .kc-cart-mark{
        display:none;
    }

    body.kc-premium-cart .kc-cart-brand h1{
        font-size:19px;
    }

    body.kc-premium-cart .kc-cart-badge{
        padding:7px 10px;
    }

    body.kc-premium-cart .kc-cart-journey{
        justify-content:space-between;
    }

    body.kc-premium-cart .kc-cart-journey>b{
        flex:1;
        min-width:10px;
    }

    body.kc-premium-cart .kc-cart-item{
        grid-template-columns:64px minmax(0,1fr) 36px;
        padding:13px 11px;
        gap:9px;
    }

    body.kc-premium-cart .kc-cart-pic{
        width:64px;
        height:64px;
    }

    body.kc-premium-cart .kc-cart-product-name{
        font-size:12px;
    }

    body.kc-premium-cart .kc-cart-action-set{
        grid-template-columns:1fr;
    }

    body.kc-premium-cart .kc-cart-coupon-box{
        grid-template-columns:1fr 82px;
    }
}


/* =========================================================
   v1.21 - forced cart page template compatibility
   ========================================================= */
body.kc-premium-cart #kc-premium-cart-page {
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
    background: transparent !important;
}

body.kc-premium-cart #kc-premium-cart-page > .woocommerce-notices-wrapper {
    width: min(1240px, calc(100% - 34px)) !important;
    margin: 16px auto 0 !important;
}


/* =========================================================
   v1.22 - WoodMart Layout Builder portal mount
   The site's Cart page is rendered by WoodMart Layout Builder (Elementor).
   We keep the normal header/theme lifecycle, hide the original builder
   content, and mount the premium cart in the exact same page position.
   ========================================================= */

body.kc-premium-cart .wd-page-content.main-page-wrapper {
    visibility: hidden !important;
    height: 0 !important;
    min-height: 0 !important;
    max-height: 0 !important;
    overflow: hidden !important;
    padding: 0 !important;
    margin: 0 !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

body.kc-premium-cart #kc-cart-portal-host {
    display: block;
    width: 100%;
    min-height: 1px;
    background: var(--kcc-bg);
}

body.kc-premium-cart.kc-cart-portal-mounted #kc-cart-portal-host {
    visibility: visible !important;
    opacity: 1 !important;
}

body.kc-premium-cart #kc-cart-portal-host .kc-cart-shell {
    animation: kccPortalIn .24s ease both;
}

@keyframes kccPortalIn {
    from { opacity: 0; transform: translateY(4px); }
    to   { opacity: 1; transform: none; }
}
