/* ========== فروشگاه و آرشیو محصولات ========== */

.newtic-archive-wrapper {
    direction: rtl;
    max-width: 1400px;
    margin: 0 auto;
    padding: 25px 15px;
}

/* دسته‌بندی‌ها - بدون اسکرول بار */
.xk7-category-hierarchy,
.xk7-subcategory-hierarchy {
    margin-bottom: 20px;
}

.woocommerce .woocommerce-breadcrumb a {
    color: #000000 !important;
    font-size: 12px !important;
    text-decoration: none;
    transition: color .15s ease;
}
.woocommerce .woocommerce-breadcrumb a:hover {
    color: #2563eb !important; /* همان رنگ لینک «همه محصولات ...» در مگامنو، برای یکدستی رنگ هاور */
}

/* عنوان اصلی (H1) صفحه فروشگاه/دسته‌بندی/جستجو */
.xk7-page-title {
    font-size: 22px;
    font-weight: 800;
    color: #1e293b;
    margin: 10px 0 6px;
    line-height: 1.4;
}
.xk7-page-desc {
    font-size: 13.5px;
    color: #6b7280;
    line-height: 1.9;
    margin: 0 0 16px;
}
@media (max-width: 768px) {
    .xk7-page-title { font-size: 18px; }
}





/* اسکرول بار دسته‌بندی‌ها - کاملاً مخفی */
.xk7-categories-boxes,
.xk7-subcategories-boxes {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    background-color: rgb(233 236 242 / 36%);
    gap: 4px;
    padding: 5px 12px 5px 13px;
    border-radius: 11px;
    scrollbar-width: none;
    -ms-overflow-style: none;
    cursor: grab;
}

.xk7-categories-boxes::-webkit-scrollbar,
.xk7-subcategories-boxes::-webkit-scrollbar {
    display: none;
    width: 0;
    height: 0;
    background: transparent;
}

.xk7-categories-boxes:active,
.xk7-subcategories-boxes:active {
    cursor: grabbing;
}

.xk7-categories-boxes .newboxtic,
.xk7-subcategories-boxes .newboxtic {
    background: #fff;
    padding: 12px;
    text-align: center;
    border-radius: 18px;
    text-decoration: none;
    flex: 0 0 auto;
    width: 128px;
    transition: all .2s;
    border: 1px solid rgba(0, 0, 0, .05);
}

.xk7-categories-boxes .newboxtic:hover,
.xk7-subcategories-boxes .newboxtic:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgb(0 0 0 / 5%);
}

.xk7-categories-boxes .box-text-tic,
.xk7-subcategories-boxes .box-text-tic {
    width: 80px;
    height: 80px;
    border-radius: 8px;
    object-fit: cover;
    padding: 3px;
}

.xk7-categories-boxes .box-text,
.xk7-subcategories-boxes .box-text {
    font-size: 11px;
    font-weight: 500;
    margin: 4px 0 0;
    color: #333;
}



.woocommerce .woocommerce-breadcrumb {
        margin: -10px 12px 13px !important;
    padding: 0 !important;
    font-size: 13px !important;
    color: #1e85be !important;
}

.xk7-woocommerce-breadcrumb {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    overflow-x: auto;
    white-space: nowrap;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.xk7-woocommerce-breadcrumb::-webkit-scrollbar {
    display: none;
}

.xk7-breadcrumb-separator {
    width: 13px;
    margin: 0px 5px -4px 5px;
}

/* فیلترهای فعال */
.xk7-active-filters {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 20px;
    margin-bottom: 20px;
    padding: 10px 15px;
    background: #f8fafc;
    border-radius: 12px;
}

.active-filters-title {
    font-size: 12px;
    font-weight: 400;
    color: #1e293b;
}

.active-filters-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.filter-tag {
    background: #2d87ff1c;
    padding: 5px 11px;
    border-radius: 8px;
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.filter-tag .remove-filter {
    cursor: pointer;
    color: #e50e0e;
    font-weight: 700;
    margin-right: 5px;
}

.clear-all-filters {
    background: 0 0;
    border: none;
    color: #f50606;
    font-size: 12px;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 5px;
    font-family: 'IRANYekanXfanum';
    background: #ffb6b647;
}

/* چیدمان دو ستونه */
.xk7-shop-layout {
    display: flex;
    gap: 25px;
}

.xk7-shop-sidebar {
    width: 280px;
    flex-shrink: 0;
}

.xk7-shop-main {
    flex: 1;
        padding-bottom: 60px;
}

@media (max-width: 990px) {
    .xk7-shop-sidebar {
        display: none;
    }
}

/* سایدبار فیلترها */
.xk7-filters-sidebar {
    background: #fff;
    border: 1px solid #e4e4e4;
    border-radius: 16px;
    padding: 20px;
    position: sticky;
    top: 30px;
}

.xk7-stock-filter-section {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.xk7-filter-title {
font-size: 13px;
    font-weight: 600;
    margin-bottom: 12px;
}

.xk7-stock-checkbox {
    width: 18px;
    height: 18px;
    margin-left: 8px;
}

.xk7-search-wrapper {
    display: flex;
}

.xk7-filter-search {
    flex: 1;
    padding: 9px;
    border: 1px solid #ed500529;
    border-radius: 0px 8px 8px 0px;
    font-size: 13px;
    max-width: 75%;
    font-family: 'IRANYekanXFaNum';
}

.xk7-search-btn {
    padding: 14px 4px;
    background: #ed500529;
    color: #972e06;
    border: none;
    border-radius: 8px 0px 0px 8px;
    cursor: pointer;
    font-family: 'IRANYekanXFaNum';
    font-size: 11px;
    width: 25%;
}

.xk7-accordion-item {
    border: 1px solid #e3e4f1;
    border-radius: 8px;
    margin: 20px 0px;
}

.xk7-accordion-header {
        display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 10px;
    cursor: pointer;
    font-weight: 600;
    font-size: 13px;
}

.xk7-accordion-icon {
    transition: transform .2s;
}

.xk7-accordion-content {
    padding-bottom: 25px;
}

.xk7-filter-options {
    display: flex;
    flex-direction: column;
    gap: 0px;
    max-height: 320px;
    overflow-y: auto;
}

.xk7-filter-options::-webkit-scrollbar {
    width: 4px;
}

.xk7-filter-options::-webkit-scrollbar-track {
    background: #eef2ff;
    border-radius: 10px;
}

.xk7-filter-options::-webkit-scrollbar-thumb {
    background: var(--ntic-primary, #E80545);
    border-radius: 10px;
}

.xk7-radio-label {
        display: flex;
    align-items: center;
    font-size: 13px;
    padding: 7px 18px 7px 20px;
    border-radius: 8px;
    cursor: pointer;
    flex-direction: row-reverse;
    justify-content: space-between;
}

.xk7-filter-checkbox {
    width: 16px;
    height: 16px;
}

.xk7-filter-actions {
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.xk7-filter-apply-btn,
.xk7-filter-reset-btn {
    padding: 12px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
}

button#xk7-apply-all-filters:hover {
    background: #113f8b;
    color: white;
}

button#xk7-reset-filters:hover {
    background: #ffdfdf;
    color: #c91313;
} 

.xk7-filter-apply-btn {
    background: var(--ntic-primary, #E80545);
    color: #fff;
    border: none;
    font-family: iranyekanXfanum;
}

.xk7-filter-reset-btn {
    background: #e4e4e4;
    color: #333;
    border: none;
    font-family: iranyekanXfanum;
}

/* هدر مرتب‌سازی */
.xk7-sort-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #fff;
    border: 1px solid #e4e4e4;
    border-radius: 16px;
    padding: 12px 20px;
    margin-bottom: 25px;
    flex-wrap: wrap;
    gap: 10px;
}

.xk7-sort-section {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.xk7-sort-label {
    font-size: 13px;
    font-weight: 600;
}

.xk7-sort-links {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.xk7-sort-link {
        text-decoration: none;
    color: #666 !important;
    font-size: 12px;
    padding: 5px 8px;
    border-radius: 30px;
    transition: all .2s;
    cursor: pointer;
}

.xk7-sort-link:hover,
.xk7-sort-link.active {
    color: var(--ntic-primary, #E80545);
    background: #e6f0ff;
}

.mobile-sort {
        display: none;
    padding: 10px 15px;
    background: white;
    border: 1px solid #ddd;
    border-radius: 10px;
    font-size: 12px;
    font-family: 'IRANYekanXFaNum';
}

.xk7-sort-select-mobile-wrap {
    display: none;
}

@media (max-width: 768px) {
    .xk7-sort-links {
        display: none;
    }
    .mobile-sort {
        display: block;
    }
    .xk7-sort-select-mobile-wrap {
        display: inline-flex;
    }
}

.xk7-count-section {
    font-size: 12px;
    color: #666;
}

/* گرید محصولات */
.xk7-products-grid {
    position: relative;
    min-height: 500px;
}

.xk7-grid-loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, .95);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    border-radius: 16px;
}

.xk7-grid-spinner {
    display: flex;
    gap: 6px;
}

.xk7-grid-dot {
    width: 10px;
    height: 10px;
    background: var(--ntic-primary, #E80545);
    border-radius: 50%;
    animation: xk7Bounce 1.2s infinite;
}

.xk7-grid-dot:nth-child(1) { animation-delay: 0s; }
.xk7-grid-dot:nth-child(2) { animation-delay: .15s; }
.xk7-grid-dot:nth-child(3) { animation-delay: .3s; }
.xk7-grid-dot:nth-child(4) { animation-delay: .45s; }
.xk7-grid-dot:nth-child(5) { animation-delay: .6s; }
.xk7-grid-dot:nth-child(6) { animation-delay: .75s; }
.xk7-grid-dot:nth-child(7) { animation-delay: .9s; }
.xk7-grid-dot:nth-child(8) { animation-delay: 1.05s; }

@keyframes xk7Bounce {
    0%, 80%, 100% { transform: scale(.6); opacity: .4; }
    40% { transform: scale(1); opacity: 1; }
}

.xk7-grid-constellation {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(264px, 1fr));
    gap: 15px;
}

@media (max-width: 1200px) {
    .xk7-grid-constellation {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 992px) {
    .xk7-grid-constellation {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .xk7-grid-constellation {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .xk7-grid-constellation {
        grid-template-columns: 1fr;
    }
}

/* کارت محصول */
.xk7-card {
    width: 100%;
    height: 305px;
    perspective: 1200px;
    position: relative;
}

.xk7-card-front,
.xk7-card-back {
    width: 100%;
    height: 305px;
    background: #fff;
    border: 1px solid #e4e4e4;
    transition: 0.4s;
    backface-visibility: hidden;
    position: absolute;
    top: 0;
    left: 0;
    padding: 8px;
    overflow: hidden;
    border-radius: 16px;
}

.xk7-card-front {
    transform: rotateY(0deg);
}

.xk7-card-back {
    transform: rotateY(180deg);
    background: linear-gradient(145deg, #fff, #f8fafc);
}

.xk7-card.flipped .xk7-card-front {
    transform: rotateY(180deg);
}

.xk7-card.flipped .xk7-card-back {
    transform: rotateY(0deg);
}

/* مدیا محصول */
.xk7-media-link {
    text-decoration: none;
    display: block;
}

.xk7-media-cave {
    position: relative;
    padding: 18px;
    height: 190px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.xk7-img-layer {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 175px !important;
    height: 175px !important;
    max-width: 175px !important;
    object-fit: contain;
    transform: translate(-50%, -50%);
    transition: .35s;
    border-radius: 8px;
}

.xk7-layer-front {
    opacity: 1;
    z-index: 2;
}

/* تصویر دوم همیشه پشت تصویر اول و ۱ پیکسل کوچک‌تر دیده می‌شود (افکت دسته‌ی عکس) */
.xk7-layer-back {
    opacity: 1;
    z-index: 1;
    width: 174px !important;
    height: 174px !important;
}

.xk7-card:hover .xk7-layer-front {
    opacity: 0;
}

.xk7-card:hover .xk7-layer-back {
    opacity: 1;
    width: 175px !important;
    height: 175px !important;
}

/* تخفیف */
.xk7-discount-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: #f53737;
    padding: 4px 10px;
    border-radius: 8px;
    z-index: 3;
}

.xk7-discount-value {
    color: #fff;
    font-size: 13px;
}

/* بلوک عنوان + امتیاز (عنوان بالا، امتیاز پایینش) */
.xk7-info-block {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

/* امتیاز و تعداد خریدار، زیر عنوان محصول در کارت */
.xk7-card-rating {
    display: flex;
    align-items: center;
    gap: 4px;
    margin: 0 5px;
    font-size: 11px;
    color: #64748b;
    direction: rtl;
}
.xk7-card-rating-star { display: inline-flex; flex-shrink: 0; }
.xk7-card-rating-value { font-weight: 700; color: #1e293b; }
.xk7-card-rating-buyers { color: #94a3b8; }

/* عنوان محصول */
.xk7-product-label {
        margin: 0 5px 4px;
    height: 40px;
    font-size: 13px;
    font-weight: 400;
    text-align: right;
    line-height: 50px;
    color: #242222;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
}

/* ردیف پایین کارت: قیمت (چپ) + دکمه سبد خرید (راست) در یک خط */
.xk7-bottom-row {
    display: flex;
    flex-direction: row-reverse;
    align-items: center;
    justify-content: space-between;
    padding: 0 15px;
    gap: 8px;
}

/* قیمت */
.xk7-price-territory {
    display: flex;
    flex-direction: column-reverse;
    align-items: flex-end;
}

.xk7-old-price {
    font-size: 16px;
    color: #c1c2e1;
    font-weight: 200;
    text-decoration: line-through;
    font-family: 'IRANYekanXFaNum', sans-serif;
}

.xk7-current-price,
.xk7-single-price {
    font-size: 17.5px;
    font-weight: 500;
    color: var(--ntic-primary, #E80545);
    display: inline-flex;
    align-items: center;
    gap: 3px;
    text-decoration: none;
}

.xk7-toman-icon {
    width: 0.95rem;
    filter: brightness(0) saturate(100%) invert(16%) sepia(84%) saturate(6765%) hue-rotate(340deg) brightness(96%) contrast(101%);
    height: 0.95rem;
    display: inline-block;
    margin-right: 1px;
}

.xk7-inquiry-link-text {
    color: #1354b5;
    font-size: 12px;
    background: #e4f1ff;
    padding: 6px 12px;
    border-radius: 8px;
    text-decoration: none;
}

/* دکمه سبد خرید */
.xk7-cart-trigger {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 10px;
    cursor: pointer;
    opacity: 0;
    transition: .3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.xk7-card:hover .xk7-cart-trigger {
    opacity: 1;
}

@media (max-width: 640px) {
    .xk7-cart-trigger {
        opacity: 1;
    }
}

/* پشت کارت */
.xk7-back-closer {
    position: absolute;
    top: 10px;
    right: 15px;
    width: 32px;
    height: 32px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    cursor: pointer;
    z-index: 25;
}

.xk7-back-scroll-zone {
    height: 100%;
    overflow-y: auto;
    padding: 40px 15px 15px;
}

.xk7-back-scroll-zone::-webkit-scrollbar {
    width: 3px;
}

.xk7-back-scroll-zone::-webkit-scrollbar-track {
    background: #e2e8f0;
    border-radius: 10px;
}

.xk7-back-scroll-zone::-webkit-scrollbar-thumb {
    background: var(--ntic-primary, #E80545);
    border-radius: 10px;
}

.xk7-back-price {
    background: #f1f5f9;
    padding: 12px;
    border-radius: 12px;
    margin-bottom: 15px;
    text-align: center;
}

.xk7-back-price .price-label {
    font-size: 12px;
    color: #64748b;
    display: block;
    margin-bottom: 5px;
}

.xk7-back-price .price-value {
    font-size: 18px;
    font-weight: 700;
    color: var(--ntic-primary, #E80545);
}

.xk7-back-price .price-value img {
    filter: brightness(0) saturate(100%) invert(16%) sepia(84%) saturate(6765%) hue-rotate(340deg) brightness(96%) contrast(101%);
}

.xk7-back-price .price-old {
        font-size: 13px;
    color: #94a3b8;
    text-decoration: line-through;
    margin-right: 8px;
}

img.price-currency-icon {
    width: 1rem;
    margin-bottom: 2px;
    vertical-align: middle;
}

/* قسمت تعداد - اصلاح شده */
.xk7-quantity-dock {
    margin: 15px 0;
}

.xk7-qty-label {
    font-size: 12px;
    font-weight: 600;
    text-align: center;
    margin-bottom: 8px;
    display: block;
}

.xk7-qty-console {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    direction: ltr;
}

.xk7-qty-cmd {
    width: 32px;
    height: 32px;
    background: #f1f5f9;
    border: 1px solid #ddd;
    border-radius: 8px;
    cursor: pointer;
    font-size: 18px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.xk7-qty-cmd:hover {
    background: #e2e8f0;
}

.xk7-qty-field {
    width: 55px;
    height: 32px;
    text-align: center;
    border: 1px solid #ddd;
    font-family: 'IRANYekanXFaNum';
    border-radius: 8px;
    font-size: 14px;
    -moz-appearance: textfield;
}

.xk7-qty-field::-webkit-inner-spin-button,
.xk7-qty-field::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.xk7-simple-add-back {
    width: 100%;
    background: var(--ntic-primary, #E80545);
    color: white;
    border: none;
    border-radius: 10px;
    padding: 12px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    margin-top: 10px;
    text-align: center;
    font-family: IRANYekanXFaNum;
    text-decoration: none;
    display: block;
}

.xk7-simple-add-back:hover {
    background: var(--ntic-primary-dark, #ac1712);
}

.xk7-simple-add-back:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* پیام استعلام */
.xk7-overlay-message {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, .85);
    color: #fff;
    padding: 20px;
    border-radius: 16px;
    text-align: center;
    width: 90%;
}

.xk7-overlay-phone {
    color: var(--ntic-primary, #E80545);
    text-decoration: none;
}

/* صفحه‌بندی */
.xk7-pagination-wrapper {
    margin-top: 30px;
    text-align: center;
}

.xk7-pagination-container {
    display: inline-flex;
    gap: 8px;
    align-items: center;
    background: #fff;
    padding: 8px 16px;
    border-radius: 48px;
    border: 1px solid #e4e4e4;
    flex-wrap: wrap;
    justify-content: center;
}

.xk7-page-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 10px;
    background: transparent;
    border: none;
    border-radius: 40px;
    text-decoration: none;
    color: #424750;
    font-size: 14px;
    cursor: pointer;
}

.xk7-page-link.active {
    background: var(--ntic-primary, #E80545);
    color: #fff;
}

.xk7-page-dots {
    color: #adb5bd;
}

/* توضیحات دسته */
.xk7-category-description {
   background: var(--ntic-primary-soft, #fff3f2);
    border-radius: 18px;
    padding: 31px;
    line-height: 70px;
    margin-top: 30px;
    border: 2px dashed var(--ntic-primary-light, #fdeceb);
}

.xk7-desc-short,
.xk7-desc-full {
font-size: 14.5px;
    line-height: 2.2;
    color: #282c32;
}

span.xk7-show-less {
    background: #ffffff;
    color: var(--ntic-primary, #E80545);
    padding: 10px 15px;
    border-radius: 10px;
    box-shadow: 0px 11px 25px rgba(232,5,69,.11);
}

span.xk7-show-more {
    background: #ffffff;
    color: var(--ntic-primary, #E80545);
    padding: 10px 15px;
    border-radius: 10px;
    box-shadow: 0px 11px 25px rgba(232,5,69,.11);
}

.xk7-desc-toggle {
    display: inline-block;
    margin-top: 10px;
    color: var(--ntic-primary, #E80545);
    text-decoration: none;
    font-size: 13px;
}

.xk7-no-products {
    text-align: center;
    padding: 50px;
    color: #999;
}

/* موبایل */
.xk7-mobile-filter-btn {
    display: none;
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: var(--ntic-primary, #E80545);
    color: #fff;
    border: none;
    border-radius: 50px;
    padding: 12px 18px;
    cursor: pointer;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, .2);
    gap: 8px;
    align-items: center;
}

@media (max-width: 990px) {
    .xk7-mobile-filter-btn {
        display: flex;
    }
}

.xk7-mobile-filter-overlay {
    position: fixed;
    top: 0;
    right: -100%;
    width: 85%;
    max-width: 400px;
    height: 100%;
    background: #fff;
    z-index: 10001;
    transition: right .3s;
    display: flex;
    flex-direction: column;
}

.xk7-mobile-filter-overlay.active {
    right: 0;
}

.xk7-mobile-filter-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid #e4e4e4;
}

.xk7-mobile-filter-close {
    background: #ff000014;
    border: none;
    padding: 8px 12px;
    border-radius: 8px;
    cursor: pointer;
}

.xk7-mobile-filter-content {
    flex: 1;
    overflow-y: auto;
    padding: 15px;
}

.xk7-mobile-filter-footer {
    display: flex;
    gap: 10px;
    padding: 15px;
    border-top: 1px solid #e4e4e4;
}

.xk7-mobile-filter-footer button {
    flex: 1;
    padding: 12px;
    border-radius: 10px;
    cursor: pointer;
}

.xk7-mobile-apply {
    background: var(--ntic-primary, #E80545);
    color: #fff;
    border: none;
}

.xk7-mobile-reset {
    background: #e4e4e4;
    color: #333;
    border: none;
}

.xk7-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, .5);
    z-index: 10000;
    display: none;
}

.xk7-backdrop.active {
    display: block;
}

/* انیمیشن */
@keyframes fadeInOut {
    0% { opacity: 0; transform: translateY(20px); }
    15% { opacity: 1; transform: translateY(0); }
    85% { opacity: 1; }
    100% { opacity: 0; visibility: hidden; }
}

.xk7-loading-spin {
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid white;
    border-top-color: transparent;
    border-radius: 50%;
    animation: xk7Spin .6s linear infinite;
    margin-left: 8px;
    vertical-align: middle;
}

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

/* اسکرول اصلی صفحه (بدون افکت اضافی) */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

* {
    scrollbar-width: thin;
    scrollbar-color: #c1c1c1 #f1f1f1;
}




@media (max-width: 768px) {

.xk7-card {
    width: 100%;
    height: 160px;
    perspective: 1200px;
    position: relative;
}
.xk7-card-front, .xk7-card-back {
    width: 100%;
    height: 163px;
    background: #fff;
    border: 1px solid #d3d2d2;
    box-shadow: 0 5px 10px #8f8b8b14;
    transition: 0.4s;
    backface-visibility: hidden;
    position: absolute;
    top: 0;
    left: 0;
    padding: 8px;
    overflow: hidden;
    border-radius: 16px;
}
.xk7-media-link {
    text-decoration: none;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-content: center;
    align-items: center;
    height: 89px;
}
.xk7-media-cave {
    position: relative;
    padding: 18px;
    height: 190px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.xk7-info-block {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: center;
    flex: 1;
    min-width: 0;
    gap: 6px;
}
.xk7-product-label {
    margin: 0 15px 0 7px;
    height: 49px;
    width: 100%;
    font-size: 13px;
    font-weight: 400;
    text-align: right;
    line-height: 24px;
    color: #242222;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}
.xk7-bottom-row {
    padding: 0 10px;
}
.xk7-price-territory {
    display: flex;
    flex-direction: column-reverse;
    align-items: flex-end;
}
.xk7-discount-badge {
    position: absolute;
    top: 108px;
    right: 80px;
    background: #f53737;
    padding: 2px 9px;
    border-radius: 8px;
    z-index: 3;
}
.xk7-img-layer {
    position: absolute;
    top: 22%;
    left: -35%;
    width: 90px !important;
    height: 90px !important;
    max-width: 90px !important;
    object-fit: contain;
    transform: translate(-50%, -50%);
    transition: .35s;
    border-radius: 8px;
}
.xk7-layer-back {
    width: 89px !important;
    height: 89px !important;
}
.xk7-card:hover .xk7-layer-back {
    width: 90px !important;
    height: 90px !important;
}
.xk7-cart-trigger {
    width: 36px;
    height: 36px;
}
.xk7-category-description {
    background: var(--ntic-primary-soft, #fff3f2);
    border-radius: 18px;
    padding: 18px;
    line-height: 44px;
    margin-top: -30px;
    margin-bottom: 65px;
    border: 2px dashed var(--ntic-primary-light, #fdeceb);
}
.xk7-desc-short, .xk7-desc-full {
    font-size: 13.5px;
    line-height: 2.2;
    color: #2a2c2e;
}
}



/* مودال از پایین برای موبایل */
@media (max-width: 990px) {
    .xk7-mobile-filter-overlay {
        position: fixed;
        bottom: -100%;
        right: 0;
        left: 0;
        top: auto;
        width: 100%;
        max-width: 100%;
        height: 80%;
        border-radius: 24px 24px 0 0;
        transition: bottom 0.3s ease;
        z-index: 10001;
        display: flex;
        flex-direction: column;
        box-shadow: 0 -5px 25px rgba(0, 0, 0, 0.15);
        background: #fff;
    }
    
    .xk7-mobile-filter-overlay.show {
        bottom: 0;
    }
    
    .xk7-mobile-filter-header {
        padding: 15px 20px;
        border-bottom: 1px solid #e4e4e4;
        border-radius: 24px 24px 0 0;
        background: #fff;
    }
    
    .xk7-mobile-filter-header h3 {
        margin: 0;
        font-size: 16px;
    }
    
    .xk7-mobile-filter-content {
        flex: 1;
        overflow-y: auto;
        padding: 15px;
        background: #fff;
    }
    
    .xk7-mobile-filter-footer {
        display: flex;
        gap: 10px;
        padding: 15px;
        border-top: 1px solid #e4e4e4;
        background: #fff;
    }
    
    .xk7-mobile-filter-footer button {
        flex: 1;
        padding: 12px;
        border-radius: 10px;
        cursor: pointer;
        font-family: 'IRANYekanXFaNum';
    }
    
    .xk7-mobile-apply {
        background: var(--ntic-primary, #E80545);
        color: #fff;
        border: none;
    }
    
    .xk7-mobile-reset {
        background: #e4e4e4;
        color: #333;
        border: none;
    }
    
    .xk7-mobile-filter-close {
        background: #ff000014;
        border: none;
        padding: 8px 12px;
        border-radius: 8px;
        cursor: pointer;
        font-size: 16px;
    }
    
    /* استایل دکمه فیلتر در هدر */
    .xk7-sort-header {
        display: flex;
        justify-content: flex-start;
        align-items: center;
        flex-wrap: wrap;
        gap: 10px;
    }

    /* مرتب‌سازی و فیلتر با هم راست‌چین، شمارش محصولات با فاصله خودکار به سمت چپ رانده می‌شود */
    .xk7-count-section {
        margin-inline-start: auto;
    }

    .xk7-sort-select-mobile-wrap {
        position: relative;
        display: inline-flex;
        align-items: center;
        gap: 6px;
        border: 1px solid #e2e8f0;
        border-radius: 5px;
        padding: 8px 12px;
        background: #fff;
    }
    .xk7-sort-select-mobile-label {
        display: flex;
        align-items: center;
        gap: 6px;
        font-size: 13px;
        color: #334155;
        white-space: nowrap;
        pointer-events: none;
    }
    .xk7-sort-select-mobile-wrap select#xk7-sort-select-mobile {
        position: absolute;
        inset: 0;
        width: 100%;
        height: 100%;
        opacity: 0;
        border: none;
        cursor: pointer;
        appearance: none;
    }

    .xk7-sort-header .xk7-mobile-filter-btn {
            display: flex;
    position: relative;
    bottom: auto;
    right: auto;
    background: transparent;
    border: none;
    box-shadow: none;
    color: #333;
    padding: 9px 4px;
    margin-left: 0;
    font-size: 13px;
    border-radius: 0;
    gap: 5px;
    align-items: center;
    order: 2;
    }
    
    .xk7-sort-header .xk7-count-section {
        order: 3;
    }
    
    .xk7-sort-section {
        order: 1;
    }
    
    /* backdrop تیره */
    .xk7-backdrop {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.5);
        z-index: 10000;
        display: none;
    }
    
    .xk7-backdrop.active {
        display: block;
    }
}

.xk7-variable-text-main {
    font-size: 12px;
    font-weight: 600;
    color: #323232;
    padding: 8px 10px;
}
.xk7-variable-text-sub {
    font-size: 11px;
    color: #201f1f;
    line-height: 1.7;
}
.xk7-variable-hint {
    text-align: center;
    margin-bottom: 20px;
}
a.xk7-variable-buy-btn {
    width: 100%;
    background: #f59e0b;
    color: white;
    border: none;
    border-radius: 10px;
    padding: 12px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    margin-top: 10px;
    text-align: center;
    font-family: IRANYekanXFaNum;
    text-decoration: none;
    display: block;
}












/* ========== مودال پاپ‌آپ سبد خرید ========== */
.xk7-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.7);
    backdrop-filter: blur(4px);
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: 0.2s ease;
}
.xk7-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}
.xk7-modal-container {
    background: white;
    border-radius: 28px;
    max-width: 450px;
    width: 90%;
    transform: scale(0.9);
    transition: 0.25s cubic-bezier(0.34, 1.2, 0.64, 1);
    box-shadow: 0 25px 50px rgba(0,0,0,0.3);
    overflow: hidden;
}
.xk7-modal-overlay.active .xk7-modal-container {
    transform: scale(1);
}
.xk7-modal-product {
    display: flex;
    gap: 16px;
    padding: 20px;
    align-items: center;
}
.xk7-modal-img {
    width: 70px;
    height: 70px;
    border-radius: 16px;
    object-fit: cover;
    background: #f1f5f9;
    padding: 6px;
    border: 1px solid #e2e8f0;
}
.xk7-modal-info {
    flex: 1;
}
.xk7-modal-title {
    font-size: 15px;
    font-weight: 600;
    color: #1e293b;
    margin: 0 0 6px 0;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.xk7-modal-price-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.xk7-modal-current-price {
    font-size: 17px;
    font-weight: 700;
    color: var(--ntic-primary, #E80545);
}
.xk7-modal-old-price {
    font-size: 13px;
    color: #94a3b8;
    text-decoration: line-through;
}
.xk7-modal-discount {
    background: #f8a203;
    color: white;
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 20px;
    font-weight: 600;
}
.xk7-modal-message {
    padding: 0 20px 10px 20px;
    font-size: 14px;
    color: #22c55e;
    font-weight: 500;
    text-align: right;
}
.xk7-modal-buttons {
    display: flex;
    gap: 12px;
    padding: 16px 20px 20px;
    border-top: 1px solid #e2e8f0;
}
.xk7-modal-btn {
    flex: 1;
    padding: 12px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    transition: 0.15s;
    border: none;
    font-family: inherit;
}
.xk7-modal-btn-primary {
    background: #3b82f6;
    color: white;
}
.xk7-modal-btn-primary:hover {
    background: var(--ntic-primary-dark, #ac1712);
}
.xk7-modal-btn-secondary {
    background: #f1f5f9;
    color: #334155;
}
.xk7-modal-btn-secondary:hover {
    background: #e2e8f0;
}
@media (max-width: 500px) {
    .xk7-modal-product { flex-direction: column; text-align: center; }
    .xk7-modal-price-row { justify-content: center; }
}
/* ============================================================
   کارت محصول همیشه به‌سبک دسکتاپ (تصویر بالا، نام/قیمت پایین، درصد
   تخفیف بالا-راست) — در تمام صفحات به‌جز خود صفحه فروشگاه/دسته‌بندی‌ها.
   صفحه فروشگاه در موبایل/تبلت همچنان چیدمان افقی مخصوص خودش را حفظ
   می‌کند و این بخش هیچ اثری روی آن ندارد چون کلاس .ntic-card-force-desktop
   فقط به کارت‌هایی که در صفحه اصلی/محصول تکی رندر می‌شوند اضافه می‌شود.
   ============================================================ */
@media (max-width: 768px) {
    .ntic-card-force-desktop.xk7-card {
        height: 305px !important;
    }
    .ntic-card-force-desktop .xk7-card-front,
    .ntic-card-force-desktop .xk7-card-back {
        height: 305px !important;
    }
    .ntic-card-force-desktop .xk7-media-link {
        display: block !important;
        flex-direction: column !important;
        height: auto !important;
    }
    .ntic-card-force-desktop .xk7-media-cave {
        padding: 18px !important;
        height: 190px !important;
    }
    .ntic-card-force-desktop .xk7-img-layer {
        top: 50% !important;
        left: 50% !important;
        width: 175px !important;
        height: 175px !important;
        max-width: 175px !important;
    }
    .ntic-card-force-desktop .xk7-layer-back {
        width: 174px !important;
        height: 174px !important;
    }
    .ntic-card-force-desktop .xk7-card:hover .xk7-layer-back {
        width: 175px !important;
        height: 175px !important;
    }
    .ntic-card-force-desktop .xk7-product-label {
        margin: 0 5px 2px !important;
        height: 40px !important;
        width: auto !important;
        line-height: 20px !important;
        -webkit-line-clamp: 2 !important;
    }
    .ntic-card-force-desktop .xk7-bottom-row {
        padding: 0 15px !important;
    }
    .ntic-card-force-desktop .xk7-price-territory {
        flex-direction: column-reverse !important;
        align-items: flex-end !important;
    }
    .ntic-card-force-desktop .xk7-discount-badge {
        top: 12px !important;
        right: 12px !important;
        left: auto !important;
        bottom: auto !important;
        padding: 4px 10px !important;
    }
    .ntic-card-force-desktop .xk7-cart-trigger {
        width: 40px !important;
        height: 40px !important;
    }
}
