/*
 Theme Name:   Understrap Child
 Theme URI:    https://understrap.com
 Description:  Understrap Child Theme
 Author:       the Understrap Contributors
 Author URI:   https://github.com/understrap/understrap-child/graphs/contributors
 Template:     understrap
 Version:      1.2.0
 License: GNU General Public License v2 or later
 License URI: http://www.gnu.org/licenses/gpl-2.0.html
 Text Domain:  understrap-child
 Tags: one-column, custom-menu, featured-images, theme-options, translation-ready
 GitHub Theme URI: understrap/understrap-child
*/

html {
    font-family: 'Cairo', sans-serif;
}

button,
input,
select,
textarea {
    font-family: inherit;
}

body,
.woocommerce,
.woocommerce * {
    font-family: 'Cairo', sans-serif !important;
}

/* تنسيق قائمة الترتيب */
.custom-sorting select {
    background-color: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    padding: 0.5rem 2.5rem 0.5rem 1rem;
    font-size: 0.75rem;
    font-weight: 700;
    cursor: pointer;
    outline: none;
}

/* تنسيق أرقام الصفحات */
.page-numbers {
    display: flex;
    gap: 0.75rem;
}

.page-numbers li {
    list-style: none;
}

.page-numbers .page-numbers {
    width: 3rem;
    height: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 1rem;
    background: white;
    border: 1px solid #f3f4f6;
    color: #4b5563;
    font-weight: 700;
    transition: all 0.3s;
}

.page-numbers.current {
    background: #6d28d9 !important;
    color: white !important;
    box-shadow: 0 10px 15px -3px rgba(109, 40, 217, 0.2);
}

/* تنسيق أساسي لشارة التصنيف */
.bg-category {
    background-color: #6d28d9;
    /* لون افتراضي بنفسجي */
}

/* أمثلة لتلوين تصنيفات محددة */
/* استبدل "slug-1" بالـ slug الحقيقي للتصنيف، مثلاً "business" */
.category-slug-1 {
    background-color: #ef4444 !important;
    /* أحمر */
}

/* استبدل "slug-2" بالـ slug الحقيقي، مثلاً "edu" */
.category-slug-2 {
    background-color: #2563eb !important;
    /* أزرق */
}

/* مثال لتصنيف Uncategorized */
.category-uncategorized {
    background-color: #f97316 !important;
    /* برتقالي */
}

/* 1. إزالة التنسيقات الافتراضية المزعجة من ووكوميرس */
#payment_custom_wrapper ul.payment_methods {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

#payment_custom_wrapper ul.payment_methods li {
    margin-bottom: 12px !important;
    border: 2px solid #f1f5f9 !important;
    /* لون border رمادي خفيف */
    border-radius: 1rem !important;
    padding: 15px 20px !important;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

/* 2. تنسيق حالة الاختيار (Checked) */
#payment_custom_wrapper ul.payment_methods li input[type="radio"]:checked+label {
    color: #6d28d9;
}

#payment_custom_wrapper ul.payment_methods li:has(input:checked) {
    border-color: #6d28d9 !important;
    background-color: #f5f3ff !important;
}

/* 3. تنسيق النصوص والشعارات */
#payment_custom_wrapper ul.payment_methods li label {
    font-weight: 700 !important;
    margin-right: 10px !important;
    order: 1;
    flex: 1;
    cursor: pointer;
}

#payment_custom_wrapper ul.payment_methods li img {
    max-height: 20px !important;
    order: 2;
    margin-left: auto;
}

#payment_custom_wrapper ul.payment_methods li input[type="radio"] {
    order: 0;
    margin-left: 10px !important;
    accent-color: #6d28d9;
    /* تلوين نقطة الاختيار بالبنفسجي */
}

/* 4. إخفاء رسائل الدفع الافتراضية وتنسيقها بشكل بسيط */
#payment_custom_wrapper .payment_box {
    width: 100%;
    background: transparent !important;
    border: none !important;
    padding: 10px 0 0 35px !important;
    font-size: 12px !important;
    color: #64748b !important;
    line-height: 1.6;
    order: 3;
}

/* 5. تنسيق زر "تأكيد الطلب" السفلي */
#place_order {
    background-color: #6d28d9 !important;
    color: #fff !important;
    width: 100% !important;
    padding: 18px !important;
    border-radius: 1rem !important;
    font-size: 1.1rem !important;
    font-weight: 900 !important;
    margin-top: 20px !important;
    border: none !important;
    box-shadow: 0 10px 15px -3px rgba(109, 40, 217, 0.2) !important;
}

.free-label {
    background: #f0fdf4;
    /* خلفية خضراء خفيفة جداً */
    padding: 4px;
    border-radius: 12px;
    border: 1px solid #bbf7d0;
    display: inline-block;
    animation: pulse-green 2s infinite;
    font-size: 12px
}

@keyframes pulse-green {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }

    100% {
        transform: scale(1);
    }
}

/* إخفاء خيارات نوع الحساب الافتراضية من دوكان */
.register .user-role-selector,
.register .radio.vendor-customer-registration {
    display: none !important;
}

/* التأكد من إخفاء نصوص الراديو التقليدية التي تظهر أحياناً */
.register label.radio {
    display: none !important;
}

/* استثناء: إظهار حقول البيانات (اسم المتجر، الهاتف) لأنها تكون داخل وسم مختفي أحياناً */
.dokan-vendor-fields {
    display: block;
    /* سيتم التحكم بظهورها عبر الجافاسكريبت الذي وضعناه سابقاً */
}

/* إخفاء القائمة الافتراضية التي يضيفها ووكومرس خارج التصميم */
.woocommerce-MyAccount-navigation {
    display: block;
    /* نحن صممنا قائمة مخصصة */
}

/* تنسيق الجداول (الطلبات) لتناسب التصميم الجديد */
.woocommerce-MyAccount-content table.shop_table {
    border: none !important;
    border-radius: 1.5rem;
    overflow: hidden;
}

.woocommerce-MyAccount-content table.shop_table thead th {
    background-color: #f9fafb;
    padding: 20px;
    font-size: 12px;
    text-transform: uppercase;
    color: #9ca3af;
}

.woocommerce-MyAccount-content table.shop_table tbody td {
    padding: 20px;
    border-bottom: 1px solid #f3f4f6;
    font-size: 14px;
}

/* إخفاء أي تنقل افتراضي إضافي قد يظهر من القالب */
.woocommerce-account .site-content .woocommerce-MyAccount-navigation {
    /* نحن نعتمد الآن على التصميم الجديد داخل الـ Sidebar */
}

.product-image img {
    height: 100%;
}

/* إخفاء ستايل ACF الافتراضي ودمجه مع تصميمك */
.acf-field {
    border: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

.acf-label {
    display: none !important;
}

/* لأنك واضع العناوين يدوياً */

.acf-input input,
.acf-input select,
.acf-input textarea {
    width: 100% !important;
    background-color: #f9fafb !important;
    border: 1px solid #f3f4f6 !important;
    border-radius: 1.25rem !important;
    padding: 1rem 1.25rem !important;
    font-size: 0.875rem !important;
    outline: none !important;
}

/* تنسيق منطقة رفع الملفات لتشبه تصميمك البنفسجي */
.acf-file-uploader,
.acf-image-uploader {
    border: 2px dashed #e9d5ff !important;
    background: #faf5ff !important;
    border-radius: 1.5rem !important;
    padding: 20px !important;
    text-align: center !important;
}


/* إخفاء الـ Radio Buttons الأصلية */
.star-rating-wrapper input {
    display: none;
}

/* ستايل النجوم الافتراضي */
.star-rating-wrapper label {
    font-size: 1.5rem;
    color: #374151;
    /* رمادي داكن */
    cursor: pointer;
    padding: 0 2px;
    transition: all 0.2s ease-in-out;
}

/* تأثير تمرير الماوس (Hover) */
.star-rating-wrapper label:hover,
.star-rating-wrapper label:hover~label {
    color: #fbbf24 !important;
    /* أصفر ذهبي */
}

/* تثبيت اللون عند الاختيار (Checked) */
.star-rating-wrapper input:checked~label {
    color: #f59e0b;
    /* برتقالي ذهبي */
}

/* منع تداخل النصوص الافتراضية لووكومرس */
.star-rating-wrapper {
    direction: rtl;
}

@keyframes bounce-slow {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-15px); }
}

.animate-bounce-slow {
    animation: bounce-slow 4s ease-in-out infinite;

}

.hero-small-image {
    width: 150px
}

.hero-small-image-bottom {
    bottom: 50px!important;
}

.hero-small-image img{
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* تنسيق الحاوية الأساسية */
.falk-pagination {
    display: flex;
    justify-content: center; /* لتوسيط الترقيم في نص الصفحة */
    align-items: center;
    gap: 8px; /* المسافة بين الأرقام */
    margin: 30px 0;
    direction: rtl; /* لضمان الترتيب الصحيح من اليمين لليسار */
}

/* تنسيق الروابط والأرقام */
.falk-pagination a, 
.falk-pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 10px;
    border-radius: 8px; /* زوايا منحنية */
    background-color: #f8f9fa;
    color: #333;
    text-decoration: none;
    font-weight: bold;
    transition: all 0.3s ease;
    border: 1px solid #ddd;
}

/* تنسيق الرقم الحالي (الصفحة النشطة) */
.falk-pagination .current {
    background-color: #6236cc; /* نفس اللون البنفسجي اللي في صورتك */
    color: #fff;
    border-color: #6236cc;
}

/* تأثير عند تمرير الماوس */
.falk-pagination a:hover {
    background-color: #6236cc;
    color: #fff;
    border-color: #6236cc;
}

/* تنسيق النقط (...) */
.falk-pagination .dots {
    border: none;
    background: transparent;
    color: #999;
}