/* ============================================================
   Narmpa — Loops: Product Card + Archive  v3  (#B43F3F)
   ============================================================ */

/* ════════════════════════════════════════════
   Swiper base
   ════════════════════════════════════════════ */
.swiper-wrapper { align-items: stretch; }
.swiper-slide   { height: auto; }

.dm-products-slider,
.dm-posts-slider,
.dm-sp-products-slider,
.dm-posts-related-slider {
    padding: 4px 1.5rem 36px;
}
@media (min-width: 992px) {
    .dm-products-slider,
    .dm-posts-slider,
    .dm-sp-products-slider,
    .dm-posts-related-slider { padding-left: 0; padding-right: 0; }
}


/* ════════════════════════════════════════════
   کارت محصول
   ════════════════════════════════════════════ */
.dm-product-card {
    background: #fff;
    border-radius: 14px;
    padding: 10px;
    border: 1px solid #f0f0f0;
    display: flex;
    flex-direction: column;
    height: 100%;
    direction: rtl;
    position: relative;
    overflow: hidden;
    transition: box-shadow .25s ease, transform .25s ease, border-color .25s;
    box-sizing: border-box;
}
.dm-product-card:hover {
    box-shadow: 0 6px 22px rgba(0,0,0,.07);
    transform: translateY(-3px);
    border-color: #e8e8e8;
}

.dm-product-card .dm-product-card-link {
    text-decoration: none;
    display: flex;
    flex-direction: column;
    flex: 1;
    color: inherit;
}

/* تصویر — پرتره، پر */
.dm-product-card .dm-product-thumb {
    width: 100%;
    aspect-ratio: 3 / 4;
    position: relative;
    background: #f5f5f5;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 0;
}
.dm-product-card .dm-product-thumb img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .4s ease;
}
.dm-product-card:hover .dm-product-thumb img { transform: scale(1.05); }
/* تصویر اول گالری روی تصویر اصلی، فقط با هاور (دستگاه‌های لمسی هاور ندارند و همان تصویر اصلی را می‌بینند) */
.dm-product-card .dm-product-thumb .dm-product-thumb-hover { z-index: 1; opacity: 0; transition: opacity .35s ease, transform .4s; }
@media (hover: hover) {
    .dm-product-card:hover .dm-product-thumb .dm-product-thumb-hover { opacity: 1; }
}

/* بج تخفیف روی تصویر */
.dm-product-card .dm-product-badge {
    position: absolute;
    top: 8px; right: 8px;
    background: var(--dm-primary, #B43F3F);
    color: #fff;
    font-size: 11px; font-weight: 800;
    padding: 2px 8px;
    border-radius: 6px;
    z-index: 2;
}
.dm-product-card .dm-product-badge-oos {
    position: absolute;
    top: 8px;
    inset-inline-end: 8px;
    background: rgba(34,34,34,.82);
    color: #fff;
    font-size: 11px; font-weight: 800;
    padding: 2px 8px;
    border-radius: 6px;
    z-index: 2;
}
.dm-product-card--oos .dm-product-thumb img { opacity: .55; filter: grayscale(.6); }

/* اطلاعات — وسط‌چین */
.dm-product-card .dm-product-info {
    display: flex;
    flex-direction: column;
    flex: 1;
    gap: 8px;
    padding: 12px 6px 4px;
    align-items: center;
    text-align: center;
}

.dm-product-card .dm-product-title {
    font-size: 13.5px;
    font-weight: 700;
    color: #1a1a1a;
    line-height: 1.7;
    margin: 0;
    width: 100%;
    /* همیشه تک‌خطی؛ خط دوم نمایش داده نشود */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* قیمت — وسط، قرمز برند، همیشه یک خط (حتی با تخفیف) */
.dm-product-card .dm-product-price-wrapper {
    display: flex;
    flex-direction: row;
    align-items: baseline;
    justify-content: center;
    flex-wrap: nowrap;
    gap: 6px;
    direction: rtl;
    width: 100%;
    overflow: hidden;
}
.dm-product-card .dm-current-price { white-space: nowrap; }
.dm-product-card .dm-old-price { white-space: nowrap; flex-shrink: 0; }
.dm-product-card .dm-current-price {
    font-size: 14px;
    font-weight: 800;
    color: var(--dm-primary, #B43F3F);
    display: flex; align-items: baseline; gap: 3px;
}
.dm-product-card .dm-current-price .woocommerce-Price-currencySymbol {
    font-size: 11px; font-weight: 700; opacity: .85; margin-right: 2px;
}
.dm-product-card .dm-current-price .dm-price-suffix-img { height: 14px; }
.dm-product-card .dm-cur-unit { font-size: 11px; font-weight: 700; }
.dm-product-card .dm-old-price {
    font-size: 12px;
    color: #c0c0c0;
    text-decoration: line-through;
}
.dm-product-card .dm-old-price .woocommerce-Price-currencySymbol { display: none; }
.dm-product-card .dm-unavailable { color: #c0c0c0; font-size: 12.5px; font-weight: 600; }

/* دکمه (در صورت فعال بودن) */
.dm-add-to-cart-btn {
    display: flex; align-items: center; justify-content: center;
    gap: 5px; padding: 8px 12px; margin-top: 8px;
    border: none; border-radius: 9px;
    background: var(--dm-primary, #B43F3F); color: #fff;
    font-size: 12px; font-weight: 700;
    cursor: pointer; transition: opacity .2s;
    text-decoration: none; font-family: inherit; line-height: 1;
}
.dm-add-to-cart-btn:hover { opacity: .86; color: #fff; }
.dm-unavailable-btn { background: #f2f2f2; color: #c0c0c0; cursor: not-allowed; }
.dm-unavailable-btn:hover { opacity: 1; color: #c0c0c0; }

/* ════ سواچ‌های افزونه dm-product-variations داخل کارت ════ */
.dm-product-card .dm-pv-archive {
   display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 0 !important; /* ایجاد فاصله مناسب از بخش قیمت */
    padding-bottom: 5px; /* جلوگیری از چسبیدن به خط پایین کارت */
    align-items: center;
    width: 100%;
}
.dm-product-card .dm-pv-archive-row {
    display: flex;
    flex-wrap: wrap; /* اجازه شکستن المان‌ها به خط بعدی */
    justify-content: center;
    align-items: center;
    gap: 5px;
    width: 100%;
    padding: 1px;
    display: none;
}
/* سایزها — چیپ */
.dm-product-card .dm-pv-archive-label {
    min-width: 12px;
    padding: 4px 8px;
    border: 1px solid #e2e2e2;
    border-radius: 7px;
    font-size: 11.5px;
    font-weight: 700;
    color: #555;
    text-align: center;
    background: #fff;
    transition: border-color .15s, color .15s;
}
.dm-product-card:hover .dm-pv-archive-label { border-color: #d8d8d8; }
/* رنگ‌ها — دایره */
.dm-product-card .dm-pv-archive-color {
    width: 18px; height: 18px;
    border-radius: 50%;
    border: 2px solid #fff;
    box-shadow: 0 0 0 1.5px #ddd;
    display: inline-block;
}
.dm-product-card .dm-pv-archive-image {
    width: 22px; height: 22px;
    border-radius: 50%;
    background-size: cover; background-position: center;
    box-shadow: 0 0 0 1.5px #ddd;
}
.dm-product-card .dm-pv-archive-more {
    font-size: 11px; font-weight: 700; color: #aaa;
    align-self: center;
}

@media (max-width: 576px) {
    .dm-product-card .dm-pv-archive {
        gap: 6px;
        margin-top: 10px;
    }

    .dm-product-card .dm-pv-archive-row {
        gap: 4px; /* کاهش فاصله بین سایزها برای جا شدن موارد بیشتر */
    }

    .dm-product-card .dm-pv-archive-label {
        padding: 3px 6px; /* کاهش پدینگ داخلی در گوشی */
        font-size: 10.5px; /* کوچکتر شدن فونت سایزها */
    }

    .dm-product-card .dm-pv-archive-color {
        width: 16px;
        height: 16px;
    }
}


/* ════════════════════════════════════════════
   کارت مقاله
   ════════════════════════════════════════════ */
.dm-post-card {
    /*background: #fff;*/
    border-radius: 14px;
    /*border: 1px solid #f0f0f0;*/
    display: flex;
    flex-direction: column;
    direction: rtl;
    overflow: hidden;
    transition: box-shadow .25s, transform .25s;
}
.dm-post-card:hover {
    box-shadow: 0 3px 10px rgba(0,0,0,.07);
    transform: translateY(-2px);
}
.dm-post-card .dm-post-card-link {
    text-decoration: none;
    display: flex;
    flex-direction: column;
    color: inherit;
}
.dm-post-card .dm-post-thumb {
    width: 100%;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: #f4f4f4;
    flex-shrink: 0;
}
.dm-post-card .dm-post-thumb img {
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform .5s ease;
    display: block;
}
.dm-post-card:hover .dm-post-thumb img { transform: scale(1.04); }
.dm-post-thumb-placeholder { width: 100%; height: 100%; background: linear-gradient(135deg, #f0f0f0, #e4e4e4); }

.dm-post-card .dm-post-content {
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 7px;
}
.dm-post-card .dm-post-category {
    background: rgba(180,63,63,.08);
    color: var(--dm-primary, #B43F3F);
    font-size: 11px;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 5px;
    display: inline-block;
    align-self: flex-end;
}
.dm-post-card .dm-post-title {
    font-size: 14px;
    font-weight: 800;
    color: #222;
    line-height: 1.75;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.dm-post-card .dm-post-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid #f4f4f4;
    padding-top: 10px;
    margin-top: 4px;
    font-size: 12px;
    color: #bbb;
    font-weight: 500;
}


/* ════════════════════════════════════════════
   ARCHIVE WRAP
   ════════════════════════════════════════════ */
.dm-archive-wrap { direction: rtl; background: #f7f7f7; min-height: 60vh; }
.dm-container { max-width: 1500px; margin: 0 auto; padding: 0 14px; }

/* Breadcrumb */
.dm-archive-breadcrumb {
    background: #fff;
    border-bottom: 1px solid #efefef;
    padding: 10px 0;
}
.dm-archive-breadcrumb .woocommerce-breadcrumb { margin: 0; font-size: 12px; color: #bbb; }
.dm-archive-breadcrumb a { color: #bbb; text-decoration: none; transition: color .15s; }
.dm-archive-breadcrumb a:hover { color: var(--dm-primary, #B43F3F); }

/* Header */
.dm-archive-header { padding: 22px 0 14px; }
.dm-archive-title { font-size: 20px; font-weight: 900; color: #1a1a1a; margin: 0 0 10px; }

.dm-archive-desc-wrap { position: relative; margin-bottom: 30px;}
.dm-archive-desc-text {
    font-size: 13px; color: #777; line-height: 2;
    max-height: 56px; overflow: hidden;
    transition: max-height .4s ease;
}
/* ارتفاع باز را JS از روی متن واقعی می‌گذارد (سقف ۴۲۰px)؛ متن بلندتر داخل کادر اسکرول می‌خورد */
.dm-archive-desc-text.is-scrollable {
    overflow-y: auto;
    overscroll-behavior: contain;
    padding-inline-end: 8px;
    scrollbar-width: thin;
    scrollbar-color: var(--dm-primary-20, rgba(180,63,63,.25)) transparent;
}
.dm-archive-desc-text.is-scrollable::-webkit-scrollbar { width: 6px; }
.dm-archive-desc-text.is-scrollable::-webkit-scrollbar-thumb { background: var(--dm-primary-20, rgba(180,63,63,.25)); border-radius: 6px; }
.dm-archive-desc-wrap.is-short .dm-archive-desc-text { max-height: none; }
.dm-show-more-btn[hidden] { display: none; }
.dm-show-more-btn {
    background: transparent; border: none;
    color: var(--dm-primary, #B43F3F);
    font-size: 12px; font-weight: 700;
    cursor: pointer; padding: 6px 0;
    display: block; font-family: inherit;
}

/* Sort bar */
.dm-archive-sort-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 16px;
    background: #fff;
    border-radius: 12px;
    margin: 18px 0;
    border: 1px solid #efefef;
    flex-wrap: wrap;
}
.dm-archive-result-count { font-size: 12.5px; color: #aaa; }
.dm-archive-result-count .woocommerce-result-count { margin: 0; }

.dm-archive-sort-btns { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; }
.dm-sort-label { font-size: 12px; color: #bbb; font-weight: 600; margin-left: 2px; }
.dm-sort-btn {
    padding: 5px 14px;
    border-radius: 20px;
    font-size: 12px; font-weight: 700;
    color: #777; background: #f4f4f4;
    text-decoration: none;
    transition: background .18s, color .18s;
    white-space: nowrap;
}
.dm-sort-btn:hover { background: var(--dm-primary-10, rgba(180,63,63,.08)); color: var(--dm-primary, #B43F3F); }
.dm-sort-btn.is-active { background: var(--dm-primary, #B43F3F); color: #fff; }

/* Grid */
.dm-archive-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 10px;
    row-gap: 10px;
    margin: 15px 0 0;
}
@media (max-width: 1200px) { .dm-archive-grid { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 900px)  { .dm-archive-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 600px)  { .dm-archive-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; row-gap: 10px; } }

/* Pagination */
.dm-archive-pagination { text-align: center; padding: 0; }
.dm-archive-pagination .woocommerce-pagination { margin: 0; }
.dm-archive-pagination ul.page-numbers {
    display: inline-flex; gap: 4px;
    list-style: none; margin: 0; padding: 0;
}
.dm-archive-pagination .page-numbers li a,
.dm-archive-pagination .page-numbers li span {
    display: flex; align-items: center; justify-content: center;
    width: 38px; height: 38px;
    border-radius: 9px;
    font-size: 13px; font-weight: 700;
    border: 1px solid #e8e8e8;
    background: #fff; color: #666;
    text-decoration: none;
    transition: border-color .18s, color .18s;
}
.dm-archive-pagination .page-numbers li a:hover {
    border-color: var(--dm-primary, #B43F3F);
    color: var(--dm-primary, #B43F3F);
}
.dm-archive-pagination .page-numbers li span.current {
    background: var(--dm-primary, #B43F3F);
    color: #fff;
    border-color: var(--dm-primary, #B43F3F);
}

.dm-archive-empty { text-align: center; padding: 60px 20px; color: #bbb; }

/* ════ Archive Category Banner ════ */
.dm-archive-cat-banner {
    position: relative;
    background: #f9eded;
    overflow: hidden;
    min-height: 160px;
    display: flex;
    align-items: flex-end;
    margin-bottom: 0;
}
.dm-archive-cat-img {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center left;
    opacity: .18;
}
.dm-archive-cat-content {
    position: relative;
    z-index: 2;
    width: 100%;
    padding: 24px 0 20px;
}
.dm-archive-cat-content .woocommerce-breadcrumb {
    font-size: 12px; color: rgba(180,63,63,.6);
    margin: 0 0 8px;
}
.dm-archive-cat-content .woocommerce-breadcrumb a { color: rgba(180,63,63,.6); text-decoration: none; }
.dm-archive-cat-head { display: flex; align-items: center; gap: 12px; }
.dm-archive-cat-headtext { min-width: 0; }
.dm-archive-back {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: rgba(255,255,255,.72);
    box-shadow: 0 1px 4px rgba(0,0,0,.06);
    color: var(--dm-primary, #B43F3F);
    text-decoration: none;
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
    transition: background .2s, transform .2s;
}
.dm-archive-back:hover { background: #fff; transform: translateX(2px); }
.dm-archive-back:focus-visible { outline: 2px solid var(--dm-primary, #B43F3F); outline-offset: 2px; }
@media (max-width: 768px) { .dm-archive-back { width: 36px; height: 36px; border-radius: 10px; } }
/* همان دکمه در هدر موبایل تک محصول: هدر سفید است، پس پس‌زمینهٔ رنگیِ کم‌رنگ تا دیده شود */
.dm-archive-back.dm-archive-back--header {
    width: 38px;
    height: 38px;
    background: var(--dm-primary-10, rgba(180,63,63,.08));
    box-shadow: none;
}
.dm-archive-cat-title {
    font-size: 26px; font-weight: 900;
    color: var(--dm-primary, #B43F3F);
    margin: 0;
}
.dm-archive-desc-heading {
    font-size: 18px; font-weight: 800;
    color: #1a1a1a; margin: 0 0 14px;
    padding-top: 40px;
}
@media (max-width: 768px) {
    .dm-archive-cat-banner { min-height: 120px; }
    .dm-archive-cat-title { font-size: 20px; }
}

/* ════ کاروسل زیردسته‌های انتخابی (انتهای بنر آرشیو) ════ */
.dm-archive-subcats { position: relative; margin-top: 16px; }
.dm-archive-subcats [hidden] { display: none !important; }
.dm-archive-subcats-slider {
    width: 100%;
    overflow: hidden;
    padding: 4px 2px 10px;
}
.dm-archive-subcats-slider .swiper-wrapper { align-items: stretch; }
.dm-archive-subcat-slide { height: auto; }

/* پیش از اجرای Swiper هر اسلاید تمام عرض را می‌گرفت و کارت‌ها یک لحظه بزرگ دیده می‌شدند.
   همان عرض نهایی از همین ابتدا با متغیرهای تعداد (روی خود المان) ساخته می‌شود تا صفحه نپرد. */
.dm-archive-subcats-slider:not(.swiper-initialized) .swiper-wrapper { display: flex; gap: 10px; overflow: hidden; }
.dm-archive-subcats-slider:not(.swiper-initialized) .dm-archive-subcat-slide {
    flex: 0 0 calc((100% - (var(--pv-m, 3.3) - 1) * 10px) / var(--pv-m, 3.3));
}
@media (min-width: 768px) {
    .dm-archive-subcats-slider:not(.swiper-initialized) .swiper-wrapper { gap: 12px; }
    .dm-archive-subcats-slider:not(.swiper-initialized) .dm-archive-subcat-slide {
        flex-basis: calc((100% - (var(--pv-t, 5) - 1) * 12px) / var(--pv-t, 5));
    }
}
@media (min-width: 1024px) {
    .dm-archive-subcats-slider:not(.swiper-initialized) .swiper-wrapper { gap: 14px; }
    .dm-archive-subcats-slider:not(.swiper-initialized) .dm-archive-subcat-slide {
        flex-basis: calc((100% - (var(--pv-d, 8) - 1) * 14px) / var(--pv-d, 8));
    }
}
.dm-archive-subcat-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    box-sizing: border-box;
    padding: 6px;
    text-decoration: none;
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 1px 3px rgba(0,0,0,.05), 0 0 0 1px rgba(0,0,0,.03);
    transition: transform .2s, box-shadow .2s;
}
.dm-archive-subcat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0,0,0,.08), 0 0 0 1px var(--dm-primary-20, rgba(180,63,63,.18));
}
.dm-archive-subcat-card:focus-visible { outline: 2px solid var(--dm-primary, #B43F3F); outline-offset: 2px; }
.dm-archive-subcat-media {
    display: block;
    aspect-ratio: 1 / 1;
    border-radius: 10px;
    overflow: hidden;
    /* پیش‌بارگذار: تا تصویر برسد یک موج ملایم؛ تصویر لودشده رویش می‌نشیند */
    background: linear-gradient(90deg, #f3f3f3 25%, #fafafa 50%, #f3f3f3 75%);
    background-size: 200% 100%;
    animation: dm-shimmer 1.4s linear infinite;
}
@media (prefers-reduced-motion: reduce) { .dm-archive-subcat-media { animation: none; } }
.dm-archive-subcat-media img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .35s ease;
}
.dm-archive-subcat-card:hover .dm-archive-subcat-media img { transform: scale(1.05); }
.dm-archive-subcat-body {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 8px 4px 3px;
    text-align: center;
}
.dm-archive-subcat-title {
    display: block;
    width: 100%;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    font-size: 12.5px;
    font-weight: 700;
    line-height: 1.6;
    color: var(--dm-text, #222);
}
.dm-archive-subcat-count { font-size: 11px; line-height: 1.5; color: #8a8a8a; }
.dm-archive-subcats--text .dm-archive-subcat-card { justify-content: center; min-height: 48px; }

/* دکمه‌های قبلی/بعدی — وسط ارتفاع تصویر کارت؛ در RTL «بعدی» سمت چپ است */
.dm-archive-subcats__nav {
    position: absolute;
    top: 38%;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: #fff;
    color: var(--dm-text, #222);
    box-shadow: 0 2px 10px rgba(0,0,0,.14);
    cursor: pointer;
    transform: translateY(-50%);
    transition: opacity .2s, color .2s, box-shadow .2s;
}
.dm-archive-subcats__nav:hover { color: var(--dm-primary, #B43F3F); box-shadow: 0 4px 14px rgba(0,0,0,.18); }
.dm-archive-subcats__nav:focus-visible { outline: 2px solid var(--dm-primary, #B43F3F); outline-offset: 2px; }
.dm-archive-subcats__nav--prev { inset-inline-start: -8px; }
.dm-archive-subcats__nav--next { inset-inline-end: -8px; }
.dm-archive-subcats__nav.is-disabled { opacity: 0; pointer-events: none; }
.dm-archive-subcats__nav.is-locked { display: none; }

@media (max-width: 768px) {
    .dm-archive-subcats { margin-top: 12px; }
    .dm-archive-subcat-card { padding: 5px; border-radius: 12px; }
    .dm-archive-subcat-media { border-radius: 8px; }
    .dm-archive-subcat-title { font-size: 11.5px; }
    .dm-archive-subcats__nav { width: 30px; height: 30px; }
    .dm-archive-subcats__nav--prev { inset-inline-start: -4px; }
    .dm-archive-subcats__nav--next { inset-inline-end: -4px; }
}


/* ════════════════════════════════════════════
   Skeleton Loader
   ════════════════════════════════════════════ */
.dm-skeleton-overlay {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 14px;
    margin-bottom: 32px;
}
@media (max-width: 1200px) { .dm-skeleton-overlay { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 900px)  { .dm-skeleton-overlay { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 600px)  { .dm-skeleton-overlay { grid-template-columns: repeat(2, 1fr); gap: 10px; } }

.dm-skel-card {
    background: #fff;
    border-radius: 14px;
    border: 1px solid #f0f0f0;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.dm-skel-img {
    width: 100%; padding-top: 100%;
    background: #f0f0f0;
    border-radius: 10px;
    position: relative;
    overflow: hidden;
}
.dm-skel-line {
    height: 12px;
    background: #f0f0f0;
    border-radius: 6px;
    overflow: hidden;
    position: relative;
}
.dm-skel-line--title  { width: 85%; }
.dm-skel-line--short  { width: 55%; height: 10px; }
.dm-skel-line--price  { width: 65%; height: 14px; }

.dm-skel-img::after,
.dm-skel-line::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,.55) 50%, transparent 100%);
    background-size: 200% 100%;
    animation: dm-shimmer 1.4s infinite;
}
@keyframes dm-shimmer {
    0%   { background-position: -200% 0; }
    100% { background-position:  200% 0; }
}

.woocommerce nav.woocommerce-pagination ul.page-numbers {
    border: none;
}

.woocommerce nav.woocommerce-pagination ul.page-numbers li {
    border: none;
}

.woocommerce nav.woocommerce-pagination ul li .page-numbers {
    margin-left: 10px;
}

/* ════════════════════════════════════════════
   Pagination (ووکامرس)
   ════════════════════════════════════════════ */
nav.woocommerce-pagination {
    text-align: center;
    padding: 5px 0;
    width: 100%;
    direction: rtl;
}

/* Reset default WooCommerce borders & margins */
nav.woocommerce-pagination ul.page-numbers {
    display: inline-flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin: 0;
    padding: 0;
    border: none;
    list-style: none;
}

nav.woocommerce-pagination ul.page-numbers li {
    border: none;
    margin: 0;
    padding: 0;
    display: block;
}

/* Number Buttons */
nav.woocommerce-pagination ul.page-numbers li .page-numbers {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    height: 42px;
    padding: 0 5px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 700;
    border: 1px solid #e8e8e8;
    background: #fff;
    color: #555;
    text-decoration: none;
    transition: all 0.2s ease;
    box-sizing: border-box;
    margin: 0; /* ریست کردن مارجین‌های پیش‌فرض ووکامرس */
}

/* Hover State */
nav.woocommerce-pagination ul.page-numbers li a.page-numbers:hover {
    border-color: var(--dm-primary, #B43F3F);
    color: var(--dm-primary, #B43F3F);
    background-color: #fdf5f5;
}

/* Current Page */
nav.woocommerce-pagination ul.page-numbers li span.current {
    background: var(--dm-primary, #B43F3F);
    color: #fff;
    border-color: var(--dm-primary, #B43F3F);
}

/* Dots */
nav.woocommerce-pagination ul.page-numbers li span.dots {
    border: none;
    background: transparent;
    color: #aaa;
    font-size: 18px;
    min-width: 24px;
    height: auto;
}

/* Responsive - Mobile Size adjustments */
@media (max-width: 576px) {
    nav.woocommerce-pagination {
        padding: 5px 0;
    }
    
    nav.woocommerce-pagination ul.page-numbers {
        gap: 5px;
    }
    
    nav.woocommerce-pagination ul.page-numbers li .page-numbers {
        min-width: 36px;
        height: 36px;
        font-size: 13px;
        border-radius: 8px;
    }
    
    nav.woocommerce-pagination ul.page-numbers li span.dots {
        min-width: 18px;
        font-size: 16px;
    }
}




/* ============================================================
   چیدمان آرشیو محصول با سایدبار فیلتر (افزونه dm-search-filter)
   ============================================================ */
.dm-archive-layout {
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    gap: 22px;
    align-items: start;
    padding: 18px 0 8px;
}
.dm-archive-sidebar { position: sticky; top: 20px; }

/* ── ظاهر سایدبار افزونهٔ فیلتر روی آرشیو این قالب ── */
/* عنوان «فیلترها» زائد است (ستون خودش معلوم است)؛ ولی لینک «حذف فیلترها» که در همان ردیف است باید بماند */
.dm-archive-sidebar .dms-sidebar-box__title { display: none; }
.dm-archive-sidebar .dms-sidebar-box__header:not(:has(.dms-sidebar-box__clear)) { display: none; }
.dm-archive-sidebar .dms-sidebar-box__header {
    justify-content: flex-end;
    padding: 0 2px 8px;
    border: 0;
}
.dm-archive-sidebar .dms-sidebar-box__clear {
    font-size: 12px;
    font-weight: 700;
    color: var(--dm-primary, #B43F3F);
    text-decoration: none;
}
.dm-archive-sidebar .dms-sidebar-box__clear:hover { text-decoration: underline; }

.dm-archive-sidebar .dms-sidebar-box--dmgold .dms-sidebar-box__plain { padding: 5px; }
.dm-archive-sidebar .dms-sidebar-box--dmgold .dms-accordion-item__toggle {
    padding: 8px 12px;
    font-size: 13px;
}
.dm-archive-sidebar .dms-sidebar-box--dmgold .dms-sidebar-box__plain,
.dm-archive-sidebar .dms-sidebar-box--dmgold .dms-accordion-item {
    border-radius: 12px;
    box-shadow: none;
}

.dm-archive-sidebar .dms-sort-bar--select { padding: 0; }
.dm-archive-sidebar .dms-sidebar-box--dmgold .dms-accordion-item__body { padding: 10px; }
.dm-archive-sidebar .dms-card.dms-search-attr-widget { margin-bottom: 5px; }
.dm-archive-sidebar .dms-sort-bar__label {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 0 0 6px;
    font-size: 12px;
    font-weight: 700;
    color: #777;
}
.dm-archive-sidebar .dms-sort-bar--select select:not(.dms-hidden) {
    -webkit-appearance: none;
    appearance: none;
    display: block;
    width: 100%;
    height: 40px;
    margin: 0;
    padding: 0 12px;
    padding-inline-end: 34px;
    border: 1px solid #ececec;
    border-radius: 10px;
    background-color: #fafafa;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23888' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: left 12px center;
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    color: var(--dm-text, #222);
    cursor: pointer;
    transition: border-color .2s, box-shadow .2s, background-color .2s;
}
.dm-archive-sidebar .dms-sort-bar--select select:not(.dms-hidden):focus {
    outline: none;
    border-color: var(--dm-primary, #B43F3F);
    background-color: #fff;
    box-shadow: 0 0 0 3px var(--dm-primary-10, rgba(180,63,63,.08));
}
.dm-archive-main { min-width: 0; }

/* نوار فیلتر موبایل: فقط در موبایل */
.dm-archive-mobilebar { display: none; }

/* در حضور سایدبار، گرید محصولات یک ستون کم‌تر */
.dm-archive-main .dm-archive-grid { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 1200px) { .dm-archive-main .dm-archive-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 768px) {
    /* موبایل: سایدبار و نوار مرتب‌سازیِ دسکتاپ حذف؛ نوار موبایلِ افزونه جایگزین */
    .dm-archive-layout { grid-template-columns: 1fr; }
    .dm-archive-sidebar,
    .dm-archive-sortwrap { display: none; }
    .dm-archive-mobilebar { display: block; }
}
@media (max-width: 600px) { .dm-archive-main .dm-archive-grid { grid-template-columns: repeat(2, 1fr); margin-top: 0;} 
    .dm-archive-layout {
        padding: 0;
    }
}


.dms-mobile-bar {
    background: transparent !important;
    margin-bottom: 0 !important;
}
