/* ==========================================================================
   MINI CART
   ========================================================================== */

.ws-mini-cart {
    position: fixed;
    inset: 0;

    z-index: 99999;

    visibility: hidden;
    pointer-events: none;
}


/* --------------------------------------------------------------------------
   Open State
   -------------------------------------------------------------------------- */

.ws-mini-cart.is-open {
    visibility: visible;
    pointer-events: auto;
}


/* --------------------------------------------------------------------------
   Overlay
   -------------------------------------------------------------------------- */

.ws-mini-cart__overlay {
    position: absolute;
    inset: 0;

    background: rgba(0, 0, 0, 0.45);

    opacity: 0;

    transition: opacity 0.25s ease;
}

.ws-mini-cart.is-open .ws-mini-cart__overlay {
    opacity: 1;
}


/* --------------------------------------------------------------------------
   Drawer
   -------------------------------------------------------------------------- */

.ws-mini-cart__drawer {
    position: absolute;

    top: 0;
    right: 0;

    width: min(420px, 100%);

    height: 100%;

    display: flex;
    flex-direction: column;

    background: #ffffff;

    box-shadow: -8px 0 30px rgba(0, 0, 0, 0.15);

    transform: translateX(100%);

    transition: transform 0.3s ease;
}

.ws-mini-cart.is-open .ws-mini-cart__drawer {
    transform: translateX(0);
}


/* --------------------------------------------------------------------------
   Header
   -------------------------------------------------------------------------- */

.ws-mini-cart__header {
    flex: 0 0 auto;

    display: flex;
    align-items: center;
    justify-content: space-between;

    padding: 20px 24px;

    border-bottom: 1px solid #e9e9e9;
}

.ws-mini-cart__header h2 {
    margin: 0;

    color: #4f237c;

    font-size: 22px;
    font-weight: 600;

    line-height: 1.2;
}

.ws-mini-cart__close {
    width: 36px;
    height: 36px;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 0;

    border: 0;

    background: transparent;

    color: #333;

    font-size: 28px;
    line-height: 1;

    cursor: pointer;

    transition: color 0.2s ease;
}

.ws-mini-cart__close:hover {
    color: #6d2c91;
}


/* --------------------------------------------------------------------------
   Content
   -------------------------------------------------------------------------- */

.ws-mini-cart__content {
    flex: 1 1 auto;

    overflow-y: auto;

    padding: 24px;
}


/* --------------------------------------------------------------------------
   WooCommerce Mini Cart
   -------------------------------------------------------------------------- */

.ws-mini-cart .woocommerce-mini-cart {
    margin: 0;
    padding: 0;

    list-style: none;
}

.ws-mini-cart .woocommerce-mini-cart-item {
    position: relative;

    display: grid;

    grid-template-columns: 72px minmax(0, 1fr);

    gap: 15px;

    margin: 0;

    padding: 0 0 18px;
}

.ws-mini-cart .woocommerce-mini-cart-item + .woocommerce-mini-cart-item {
    padding-top: 18px;

    border-top: 1px solid #eeeeee;
}


/* Product image */

.ws-mini-cart .woocommerce-mini-cart-item img {
    width: 72px !important;
    height: auto;

    object-fit: cover;

    border-radius: 3px;
}


/* Product name */

.ws-mini-cart .woocommerce-mini-cart-item a:not(.remove) {
    color: #333;

    text-decoration: none;

    font-size: 15px;

    line-height: 1.45;
}


/* Remove button */

/*.ws-mini-cart .woocommerce-mini-cart-item .remove {
    position: absolute;

    top: 0;
    right: 0;

    width: 22px;
    height: 22px;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 0;

    color: #777;

    font-size: 20px;

    line-height: 1;

    text-decoration: none;
}

.ws-mini-cart .woocommerce-mini-cart-item .remove:hover {
    color: #6d2c91;
}*/

.ws-mini-cart .woocommerce-mini-cart-item {
    position: relative;
    padding-right: 32px;
}

.ws-mini-cart .woocommerce-mini-cart-item .remove {
    position: absolute;

    top: 2px;
    right: 0;

    z-index: 5;

    width: 24px;
    height: 24px;

    display: flex;
    align-items: center;
    justify-content: center;

    margin: 0;
    padding: 0;

    border: 0;

    background: #ffffff;

    color: #777;

    font-size: 18px;
    font-weight: 400;
    line-height: 1;

    text-decoration: none;

    border-radius: 50%;

    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12);

    cursor: pointer;
}

.ws-mini-cart .woocommerce-mini-cart-item .remove:hover {
    background: #f4f0f4;
    color: #6d2c91;
}


/* Quantity / price */

.ws-mini-cart .quantity {
    display: block;

    margin-top: 6px;

    color: #666;

    font-size: 14px;
}


/* --------------------------------------------------------------------------
   Subtotal
   -------------------------------------------------------------------------- */

.ws-mini-cart .woocommerce-mini-cart__total {
    display: flex;

    align-items: center;
    justify-content: space-between;

    margin: 24px 0 0;

    padding-top: 20px;

    border-top: 1px solid #dddddd;

    color: #333;
}

.ws-mini-cart .woocommerce-mini-cart__total strong {
    font-weight: 600;
}


/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */

.ws-mini-cart .woocommerce-mini-cart__buttons {
    display: grid;

    gap: 10px;

    margin-top: 20px;
}

.ws-mini-cart .woocommerce-mini-cart__buttons a {
    display: block;

    width: 100%;

    padding: 13px 20px;

    border-radius: 3px;

    text-align: center;

    text-decoration: none;

    font-size: 15px;

    line-height: 1.3;

    transition:
        background-color 0.2s ease,
        color 0.2s ease;
}


/* View cart */

.ws-mini-cart .woocommerce-mini-cart__buttons .wc-forward:not(.checkout) {
    background: #f4f0f4;

    color: #6d2c91;
}

.ws-mini-cart .woocommerce-mini-cart__buttons .wc-forward:not(.checkout):hover {
    background: #e9ddea;
}


/* Checkout */

.ws-mini-cart .woocommerce-mini-cart__buttons .checkout {
    background: #6d2c91;

    color: #ffffff;
}

.ws-mini-cart .woocommerce-mini-cart__buttons .checkout:hover {
    background: #5a2378;

    color: #ffffff;
}


/* --------------------------------------------------------------------------
   Empty Cart
   -------------------------------------------------------------------------- */

.ws-mini-cart .woocommerce-mini-cart__empty-message {
    margin: 40px 0;

    color: #666;

    text-align: center;

    font-size: 16px;
}


/* --------------------------------------------------------------------------
   Mobile
   -------------------------------------------------------------------------- */

@media (max-width: 767px) {

    .ws-mini-cart__drawer {
        width: 100%;
    }

    .ws-mini-cart__header {
        padding: 18px 20px;
    }

    .ws-mini-cart__content {
        padding: 20px;
    }

}