/*
Theme Name: Partdo Child
Theme URI: https://beijingcars.com/
Description: Ultimate Enterprise Styling for Beijing Cars. Fixed Overlaps & Optimized UX.
Author: Admin-s3nHF
Author URI: https://beijingcars.com/
Template: partdo
Version: 1.4.5
Text Domain: partdo
*/

/* ==========================================================================
   1. GLOBAL RESET & FIXES (إصلاح التداخلات العامة)
   ========================================================================== */

/* منع تداخل العناصر العائمة */
.site-content::after, .row::after, .container::after {
    content: "";
    display: table;
    clear: both;
}

/* ضبط المسافات الافتراضية لمنع التصاق العناصر */
.site-main {
    padding-top: 30px;
    padding-bottom: 30px;
}

/* ==========================================================================
   2. LOGIN & REGISTER PAGE FIXES (إصلاح تداخل صفحة الحساب)
   ========================================================================== */

/* منع تداخل فورم الدخول مع فورم التسجيل في الشاشات الكبيرة */
@media (min-width: 992px) {
    .u-columns.col2-set {
        display: flex !important;
        gap: 50px;
        align-items: flex-start;
    }
    .u-column1, .u-column2 {
        flex: 1;
        float: none !important;
        width: 50% !important;
    }
}

/* تصميم "بطاقة" احترافية للفورم ومنع تداخل الحقول */
.customer-login-form {
    background: #ffffff;
    border: 1px solid #e1e1e1;
    border-radius: 12px;
    padding: 40px !important;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    margin-top: 20px;
}

.woocommerce-form-row {
    margin-bottom: 20px !important;
    clear: both;
}

.woocommerce-form-row input.input-text {
    width: 100% !important;
    height: 50px !important;
    padding: 10px 15px !important;
    border: 1.5px solid #eee !important;
    border-radius: 8px !important;
    transition: all 0.3s ease;
}

/* ==========================================================================
   3. SEARCH & HEADER OVERLAP (إصلاح تداخل البحث والقائمة)
   ========================================================================== */

/* رفع طبقة نتائج البحث AJAX لتكون فوق كل العناصر */
.klb-ajax-search-results {
    z-index: 99999 !important;
    position: absolute !important;
    width: 100% !important;
    top: 100% !important;
    background: white;
    box-shadow: 0 15px 40px rgba(0,0,0,0.2) !important;
    border-radius: 0 0 10px 10px !important;
}

/* منع تداخل الهيدر اللاصق (Sticky Header) مع محتوى الصفحة */
.site-header.sticky-header {
    z-index: 9999 !important;
}

/* ==========================================================================
   4. PRODUCT GRID FIXES (إصلاح تداخل المنتجات)
   ========================================================================== */

/* توحيد ارتفاع بطاقات المنتجات لمنع التداخل عند اختلاف طول العنوان */
.product-item {
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 15px;
    border: 1px solid #f0f0f0;
    border-radius: 10px;
    background: #fff;
    transition: transform 0.3s ease;
}

.product-item .product-title {
    min-height: 44px; /* يضمن بقاء الأزرار في نفس المستوى */
    margin-bottom: 10px;
}

.product-item:hover {
    transform: translateY(-5px);
    z-index: 2;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

/* ==========================================================================
   5. MOBILE MENU & FOOTER FIX (إصلاح تداخل الجوال)
   ========================================================================== */

@media (max-width: 768px) {
    /* منع تداخل القائمة السفلية مع محتوى الفوتر */
    .site-footer {
        padding-bottom: 85px !important;
    }

    /* إصلاح تداخل أزرار الفلترة في صفحة المتجر على الجوال */
    .klb-mobile-filter-canvas {
        z-index: 100000 !important;
    }
}

/* ==========================================================================
   6. BRANDING & FINISHING TOUCHES (لمسات احترافية لـ Beijing Cars)
   ========================================================================== */

/* تنسيق رسائل النظام لتكون بارزة وغير متداخلة */
.woocommerce-error, .woocommerce-message, .woocommerce-info {
    z-index: 10;
    position: relative;
    border: none !important;
    border-radius: 10px !important;
    padding: 20px !important;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05) !important;
}

.woocommerce-error { 
    background-color: #fff5f5 !important; 
    border-left: 5px solid #e22d2d !important;
}

/* زر "أضف للسلة" ليظهر بشكل واضح */
.add_to_cart_button {
    background-color: #e22d2d !important;
    color: white !important;
    border-radius: 6px !important;
    padding: 12px 20px !important;
    font-weight: 700 !important;
    width: 100%;
    text-align: center;
}



/* FORCE REMOVAL: Global Background Image
   Beijing Cars Custom Fix
*/
body.custom-background {
    background-image: none !important;
    background-color: #ffffff !important; /* Keeps the clean white background */
}