/**
 * Styles for the Custom Mini Cart and Cart Toggle Button
 */


.elementor-menu-cart__wrapper {
    display: none;
}

/* כפתור העגלה */
.cart-toggle-button-wrapper {
    display: inline-block;
    position: relative;
}

.cart-toggle-button {
    background: none;
    border: none;
    cursor: pointer;
    position: relative;
    padding: 0;
    display: flex;
    align-items: center;
    transition: transform 0.2s ease;
}

.cart-toggle-button:hover {
    transform: scale(1.05);
}

.cart-toggle-button:active {
    transform: scale(0.95);
}

.cart-total-badge {
    margin-left: -7px;
    z-index: 1;
    background-color: #DF1A81;
    color: white;
    border-radius: 20px;
    padding: 2px 10px;
    font-size: 14px;
}

.mini-cart-empty {
    font-size: 14px;
    text-decoration: underline;
    cursor: pointer;
}

/* Mini Cart */
.custom-mini-cart-wrapper {
    width: 100%;
    border-radius: 4px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    font-family: 'Noto Sans Hebrew';
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    height: 100vh !important;
    z-index: 99999 !important;
    transform: translateX(-100%) !important;
    transition: transform 0.3s ease !important;
    overflow-y: auto !important;
    margin: 0 !important;
    background: #fcfaf4;
    width: 495px;
    max-width: 100%;
    height: 100vh;
}

.custom-mini-cart-wrapper.open {
    transform: translateX(0) !important;
}

.custom-mini-cart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid #eee;
}

.custom-mini-cart-header h4 {
    margin: 0;
    font-size: 18px;
}

button#cart-toggle-button:hover,
button#cart-toggle-button:focus {
    background: unset;
}

.mini-cart-close:after,
.mini-cart-close:before {
    content: "";
    position: absolute;
    height: 3px;
    width: 100%;
    top: 50%;
    left: 0;
    margin-top: -1px;
    background: #69727d;
    border-radius: 1px;
    transition: .3s
}

.mini-cart-close:hover:after,
.mini-cart-close:hover:before {
    background: #69727d;
}

.mini-cart-close:before {
    transform: rotate(45deg)
}

.mini-cart-close:after {
    transform: rotate(-45deg)
}

.mini-cart-close {
    left: 10px;
    top: 20px;
    position: absolute;
    font-family: eicons;
    font-size: 20px;
    line-height: 1;
    transition: .3s;
    width: 30px;
    height: 30px;
    cursor: pointer;
}

.mini-cart-close:hover:after,
.mini-cart-close:hover:before {
    background: #69727d
}




.custom-mini-cart-content {
    padding: 15px;
}

.custom-mini-cart-empty {
    text-align: center;
    padding: 20px 0;
}

.custom-mini-cart-item {
    display: flex;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
    position: relative;
}

.mini-cart-item-image {
    width: 60px;
    margin-left: 10px;
}

.mini-cart-item-image img {
    max-width: 100%;
    height: auto;
}

.mini-cart-item-details {
    flex-grow: 1;
}

.mini-cart-item-name {
    margin-bottom: 5px;
    font-weight: bold;
}

.mini-cart-item-qty-price {
    display: flex;
    justify-content: space-between;
    align-items: center;
}


.custom-mini-cart-products {
    overflow-y: scroll !important;
    max-height: calc(100vh - 250px);
    overflow: hidden;
}

.custom-mini-cart-item {
    display: grid;
    grid-template-columns: 30% auto;
    position: relative;
    padding: 12px 15px;
    background: #fff;
    box-shadow: 0px 0px 10px 0px rgba(0, 0, 0, 0.06);
    border-color: #E2E8F0;
    border-radius: 20px;
    margin: 20px 0;
}

.mini-cart-item-image {
    width: 88%;
    margin-right: 18px;
}

.mini-cart-item-details {
    padding-right: 18px;
}

.mini-cart-item-name {
    height: 62px;
    font-family: 'Noto Sans Hebrew';
    font-size: 14px;
    line-height: 1.4;
}

.mini-cart-item-qty-price {
    display: flex;
    flex-direction: row-reverse;
}

.mini-cart-item-price bdi {
    color: #df1a81;
    font-size: 18px;
    font-weight: 600;
}

.mini-cart-item-quantity {
    background: #DF1A81 !important;
    color: #fff !important;
    font-family: "Noto Sans Hebrew";
    font-size: 18px !important;
    padding: 2px 0;
    border: 0 !important;
    border-radius: 25px;
    width: 123px;
    height: 39px;
    display: flex;
    align-items: center;
    justify-content: space-evenly;

}

.mini-cart-item-quantity button {
    font-size: 24px;
    background: unset;
    line-height: 1;
    padding: 8px 10px;
}

.mini-cart-item-quantity input.qty-input {
    background: #DF1A81;
    height: 22px !important;
    font-size: 18px !important;
    line-height: 20px !important;
    border: none;
    color: #fff;
    width: 100%;
    padding: 0;
}

.mini-cart-item-quantity button:disabled {
    opacity: 0.7;
}

.button-clicked {
    transform: scale(0.9);
}

.custom-mini-cart-item {
    position: relative;
    transition: background-color 0.5s ease;
}


.custom-mini-cart-item.updating {
    position: relative;
}

.custom-mini-cart-item.updating .mini-cart-item-price {
    position: relative;
    opacity: 0.4;
}

.custom-mini-cart-item.updating .mini-cart-item-price::after {
    content: "";
    position: absolute;
    top: -12px;
    right: 0;
    width: 14px;
    height: 14px;
    border: 2px solid #ccc;
    border-top-color: #555;
    border-radius: 50%;
    animation: miniCartSpinner 0.7s linear infinite;
}

@keyframes miniCartSpinner {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}


@media (max-width: 767px) {
    .cart-icon-wrapper {
        position: relative;
        display: inline-block;
        max-width: 38px;
        overflow: hidden;
    }

    button#cart-toggle-button {
        margin-right: -8px;
    }
}

/* אפקט לאודר */
.cart-total-badge.loading~.cart-icon-wrapper::after {
    content: "";
    position: absolute;
    top: -3px;
    left: -3px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 3px solid rgba(223, 26, 129, 0.25);
    border-top-color: #DF1A81;
    animation: cartLoaderSpin 0.7s linear infinite;
    pointer-events: none;
    z-index: 10;
}

@media (max-width: 767px) {
    .cart-total-badge.loading~.cart-icon-wrapper::after {
        width: 38px;
        height: 38px;
        top: 0;
        left: 0;
    }
}   

@keyframes cartLoaderSpin {
    to {
        transform: rotate(360deg);
    }
}


.qty-input {
    width: 30px;
    text-align: center;
    border: none;
    padding: 0;
    margin: 0;
}

input.qty-input::selection {
    background: #bababa;
}

.mini-cart-item-price {
    font-weight: bold;
}

.mini-cart-item-remove {

    position: absolute;
    top: 2px;
    right: 10px;
    cursor: pointer;
    font-size: 24px;
    color: #999;
}


.custom-mini-cart-amount-left {
    display: flex;
    justify-content: center;
    background: #000;
    color: #fff;
    font-size: 15px !important;
    align-items: center;
}

.custom-mini-cart-amount-left span {
    padding: 6px;
    font-size: 15px;
    font-weight: 500
}

div#mini-cart-message {
    background: #ffffff;
    color: #be5821;
    text-align: center;
    border: 1px solid;
    margin: 3px 0;
    font-size: 15px;
    line-height: 1.5;
    letter-spacing: 0;
    padding: 2px 10px;
}

.custom-mini-cart-buttons {
    padding: 15px;
    display: flex;
    background: #df1a81;
    justify-content: center;

}

button.plus-qty.disabled {
    font-size: 0 !important;
    opacity: 0.7;
    pointer-events: none;
}

button.plus-qty.disabled:before {
    content: 'x';
    font-size: 18px;
}


.custom-checkout-button:hover,
.custom-checkout-button:focus {
    color: white;
}

.custom-checkout-button {
    display: flex;
    width: 80%;
    background-color: #000000;
    color: white;
    text-align: center;
    padding: 0 12px;
    border-radius: 100px;
    text-decoration: none;
    font-weight: 600;
    font-size: 18px;
    height: 50px;
    align-items: center;
    justify-content: center;
}

span.custom-checkout-button.disabled-checkout {
    background: #FBD0E6;
    pointer-events: none;
    color: #df1a81;
}

/* שכבת רקע כהה כשהעגלה פתוחה */
.mini-cart-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 99998;
    display: none;
}

.mini-cart-overlay.active {
    display: block;
}

/* התאמה למובייל */
@media (max-width: 767px) {
    .custom-mini-cart-wrapper {
        max-width: 100%;
    }
}

.mini-cart-confirm-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.45);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 999999;
}

.mini-cart-confirm-box {
    background: #fff;
    width: 320px;
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    direction: rtl;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
    animation: fadeMC 0.25s ease;
}

@keyframes fadeMC {
    from {
        transform: scale(0.9);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

.mc-title {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 10px;
}

.mc-message {
    font-size: 16px;
    margin-bottom: 20px;
}

.mc-buttons {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.mc-btn {
    padding: 10px 16px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    font-size: 15px;
}

.mc-cancel {
    background: #e1e1e1;
}

.mc-ok {
    background: #de1a83;
    color: #fff;
}

.custom-mini-cart-item {
    position: relative;
    overflow: hidden;
}

.custom-mini-cart-item .wcdm-deal-ribbon {
    position: absolute;
    top: 20px;
    right: -40px;
    width: 160px;
    height: 32px;
    background: linear-gradient(135deg, #c2181d, #e53935);
    color: #fff;
    font-weight: 700;
    font-size: 16px;
    text-align: center;
    line-height: 32px;
    transform: rotate(45deg);
    transform-origin: center;
    z-index: 10;
    pointer-events: none;
}

.custom-mini-cart-item .wcdm-deal-ribbon span {
    font-size: 13px;
    display: block;
    position: relative;
    z-index: 2;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}


.impersonating .mini-cart-close {
    top: 60px;
}

.impersonating .mini-cart-empty {
    padding-top: 40px;
}

.mini-cart-item-price .per_unit {
    font-size: 12px;
    line-height: 1;
}

.custom-mini-cart-fees {
    margin-top: 10px;
    border-top: 1px dashed #ddd;
    padding-top: 8px;
}

.mini-cart-fee-row {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    color: #0a7a2f;
    font-weight: 600;
}

.mini-cart-fee-row .fee-amount {
    font-weight: 700;
}
.custom-mini-cart-fees {
    margin-top: 10px;
}

.mini-cart-fee-row {
    display: flex;
    justify-content: space-between;
    font-weight: 600;
}

.mini-cart-fee-free-products {
    font-size: 12px;
    color: #777;
    margin: -1px 0 3px;
    padding-right: 6px;
    line-height: 1.3;
}
.mini-cart-fee-free-products span.woocommerce-Price-amount.amount, .mini-cart-fee-free-products span.woocommerce-Price-currencySymbol {
    font-size: 12px;
}
.mini-cart-fee-free-products .free-product-price{
    margin-right:5px;
}
