/* ==========================================
   Papyrus Wishlist Exact Custom Styles
   ========================================== */

:root {
    --primary-blue: #3498db;
    --primary-blue-hover: #2980b9;
    --danger-red: #e74c3c;
    --bg-light: #f8f9fa;
    --card-border: #e2e8f0;
    --text-dark: #2d3748;
    --text-muted: #718096;
    --radius-main: 12px;
}

.papyrus-wishlist-wrapper *,
.papyrus-wishlist-wrapper *::before,
.papyrus-wishlist-wrapper *::after {
    box-sizing: border-box;
}

.papyrus-wishlist-wrapper {
    font-family: inherit;
    direction: rtl;
    width: 100%;
    margin: 20px 0;
}

.papyrus-wishlist-wrapper .container {
    max-width: 1000px;
    margin: 0 auto;
    background: #fff; 
    padding: 25px;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.06);
}

.papyrus-wishlist-wrapper .wishlist-header {
    font-size: 15px;
    color: #4a5568;
    margin-bottom: 25px;
    line-height: 1.8;
}

.papyrus-wishlist-wrapper .wishlist-header strong {
    color: #1a202c;
}

.papyrus-wishlist-wrapper .wishlist-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.papyrus-wishlist-wrapper .wishlist-item {
    background: #f8f9fa;
    border-radius: var(--radius-main);
    padding: 16px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: all 0.2s ease;
}

.papyrus-wishlist-wrapper .wishlist-item:hover {
    box-shadow: 0 6px 15px rgba(0,0,0,0.08);
}

.papyrus-wishlist-wrapper .item-main {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 15px;
}

.papyrus-wishlist-wrapper .item-details {
    flex: 1;
}

.papyrus-wishlist-wrapper .item-title {
    font-size: 16px;
    font-weight: 700;
    color: #1a202c;
    margin-bottom: 6px;
    line-height: 1.4;
}

.papyrus-wishlist-wrapper .item-price {
    font-size: 14px;
    color: #319795;
    font-weight: 600;
}

.papyrus-wishlist-wrapper .item-image {
    width: 65px;
    height: 90px;
    object-fit: cover;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    flex-shrink: 0;
}

.papyrus-wishlist-wrapper .item-actions {
    display: flex;
    gap: 10px;
    background-color: var(--bg-light);
    padding: 8px;
    border-radius: 8px;
}

.papyrus-wishlist-wrapper .btn {
    border: none;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    width: 100%;
    text-align: center;
    text-decoration: none;
    display: inline-block;
}

.papyrus-wishlist-wrapper .btn-remove {
    background-color: #fff;
    color: var(--danger-red);
    border: 1px solid #feb2b2;
}

.papyrus-wishlist-wrapper .btn-remove:hover {
    background-color: #fff5f5;
}

.papyrus-wishlist-wrapper .btn-accordion {
    background-color: #edf2f7;
    color: #2d3748;
}

.papyrus-wishlist-wrapper .btn-accordion:hover {
    background-color: #cbd5e1;
}

.papyrus-wishlist-wrapper .accordion-menu {
    display: none;
    flex-direction: column;
    gap: 8px;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px dashed #cbd5e1;
}

.papyrus-wishlist-wrapper .accordion-menu.open {
    display: flex;
}

.papyrus-wishlist-wrapper .btn-buy {
    background-color: #e08600;
    color: #fff;
}

.papyrus-wishlist-wrapper .btn-buy:hover {
    background-color: #dd3333;
}

/* استایل‌های مربوط به AJAX ووکامرس */
.papyrus-wishlist-wrapper .btn-buy.loading {
    opacity: 0.6;
    pointer-events: none;
}

.papyrus-wishlist-wrapper .btn-buy.added::after {
    content: ' ✓';
    margin-right: 5px;
}

.papyrus-wishlist-wrapper .btn-download {
    background-color: #2c3e50;
    color: #fff;
}

.papyrus-wishlist-wrapper .btn-download:hover {
    background-color: #8bc34a;
}

.papyrus-wishlist-wrapper .pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 30px;
}

.papyrus-wishlist-wrapper .page-link {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    min-width: 36px;
    height: 36px;
    padding: 0 8px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    background: #fff;
    color: #4a5568;
    text-decoration: none;
    font-size: 14px;
    cursor: pointer;
}

.papyrus-wishlist-wrapper .page-link.active {
    background-color: var(--primary-blue);
    color: #fff;
    border-color: var(--primary-blue);
}

/* ==========================================
   استایل‌های پاپ‌آپ (Modal)
   ========================================== */
.papyrus-wishlist-wrapper .modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    padding: 15px;
}

.papyrus-wishlist-wrapper .modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.papyrus-wishlist-wrapper .modal-box {
    background: #ffffff;
    width: 100%;
    max-width: 580px;
    border-radius: 20px;
    padding: 30px 25px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    position: relative;
    transform: translateY(-20px);
    transition: transform 0.3s ease;
}

.papyrus-wishlist-wrapper .modal-overlay.active .modal-box {
    transform: translateY(0);
}

.papyrus-wishlist-wrapper .modal-icon-wrapper {
    margin: 0 auto 15px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.papyrus-wishlist-wrapper .modal-title {
    color: #e53e3e;
    font-size: 20px;
    font-weight: 800;
    margin-bottom: 12px;
}

.papyrus-wishlist-wrapper .modal-description {
    color: var(--text-muted);
    font-size: 13.5px;
    line-height: 1.7;
    margin-bottom: 20px;
    max-width: 480px;
    margin-left: auto;
    margin-right: auto;
}

.papyrus-wishlist-wrapper .btn-view-plans {
    background-color: var(--primary-blue);
    color: white;
    padding: 10px 24px;
    border-radius: 8px;
    text-decoration: none;
    display: inline-block;
    font-weight: 700;
    font-size: 14px;
    margin-bottom: 25px;
    transition: background 0.2s;
}

.papyrus-wishlist-wrapper .btn-view-plans:hover {
    background-color: var(--primary-blue-hover);
}

.papyrus-wishlist-wrapper .plans-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.papyrus-wishlist-wrapper .plan-card {
    background-color: #f7fafc;
    border: 1px solid #edf2f7;
    border-radius: 12px;
    padding: 15px 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.papyrus-wishlist-wrapper .plan-card:hover {
    background-color: #ffffff;
    box-shadow: 0 8px 20px rgba(0,0,0,0.06);
    transform: translateY(-4px);
    border-color: #cbd5e1;
}

.papyrus-wishlist-wrapper .plan-badge {
    margin-bottom: 8px;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.papyrus-wishlist-wrapper .plan-card:hover .plan-badge {
    transform: scale(1.15) rotate(5deg);
}

.papyrus-wishlist-wrapper .plan-title {
    font-size: 14px;
    font-weight: 700;
    color: #2d3748;
}

.papyrus-wishlist-wrapper .plan-info {
    font-size: 12px;
    color: #718096;
}

.papyrus-wishlist-wrapper .close-modal-btn {
    position: absolute;
    top: 15px;
    left: 15px;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #a0aec0;
    transition: color 0.2s;
}

.papyrus-wishlist-wrapper .close-modal-btn:hover {
    color: #4a5568;
}

@media (max-width: 768px) {
    .papyrus-wishlist-wrapper .wishlist-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .papyrus-wishlist-wrapper .container {
        padding: 15px;
    }

    .papyrus-wishlist-wrapper .plans-container {
        grid-template-columns: 1fr;
    }

    .papyrus-wishlist-wrapper .item-actions {
        flex-direction: column;
    }
}

@media (max-width: 320px) {
    .papyrus-wishlist-wrapper .item-main {
        flex-direction: column-reverse;
        align-items: center;
        text-align: center;
    }

    .papyrus-wishlist-wrapper .item-image {
        width: 80px;
        height: 110px;
    }
}