/* =========================================================
   PlatterWala Website — Cart
   Step 6
========================================================= */

.pw-cart{
    width:100%;
    background:#fff;
    border:1px solid #e9e9e9;
    border-radius:14px;
    overflow:hidden;
    box-shadow:0 4px 18px rgba(0,0,0,.07);
    font-family:Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",Arial,sans-serif;
}

.pw-cart-head{
    min-height:58px;
    padding:12px 15px;
    border-bottom:1px solid #eeeeee;
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:10px;
}

.pw-cart-title{
    display:flex;
    align-items:center;
    gap:8px;
    min-width:0;
}

.pw-cart-title-icon{
    color:#ff6b00;
    font-size:21px;
}

.pw-cart-title strong{
    color:#171717;
    font-size:18px;
    font-weight:900;
}

.pw-cart-count{
    min-width:22px;
    height:22px;
    padding:0 6px;
    border-radius:20px;
    background:#ff6b00;
    color:#fff;
    display:grid;
    place-items:center;
    font-size:11px;
    font-weight:900;
}

.pw-cart-clear{
    padding:5px 0;
    border:0;
    background:transparent;
    color:#666;
    font-size:12px;
    cursor:pointer;
}

.pw-cart-items{
    max-height:350px;
    overflow-y:auto;
}

.pw-cart-empty{
    min-height:180px;
    padding:25px 15px;
    display:flex;
    flex-direction:column;
    align-items:center;
    justify-content:center;
    text-align:center;
    color:#777;
}

.pw-cart-empty-icon{
    margin-bottom:8px;
    font-size:34px;
}

.pw-cart-empty strong{
    color:#222;
    font-size:15px;
}

.pw-cart-empty span{
    margin-top:5px;
    font-size:12px;
}

.pw-cart-item{
    position:relative;
    display:grid;
    grid-template-columns:62px minmax(0,1fr);
    gap:10px;
    padding:11px 12px;
    border-bottom:1px solid #f0f0f0;
}

.pw-cart-item-image{
    width:62px;
    height:62px;
    border-radius:9px;
    overflow:hidden;
    background:#f3f3f3;
}

.pw-cart-item-image img{
    width:100%;
    height:100%;
    object-fit:cover;
    display:block;
}

.pw-cart-item-content{
    min-width:0;
    padding-right:20px;
}

.pw-cart-item-name{
    display:block;
    color:#222;
    font-size:13px;
    line-height:1.25;
    font-weight:750;
}

.pw-cart-item-price{
    margin-top:4px;
    color:#222;
    font-size:13px;
    font-weight:800;
}

.pw-cart-item-qty{
    margin-top:7px;
    width:max-content;
    height:30px;
    border:1px solid #ddd;
    border-radius:7px;
    overflow:hidden;
    display:flex;
    align-items:center;
}

.pw-cart-item-qty button{
    width:29px;
    height:100%;
    padding:0;
    border:0;
    background:#fff;
    color:#222;
    font-size:17px;
    cursor:pointer;
}

.pw-cart-item-qty span{
    width:30px;
    text-align:center;
    color:#222;
    font-size:12px;
    font-weight:800;
}

.pw-cart-item-remove{
    position:absolute;
    top:10px;
    right:10px;
    width:24px;
    height:24px;
    padding:0;
    border:0;
    background:transparent;
    color:#777;
    cursor:pointer;
    font-size:16px;
}

.pw-cart-coupon{
    margin:12px;
    height:39px;
    border:1px solid #e3e3e3;
    border-radius:8px;
    display:flex;
    align-items:center;
    overflow:hidden;
}

.pw-cart-coupon>span{
    padding-left:10px;
    font-size:15px;
}

.pw-cart-coupon input{
    flex:1;
    min-width:0;
    height:100%;
    padding:0 8px;
    border:0 !important;
    outline:0 !important;
    box-shadow:none !important;
    background:#fff !important;
    font-size:12px;
}

.pw-cart-coupon button{
    height:100%;
    padding:0 13px;
    border:0;
    background:#ff6b00;
    color:#fff;
    font-size:12px;
    font-weight:800;
    cursor:pointer;
}


.pw-cart-coupon-message{
    margin:-7px 12px 9px;
    padding:0 2px;
    color:#168548;
    font-size:11px;
    line-height:1.3;
}

.pw-cart-coupon-message.is-error{
    color:#d63638;
}

.pw-cart-summary{
    padding:0 14px 8px;
}

.pw-cart-row{
    min-height:25px;
    display:flex;
    justify-content:space-between;
    gap:15px;
    color:#666;
    font-size:12px;
}

.pw-cart-row b{
    color:#444;
    font-weight:600;
}

.pw-cart-grand{
    margin-top:7px;
    padding-top:10px;
    border-top:1px solid #ddd;
    display:flex;
    justify-content:space-between;
    gap:15px;
}

.pw-cart-grand span{
    color:#171717;
    font-size:18px;
    font-weight:900;
}

.pw-cart-grand strong{
    color:#171717;
    font-size:20px;
    font-weight:950;
}

.pw-cart-checkout{
    min-height:48px;
    margin:7px 12px 9px;
    padding:0 16px;
    border-radius:8px;
    background:#ff6b00;
    color:#fff !important;
    text-decoration:none !important;
    display:flex;
    align-items:center;
    justify-content:center;
    gap:12px;
    font-size:14px;
    font-weight:900;
}

.pw-cart-checkout:hover{
    background:#f15f00;
    color:#fff !important;
}

.pw-cart-checkout span{
    font-size:20px;
}

.pw-cart-secure{
    padding:0 10px 13px;
    text-align:center;
    color:#168548;
    font-size:11px;
}

/* Mobile mini cart is hidden on desktop */
.pw-mobile-cart{
    display:none;
}

/* Preview desktop:
   The cart is moved into <body> by JS, so the cart itself must carry
   the sticky/fixed placement. This keeps it visible on the right side
   exactly like the approved PlatterWala ordering layout.
*/

@media (min-width:1101px){

    .pw-cart{
        position:fixed;
        z-index:9990;
        top:390px;
        right:18px;
        width:305px;
        max-height:calc(100vh - 408px);
        overflow-y:auto;
    }

    .pw-products-section{
        max-width:calc(100% - 330px) !important;
        margin-left:0 !important;
        margin-right:330px !important;
    }
}

/* Tablet cart */
@media (min-width:768px) and (max-width:1100px){

    .pw-cart{
        position:fixed;
        z-index:10000;
        top:120px;
        right:12px;
        width:min(390px,88vw);
        max-height:calc(100vh - 132px);
        overflow-y:auto;
        box-shadow:0 8px 30px rgba(0,0,0,.18);
    }
}

/* Mobile */

@media (max-width:767px){

    .pw-cart{
        display:none;
    }

    #pw-cart-preview-slot{
        display:none !important;
    }

    .pw-mobile-cart{
        position:fixed;
        z-index:9998;
        left:8px;
        right:8px;
        bottom:8px;
        height:72px;
        padding:7px 7px 7px 9px;
        border-radius:13px;
        background:#111;
        box-shadow:0 7px 28px rgba(0,0,0,.25);
        display:flex;
        align-items:center;
        gap:8px;
        font-family:Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",Arial,sans-serif;
        overflow:hidden;
    }

    .pw-mobile-cart-products{
        flex:1 1 auto;
        min-width:0;
        height:58px;
        display:flex;
        align-items:center;
        gap:6px;
        overflow-x:auto;
        overflow-y:hidden;
        -webkit-overflow-scrolling:touch;
        scrollbar-width:none;
        overscroll-behavior-x:contain;
        padding:0 1px;
    }

    .pw-mobile-cart-products::-webkit-scrollbar{
        display:none;
    }

    .pw-mobile-cart-product{
        flex:0 0 52px;
        width:52px;
        height:58px;
        border-radius:9px;
        background:#222;
        border:1px solid rgba(255,255,255,.10);
        overflow:hidden;
        position:relative;
        display:flex;
        flex-direction:column;
        align-items:center;
        justify-content:flex-start;
    }

    .pw-mobile-cart-product-image{
        width:34px;
        height:34px;
        margin-top:3px;
        border-radius:7px;
        overflow:hidden;
        background:#333;
        flex:0 0 34px;
    }

    .pw-mobile-cart-product-image img{
        width:100%;
        height:100%;
        object-fit:cover;
        display:block;
    }

    .pw-mobile-cart-product-name{
        width:100%;
        padding:2px 3px 0;
        color:#fff;
        font-size:8px;
        line-height:1.05;
        font-weight:700;
        text-align:center;
        white-space:nowrap;
        overflow:hidden;
        text-overflow:ellipsis;
    }

    .pw-mobile-cart-product-qty{
        position:absolute;
        top:2px;
        right:2px;
        min-width:15px;
        height:15px;
        padding:0 3px;
        border-radius:9px;
        background:#ff6b00;
        color:#fff;
        display:flex;
        align-items:center;
        justify-content:center;
        font-size:8px;
        font-weight:900;
        line-height:1;
    }

    .pw-mobile-cart-empty{
        height:58px;
        padding:0 5px;
        display:flex;
        align-items:center;
        gap:5px;
        color:#aaa;
        font-size:10px;
        white-space:nowrap;
    }

    .pw-mobile-cart-empty span:first-child{
        font-size:18px;
    }

    .pw-mobile-cart-action{
        flex:0 0 auto;
        min-width:106px;
        height:58px;
        display:flex;
        flex-direction:column;
        align-items:stretch;
        justify-content:center;
        gap:4px;
    }

    .pw-mobile-cart-summary{
        display:flex;
        align-items:center;
        justify-content:space-between;
        gap:6px;
        padding:0 2px;
        line-height:1;
    }

    .pw-mobile-cart-summary strong{
        color:#fff;
        font-size:10px;
        font-weight:800;
        white-space:nowrap;
    }

    .pw-mobile-cart-summary span{
        color:#ff6b00;
        font-size:12px;
        font-weight:900;
        white-space:nowrap;
    }

    .pw-mobile-cart-button{
        width:100%;
        min-height:32px;
        padding:0 8px;
        border-radius:8px;
        background:#ff6b00;
        color:#fff !important;
        text-decoration:none !important;
        display:flex;
        align-items:center;
        justify-content:center;
        gap:5px;
        font-size:11px;
        font-weight:900;
        white-space:nowrap;
    }

    .pw-mobile-cart-button span{
        font-size:15px;
        line-height:1;
    }

    .pw-products-section{
        padding-bottom:92px !important;
    }
}


/* Mobile cart drawer opened by the mini-cart View Cart button */
.pw-cart-mobile-close{
    display:none;
}

@media (max-width:767px){

    body.pw-mobile-cart-lock{
        overflow:hidden !important;
    }

    .pw-cart.pw-mobile-cart-open{
        display:flex !important;
        position:fixed !important;
        z-index:10020 !important;
        left:10px !important;
        right:10px !important;
        bottom:10px !important;
        top:auto !important;
        width:auto !important;
        max-height:calc(100vh - 20px) !important;
        flex-direction:column !important;
        overflow:hidden !important;
        border-radius:16px !important;
        box-shadow:0 10px 40px rgba(0,0,0,.35) !important;
    }

    .pw-cart.pw-mobile-cart-open .pw-cart-head{
        flex:0 0 auto;
        position:relative;
        padding-right:42px;
    }

    .pw-cart.pw-mobile-cart-open .pw-cart-mobile-close{
        display:flex;
        position:absolute;
        right:8px;
        top:8px;
        width:30px;
        height:30px;
        border:0;
        border-radius:50%;
        background:#f3f3f3;
        color:#111;
        align-items:center;
        justify-content:center;
        font-size:22px;
        line-height:1;
        cursor:pointer;
    }

    .pw-cart.pw-mobile-cart-open .pw-cart-items{
        flex:1 1 auto;
        min-height:0;
        max-height:42vh;
        overflow-y:auto;
    }

    .pw-cart.pw-mobile-cart-open .pw-cart-coupon,
    .pw-cart.pw-mobile-cart-open .pw-cart-summary,
    .pw-cart.pw-mobile-cart-open .pw-cart-checkout,
    .pw-cart.pw-mobile-cart-open .pw-cart-secure{
        flex:0 0 auto;
    }

    .pw-cart.pw-mobile-cart-open .pw-cart-checkout{
        margin-bottom:4px;
    }
}
