/* =========================================================
   صفحه محصول - نسخه نهایی اصلاح‌شده
   ========================================================= */

.up-sp-wrapper {
    width: 100%;
    background: #f4f6f9;
    padding: 25px 0 40px;
    direction: rtl;
}

.up-sp-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 25px;
}

/* Breadcrumb */
.up-sp-breadcrumb {
    margin-bottom: 20px;
    padding: 12px 18px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    font-size: 12.5px;
    color: #777;
}

.up-sp-breadcrumb .up-breadcrumb-inner {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 5px;
    color: #777;
}

.up-sp-breadcrumb a { color: #4837F3; font-weight: 500; text-decoration: none; transition: all 0.2s; }
.up-sp-breadcrumb a:hover { color: #FF6B35; }
.up-sp-breadcrumb .sep { color: #ccc; font-weight: bold; margin: 0 5px; }

/* =========================================
   چیدمان اصلی
   ========================================= */
.up-sp-main {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 25px;
    margin-bottom: 30px;
    align-items: start;
}

/* =========================================
   ستون گالری
   ========================================= */
.up-sp-gallery-col {
    background: #ffffff;
    border-radius: 18px;
    padding: 20px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
    position: -webkit-sticky;
    position: sticky;
    top: 90px;
    align-self: start;
}

.up-sp-gallery {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.up-sp-gallery-main {
    position: relative;
    width: 100%;
    border-radius: 14px;
    background: #f8f9fc;
    padding: 20px;
    overflow: hidden;
}

.up-sp-img-wrap {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: zoom-in;
    overflow: hidden;
    border-radius: 12px;
    background: #fff;
}

.up-sp-main-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    max-width: 100%;
    user-select: none;
    -webkit-user-drag: none;
}

.up-sp-wishlist {
    position: absolute;
    top: 15px;
    left: 15px;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid #eee;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #999;
    transition: all 0.3s;
    padding: 0;
    z-index: 3;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.up-sp-wishlist:hover {
    background: #e63946;
    color: #fff;
    border-color: #e63946;
    transform: scale(1.1);
}

.up-sp-wishlist svg { width: 20px; height: 20px; stroke: currentColor; }

.up-sp-discount-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: linear-gradient(145deg, #FF6B35, #e85a2a);
    color: #fff;
    font-size: 13px;
    font-weight: 800;
    padding: 6px 12px;
    border-radius: 10px;
    box-shadow: 0 6px 16px rgba(255, 107, 53, 0.4);
    z-index: 3;
}

.up-sp-gallery-thumbs {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
    padding-top: 5px;
}

.up-sp-thumb {
    width: 72px;
    height: 72px;
    border-radius: 10px;
    background: #f8f9fc;
    border: 2px solid transparent;
    overflow: hidden;
    cursor: pointer;
    padding: 4px;
    transition: all 0.25s;
}

.up-sp-thumb img { width: 100%; height: 100%; object-fit: contain; display: block; }
.up-sp-thumb:hover { border-color: #d4d0f0; transform: translateY(-2px); }
.up-sp-thumb.is-active {
    border-color: #4837F3;
    box-shadow: 0 4px 12px rgba(72, 55, 243, 0.2);
}

/* =========================================
   ★ پنل Zoom - position: fixed در مرکز صفحه
   با z-index بسیار بالا که در کل صفحه کار کند
   ========================================= */
.up-zoom-pane {
    position: fixed !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) scale(0.9) !important;
    width: 500px;
    height: 500px;
    max-width: 85vw;
    max-height: 85vh;
    border-radius: 20px;
    background: #ffffff;
    box-shadow:
        0 30px 80px rgba(0, 0, 0, 0.4),
        0 0 0 4px rgba(255, 255, 255, 0.95),
        0 0 0 5px rgba(72, 55, 243, 0.2);
    z-index: 9999999 !important;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.25s ease, visibility 0.25s ease, transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    isolation: isolate;
}

.up-zoom-pane.is-visible {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, -50%) scale(1) !important;
}

.up-zoom-inner {
    width: 100%;
    height: 100%;
    background-repeat: no-repeat;
    background-size: 200%;
    background-position: center center;
    transition: background-position 0.05s linear;
    border-radius: 16px;
}

/* =========================================
   ستون اطلاعات
   ========================================= */
.up-sp-info-col {
    position: relative;
}

.up-sp-info {
    background: #ffffff;
    border-radius: 18px;
    padding: 25px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.up-sp-badges { display: flex; gap: 8px; flex-wrap: wrap; }

.up-sp-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 11.5px;
    font-weight: 700;
    padding: 5px 11px;
    border-radius: 8px;
    line-height: 1.4;
}

.up-sp-badge-green {
    background: linear-gradient(135deg, #e8f5e9, #d4edda);
    color: #1b5e20;
    border: 1px solid #a5d6a7;
}

.up-sp-badge-green svg {
    stroke: #1b5e20;
    background: rgba(46, 125, 50, 0.15);
    border-radius: 50%;
    padding: 2px;
    width: 14px;
    height: 14px;
}

.up-sp-title {
    font-size: 22px;
    font-weight: 800;
    color: #222;
    margin: 0;
    line-height: 1.5;
}

.up-sp-rating { display: flex; align-items: center; font-size: 13px; color: #999; }
.up-sp-rating .star-rating { font-size: 14px; color: #FFC107; }

.up-sp-attrs {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 15px 0;
    border-top: 1px solid #f0f0f5;
    border-bottom: 1px solid #f0f0f5;
}

.up-sp-attr-row { display: flex; align-items: center; gap: 8px; font-size: 13.5px; }
.up-sp-attr-label { color: #999; font-weight: 500; min-width: 60px; }
.up-sp-attr-value { color: #333; font-weight: 700; }

.up-sp-short-desc {
    font-size: 13.5px;
    color: #666;
    line-height: 1.9;
    padding: 12px 15px;
    background: #f8f9fc;
    border-radius: 12px;
    border-right: 3px solid #4837F3;
}

.up-sp-short-desc p { margin: 0 0 8px; }
.up-sp-short-desc p:last-child { margin-bottom: 0; }

/* =========================================
   ★ باکس خرید - Sticky با CSS خالص
   ========================================= */
.up-sp-buybox {
    background: linear-gradient(135deg, #ffffff, #f8f9ff);
    border: 1.5px solid #eef0fa;
    border-radius: 16px;
    padding: 18px;
    display: flex;
    flex-direction: column;
    gap: 15px;

    /* ✅ Sticky با CSS - بدون پرش */
    position: -webkit-sticky;
    position: sticky;
    top: 90px;
    z-index: 10;
    box-shadow: 0 4px 20px rgba(72, 55, 243, 0.08);
}

.up-sp-price-row { display: flex; flex-direction: column; gap: 6px; }

.up-sp-old-price { display: flex; align-items: center; gap: 8px; font-size: 12.5px; }
.up-sp-old-label { color: #999; }
.up-sp-old-price del { color: #b0b0bc; font-size: 14px; text-decoration: line-through; }

.up-sp-final-price {
    font-size: 24px;
    font-weight: 900;
    color: #4837F3;
    display: flex;
    align-items: center;
    gap: 10px;
}

.up-sp-final-price ins { text-decoration: none; color: #4837F3; }
.up-sp-final-price .woocommerce-Price-amount { color: #4837F3; font-weight: 900; font-size: 24px; }
.up-sp-final-price del { display: none; }
.up-sp-final-price .woocommerce-Price-currencySymbol { font-size: 16px; font-weight: 600; margin-right: 3px; }

/* فرم افزودن */
.up-sp-add-form { display: flex; flex-direction: column; gap: 12px; }
.up-sp-add-form form.cart { display: flex; gap: 10px; flex-wrap: wrap; margin: 0; }

.up-sp-add-form .single_add_to_cart_button,
.up-sp-add-form button[type="submit"] {
    flex: 1;
    min-width: 200px;
    padding: 16px 24px;
    background: linear-gradient(135deg, #2e7d32, #4caf50) !important;
    color: #fff !important;
    border: none !important;
    border-radius: 14px !important;
    font-size: 15px !important;
    font-weight: 800 !important;
    font-family: inherit !important;
    cursor: pointer;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 6px 18px rgba(46, 125, 50, 0.35);
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
}

.up-sp-add-form .single_add_to_cart_button:hover,
.up-sp-add-form button[type="submit"]:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 28px rgba(46, 125, 50, 0.45);
    background: linear-gradient(135deg, #1b5e20, #2e7d32) !important;
}

.up-sp-add-form .quantity {
    display: flex;
    align-items: center;
    background: #f8f9fc;
    border-radius: 12px;
    overflow: hidden;
    border: 1.5px solid #eef0fa;
}

.up-sp-add-form .quantity input.qty {
    width: 50px;
    height: 52px;
    border: none !important;
    background: transparent;
    text-align: center;
    font-size: 16px;
    font-weight: 700;
    font-family: inherit;
    color: #333;
    outline: none;
    padding: 0 !important;
    -moz-appearance: textfield;
}

.up-sp-add-form .quantity input.qty::-webkit-outer-spin-button,
.up-sp-add-form .quantity input.qty::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.up-sp-add-form .variations { width: 100%; border-collapse: collapse; margin: 0 !important; }
.up-sp-add-form .variations tr { display: block; margin-bottom: 12px; }
.up-sp-add-form .variations th,
.up-sp-add-form .variations td {
    display: block;
    padding: 0 !important;
    border: none !important;
    text-align: right !important;
    background: transparent !important;
}

.up-sp-add-form .variations th.label {
    font-size: 13px;
    color: #666;
    font-weight: 600;
    margin-bottom: 8px;
}

.up-sp-add-form .variations select {
    width: 100%;
    padding: 12px 16px;
    border: 1.5px solid #e6e8f5 !important;
    border-radius: 10px;
    font-size: 13.5px;
    background: #fff;
    font-family: inherit;
    outline: none;
    transition: all 0.3s;
}

.up-sp-add-form .variations select:focus {
    border-color: #4837F3 !important;
    box-shadow: 0 0 0 4px rgba(72, 55, 243, 0.1);
}

.up-sp-seller-info {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding-top: 15px;
    border-top: 1px dashed #e6e8f5;
}

.up-sp-seller-row { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.up-sp-seller-label { color: #999; min-width: 60px; }
.up-sp-seller-value { color: #333; font-weight: 600; }

.up-sp-consult {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 18px;
    background: #fff;
    border-radius: 12px;
    font-size: 12.5px;
    color: #666;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    flex-wrap: wrap;
}

.up-sp-consult svg { stroke: #4837F3; flex-shrink: 0; }
.up-sp-consult a { color: #4837F3 !important; font-weight: 700; text-decoration: none; }
.up-sp-consult a:hover { color: #FF6B35 !important; }

/* =========================================
   تب‌ها
   ========================================= */
.up-sp-tabs-section {
    background: #fff;
    border-radius: 18px;
    margin-bottom: 30px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
    overflow: hidden;
}

.up-sp-tabs-nav {
    display: flex;
    border-bottom: 1px solid #f0f0f5;
    padding: 0 25px;
    gap: 5px;
}

.up-sp-tab-btn {
    padding: 18px 20px;
    background: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    font-family: inherit;
    font-size: 14.5px;
    font-weight: 700;
    color: #777;
    cursor: pointer;
    transition: all 0.3s;
}

.up-sp-tab-btn:hover { color: #4837F3; }
.up-sp-tab-btn.is-active { color: #4837F3; border-bottom-color: #4837F3; }

.up-sp-tab-content { display: none; padding: 30px 35px; }
.up-sp-tab-content.is-active { display: block; }

.up-sp-specs { margin-bottom: 30px; }

.up-sp-specs-title {
    font-size: 17px;
    font-weight: 800;
    color: #222;
    margin: 0 0 18px;
    padding-right: 12px;
    border-right: 4px solid #4837F3;
    line-height: 1.4;
}

.up-sp-specs-table {
    width: 100%;
    border-collapse: collapse;
    background: #f8f9fc;
    border-radius: 12px;
    overflow: hidden;
}

.up-sp-specs-table tr { border-bottom: 1px solid #e8eaf3; }
.up-sp-specs-table tr:last-child { border-bottom: none; }
.up-sp-specs-table td { padding: 14px 20px; font-size: 13.5px; vertical-align: top; }

.up-sp-spec-label {
    width: 220px;
    color: #666;
    font-weight: 600;
    background: #f0f2f9;
    border-left: 1px solid #e8eaf3;
}

.up-sp-spec-value { color: #333; font-weight: 500; line-height: 1.7; }

.up-sp-description { margin-top: 25px; }
.up-sp-desc-content { font-size: 14px; line-height: 2; color: #555; }
.up-sp-desc-content p { margin: 0 0 15px; }
.up-sp-desc-content h1,
.up-sp-desc-content h2,
.up-sp-desc-content h3,
.up-sp-desc-content h4 { color: #222; font-weight: 800; margin: 25px 0 12px; }
.up-sp-desc-content ul,
.up-sp-desc-content ol { padding-right: 22px; margin: 12px 0; }
.up-sp-desc-content li { margin-bottom: 8px; line-height: 1.9; }
.up-sp-desc-content img { max-width: 100%; border-radius: 12px; margin: 15px 0; height: auto; }

/* =========================================
   محصولات مرتبط
   ========================================= */
.up-sp-related-section {
    background: #fff;
    border-radius: 18px;
    padding: 25px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
}

.up-sp-related-title {
    font-size: 18px;
    font-weight: 800;
    color: #222;
    margin: 0 0 20px;
    padding-right: 12px;
    border-right: 4px solid #FF6B35;
    line-height: 1.4;
}

.up-sp-related-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 15px;
}

.up-sp-related-card {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 12px;
    background: #fafbfd;
    border-radius: 14px;
    text-decoration: none;
    color: #333;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    border: 1.5px solid transparent;
}

.up-sp-related-card:hover {
    transform: translateY(-5px);
    background: #fff;
    border-color: rgba(72, 55, 243, 0.15);
    box-shadow: 0 12px 25px rgba(72, 55, 243, 0.1);
}

.up-sp-related-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    background: linear-gradient(145deg, #FF6B35, #e85a2a);
    color: #fff;
    font-size: 10.5px;
    font-weight: 800;
    padding: 3px 7px;
    border-radius: 7px;
    z-index: 2;
}

.up-sp-related-img {
    width: 100%;
    aspect-ratio: 1 / 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    padding: 8px;
}

.up-sp-related-img img { width: 100%; height: 100%; object-fit: contain; transition: transform 0.4s; }
.up-sp-related-card:hover .up-sp-related-img img { transform: scale(1.1); }

.up-sp-related-name {
    font-size: 12.5px;
    font-weight: 600;
    color: #333;
    margin: 0;
    line-height: 1.5;
    min-height: 38px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.up-sp-related-price { font-size: 13.5px; font-weight: 800; color: #4837F3; margin-top: auto; }
.up-sp-related-price del { color: #b0b0bc; font-size: 11px; font-weight: normal; margin-left: 5px; }
.up-sp-related-price ins { text-decoration: none; color: #4837F3; }

/* =========================================
   ریسپانسیو
   ========================================= */
@media (max-width: 1200px) {
    .up-sp-related-grid { grid-template-columns: repeat(4, 1fr); }
}

@media (max-width: 992px) {
    .up-sp-main { grid-template-columns: 1fr; gap: 20px; }

    .up-sp-gallery-col {
        position: static;
        top: auto;
    }

    .up-sp-buybox {
        position: static !important;
        top: auto !important;
    }

    .up-sp-gallery-main { padding: 15px; }
    .up-sp-thumb { width: 62px; height: 62px; }
    .up-zoom-pane { display: none; }
}

@media (max-width: 768px) {
    .up-sp-container { padding: 0 15px; }
    .up-sp-wrapper { padding: 15px 0 30px; }
    .up-sp-info { padding: 18px; }
    .up-sp-title { font-size: 18px; }
    .up-sp-final-price,
    .up-sp-final-price .woocommerce-Price-amount { font-size: 20px; }

    .up-sp-tabs-nav { padding: 0 15px; overflow-x: auto; }
    .up-sp-tab-btn { padding: 15px 14px; font-size: 13px; white-space: nowrap; }
    .up-sp-tab-content { padding: 20px 18px; }
    .up-sp-spec-label { width: 130px; font-size: 12.5px; }
    .up-sp-specs-table td { padding: 12px 14px; font-size: 12.5px; }

    .up-sp-related-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
    .up-sp-related-section { padding: 18px; }
}

@media (max-width: 480px) {
    .up-sp-gallery-main { padding: 10px; }
    .up-sp-thumb { width: 55px; height: 55px; }
    .up-sp-add-form .single_add_to_cart_button {
        min-width: 100%;
        padding: 14px 18px;
        font-size: 14px !important;
    }
}

.up-sp-add-form .single_add_to_cart_button.loading {
    opacity: 0.7;
    pointer-events: none;
}
/* =========================================
   باکس خرید قسطی
   ========================================= */
.up-installment-box {
    background: linear-gradient(135deg, #f5f3ff 0%, #eef0fa 100%);
    border: 1.5px solid #e0dcff;
    border-radius: 14px;
    padding: 16px 18px;
    margin: 18px 0;
    direction: rtl;
    font-family: inherit;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.up-installment-box::before {
    content: '';
    position: absolute;
    top: -30px;
    left: -30px;
    width: 100px;
    height: 100px;
    background: radial-gradient(circle, rgba(72, 55, 243, 0.08) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.up-installment-box:hover {
    border-color: rgba(72, 55, 243, 0.35);
    box-shadow: 0 8px 24px rgba(72, 55, 243, 0.1);
}

/* ═══ هدر باکس ═══ */
.up-installment-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding-bottom: 12px;
    margin-bottom: 12px;
    border-bottom: 1.5px dashed rgba(72, 55, 243, 0.2);
}

.up-installment-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: linear-gradient(135deg, #4837F3, #6b5bff);
    color: #fff;
    flex-shrink: 0;
    box-shadow: 0 4px 10px rgba(72, 55, 243, 0.3);
}

.up-installment-icon svg {
    stroke: #fff;
}

.up-installment-title {
    font-size: 15px;
    font-weight: 800;
    color: #2a1f7a;
    flex: 1;
}

.up-installment-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    background: linear-gradient(135deg, #e8f5e9, #d4edda);
    color: #2e7d32;
    font-size: 11px;
    font-weight: 800;
    border-radius: 8px;
    border: 1px solid #c8e6c9;
}

/* ═══ بدنه باکس ═══ */
.up-installment-body {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.up-installment-text {
    font-size: 14px;
    color: #555;
    font-weight: 600;
    line-height: 1.7;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 5px;
}

.up-installment-text strong {
    color: #2a1f7a;
    font-weight: 800;
}

.up-installment-price,
.up-installment-price .woocommerce-Price-amount {
    color: #4837F3 !important;
    font-size: 17px;
    font-weight: 900;
}

.up-installment-price .woocommerce-Price-currencySymbol {
    font-size: 13px;
    font-weight: 700;
}

/* ═══ لوگوها ═══ */
.up-installment-logos {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    padding-top: 10px;
    border-top: 1px solid rgba(72, 55, 243, 0.12);
}

.up-installment-logo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 38px;
    min-width: 70px;
    padding: 4px 12px;
    background: #fff;
    border: 1.5px solid #e8e8f0;
    border-radius: 10px;
    text-decoration: none;
    transition: all 0.25s ease;
    cursor: pointer;
    flex-shrink: 0;
}

.up-installment-logo:hover {
    border-color: rgba(72, 55, 243, 0.4);
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(72, 55, 243, 0.12);
}

.up-installment-logo img {
    max-height: 26px;
    max-width: 80px;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
}

/* ═══ لوگوی متنی جایگزین (اگر تصویر نبود) ═══ */
.up-logo-fallback {
    display: none;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0.3px;
    padding: 4px 8px;
    border-radius: 6px;
    white-space: nowrap;
}

.up-logo-fallback.logo-digipay {
    color: #fff;
    background: linear-gradient(135deg, #ef4056, #d92545);
}

.up-logo-fallback.logo-torobpay {
    color: #fff;
    background: linear-gradient(135deg, #ef4056, #b81e3a);
}

.up-logo-fallback.logo-snapppay {
    color: #fff;
    background: linear-gradient(135deg, #00d170, #00a858);
}

/* ═══ ریسپانسیو ═══ */
@media (max-width: 600px) {
    .up-installment-box {
        padding: 14px 15px;
    }

    .up-installment-title {
        font-size: 14px;
    }

    .up-installment-badge {
        font-size: 10px;
        padding: 3px 8px;
    }

    .up-installment-text {
        font-size: 13px;
    }

    .up-installment-price,
    .up-installment-price .woocommerce-Price-amount {
        font-size: 15px;
    }

    .up-installment-logos {
        gap: 8px;
    }

    .up-installment-logo {
        height: 34px;
        min-width: 60px;
        padding: 3px 10px;
    }

    .up-installment-logo img {
        max-height: 22px;
        max-width: 68px;
    }

    .up-logo-fallback {
        font-size: 11px;
    }
}
/* =========================================
   انیمیشن‌های باکس قسطی
   ========================================= */

/* ═══ ۱. درخشش نبضی روی کادر باکس ═══ */
@keyframes upInstallmentGlow {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(72, 55, 243, 0.08),
                    0 4px 15px rgba(72, 55, 243, 0.06);
        border-color: #e0dcff;
    }
    50% {
        box-shadow: 0 0 0 8px rgba(72, 55, 243, 0.06),
                    0 8px 25px rgba(72, 55, 243, 0.15);
        border-color: rgba(72, 55, 243, 0.35);
    }
}

.up-installment-box {
    animation: upInstallmentGlow 3s ease-in-out infinite;
}

/* ═══ ۲. درخشش عبوری (Shine) روی کادر ═══ */
.up-installment-box::after {
    content: '';
    position: absolute;
    top: 0;
    right: -100%;
    width: 60%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(255, 255, 255, 0.6) 50%,
        transparent 100%
    );
    transform: skewX(-20deg);
    pointer-events: none;
    animation: upInstallmentShine 5s ease-in-out infinite;
    z-index: 1;
}

@keyframes upInstallmentShine {
    0% {
        right: -100%;
    }
    20% {
        right: 150%;
    }
    100% {
        right: 150%;
    }
}

/* ═══ ۳. نبض ملایم روی مبلغ قسط ═══ */
@keyframes upInstallmentPricePulse {
    0%, 100% {
        transform: scale(1);
        text-shadow: 0 0 0 rgba(72, 55, 243, 0);
    }
    50% {
        transform: scale(1.04);
        text-shadow: 0 0 12px rgba(72, 55, 243, 0.35);
    }
}

.up-installment-price {
    display: inline-block;
    animation: upInstallmentPricePulse 2.5s ease-in-out infinite;
}

/* ═══ ۴. نبض آیکون کارت (فقط یک بار در ابتدا) ═══ */
@keyframes upInstallmentIconPop {
    0% { transform: scale(1); }
    30% { transform: scale(1.15) rotate(-6deg); }
    60% { transform: scale(1.1) rotate(3deg); }
    100% { transform: scale(1) rotate(0); }
}

.up-installment-icon {
    animation: upInstallmentIconPop 0.8s ease-out 0.3s 1;
    transform-origin: center;
}

/* ═══ ۵. ورود نرم باکس از پایین ═══ */
@keyframes upInstallmentSlideIn {
    from {
        opacity: 0;
        transform: translateY(15px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.up-installment-box {
    animation: upInstallmentGlow 3s ease-in-out infinite,
               upInstallmentSlideIn 0.6s ease-out;
}

/* ═══ ۶. هاور: کمی بلند شدن + سایه عمیق‌تر ═══ */
.up-installment-box:hover {
    transform: translateY(-3px) !important;
    border-color: rgba(72, 55, 243, 0.4) !important;
    box-shadow: 0 12px 30px rgba(72, 55, 243, 0.18) !important;
    animation-play-state: paused, running;
}

/* ═══ ۷. بج «۴ قسط» نبض ملایم ═══ */
@keyframes upInstallmentBadgePulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(46, 125, 50, 0.4);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 0 0 6px rgba(46, 125, 50, 0);
    }
}

.up-installment-badge {
    animation: upInstallmentBadgePulse 2s ease-in-out infinite;
}

/* ═══ ۸. لوگوها: ورود تدریجی ═══ */
@keyframes upInstallmentLogoIn {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.up-installment-logo {
    animation: upInstallmentLogoIn 0.5s ease-out backwards;
}

.up-installment-logo:nth-child(1) { animation-delay: 0.5s; }
.up-installment-logo:nth-child(2) { animation-delay: 0.65s; }
.up-installment-logo:nth-child(3) { animation-delay: 0.8s; }

/* ═══ ۹. هاور روی لوگو: کمی چرخش ═══ */
.up-installment-logo:hover {
    transform: translateY(-3px) scale(1.05) !important;
    border-color: rgba(72, 55, 243, 0.5) !important;
    box-shadow: 0 6px 15px rgba(72, 55, 243, 0.2) !important;
}

/* ═══ ۱۰. قطع انیمیشن‌ها برای کاربران با prefers-reduced-motion ═══ */
@media (prefers-reduced-motion: reduce) {
    .up-installment-box,
    .up-installment-price,
    .up-installment-icon,
    .up-installment-badge,
    .up-installment-logo,
    .up-installment-box::after {
        animation: none !important;
        transition: none !important;
    }
}