/* =========================================================
   PALAM BAKERS
   CART DRAWER
   SAME cart.php
   NO MINI CART
========================================================= */


/* =========================================================
   RESET
========================================================= */

#cartDrawer,
#cartDrawer *,
.cart-drawer-inner,
.cart-drawer-inner *,
.cart-page-wrap,
.cart-page-wrap * {
    box-sizing: border-box;
}


/* =========================================================
   NORMAL CART PAGE
========================================================= */

.cart-page-wrap {
    width: 100%;
}


/* =========================================================
   MAIN CART DRAWER
========================================================= */

#cartDrawer {

    position: fixed;

    top: 0;
    right: 0;

    width: 360px;
    max-width: 100vw;

    height: 100vh;

    background: #ffffff;

    z-index: 999999;

    overflow: hidden;

    transform: translateX(100%);

    opacity: 0;

    visibility: hidden;

    pointer-events: none;

    transition:
        transform 0.35s ease,
        opacity 0.25s ease,
        visibility 0.35s ease;

    box-shadow:
        -8px 0 30px rgba(0, 0, 0, 0.15);

}


/* =========================================================
   OPEN DRAWER
========================================================= */

#cartDrawer.cart-open {

    transform: translateX(0);

    opacity: 1;

    visibility: visible;

    pointer-events: auto;

}


/* =========================================================
   IMPORTANT
   WEBSITE MUST NOT MOVE
========================================================= */

body.cart-open {

    overflow-x: hidden;

}


/*
   DO NOT SHIFT WEBSITE.
   NO transform on body children.
*/

body.cart-open > *:not(#cartDrawer) {
    transform: none !important;
}


/* =========================================================
   CART INNER
========================================================= */

#cartDrawer .cart-drawer-inner {

    width: 100%;

    height: 100%;

    display: flex;

    flex-direction: column;

    background: #ffffff;

}


/* =========================================================
   CART HEADER
========================================================= */

#cartDrawer .cart-drawer-header {

    flex: 0 0 auto;

    min-height: 76px;

    width: 100%;

    display: flex;

    align-items: center;

    padding: 0 18px;

    background: #ffffff;

    border-bottom: 1px solid #eeeeee;

}


/* =========================================================
   CLOSE BUTTON
========================================================= */

#cartDrawer .cart-drawer-close {

    width: 38px;

    height: 38px;

    flex: 0 0 38px;

    display: flex;

    align-items: center;

    justify-content: center;

    padding: 0;

    border: 1px solid #dddddd;

    border-radius: 50%;

    background: #ffffff;

    color: #222222;

    font-size: 20px;

    line-height: 1;

    cursor: pointer;

    pointer-events: auto;

}


#cartDrawer .cart-drawer-close:hover {

    background: #f5f5f5;

}


/* =========================================================
   CART TITLE
========================================================= */

#cartDrawer .cart-drawer-title {

    flex: 1;

    min-width: 0;

    padding-left: 60px;

}


#cartDrawer .cart-drawer-title h2 {

    margin: 0;

    color: #111111;

    font-size: 18px;

    line-height: 1.2;

    font-weight: 700;

}


#cartDrawer .cart-drawer-title span {

    display: block;

    margin-top: 4px;

    color: #8a8a8a;

    font-size: 11px;

    line-height: 1.2;

}


/* =========================================================
   ACCOUNT ICON
========================================================= */

#cartDrawer .cart-drawer-account {

    width: 38px;

    height: 38px;

    flex: 0 0 38px;

    display: flex;

    align-items: center;

    justify-content: center;

    color: #1a2a1a;

    font-size: 19px;

    pointer-events: auto;

}


/* =========================================================
   CART BODY
========================================================= */

#cartDrawer .cart-drawer-body {

    flex: 1 1 auto;

    min-height: 0;

    width: 100%;

    overflow-y: auto;

    overflow-x: hidden;

    padding: 0 18px 25px;

    -webkit-overflow-scrolling: touch;

}



/* =========================================================
   SCROLLBAR
========================================================= */

#cartDrawer .cart-drawer-body::-webkit-scrollbar {

    width: 6px;

}


#cartDrawer .cart-drawer-body::-webkit-scrollbar-track {

    background: #f5f5f5;

}


#cartDrawer .cart-drawer-body::-webkit-scrollbar-thumb {

    background: #c8c8c8;

    border-radius: 10px;

}


/* =========================================================
   CART LEFT
========================================================= */

#cartDrawer .cart-left {

    width: 100%;

    margin: 0;

    padding: 0;

}


/* =========================================================
   HIDE NORMAL CART HEADING
========================================================= */

#cartDrawer .cart-heading {

    display: none;

}


/* =========================================================
   PRODUCTS
========================================================= */

#cartDrawer .cart-products {

    width: 100%;

    margin: 0;

    padding: 0;

}


/* =========================================================
   PRODUCT ROW
========================================================= */

#cartDrawer .cart-product {

    width: 100%;

    display: flex;

    align-items: flex-start;

    gap: 13px;

    padding: 16px 0;

    border-bottom: 1px solid #eeeeee;

}


/* =========================================================
   PRODUCT IMAGE
========================================================= */

#cartDrawer .cart-product-image {

    width: 72px;

    height: 72px;

    flex: 0 0 72px;

    overflow: hidden;

    background: #f6f3ed;

}


#cartDrawer .cart-product-image img {

    display: block;

    width: 100%;

    height: 100%;

    object-fit: cover;

}


/* =========================================================
   PRODUCT CONTENT
========================================================= */

#cartDrawer .cart-product-content {

    flex: 1 1 auto;

    min-width: 0;

}


/* =========================================================
   PRODUCT NAME
========================================================= */

#cartDrawer .cart-product-name {

    margin: 0 0 5px;

    padding: 0;

}


#cartDrawer .cart-product-name a {

    display: block;

    color: #111111;

    text-decoration: none;

    font-size: 14px;

    line-height: 1.25;

    font-weight: 600;

}


#cartDrawer .cart-product-name a:hover {

    text-decoration: none;

}


/* =========================================================
   PRICE
========================================================= */

#cartDrawer .cart-price-line {

    display: flex;

    align-items: center;

    flex-wrap: wrap;

    gap: 6px;

    margin: 0;

}


#cartDrawer .cart-main-price {

    color: #12351f;

    font-size: 13px;

    font-weight: 700;

}


#cartDrawer .cart-old-price {

    color: #999999;

    font-size: 11px;

    text-decoration: line-through;

}


#cartDrawer .cart-discount {

    color: #198754;

    font-size: 10px;

    font-weight: 700;

}


/* =========================================================
   ACTIONS
========================================================= */

#cartDrawer .cart-actions {

    display: flex;

    align-items: center;

    flex-wrap: nowrap;

    gap: 10px;

    margin-top: 9px;

}


/* =========================================================
   QUANTITY BOX
========================================================= */

#cartDrawer .cart-qty {

    display: flex;

    align-items: center;

    height: 32px;

    border: 1px solid #dddddd;

    border-radius: 4px;

    overflow: hidden;

    background: #ffffff;

}


/* =========================================================
   QUANTITY BUTTON
========================================================= */

#cartDrawer .cart-qty-btn {

    width: 32px;

    height: 32px;

    min-width: 32px;

    padding: 0;

    margin: 0;

    border: 0;

    outline: 0;

    background: #ffffff;

    color: #222222;

    font-size: 17px;

    line-height: 32px;

    text-align: center;

    cursor: pointer;

    pointer-events: auto;

    touch-action: manipulation;

    user-select: none;

}


#cartDrawer .cart-qty-btn:hover {

    background: #f3f3f3;

}


/* =========================================================
   QUANTITY NUMBER
========================================================= */

#cartDrawer .cart-qty-number {

    width: 34px;

    height: 32px;

    min-width: 34px;

    padding: 0;

    margin: 0;

    border: 0;

    border-left: 1px solid #eeeeee;

    border-right: 1px solid #eeeeee;

    outline: none;

    background: #ffffff;

    color: #111111;

    font-size: 12px;

    line-height: 32px;

    text-align: center;

    pointer-events: none;

}


/* =========================================================
   REMOVE
========================================================= */

#cartDrawer .cart-remove {

    padding: 0;

    margin: 0;

    border: 0;

    outline: 0;

    background: transparent;

    color: #666666;

    font-size: 10px;

    font-weight: 700;

    text-transform: uppercase;

    cursor: pointer;

    pointer-events: auto;

}


#cartDrawer .cart-remove:hover {

    color: #b23b2d;

}


/* =========================================================
   ITEM TOTAL
========================================================= */

#cartDrawer .cart-item-total {

    display: flex;

    align-items: center;

    justify-content: space-between;

    margin-top: 9px;

    font-size: 11px;

    color: #888888;

}


#cartDrawer .cart-item-total strong {

    color: #111111;

    font-size: 12px;

}


/* =========================================================
   BOTTOM ACTION
   HIDE CONTINUE SHOPPING
========================================================= */

#cartDrawer .cart-bottom-action {

    display: none;

}


/* =========================================================
   SUMMARY
========================================================= */

#cartDrawer .cart-summary {

    width: 100%;

    margin: 0;

    padding: 18px 0 0;

    background: #ffffff;

    border-top: 1px solid #dddddd;

}


/* =========================================================
   SUMMARY TITLE
========================================================= */

#cartDrawer .summary-title {

    display: none;

}


/* =========================================================
   SUMMARY CONTENT
========================================================= */

#cartDrawer .summary-content {

    width: 100%;

    margin: 0;

    padding: 0;

}


/* =========================================================
   SUMMARY ROW
========================================================= */

#cartDrawer .summary-row {

    display: flex;

    align-items: center;

    justify-content: space-between;

    margin: 0 0 12px;

    padding: 0;

    color: #333333;

    font-size: 13px;

}


#cartDrawer .summary-row strong {

    font-weight: 600;

}


/* =========================================================
   FREE DELIVERY
========================================================= */

#cartDrawer .summary-green {

    color: #16823b;

    font-weight: 700;

}


/* =========================================================
   TOTAL
========================================================= */

#cartDrawer .summary-total {

    display: flex;

    align-items: center;

    justify-content: space-between;

    margin-top: 14px;

    padding-top: 14px;

    border-top: 1px solid #dddddd;

    color: #111111;

    font-size: 15px;

    font-weight: 700;

}


#cartDrawer .summary-total strong {

    color: #12351f;

    font-size: 17px;

}


/* =========================================================
   SECURITY MESSAGE
========================================================= */

#cartDrawer .summary-saving {

    width: 100%;

    margin-top: 14px;

    padding: 11px 12px;

    background: #edf8f0;

    border-radius: 6px;

    color: #268044;

    font-size: 10px;

    line-height: 1.5;

}


/* =========================================================
   CHECKOUT
========================================================= */

#cartDrawer .checkout-btn {

    width: 100%;

    min-height: 48px;

    display: flex;

    align-items: center;

    justify-content: center;

    margin-top: 14px;

    padding: 14px;

    background: #12351f;

    color: #ffffff;

    text-decoration: none;

    border: 0;

    border-radius: 5px;

    font-size: 13px;

    font-weight: 700;

    text-transform: uppercase;

    letter-spacing: 0.2px;

    cursor: pointer;

}


#cartDrawer .checkout-btn:hover {

    background: #1b4a2b;

}


/* =========================================================
   SECURE CHECKOUT
========================================================= */

#cartDrawer .secure-checkout {

    display: flex;

    align-items: flex-start;

    gap: 8px;

    margin-top: 13px;

    padding-bottom: 10px;

    color: #777777;

    font-size: 10px;

    line-height: 1.4;

}


#cartDrawer .secure-checkout i {

    flex: 0 0 auto;

    margin-top: 2px;

    color: #12351f;

}


/* =========================================================
   EMPTY CART
========================================================= */

#cartDrawer .empty-cart {

    min-height: 400px;

    display: flex;

    flex-direction: column;

    align-items: center;

    justify-content: center;

    text-align: center;

    padding: 30px 20px;

}


#cartDrawer .empty-cart-icon {

    width: 70px;

    height: 70px;

    display: flex;

    align-items: center;

    justify-content: center;

    border-radius: 50%;

    background: #f4f2ec;

    color: #1a2a1a;

    font-size: 25px;

}


#cartDrawer .empty-cart h2 {

    margin: 18px 0 7px;

    color: #111111;

    font-size: 20px;

}


#cartDrawer .empty-cart p {

    margin: 0;

    color: #888888;

    font-size: 13px;

}


#cartDrawer .empty-shop-btn {

    display: inline-flex;

    align-items: center;

    justify-content: center;

    margin-top: 20px;

    padding: 12px 22px;

    background: #1a2a1a;

    color: #ffffff;

    text-decoration: none;

    border-radius: 4px;

    font-size: 12px;

    font-weight: 700;

}


/* =========================================================
   NORMAL CART PAGE
   When cart.php is opened directly
========================================================= */

body:not(.cart-open) #cartDrawer {

    pointer-events: none;

}


/* =========================================================
   DESKTOP
========================================================= */

@media (min-width: 993px) {

    #cartDrawer {

        width: 360px;

    }

}


/* =========================================================
   TABLET
========================================================= */

@media (max-width: 992px) {

    #cartDrawer {

        width: 100vw;

        max-width: 100vw;

    }


    #cartDrawer .cart-drawer-header {

        min-height: 64px;

        padding: 0 15px;

    }


    #cartDrawer .cart-drawer-body {

        padding-left: 15px;

        padding-right: 15px;

    }


    #cartDrawer .cart-product {

        gap: 11px;

    }


    #cartDrawer .cart-product-image {

        width: 64px;

        height: 64px;

        flex-basis: 64px;

    }

}


/* =========================================================
   SMALL MOBILE
========================================================= */

@media (max-width: 480px) {

    #cartDrawer .cart-product-image {

        width: 60px;

        height: 60px;

        flex-basis: 60px;

    }


    #cartDrawer .cart-product-name a {

        font-size: 13px;

    }


    #cartDrawer .cart-drawer-title h2 {

        font-size: 16px;

    }


    #cartDrawer .cart-actions {

        gap: 8px;

    }

}