/* استایل‌های قسطی - هماهنگ با طراحی سایت */

.installment-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #f7858d;
    color: white;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    z-index: 2;
}

.installment-badge-green {
    background: #4caf50;
}

.installment-info {
    display: flex;
    align-items: center;
    margin-top: 5px;
    color: #f7858d;
    font-size: 12px;
    font-weight: 600;
}

.installment-info i {
    margin-left: 5px;
    font-size: 14px;
}

.installment-amount {
    color: #333;
    font-weight: 700;
}

.product-card {
    position: relative;
}

/* صفحه طرح‌های قسطی */
.installment-plans-section {
    margin: 30px 0;
}

.installment-plan-card {
    background: white;
    border-radius: 4px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    border: 1px solid #eeeeee;
}

.installment-plan-card:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.installment-plan-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eeeeee;
}

.installment-plan-title {
    font-size: 18px;
    font-weight: 700;
    color: #333;
}

.installment-plan-badge {
    background: #4caf50;
    color: white;
    padding: 5px 15px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
}

.installment-plan-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

.installment-feature {
    display: flex;
    align-items: center;
    padding: 12px;
    background: #fafafa;
    border-radius: 4px;
    border: 1px solid #eeeeee;
}

.installment-feature i {
    color: #f7858d;
    margin-left: 10px;
    font-size: 20px;
}

.installment-feature-text {
    font-size: 13px;
    color: #757575;
}

.installment-feature-value {
    font-weight: 700;
    color: #333;
    display: block;
}

/* بنر تبلیغاتی فروش قسطی */
.installment-banner {
    background: #f7858d;
    border-radius: 4px;
    padding: 30px;
    margin: 30px 0;
    color: white;
    position: relative;
    overflow: hidden;
}

.installment-banner::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 300px;
    height: 300px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
}

.installment-banner-title {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 10px;
}

.installment-banner-subtitle {
    font-size: 16px;
    opacity: 0.95;
    margin-bottom: 20px;
}

.installment-banner-button {
    background: white;
    color: #f7858d;
    padding: 12px 30px;
    border-radius: 4px;
    font-weight: 700;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.installment-banner-button:hover {
    background: #fafafa;
    color: #f7858d;
    text-decoration: none;
}

/* نشان‌های تبلیغاتی */
.promo-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: #ff4757;
    color: white;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    z-index: 2;
}

.free-shipping-badge {
    background: #26de81;
}

.fast-delivery-badge {
    background: #fd9644;
}

/* Prominent Homepage Installment Section */
.installment-section-homepage {
    margin: 40px 0;
}

.installment-section-title {
    text-align: center;
    margin-bottom: 30px;
}

.installment-section-title h2 {
    font-size: 28px;
    font-weight: 700;
    color: #333;
    margin-bottom: 10px;
}

.installment-section-title p {
    font-size: 16px;
    color: #757575;
}

.installment-plan-card-home {
    background: white;
    border-radius: 4px;
    padding: 25px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    border: 2px solid #eeeeee;
    cursor: pointer;
    height: 100%;
}

.installment-plan-card-home:hover {
    box-shadow: 0 4px 16px rgba(247,133,141,0.3);
    border-color: #f7858d;
    transform: translateY(-4px);
}

.installment-plan-icon-home {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, #f7858d 0%, #f96d78 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    color: white;
    font-size: 32px;
}

.installment-plan-title-home {
    font-size: 20px;
    font-weight: 700;
    color: #333;
    text-align: center;
    margin-bottom: 15px;
}

.installment-plan-summary-home {
    text-align: center;
    color: #757575;
    font-size: 14px;
    margin-bottom: 20px;
    min-height: 60px;
}

.installment-plan-highlights-home {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
}

.installment-highlight-item {
    display: flex;
    align-items: center;
    font-size: 13px;
    color: #555;
}

.installment-highlight-item i {
    color: #f7858d;
    margin-left: 10px;
    font-size: 18px;
    min-width: 20px;
}

.installment-view-details-btn {
    width: 100%;
    padding: 12px;
    background: #f7858d;
    color: white;
    border: none;
    border-radius: 4px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.installment-view-details-btn:hover {
    background: #f96d78;
    transform: scale(1.02);
}

.installment-view-all-link {
    text-align: center;
    margin-top: 30px;
}

.installment-view-all-link a {
    display: inline-block;
    padding: 15px 40px;
    background: white;
    color: #f7858d;
    border: 2px solid #f7858d;
    border-radius: 4px;
    font-weight: 700;
    font-size: 16px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.installment-view-all-link a:hover {
    background: #f7858d;
    color: white;
    text-decoration: none;
}

/* Modal Styles */
.installment-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.6);
    overflow-y: auto;
}

.installment-modal-content {
    background-color: white;
    margin: 50px auto;
    padding: 0;
    border-radius: 4px;
    width: 90%;
    max-width: 700px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.installment-modal-header {
    background: linear-gradient(135deg, #f7858d 0%, #f96d78 100%);
    color: white;
    padding: 25px 30px;
    border-radius: 4px 4px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.installment-modal-header h2 {
    margin: 0;
    font-size: 24px;
    font-weight: 700;
}

.installment-modal-close {
    color: white;
    font-size: 32px;
    font-weight: 300;
    cursor: pointer;
    background: none;
    border: none;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.installment-modal-close:hover {
    transform: scale(1.1);
}

.installment-modal-body {
    padding: 30px;
}

.installment-modal-description {
    color: #666;
    font-size: 15px;
    line-height: 1.8;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eeeeee;
}

.installment-modal-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.installment-modal-feature {
    padding: 20px;
    background: #fafafa;
    border-radius: 4px;
    border: 1px solid #eeeeee;
}

.installment-modal-feature-label {
    font-size: 13px;
    color: #757575;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
}

.installment-modal-feature-label i {
    color: #f7858d;
    margin-left: 8px;
    font-size: 18px;
}

.installment-modal-feature-value {
    font-size: 16px;
    font-weight: 700;
    color: #333;
}

.installment-modal-footer {
    padding: 20px 30px;
    background: #fafafa;
    border-radius: 0 0 4px 4px;
    text-align: center;
}

.installment-modal-footer a {
    display: inline-block;
    padding: 14px 40px;
    background: #f7858d;
    color: white;
    border-radius: 4px;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.3s ease;
}

.installment-modal-footer a:hover {
    background: #f96d78;
    text-decoration: none;
    transform: scale(1.02);
}

/* Buying Options on Product Page */
.buying-option-card {
    background: white;
    border-radius: 8px;
    padding: 20px;
    height: 100%;
    border: 2px solid #eeeeee;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.buying-option-card:hover {
    border-color: #f7858d;
    box-shadow: 0 4px 16px rgba(247,133,141,0.2);
    transform: translateY(-4px);
}

.buying-option-card.featured {
    border-color: #f7858d;
    box-shadow: 0 2px 8px rgba(247,133,141,0.15);
}

.featured-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: #4caf50;
    color: white;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    z-index: 1;
}

.buying-option-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eeeeee;
}

.buying-option-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #f7858d 0%, #f96d78 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
}

.buying-option-icon i {
    font-size: 30px;
    color: white;
}

.buying-option-logo {
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
}

.buying-option-logo img {
    max-height: 50px;
    max-width: 120px;
    object-fit: contain;
}

.buying-option-logo i {
    font-size: 40px;
    color: #f7858d;
}

.buying-option-title {
    font-size: 16px;
    font-weight: 700;
    color: #333;
    text-align: center;
    margin: 0;
}

.buying-option-body {
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* Cash Option Specific */
.cash-option .buying-option-price {
    background: #f9f9f9;
    padding: 15px;
    border-radius: 8px;
    text-align: center;
    margin-bottom: 15px;
}

.price-label {
    font-size: 13px;
    color: #757575;
    display: block;
    margin-bottom: 5px;
}

.price-value {
    font-size: 24px;
    font-weight: 700;
    color: #f7858d;
    display: inline-block;
}

.price-currency {
    font-size: 14px;
    color: #757575;
    margin-right: 5px;
}

/* Installment Option Specific */
.installment-calculation {
    background: #f9f9f9;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 15px;
}

.monthly-payment {
    text-align: center;
    margin-bottom: 10px;
}

.payment-label {
    font-size: 12px;
    color: #757575;
    display: block;
    margin-bottom: 5px;
}

.payment-value {
    font-size: 22px;
    font-weight: 700;
    color: #f7858d;
    display: inline-block;
}

.payment-currency {
    font-size: 13px;
    color: #757575;
    margin-right: 5px;
}

.installment-duration {
    text-align: center;
    font-size: 13px;
    color: #555;
    padding-top: 10px;
    border-top: 1px solid #e0e0e0;
}

.installment-duration i {
    color: #f7858d;
    margin-left: 5px;
}

.buying-option-features {
    list-style: none;
    padding: 0;
    margin: 0 0 15px 0;
    flex: 1;
}

.buying-option-features li {
    font-size: 13px;
    color: #555;
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    align-items: center;
}

.buying-option-features li:last-child {
    border-bottom: none;
}

.buying-option-features li i {
    margin-left: 8px;
    font-size: 16px;
}

.buying-option-features li i.mdi-check-circle {
    color: #4caf50;
}

.buying-option-features li i.mdi-information {
    color: #2196F3;
}

.view-plan-details {
    width: 100%;
    padding: 12px;
    background: white;
    color: #f7858d;
    border: 2px solid #f7858d;
    border-radius: 4px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: auto;
}

.view-plan-details:hover {
    background: #f7858d;
    color: white;
}

.view-all-plans-link {
    display: inline-flex;
    align-items: center;
    padding: 12px 30px;
    background: white;
    color: #f7858d;
    border: 2px solid #f7858d;
    border-radius: 4px;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.3s ease;
}

.view-all-plans-link:hover {
    background: #f7858d;
    color: white;
    text-decoration: none;
}

.view-all-plans-link i {
    margin-right: 5px;
    transition: transform 0.3s ease;
}

.view-all-plans-link:hover i {
    transform: translateX(-3px);
}

/* Responsive */
@media (max-width: 768px) {
    .buying-option-card {
        margin-bottom: 15px;
    }

    .price-value, .payment-value {
        font-size: 20px;
    }
}

/* Compact Tabular Buying Options */
.buying-options-compact {
    position: sticky;
    top: 20px;
    background: white;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
    overflow: hidden;
    box-shadow: 0 1px 4px rgba(0,0,0,0.05);
}

.compact-header {
    background: linear-gradient(135deg, #f7858d 0%, #f96d78 100%);
    padding: 10px 12px;
    text-align: center;
    color: white;
    font-size: 14px;
    font-weight: 700;
}

.compact-option {
    padding: 10px 12px;
    border-bottom: 1px solid #f5f5f5;
}

.compact-option:last-child {
    border-bottom: none;
}

.compact-option.featured {
    background: #fffbf9;
    border-right: 2px solid #f7858d;
}

/* Cash Option */
.cash-option {
    background: #f0fdf4;
}

.cash-option .option-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cash-option .option-label {
    font-size: 12px;
    font-weight: 600;
    color: #16a34a;
}

.cash-option .price-value {
    font-size: 16px;
    font-weight: 700;
    color: #16a34a;
}

.cash-option .price-value small {
    font-size: 10px;
    font-weight: 500;
    margin-right: 3px;
}

/* Installment Option Header */
.option-header-row {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 8px;
    padding-bottom: 6px;
    border-bottom: 1px solid #f0f0f0;
}

.provider-mini {
    width: 24px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.provider-mini img {
    max-height: 20px;
    max-width: 40px;
    object-fit: contain;
}

.provider-mini i {
    font-size: 18px;
    color: #f7858d;
}

.plan-name-mini {
    font-size: 11px;
    font-weight: 600;
    color: #333;
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.featured-tag {
    background: #ff9800;
    color: white;
    padding: 2px 6px;
    border-radius: 6px;
    font-size: 9px;
    font-weight: 600;
}

/* Tabular Rows */
.option-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 4px 0;
    font-size: 11px;
}

.option-label {
    color: #666;
    font-weight: 500;
}

.option-value {
    color: #333;
    font-weight: 600;
    text-align: left;
}

/* Details Button */
.compact-details-btn {
    width: 100%;
    padding: 6px;
    margin-top: 8px;
    background: white;
    color: #f7858d;
    border: 1px solid #f7858d;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
}

.compact-details-btn:hover {
    background: #f7858d;
    color: white;
}

/* More Plans */
.more-plans-compact {
    padding: 8px 12px;
    text-align: center;
    background: #fafafa;
}

.more-plans-compact a {
    color: #f7858d;
    font-size: 11px;
    font-weight: 600;
    text-decoration: none;
}

.more-plans-compact a:hover {
    text-decoration: underline;
}

/* Responsive */
@media (max-width: 991px) {
    .buying-options-compact {
        margin-top: 20px;
        position: relative;
        top: 0;
    }
}

@media (max-width: 768px) {
    .compact-option {
        padding: 12px;
    }

    .option-row {
        font-size: 12px;
    }

    .cash-option .price-value {
        font-size: 18px;
    }
}
