﻿
.my-center-div {
    display: flex;
    align-items: center;
    justify-content: center;
}

.loader2 {
    background-color: Black;
    filter: alpha(opacity=60);
    opacity: 0.6;
    -moz-opacity: 0.8;
    display: none;
    right: 0px;
    position: fixed;
    left: 0px;
    top: 0px;
    width: 100%;
    height: 100%;
    z-index: 9999;
}

.loading {
    background-color: Black;
    filter: alpha(opacity=60);
    opacity: 0.6;
    -moz-opacity: 0.8;
    display: none;
    right: 0px;
    position: fixed;
    left: 0px;
    top: 0px;
    width: 100%;
    height: 100%;
    z-index: 9999;
}

.my-center {
    margin: 0;
    position: absolute;
    top: 50%;
    left: 50%;
    -ms-transform: translate(-50%, -50%);
    transform: translate(-50%, -50%);
}

.loaderInternal {
    background-color: Black;
    filter: alpha(opacity=60);
    opacity: 0.6;
    -moz-opacity: 0.8;
    display: none;
    right: 0px;
    position: absolute;
    left: 0px;
    top: 0px;
    width: 100%;
    height: 100%;
    z-index: 9999;
}



/* روبان تخفیف */
.discount-ribbon {
    position: absolute;
    top: 12px;
    left: -40px; /* 👈 سمت چپ */
    background: #d32f2f;
    color: #fff;
    padding: 6px 45px;
    font-size: 14px;
    font-weight: bold;
    transform: rotate(-45deg); /* 👈 چرخش برعکس */
    z-index: 1;
    box-shadow: 0 3px 8px rgba(0,0,0,.25);
}


/* قیمت قبلی خط خورده */
.old-price {
    font-size: 14px;
    color: #9e9e9e;
    text-decoration: line-through;
    margin-top: 4px;
}

/* قیمت جدید */
.price {
    color: #c9a23f; /* طلایی */
    font-weight: bold;
}
.no-arrow::before {
    display: none !important;
}

.development-modal {
    border-radius: 16px;
}

.dev-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: rgba(201, 162, 63, 0.15); /* طلایی ملایم */
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
}

    .dev-icon svg {
        width: 28px;
        height: 28px;
        stroke: #c9a23f;
    }
.coin-icon {
    width: 28px;
    height: 28px;
    object-fit: contain;
    border-radius: 50%;
    background: #fff;
    padding: 2px;
}
.market-ticker {
    display: flex;
    flex-direction: column; /* 👈 مهم */
    gap: 6px;
    padding: 12px 16px;
    border-radius: 16px;
    background: rgba(255,255,255,.06);
    border: 1px solid rgba(255,255,255,.15);
    color: #fff;
    direction: rtl;
    text-align: center;
}
}

.market-ticker__title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 13px;
    font-weight: 600;
    opacity: .85;
}

.market-ticker__value {
    display: flex;
    align-items: baseline;
    gap: 8px;
    font-size: 20px;
    font-weight: 800;
}

.market-ticker__meta {
    display: flex;
    justify-content: flex-end;
}
.market-ticker__label {
    font-size: 12px;
    padding: 4px 8px;
    border-radius: 999px;
    background: rgba(255,255,255,.12);
    display: flex;
    align-items: center;
    gap: 6px;
}

.market-ticker__value {
    display: flex;
    align-items: baseline;
    gap: 8px;
    font-weight: 800;
}

#avgPriceText {
    font-size: 20px;
}

.market-ticker__unit {
    font-size: 12px;
    opacity: .7;
}

.market-ticker__arrow {
    font-size: 14px;
    transition: 0.2s ease;
}

/* وقتی قیمت ثابت است */
.arrow-flat {
    font-size: 22px; /* 👈 بزرگ‌تر */
    line-height: 1;
}
.market-ticker__meta {
    display: flex;
    justify-content: center; /* 👈 وسط افقی */
    align-items: center; /* 👈 وسط عمودی */
    gap: 6px;
}

.badge {
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(255,255,255,.1);
    border: 1px solid rgba(255,255,255,.2);
}

/* رنگ‌ها */
.price-up {
    color: #20c997;
}

.price-down {
    color: #ff5c5c;
}

.price-flat {
    color: #4dabf7;
}

/* آیکن آنلاین */
.live-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
    margin-inline-start: 6px;
    background: #00ff88; /* سبز */
    animation: liveBlink .8s infinite ease-in-out;
    box-shadow: 0 0 0 0 rgba(0,255,136,.35);
}

    /* اگر خطا شد */
    .live-dot.live-error {
        background: #ff5c5c;
        animation: none;
        box-shadow: none;
    }

@keyframes liveBlink {
    0% {
        opacity: 1;
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(0,255,136,.35);
    }

    50% {
        opacity: .25;
        transform: scale(.85);
        box-shadow: 0 0 0 6px rgba(0,255,136,.08);
    }

    100% {
        opacity: 1;
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(0,255,136,.35);
    }
}


/*سبد خرید*/
.qty-control {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    border: 1px solid #eee;
    border-radius: 14px;
    padding: 8px 16px;
    background: #fff;
}

.qty-btn {
    width: 34px;
    height: 34px;
    border: none;
    border-radius: 10px;
    background: #f5f7fa;
    font-size: 18px;
    font-weight: 800;
    cursor: pointer;
}

    .qty-btn:hover {
        background: #0da487;
        color: #fff;
    }

.qty-value {
    min-width: 26px;
    text-align: center;
    font-weight: 800;
    font-size: 16px;
}
/* ظرف کلی */
.onhover-div .mini-cart {
    margin: 0;
    padding: 10px 10px 0;
    list-style: none;
    max-height: 320px; /* آیتم زیاد شد، اسکرول */
    overflow: auto;
}

/* هر آیتم */
.onhover-div .mini-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    margin-bottom: 10px;
    border: 1px solid rgba(0,0,0,.06);
    border-radius: 12px;
    background: #fff;
    width: 100%
}

/* تصویر */
.onhover-div .mini-thumb {
    width: 56px;
    height: 56px;
    border-radius: 10px;
    overflow: hidden;
    flex: 0 0 56px;
    background: #f6f6f6;
    display: grid;
    place-items: center;
}

    .onhover-div .mini-thumb img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
    }

/* متن‌ها */
.onhover-div .mini-body {
    flex: 1;
    min-width: 0; /* برای ellipsis */
}

.onhover-div .mini-title {
    display: block;
    font-weight: 700;
    font-size: 13px;
    line-height: 1.35;
    margin-bottom: 6px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.onhover-div .mini-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    opacity: .85;
}

.onhover-div .mini-qty {
    padding: 2px 8px;
    border-radius: 999px;
    background: rgba(0,0,0,.05);
    font-weight: 700;
}

.onhover-div .mini-price {
    font-weight: 800;
}

/* دکمه حذف */
.onhover-div .mini-remove {
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 10px;
    background: rgba(220, 53, 69, .10);
    color: #dc3545;
    display: grid;
    place-items: center;
    cursor: pointer;
}

    .onhover-div .mini-remove:hover {
        background: rgba(220, 53, 69, .18);
    }

/* جمع کل و دکمه‌ها کمی فاصله بگیرند */
.onhover-div .price-box {
    padding: 10px 12px;
    margin-top: 6px;
    border-top: 1px solid rgba(0,0,0,.06);
}

.onhover-div .button-group {
    padding: 0 12px 12px;
    display: flex;
    gap: 10px;
}

    .onhover-div .button-group a {
        flex: 1;
        border-radius: 12px;
    }





/* استایل حرفه‌ای برای badge */
.cart-badge-new {
    position: absolute;
    top: -8px;
    right: -8px;
    background: linear-gradient(135deg, #ff4444, #cc0000);
    color: white;
    border-radius: 50%;
    min-width: 18px;
    height: 18px;
    font-size: 10px;
    display: none;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    animation: pulse 1s ease-in-out infinite;
    z-index: 10;
}

/* انیمیشن برای جلب توجه */
@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
    }
}

/* برای اطمینان از موقعیت‌دهی صحیح parent */
a:has(.cart-badge-new) {
    position: relative;
    display: inline-block;
}