/* مخفی‌کردن select اصلی ووکامرس وقتی سوآچ جایگزین فعال است */
.dm-pv-original-select { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(1px,1px,1px,1px); white-space: nowrap; }

/* ── سوآچ‌های صفحهٔ محصول ── */
.dm-pv-swatches { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 6px; }

.dm-pv-swatch {
    cursor: pointer; position: relative; display: inline-flex; align-items: center; justify-content: center;
    padding: 0; margin: 0; background: none; border: 0; transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}

.dm-pv-swatch--color .dm-pv-swatch-color {
    display: block; width: 32px; height: 32px; border-radius: 50%;
    border: 2px solid #e0e0e0; box-shadow: 0 1px 3px rgba(0,0,0,.1);
}
.dm-pv-swatch--image .dm-pv-swatch-img {
    display: block; width: 40px; height: 40px; object-fit: cover; border-radius: 6px; border: 2px solid #e0e0e0;
}
.dm-pv-swatch--label .dm-pv-swatch-label,
.dm-pv-swatch--color .dm-pv-swatch-label,
.dm-pv-swatch--image .dm-pv-swatch-label {
    padding: 6px 14px; border: 1px solid #ccc; border-radius: 6px; background: #fff; color: #333;
    font-size: 14px; min-width: 40px; text-align: center; line-height: 1.4;
}

/* انتخاب‌شده */
.dm-pv-swatch.is-active.dm-pv-swatch--color .dm-pv-swatch-color { border-color: #222; transform: scale(1.1); box-shadow: 0 0 0 2px #fff, 0 0 0 4px #222; }
.dm-pv-swatch.is-active.dm-pv-swatch--image .dm-pv-swatch-img { border-color: #222; }
.dm-pv-swatch.is-active .dm-pv-swatch-label { border-color: #222; background: #222; color: #fff; }

/* ناموجود */
.dm-pv-swatch.is-unavailable { opacity: .45; cursor: not-allowed; }
.dm-pv-swatch.is-unavailable::after {
    content: ''; position: absolute; top: 50%; left: 50%; width: 130%; height: 2px;
    background: #e53935; transform: translate(-50%,-50%) rotate(-45deg); pointer-events: none;
}

/* فوکوس کیبورد (دسترس‌پذیری) */
.dm-pv-swatch:focus-visible { outline: 2px solid #1e88e5; outline-offset: 2px; }

/* ── نمایش در آرشیو/فروشگاه ── */
.dm-pv-archive { margin-top: 10px; display: flex; flex-direction: column; gap: 8px; }
.dm-pv-archive-row { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }

.dm-pv-archive-swatch { display: inline-block; }
.dm-pv-archive-color { width: 20px; height: 20px; border-radius: 50%; border: 1px solid #ddd; }
.dm-pv-archive-image { width: 24px; height: 24px; border-radius: 4px; border: 1px solid #ddd; background-size: cover; background-position: center; }
.dm-pv-archive-label { padding: 2px 8px; border: 1px solid #eee; border-radius: 4px; font-size: 12px; color: #666; background: #fff; }
.dm-pv-archive-more { font-size: 12px; color: #999; align-self: center; }

/* RTL */
.rtl .dm-pv-swatches,
.rtl .dm-pv-archive-row { direction: rtl; }
