/*
Theme Name: Cairo Decor
Author: Nour El Din
Version: 1.2
Description: القالب الرسمي لشركة كايرو للديكور (نسخة خالية من الأخطاء)
*/

/* =========================================
   1. المتغيرات والألوان (Global Variables)
   ========================================= */
:root {
    --brand-orange: #FF6B00; /* البرتقالي الرسمي */
    --brand-dark: #212529;   /* الأسود الرسمي */
    --brand-light: #f8f9fa;  /* الرمادي الفاتح للخلفيات */
    --font-main: 'Tajawal', sans-serif;
}

body {
    font-family: var(--font-main);
    overflow-x: hidden !important; /* هام جداً لمنع اهتزاز الموبايل */
    width: 100%;
    background-color: #fff;
}

/* =========================================
   2. إصلاحات عامة (Resets & Typography)
   ========================================= */
/* هذا الكود يصلح صور المنتجات ولكنه كان يسبب مشكلة اللوجو، تم حلها في قسم اللوجو بالأسفل */
img, video, iframe {
    max-width: 100% !important;
    height: auto !important;
}

a {
    text-decoration: none !important;
    transition: all 0.3s ease;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
}

/* =========================================
   3. النافبار والهيدر (Navbar & Logo)
   ========================================= */
.navbar-nav .nav-link {
    font-size: 1.1rem;
    font-weight: 500;
    margin-left: 15px;
}

.navbar-nav .nav-link:hover {
    color: var(--brand-orange) !important;
}

/* 🔥 إصلاح اللوجو النهائي (Desktop) */
.custom-logo {
    height: 55px !important;      /* إجبار الارتفاع */
    width: auto !important;       /* الحفاظ على الأبعاد */
    max-height: 55px !important;  /* تأكيد عدم التمدد */
    transition: transform 0.3s ease;
}

.custom-logo:hover {
    transform: scale(1.05);
}

/* إصلاح خلفية النافبار في صفحات المتجر */
body.cairo-shop-mode .navbar {
    background-color: var(--brand-dark) !important;
    position: fixed !important;
    top: 0;
    width: 100%;
    z-index: 1000;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

/* إخفاء الهيدر الافتراضي الضخم في صفحة المنتج */
body.cairo-shop-mode .page-header {
    display: none !important; 
}

/* إصلاح ألوان هيدر الصفحات الفرعية (من نحن، اتصل بنا) */
.page-header h1, 
.page-header .breadcrumb-item,
.page-header .breadcrumb-item a,
.page-header .lead {
    color: #ffffff !important;
    text-shadow: 0 2px 4px rgba(0,0,0,0.6);
}

/* =========================================
   4. الأزرار (Buttons)
   ========================================= */
.btn {
    border-radius: 50px;
    padding: 10px 30px;
    font-weight: 700;
    transition: all 0.3s ease-in-out;
    border-width: 2px;
}

.btn-primary {
    background-color: var(--brand-orange) !important;
    border-color: var(--brand-orange) !important;
    color: #fff !important;
}

.btn-primary:hover {
    background-color: #e65c00 !important;
    border-color: #e65c00 !important;
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(255, 107, 0, 0.3);
}

.btn-outline-light:hover {
    background-color: #fff !important;
    color: var(--brand-dark) !important;
    transform: translateY(-3px);
}

/* =========================================
   5. كروت الخدمات والمشاريع (Cards)
   ========================================= */
.service-card {
    transition: all 0.3s ease;
    background: #fff;
    border: 1px solid #eee;
}

.service-card:hover {
    transform: translateY(-10px);
    border-color: var(--brand-orange) !important;
    box-shadow: 0 15px 30px rgba(0,0,0,0.1) !important;
}

.service-card .icon-wrapper {
    transition: all 0.4s ease;
}

.service-card:hover .icon-wrapper {
    background-color: var(--brand-orange) !important;
    color: #fff !important;
    transform: rotate(10deg);
}

.project-card {
    cursor: pointer;
    border-radius: 15px;
    overflow: hidden;
}
.project-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
    /* لون خلفية مؤقت في حالة عدم تحميل الصورة */
    background-color: #f0f0f0; 
}
.project-card:hover img {
    transform: scale(1.1);
}
.project-overlay {
    background: linear-gradient(to top, rgba(0,0,0,0.9), transparent);
    transition: 0.3s;
}

/* =========================================
   6. متجر ووكومرس (WooCommerce Fixes)
   ========================================= */

/* تنسيق الشبكة (Grid) */
.woocommerce ul.products {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 30px;
}

.woocommerce ul.products li.product {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 15px;
    overflow: hidden;
    transition: 0.3s;
    float: none !important;
    width: 100% !important;
    margin: 0 !important;
}

.woocommerce ul.products li.product:hover {
    box-shadow: 0 15px 30px rgba(0,0,0,0.1);
    transform: translateY(-5px);
    border-color: var(--brand-orange);
}

/* صور المنتجات */
.woocommerce ul.products li.product a img {
    width: 100% !important;
    height: 250px !important;
    object-fit: cover !important;
    margin: 0 !important;
    border-bottom: 1px solid #f0f0f0;
}

/* العناوين والأسعار */
.woocommerce ul.products li.product .woocommerce-loop-product__title {
    padding: 15px 15px 5px;
    font-size: 1.1rem !important;
    color: var(--brand-dark);
}

.woocommerce ul.products li.product .price {
    padding: 0 15px 15px;
    color: var(--brand-orange) !important;
    font-weight: bold;
    display: block;
}

/* زر (Read More / Add to Cart) */
.woocommerce ul.products li.product .button,
.woocommerce a.button,
.woocommerce button.button {
    display: block !important;
    width: 90% !important;
    margin: 10px auto 15px !important;
    background-color: var(--brand-dark) !important;
    color: #fff !important;
    padding: 10px !important;
    border-radius: 50px !important;
    font-weight: bold;
    border: none !important;
    text-align: center !important;
    font-size: 0.9rem !important;
    transition: 0.3s;
}

.woocommerce ul.products li.product .button:hover,
.woocommerce a.button:hover {
    background-color: var(--brand-orange) !important;
}

/* --- تنظيف صفحة المنتج (إخفاء الإنجليزي) --- */
#reviews, .woocommerce-reviews, .woocommerce-product-rating, .product_meta {
    display: none !important;
}
.woocommerce-Tabs-panel--description h2 {
    display: none !important;
}
.woocommerce-Tabs-panel--description {
    background: #fff;
    padding: 30px;
    border-radius: 15px;
    border: 1px solid #eee;
    margin-top: 20px;
    color: #555;
    line-height: 1.8;
}

/* =========================================
   7. صفحة المنتج الفردي (Single Product Layout)
   ========================================= */
.woocommerce div.product {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 40px !important;
    margin-top: 20px;
}

/* قسم الصور */
.woocommerce div.product div.images {
    width: 45% !important;
    float: none !important;
    margin-bottom: 0 !important;
}
.woocommerce div.product div.images img {
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
    width: 100% !important;
}

/* قسم التفاصيل */
.woocommerce div.product div.summary {
    width: 50% !important;
    float: none !important;
    padding: 20px;
}

.product_title {
    font-size: 2.2rem !important;
    color: var(--brand-dark);
    margin-bottom: 1rem;
}

.price {
    font-size: 1.8rem !important;
    color: var(--brand-orange) !important;
}

/* زر إضافة للسلة الداخلي */
.single_add_to_cart_button {
    background-color: var(--brand-dark) !important;
    padding: 15px 50px !important;
    border-radius: 50px !important;
    margin-top: 20px !important;
    width: auto !important; /* لا يأخذ العرض كامل هنا */
}
.single_add_to_cart_button:hover {
    background-color: var(--brand-orange) !important;
}

/* =========================================
   8. الفوتر (Footer)
   ========================================= */
.social-btn {
    width: 40px; height: 40px;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
    display: flex; align-items: center; justify-content: center;
    color: #fff;
    margin-right: 10px;
    transition: 0.3s;
}
.social-btn:hover {
    background: var(--brand-orange);
    color: #fff;
    transform: translateY(-5px);
}

.footer-links a {
    color: rgba(255,255,255,0.7) !important;
    display: block;
    margin-bottom: 10px;
}
.footer-links a:hover {
    color: var(--brand-orange) !important;
    padding-right: 5px;
}

/* =========================================
   9. استجابة الموبايل (Mobile Responsiveness)
   ========================================= */
@media (max-width: 768px) {
    /* تصغير الخطوط */
    h1, .display-1, .display-2, .display-3 { font-size: 2rem !important; }
    h2, .display-4, .display-5 { font-size: 1.6rem !important; }
    
    /* ضبط الهوامش */
    section { padding-top: 40px !important; padding-bottom: 40px !important; }
    
    /* 🔥 إصلاح اللوجو في الموبايل */
    .custom-logo { 
        height: 40px !important; 
        max-height: 40px !important;
    }
    
    /* جعل المنتجات والتفاصيل تأخذ العرض الكامل */
    .woocommerce div.product div.images,
    .woocommerce div.product div.summary {
        width: 100% !important;
        flex: 0 0 100% !important;
    }
    
    /* الأزرار تحت بعض */
    .d-flex.gap-3 { flex-direction: column; }
    .btn { width: 100%; margin-bottom: 10px; }
    
    /* النافبار */
    .navbar-collapse {
        background: var(--brand-dark);
        padding: 20px;
        border-radius: 10px;
        margin-top: 10px;
    }
    
    /* إصلاح جدول ووكومرس (السلة) */
    .woocommerce table.shop_table {
        display: block;
        width: 100%;
        overflow-x: auto;
    }
}
/* إخفاء السايدبار الافتراضي والقوائم الجانبية */
#secondary, 
#sidebar, 
.widget-area,
.sidebar {
    display: none !important;
}
/* إلغاء قص الصور وعرضها بالكامل */
.woocommerce ul.products li.product a img {
    height: auto !important; /* الارتفاع حر حسب الصورة */
    object-fit: contain !important; /* إظهار الصورة بالكامل بدون قص أي جزء */
    max-height: none !important; /* إلغاء أي حد أقصى */
}
/* =========================================
   إصلاح صور المقالات (Blog Images Full Size)
   ========================================= */

/* 1. للصورة في الصفحة الرئيسية (كروت المقالات) */
.blog-card img,
.card-img-top,
.post-thumbnail img,
.wp-post-image {
    height: auto !important;       /* الارتفاع حر حسب الصورة الأصلية */
    max-height: none !important;   /* إلغاء أي حد أقصى للارتفاع */
    object-fit: contain !important; /* عرض الصورة كاملة دون قص أي جزء */
    width: 100%;                   /* العرض يملأ الكارت */
}

/* 2. للصورة داخل صفحة المقال نفسه (Single Post) */
.entry-content img {
    height: auto !important;
    max-width: 100%;
}
/* =========================================
   تنسيق الأسئلة الشائعة الاحترافي (Premium FAQ)
   ========================================= */

/* 1. إزالة الخلفيات والحدود الافتراضية */
.custom-faq .accordion-item {
    background: transparent;
    transition: all 0.3s ease;
}

/* 2. تنسيق زر السؤال */
.custom-faq .accordion-button {
    box-shadow: none !important; /* إلغاء الظل الأزرق */
    border-radius: 15px !important; /* تدوير الحواف */
    background: #fff;
    transition: 0.3s;
}

/* 3. عند فتح السؤال (Active State) */
.custom-faq .accordion-button:not(.collapsed) {
    background-color: #fff !important;
    color: var(--brand-orange) !important;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05) !important; /* ظل خفيف */
}

/* 4. تغيير أيقونة السهم الافتراضية */
.custom-faq .accordion-button::after {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23212529'%3e%3cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e") !important;
    transition: transform 0.3s ease;
}

/* تلوين السهم عند الفتح */
.custom-faq .accordion-button:not(.collapsed)::after {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23FF6B00'%3e%3cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e") !important;
}

/* 5. تنسيق الأيقونة الجانبية (Icon Box) */
.custom-faq .icon-box {
    width: 40px; height: 40px;
    background: #fff8f3; /* برتقالي فاتح جداً */
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    transition: 0.3s;
}
/* تلوين الأيقونة عند الفتح */
.custom-faq .accordion-button:not(.collapsed) .icon-box {
    background: var(--brand-orange);
}
.custom-faq .accordion-button:not(.collapsed) .icon-box i {
    color: #fff !important;
}

/* 6. تأثير البلور للكارت العائم فوق الصورة */
.backdrop-blur {
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    background-color: rgba(33, 37, 41, 0.85) !important; /* أسود شفاف */
    border: 1px solid rgba(255,255,255,0.1);
}
/* =========================================
   تنسيق سيكشن خطوات العمل (Steps)
   ========================================= */

/* 1. دائرة الرقم */
.step-number {
    width: 50px;
    height: 50px;
    font-size: 1.2rem;
    border: 4px solid #fff; /* إطار أبيض لفصل الرقم عن الخط الخلفي */
    position: relative;
    top: -10px; /* يرفع الرقم قليلاً لأعلى */
    transition: 0.3s;
}

/* 2. تأثير الرفع عند الماوس */
.hover-top {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid #f0f0f0;
}

.hover-top:hover {
    transform: translateY(-10px); /* يرتفع للأعلى */
    box-shadow: 0 15px 30px rgba(0,0,0,0.1) !important;
    border-color: var(--brand-orange);
}

.hover-top:hover .step-number {
    background-color: var(--brand-orange) !important;
    color: #fff !important;
    transform: scale(1.1);
}

/* 3. الخط المنقط في الخلفية */
.border-dashed {
    border-style: dashed !important;
}

/* في الموبايل */
@media (max-width: 992px) {
    .border-dashed { display: none; } /* إخفاء الخط في الموبايل */
    .process-card { margin-bottom: 20px; }
}
/* تحسين شكل الكروت الافتراضي */
.process-card, .p-4.rounded-4.border {
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1) !important;
    cursor: pointer;
    background: #ffffff;
    z-index: 1;
    position: relative;
}

/* تأثير التفاعل عند اقتراب الماوس */
.process-card:hover, .p-4.rounded-4.border:hover {
    transform: translateY(-12px) !important; /* ارتفاع الكارت للأعلى */
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1) !important; /* ظل ناعم خلفي */
    border-color: #FF6B00 !important; /* تغيير لون الحدود للبرتقالي */
}

/* تفاعل الأيقونات والأرقام داخل الكروت */
.process-card:hover .bi, .process-card:hover i, 
.p-4.rounded-4.border:hover .text-warning {
    color: #FF6B00 !important; /* تحويل لون الأيقونة للبرتقالي */
    transform: scale(1.1); /* تكبير الأيقونة قليلاً */
    transition: all 0.3s ease;
}

/* تفاعل الدوائر المرقمة في رحلة المشروع */
.process-card:hover .step-number, 
.process-card:hover .bg-dark, 
.process-card:hover .bg-warning {
    background-color: #FF6B00 !important; /* تحول لون الدائرة للبرتقالي */
    color: #fff !important;
}
/* اللون الافتراضي لكل روابط المنيو */
.main-navbar .navbar-nav .nav-link,
.main-navbar .navbar-nav .menu-item a {
    color: #ffffff !important;
}

/* عند المرور بالماوس */
.main-navbar .navbar-nav .nav-link:hover,
.main-navbar .navbar-nav .menu-item a:hover {
    color: #FF6B00 !important;
}

/* اللينك النشط (الصفحة الحالية) */
.main-navbar .navbar-nav .current-menu-item > a,
.main-navbar .navbar-nav .current_page_item > a {
    color: #FF6B00 !important;
}

/* إلغاء أي لون أزرق أو underline */
.main-navbar a {
    text-decoration: none !important;
}
/* تنظيم عناصر المنيو */
.main-navbar .navbar-nav {
    gap: 18px; /* مسافة بين العناصر */
    margin-right: 40px; /* تزق المنيو ناحية اليمين */
}

/* تأكيد إن كل عنصر مستقل */
.main-navbar .navbar-nav .nav-item {
    margin: 0;
}

/* تحسين شكل اللينك */
.main-navbar .navbar-nav .nav-link {
    padding: 8px 14px !important;
    white-space: nowrap;
}
/* ===== منيو الموبايل يمين (RTL صح) ===== */
@media (max-width: 991px) {

    .main-navbar .navbar-collapse {
        text-align: right !important;
    }

    .main-navbar .navbar-nav {
        width: 100%;
        display: flex !important;
        flex-direction: column !important;
        align-items: flex-start !important; /* يمين في RTL */
        padding-right: 0 !important;
        padding-left: 16px !important; /* مسافة من اليمين */
        gap: 14px;
    }

    .main-navbar .navbar-nav .nav-item {
        width: 100%;
        text-align: right !important;
    }

    .main-navbar .navbar-nav .nav-link {
        width: 100%;
        text-align: right !important;
        padding-right: 0 !important;
        padding-left: 0 !important;
    }
}
/* إخفاء النص الإنجليزي واستبداله بالعربي */
.related.products h2 {
    visibility: hidden;
    position: relative;
    text-align: right;
}

.related.products h2::after {
    content: "منتجات ذات صلة";
    visibility: visible;
    position: absolute;
    right: 0;
    top: 0;
    font-family: 'Tajawal', sans-serif; /* استخدم نفس خط موقعك */
    font-weight: bold;
}

/* إزالة أي فراغ أبيض بين الهيدر والسلايدر */
header,
.site-header,
.main-header {
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
}

body {
    margin: 0 !important;
    padding: 0 !important;
}

/* الهيرو نفسه */
.cairo-hero-slider {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

/* لو Bootstrap مستخدم */
.container,
.container-fluid {
    padding-top: 0 !important;
}

/* سوايبر */
.heroSwiper {
    margin-top: 0 !important;
}
/* ===== HERO IMAGE FIX ===== */

/* افتراضي (ديسكتوب) */
.swiper-slide {
    background-size: cover;
}

/* موبايل فقط */
@media (max-width: 768px) {

    .cairo-hero-slider {
        height: auto;
        min-height: 100vh;
        background: #000;
    }

    .swiper-slide {
        background-size: contain;     /* 👈 الصورة كاملة */
        background-repeat: no-repeat;
        background-position: center top;
        padding-top: 120px;          /* يمنع التصاق الصورة بالهيدر */
        padding-bottom: 80px;
    }

    .cairo-hero-slider h1 {
        font-size: 28px;
        line-height: 1.3;
    }

    .cairo-hero-slider .lead {
        font-size: 15px;
    }

    .cairo-hero-slider .btn {
        width: 100%;
    }

    .cairo-hero-slider .d-flex {
        flex-direction: column;
    }
}
/* ضبط اتجاه الموقع بالكامل */
body {
    direction: rtl;
    text-align: right;
}

/* تنسيق أزرار المنتجات (WooCommerce RTL) */
.woocommerce ul.products li.product {
    text-align: right !important;
    float: right !important; /* لضمان ترتيب الكروت من اليمين */
}

.woocommerce ul.products li.product .button {
    background-color: #FF6B00 !important;
    color: #fff !important;
    border-radius: 50px !important;
    padding: 10px 20px !important;
    font-size: 0.9rem !important;
    display: inline-block !important;
    transition: 0.3s ease !important;
}

.woocommerce ul.products li.product .button:hover {
    background-color: #333 !important;
}

/* تنسيق زر "اقرأ التفاصيل" للمقالات */
.btn-read-more {
    display: inline-flex;
    align-items: center;
    background: #FF6B00;
    color: #fff !important;
    padding: 8px 20px;
    border-radius: 50px;
    text-decoration: none !important;
    font-weight: bold;
    font-size: 0.85rem;
    transition: 0.3s ease;
    gap: 10px;
}

.btn-read-more:hover {
    background: #333;
    transform: scale(1.05);
}

.btn-read-more i {
    font-size: 1.1rem;
}

/* محاذاة كروت المقالات */
.blog-card .card-body {
    direction: rtl;
    text-align: right;
}




