/* --- إصلاح التنسيق للأزرار العلوية --- */
/* إجبار القالب على عرض حقل الكمية وزر السلة بشكل طبيعي */
.woocommerce div.product form.cart {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

/* تغليف زر COMMANDER الخاص بنا لكي ينزل سطراً جديداً ويكون عريضاً */
.onedev-commander-wrapper {
    width: 100%;
    margin-top: 10px;
    flex-basis: 100%; /* يجبره على أخذ سطر كامل في الـ flex */
}

/* زر COMMANDER العلوي المباشر */
button.onedev-commander-btn {
    background-color: #000000 !important;
    color: #ffffff !important;
    width: 100% !important;
    padding: 15px !important;
    font-size: 16px !important;
    font-weight: bold !important;
    text-transform: uppercase !important;
    border-radius: 5px !important;
    border: none !important;
    transition: 0.3s;
    cursor: pointer !important;
    display: block !important;
}

button.onedev-commander-btn:hover {
    background-color: #333333 !important;
}

/* زر Ajouter au panier الافتراضي (إرجاعه لحجمه الطبيعي) */
.woocommerce div.product form.cart .single_add_to_cart_button {
    flex: 1; /* يأخذ المساحة المتبقية بجانب الكمية */
    background-color: transparent !important;
    color: #000 !important;
    border: 1px solid #000 !important;
    padding: 12px 20px !important;
}
/* ------------------------------------- */

/* تنسيق عداد الزوار (من الخطوة السابقة) */
.onedev-viewers-counter {
    background-color: #f5f5f5;
    padding: 10px;
    text-align: center;
    margin-bottom: 20px;
    border-radius: 4px;
    font-weight: bold;
    color: #333;
}
.onedev-counter-number {
    background-color: #3f51b5;
    color: white;
    padding: 2px 8px;
    border-radius: 3px;
    margin-right: 5px;
}
/* تنسيق الغلاف العام للنموذج المدمج */
.onedev-express-checkout-wrapper {
    border: 2px dashed #000;
    padding: 20px;
    margin-top: 30px;
    border-radius: 8px;
    background-color: #fafafa;
}

/* تنسيق الحقول Labels & Inputs */
.onedev-form-group {
    margin-bottom: 15px;
}
.onedev-form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #333;
}
.onedev-form-group label .required {
    color: red;
}
.onedev-form-group input, 
.onedev-form-group select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    background-color: #fff;
    font-size: 15px;
}

/* تنسيق زر التأكيد في النموذج المدمج */
button.onedev-express-btn {
    display: block !important;
    width: 100% !important;
    background-color: #002D15 !important; /* اللون الأخضر الغامق الخاص بقالبك كما في الصورة */
    color: #ffffff !important;
    padding: 15px !important;
    font-size: 18px !important;
    font-weight: bold !important;
    text-transform: uppercase !important;
    border: none !important;
    border-radius: 5px !important;
    cursor: pointer !important;
    margin-top: 15px !important;
    text-align: center !important;
}

button.onedev-express-btn:hover {
    background-color: #000000 !important;
}

/* --- تنسيق نافذة الشحن Popup --- */
.onedev-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
}
.onedev-popup-content {
    background: #fff;
    padding: 30px;
    border-radius: 8px;
    width: 90%;
    max-width: 400px;
    text-align: center;
}
.shipping-option {
    text-align: left;
    margin: 15px 0;
    padding: 10px;
    border: 1px solid #eee;
    border-radius: 5px;
}
.onedev-confirm-btn {
    background-color: #28a745 !important;
    color: #fff !important;
    width: 100%;
    padding: 12px !important;
    margin-top: 15px;
    border: none;
    border-radius: 5px;
}
.onedev-close-btn {
    background-color: transparent !important;
    color: #888 !important;
    width: 100%;
    padding: 10px !important;
    margin-top: 5px;
    border: none;
    text-decoration: underline;
}

/* --- الزر العائم للموبايل Sticky Bottom Bar --- */
.onedev-sticky-bottom-bar {
    display: none; /* مخفي في الديسكتوب */
}
@media (max-width: 768px) {
    .onedev-sticky-bottom-bar {
        display: block;
        position: fixed;
        bottom: 0;
        left: 0;
        width: 100%;
        background-color: #fff;
        padding: 10px;
        box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
        z-index: 999;
    }
    .onedev-sticky-bottom-bar button {
        width: 100%;
        background-color: #000 !important;
        color: #fff !important;
        padding: 15px;
        font-size: 16px;
        border: none;
        border-radius: 5px;
    }
}