/* فایل استایل پاپ‌آپ نارنجی - نسخه نهایی */

/* کانتینر اصلی پاپ‌آپ */
.khanoumi-popup-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.85);
    z-index: 999999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 15px;
    box-sizing: border-box;
    direction: rtl;
}

/* محتوای پاپ‌آپ */
.khanoumi-popup-content {
    background: white;
    border-radius: 20px;
    width: 100%;
    max-width: 950px;
    max-height: 90vh;
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(0,0,0,0.5);
    animation: khanoumiSlideUp 0.3s ease-out;
    position: relative;
    margin: auto;
    display: flex;
    flex-direction: column;
}

/* انیمیشن */
@keyframes khanoumiSlideUp {
    from { 
        transform: translateY(20px); 
        opacity: 0; 
    }
    to { 
        transform: translateY(0); 
        opacity: 1; 
    }
}

/* هدر پاپ‌آپ */
.khanoumi-popup-header {
    background: rgb(244,64,11);
    color: white;
    padding: 20px 30px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
}

.khanoumi-popup-title {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 18px;
    font-weight: bold;
}

.khanoumi-close-btn {
    font-size: 40px;
    cursor: pointer;
    line-height: 1;
    user-select: none;
    transition: opacity 0.2s;
    background: none;
    border: none;
    color: white;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 10px;
}

.khanoumi-close-btn:hover {
    opacity: 0.8;
}

/* زیرعنوان */
.khanoumi-popup-subtitle {
    text-align: center;
    margin: 0 0 20px 0;
    color: #333;
    font-size: 18px;
    font-weight: bold;
    padding: 0 20px;
}

/* کانتینر اسلایدر */
.khanoumi-slider-container {
    padding: 10px 30px 5px 30px;
    flex-grow: 1;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* اسلایدر Keen */
#khanoumi-slider.keen-slider {
    flex-grow: 1;
    padding: 5px !important;
    overflow: visible !important;
}

.keen-slider__slide {
    height: auto !important;
    padding: 0 8px;
    box-sizing: border-box;
}

/* کارت محصول */
.khanoumi-product-slide {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
    border: 1px solid #eee;
    position: relative;
}

.khanoumi-product-slide:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

/* تصویر محصول */
.khanoumi-product-image {
    width: 100%;
    height: 200px;
    object-fit: contain;
    padding: 20px;
    background: #fafafa;
    border-bottom: 1px solid #eee;
    display: block;
    margin: 0 auto;
}

/* اطلاعات محصول */
.khanoumi-product-info {
    padding: 18px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.khanoumi-product-link {
    text-decoration: none;
    color: inherit;
    display: block;
    flex-grow: 1;
}

.khanoumi-product-name {
    font-size: 15px;
    line-height: 1.5;
    margin-bottom: 10px;
    color: #333;
    height: 68px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    font-weight: normal;
}

.khanoumi-product-price {
    font-size: 16px;
    font-weight: bold;
    color: #222;
    margin-top: auto;
    margin-bottom: 15px;
    direction: ltr;
    text-align: center;
}

.khanoumi-product-price ins {
    text-decoration: none;
    color: rgb(244,64,11);
}

.khanoumi-product-price del {
    color: #999;
    font-size: 14px;
    margin-left: 5px;
}

/* دکمه افزودن به سبد */
.khanoumi-add-to-cart-btn {
    background: rgb(244,64,11);
    color: white;
    border: none;
    padding: 14px;
    border-radius: 10px;
    font-weight: bold;
    font-size: 15px;
    cursor: pointer;
    transition: background 0.3s;
    width: 100%;
    display: block;
}

.khanoumi-add-to-cart-btn:hover {
    background: rgb(220, 50, 0);
}

/* فوتر پاپ‌آپ */
.khanoumi-popup-footer {
    padding: 20px 30px;
    background: #f9f9f9;
    border-top: 1px solid #eee;
    display: flex;
    gap: 15px;
    flex-shrink: 0;
}

.khanoumi-view-cart-btn,
.khanoumi-continue-btn {
    flex: 1;
    padding: 16px;
    border-radius: 12px;
    font-weight: bold;
    font-size: 16px;
    cursor: pointer;
    text-align: center;
    text-decoration: none;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
}

.khanoumi-view-cart-btn {
    background: rgb(244,64,11);
    color: white;
    border: none;
}

.khanoumi-view-cart-btn:hover {
    background: rgb(220, 50, 0);
}

.khanoumi-continue-btn {
    background: white;
    color: rgb(244,64,11);
    border: 2px solid rgb(244,64,11);
}

.khanoumi-continue-btn:hover {
    background: rgba(244,64,11,0.05);
}

/* استایل‌های واکنش‌گرا */
@media (max-width: 768px) {
    .khanoumi-popup-container {
        padding: 10px;
    }
    
    .khanoumi-popup-content {
        max-height: 95vh;
    }
    
    .khanoumi-popup-header {
        padding: 18px 20px;
    }
    
    .khanoumi-popup-title {
        font-size: 16px;
    }
    
    .khanoumi-close-btn {
        font-size: 38px;
    }
    
    .khanoumi-slider-container {
        padding: 10px 20px 5px 20px;
    }
    
    .khanoumi-popup-subtitle {
        font-size: 17px;
        margin-bottom: 15px;
    }
    
    .khanoumi-product-image {
        height: 180px;
        padding: 15px;
    }
    
    .khanoumi-product-info {
        padding: 15px;
    }
    
    .khanoumi-product-name {
        font-size: 14px;
        height: 63px;
    }
    
    .khanoumi-add-to-cart-btn {
        padding: 13px;
        font-size: 14px;
    }
    
    .khanoumi-popup-footer {
        padding: 18px 20px;
        gap: 12px;
    }
    
    .khanoumi-view-cart-btn,
    .khanoumi-continue-btn {
        padding: 15px;
        font-size: 15px;
    }
}

@media (max-width: 480px) {
    .khanoumi-popup-header {
        padding: 15px;
    }
    
    .khanoumi-popup-title {
        font-size: 15px;
        gap: 8px;
    }
    
    .khanoumi-close-btn {
        font-size: 35px;
        margin-left: 5px;
    }
    
    .khanoumi-slider-container {
        padding: 10px 15px 5px 15px;
    }
    
    .keen-slider__slide {
        padding: 0 5px;
    }
    
    .khanoumi-popup-footer {
        flex-direction: column;
        gap: 10px;
    }
}

/* استایل برای دکمه‌های غیرفعال */
.khanoumi-add-to-cart-btn:disabled {
    background: #ccc !important;
    cursor: not-allowed;
}

/* استایل برای محصولات اضافه شده */
.khanoumi-add-to-cart-btn.added {
    background: #2e7d32 !important;
}