/* Add custom CSS styles below */ /* ========================= Khashapy - Global CSS tweaks Apply in WP > Customize > Additional CSS ========================= */ /* 1) متغيرات لونية وخط أساسي (استخدم خطوط Google Arabic مثل 'Cairo' أو 'Tajawal') */ :root{ --accent: #b76b2a; /* لون مميز للأزرار/روابط */ --accent-dark: #8a4f1f; --muted: #707070; --surface: #ffffff; --card-shadow: 0 6px 18px rgba(10,10,10,0.08); --radius: 12px; --max-width: 1200px; } /* استيراد خط (ضع هذا في أو عبر تخصيص الواجهة إذا لم يكن موجود) */ /* @import url('https://fonts.googleapis.com/css2?family=Cairo:wght@300;400;600;700&display=swap'); */ html, body { direction: rtl; /* تأكد من اتجاه الصفحة عربي */ font-family: 'Cairo', Arial, Tahoma, sans-serif; background: #f7f7f7; color: #222; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; } /* 2) حاوية عامة لعرض مركزي */ .site, .container, .wrap { max-width: var(--max-width); margin-left: auto; margin-right: auto; padding-left: 16px; padding-right: 16px; } /* 3) هيدر ثابت/مرن */ .site-header { background: rgba(255,255,255,0.98); position: sticky; top: 0; z-index: 9999; box-shadow: 0 2px 8px rgba(0,0,0,0.04); backdrop-filter: blur(4px); } .site-header .logo { display: flex; align-items: center; gap: 12px; padding: 10px 0; } .main-navigation { display: flex; gap: 18px; align-items: center; font-weight: 600; } .main-navigation a { color: #222; padding: 8px 10px; border-radius: 8px; } .main-navigation a:hover { background: rgba(183,107,42,0.08); } /* 4) HERO / banner */ .hero { border-radius: var(--radius); overflow: hidden; margin: 20px 0; display: grid; grid-template-columns: 1fr; gap: 12px; align-items: center; } .hero img { width: 100%; height: 360px; object-fit: cover; display: block; } /* 5) شبكة المنتجات (responsive grid) */ .products-grid, .products, .woocommerce ul.products { display: grid !important; grid-template-columns: repeat(4, 1fr); gap: 18px; margin: 18px 0; } @media (max-width: 1100px){ .products-grid { grid-template-columns: repeat(3,1fr);} } @media (max-width: 800px){ .products-grid { grid-template-columns: repeat(2,1fr);} } @media (max-width: 480px){ .products-grid { grid-template-columns: 1fr; } } /* 6) كرت المنتج */ .product-card, li.product, .product { background: var(--surface); border-radius: 10px; padding: 12px; box-shadow: var(--card-shadow); display: flex; flex-direction: column; transition: transform .18s ease, box-shadow .18s ease; min-height: 340px; } .product-card:hover, li.product:hover { transform: translateY(-6px); box-shadow: 0 10px 28px rgba(10,10,10,0.12); } /* صورة المنتج — تحفظ تناسق الشبكة */ .product-card .thumb, .product .attachment-woocommerce_thumbnail { width: 100%; height: 220px; overflow: hidden; border-radius: 8px; display: block; margin-bottom: 12px; background: #f0f0f0; } .product-card .thumb img, .product img { width: 100%; height: 100%; object-fit: cover; display: block; } /* عنوان المنتج */ .product-card h2, li.product .woocommerce-loop-product__title { font-size: 1.02rem; margin: 8px 0; line-height: 1.25; color: #111; flex-grow: 1; } /* السعر */ .price, .woocommerce-Price-amount { font-size: 1.05rem; font-weight: 700; color: var(--accent-dark); margin-bottom: 8px; } /* زر اضافة للسلة */ .add-to-cart-button, .button.add_to_cart_button, .single_add_to_cart_button, .btn-add { background: var(--accent); color: #fff; border: none; padding: 10px 14px; font-weight: 700; border-radius: 10px; display: inline-block; text-align: center; cursor: pointer; transition: background .14s ease, transform .08s ease; width: 100%; } .add-to-cart-button:hover, .button.add_to_cart_button:hover { background: var(--accent-dark); transform: translateY(-2px); } /* 7) صفحة المنتج - تحسين التخطيط */ .single-product .product-summary { display: grid; grid-template-columns: 1fr 420px; gap: 20px; } @media (max-width: 900px){ .single-product .product-summary { grid-template-columns: 1fr; } } .single-product .product-images { border-radius: 14px; overflow: hidden; background: #fff; box-shadow: var(--card-shadow); } .single-product .product-images img { width: 100%; height: 520px; object-fit: cover; } /* Sticky add-to-cart bar (mobile) */ @media (max-width: 800px) { .sticky-buy-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 99999; background: linear-gradient(90deg, rgba(255,255,255,0.98), rgba(255,255,255,0.98)); border-top: 1px solid #eee; padding: 10px; display: flex; gap: 10px; align-items: center; } .sticky-buy-bar .price { font-size: 1.05rem; margin-left: 6px; } body { padding-bottom: 80px; } } /* 8) Footer */ .site-footer { background: #111; color: #eee; padding: 28px 0; margin-top: 40px; } .site-footer a { color: #fff; opacity: .9; } .site-footer .footer-widgets { display:flex; gap:20px; flex-wrap:wrap; } /* 9) تحسين الأزرار/روابط عامة */ a, button { transition: all .12s ease; } a:focus, button:focus { outline: 3px solid rgba(183,107,42,0.18); outline-offset: 2px; } /* 10) تحسين الأداء البصري للصور (placeholder lazy) */ img[loading="lazy"] { background: linear-gradient(90deg,#f3f3f3,#ededed); border-radius: 6px; } /* 11) تحسين تناسق النصوص والوصف */ .product-excerpt, .woocommerce-loop-product__excerpt { color: var(--muted); font-size: .95rem; margin-top: 6px; } /* 12) اختياري: تحويل شريط البحث للظهور كـ pill input */ .searchform input[type="search"], input.search-field { padding: 10px 14px; border-radius: 999px; border: 1px solid #e6e6e6; width: 100%; max-width: 420px; box-shadow: none; } /* 13) Accessibility: تكبير المساحات القابلة للنقر على الهواتف */ a, .product .button, .add-to-cart-button { touch-action: manipulation; -webkit-tap-highlight-color: transparent; } /* 14) تخصيص سريع لعرض التصنيفات/فلتر جانبي */ .widget_product_categories li { padding: 8px 0; border-bottom: 1px dashed #eee; } /* ================================= نهاية التعديلات الأساسية ================================= */