/* ==========================================================================
   ISHOST — سبد خرید (viewcart) بازطراحی
   ========================================================================== */

body.ishost-viewcart-page .ish-breadcrumb,
body.ishost-viewcart-page .master-breadcrumb,
body.ishost-viewcart-page .primary-content > h1,
body.ishost-viewcart-page .primary-content > .header-lined {
    display: none !important;
}

body.ishost-viewcart-page .primary-content > .card {
    border: none !important;
    background: transparent !important;
    box-shadow: none !important;
}

body.ishost-viewcart-page .primary-content > .card > .card-body {
    padding: 0 !important;
}

body.ishost-viewcart-page #order-standard_cart.ish-vcart .panel,
body.ishost-viewcart-page #order-standard_cart.ish-vcart .card {
    box-shadow: none;
}

#order-standard_cart.ish-vcart {
    direction: rtl !important;
    text-align: right;
    max-width: 1080px;
    margin: 0 auto 2.75rem;
    float: none !important;
    width: 100% !important;
    padding: 0.75rem 0.75rem 0;
    box-sizing: border-box;
    font-family: "Vazir", "IRANSans", "IRANYekan", Tahoma, Arial, sans-serif;
}

.ish-vcart__hide,
.ish-vcart .cart-sidebar,
.ish-vcart .sidebar-categories,
.ish-vcart .sidebar-collapsed,
.ish-vcart .categories-collapsed {
    display: none !important;
}

.ish-vcart__body,
.ish-vcart .cart-body {
    width: 100% !important;
    max-width: 100% !important;
    float: none !important;
    padding: 0 !important;
}

.ish-vcart > .row {
    margin: 0 !important;
}

/* Hero */
.ish-vcart__hero {
    position: relative;
    margin: 0 0 1.35rem;
    padding: 1.35rem 1.4rem 1.2rem;
    border-radius: 20px;
    overflow: hidden;
    text-align: center;
    background:
        radial-gradient(ellipse 70% 55% at 100% 0%, rgba(245, 180, 0, 0.12), transparent 55%),
        radial-gradient(ellipse 60% 50% at 0% 100%, rgba(13, 62, 163, 0.09), transparent 50%),
        #fff;
    border: 1px solid rgba(13, 62, 163, 0.12);
    box-shadow: 0 18px 36px -26px rgba(13, 62, 163, 0.35);
}

.ish-vcart__hero::before {
    content: "";
    position: absolute;
    inset: 0 0 auto 0;
    height: 3px;
    background: linear-gradient(90deg, #0d3ea3, #f5b400, #0d3ea3);
}

.ish-vcart__kicker {
    margin: 0 0 0.25rem;
    font-size: 0.76rem;
    font-weight: 750;
    color: #0d3ea3;
}

.ish-vcart__title {
    margin: 0 0 0.3rem;
    font-size: clamp(1.3rem, 3vw, 1.7rem);
    font-weight: 800;
    color: #0f172a;
}

.ish-vcart__lead {
    margin: 0 auto;
    max-width: 32rem;
    font-size: 0.88rem;
    line-height: 1.65;
    color: #64748b;
}

/* Layout */
.ish-vcart__layout {
    display: flex !important;
    flex-wrap: wrap;
    gap: 1.15rem;
    margin: 0 !important;
    align-items: flex-start;
}

.ish-vcart__main,
.ish-vcart .secondary-cart-body {
    flex: 1 1 58%;
    min-width: 0;
    max-width: calc(100% - 330px);
    float: none !important;
    width: auto !important;
    padding: 0 !important;
}

.ish-vcart__side,
.ish-vcart .secondary-cart-sidebar {
    flex: 0 0 310px;
    width: 310px !important;
    max-width: 310px;
    float: none !important;
    padding: 0 !important;
    position: sticky;
    top: 1rem;
}

/* Items */
.ish-vcart__items-head,
.ish-vcart .view-cart-items-header {
    display: none !important;
}

.ish-vcart__items,
.ish-vcart .view-cart-items {
    display: grid;
    gap: 12px;
    margin: 0 0 1rem;
    border: none !important;
    background: transparent !important;
    box-shadow: none !important;
}

.ish-vcart .view-cart-items .item {
    position: relative;
    margin: 0 !important;
    padding: 1.15rem 1.2rem !important;
    border-radius: 16px !important;
    background: #fff !important;
    border: 1px solid rgba(148, 163, 184, 0.22) !important;
    box-shadow: 0 8px 22px -20px rgba(15, 23, 42, 0.2);
}

.ish-vcart .view-cart-items .item::before {
    content: "";
    position: absolute;
    top: 14px;
    bottom: 14px;
    right: 0;
    width: 3px;
    border-radius: 999px;
    background: linear-gradient(180deg, #0d3ea3, #f5b400);
}

.ish-vcart .view-cart-items .item:hover {
    border-color: rgba(13, 62, 163, 0.26) !important;
}

/* چیدمان متعادل: اطلاعات | متا (قیمت + حذف) */
.ish-vcart .view-cart-items .item .row {
    margin: 0 !important;
    display: flex !important;
    flex-wrap: nowrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1.25rem;
}

.ish-vcart .view-cart-items .item .row > [class*="col-"] {
    width: auto !important;
    max-width: none !important;
    flex: none !important;
    float: none !important;
    padding: 0 !important;
}

.ish-vcart .view-cart-items .item .row > [class*="col-"]:first-child {
    flex: 1 1 auto !important;
    min-width: 0;
}

.ish-vcart .view-cart-items .item .item-qty {
    flex: 0 0 auto;
    margin-top: 0.15rem;
    max-width: 110px;
}

.ish-vcart__meta {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: flex-start;
    gap: 0.45rem;
    flex: 0 0 auto;
    min-width: 9.5rem;
    max-width: min(46%, 15rem);
    text-align: left;
}

.ish-vcart__meta > [class*="col-"] {
    width: auto !important;
    padding: 0 !important;
    display: flex;
    justify-content: flex-end;
}

.ish-vcart .item-title {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.3rem 0.45rem;
    font-size: 0.95rem;
    font-weight: 800;
    color: #0f172a;
    margin: 0 0 0.2rem;
    line-height: 1.45;
    letter-spacing: -0.01em;
}

.ish-vcart .item-title > a.btn-link {
    margin: 0;
    padding: 0.16rem 0.4rem !important;
    border-radius: 8px;
    background: rgba(13, 62, 163, 0.06);
    color: #0d3ea3 !important;
    font-size: 0.7rem !important;
    font-weight: 750 !important;
    text-decoration: none !important;
}

.ish-vcart .item-title > a.btn-link:hover {
    background: rgba(13, 62, 163, 0.12);
}

.ish-vcart .item-group {
    display: block;
    font-size: 0.74rem;
    font-weight: 650;
    color: #64748b;
    margin-bottom: 0.2rem;
}

.ish-vcart .item-domain {
    display: inline-block;
    margin-top: 0.1rem;
    padding: 0.12rem 0.48rem;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
    color: #0d3ea3;
    background: rgba(13, 62, 163, 0.07);
    border: 1px solid rgba(13, 62, 163, 0.1);
    direction: ltr;
}

.ish-vcart .item small {
    display: block;
    margin-top: 0.4rem;
    font-size: 0.72rem;
    color: #94a3b8;
    line-height: 1.5;
}

/* قیمت — بدون باکس تنگ، تراز یکدست */
.ish-vcart .item-price {
    display: flex !important;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.18rem;
    width: 100%;
    padding: 0 !important;
    margin: 0 !important;
    border: none !important;
    background: transparent !important;
    border-radius: 0 !important;
    text-align: left !important;
    direction: rtl;
    min-width: 0;
}

.ish-vcart .item-price > span:first-child,
.ish-vcart .item-price > span[name$="Price"],
.ish-vcart .item-price .ish-money-line {
    display: inline-flex !important;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: baseline;
    justify-content: flex-end;
    gap: 0.3rem;
    direction: rtl;
    font-size: clamp(0.82rem, 1.5vw, 0.95rem);
    font-weight: 750;
    color: #0d3ea3;
    line-height: 1.3;
    max-width: 100%;
    letter-spacing: -0.015em;
}

.ish-vcart .item-price .ish-money-amount {
    direction: ltr;
    unicode-bidi: isolate;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

.ish-vcart .item-price .ish-money-unit {
    font-size: 0.68rem;
    font-weight: 700;
    color: #94a3b8;
    white-space: nowrap;
}

.ish-vcart .item-price .cycle {
    display: block;
    margin: 0;
    font-size: 0.72rem;
    font-weight: 650;
    color: #64748b;
    text-align: left;
    direction: rtl;
    width: 100%;
}

.ish-vcart .item-price .renewal.cycle,
.ish-vcart .item-price .dropdown {
    font-size: 0.68rem;
    color: #94a3b8;
    width: 100%;
    text-align: left;
}

.ish-vcart .btn-remove-from-cart {
    width: 32px;
    height: 32px;
    padding: 0 !important;
    border-radius: 10px !important;
    background: #f8fafc !important;
    border: 1px solid rgba(148, 163, 184, 0.28) !important;
    color: #94a3b8 !important;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    line-height: 1;
    position: relative;
}

.ish-vcart .btn-remove-from-cart i {
    display: none !important;
}

.ish-vcart .btn-remove-from-cart::after {
    content: "×";
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    font-weight: 600;
    font-family: Arial, Tahoma, sans-serif;
    color: inherit;
    pointer-events: none;
    line-height: 1;
}

.ish-vcart .btn-remove-from-cart:hover {
    color: #b91c1c !important;
    border-color: rgba(185, 28, 28, 0.28) !important;
    background: #fef2f2 !important;
}

.ish-vcart .item-title .btn-remove-from-cart {
    width: auto;
    min-width: 28px;
    height: 28px;
    padding: 0 0.4rem !important;
    font-size: 0.72rem !important;
}

.ish-vcart .item-title .visible-xs-inline,
.ish-vcart .item-title .d-inline.d-sm-none {
    display: none !important;
}

.ish-vcart .view-cart-empty {
    padding: 2.25rem 1.25rem;
    text-align: center;
    border-radius: 16px;
    background: #f8fafc;
    border: 1px dashed rgba(148, 163, 184, 0.4);
    color: #64748b;
    font-weight: 700;
}

/* Toolbar: promo + empty cart */
.ish-vcart__toolbar {
    display: grid;
    gap: 0.85rem;
    margin: 0 0 1.1rem;
}

.ish-vcart__promo,
.ish-vcart .view-cart-tabs.ish-vcart__tools {
    margin: 0;
    padding: 1rem 1.05rem;
    border-radius: 16px;
    background: #fff;
    border: 1px solid rgba(148, 163, 184, 0.24);
    box-shadow: 0 12px 26px -22px rgba(15, 23, 42, 0.16);
}

.ish-vcart .view-cart-tabs .nav-tabs {
    display: none !important;
}

.ish-vcart .view-cart-tabs .tab-content,
.ish-vcart .view-cart-tabs .tab-pane {
    display: block !important;
    opacity: 1 !important;
    padding: 0 !important;
    border: none !important;
}

.ish-vcart .view-cart-tabs .tab-pane#calcTaxes {
    display: none !important;
}

.ish-vcart__promo-label {
    display: block;
    margin: 0 0 0.55rem;
    font-size: 0.84rem;
    font-weight: 750;
    color: #0f172a;
}

.ish-vcart__promo-form,
.ish-vcart .promo form {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
    align-items: stretch;
    margin: 0;
}

.ish-vcart .promo .form-group,
.ish-vcart .promo .prepend-icon {
    flex: 1 1 180px;
    margin: 0 !important;
    position: relative;
}

.ish-vcart .promo .field-icon {
    position: absolute;
    top: 50%;
    right: 12px;
    transform: translateY(-50%);
    color: #94a3b8;
    z-index: 2;
    margin: 0;
}

.ish-vcart #inputPromotionCode,
.ish-vcart .promo .form-control,
.ish-vcart .promo .field {
    border-radius: 12px !important;
    min-height: 46px;
    padding-right: 2.4rem !important;
    border: 1px solid rgba(148, 163, 184, 0.3) !important;
    box-shadow: none !important;
}

.ish-vcart .promo button[type="submit"],
.ish-vcart .promo .btn-default {
    flex: 0 0 auto;
    min-width: 110px;
    min-height: 46px;
    margin: 0 !important;
    border-radius: 12px !important;
    font-weight: 750 !important;
    background: #0d3ea3 !important;
    border: none !important;
    color: #fff !important;
    width: auto !important;
}

.ish-vcart .view-cart-promotion-code {
    margin-bottom: 0.55rem;
    padding: 0.55rem 0.7rem;
    border-radius: 10px;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #166534;
    font-weight: 700;
    font-size: 0.84rem;
}

.ish-vcart__empty-wrap,
.ish-vcart .empty-cart {
    margin: 0;
    text-align: right !important;
}

.ish-vcart #btnEmptyCart,
.ish-vcart__empty-btn {
    display: inline-flex !important;
    align-items: center;
    gap: 0.4rem;
    min-height: 40px;
    padding: 0.45rem 0.85rem !important;
    border-radius: 10px !important;
    border: 1px solid rgba(185, 28, 28, 0.18) !important;
    background: #fff !important;
    color: #b91c1c !important;
    font-size: 0.82rem !important;
    font-weight: 750 !important;
    text-decoration: none !important;
    box-shadow: none !important;
}

.ish-vcart #btnEmptyCart:hover {
    background: #fef2f2 !important;
    border-color: rgba(185, 28, 28, 0.3) !important;
}

/* Summary */
.ish-vcart__summary,
.ish-vcart .order-summary {
    margin: 0 !important;
    padding: 1.15rem 1.1rem !important;
    border-radius: 18px !important;
    background:
        radial-gradient(ellipse 80% 50% at 100% 0%, rgba(13, 62, 163, 0.05), transparent 55%),
        #fff !important;
    border: 1px solid rgba(148, 163, 184, 0.26) !important;
    box-shadow: 0 16px 32px -24px rgba(15, 23, 42, 0.28) !important;
    color: #0f172a !important;
    overflow: hidden;
    position: relative;
}

.ish-vcart__summary::before {
    content: "";
    position: absolute;
    inset: 0 0 auto 0;
    height: 3px;
    background: linear-gradient(90deg, #0d3ea3, #f5b400);
}

.ish-vcart__summary-head {
    margin-bottom: 0.85rem;
    padding-bottom: 0.7rem;
    border-bottom: 1px solid rgba(226, 232, 240, 0.95);
}

.ish-vcart__summary-title,
.ish-vcart .order-summary h2 {
    margin: 0 !important;
    font-size: 1.05rem !important;
    font-weight: 800 !important;
    color: #0f172a !important;
}

.ish-vcart .summary-container {
    display: grid;
    gap: 0.15rem;
}

.ish-vcart .summary-container .clearfix,
.ish-vcart .summary-container .subtotal,
.ish-vcart .summary-container .bordered-totals > .clearfix {
    display: flex !important;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    padding: 0.5rem 0 !important;
    border-bottom: 1px solid #f1f5f9;
    float: none !important;
    width: 100% !important;
}

.ish-vcart .summary-container .bordered-totals {
    margin: 0.15rem 0;
    padding: 0.15rem 0;
    border-top: 1px dashed #e2e8f0;
    border-bottom: 1px dashed #e2e8f0;
}

.ish-vcart .summary-container .float-left,
.ish-vcart .summary-container .pull-left {
    float: none !important;
    flex: 1 1 auto;
    min-width: 0;
    color: #64748b;
    font-size: 0.8rem;
    font-weight: 650;
    text-align: right;
}

.ish-vcart .summary-container .float-right,
.ish-vcart .summary-container .pull-right {
    float: none !important;
    display: inline-flex !important;
    flex: 0 1 auto;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: flex-end;
    gap: 0.35rem;
    color: #0f172a;
    font-size: 0.84rem;
    font-weight: 750;
    direction: rtl;
    text-align: right;
    max-width: 55%;
}

.ish-vcart .ish-money-amount {
    direction: ltr;
    unicode-bidi: isolate;
    white-space: nowrap;
    font-weight: 800;
}

.ish-vcart .ish-money-unit {
    font-size: 0.72rem;
    font-weight: 700;
    color: #94a3b8;
    white-space: nowrap;
}

/* Recurring totals — فقط دوره‌های واقعی (نه همه) */
.ish-vcart .summary-container .recurring-totals {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.4rem;
    padding: 0.55rem 0;
    border-bottom: none;
    float: none !important;
}

.ish-vcart .summary-container .recurring-totals.is-empty {
    display: none !important;
}

.ish-vcart .recurring-totals > .pull-left,
.ish-vcart .recurring-totals > .float-left {
    font-size: 0.78rem;
    font-weight: 750;
    color: #475569;
}

.ish-vcart .recurring-charges,
.ish-vcart #recurring {
    display: grid;
    gap: 0.35rem;
    width: 100% !important;
    max-width: 100% !important;
    float: none !important;
    direction: rtl;
    text-align: right;
    font-size: 0.78rem;
    font-weight: 650;
    color: #64748b;
}

/* بدون !important تا style="display:none" ویندوز WHMCS کار کند */
.ish-vcart .recurring-charges > span {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 0.65rem;
    padding: 0.35rem 0.5rem;
    border-radius: 10px;
    background: #f8fafc;
    border: 1px solid #f1f5f9;
}

.ish-vcart .recurring-charges > span[style*="display: none"],
.ish-vcart .recurring-charges > span[style*="display:none"] {
    display: none !important;
}

.ish-vcart .recurring-charges br {
    display: none !important;
}

.ish-vcart .recurring-charges .cost {
    display: inline-flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.28rem;
    direction: rtl;
    font-size: clamp(0.74rem, 1.5vw, 0.84rem);
    font-weight: 750;
    color: #0f172a;
}

.ish-vcart .ish-vcart__cycle-label {
    color: #64748b;
    font-weight: 650;
    font-size: 0.74rem;
    white-space: nowrap;
}

.ish-vcart .total-due-today {
    display: flex !important;
    flex-direction: column;
    gap: 0.2rem;
    margin: 0.75rem 0 0 !important;
    padding: 0.9rem 0.95rem !important;
    border-radius: 14px !important;
    background:
        linear-gradient(145deg, rgba(13, 62, 163, 0.07), rgba(245, 180, 0, 0.05)),
        #f8fafc !important;
    border: 1px solid rgba(13, 62, 163, 0.14) !important;
    text-align: right;
}

.ish-vcart .total-due-today > span:not(.amt):not(#totalDueToday) {
    display: block;
    order: 1;
    font-size: 0.74rem;
    font-weight: 750;
    color: #64748b;
}

.ish-vcart .total-due-today .amt,
.ish-vcart #totalDueToday {
    display: inline-flex !important;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: flex-end;
    gap: 0.4rem;
    order: 2;
    font-size: clamp(1.15rem, 2.8vw, 1.4rem);
    font-weight: 800;
    color: #0d3ea3 !important;
    direction: rtl;
    text-align: right;
    line-height: 1.35;
}

.ish-vcart .total-due-today .amt .ish-money-unit,
.ish-vcart #totalDueToday .ish-money-unit {
    font-size: 0.78rem;
    color: #64748b;
}

.ish-vcart__checkout,
.ish-vcart #checkout,
.ish-vcart .btn-checkout {
    width: 100%;
    min-height: 48px;
    margin-top: 0.75rem;
    border-radius: 12px !important;
    font-weight: 750 !important;
    background: linear-gradient(145deg, #1248b8, #0d3ea3) !important;
    border: none !important;
    box-shadow: 0 12px 24px -14px rgba(13, 62, 163, 0.7);
}

.ish-vcart .text-right {
    text-align: center !important;
}

.ish-vcart #continueShopping {
    display: inline-block;
    width: 100%;
    margin-top: 0.5rem;
    text-align: center;
    font-weight: 700;
    color: #64748b !important;
}

.ish-vcart .alert {
    border-radius: 14px;
    margin-bottom: 1rem;
}

.ish-vcart .modal-content {
    border-radius: 16px;
    border: none;
    box-shadow: 0 24px 48px -20px rgba(15, 23, 42, 0.35);
}

@media (max-width: 991.98px) {
    .ish-vcart__main,
    .ish-vcart .secondary-cart-body,
    .ish-vcart__side,
    .ish-vcart .secondary-cart-sidebar {
        flex: 1 1 100%;
        max-width: 100%;
        width: 100% !important;
        position: static;
    }
}

@media (max-width: 640px) {
    .ish-vcart .view-cart-items .item .row {
        flex-wrap: wrap;
        gap: 0.75rem;
    }

    .ish-vcart__meta {
        width: 100%;
        max-width: none;
        min-width: 0;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        padding-top: 0.55rem;
        border-top: 1px solid #f1f5f9;
    }

    .ish-vcart .item-price {
        align-items: flex-start;
        text-align: right !important;
    }

    .ish-vcart .item-price > span:first-child,
    .ish-vcart .item-price > span[name$="Price"],
    .ish-vcart .item-price .cycle {
        text-align: right;
        justify-content: flex-start;
    }

    .ish-vcart .promo button[type="submit"] {
        width: 100% !important;
    }
}
