.xb-product-spec-content {
    direction: rtl;
}

.xb-product-spec-content h2,
.xb-product-spec-content h3,
.xb-product-spec-content h4 {
    margin: 18px 0 0;
    padding: 12px 16px;
    border: 1px solid #ececec;
    border-bottom: 0;
    border-radius: 10px 10px 0 0;
    background: #fafafa;
    font-size: 15px;
    font-weight: 800;
}

.xb-product-spec-content table {
    width: 100%;
    margin: 0 0 18px;
    border: 1px solid #ececec;
    border-collapse: separate;
    border-spacing: 0;
    border-radius: 10px;
    overflow: hidden;
    background: #fff;
}

.xb-product-spec-content h2 + table,
.xb-product-spec-content h3 + table,
.xb-product-spec-content h4 + table {
    border-radius: 0 0 10px 10px;
}

.xb-product-spec-content th,
.xb-product-spec-content td {
    padding: 11px 14px;
    border: 0;
    border-bottom: 1px solid #f0f0f0;
    vertical-align: middle;
    line-height: 1.8;
    text-align: right;
}

.xb-product-spec-content tr:last-child > th,
.xb-product-spec-content tr:last-child > td {
    border-bottom: 0;
}

.xb-product-spec-content tr > th:first-child,
.xb-product-spec-content tr > td:first-child {
    width: 32%;
    font-weight: 700;
    background: #fcfcfc;
    border-left: 1px solid #f0f0f0;
}

.xb-product-spec-content tr.xb-spec-group > th,
.xb-product-spec-content tr.xb-spec-group > td,
.xb-product-spec-content th[colspan="2"],
.xb-product-spec-content td[colspan="2"] {
    width: auto !important;
    padding: 12px 16px;
    border-left: 0 !important;
    background: #fafafa !important;
    font-size: 15px;
    font-weight: 800;
}

.xb-product-compare-action {
    margin-top: 12px;
}

.xb-compare-button {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
}

.xb-compare-app {
    direction: rtl;
    margin: 24px auto;
}

.xb-compare-heading {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    margin-bottom: 22px;
}

.xb-compare-title {
    margin: 0 0 6px;
}

.xb-compare-heading p {
    margin: 0;
}

.xb-differences-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.xb-compare-picker {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 18px;
}

.xb-selected-product,
.xb-empty-product-slot {
    position: relative;
    min-height: 210px;
    border: 1px solid #e4e4e4;
    border-radius: 12px;
    background: #fff;
}

.xb-selected-product {
    padding: 14px;
    text-align: center;
}

.xb-selected-product a {
    display: flex;
    height: 100%;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    color: inherit;
    text-decoration: none;
}

.xb-selected-product img {
    display: block;
    width: 110px;
    height: 110px;
    object-fit: contain;
}

.xb-remove-product {
    position: absolute;
    z-index: 2;
    top: 8px;
    left: 8px;
    width: 28px;
    height: 28px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: #f3f3f3;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
}

.xb-empty-product-slot {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    border-style: dashed;
    cursor: pointer;
}

.xb-plus {
    display: grid;
    width: 46px;
    height: 46px;
    place-items: center;
    border-radius: 50%;
    background: #fff3eb;
    color: #ff6900;
    font-size: 28px;
}

.xb-compare-empty {
    padding: 45px 20px;
    border: 1px dashed #ddd;
    border-radius: 12px;
    text-align: center;
}

.xb-compare-table-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border: 1px solid #e4e4e4;
    border-radius: 12px;
    background: #fff;
}

.xb-compare-table {
    width: 100%;
    min-width: 900px;
    border-collapse: collapse;
    table-layout: fixed;
    margin: 0;
}

.xb-compare-table th,
.xb-compare-table td {
    padding: 12px;
    border-left: 1px solid #e9e9e9;
    border-bottom: 1px solid #e9e9e9;
    vertical-align: middle;
    text-align: center;
    line-height: 1.8;
}

.xb-compare-table tr:last-child th,
.xb-compare-table tr:last-child td {
    border-bottom: 0;
}

.xb-compare-table th:first-child {
    position: sticky;
    right: 0;
    z-index: 2;
    width: 190px;
    background: #fafafa;
    font-weight: 800;
}

.xb-compare-table thead th {
    background: #fff;
}

.xb-compare-table thead th:first-child {
    z-index: 4;
}

.xb-compare-table thead a {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: inherit;
    text-decoration: none;
}

.xb-compare-table thead img {
    width: 90px;
    height: 90px;
    object-fit: contain;
}

.xb-compare-group-row th {
    position: static !important;
    width: auto !important;
    text-align: right;
    background: #f6f7f7 !important;
    font-size: 15px;
}

.xb-compare-data-row.is-different td {
    background: #fffaf6;
}

.xb-compare-notice {
    margin-bottom: 16px;
}

.xb-compare-modal[hidden] {
    display: none !important;
}

.xb-compare-modal {
    position: fixed;
    z-index: 999999;
    inset: 0;
    display: grid;
    place-items: center;
    padding: 18px;
}

.xb-compare-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, .52);
}

.xb-compare-modal-dialog {
    position: relative;
    width: min(720px, 100%);
    max-height: min(80vh, 720px);
    overflow: auto;
    padding: 18px;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 18px 50px rgba(0, 0, 0, .22);
}

.xb-compare-modal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}

.xb-compare-modal-head h2 {
    margin: 0;
}

.xb-modal-close {
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 50%;
    background: #f2f2f2;
    font-size: 25px;
    cursor: pointer;
}

.xb-compare-search {
    width: 100%;
    min-height: 46px;
    padding: 8px 12px;
    border: 1px solid #d7d7d7;
    border-radius: 8px;
}

.xb-compare-results {
    display: grid;
    gap: 8px;
    margin-top: 12px;
}

.xb-search-result {
    display: grid;
    grid-template-columns: 58px 1fr auto;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 9px;
    border: 1px solid #ececec;
    border-radius: 9px;
    background: #fff;
    text-align: right;
    cursor: pointer;
}

.xb-search-result:hover {
    border-color: #ff6900;
}

.xb-search-result:disabled {
    opacity: .5;
    cursor: not-allowed;
}

.xb-search-result img {
    width: 58px;
    height: 58px;
    object-fit: contain;
}

.xb-search-result-main {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.xb-search-result-main small {
    color: #777;
}

html.xb-modal-open {
    overflow: hidden;
}

@media (max-width: 767px) {
    .xb-product-spec-content th,
    .xb-product-spec-content td {
        padding: 9px 10px;
        font-size: 13px;
    }

    .xb-product-spec-content tr > th:first-child,
    .xb-product-spec-content tr > td:first-child {
        width: 42%;
    }

    .xb-compare-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .xb-compare-picker {
        display: flex;
        overflow-x: auto;
        padding-bottom: 6px;
    }

    .xb-selected-product,
    .xb-empty-product-slot {
        flex: 0 0 180px;
        min-height: 190px;
    }

    .xb-search-result {
        grid-template-columns: 52px 1fr;
    }

    .xb-search-result-price {
        grid-column: 2;
    }
}

/* نسخه 1.1.2: دکمه مقایسه تضمینی در قالب‌های سفارشی Elementor */
.xb-compare-button-fallback-source {
    display: none !important;
}

.xb-product-compare-action {
    width: 100%;
    margin: 12px 0 0;
}

.xb-product-compare-action .xb-compare-button {
    width: 100%;
    min-height: 44px;
    border: 1px solid #ff6900 !important;
    border-radius: 8px !important;
    background: #fff !important;
    color: #e85f00 !important;
    font-weight: 700;
    text-decoration: none !important;
}

.xb-product-compare-action .xb-compare-button:hover {
    background: #fff5ee !important;
    color: #d45600 !important;
}

.xb-product-compare-action.xb-compare-button-floating {
    position: fixed;
    z-index: 9998;
    left: 22px;
    bottom: 22px;
    width: auto;
    margin: 0;
}

.xb-product-compare-action.xb-compare-button-floating .xb-compare-button {
    width: auto;
    padding: 10px 18px !important;
    box-shadow: 0 8px 25px rgba(0, 0, 0, .14);
}

/* نسخه 1.1.2: نوار فشرده نام محصولات هنگام اسکرول جدول مقایسه */
.xb-compare-table-scroll > .xb-compare-sticky-head {
    display: none;
}

.xb-compare-sticky-head.is-floating {
    position: fixed;
    z-index: 9990;
    display: block;
    height: 68px;
    overflow: hidden;
    border: 1px solid #dedede;
    border-radius: 0 0 10px 10px;
    background: #fff;
    box-shadow: 0 8px 24px rgba(0, 0, 0, .12);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity .16s ease;
    direction: rtl;
}

.xb-compare-sticky-head.is-floating.is-visible {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.xb-compare-sticky-track {
    display: grid;
    height: 100%;
    background: #fff;
}

.xb-compare-sticky-cell {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    min-width: 0;
    padding: 8px 10px;
    border-left: 1px solid #e9e9e9;
    color: #222;
    text-decoration: none !important;
    background: #fff;
}

.xb-compare-sticky-label {
    font-weight: 800;
    background: #fafafa;
}

.xb-compare-sticky-product img {
    flex: 0 0 42px;
    width: 42px;
    height: 42px;
    object-fit: contain;
}

.xb-compare-sticky-product span {
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.65;
    text-align: right;
}

@media (max-width: 767px) {
    .xb-product-compare-action.xb-compare-button-floating {
        left: 12px;
        right: 12px;
        bottom: 12px;
        width: auto;
    }

    .xb-product-compare-action.xb-compare-button-floating .xb-compare-button {
        width: 100%;
    }

    .xb-compare-sticky-head.is-floating {
        height: 62px;
    }

    .xb-compare-sticky-product img {
        flex-basis: 34px;
        width: 34px;
        height: 34px;
    }

    .xb-compare-sticky-product span {
        font-size: 11px;
    }
}


/* نسخه 1.2.0: دکمه مقایسه مطمئن در صفحه محصول */
.xb-product-compare-action.is-mounted,
body.single-product .xb-product-compare-action {
    display: block;
    width: 100%;
    margin: 10px 0 0;
}
body.single-product .xb-product-compare-action .xb-compare-button {
    width: 100%;
    min-height: 42px;
    border: 1px solid #ff6900;
    border-radius: 8px;
    background: #fff;
    color: #ff6900;
    font-weight: 700;
    text-decoration: none;
}
body.single-product .xb-product-compare-action .xb-compare-button:hover {
    background: #ff6900;
    color: #fff;
}

/* نوار ثابت مقایسه: تمام‌عرض و بدون حالت باکس */
.xb-compare-sticky-head:not(.is-floating) {
    display: none !important;
}
.xb-compare-sticky-head.is-floating {
    position: fixed;
    z-index: 99990;
    left: 0 !important;
    right: 0 !important;
    width: 100vw !important;
    height: 64px;
    display: none;
    overflow: hidden;
    border: 0;
    border-radius: 0;
    background: #fff;
    box-shadow: 0 4px 14px rgba(0, 0, 0, .10);
}
.xb-compare-sticky-head.is-floating.is-visible {
    display: block;
}
.xb-compare-sticky-viewport {
    position: absolute;
    top: 0;
    height: 64px;
    overflow: hidden;
}
.xb-compare-sticky-track {
    display: grid;
    height: 64px;
    background: #fff;
}
.xb-compare-sticky-cell {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-width: 0;
    padding: 8px 12px;
    border-left: 1px solid #ececec;
    color: inherit;
    text-decoration: none;
    font-weight: 700;
    text-align: center;
}
.xb-compare-sticky-product img {
    width: 38px;
    height: 38px;
    object-fit: contain;
    flex: 0 0 38px;
}
.xb-compare-sticky-product span {
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-height: 1.45;
}
.xb-compare-sticky-label {
    background: #fafafa;
}

/* شورت‌کد محصولات هوشمند برای مقایسه */
.xb-smart-compare-section {
    direction: rtl;
    padding: 20px;
    border-radius: 12px;
}
.xb-smart-compare-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}
.xb-smart-compare-heading h2 {
    margin: 0;
    font-size: 18px;
}
.xb-smart-compare-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}
.xb-smart-compare-card {
    display: flex;
    min-width: 0;
    flex-direction: column;
    justify-content: space-between;
    gap: 12px;
    padding: 14px;
    border: 1px solid #e8e8e8;
    border-radius: 10px;
    background: #fff;
}
.xb-smart-compare-products {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 24px minmax(0, 1fr);
    align-items: center;
    gap: 6px;
}
.xb-smart-product {
    display: flex;
    min-width: 0;
    flex-direction: column;
    align-items: center;
    gap: 7px;
    color: inherit;
    text-align: center;
    text-decoration: none;
}
.xb-smart-product img {
    width: 82px;
    height: 82px;
    object-fit: contain;
}
.xb-smart-product-copy {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 3px;
}
.xb-smart-product-copy strong {
    font-size: 13px;
}
.xb-smart-product-copy small {
    display: -webkit-box;
    overflow: hidden;
    color: #666;
    font-size: 11px;
    line-height: 1.55;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}
.xb-smart-vs {
    color: #999;
    font-size: 20px;
    font-weight: 700;
    text-align: center;
}
.xb-smart-compare-link {
    display: inline-flex;
    min-height: 36px;
    align-items: center;
    justify-content: center;
    border: 1px solid #e2e2e2;
    border-radius: 18px;
    background: #fff;
    color: #333;
    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
}
.xb-smart-compare-link:hover {
    border-color: #ff6900;
    color: #ff6900;
}

@media (max-width: 900px) {
    .xb-smart-compare-grid {
        display: flex;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        padding-bottom: 6px;
    }
    .xb-smart-compare-card {
        flex: 0 0 82%;
        scroll-snap-align: start;
    }
}

@media (max-width: 767px) {
    .xb-compare-sticky-head.is-floating,
    .xb-compare-sticky-viewport,
    .xb-compare-sticky-track {
        height: 58px;
    }
    .xb-compare-sticky-cell {
        padding: 6px 8px;
        font-size: 11px;
    }
    .xb-compare-sticky-product img {
        width: 32px;
        height: 32px;
        flex-basis: 32px;
    }
    .xb-smart-compare-section {
        padding: 14px;
    }
    .xb-smart-compare-card {
        flex-basis: 92%;
    }
}

/* نسخه 1.2.1: نمایش قطعی دکمه محصول و جلوگیری از تداخل لینک کارت مشابه */
body.single-product .xb-product-compare-action {
    position: relative;
    z-index: 40;
    display: block !important;
    clear: both;
    width: 100% !important;
    max-width: none !important;
    visibility: visible !important;
    opacity: 1 !important;
}

body.single-product .xb-product-compare-action .xb-compare-button {
    display: flex !important;
    box-sizing: border-box;
    width: 100% !important;
    pointer-events: auto !important;
    cursor: pointer;
}

.xb-smart-compare-card {
    position: relative;
    isolation: isolate;
}

.xb-smart-compare-products,
.xb-smart-product {
    position: relative;
    z-index: 1;
}

.xb-smart-product {
    pointer-events: none;
}

.xb-smart-compare-link {
    position: relative;
    z-index: 50;
    width: 100%;
    pointer-events: auto !important;
    cursor: pointer;
}


/* نسخه 1.2.2: دکمه سروری و فرم مقاوم برای مقایسه */
.xb-smart-current-compare-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 8px 16px;
    border: 1px solid #ff6900;
    border-radius: 8px;
    background: #ff6900;
    color: #fff !important;
    font-size: 13px;
    font-weight: 800;
    text-decoration: none !important;
    position: relative;
    z-index: 50;
    pointer-events: auto;
}
.xb-smart-current-compare-button:hover {
    background: #e85f00;
    color: #fff !important;
}
.xb-smart-compare-form {
    position: relative;
    z-index: 50;
    margin: 0;
    pointer-events: auto;
}
.xb-smart-compare-form .xb-smart-compare-link {
    width: 100%;
    cursor: pointer;
    position: relative;
    z-index: 51;
    pointer-events: auto;
}
@media (max-width: 767px) {
    .xb-smart-compare-heading {
        align-items: stretch;
        flex-direction: column;
        gap: 10px;
    }
    .xb-smart-current-compare-button {
        width: 100%;
    }
}


/* XiaomiBazar Spec Table & Compare 2.0.0 — Unified */
.xbp-smart-section,.xbp-auto-button-wrap,.xbp-dom-button-wrap,#xbp-footer-button-source{display:none!important}
body.single-product .xb-smart-current-compare-button{display:none!important}
.xb-smart-compare-empty{margin:0;padding:17px 18px;border:1px dashed #ddd;border-radius:10px;background:#fafafa}
body .xb-compare-sticky-head{display:none!important}
.xb-exact-sticky-bar{position:fixed;z-index:99990;left:0;right:0;display:none;height:66px;overflow:hidden;background:#fff;box-shadow:0 4px 14px rgba(0,0,0,.10);direction:rtl}
.xb-exact-sticky-bar.is-visible{display:block}
.xb-exact-sticky-viewport{position:absolute;top:0;height:66px;overflow:hidden}
.xb-exact-sticky-table{position:absolute;top:0;height:66px;margin:0!important;border:0!important;border-collapse:collapse!important;table-layout:fixed!important;background:#fff}
.xb-exact-sticky-table tbody{display:none!important}
.xb-exact-sticky-table thead,.xb-exact-sticky-table thead tr{height:66px!important}
.xb-exact-sticky-table thead th{position:static!important;right:auto!important;left:auto!important;width:auto!important;height:66px!important;padding:7px 10px!important;border-top:0!important;border-bottom:1px solid #e9e9e9!important;background:#fff!important;box-sizing:border-box!important;vertical-align:middle!important}
.xb-exact-sticky-table thead th:first-child{position:static!important;right:auto!important;width:auto!important;background:#fafafa!important}
.xb-exact-sticky-table thead a{display:flex!important;flex-direction:row!important;align-items:center!important;justify-content:center!important;gap:9px!important;height:100%;color:inherit!important;text-decoration:none!important}
.xb-exact-sticky-table thead img{flex:0 0 40px!important;width:40px!important;height:40px!important;margin:0!important;object-fit:contain!important}
.xb-exact-sticky-table thead span{display:-webkit-box;overflow:hidden;font-size:13px!important;font-weight:800!important;line-height:1.55!important;text-align:center;-webkit-box-orient:vertical;-webkit-line-clamp:2}
.xb-smart-product-copy strong{text-transform:none!important;direction:ltr;unicode-bidi:plaintext}
@media(max-width:767px){.xb-exact-sticky-bar,.xb-exact-sticky-viewport,.xb-exact-sticky-table,.xb-exact-sticky-table thead,.xb-exact-sticky-table thead tr,.xb-exact-sticky-table thead th{height:60px!important}.xb-exact-sticky-table thead img{flex-basis:32px!important;width:32px!important;height:32px!important}.xb-exact-sticky-table thead span{font-size:11px!important}}


/* ==========================================================
   XiaomiBazar Spec Table & Compare 2.0.2
   ========================================================== */

/* پس‌زمینه سفید کامل بخش پیشنهاد هوشمند بدون تغییر عرض محتوای اصلی */
body.single-product .xb-smart-compare-section {
    position: relative;
    z-index: 1;
    padding: 26px 0 !important;
    border-radius: 0 !important;
    clip-path: inset(0 -100vmax);
}

body.single-product .xb-smart-compare-grid {
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 12px !important;
}

body.single-product .xb-smart-compare-card {
    background: #fff !important;
}

body.single-product .xb-smart-compare-form {
    display: block;
    width: 100%;
    margin: 0;
    position: relative;
    z-index: 60;
}

body.single-product button.xb-smart-compare-link {
    appearance: none;
    -webkit-appearance: none;
    width: 100%;
    min-height: 38px;
    padding: 8px 12px;
    border: 1px solid #ff6900;
    border-radius: 8px;
    background: #fff;
    color: #ff6900;
    font: inherit;
    font-size: 12px;
    font-weight: 800;
    line-height: 1.5;
    cursor: pointer;
    pointer-events: auto !important;
}

body.single-product button.xb-smart-compare-link:hover {
    background: #ff6900;
    color: #fff;
}

/* منبع جایگزین دکمه دیگر hidden نیست؛ JavaScript آن را کنار خرید منتقل می‌کند. */
body.single-product #xb-compare-button-fallback.xb-compare-button-fallback-source {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    width: min(100%, 420px);
    margin: 16px auto;
    padding: 0 16px;
    box-sizing: border-box;
}

@media (max-width: 1100px) and (min-width: 901px) {
    body.single-product .xb-smart-compare-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }
}

@media (max-width: 900px) {
    body.single-product .xb-smart-compare-grid {
        display: flex !important;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        padding-bottom: 6px;
    }

    body.single-product .xb-smart-compare-card {
        flex: 0 0 82%;
        scroll-snap-align: start;
    }
}


/* ==========================================================
   XiaomiBazar Spec Table & Compare 2.0.3
   Mobile overflow + group rows + visual redesign
   ========================================================== */

/* کارت‌های هوشمند موبایل: نمایش کامل هر کارت و نام‌های ترکیبی فارسی/انگلیسی */
.xb-smart-product-copy,
.xb-smart-product-copy strong,
.xb-smart-product-copy bdi {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
}

.xb-smart-product-copy strong {
    direction: inherit !important;
    unicode-bidi: normal !important;
    text-transform: none !important;
    white-space: normal;
    text-align: center;
    line-height: 1.55;
}

.xb-smart-product-copy bdi {
    display: block;
    overflow-wrap: anywhere;
    word-break: normal;
    white-space: normal;
}

/* جدول مقایسه: عرض متناسب با تعداد محصولات */
.xb-compare-table-scroll {
    position: relative;
    isolation: isolate;
    border: 1px solid #e2e6ea !important;
    border-radius: 16px !important;
    background: #fff;
    box-shadow: 0 8px 28px rgba(25, 32, 39, .055);
    scrollbar-color: #cfd4d8 transparent;
    scrollbar-width: thin;
}

.xb-compare-table {
    min-width: calc(190px + (var(--xb-product-count, 2) * 330px)) !important;
    border-collapse: separate !important;
    border-spacing: 0 !important;
    background: #fff;
}

.xb-compare-table th,
.xb-compare-table td {
    padding: 13px 15px;
    border-left: 1px solid #edf0f2 !important;
    border-bottom: 1px solid #edf0f2 !important;
    color: #30343a;
    font-size: 13px;
    line-height: 1.85;
}

.xb-compare-table thead th {
    background: #fff !important;
    border-bottom-color: #dfe4e8 !important;
}

.xb-compare-table thead th:first-child {
    background: #fff8f2 !important;
    color: #202327;
}

.xb-compare-table thead a span {
    display: -webkit-box;
    overflow: hidden;
    font-weight: 800;
    line-height: 1.65;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.xb-compare-system-row > th,
.xb-compare-data-row > th {
    background: #fffaf6 !important;
    color: #282b2f;
    font-weight: 800;
}

.xb-compare-system-row > td,
.xb-compare-data-row > td {
    background: #fff;
}

.xb-compare-data-row:nth-of-type(even) > td {
    background: #fcfdfe;
}

.xb-compare-data-row.is-different > td {
    background: #fff8f1 !important;
}

.xb-compare-data-row:hover > td {
    background: #fffdf9 !important;
}

/* خانواده‌ها دیگر TH نیستند؛ پس هیچ قانون Sticky ستون مشخصات روی آن‌ها اعمال نمی‌شود. */
.xb-compare-group-row > td {
    position: relative !important;
    z-index: 0 !important;
    width: auto !important;
    height: 54px;
    padding: 0 !important;
    border-left: 0 !important;
    border-top: 1px solid #e3e7ea !important;
    border-bottom: 1px solid #e3e7ea !important;
    background: linear-gradient(90deg, #f6f8fa 0%, #f2f5f7 100%) !important;
    text-align: right;
    overflow: visible;
}

.xb-compare-group-title {
    position: sticky;
    right: 14px;
    left: auto;
    z-index: 1;
    display: inline-flex;
    width: max-content;
    max-width: calc(100vw - 44px);
    min-height: 54px;
    align-items: center;
    gap: 10px;
    padding: 8px 4px;
    box-sizing: border-box;
    color: #202327;
    font-size: 15px;
    font-weight: 900;
    white-space: nowrap;
}

.xb-compare-group-icon {
    display: inline-grid;
    flex: 0 0 34px;
    width: 34px;
    height: 34px;
    place-items: center;
    border: 1px solid rgba(255, 105, 0, .22);
    border-radius: 10px;
    background: #fff;
    color: #ff6900;
    box-shadow: 0 3px 10px rgba(255, 105, 0, .08);
}

.xb-compare-group-icon svg {
    width: 19px;
    height: 19px;
}

/* زیباسازی جدول مشخصات داخل صفحه محصول */
.xb-product-spec-content h2,
.xb-product-spec-content h3,
.xb-product-spec-content h4 {
    position: relative;
    padding: 14px 54px 14px 16px !important;
    border-color: #e4e8eb !important;
    background: linear-gradient(90deg, #f7f9fa 0%, #f3f6f8 100%) !important;
    color: #25282c;
}

.xb-product-spec-content h2::before,
.xb-product-spec-content h3::before,
.xb-product-spec-content h4::before,
.xb-product-spec-content tr.xb-spec-group > th::before,
.xb-product-spec-content tr.xb-spec-group > td::before,
.xb-product-spec-content th[colspan="2"]::before,
.xb-product-spec-content td[colspan="2"]::before {
    content: "";
    display: inline-block;
    width: 28px;
    height: 28px;
    margin-left: 10px;
    border: 1px solid rgba(255, 105, 0, .22);
    border-radius: 9px;
    background-color: #fff;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ff6900' stroke-width='1.8' stroke-linecap='round'%3E%3Cpath d='M8 6h12M8 12h12M8 18h12'/%3E%3Cpath d='M4 6h.01M4 12h.01M4 18h.01'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 17px;
    vertical-align: middle;
    box-shadow: 0 3px 9px rgba(255, 105, 0, .07);
}

.xb-product-spec-content h2::before,
.xb-product-spec-content h3::before,
.xb-product-spec-content h4::before {
    position: absolute;
    top: 50%;
    right: 14px;
    margin: 0;
    transform: translateY(-50%);
}

.xb-product-spec-content table {
    border-color: #e3e7ea !important;
    border-radius: 12px !important;
    box-shadow: 0 6px 20px rgba(26, 31, 36, .04);
}

.xb-product-spec-content th,
.xb-product-spec-content td {
    border-bottom-color: #edf0f2 !important;
}

.xb-product-spec-content tr > th:first-child,
.xb-product-spec-content tr > td:first-child {
    background: #fffaf6 !important;
    border-left-color: #edf0f2 !important;
}

.xb-product-spec-content tr:nth-child(even) > td:not(:first-child) {
    background: #fcfdfe;
}

@media (max-width: 900px) {
    body.single-product .xb-smart-compare-grid {
        box-sizing: border-box;
        width: 100%;
        gap: 12px !important;
        padding: 0 14px 8px !important;
        scroll-padding-inline: 14px;
    }

    body.single-product .xb-smart-compare-card {
        flex: 0 0 calc(100% - 20px) !important;
        max-width: calc(100% - 20px);
        min-width: 0;
        box-sizing: border-box;
        overflow: hidden;
        scroll-snap-align: center !important;
    }

    body.single-product .xb-smart-compare-products {
        grid-template-columns: minmax(0, 1fr) 22px minmax(0, 1fr) !important;
        gap: 5px !important;
    }

    body.single-product .xb-smart-product img {
        width: 74px;
        height: 74px;
    }

    body.single-product .xb-smart-product-copy strong {
        font-size: 12px;
    }
}

@media (max-width: 767px) {
    .xb-compare-table {
        min-width: calc(145px + (var(--xb-product-count, 2) * 240px)) !important;
    }

    .xb-compare-table th,
    .xb-compare-table td {
        padding: 11px 10px;
        font-size: 12px;
    }

    .xb-compare-table th:first-child {
        width: 145px !important;
    }

    .xb-compare-group-row > td,
    .xb-compare-group-title {
        min-height: 50px;
        height: 50px;
    }

    .xb-compare-group-title {
        right: 10px;
        gap: 8px;
        font-size: 13px;
    }

    .xb-compare-group-icon {
        flex-basis: 30px;
        width: 30px;
        height: 30px;
        border-radius: 9px;
    }

    .xb-compare-group-icon svg {
        width: 17px;
        height: 17px;
    }

    body.single-product .xb-smart-compare-section {
        padding-top: 22px !important;
        padding-bottom: 22px !important;
    }
}
body.single-product .xb-smart-product-copy small {
    display: block !important;
    overflow: visible !important;
    -webkit-line-clamp: unset !important;
    -webkit-box-orient: initial !important;
    min-height: 36px;
    overflow-wrap: anywhere;
}