/* ─────────────────────────────────────────────────────────
   ITNOO Cart — استایل کامل و مستقل (بدون وابستگی به المنتور)
───────────────────────────────────────────────────────── */

:root {
    --itnoo-red: #ef2f4b;
    --itnoo-red-dark: #d81b3a;
    --itnoo-text: #26262b;
    --itnoo-text-light: #9a9fa5;
    --itnoo-border: #eef0f2;
    --itnoo-bg-soft: #f5f6f8;
    --itnoo-drawer-width: 380px;
}

.elementor-element.elementor-element-5cfe581.elementor-widget.elementor-widget-shortcode {
	justify-content: center;
	display: flex;
	align-items: center;
	line-height: 0;
}


/* ── آیکون شناور (خروجی شورت‌کد) ─────────────────────── */
.itnoo-cart-toggle {
    position: relative;
    display: inline-flex;   
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: none;
    background: transparent!important;
    color: var(--itnoo-text)!important;
    cursor: pointer;
    padding: 0;
}
.itnoo-cart-toggle:hover {
    background: rgba(239, 47, 75, .08);
    color: var(--itnoo-red);
}
.itnoo-cart-toggle__count {
    position: absolute;
    top: -2px;
    left: -2px;
    min-width: 17px;
    height: 17px;
    padding: 0 4px;
    border-radius: 999px;
    background: var(--itnoo-red);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    line-height: 17px;
    text-align: center;
}

/* ── لودر نقطه‌ای ─────────────────────────────────────── */
.itnoo-loader {
    display: inline-flex;
    gap: 4px;
    align-items: center;
}
.itnoo-loader span {
    width: 5px;
    height: 5px;
    background: currentColor;
    border-radius: 50%;
    animation: itnooDot 1.2s infinite ease-in-out both;
}
.itnoo-loader span:nth-child(1) { animation-delay: -.32s; }
.itnoo-loader span:nth-child(2) { animation-delay: -.16s; }
@keyframes itnooDot {
    0%, 80%, 100% { transform: scale(0); opacity: .4; }
    40%           { transform: scale(1); opacity: 1; }
}

/* ── اسکلتون لودر (mount شورت‌کد) ──────────────── */
.itnoo-cart-skeleton {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
}
.itnoo-cart-icon-mount {
	line-height: 0;
}
.itnoo-cart-skeleton__circle {
    width: 40px;
    height: 40px;
    border-radius: 0%;
    background-color: #e3e6eb;
    background-image: linear-gradient(90deg, #e3e6eb 0%, #f2f4f7 50%, #e3e6eb 100%);
    background-size: 200% 100%;
    animation: itnooShimmer 1.2s ease-in-out infinite;
}
@keyframes itnooShimmer {
    0%   { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ── پس‌زمینه‌ی تیره پشت پنل ──────────────────────────── */
.itnoo-cart-overlay {
    position: fixed;
    inset: 0;
    background: rgba(20, 20, 24, .45);
    opacity: 0;
    visibility: hidden;
    transition: opacity .3s ease, visibility .3s ease;
    z-index: 999998;
}

/* ── پنل کشویی سبد خرید ───────────────────────────────── */
.itnoo-cart-drawer {
    position: fixed;
    top: 0;
    left: 0;
    height: 100%;
    width: var(--itnoo-drawer-width);
    max-width: 92vw;
    background: var(--itnoo-bg-soft);
    display: flex;
    flex-direction: column;
    direction: rtl;
    font-family: inherit;
    box-shadow: 8px 0 30px rgba(0, 0, 0, .12);
    transform: translateX(-100%);
    transition: transform .35s ease;
    z-index: 999999;
}

body.itnoo-cart-open .itnoo-cart-overlay {
    opacity: 1;
    visibility: visible;
}
body.itnoo-cart-open .itnoo-cart-drawer {
    transform: translateX(0);
}
body.itnoo-cart-open {
    overflow: hidden;
}

/* ── حالت موبایل: پنل مثل bottom-sheet از پایین باز می‌شود ── */
@media (max-width: 767px) {
    .itnoo-cart-drawer {
        top: auto;
        left: 0;
        right: 0;
        bottom: 0;
        width: 100%;
        max-width: 100%;
        height: 70vh;
        max-height: 85vh;
        box-shadow: 0 -8px 30px rgba(0, 0, 0, .15);
        transform: translateY(100%);
        border-radius: 24px 24px 0px 0px;
    }
    .itnoo-cart-header {
   border-radius: 24px 24px 0px 0px;
}
    body.itnoo-cart-open .itnoo-cart-drawer {
        transform: translateY(0);
    }
    .itnoo-cart-body {
        max-height: calc(85vh - 140px);
    }
}

/* ── هدر ──────────────────────────────────────────────── */
.itnoo-cart-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    background: #fff;
    border-bottom: 1px solid var(--itnoo-border);
    flex: 0 0 auto;
}
.itnoo-cart-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
    font-weight: 700;
    color: var(--itnoo-text);
}
.itnoo-cart-title svg { flex: 0 0 auto; }

.itnoo-cart-close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border: none;
    border-radius: 8px;
    background: rgba(255, 160, 174, .08)!important;
    color: var(--itnoo-red)!important;
    cursor: pointer;
    transition: background .2s ease, transform .2s ease!important;
    flex: 0 0 auto;
    padding: 0;
}
.itnoo-cart-close:hover {
    background: rgba(239, 47, 75, .16)!important;
    transform: scale(1.05);
}

/* ── بدنه ─────────────────────────────────────────────── */
.itnoo-cart-body {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 14px;
    flex: 1 1 auto;
    overflow-y: auto;
    min-height: 120px;
}
.itnoo-cart-body::-webkit-scrollbar { width: 6px; }
.itnoo-cart-body::-webkit-scrollbar-thumb {
    background: #dcdfe3;
    border-radius: 10px;
}

/* ── کارت هر محصول ────────────────────────────────────── */
.itnoo-cart-product {
    background: #fff;
    border: 1px solid var(--itnoo-border);
    border-radius: 14px;
    padding: 14px;
    transition: box-shadow .25s ease, opacity .3s ease, transform .3s ease;
}
.itnoo-cart-product:hover {
    box-shadow: 0 4px 16px rgba(38, 38, 43, .07);
}
.itnoo-cart-product.removing {
    opacity: 0;
    transform: translateX(-16px);
    height: 0;
    margin: 0;
    padding: 0;
    border-width: 0;
    overflow: hidden;
}

.itnoo-cart-product__top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
    flex-direction: row-reverse;
}

.itnoo-cart-product__name {
    flex: 1 1 auto;
    min-width: 0;
}
.itnoo-cart-product__name a {
    color: var(--itnoo-text);
    font-size: 13.5px;
    font-weight: 500;
    line-height: 1.7;
    text-decoration: none;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.itnoo-cart-product__name a:hover { color: var(--itnoo-red); }

.itnoo-cart-product__image { flex: 0 0 auto; }
.itnoo-cart-product__image img {
    width: 58px;
    height: 58px;
    object-fit: contain;
    border-radius: 10px;
    background: var(--itnoo-bg-soft);
    display: block;
}

.itnoo-cart-product__bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
    flex-direction: row-reverse;
}

/* قیمت و بج تخفیف */
.itnoo-cart-product__price {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.itnoo-cart-product__price-top {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-direction: row-reverse;
}
.itnoo-discount-badge {
    background: var(--itnoo-red);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    border-radius: 6px;
    padding: 2px 6px;
    line-height: 1.4;
}
.itnoo-regular-price {
    color: var(--itnoo-text-light);
    font-size: 12px !important;
    text-decoration: line-through;
}
.itnoo-regular-price .woocommerce-Price-amount { color: inherit; }
.itnoo-sale-price {
	display: flex;
	justify-content: end;
	color: #000;
	font-weight: 700;
	font-size: 18px;
	gap: 4px;
	flex-direction: row-reverse;
}
.itnoo-sale-price .woocommerce-Price-currencySymbol {
    font-size: 14px !important;
    font-weight: 500;
    margin-right: 2px;
}

/* استپر تعداد و دکمه‌ی حذف */
.itnoo-cart-product__controls {
    display: flex;
    align-items: center;
    gap: 8px;
}
.itnoo-qty-stepper {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--itnoo-bg-soft);
    border-radius: 10px;
    padding: 6px 10px;
}
.itnoo-qty-btn {
    background: transparent;
    border: none;
    color: var(--itnoo-text);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    padding: 0;
    transition: color .2s ease, opacity .2s ease;
}
.itnoo-qty-btn:hover { color: var(--itnoo-red); }
.itnoo-qty-btn:disabled {
    opacity: .35;
    cursor: not-allowed;
    color: var(--itnoo-text);
}
.itnoo-qty-value {
    min-width: 14px;
    text-align: center;
    font-size: 13px;
    font-weight: 600;
    color: var(--itnoo-text);
}
.itnoo-qty-stepper.loading { opacity: .5; pointer-events: none; }

.itnoo-remove-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: rgba(239, 47, 75, .08);
    color: var(--itnoo-red);
    text-decoration: none !important;
    cursor: pointer;
    transition: background .2s ease, transform .2s ease;
    flex: 0 0 auto;
}
.itnoo-remove-btn:hover {
    background: rgba(239, 47, 75, .16);
    transform: scale(1.05);
}
.itnoo-remove-btn.loading { opacity: .5; pointer-events: none; }

/* پیام سبد خالی */
.itnoo-cart-empty {
    padding: 50px 20px;
    text-align: center;
    color: var(--itnoo-text-light);
    font-size: 14px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0px;
}
.itnoo-cart-empty__icon { color: #d5d8dc; }

.itnoo-currency-icon {
	width: 16px;
}

/* ── فوتر: مجموع + دکمه‌ی تکمیل سفارش ─────────────────── */
.itnoo-cart-footer {
    border-top: 1px solid var(--itnoo-border);
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    background: #fff;
    flex: 0 0 auto;
}
.itnoo-cart-footer__total {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-direction: row-reverse;
}
.itnoo-cart-footer__label {
    font-size: 20px;
    font-weight: 600;
    color: var(--itnoo-text);
}
.itnoo-cart-footer__amount {
	font-size: 24px;
	font-weight: 700;
	color: var(--itnoo-text);
	display: flex;
	flex-direction: row-reverse;
	gap: 4px;
}


.itnoo-cart-footer__amount .woocommerce-Price-amount { font-weight: 700; }

.itnoo-checkout-btn {
    display: block;
    text-align: center;
    width: 100%;
    background: #F6921E;
    color: #fff !important;
    font-size: 15px;
    font-weight: 700;
    text-decoration: none;
    border-radius: 12px;
    padding: 14px 0px;
    box-shadow: 0 4px 14px rgba(239, 47, 75, .28);
    transition: box-shadow .25s ease, transform .25s ease, opacity .25s ease;
}
.itnoo-checkout-btn:hover {
    box-shadow: 0 6px 18px rgba(239, 47, 75, .38);
    transform: translateY(-1px);
    color: #fff;
}
.itnoo-checkout-btn.disabled {
    pointer-events: none;
    opacity: .45;
    box-shadow: none;
}

/* ── نوتیفیکیشن toast پس از افزودن به سبد خرید ────────── */
.itnoo-toast {
    position: fixed;
    left: 16px;
    right: 16px;
    bottom: 20px;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, .15);
    padding: 14px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    z-index: 999999;
    transform: translateY(120%);
    opacity: 0;
    transition: .3s ease;
    direction: rtl;
}
.itnoo-toast.show {
    transform: translateY(0);
    opacity: 1;
}
.itnoo-toast--error {
    border-right: 4px solid var(--itnoo-red);
}
.itnoo-toast--error .itnoo-toast-text {
    color: var(--itnoo-red) !important;
    font-weight: 600;
}
@media (max-width: 767px) {
    .itnoo-toast {
        width: calc(100vw - 32px);
        left: 50%;
        right: auto;
        transform: translate(-50%, 120%);
        bottom: 90px;
    }
    .itnoo-toast.show {
        transform: translate(-50%, 0);
    }
    :root {
        --itnoo-drawer-width: 100%;
    }
}
.itnoo-toast-text {
    font-size: 14px !important;
    color: #222 !important;
    font-weight: 500;
}
.itnoo-toast-btn {
    background: var(--itnoo-red);
    color: #fff !important;
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 8px;
    white-space: nowrap;
    font-size: 12px !important;
    font-weight: 700;
}
