/* استایل‌های عمومی */
.wc-variable-products {
    margin: 20px 0;
    direction: rtl;
    font-family: iranyekanx, sans-serif;
}

/* جست‌وجوی تنوع‌ها + خط خلاصه (جایگزین باکس ثابت قدیمی «تخفیف حجمی») */
.wc-variable-products .v-search-box {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #F6F5F2;
    border-radius: 12px;
    padding: 10px 14px;
    margin: 15px 0 8px;
}

.wc-variable-products .v-search-box .v-search-icon {
    font-size: 14px;
    color: #71767E;
    flex-shrink: 0;
}

.wc-variable-products .v-search-input {
    flex: 1;
    min-width: 0;
    border: none;
    background: transparent;
    outline: none;
    font-family: iranyekanx, sans-serif;
    font-size: 13px;
    color: #17181C;
}

.wc-variable-products .v-search-input::placeholder {
    color: #71767E;
}

.wc-variable-products .v-summary-line {
    font-size: 11.5px;
    font-weight: 700;
    color: #71767E;
    padding: 0 4px 14px;
    display: flex;
    align-items: center;
    gap: 5px;
    flex-wrap: wrap;
    font-family: iranyekanx, sans-serif;
}

.wc-variable-products .v-summary-line b {
    color: #17181C;
    font-weight: 800;
}

.wc-variable-products .v-summary-line .v-summary-best {
    color: #1E8E5A;
    font-weight: 800;
}

.wc-variable-products .v-summary-line .v-summary-dot {
    color: #EAE8E3;
}

.wc-variable-products .v-no-result {
    text-align: center;
    color: #71767E;
    font-size: 12px;
    padding: 24px 10px;
    font-family: iranyekanx, sans-serif;
}

/* ============================================================
   استایل‌های نسخه موبایل (کارت ری‌دیزاین‌شده)
   ============================================================ */
.wc-variable-products {
    --v-ink: #17181C;
    --v-ink-muted: #71767E;
    --v-surface: #FFFFFF;
    --v-surface-soft: #F6F5F2;
    --v-border: #EAE8E3;
    --v-brand: var(--m_accent_color2, #0F6B62);
    --v-brand-dark: #0B554E;
    --v-savings: #1E8E5A;
    --v-savings-soft: #EAF6F1;
    --v-urgency: #C2410C;
    --v-urgency-soft: #FDECE3;
}

.wc-variable-products .v-card {
    background: var(--v-surface);
    border: 1px solid var(--v-border);
    border-radius: 16px;
    margin-bottom: 12px;
    overflow: hidden;
    font-family: iranyekanx, sans-serif;
}

.wc-variable-products .v-card-top {
    display: flex;
    align-items: flex-start;
    gap: 11px;
    padding: 13px 13px 12px;
}

.wc-variable-products .v-thumb {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: var(--v-surface-soft);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 19px;
    flex-shrink: 0;
    overflow: hidden;
}

.wc-variable-products .v-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.wc-variable-products .v-meta {
    flex: 1;
    min-width: 0;
}

.wc-variable-products .v-title-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
}

.wc-variable-products .v-title {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 5px;
    padding-top: 1px;
}

.wc-variable-products .v-swatch {
    width: 15px;
    height: 15px;
    border-radius: 50%;
    border: 1.5px solid rgba(0,0,0,0.12);
    flex-shrink: 0;
    display: inline-block;
}

.wc-variable-products .v-attr {
    font-size: 15px;
    font-weight: 900;
    color: var(--v-ink);
    background: transparent;
    padding: 0;
    border-radius: 0;
}

.wc-variable-products .v-min-note {
    font-size: 9.5px;
    font-weight: 700;
    color: var(--v-ink-muted);
    background: var(--v-surface-soft);
    padding: 2px 7px;
    border-radius: 6px;
}

/* قیمت و «موجود» کنار مدل، سمت چپ - ستون جمع‌وجور */
.wc-variable-products .v-stock-price-col {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 3px;
    flex-shrink: 0;
}

.wc-variable-products .v-stock-dot {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 10px;
    font-weight: 700;
    color: var(--v-savings);
    white-space: nowrap;
}

.wc-variable-products .v-stock-dot i {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--v-savings);
    display: inline-block;
}

.wc-variable-products .v-price-now.unit-price {
    font-size: 10px;
    font-weight: 700;
    color: var(--v-ink-muted);
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

.wc-variable-products .v-price-now.unit-price.discounted {
    color: var(--v-savings);
    font-weight: 800;
}

/* ===== نوار شناور تخفیف حجمی =====
   پیش‌فرض کاملاً مخفیه (فقط وقتی مشتری تعداد رو از حداقل بیشتر کنه با JS
   نمایش داده می‌شه)، و همیشه فقط ۲ نقطه (بازه‌ی فعلی + پله‌ی بعدی) نشون
   می‌ده؛ اگر پله‌ی دورتری هم باشه، به‌جای شلوغ کردن، یک «⋯» کوچیک میاد. */
.wc-variable-products .v-ladder-wrap {
    margin-top: 6px;
    display: none;
}

.wc-variable-products .v-ladder-label {
    font-size: 9px;
    font-weight: 700;
    color: var(--v-ink-muted);
    margin-bottom: 4px;
}

.wc-variable-products .v-ladder-label b {
    color: var(--v-brand);
    font-weight: 800;
}

.wc-variable-products .v-ladder {
    position: relative;
    height: 18px;
    flex: 1;
}

.wc-variable-products .v-ladder-track {
    position: absolute;
    top: 7px;
    right: 1px;
    left: 1px;
    height: 3px;
    background: var(--v-surface-soft);
    border-radius: 3px;
    overflow: hidden;
}

.wc-variable-products .v-ladder-fill {
    position: absolute;
    top: 0;
    right: 0;
    height: 100%;
    width: 0%;
    background: var(--v-brand);
    border-radius: 3px;
    transition: width .2s ease;
}

/* ===== ردیف «پرتکرار» ===== */
.wc-variable-products .v-quick-pick-row {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 0 13px 8px;
}

.wc-variable-products .v-quick-pick-label {
    font-size: 9.5px;
    font-weight: 700;
    color: var(--v-ink-muted);
    flex-shrink: 0;
}

.wc-variable-products .v-quick-pick-chips {
    display: flex;
    gap: 5px;
    flex: 1;
}

.wc-variable-products .v-quick-pick-chip {
    flex: 1;
    text-align: center;
    font-size: 11px;
    font-weight: 800;
    color: var(--v-brand);
    background: var(--v-savings-soft);
    border: none;
    border-radius: 8px;
    padding: 5px 0;
    cursor: pointer;
    font-family: iranyekanx, sans-serif;
    -webkit-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;
    touch-action: manipulation;
}

.wc-variable-products .v-quick-pick-chip.active {
    background: var(--v-brand);
    color: #fff;
}

.wc-variable-products .v-stock-warning {
    margin: -3px 13px 10px;
    font-size: 10px;
    font-weight: 700;
    color: var(--v-urgency);
}

/* ===== نوار کنترل یکپارچه: تعداد + افزودن به سبد ===== */
.wc-variable-products .v-control-bar.quantity-controls {
    margin: 0 13px 13px !important;
    display: flex !important;
    align-items: stretch !important;
    background: var(--v-surface-soft) !important;
    border: none !important;
    border-radius: 12px !important;
    overflow: hidden !important;
    height: 44px !important;
    box-shadow: none !important;
}

.wc-variable-products .v-stepper {
    display: flex;
    align-items: center;
    flex: 1;
    min-width: 0;
}

.wc-variable-products .v-stepper .qty-minus,
.wc-variable-products .v-stepper .qty-plus {
    width: 38px;
    height: 100%;
    border: none;
    background: transparent;
    font-size: 16px;
    font-weight: 800;
    color: var(--v-ink);
    cursor: pointer;
    -webkit-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;
    touch-action: manipulation;
}

.wc-variable-products .v-stepper .qty-minus:active,
.wc-variable-products .v-stepper .qty-plus:active {
    background: rgba(0,0,0,0.05);
}

.wc-variable-products .v-stepper .qty-input {
    flex: 1;
    min-width: 0;
    height: 100%;
    border: none;
    background: transparent;
    text-align: center;
    font-size: 14.5px;
    font-weight: 800;
    color: var(--v-ink);
    font-variant-numeric: tabular-nums;
    -moz-appearance: textfield;
}

.wc-variable-products .v-stepper .qty-input::-webkit-outer-spin-button,
.wc-variable-products .v-stepper .qty-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* !important روی خصوصیات کلیدی چیدمان: خیلی از قالب‌ها یک استایل عمومی
   خیلی قدرتمند (border-radius گرد کامل، padding بزرگ، box-shadow و...) روی
   تمام <button>ها اعمال می‌کنند که باعث می‌شد این دکمه به‌جای چسبیدن به
   استپر، مثل یک قرص جدا و بدشکل به‌نظر برسد. */
.wc-variable-products .add-to-cart-btn-mobile {
    width: 100px !important;
    max-width: 100px !important;
    flex-shrink: 0 !important;
    flex-grow: 0 !important;
    border: none !important;
    background: var(--v-brand) !important;
    color: #fff !important;
    font-size: 12.5px !important;
    font-weight: 800 !important;
    line-height: 1 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 5px !important;
    cursor: pointer !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    text-shadow: none !important;
    text-transform: none !important;
    letter-spacing: normal !important;
    transition: background .2s ease !important;
    min-width: 0 !important;
    height: 100% !important;
    margin: 0 !important;
    padding: 0 8px !important;
    -webkit-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;
    touch-action: manipulation;
}

.wc-variable-products .add-to-cart-btn-mobile:active:not(:disabled) {
    background: var(--v-brand-dark) !important;
}

.wc-variable-products .add-to-cart-btn-mobile.success {
    background: var(--v-savings) !important;
}

.wc-variable-products .add-to-cart-btn-mobile:disabled {
    background: #cbd5e0 !important;
    cursor: not-allowed;
}

/* ===== حالت موجودی محدود: بدون استپر، یک اقدام مستقیم ===== */
.wc-variable-products .v-limited-strip {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 0 13px 13px;
    background: var(--v-urgency-soft);
    border-radius: 12px;
    padding: 9px 13px;
    gap: 10px;
}

.wc-variable-products .v-limited-txt {
    font-size: 11px;
    font-weight: 800;
    color: var(--v-urgency);
}

.wc-variable-products .v-limited-strip .add-to-cart-btn-mobile {
    width: auto !important;
    max-width: none !important;
    border-radius: 9px !important;
    background: var(--v-urgency) !important;
    padding: 8px 14px !important;
    height: auto !important;
    flex-shrink: 0 !important;
}

.wc-variable-products .v-limited-strip .add-to-cart-btn-mobile:active:not(:disabled) {
    background: #9a3412 !important;
}


.wc-variable-products [hidden] {
    display: none !important;
}

.wc-variable-products .v-card {
    content-visibility: auto;
    contain-intrinsic-size: auto 155px;
}

.wc-variable-products .v-thumb {
    flex: 0 0 auto;
}

.wc-variable-products .v-thumb img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.wc-variable-products .v-ladder-wrap:not([hidden]) {
    display: block;
}

.wc-variable-products .v-ladder-track {
    height: 5px;
    margin-top: 6px;
}

.wc-variable-products .v-desktop-quick {
    display: none;
}

.wc-variable-products .wc-variation-message {
    margin: 8px 13px 12px;
    padding: 8px 10px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 700;
}

.wc-variable-products .wc-variation-message.success {
    color: #166534;
    background: #dcfce7;
}

.wc-variable-products .wc-variation-message.error {
    color: #991b1b;
    background: #fee2e2;
}

@media (min-width: 769px) {
    .wc-variable-products .v-card {
        display: grid;
        grid-template-columns: minmax(0, 1.4fr) minmax(230px, 1fr);
        align-items: center;
        gap: 10px;
        padding: 10px 14px;
        margin-bottom: 6px;
        border-radius: 10px;
        contain-intrinsic-size: auto 105px;
    }

    .wc-variable-products .v-card-top {
        padding: 0;
    }

    .wc-variable-products .v-thumb {
        width: 54px;
        height: 54px;
    }

    .wc-variable-products .v-title-row {
        align-items: center;
    }

    .wc-variable-products .v-control-bar,
    .wc-variable-products .v-quick-pick-row,
    .wc-variable-products .v-limited-strip,
    .wc-variable-products .wc-variation-message {
        margin-right: 0;
        margin-left: 0;
    }

    .wc-variable-products .v-desktop-quick:not(:empty) {
        display: flex;
        flex-wrap: wrap;
        gap: 5px;
        margin: 0 0 8px;
    }

    .wc-variable-products .v-quick-pick-row {
        display: none;
    }
}
