/* custom-cart-message styles */
.custom-cart-message {
    padding: 15px 20px;
    margin-bottom: 20px;
    border-radius: 4px;
    font-weight: 500;
    animation: slideDown 0.3s ease;
}
.custom-cart-message.success {
    background-color: #4CAF50;
    color: white;
    border-left: 4px solid #388E3C;
}
.custom-cart-message.error {
    background-color: #f44336;
    color: white;
    border-left: 4px solid #d32f2f;
}
/* slide down animation for messages */
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
/* loading state for add-to-cart button */
button.loading {
    position: relative;
    opacity: 0.7;
}
button.loading::after {
    content: "";
    position: absolute;
    width: 16px;
    height: 16px;
    top: 50%;
    right: 10px;
    margin-top: -8px;
    border: 2px solid rgba(255,255,255,.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}
/* spinning animation for loader */
@keyframes spin {
    to { transform: rotate(360deg); }
}
/* popup container */
#custom-cart-popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    z-index: 9999;
    max-width: 600px;
    width: 100%;
    background: #fff;
    border: 1px solid #dedee5;
    box-shadow: 0 0 15px rgba(0,0,0,0.2);
    max-height: 85vh;
    min-height: 85vh;
}
#custom-cart-popup .popup-container{
    flex-grow: 1;
    overflow-y: scroll;
}
#custom-cart-popup .popup-container::-webkit-scrollbar{
    display: none;
}

#custom-cart-popup .popup-product-info {
    padding: 15px;
}
#custom-cart-popup .popup-product-info .main-header-popup {
    font-size: 16px;
    line-height: normal;
    color: #5a5a5a;
    font-family: "Poppins";
    margin-bottom: 10px;
}
#custom-cart-popup .popup-product-info .product-info {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
}
#custom-cart-popup .popup-product-info .product-info .popup-product-image {
    width: 120px;
    border: 1px solid #dedee5;
    padding: 6px;
}
#custom-cart-popup .popup-product-info .product-info .popup-product-details {
    width: calc(100% - 120px);
    padding-left: 20px;
}
#custom-cart-popup .popup-product-info .product-info .popup-product-title, 
#custom-cart-popup .popup-product-info .product-info .popup-product-variation, 
#custom-cart-popup .popup-product-info .product-info .popup-product-price {
    font-size: 16px;
    line-height: 22px;
    color: #5a5a5a;
    font-family: "Poppins";
    margin-bottom: 5px;
}
#custom-cart-popup .popup-product-info .product-info .popup-product-price {
    margin: 0;
}
#custom-cart-popup .popup-product-info .product-info .popup-product-variation {
    color: #999;
}
#custom-cart-popup .popup-buttons {
    padding: 15px;
    border-top: 1px solid #ddd;
    border-bottom: 1px solid #ddd;
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}
#custom-cart-popup .popup-buttons .popup-view-cart, #custom-cart-popup .popup-buttons .popup-continue-shopping {
    max-width: 60%;
    width: 100%;
    margin: auto;
}
/* close button */
#custom-cart-popup #popup-close {
    position: absolute;
    top: 5px;
    right: 10px;
    background: none;
    border: none;
    font-size: 30px;
    color: black;
    padding: 0;
    box-shadow: none;
    cursor: pointer;
    z-index: 9;
    display: flex;
    line-height: 30px;
    font-family: "Poppins", sans-serif;
    font-weight: normal;
}

/* view basket button */
#custom-cart-popup .popup-buttons .popup-view-cart {
    text-align: center;
    background: #0099a9;
    color: #fff;
    font-family: "Poppins", Sans-serif;
    font-size: 16px;
    font-weight: 600;
    line-height: 20px;
    letter-spacing: 0.02rem;
    border: 1px solid #0CAAB8;
    border-radius: 8px;
    padding: 14px 20px;
}
#custom-cart-popup .popup-buttons .popup-view-cart:hover {
    background: transparent;
    color: #000;
}

#custom-cart-popup .popup-buttons .popup-continue-shopping {
    text-align: center;
    background: transparent;
    color: #000;
    font-family: "Poppins", Sans-serif;
    font-size: 16px;
    font-weight: 600;
    line-height: 20px;
    letter-spacing: 0.02rem;
    border: 1px solid #0CAAB8;
    border-radius: 8px;
    padding: 14px 20px;
    transition: all .2s linear;
}
#custom-cart-popup .popup-buttons .popup-continue-shopping:hover {
    background: #0CAAB8;
    color: #fff;
}
#custom-cart-popup .catp-upsell-wrapper {
    padding: 15px 50px;
    position: relative;
}
#custom-cart-popup .catp-upsell-wrapper .catp-upsell-heading {
    font-family: "Poppins", Sans-serif;
    font-size: 19px;
    font-weight: 600;
    line-height: 26px;
    color: #2D2D2D;
    margin-bottom: 10px;
    margin-left: -35px;
}
#custom-cart-popup .catp-upsell-wrapper .catp-upsell-slider {
    padding: 0;
    position: static;
}
#custom-cart-popup .catp-upsell-wrapper .catp-upsell-slider .catp-upsell-item a {
    border: 1px solid #dedee5;
    display: inline-block;
    padding: 10px;
    border-radius: 16px;
}
#custom-cart-popup .catp-upsell-wrapper .catp-upsell-slider .catp-upsell-item .catp-upsell-title {
    font-size: 16px;
    line-height: 24px;
    color: #2d2d2d;
    font-weight: 500;
    font-family: "Poppins";
    margin: 10px 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
#custom-cart-popup .catp-upsell-wrapper .catp-upsell-slider .catp-upsell-item .catp-upsell-price {
    font-size: 18px;
    line-height: 26px;
    color: #dd3239;
    font-weight: 600;
    font-family: "Poppins";
    margin-bottom: 0;
}
#custom-cart-popup .catp-upsell-wrapper .catp-upsell-slider .swiper-button-prev, 
#custom-cart-popup .catp-upsell-wrapper .catp-upsell-slider .swiper-button-next {
    background: #fff;
    border: 1px solid #dedee5;
    padding: 0;
    display: flex;
    position: absolute;
    top: 60%;
    transform: translateY(-50%);
    width: 35px;
    height: 35px;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    border-radius: 50%;
}

#custom-cart-popup .catp-upsell-wrapper .catp-upsell-slider .swiper-button-prev::after, 
#custom-cart-popup .catp-upsell-wrapper .catp-upsell-slider .swiper-button-next::after {
    font-size: 15px;
    color: #000;
}
/* overlay behind popup */
#popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(128, 128, 128, .5);
    z-index: 9998;
}


.custom-cart-message {
    padding: 15px 20px;
    margin-bottom: 20px;
    border-radius: 4px;
    font-weight: 500;
    animation: slideDown 0.3s ease;
}
.custom-cart-message.success {
    background-color: #4CAF50;
    color: white;
    border-left: 4px solid #388E3C;
}
.custom-cart-message.error {
    background-color: #f44336;
    color: white;
    border-left: 4px solid #d32f2f;
}
    @keyframes slideDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}
    button.loading {
    position: relative;
    opacity: 0.7;
}
button.loading::after {
    content: "";
    position: absolute;
    width: 16px;
    height: 16px;
    top: 50%;
    right: 10px;
    margin-top: -8px;
    border: 2px solid rgba(255,255,255,.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

@media only screen and (max-width: 991px)  {
    #custom-cart-popup{
         max-height: unset;
         min-height: unset;
    }
}