        /* Reset */
        * {
            box-sizing: border-box;
            margin: 0;
            padding: 0;
        }

        /* پایه Pagination */
        .pagination {
            display: flex;
            gap: 10px;
            justify-content: center;
            padding: 2rem;
            flex-wrap: wrap;
        }

        /* استایل کلی تمام دکمه‌ها */
        .page,
        .pagination-first,
        .pagination-last,
        .pagination-prev,
        .pagination-next,
        .dots {
            padding: 10px 14px;
            border: 1px solid #e0e0e0;
            border-radius: 8px;
            color: #333;
            text-decoration: none;
            transition: all 0.3s ease;
            min-width: 44px;
            text-align: center;
            background: #fff;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        /* استایل فعال */
        #active {
            background: #ef5661;
            color: white !important;
            border-color: #ef5661;
            cursor: default;
        }

        /* هاور */
        .page:not(.active):hover,
        .pagination-first:hover,
        .pagination-last:hover,
        .pagination-prev:hover,
        .pagination-next:hover {
            background: #f8f8f8;
            transform: translateY(-2px);
        }

        /* سه نقطه */
        .dots {
            border-color: transparent;
            background: #f5f5f5;
            cursor: default;
        }

        /* دکمه‌های اول/آخر */
        .pagination-first,
        .pagination-last {
            background: #f8f8f8;
            border-color: #ddd;
        }

        /* موبایل (عرض زیر 768px) */
        @media (max-width: 768px) {
            .pagination {
                padding: 1rem;
                gap: 8px;
            }

            .pagination-first,
            .pagination-last,
            .dots {
                display: none;
            }

            .page:not(.active):nth-child(n+6) {
                display: none;
            }

            .page,
            .pagination-prev,
            .pagination-next {
                padding: 8px 12px;
                min-width: 36px;
                font-size: 14px;
            }

            /* استایل فلش‌ها برای موبایل */
            .pagination-prev,
            .pagination-next {
                font-size: 0;
                width: 36px;
                height: 36px;
                position: relative;
            }

            .pagination-prev::after,
            .pagination-next::after {
                content: "";
                display: block;
                width: 24px;
                height: 24px;
                background-size: contain;
                position: absolute;
                top: 50%;
                left: 50%;
                transform: translate(-50%, -50%);
            }


        }

        /* دستگاه‌های خیلی کوچک (زیر 360px) */
        @media (max-width: 360px) {
            .page,
            .pagination-prev,
            .pagination-next {
                padding: 6px 8px;
                min-width: 32px;
                font-size: 13px;
            }
        }
        @media (max-width: 768px) {
  /* نمایش همزمان دو دکمه */
  .pagination-prev,
  .pagination-next {
    display: flex !important; /* تضمین نمایش */
    font-size: 0;
    width: 36px;
    height: 36px;
    position: relative;
    order: 0; /* تنظیم ترتیب نمایش */
  }

  /* اصلاح آیکون‌ها */
  .pagination-prev::after {
    content: "";
    display: block;
    width: 24px;
    height: 24px;
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill="%23333" d="M15.41 16.59L10.83 12l4.58-4.59L14 6l-6 6 6 6 1.41-1.41z"/></svg>');
    background-size: contain;
  }

  .pagination-next::after {
    content: "";
    display: block;
    width: 24px;
    height: 24px;
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill="%23333" d="M8.59 16.59L13.17 12 8.59 7.41 10 6l6 6-6 6-1.41-1.41z"/></svg>');
    background-size: contain;
  }
}