@import url('https://cdn.jsdelivr.net/gh/rastikerdar/vazirmatn@v33.003/Vazirmatn-font-face.css');

.pp-container {
    font-family: 'Vazirmatn', sans-serif;
    max-width: 1100px;
    margin: 20px auto;
    padding: 0 15px;
    direction: rtl;
}

/* --- استایل سرچ و فیلترها --- */
.pp-search {
    width: 100%;
    padding: 14px 18px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    font-family: 'Vazirmatn', sans-serif;
    font-size: 14px;
    margin-bottom: 15px;
    box-sizing: border-box;
    background: #fff;
}

.pp-search:focus {
    outline: none;
    border-color: #dc2626;
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
}

.pp-main-filters {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.pp-main-btn {
    padding: 8px 16px;
    border: 1px solid #e2e8f0;
    background: #fff;
    border-radius: 8px;
    font-family: 'Vazirmatn', sans-serif;
    font-size: 13px;
    cursor: pointer;
    color: #475569;
    transition: all 0.2s;
}

.pp-main-btn.active {
    background: #dc2626;
    color: #fff;
    border-color: #dc2626;
}

/* --- استایل آکاردئون --- */
.pp-accordion {
    margin-bottom: 12px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    overflow: hidden;
    background: #fff;
}

.pp-accordion-header {
    padding: 14px 18px;
    background: #f8fafc;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 700;
    font-size: 14px;
    color: #0f172a;
}

.pp-accordion-header.active {
    background: #dc2626;
    color: #fff;
}

.pp-chevron { transition: transform 0.3s ease; }
.pp-accordion-header.active .pp-chevron { transform: rotate(180deg); }

.pp-accordion-body {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-out;
}

.pp-subtitle {
    font-size: 15px;
    font-weight: 700;
    color: #dc2626;
    margin: 20px 0 10px 0;
    padding-right: 10px;
    border-right: 3px solid #dc2626;
}

/* --- جدول دسکتاپ --- */
.pp-table-wrapper { overflow-x: auto; }
.pp-table { width: 100%; border-collapse: collapse; min-width: 600px; }
.pp-table th {
    background: #f1f5f9;
    color: #334155;
    padding: 12px 16px;
    text-align: right;
    font-weight: 700;
    font-size: 13px;
    border-bottom: 2px solid #e2e8f0;
}
.pp-table td {
    padding: 12px 16px;
    border-bottom: 1px solid #f1f5f9;
    text-align: right;
    font-size: 14px;
    color: #334155;
}
.pp-code {
    font-weight: 800;
    color: #dc2626;
    background: #fef2f2;
    padding: 4px 10px;
    border-radius: 6px;
    border: 1px solid #fecaca;
    display: inline-block;
    font-size: 14px;
}
.pp-price { color: #059669; font-weight: 700; direction: ltr; text-align: left; }
.pp-renewal { color: #d97706; font-weight: 700; direction: ltr; text-align: left; }

/* --- 📱 ریسپانسیو موبایل (نمایش جدولی مثل نمونه) --- */
@media (max-width: 768px) {
    .pp-container { 
        padding: 0 10px; 
        margin: 15px auto; 
    }
    
    /* حذف استایل‌های کارتی قبلی */
    .pp-table thead { 
        display: table-header-group; /* هدر جدول نمایش داده شود */
    }
    
    .pp-table tr {
        display: table-row; /* ردیف‌ها به حالت عادی برگردند */
        background: transparent;
        border: none;
        border-radius: 0;
        margin-bottom: 0;
        padding: 0;
        box-shadow: none;
    }
    
    .pp-table td {
        display: table-cell; /* سلول‌ها به حالت عادی برگردند */
        justify-content: initial;
        align-items: initial;
        padding: 10px 8px;
        border-bottom: 1px solid #f1f5f9;
        font-size: 13px; /* فونت کمی ریزتر برای جا شدن در صفحه */
        white-space: nowrap; /* جلوگیری از شکستن متن */
    }
    
    /* حذف لیبل‌های اضافه شده */
    .pp-table td::before { 
        content: none !important; 
    }
    
    /* تنظیمات ویژه المان‌ها */
    .pp-code { 
        font-size: 12px; 
        padding: 2px 6px; 
    }
    
    .pp-title { 
        font-weight: 600; 
        color: #0f172a; 
    }
    
    /* اسکرول افقی برای جدول */
    .pp-table-wrapper { 
        overflow-x: auto; 
        -webkit-overflow-scrolling: touch; /* اسکرول نرم در آیفون */
        width: 100%;
    }
    
    .pp-table {
        min-width: 100%; /* جدول کل عرض را بگیرد */
    }
    
    /* دکمه‌های فیلتر در موبایل */
    .pp-main-btn { 
        padding: 6px 10px; 
        font-size: 11px; 
        flex: 1; 
        text-align: center; 
    }
    
    .pp-search { 
        padding: 10px 14px; 
        font-size: 13px; 
    }
}