/* استایل ویجت محصولات - کاملا رسپانسیو و سبک */
.ppr-products-container {
    margin: 30px 0;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    clear: both;
}

.ppr-products-title {
    font-size: 1.25em;
    font-weight: 700;
    margin-bottom: 20px;
    text-align: center;
    color: #2c3e50;
    position: relative;
    padding-bottom: 12px;
}

.ppr-products-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, #3498db, #2ecc71);
    border-radius: 2px;
}

.ppr-products-grid {
    display: grid;
    gap: 15px;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

/* تنظیمات دسکتاپ - حداکثر 3 محصول در یک ردیف */
@media (min-width: 768px) {
    .ppr-products-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* تنظیمات تبلت */
@media (max-width: 767px) and (min-width: 481px) {
    .ppr-products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
}

/* تنظیمات موبایل - یک محصول در هر ردیف */
@media (max-width: 480px) {
    .ppr-products-container {
        padding: 15px;
        margin: 20px 0;
    }
    
    .ppr-products-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .ppr-products-title {
        font-size: 1.1em;
        margin-bottom: 15px;
    }
}

.ppr-product-item {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.ppr-product-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.15);
}

.ppr-product-link {
    display: block;
    text-decoration: none;
    color: inherit;
    height: 100%;
}

.ppr-product-image {
    position: relative;
    width: 100%;
    padding-top: 100%; /* نسبت 1:1 */
    overflow: hidden;
    background: #f5f5f5;
}

.ppr-product-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.ppr-product-item:hover .ppr-product-image img {
    transform: scale(1.05);
}

.ppr-product-info {
    padding: 15px;
}

.ppr-product-name {
    font-size: 0.95em;
    font-weight: 600;
    margin: 0 0 10px;
    color: #2c3e50;
    line-height: 1.4;
    height: 2.8em; /* دو خط */
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    text-overflow: ellipsis;
}

.ppr-product-price {
    font-size: 1.1em;
    font-weight: 700;
    color: #27ae60;
    margin-bottom: 10px;
    direction: rtl;
}

.ppr-product-button {
    display: inline-block;
    width: 100%;
    padding: 10px 15px;
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: #fff;
    text-align: center;
    border-radius: 5px;
    font-size: 0.9em;
    font-weight: 600;
    transition: all 0.3s ease;
    cursor: pointer;
}

.ppr-product-button:hover {
    background: linear-gradient(135deg, #2980b9, #3498db);
    transform: scale(1.02);
}

/* تنظیمات ریسپانسیو پیشرفته برای موبایل */
@media (max-width: 360px) {
    .ppr-products-container {
        padding: 12px;
        border-radius: 6px;
    }
    
    .ppr-product-info {
        padding: 12px;
    }
    
    .ppr-product-name {
        font-size: 0.9em;
    }
    
    .ppr-product-price {
        font-size: 1em;
    }
    
    .ppr-product-button {
        padding: 8px 12px;
        font-size: 0.85em;
    }
}

/* حذف استایل‌های اضافی قالب */
.ppr-products-container * {
    box-sizing: border-box;
}

.ppr-product-link:hover,
.ppr-product-link:focus,
.ppr-product-link:active {
    text-decoration: none;
    outline: none;
}
