/* ============================================================
   Narmpa — Single Product  v5  (طبق دیزاین، بدون sidebar)
   ============================================================ */

/* ── Container ── */
.dm-sp-wrap { direction: rtl; background: #fff; }
.dm-sp-container { max-width: 1500px; margin: 0 auto; padding: 10px; }

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


/* ════════════════════════════════════════════
   MAIN: گالری (راست RTL) + اطلاعات (چپ RTL)
   ════════════════════════════════════════════ */
.dm-sp-main {
    display: grid;
    grid-template-columns: 440px 1fr;
    gap: 48px;
    align-items: start;
    padding-top: 28px;
    margin-bottom: 48px;
}
.dm-sp-form { display: contents; }


/* ════════════════════════════════════════════
   گالری
   ════════════════════════════════════════════ */
.dm-sp-gallery { display: flex; flex-direction: column; gap: 12px; }

/* تصویر اصلی */
.dm-sp-img-main-wrap {
    position: relative;
    width: 100%;
    aspect-ratio: 9 / 12;
    /*border-radius: 20px;*/
    background: #f7f7f7;
    overflow: hidden;
    cursor: zoom-in;
}
.dm-sp-img-main {
    width: 100%; height: 100% !important;
    object-fit: cover;
    /*padding: 16px;*/
    transition: transform .4s ease;
}
.dm-sp-img-main-wrap:hover .dm-sp-img-main { transform: scale(1.04); }

/* بج تخفیف روی عکس */
.dm-sp-img-badge {
    position: absolute;
    top: 16px;
    right: 16px;
    background: var(--dm-primary, #B43F3F);
    color: #fff;
    font-size: 13px; font-weight: 800;
    padding: 4px 10px;
    border-radius: 8px;
    z-index: 2;
}

/* دکمه زوم */
.dm-sp-zoom-btn {
    position: absolute;
    bottom: 14px; left: 14px;
    width: 32px; height: 32px;
    background: rgba(255,255,255,.9);
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; color: #999;
    transition: border-color .18s, color .18s;
    backdrop-filter: blur(4px);
}
.dm-sp-zoom-btn:hover { border-color: var(--dm-primary, #B43F3F); color: var(--dm-primary, #B43F3F); }

/* سوشیال استریپ — گوشه راست‌بالای عکس */
.dm-sp-social-strip {
    position: absolute;
    top: 12px; left: 12px;
    display: flex; flex-direction: column; gap: 6px;
    z-index: 3;
}
.dm-sp-social-btn {
    width: 36px; height: 36px;
    background: rgba(255,255,255,.92);
    border: 1px solid #ececec;
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
    transition: border-color .18s, color .18s;
    backdrop-filter: blur(4px);
}
.dm-sp-social-btn:hover { border-color: var(--dm-primary, #B43F3F); color: var(--dm-primary, #B43F3F); }

.dm-wishlist-btn {
    border: none;
    outline: none;
}

/* تامبنیل‌ها */
.dm-sp-thumbs { display: flex; gap: 8px; flex-wrap: wrap; }
.dm-sp-thumb {
    width: 68px; height: 68px;
    border: 1.5px solid #eee;
    border-radius: 12px;
    padding: 0px;
    background: #f7f7f7;
    cursor: pointer;
    transition: border-color .15s;
    flex-shrink: 0;
        overflow: hidden;
}
.dm-sp-thumb img { width: 100%; height: 100%; object-fit: contain; }
.dm-sp-thumb.is-active,
.dm-sp-thumb:hover { border-color: var(--dm-primary, #B43F3F); }


/* ════════════════════════════════════════════
   ستون اطلاعات
   ════════════════════════════════════════════ */
.dm-sp-info { display: flex; flex-direction: column; gap: 20px; padding-top: 4px; }

.dm-sp-title {
    font-size: 22px; font-weight: 900;
    color: #1a1a1a; line-height: 1.55; margin: 0;
}

/* متا */
.dm-sp-meta {
    display: flex; align-items: center; gap: 8px;
    font-size: 12.5px; color: #aaa; flex-wrap: wrap;
    margin-top: -8px;
}
.dm-sp-meta-sep { color: #ddd; }
.dm-sp-meta-link { color: var(--dm-primary, #B43F3F); text-decoration: none; font-weight: 600; }
.dm-sp-meta-link:hover { text-decoration: underline; }

/* بج اصالت */
.dm-sp-badge-row { margin-top: -8px; }
.dm-sp-badge-auth {
    display: inline-flex; align-items: center; gap: 5px;
    background: #edf7f2; color: #16a34a;
    font-size: 11.5px; font-weight: 700;
    padding: 4px 10px; border-radius: 6px;
}

/* section label */
.dm-sp-section { display: flex; flex-direction: column; gap: 10px; }
.dm-sp-section-label {
    font-size: 13px; font-weight: 800; color: #2a2a2a;
    display: flex; align-items: center; gap: 7px;
}
.dm-sp-section-label::before {
    content: '';
    width: 3px; height: 14px;
    background: var(--dm-primary, #B43F3F);
    border-radius: 2px;
    display: inline-block;
}

/* متغیرها */
.dm-sp-variations { display: flex; flex-direction: column; gap: 16px; }
.dm-sp-attr-block { display: flex; flex-direction: column; gap: 10px; }
.dm-sp-attr-header { display: flex; align-items: center; gap: 7px; }
.dm-sp-attr-label { font-size: 13px; font-weight: 800; color: #2a2a2a; }
.dm-sp-attr-current { font-size: 13px; color: var(--dm-primary, #B43F3F); font-weight: 700; }
.dm-sp-variations select,
.dm-sp-attr-block select { display: none !important; }
.reset_variations { font-size: 12px; color: #bbb; text-decoration: none; }

/* Swatches */
.dm-sp-swatches { display: flex; gap: 8px; flex-wrap: wrap; }
.dm-swatch-circle {
    width: 36px; height: 36px; border-radius: 50%;
    border: 2.5px solid #fff;
    box-shadow: 0 0 0 1.5px #ddd;
    cursor: pointer;
    transition: box-shadow .15s, transform .15s;
}
.dm-swatch-circle:hover { box-shadow: 0 0 0 2px var(--dm-primary, #B43F3F); transform: scale(1.1); }
.dm-swatch-circle.is-active { box-shadow: 0 0 0 2.5px var(--dm-primary, #B43F3F); }

.dm-swatch-text {
    padding: 7px 16px;
    border-radius: 8px;
    border: 1.5px solid #e8e8e8;
    background: #fff;
    font-size: 13px; font-weight: 600; color: #555;
    cursor: pointer;
    transition: border-color .15s, color .15s, background .15s;
    font-family: inherit;
}
.dm-swatch-text:hover { border-color: var(--dm-primary, #B43F3F); color: var(--dm-primary, #B43F3F); }
.dm-swatch-text.is-active {
    border-color: var(--dm-primary, #B43F3F);
    background: var(--dm-primary-tint, #fdf2f2);
    color: var(--dm-primary, #B43F3F); font-weight: 700;
}

/* گارانتی */
.dm-sp-warranty-wrap { display: flex; gap: 8px; flex-wrap: wrap; }
.dm-sp-warranty-btn {
    display: inline-flex; align-items: center; gap: 7px;
    padding: 8px 14px;
    border: 1.5px solid #e8e8e8; border-radius: 9px;
    background: #fff; font-size: 13px; font-weight: 700; color: #444;
    cursor: pointer; transition: border-color .15s, background .15s;
    font-family: inherit;
}
.dm-sp-warranty-btn svg { color: var(--dm-primary, #B43F3F); }
.dm-sp-warranty-btn.is-active {
    border-color: var(--dm-primary, #B43F3F);
    background: var(--dm-primary-tint, #fdf2f2);
}

/* قیمت */
.dm-sp-price-box {
    background: #fafafa;
    border-radius: 14px;
    padding: 16px 18px;
    border: 1px solid #f0f0f0;
}
.dm-sp-price-inner { display: flex; flex-direction: column; gap: 6px; }
.dm-sp-price-top { display: flex; align-items: center; gap: 8px; }
.dm-sp-disc-badge {
    background: var(--dm-primary, #B43F3F); color: #fff;
    font-size: 12px; font-weight: 800;
    padding: 2px 9px; border-radius: 6px;
}
.dm-sp-old-price { font-size: 13px; color: #c0c0c0; text-decoration: line-through; }
.dm-sp-old-price bdi { color: #c0c0c0; }
.dm-sp-cur-price { font-size: 24px; font-weight: 900; color: #1a1a1a; direction: rtl; }
.dm-sp-cur-price bdi { font-size: 24px; }
.dm-sp-cur-price .woocommerce-Price-currencySymbol { font-size: 14px; font-weight: 500; color: #666; }
.dm-sp-select-hint { font-size: 12px; color: #ccc; text-align: center; padding: 8px 0; margin: 0; }

/* بازهٔ قیمت محصول متغیر (قبل از انتخاب) */
.dm-sp-price-range { font-size: 22px; font-weight: 900; color: #1a1a1a; direction: rtl; }
.dm-sp-price-range bdi { font-size: 22px; }
.dm-sp-price-range .woocommerce-Price-currencySymbol { font-size: 13px; font-weight: 500; color: #666; }
.dm-sp-price-range del { font-size: 14px; color: #c0c0c0; font-weight: 600; margin-left: 6px; }

/* WC variation */
.woocommerce-variation.single_variation { direction: rtl; }
.woocommerce-variation.single_variation .woocommerce-variation-price .price { font-size: 24px; font-weight: 900; color: #1a1a1a; }
.woocommerce-variation.single_variation .woocommerce-variation-availability { font-size: 12px; color: #16a34a; font-weight: 700; }

/* دکمه‌های خرید */
.single_variation_wrap .woocommerce-variation-add-to-cart { display: flex; flex-direction: column; gap: 10px; }
.dm-sp-buy-btns { display: grid; grid-template-columns: 1fr; gap: 10px; }
.dm-sp-buy-btns--single { grid-template-columns: 1fr; }
.dm-btn-primary { width: 100%; }

.dm-btn-primary {
    padding: 14px 12px;
    background: var(--dm-primary, #B43F3F); color: #fff;
    border: none; border-radius: 12px;
    font-size: 15px; font-weight: 800;
    cursor: pointer; transition: opacity .2s;
    font-family: inherit; text-align: center;
    display: flex; align-items: center; justify-content: center;
    text-decoration: none; line-height: 1;
}
.dm-btn-primary:hover { opacity: .88; color: #fff; }

/* ── ردیف خرید: شمارندهٔ تعداد + دکمهٔ افزودن ── */
.dm-sp-buy-row { display: flex; align-items: stretch; gap: 10px; }
.dm-sp-buy-row .dm-sp-buy-btns--single { flex: 1 1 auto; min-width: 0; }
/* کلاس‌های پیش‌فرض ووکامرس (button alt) رنگ و اندازهٔ خودشان را تحمیل می‌کردند */
.dm-sp-wrap .single_add_to_cart_button.button.alt.dm-btn-primary {
    width: 100%;
    height: 50px;
    margin: 0;
    padding: 0 20px;
    border: 0;
    border-radius: 12px;
    background: var(--dm-primary, #B43F3F);
    color: #fff;
    font-family: inherit;
    font-size: 15px;
    font-weight: 800;
    line-height: 1;
    box-shadow: 0 6px 16px var(--dm-primary-20, rgba(180,63,63,.18));
    transition: filter .2s, transform .1s;
}
.dm-sp-wrap .single_add_to_cart_button.button.alt.dm-btn-primary:hover { filter: brightness(.93); opacity: 1; color: #fff; }
.dm-sp-wrap .single_add_to_cart_button.button.alt.dm-btn-primary:active { transform: translateY(1px); }
.dm-sp-wrap .single_add_to_cart_button.button.alt.dm-btn-primary.disabled,
.dm-sp-wrap .single_add_to_cart_button.button.alt.dm-btn-primary:disabled { background: #e2e2e2; color: #999; box-shadow: none; cursor: not-allowed; }

.dm-qty {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    height: 50px;
    padding: 0 4px;
    border: 1.5px solid #ececec;
    border-radius: 12px;
    background: #fff;
}
.dm-qty__label { display: none; }
.dm-qty .quantity { margin: 0; }
.dm-qty .quantity .qty {
    width: 42px;
    height: 40px;
    padding: 0;
    border: 0;
    background: transparent;
    font-family: inherit;
    font-size: 16px;
    font-weight: 800;
    text-align: center;
    color: var(--dm-text, #222);
    -moz-appearance: textfield;
    appearance: textfield;
}
.dm-qty .quantity .qty::-webkit-outer-spin-button,
.dm-qty .quantity .qty::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.dm-qty .quantity .qty:focus { outline: none; }
.dm-qty:focus-within { border-color: var(--dm-primary, #B43F3F); }
.dm-qty__btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    border: 0;
    border-radius: 9px;
    background: var(--dm-bg-soft, #f6f6f6);
    color: var(--dm-text, #222);
    cursor: pointer;
    transition: background .2s, color .2s;
}
.dm-qty__btn:hover { background: var(--dm-primary-10, rgba(180,63,63,.08)); color: var(--dm-primary, #B43F3F); }
.dm-qty__btn:disabled { opacity: .35; cursor: not-allowed; }
.dm-qty__btn:focus-visible { outline: 2px solid var(--dm-primary, #B43F3F); outline-offset: 1px; }

/* ── نظرات (قالب استاندارد ووکامرس) ── */
.dm-sp-tab-panel #reviews .woocommerce-Reviews-title,
.dm-sp-tab-panel #reply-title { font-size: 16px; font-weight: 800; margin: 0 0 14px; }
.dm-sp-tab-panel #reviews ol.commentlist { margin: 0 0 20px; padding: 0; list-style: none; }
.dm-sp-tab-panel #reviews ol.commentlist li { margin: 0 0 12px; padding: 14px 16px; border: 1px solid #f1f1f1; border-radius: 12px; background: #fff; }
.dm-sp-tab-panel #reviews ol.commentlist li img.avatar { display: none; }
.dm-sp-tab-panel #reviews ol.commentlist li .comment-text { margin: 0; padding: 0; border: 0; }
.dm-sp-tab-panel #reviews .meta { font-size: 12px; color: #999; margin: 0 0 6px; }
.dm-sp-tab-panel #reviews .woocommerce-noreviews { color: #888; }
.dm-sp-tab-panel #review_form_wrapper { margin-top: 10px; padding: 18px; border-radius: 12px; background: var(--dm-bg-soft, #fafafa); }
.dm-sp-tab-panel #review_form label { display: block; margin: 0 0 6px; font-size: 13px; font-weight: 700; }
.dm-sp-tab-panel #review_form textarea,
.dm-sp-tab-panel #review_form input[type="text"],
.dm-sp-tab-panel #review_form input[type="email"] {
    width: 100%;
    padding: 10px 12px;
    border: 1.5px solid #ececec;
    border-radius: 10px;
    background: #fff;
    font-family: inherit;
    font-size: 14px;
    box-sizing: border-box;
}
.dm-sp-tab-panel #review_form textarea:focus,
.dm-sp-tab-panel #review_form input:focus { outline: none; border-color: var(--dm-primary, #B43F3F); }
.dm-sp-tab-panel #review_form .comment-form-rating { margin-bottom: 12px; }
.dm-sp-tab-panel #review_form p.stars a { color: #f5a623; }
.dm-sp-tab-panel #review_form .form-submit input[type="submit"],
.dm-sp-tab-panel #review_form .form-submit #submit {
    height: 46px;
    padding: 0 28px;
    border: 0;
    border-radius: 12px;
    background: var(--dm-primary, #B43F3F);
    color: #fff;
    font-family: inherit;
    font-size: 14px;
    font-weight: 800;
    cursor: pointer;
}
.dm-btn-primary.dm-btn-disabled,
.dm-btn-primary:disabled { background: #e0e0e0; color: #bbb; cursor: not-allowed; }

.dm-btn-secondary {
    padding: 14px 12px;
    background: #1e293b; color: #fff;
    border: none; border-radius: 12px;
    font-size: 15px; font-weight: 800;
    cursor: pointer; transition: opacity .2s;
    font-family: inherit;
}
.dm-btn-secondary:hover { opacity: .88; }

/* خدمات */
.dm-sp-services {
    display: flex; justify-content: space-between; align-items: center;
    padding: 18px 0;
    border-top: 1px solid #f0f0f0;
    border-bottom: 1px solid #f0f0f0;
    gap: 6px;
}
.dm-sp-svc-item {
    display: flex; flex-direction: column; align-items: center; gap: 6px;
    flex: 1; text-align: center;
    font-size: 11px; color: #666; font-weight: 600; line-height: 1.4;
}
.dm-sp-svc-icon { display: flex; align-items: center; justify-content: center; }


/* ════════════════════════════════════════════
   تب‌ها: توضیحات / مشخصات / نظرات
   ════════════════════════════════════════════ */
.dm-sp-tabs-section { margin-bottom: 48px; }

.dm-sp-tab-nav {
    display: flex; gap: 0;
    border-bottom: 2px solid #f0f0f0;
    margin-bottom: 24px;
    overflow-x: auto;
    scrollbar-width: none;
}
.dm-sp-tab-nav::-webkit-scrollbar { display: none; }

.dm-sp-tab-link {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 12px 22px;
    font-size: 14px; font-weight: 700;
    color: #aaa; text-decoration: none;
    border-bottom: 2.5px solid transparent;
    margin-bottom: -2px;
    white-space: nowrap;
    transition: color .18s, border-color .18s;
}
.dm-sp-tab-link:hover { color: #555; }
.dm-sp-tab-link.is-active { color: #1a1a1a; border-bottom-color: var(--dm-primary, #B43F3F); }

.dm-sp-tab-count {
    background: var(--dm-primary, #B43F3F); color: #fff;
    font-size: 10px; font-weight: 800;
    padding: 1px 6px; border-radius: 10px;
}

.dm-sp-tab-panel { display: none; }
.dm-sp-tab-panel.is-active { display: block; }

.dm-sp-short-desc { font-size: 14px; color: #555; line-height: 2; margin-bottom: 16px; }
.dm-sp-full-desc { font-size: 13.5px; color: #444; line-height: 2; }
.dm-sp-full-desc p { margin: 0 0 12px; }

/* مشخصات */
/* جدول مشخصات: هر ردیف یک نوار گوشه‌گرد — برچسب روی زمینهٔ رنگیِ کم‌رنگ، مقدار روی زمینهٔ خنثی */
.dm-sp-specs-tbl { width: 100%; border-collapse: separate; border-spacing: 0 6px; margin: -6px 0; }
.dm-sp-specs-tbl tr { border: 0; }
.dm-spec-extra { display: none; }
.dm-sp-specs-tbl tr.dm-spec-extra.is-visible { display: table-row; }
.dm-sp-specs-tbl th,
.dm-sp-specs-tbl td { padding: 12px 16px; border: 0; vertical-align: middle; line-height: 1.8; }
.dm-sp-specs-tbl th {
    width: 30%;
    text-align: start;
    font-size: 12.5px;
    font-weight: 700;
    color: var(--dm-primary, #B43F3F);
    background: var(--dm-primary-tint, rgba(180,63,63,.06));
    border-start-start-radius: 10px;
    border-end-start-radius: 10px;
}
.dm-sp-specs-tbl th::before {
    content: "";
    display: inline-block;
    width: 5px;
    height: 5px;
    margin-inline-end: 8px;
    border-radius: 50%;
    background: currentColor;
    opacity: .5;
    vertical-align: middle;
}
.dm-sp-specs-tbl td {
    font-size: 13.5px;
    font-weight: 600;
    color: var(--dm-text, #222);
    background: #fafafa;
    border-start-end-radius: 10px;
    border-end-end-radius: 10px;
}
.dm-sp-specs-tbl tr:hover th { background: var(--dm-primary-10, rgba(180,63,63,.1)); }
.dm-sp-specs-tbl tr:hover td { background: #f4f4f4; }
@media (max-width: 600px) {
    .dm-sp-specs-tbl th { width: 38%; padding: 10px 12px; font-size: 12px; }
    .dm-sp-specs-tbl td { padding: 10px 12px; font-size: 13px; }
}
.dm-sp-more-link {
    display: flex; align-items: center; gap: 4px;
    color: var(--dm-primary, #B43F3F); font-size: 13px; font-weight: 700;
    text-decoration: none; padding: 12px 0; justify-content: center;
}
.dm-sp-more-link:hover { opacity: .8; }

/* نظرات خالی */
.dm-sp-reviews-empty { padding: 32px 0; }
.dm-sp-reviews-empty-text h3 { font-size: 16px; font-weight: 800; color: #1a1a1a; margin: 0 0 8px; }
.dm-sp-reviews-empty-text p { font-size: 13px; color: #999; line-height: 1.75; margin: 0 0 16px; }
.dm-btn-review {
    display: inline-flex; padding: 10px 22px;
    background: var(--dm-primary, #B43F3F); color: #fff;
    border-radius: 10px; font-size: 13px; font-weight: 700;
    text-decoration: none; transition: opacity .2s;
}
.dm-btn-review:hover { opacity: .88; color: #fff; }

/* فرم نظر */
.dm-sp-tab-panel .comment-form { direction: rtl; max-width: 680px; }
.dm-sp-tab-panel .comment-form input,
.dm-sp-tab-panel .comment-form textarea {
    border: 1.5px solid #e8e8e8; border-radius: 8px;
    padding: 10px 12px; font-family: inherit;
    width: 100%; box-sizing: border-box; direction: rtl;
    transition: border-color .18s; outline: none;
}
.dm-sp-tab-panel .comment-form input:focus,
.dm-sp-tab-panel .comment-form textarea:focus { border-color: var(--dm-primary, #B43F3F); }
.dm-sp-tab-panel .comment-form .submit input {
    background: var(--dm-primary, #B43F3F); color: #fff; border: none;
    padding: 11px 24px; border-radius: 10px; font-size: 14px; font-weight: 700;
    cursor: pointer; width: auto; transition: opacity .2s;
}
.dm-sp-tab-panel .comment-form .submit input:hover { opacity: .88; }


/* ════════════════════════════════════════════
   بلوک‌های پایین: related / sale
   ════════════════════════════════════════════ */
.dm-sp-block { margin-bottom: 48px; }

.dm-sp-block-header {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 20px;
    padding-bottom: 14px;
    border-bottom: 1.5px solid #f0f0f0;
}
.dm-sp-block-title {
    font-size: 17px; font-weight: 900; color: #1a1a1a;
    margin: 0;
    display: flex; align-items: center; gap: 9px;
}
.dm-sp-block-title::before {
    content: '';
    width: 4px; height: 20px;
    background: var(--dm-primary, #B43F3F);
    border-radius: 2px; display: inline-block;
}
.dm-sp-view-all {
    font-size: 12.5px; font-weight: 700;
    color: var(--dm-primary, #B43F3F);
    text-decoration: none; opacity: .85;
    transition: opacity .2s;
}
.dm-sp-view-all:hover { opacity: 1; }

.dm-sp-products-slider { overflow: hidden; padding: 0; }
.dm-sp-products-slider .swiper-button-next,
.dm-sp-products-slider .swiper-button-prev { color: var(--dm-primary, #B43F3F); }


/* ════════════════════════════════════════════
   Share Tooltip
   ════════════════════════════════════════════ */
.dm-sp-share-wrap { position: relative; }
.dm-sp-share-tooltip {
    position: absolute;
    left: 44px; top: -6px;
    background: #fff; border: 1px solid #ececec;
    border-radius: 12px;
    box-shadow: 0 8px 28px rgba(0,0,0,.10);
    padding: 6px; display: flex; flex-direction: column; gap: 2px;
    min-width: 140px; z-index: 50;
    opacity: 0; visibility: hidden;
    transform: translateX(-6px);
    transition: opacity .18s, visibility .18s, transform .18s;
    pointer-events: none;
}
.dm-sp-share-wrap:hover .dm-sp-share-tooltip,
.dm-sp-share-wrap:focus-within .dm-sp-share-tooltip {
    opacity: 1; visibility: visible;
    transform: translateX(0); pointer-events: auto;
}
.dm-sp-share-item {
    display: flex; align-items: center; gap: 9px;
    padding: 8px 12px; border-radius: 8px;
    font-size: 13px; font-weight: 600; color: #333;
    text-decoration: none; background: transparent; border: none;
    cursor: pointer; font-family: inherit;
    transition: background .13s;
    white-space: nowrap; width: 100%;
    text-align: right; direction: rtl;
    box-sizing: border-box;
}
.dm-sp-share-item:hover { background: #f5f5f5; }
.dm-sp-share-item:nth-child(1) svg { color: #0088cc; }
.dm-sp-share-item:nth-child(2) svg { color: #25d366; }
.dm-sp-share-item:nth-child(3) svg { color: var(--dm-primary, #B43F3F); }


/* ════════════════════════════════════════════
   WooCommerce overrides
   ════════════════════════════════════════════ */
.dm-sp-wrap .woocommerce-breadcrumb { margin: 0; }
/* ورودی تعداد ووکامرس فقط داخل شمارندهٔ خود قالب دیده می‌شود (هر .quantity دیگری از افزونه‌ها پنهان می‌ماند) */
.dm-sp-wrap .quantity:not(.dm-qty .quantity) { display: none !important; }
.dm-sp-wrap input.qty:not(.dm-qty input.qty) { display: none !important; }

/* Waitlist */
.dm-sp-var-waitlist,
.dm-sp-buy-btns [class*="dm-waitlist"],
.dm-sp-buy-btns [class*="waitlist"] { width: 100%; }
.dm-sp-var-waitlist a,
.dm-sp-var-waitlist button,
.dm-sp-buy-btns [class*="waitlist"] a,
.dm-sp-buy-btns [class*="waitlist"] button {
    display: flex; align-items: center; justify-content: center;
    width: 100%; padding: 14px 12px;
    background: #1e293b; color: #fff !important;
    border: none; border-radius: 12px;
    font-size: 15px; font-weight: 800;
    cursor: pointer; font-family: inherit;
    text-decoration: none; transition: opacity .2s;
}
.dm-sp-var-waitlist a:hover,
.dm-sp-var-waitlist button:hover,
.dm-sp-buy-btns [class*="waitlist"] a:hover,
.dm-sp-buy-btns [class*="waitlist"] button:hover { opacity: .88; }


/* ════════════════════════════════════════════
   Responsive — 1200px
   ════════════════════════════════════════════ */
@media (max-width: 1200px) {
    .dm-sp-main { grid-template-columns: 380px 1fr; gap: 36px; }
}

/* ── 1024px ── */
@media (max-width: 1024px) {
    .dm-sp-main { grid-template-columns: 1fr 1fr; gap: 28px; }
}

/* ── 768px ── */
@media (max-width: 768px) {
    .dm-sp-container { padding: 10px; }
    .dm-sp-main {
        grid-template-columns: 1fr;
        gap: 0;
        padding-top: 0;
        margin-bottom: 28px;
    }

    /* گالری full-width */
    .dm-sp-img-main-wrap { border-radius: 0; background: #f5f5f5; }
    .dm-sp-thumbs { padding: 12px 16px 0; }

    /* اطلاعات با padding */
    .dm-sp-info { padding: 16px 16px 0; gap: 14px; }
    .dm-sp-title { font-size: 18px; }

    /* سوشیال استریپ عمودی در موبایل */
    .dm-sp-social-strip { left: 8px; top: 8px; }

    /* سرویس‌ها */
    .dm-sp-services { flex-wrap: wrap; padding: 14px 16px; }
    .dm-sp-svc-item { min-width: calc(33.33% - 8px); font-size: 10.5px; }

    /* تب‌ها */
    .dm-sp-tabs-section { padding: 0 16px; }
    .dm-sp-tab-link { padding: 10px 14px; font-size: 13px; }

    /* بلوک‌های پایین */
    .dm-sp-block { padding: 0 16px; margin-bottom: 0;}
    
    .dm-sp-wrap .woocommerce-breadcrumb {
        padding: 0 14px;
    }

}

/* ── 480px ── */
@media (max-width: 480px) {
    .dm-sp-main { grid-template-columns: 1fr; }
    .dm-sp-services { gap: 10px; }
    .dm-sp-svc-item { min-width: calc(50% - 8px); }
}

/* ════════════════════════════════════════════
   نوار خرید استیکی موبایل
   ════════════════════════════════════════════ */
.dm-sp-sticky-bar { display: none; }

@media (max-width: 768px) {
    .dm-sp-sticky-bar {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        position: fixed;
        bottom: 0; left: 0; right: 0;
        z-index: 200;
        background: #fff;
        padding: 10px 16px calc(10px + env(safe-area-inset-bottom, 0px));
        box-shadow: 0 -4px 20px rgba(0,0,0,.12);
        border-radius: 16px 16px 0 0;
    }
    .dm-sp-sticky-btn {
        flex: 1;
        background: var(--dm-primary, #B43F3F);
        color: #fff; border: none;
        border-radius: 11px;
        padding: 13px;
        font-size: 14px; font-weight: 800;
        font-family: inherit; cursor: pointer;
        transition: opacity .2s;
    }
    .dm-sp-sticky-btn:active { opacity: .85; }
    .dm-sp-sticky-price { flex-shrink: 0; text-align: left; }
    .dm-sp-sticky-amount { font-size: 15px; font-weight: 900; color: #1a1a1a; }
    .dm-sp-sticky-amount .woocommerce-Price-currencySymbol { font-size: 11px; font-weight: 500; color: #777; }
    .dm-sp-sticky-amount del { display: none; }

    /* فضای پایین برای نوار استیکی */
    /*.dm-sp-wrap { padding-bottom: 76px; }*/

    /* چون نوار خرید استیکی در موبایل هست، دکمهٔ افزودن به سبد داخل صفحه تکراری است */
    .dm-sp-buy-btns--single { display: none !important; }
    /* دکمهٔ افزودن در موبایل در نوار چسبان است؛ شمارندهٔ تعداد همین‌جا تمام‌عرض می‌ماند و نوار چسبان همین فرم را می‌فرستد */
    .dm-qty { flex: 1 1 auto; }
    .dm-qty__label { display: block; margin-inline-end: auto; padding-inline: 8px; font-size: 13px; font-weight: 700; color: #555; }
}

/* وقتی کشوی سبد خرید باز است، نوار استیکی نباید روی دکمه‌های «سبد/تسویه» بیفتد */
body:has(#js-mini-cart-panel.is-open) .dm-sp-sticky-bar { display: none !important; }

.dm-wishlist-btn {
    background: none;
}


/* استایل کادر کلی تب‌ها */
.dm-sp-tabs-section .dm-sp-tab-panel {
    position: relative;
    background-color: #ffffff;
    border: 1px solid #f9ebeb; /* حاشیه کمرنگ دور کادر */
    padding: 35px 30px;
    border-radius: 8px;
    margin-top: 15px;
    overflow: hidden;
    line-height: 2;
}

/* واترمارک "نرم پا" در پس‌زمینه سمت چپ پایین */
.dm-sp-tabs-section .dm-sp-tab-panel::after {
    content: "";
    position: absolute;
    bottom: -75px;
    left: 10px;
    width: 200px;
    height: 290px;
    /* به جای آدرس زیر، آدرس تصویر واترمارک سایت خودتان را قرار دهید */
    background-image: url('https://test.narmpa.com/wp-content/uploads/2026/07/watermark-narmpa.png'); 
    background-size: contain;
    background-repeat: no-repeat;
    background-position: bottom left;
    opacity: 0.04; /* میزان کمرنگی واترمارک */
    pointer-events: none;
    z-index: 0;
}

/* اطمینان از قرار گرفتن متن‌ها روی واترمارک */
.dm-sp-tabs-section .dm-sp-tab-panel > * {
    position: relative;
    z-index: 1;
}

/* استایل تیترهای داخل تب (مثل "توضیحات محصول") */
.dm-sp-tabs-section .dm-sp-tab-panel h2,
.dm-sp-tabs-section .dm-sp-tab-panel h3 {
    font-size: 28px;
    font-weight: 900;
    color: #142a38;
    border-bottom: 2px solid #b43f3f; /* خط قرمز زیر تیتر */
    padding-bottom: 12px;
    margin-bottom: 25px;
    display: inline-block;
}


/* استایل دکمه‌ها */
.dm-extra-actions {
    display: flex;
    justify-content: space-between;
    gap: 15px;
    margin-top: 25px;
    border-top: 1px solid #f2f2f2;
    padding-top: 25px;
}

.dm-extra-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: transparent;
    border: 1px solid #f9ebeb;
    color: #142a38;
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
}

.dm-extra-btn:hover {
    border-color: #b43f3f;
    color: #b43f3f;
}

.dm-extra-btn:hover svg {
    stroke: #b43f3f;
}

/* موبایل: دو دکمه کنار هم و تک‌خطی (نه دو ردیف/دو خط) */
@media (max-width: 600px) {
    .dm-extra-actions { gap: 8px; margin-top: 18px; padding-top: 18px; }
    .dm-extra-btn {
        flex: 1 1 0;
        min-width: 0;
        padding: 10px 6px;
        font-size: 12px;
        gap: 6px;
        white-space: nowrap;
    }
    .dm-extra-btn svg { width: 18px; height: 18px; flex-shrink: 0; }
}

/* استایل مدال (پاپ‌آپ) */
.dm-custom-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.dm-custom-modal.is-open {
    opacity: 1;
    visibility: visible;
}

.dm-modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    cursor: pointer;
}

.dm-modal-content {
    position: relative;
    background: #fff;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    border-radius: 12px;
    /*padding: 30px;*/
    z-index: 1;
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

.dm-custom-modal.is-open .dm-modal-content {
    transform: translateY(0);
}

.dm-modal-close {
    position: absolute;
    top: 15px;
    left: 15px;
    background: transparent;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: #333;
    line-height: 1;
}

/* در صورتی که ویدیو آپارات بود */
.dm-modal-body iframe,
.dm-modal-body video {
    width: 100%;
    max-height: 400px;
    border-radius: 8px;
}

.dm-modal-body img {
    max-width: 100%;
    height: auto;
}


/* بازگردانی ظاهر مینیمال قالب و لغو استایل‌های افزونه */
.dm-sp-wrap .variable-items-wrapper .variable-item {
    border: 1px solid #ddd !important;
    border-radius: 4px !important;
    box-shadow: none !important;
    background-color: #fff !important;
    color: #333 !important;
    min-width: 40px !important;
    
    height: 40px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 10px !important;
}

.dm-sp-wrap .variable-items-wrapper .variable-item:hover,
.dm-sp-wrap .variable-items-wrapper .variable-item.selected {
    border-color: #333 !important;
    background-color: #333 !important;
    color: #fff !important;
}

/* اعمال ضربدر داینامیک روی متغیرهای ناموجود */
.dm-sp-wrap .dm-soldout {
    position: relative !important;
    opacity: 0.5 !important;
    cursor: not-allowed !important;
    /*pointer-events: none !important;*/
    /* این خط حیاتی است: اگر این المان خودش overflow:hidden نداشته باشد، 
       ممکن است قبل و بعدش به دلیل عرض زیاد دیده نشوند */
    overflow: hidden !important;
}

.dm-sp-wrap .dm-soldout::before,
.dm-sp-wrap .dm-soldout::after {
    content: "" !important;
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    /* عرض را کمی کمتر کن تا در باکس محبوس بماند */
    width: 110% !important; 
    height: 2px !important;
    background-color: #b43f3f !important;
    z-index: 9999 !important; /* اولویت بسیار بالا */
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    border: none !important;
    box-shadow: none !important;
    
}

.dm-sp-wrap .dm-soldout::before {
    transform: translate(-50%, -50%) rotate(45deg) !important;
}

.dm-sp-wrap .dm-soldout::after {
    transform: translate(-50%, -50%) rotate(-45deg) !important;
}


/* توضیح کوتاه (خواص) زیر تایتلِ صفحه‌ی محصول */
.dm-sp-short-excerpt {
    font-size: 14px;
    line-height: 2;
    color: #555;
    margin: 10px 0 4px;
}
.dm-sp-short-excerpt p { margin: 0 0 6px; }
.dm-sp-short-excerpt p:last-child { margin-bottom: 0; }
