.product-offcanvas {
   
    height: 90vh;
    border-top-left-radius: 20px;
    border-top-right-radius: 20px;
}

/* کل بدنه اسکرول درست */
.product-offcanvas .offcanvas-body {
    overflow-y: auto;
    padding-bottom: 120px;
}

/* ---------------- Offcanvas ---------------- */

.product-offcanvas{
    height:95vh !important;
    border-radius:20px 20px 0 0;
}

.product-offcanvas .offcanvas-body{
    overflow-y:auto;
    padding-bottom:120px;
}


/* ---------------- Container List ---------------- */

.container-list{

    display:grid;

    grid-template-columns:repeat(5,1fr);

    gap:12px;

    margin-top:10px;
    overflow: visible;
}


/* ---------------- Card ---------------- */

.container-card{

    border:1px solid #e5e5e5;

    border-radius:14px;

    padding:12px;

    background:#fff;

    cursor:pointer;

    text-align:center;

    transition:.25s;

}

.container-card:hover{

    transform:translateY(-2px);

    border-color:#198754;

    box-shadow:0 5px 14px rgba(0,0,0,.08);

}

.container-card.active{

    border:2px solid #198754;

    background:#eef9f2;

}


/* ---------------- Text ---------------- */

.container-label{

    font-weight:700;

    margin-bottom:5px;

}

.container-meta{

    font-size:12px;

    color:#777;

}

.container-price{

    margin-top:8px;

    color:#198754;

    font-weight:700;

}


/* ---------------- Qty ---------------- */

.qty-control{

    display:flex;

    justify-content:center;

    align-items:center;

    gap:8px;

    margin-top:8px;

}

.qty-control button{

    width:28px;

    height:28px;

    border:none;

    border-radius:8px;

    background:#198754;

    color:#fff;

    font-size:18px;

}

.qty-value{

    min-width:22px;

    font-weight:bold;

    text-align:center;

}


/* ---------------- Mobile ---------------- */

@media (max-width:768px){

    .container-list{

        display:flex !important;

        flex-wrap:nowrap;

        overflow-x:auto;

        overflow-y:hidden;

        gap:12px;

        padding-bottom:8px;

        -webkit-overflow-scrolling:touch;

        scroll-snap-type:x mandatory;
      

    }

    .container-list::-webkit-scrollbar{

        display:none;

    }

    .container-list{

        scrollbar-width:none;

    }

    .container-card{

        flex:0 0 170px;

        min-width:170px;

        scroll-snap-align:start;

    }

}


/* خلاصه انتخاب */
.summary-card {
    background: #f8f9fa;
    padding: 12px;
    border-radius: 12px;
    margin-top: 15px;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 6px;
}


.offcanvas-bottom.product-offcanvas {
    height: 95vh !important;
    max-height: 95vh !important;
    top: auto !important;
    border-top-left-radius: 20px;
    border-top-right-radius: 20px;
}

/* body داخل offcanvas */
.offcanvas-bottom.product-offcanvas .offcanvas-body {
    max-height: calc(95vh - 140px) !important;
    overflow-y: auto !important;
}



.qty-control {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-top: 8px;
}

.qty-control button {
    width: 28px;
    height: 28px;
    border: none;
    border-radius: 6px;
    background: #198754;
    color: white;
    font-size: 18px;
    cursor: pointer;
}

.qty-value {
    min-width: 20px;
    text-align: center;
    font-weight: bold;
}

/*==========================
    CART OFFCANVAS
==========================*/

.cart-offcanvas{
    height:90vh !important;
    display:flex;
    flex-direction:column;
    border-radius:20px 20px 0 0;

}

.cart-offcanvas .offcanvas-header{
    flex-shrink:0;
    padding-top:20px;
        display:flex;
    justify-content:space-between;
    align-items:center;
}
.offcanvas-header h5{
    padding-top:25px !important;
}

.cart-offcanvas .offcanvas-body{
    height:100%;
        flex:1;
    display:flex;
    flex-direction:column;

    overflow:hidden !important;   /* Bootstrap را Override می‌کند */
    min-height:0;

}

.cart-grid{
     display:grid;
    grid-template-columns:repeat(4,1fr);
    gap:10px;
    overflow-y:auto;
    max-height:55vh; 
    min-height:0;
    overflow-y:auto;
    padding-right:4px;
}

.cart-grid .card{

    border-radius:14px;

    padding:10px;

    box-shadow:0 2px 8px rgba(0,0,0,.06);

    border:none;

    height:auto;
}

.cart-footer{
    flex-shrink:0;
     margin-top:10px;
    padding-top:16px;
    background:#fff;
}
.cart-item{
    border:none;
    border-radius:12px;
    margin-bottom:8px;
}

.cart-item .card-body{
    padding:12px;
}

.cart-item .fw-bold{
    font-size:15px;
}

.cart-item small{
    font-size:13px;
}
/* دسکتاپ */

@media(min-width:992px){

    .cart-grid{

        grid-template-columns:repeat(3,1fr);

    }

}

/* تبلت */

@media(min-width:768px) and (max-width:991px){

    .cart-grid{

        grid-template-columns:repeat(2,1fr);

    }

}

/* موبایل */

@media (max-width:768px){

    .cart-grid{

        max-height:55vh;

        overflow-y:auto;

        -webkit-overflow-scrolling:touch;
        grid-template-columns:1fr;
    }

}
.cart-grid .card{

    height:100%;

}

.toast{
    position:fixed;
    top:25px;
    left:25px;

    background:#2E7D32;
    color:#fff;

    padding:14px 22px;

    border-radius:12px;

    display:flex;
    align-items:center;
    gap:10px;

    box-shadow:0 10px 30px rgba(0,0,0,.2);

    transform:translateX(-150%);
    transition:.4s;

    z-index:99999;
}

.toast.show{
    transform:translateX(0);
}
 /* ===========================
   Product Modal Header
=========================== */

.product-modal-header{

    padding:20px 0 18px;

    text-align:right;

    border-bottom:1px solid #ececec;

    margin-bottom:20px;
}


/* عنوان */

.product-title{

    font-size:2rem;

    font-weight:800;

    color:#184d2f;

    margin:0;
}


/* زیرعنوان */

.product-subtitle{

    margin-top:8px;

    margin-bottom:18px;

    color:#777;

    font-size:1rem;

    font-weight:500;
}


/* باکس اطلاعیه */

.volume-note{

    display:flex;

    align-items:flex-start;

    gap:14px;

    background:#fff8e8;

    border:1px solid #ffe2a3;

    border-radius:16px;

    padding:14px 18px;

    box-shadow:0 4px 10px rgba(0,0,0,.03);
}


/* آیکون */

.volume-note-icon{

    width:38px;

    height:38px;

    flex-shrink:0;

    display:flex;

    align-items:center;

    justify-content:center;

    border-radius:50%;

    background:#ffe8a6;

    color:#d48b00;

    font-size:18px;
}


/* متن */

.volume-note-text{

    color:#6c5b2f;

    line-height:2;

    font-size:.92rem;
}

.volume-note-text strong{

    color:#184d2f;
}


/* ===========================
      Mobile
=========================== */

@media(max-width:768px){

.product-title{

    font-size:1.45rem;
}

.product-subtitle{

    font-size:.92rem;
}

.volume-note{

    padding:12px 14px;

    gap:10px;
}

.volume-note-icon{

    width:32px;

    height:32px;

    font-size:15px;
}

.volume-note-text{

    font-size:.82rem;

    line-height:1.9;
}

}