/*
Theme Name: Zhar Custom Theme
Theme URI: https://zhar.om
Description: قالب ووردبريس مخصص ومتكامل للمتاجر الإلكترونية مستوحى من WoodMart وثمانية.
Version: 5.0.0
Author: Abdalla Bashir
Author URI: https://zhar.om
Text Domain: zhar-theme
*/

/* ==========================================================================
   1. استدعاء وتفعيل خط ثمانية المخصص (Thmanyah Sans) محلياً من مجلد fonts
   ========================================================================== */
@font-face {
    font-family: 'Thmanyah Sans';
    src: url('fonts/thmanyahsans-regular.woff2') format('woff2'),
         url('fonts/thmanyahsans-regular.woff') format('woff');
    font-weight: 400;
    font-style: normal;
}
@font-face {
    font-family: 'Thmanyah Sans';
    src: url('fonts/thmanyahsans-medium.woff2') format('woff2'),
         url('fonts/thmanyahsans-medium.woff') format('woff');
    font-weight: 500;
    font-style: normal;
}
@font-face {
    font-family: 'Thmanyah Sans';
    src: url('fonts/thmanyahsans-bold.woff2') format('woff2'),
         url('fonts/thmanyahsans-bold.woff') format('woff');
    font-weight: 700;
    font-style: normal;
}
@font-face {
    font-family: 'Thmanyah Sans';
    src: url('fonts/thmanyahsans-black.woff2') format('woff2'),
         url('fonts/thmanyahsans-black.woff') format('woff');
    font-weight: 900;
    font-style: normal;
}

/* ==========================================================================
   2. الإعدادات الأساسية الشاملة للموقع وتوحيد الخط العربي
   ========================================================================== */
* {
    font-family: 'Thmanyah Sans', 'Cairo', sans-serif !important;
    box-sizing: border-box;
}

body {
    background-color: #fcfdfd;
    margin: 0;
    padding: 0;
    direction: rtl;
    text-align: right;
    color: #1e293b;
    -webkit-font-smoothing: antialiased;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

ul, ol {
    list-style: none;
    padding: 0;
    margin: 0;
}

/* ==========================================================================
   3. تنسيق وهندسة الهيدر الأخضر العلوي الاحترافي (main-store-header)
   ========================================================================== */
.main-store-header {
    width: 100% !important;
    background-color: #042516 !important; /* اللون الأخضر الداكن المعتمد لبراند زهار */
    box-shadow: 0 4px 20px rgba(4, 37, 22, 0.08) !important;
    z-index: 999;
    position: relative;
}

.header-top-wrapper {
    padding: 20px 0 !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
}

.header-inner-container {
    max-width: 1240px !important;
    margin: 0 auto !important;
    padding: 0 20px !important;
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
}

/* الشعار واسم البراند يميناً */
.header-brand-logo .brand-text-logo {
    font-size: 24px !important;
    font-weight: 900 !important;
    color: #ffffff !important;
    letter-spacing: 1px !important;
}

/* شريط البحث الذكي الممتد منتصفاً */
.header-search-bar-box {
    flex: 1 !important;
    max-width: 500px !important;
    margin: 0 40px !important;
}

.woo-custom-search-form {
    display: flex !important;
    width: 100% !important;
    position: relative !important;
}

.search-input-field {
    width: 100% !important;
    padding: 12px 20px !important;
    padding-left: 50px !important;
    border-radius: 30px !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    background-color: rgba(255, 255, 255, 0.07) !important;
    color: #ffffff !important;
    font-size: 14px !important;
    outline: none !important;
    transition: all 0.3s ease !important;
}

.search-input-field::placeholder {
    color: rgba(255, 255, 255, 0.5) !important;
}

.search-input-field:focus {
    background-color: #ffffff !important;
    color: #042516 !important;
    border-color: #00b074 !important;
}

.search-submit-btn {
    position: absolute !important;
    left: 5px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    background: none !important;
    border: none !important;
    cursor: pointer !important;
    font-size: 16px !important;
    padding: 8px 12px !important;
}

/* أيقونات الأكشن يساراً */
.header-meta-actions {
    display: flex !important;
    align-items: center !important;
    gap: 20px !important;
}

.custom-cart-icon, .custom-wishlist-icon {
    position: relative !important;
    font-size: 20px !important;
    cursor: pointer !important;
    display: inline-block !important;
}

.cart-badge-count {
    position: absolute !important;
    top: -8px !important;
    right: -10px !important;
    background-color: #00b074 !important;
    color: #ffffff !important;
    font-size: 11px !important;
    font-weight: bold !important;
    border-radius: 50% !important;
    width: 18px !important;
    height: 18px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.account-btn-link {
    color: #ffffff !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    background-color: rgba(255, 255, 255, 0.08) !important;
    padding: 8px 16px !important;
    border-radius: 20px !important;
}

.account-btn-link:hover {
    background-color: #00b074 !important;
}

/* شريط التنقل السفلي */
.header-navigation-bar {
    background-color: rgba(0, 0, 0, 0.1) !important;
    padding: 12px 0 !important;
}

.nav-inner-container {
    max-width: 1240px !important;
    margin: 0 auto !important;
    padding: 0 20px !important;
}

.main-nav-links {
    display: flex !important;
    gap: 30px !important;
}

.main-nav-links a {
    color: rgba(255, 255, 255, 0.85) !important;
    font-size: 14px !important;
    font-weight: 500 !important;
}

.main-nav-links li.active a, .main-nav-links a:hover {
    color: #00b074 !important;
    font-weight: bold !important;
}

/* ==========================================================================
   4. هندسة حاويات المتجر والاصطفاف الأفقي المتوازي المتوازن
   ========================================================================== */
.zhar-shop-main-container {
    max-width: 1240px !important;
    margin: 50px auto !important;
    padding: 0 20px !important;
    direction: rtl !important;
}

.shop-inner-layout {
    display: flex !important;
    flex-direction: row !important; /* فرض دائم للاصطفاف الأفقي الجانبي */
    gap: 35px !important;
    align-items: flex-start !important;
    width: 100% !important;
}

/* منطقة عرض شبكة المنتجات (الجانب الأيمن العريض - 75%) */
.shop-products-grid-area {
    flex: 3 !important;
    width: 100% !important;
    min-width: 0 !important;
}

.woocommerce-products-wrapper {
    width: 100% !important;
}

/* القائمة الجانبية للفلاتر والتصفية (الجانب الأيسر الأنيق - 25%) */
.shop-sidebar-filters {
    flex: 1 !important;
    max-width: 290px !important;
    min-width: 260px !important;
    background: #ffffff !important;
    border: 1px solid #edf2f4 !important;
    border-radius: 16px !important;
    padding: 25px !important;
    box-shadow: 0 4px 15px rgba(4, 37, 22, 0.01) !important;
}

.shop-sidebar-filters .widget-title, 
.shop-sidebar-filters h3 {
    font-size: 16px !important;
    color: #042516 !important;
    margin-bottom: 20px !important;
    font-weight: 700 !important;
    border-bottom: 2px solid #042516 !important;
    padding-bottom: 8px !important;
}

/* ==========================================================================
   5. تنسيق كروت المنتجات الاحترافية المربعة (3 أعمدة عريضة)
   ========================================================================== */
.woocommerce .shop-products-grid-area ul.products,
.shop-products-grid-area ul.products {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important; /* 3 أعمدة متناسقة بدقة */
    gap: 25px !important;
    padding: 0 !important;
    margin: 0 !important;
}

/* تنظيف الهياكل الافتراضية لووكومرس لمنع كسر الحاوية */
.woocommerce .shop-products-grid-area ul.products::before,
.woocommerce .shop-products-grid-area ul.products::after {
    display: none !important;
}

.woocommerce .shop-products-grid-area ul.products li.product,
.shop-products-grid-area ul.products li.product {
    width: 100% !important;
    margin: 0 !important;
    background: #ffffff !important;
    border: 1px solid #f1f5f9 !important;
    border-radius: 16px !important;
    padding: 16px !important;
    position: relative !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: space-between !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    text-align: center !important;
}

.woocommerce .shop-products-grid-area ul.products li.product:hover {
    box-shadow: 0 12px 30px rgba(4, 37, 22, 0.06) !important;
    border-color: #042516 !important;
    transform: translateY(-3px) !important;
}

/* صور استوديو مربعة للمنتجات لمنع التفاوت الطولي */
.woocommerce .shop-products-grid-area ul.products li.product a img,
.shop-products-grid-area ul.products li.product img {
    width: 100% !important;
    height: auto !important;
    aspect-ratio: 1 / 1 !important;
    object-fit: cover !important;
    border-radius: 12px !important;
    margin-bottom: 12px !important;
    background-color: #f8fafc !important;
    display: block !important;
}

/* عناوين المنتجات */
.woocommerce .shop-products-grid-area ul.products li.product .woocommerce-loop-product__title,
.shop-products-grid-area ul.products li.product .woocommerce-loop-product__title {
    font-size: 15px !important;
    color: #334155 !important;
    font-weight: 600 !important;
    line-height: 1.5 !important;
    margin: 10px 0 !important;
    min-height: 45px !important;
}

/* عرض الأسعار */
.woocommerce .shop-products-grid-area ul.products li.product .price,
.shop-products-grid-area ul.products li.product .price {
    color: #042516 !important;
    font-weight: 700 !important;
    font-size: 16px !important;
    margin-bottom: 15px !important;
    display: block !important;
}

/* زر أضف للسلة البيضاوي الممتد الاحترافي لزهار */
.woocommerce .shop-products-grid-area ul.products li.product .button,
.shop-products-grid-area ul.products li.product .button.add_to_cart_button {
    background-color: #042516 !important;
    color: #ffffff !important;
    font-weight: 600 !important;
    font-size: 13px !important;
    padding: 12px 0 !important;
    border-radius: 30px !important;
    text-align: center !important;
    display: block !important;
    width: 100% !important;
    margin-top: auto !important;
    border: none !important;
    transition: all 0.2s ease !important;
}

.woocommerce .shop-products-grid-area ul.products li.product .button:hover {
    background-color: #00b074 !important;
}

/* شارات التخفيضات */
.woocommerce span.onsale {
    background-color: #00b074 !important;
    color: #ffffff !important;
    font-size: 11px !important;
    font-weight: 600 !important;
    padding: 4px 12px !important;
    border-radius: 20px !important;
    position: absolute !important;
    top: 15px !important;
    right: 15px !important;
    min-height: auto !important;
    min-width: auto !important;
}

/* إخفاء فلاتر العد والترتيب الافتراضية العشوائية لووكومرس */
.woocommerce-result-count, .woocommerce-ordering {
    display: none !important;
}

/* ==========================================================================
   6. تنسيق الفوتر الفاخر ذو الثلاثة أعمدة المتجانسة (site-footer)
   ========================================================================== */
.site-footer {
    background-color: #042516 !important; /* نفس الهوية البصرية الداكنة للهيدر */
    color: rgba(255, 255, 255, 0.8) !important;
    padding: 60px 0 30px 0 !important;
    margin-top: 80px !important;
    border-top: 4px solid #00b074 !important;
}

.footer-container {
    max-width: 1240px !important;
    margin: 0 auto !important;
    padding: 0 20px !important;
}

.footer-widgets {
    display: grid !important;
    grid-template-columns: 1fr 1fr 1.5fr !important; /* توزيع متوازن للأعمدة */
    gap: 40px !important;
}

.footer-column h3 {
    color: #ffffff !important;
    font-size: 18px !important;
    font-weight: 700 !important;
    margin-bottom: 25px !important;
    position: relative;
}

.footer-column h3::after {
    content: '';
    position: absolute;
    bottom: -8px;
    right: 0;
    width: 35px;
    height: 2px;
    background-color: #00b074;
}

.footer-column ul li {
    margin-bottom: 12px !important;
}

.footer-column ul li a {
    color: rgba(255, 255, 255, 0.7) !important;
    font-size: 14px !important;
}

.footer-column ul li a:hover {
    color: #00b074 !important;
    padding-right: 5px !important;
}

/* عمود بيانات البراند */
.footer-logo-title {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    margin-bottom: 15px !important;
}

.footer-logo-title h2 {
    color: #ffffff !important;
    font-size: 22px !important;
    font-weight: 900 !important;
    margin: 0 !important;
}

.brand-desc {
    font-size: 14px !important;
    line-height: 1.7 !important;
    color: rgba(255, 255, 255, 0.65) !important;
    margin-bottom: 20px !important;
}

.contact-details li {
    font-size: 13px !important;
    margin-bottom: 10px !important;
    color: rgba(255, 255, 255, 0.75) !important;
}

.contact-details a {
    color: inherit !important;
}

.footer-social {
    display: flex !important;
    gap: 15px !important;
    margin-top: 20px !important;
}

.social-icon {
    font-size: 18px !important;
    background: rgba(255, 255, 255, 0.08) !important;
    width: 36px !important;
    height: 36px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 50% !important;
}

.social-icon:hover {
    background: #00b074 !important;
}

.footer-divider {
    border: 0 !important;
    border-top: 1px solid rgba(255, 255, 255, 0.08) !important;
    margin: 40px 0 30px 0 !important;
}

/* قسم بوابات الدفع والشحن */
.footer-payments-section {
    text-align: center !important;
    margin-bottom: 30px !important;
}

.footer-payments-section h4 {
    color: #ffffff !important;
    font-size: 14px !important;
    margin-bottom: 15px !important;
}

.payment-gateways {
    display: flex !important;
    justify-content: center !important;
    gap: 12px !important;
    flex-wrap: wrap !important;
}

.payment-gateways .badge {
    background-color: rgba(255, 255, 255, 0.06) !important;
    color: #ffffff !important;
    padding: 6px 16px !important;
    font-size: 12px !important;
    border-radius: 6px !important;
    border: 1px solid rgba(255, 255, 255, 0.05) !important;
}

/* الحقوق والروابط القانونية */
.footer-bottom {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    border-top: 1px solid rgba(255, 255, 255, 0.05) !important;
    padding-top: 20px !important;
    font-size: 12px !important;
    color: rgba(255, 255, 255, 0.5) !important;
}

.footer-legal-links a {
    color: rgba(255, 255, 255, 0.5) !important;
    margin: 0 5px !important;
}

.footer-legal-links a:hover {
    color: #00b074 !important;
}

/* ==========================================================================
   7. التجاوب الكامل والمرونة مع شاشات الهواتف والأجهزة اللوحية
   ========================================================================== */
@media (max-width: 992px) {
    .shop-inner-layout {
        flex-direction: column-reverse !important; /* الفلاتر تنزل أسفل المنتجات في الهواتف بسلاسة */
    }
    .shop-sidebar-filters {
        max-width: 100% !important;
        width: 100% !important;
    }
    .woocommerce .shop-products-grid-area ul.products,
    .shop-products-grid-area ul.products {
        grid-template-columns: repeat(2, 1fr) !important; /* عمودين في الموبايل لسهولة الرؤية */
        gap: 15px !important;
    }
    .footer-widgets {
        grid-template-columns: 1fr !important; /* الأعمدة فوق بعضها في الموبايل */
        gap: 30px !important;
    }
    .header-inner-container {
        flex-direction: column !important;
        gap: 15px !important;
    }
    .header-search-bar-box {
        margin: 0 !important;
        width: 100% !important;
    }
    .footer-bottom {
        flex-direction: column !important;
        gap: 15px !important;
        text-align: center !important;
    }
}
@media (max-width: 480px) {
    .woocommerce .shop-products-grid-area ul.products,
    .shop-products-grid-area ul.products {
        grid-template-columns: 1fr !important; /* عمود واحد للموبايلات الصغيرة جداً */
    }
}
/* ==========================================================================
   7. تنسيقات وهندسة الصفحة الرئيسية (front-page) لبراند زهار الفاخر
   ========================================================================== */

.zhar-home-main-container {
    max-width: 1240px !important;
    margin: 40px auto !important;
    padding: 0 20px !important;
    direction: rtl !important;
    text-align: right !important;
    box-sizing: border-box;
}

/* تنسيق قسم البنر الرئيسي العريض */
.home-hero-banner-section {
    width: 100% !important;
    margin-bottom: 50px !important;
    position: relative;
}

.hero-banner-wrapper {
    position: relative;
    width: 100%;
    border-radius: 20px !important; /* حواف دائرية ناعمة وفاخرة للبنر */
    overflow: hidden;
    box-shadow: 0 8px 30px rgba(4, 37, 22, 0.04) !important; /* ظل خفيف لحمل البنر عن الخلفية */
}

.main-hero-img {
    width: 100% !important;
    height: auto !important;
    display: block;
    object-fit: cover;
}

/* شارة الخصم العائمة البيضاء */
.banner-floating-badge {
    position: absolute;
    top: 20px;
    left: 20px;
    background-color: #ffffff !important;
    color: #1e293b !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    padding: 8px 16px !important;
    border-radius: 8px !important;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08) !important;
}

/* تنسيق قسم العناوين والبادجات */
.home-products-featured-section {
    width: 100% !important;
    margin-bottom: 60px !important;
}

.section-title-wrapper {
    margin-bottom: 35px !important;
    text-align: right !important;
}

.section-top-badge {
    background-color: #fff1f2 !important;
    color: #f43f5e !important; /* لون وردي أحمر أنيق للشارة الأكثر طلباً */
    font-size: 12px !important;
    font-weight: 600 !important;
    padding: 4px 12px !important;
    border-radius: 20px !important;
    display: inline-block !important;
    margin-bottom: 10px !important;
}

.section-main-title {
    font-size: 24px !important;
    color: #042516 !important; /* هوية زهار الزيتية الفخمة */
    font-weight: 700 !important;
    margin: 0 !important;
    letter-spacing: -0.5px !important;
}

/* شبكة المنتجات الرئيسية لـ 4 أعمدة أفقية ممتدة */
.zhar-home-products-ul {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important; /* فرض 4 أعمدة متساوية متناسقة بامتياز */
    gap: 25px !important;
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

/* تصميم كرت المنتج المنضبط والمحمي */
.zhar-home-product-card {
    background: #ffffff !important;
    border: 1px solid #f1f5f9 !important;
    border-radius: 16px !important;
    padding: 15px !important;
    position: relative !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: space-between !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    box-sizing: border-box !important;
}

.zhar-home-product-card:hover {
    box-shadow: 0 12px 30px rgba(4, 37, 22, 0.05) !important;
    border-color: #042516 !important;
    transform: translateY(-3px) !important;
}

/* أيقونة المفضلة المستديرة العائمة على اليمين فوق الكرت */
.card-wishlist-icon-btn {
    position: absolute !important;
    top: 15px !important;
    right: 15px !important;
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    width: 34px !important;
    height: 34px !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 14px !important;
    cursor: pointer !important;
    z-index: 10;
    transition: all 0.2s ease !important;
}

.card-wishlist-icon-btn:hover {
    background-color: #fff1f2 !important;
    border-color: #f43f5e !important;
    content: "❤️" !important;
}

/* حاوية الصورة المربعة طراز استوديو التصوير لبراند زهار */
.product-card-thumb {
    width: 100% !important;
    aspect-ratio: 1 / 1 !important;
    background-color: #f8fafc !important; /* خلفية رمادية ناعمة ونظيفة جداً للكروت غير المرفوعة */
    border-radius: 12px !important;
    overflow: hidden !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin-bottom: 15px !important;
}

.product-card-thumb img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
}

.img-placeholder-box {
    font-size: 30px !important;
}

/* تفاصيل وبيانات الكرت */
.product-card-details {
    text-align: right !important;
    padding: 0 5px !important;
}

.zhar-home-product-card .woocommerce-loop-product__title {
    font-size: 15px !important;
    color: #1e293b !important;
    font-weight: 600 !important;
    line-height: 1.5 !important;
    margin: 5px 0 2px 0 !important;
    min-height: 44px !important; /* توحيد الأسطر لضمان الترتيب الهندسي الفخم */
}

/* نص التصنيف الصغير بالرمادي */
.product-card-category-text {
    font-size: 11px !important;
    color: #94a3b8 !important;
    display: block !important;
    margin-bottom: 8px !important;
}

.product-card-category-text a {
    color: inherit !important;
}

/* النجوم الذهبية لتقييم الكرت */
.product-card-rating-stars {
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
    font-size: 12px !important;
    margin-bottom: 12px !important;
}

.rating-count-text {
    color: #94a3b8 !important;
    font-size: 11px !important;
}

/* صندوق السعر الملون بـ ر.ع. الأخضر الفاخر */
.price-box-amount, .zhar-home-product-card .price {
    font-size: 16px !important;
    color: #00b074 !important; /* اللون الأخضر الحيوي للأسعار تماماً مثل الصورة المرجعية */
    font-weight: 700 !important;
    display: block !important;
    margin-bottom: 10px !important;
}

/* زر أضف للسلة المدمج داخل الكروت والمنسق بالكامل لزهار */
.home-card-action-btn-box .button,
.home-card-action-btn-box .add_to_cart_button {
    background-color: #042516 !important;
    color: #ffffff !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    padding: 10px 0 !important;
    border-radius: 30px !important;
    width: 100% !important;
    display: block !important;
    text-align: center !important;
    border: none !important;
    transition: background 0.2s ease !important;
}

.home-card-action-btn-box .button:hover {
    background-color: #00b074 !important;
}

/* تنسيق زر "عرض المزيد" السفلي المؤطر والمطابق للصورة */
.home-view-more-action-area {
    text-align: center !important;
    margin-top: 40px !important;
}

.zhar-outline-view-more-btn {
    display: inline-flex !important;
    align-items: center !important;
    gap: 10px !important;
    border: 1px solid #00b074 !important; /* إطار ملوّن بلون الهوية الحيوي */
    color: #00b074 !important;
    padding: 10px 30px !important;
    border-radius: 30px !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    background: transparent !important;
    transition: all 0.2s ease !important;
}

.zhar-outline-view-more-btn:hover {
    background-color: #00b074 !important;
    color: #ffffff !important;
}

.btn-arrow-icon {
    font-size: 16px !important;
}

/* ==========================================================================
   مرونة الشاشات والتجاوب التام مع الأجهزة اللوحية والموبايل
   ========================================================================== */
@media (max-width: 1024px) {
    .zhar-home-products-ul {
        grid-template-columns: repeat(3, 1fr) !important; /* 3 أعمدة في الأجهزة اللوحية */
    }
}

@media (max-width: 768px) {
    .zhar-home-products-ul {
        grid-template-columns: repeat(2, 1fr) !important; /* عمودين في الهواتف العادية لمنع الضغط */
        gap: 15px !important;
    }
    .section-main-title {
        font-size: 20px !important;
    }
}

@media (max-width: 480px) {
    .zhar-home-products-ul {
        grid-template-columns: 1fr !important; /* عمود عريض كامل واحد في الهواتف الصغيرة جداً */
    }
}