/* ===== استيراد الخطوط ===== */
@import url('https://fonts.googleapis.com/css2?family=Tajawal:wght@400;500;700;800&display=swap');

/* ===== إعادة تعيين ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Tajawal', 'Segoe UI', Tahoma, sans-serif;
}

html, body {
    height: 100%;
    margin: 0;
    padding: 0;
}

body {
    background-color: #f4f6f9;
    color: #333;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

main {
    flex: 1;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ===== الفوتر ===== */
footer {
    background: #1e3c72;
    color: white;
    text-align: center;
    padding: 20px 0;
    margin-top: auto;
    width: 100%;
}

/* ===== شريط التنقل ===== */
.navbar {
    background: linear-gradient(135deg, #1e3c72, #2a5298);
    color: white;
    padding: 15px 0;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.logo {
    font-size: 24px;
    font-weight: bold;
    color: white;
    text-decoration: none;
}

.logo i {
    margin-left: 10px;
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.nav-links a {
    color: white;
    text-decoration: none;
    font-size: 15px;
    padding: 8px 15px;
    border-radius: 5px;
    transition: background 0.3s;
}

.nav-links a:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* ===== صندوق البحث ===== */
.search-box {
    background: white;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    margin: 30px 0;
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: flex-end;
}

.search-box input,
.search-box select {
    flex: 1;
    min-width: 150px;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 16px;
}

.search-box button {
    padding: 12px 35px;
    background: #2a5298;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    cursor: pointer;
}

/* ===== أزرار التصفية ===== */
.filter-tabs {
    display: flex;
    gap: 12px;
    margin: 20px 0 10px 0;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 10px 24px;
    background: #f8f9fc;
    color: #495057;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 600;
    font-size: 15px;
    transition: all 0.3s;
}

.filter-btn.active {
    background: #1a2a6c;
    color: white;
}

/* ===== شبكة المنتجات ===== */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
    margin: 30px 0;
}

.product-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.product-card:hover {
    transform: translateY(-12px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.product-card img {
    width: 100%;
    height: 280px;
    object-fit: cover;
}

.card-body {
    padding: 18px;
}

.card-body h3 {
    font-size: 20px;
    font-weight: 700;
    color: #1e3c72;
}

.card-body .price {
    font-size: 26px;
    font-weight: 800;
    color: #e67e22;
}

.card-body .btn-details {
    display: inline-block;
    margin-top: 12px;
    padding: 10px 28px;
    background: #2a5298;
    color: white;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 600;
}

/* ===== صفحة تفاصيل المنتج ===== */
.product-detail-wrapper {
    background: white;
    border-radius: 16px;
    padding: 30px;
    margin: 30px 0;
}

.detail-top-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}

.main-product-image {
    width: 100%;
    height: 450px;
    object-fit: cover;
}

.product-title {
    font-size: 28px;
    font-weight: 800;
    color: #1a2a6c;
}

.product-price {
    font-size: 32px;
    font-weight: 800;
    color: #e67e22;
}

.specs-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.spec-item {
    background: #f8f9fc;
    padding: 12px 16px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
}
/* ============================================================
   ===== الهيدر الاحترافي =====
   ============================================================ */
/* ===== الشعار الدائري ===== */
.logo {
    display: flex !important;
    align-items: center !important;
    gap: 15px !important;
    text-decoration: none !important;
}

.logo-image-wrapper {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid #f1c40f;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    flex-shrink: 0;
    transition: all 0.3s ease;
    background: white; /* خلفية بيضاء خلف الصورة */
}

.logo-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: all 0.3s ease;
}

/* تأثير عند التمرير */
.logo:hover .logo-image-wrapper {
    border-color: #fff;
    box-shadow: 0 6px 25px rgba(241, 196, 15, 0.4);
    transform: scale(1.05);
}

.logo:hover .logo-image-wrapper img {
    transform: scale(1.1);
}

.logo span {
    font-size: 24px;
    font-weight: 700;
    color: white;
    white-space: nowrap;
    transition: all 0.3s ease;
}

.logo:hover span {
    color: #f1c40f;
}

/* ===== أحجام مختلفة للشعار (اختر ما يناسبك) ===== */
/* كبير */
.logo-image-wrapper.large {
    width: 90px;
    height: 90px;
}

/* وسط (الافتراضي) */
.logo-image-wrapper.medium {
    width: 70px;
    height: 70px;
}

/* صغير */
.logo-image-wrapper.small {
    width: 55px;
    height: 55px;
}

/* ===== استجابة للشاشات الصغيرة ===== */
@media (max-width: 768px) {
    .logo-image-wrapper {
        width: 55px !important;
        height: 55px !important;
    }
    
    .logo span {
        font-size: 18px !important;
    }
    
    .logo {
        gap: 10px !important;
    }
}

@media (max-width: 480px) {
    .logo-image-wrapper {
        width: 45px !important;
        height: 45px !important;
        border-width: 2px !important;
    }
    
    .logo span {
        font-size: 14px !important;
    }
    
    .logo {
        gap: 8px !important;
    }
}
/* ----- الشريط العلوي (Top Bar) ----- */
.top-bar {
    background: #0f1a2e;
    color: rgba(255, 255, 255, 0.7);
    padding: 8px 0;
    font-size: 13px;
    border-bottom: 2px solid #f1c40f;
}

.top-bar-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.contact-info {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.contact-info span {
    display: flex;
    align-items: center;
    gap: 6px;
}

.contact-info i {
    color: #f1c40f;
}

.top-bar-actions {
    display: flex;
    gap: 15px;
}

.top-bar-actions a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: 0.3s;
    display: flex;
    align-items: center;
    gap: 5px;
}

.top-bar-actions a:hover {
    color: #f1c40f;
}

/* ----- الشريط الرئيسي (Main Header) ----- */
.main-header {
    background: #ffffff;
    padding: 15px 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.main-header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

/* الشعار */
.logo-area {
    display: flex;
    flex-direction: column;
}

.logo {
    font-size: 28px;
    font-weight: bold;
    color: #1e3c72;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
}

.logo i {
    color: #f1c40f;
    font-size: 32px;
}

.logo strong {
    color: #f1c40f;
}

.tagline {
    font-size: 12px;
    color: #888;
    margin-top: 2px;
    font-weight: 600;
}

/* شريط البحث */
.header-search {
    flex: 1;
    max-width: 450px;
    min-width: 200px;
}

.header-search form {
    display: flex;
    border: 2px solid #e0e0e0;
    border-radius: 30px;
    overflow: hidden;
    transition: 0.3s;
}

.header-search form:focus-within {
    border-color: #1e3c72;
    box-shadow: 0 0 0 3px rgba(30, 60, 114, 0.1);
}

.header-search input {
    flex: 1;
    padding: 10px 20px;
    border: none;
    outline: none;
    font-size: 15px;
    background: transparent;
}

.header-search button {
    padding: 10px 20px;
    background: #1e3c72;
    color: white;
    border: none;
    cursor: pointer;
    transition: 0.3s;
}

.header-search button:hover {
    background: #0f1a2e;
}

/* أزرار الإجراءات */
.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.cart-btn {
    position: relative;
    display: flex;
    align-items: center;
    gap: 5px;
    background: #f8f9fc;
    padding: 10px 16px;
    border-radius: 30px;
    color: #1e3c72;
    text-decoration: none;
    font-weight: 600;
    transition: 0.3s;
    border: 1px solid #e0e0e0;
}

.cart-btn:hover {
    background: #1e3c72;
    color: white;
    border-color: #1e3c72;
}

.cart-count {
    background: #f1c40f;
    color: #1e3c72;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
}

.quote-btn {
    background: #f1c40f;
    color: #1e3c72;
    padding: 10px 20px;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 700;
    transition: 0.3s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.quote-btn:hover {
    background: #d4a800;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(241, 196, 15, 0.3);
}

/* ----- شريط التنقل (Nav Bar) ----- */
.nav-bar {
    background: #1e3c72;
    color: white;
    position: sticky;
    top: 0;
    z-index: 999;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.nav-bar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 5px;
    margin: 0;
    padding: 0;
}

.nav-links li {
    position: relative;
}

.nav-links a {
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    padding: 12px 18px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    font-size: 15px;
    transition: 0.3s;
    border-radius: 5px;
}

.nav-links a:hover {
    background: rgba(255, 255, 255, 0.15);
    color: white;
}

.nav-links a i {
    font-size: 16px;
}

/* ----- القائمة المنسدلة (Dropdown) ----- */
.dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    min-width: 220px;
    border-radius: 10px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
    padding: 10px 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
    z-index: 1000;
    list-style: none;
}

.dropdown-menu li {
    display: block;
}

.dropdown-menu a {
    color: #333 !important;
    padding: 10px 20px;
    font-weight: 500;
    font-size: 14px;
    border-radius: 0;
    justify-content: flex-start;
}

.dropdown-menu a:hover {
    background: #f8f9fc !important;
    color: #1e3c72 !important;
}

.dropdown-menu .cat-count {
    color: #999;
    font-size: 12px;
    margin-right: auto;
}

/* أزرار التنقل الجانبية */
.nav-actions {
    display: flex;
    gap: 8px;
}

.nav-actions a {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    transition: 0.3s;
    text-decoration: none;
}

.whatsapp-btn {
    background: #25D366;
}

.whatsapp-btn:hover {
    background: #1da851;
    transform: scale(1.1);
}

.call-btn {
    background: #e67e22;
}

.call-btn:hover {
    background: #d35400;
    transform: scale(1.1);
}
/* ============================================================
   ===== الفوتر باللون الأحمر =====
   ============================================================ */

.site-footer {
    background: linear-gradient(135deg, #1e3c72, #2a5298);
    color: rgba(255, 255, 255, 0.85);
    padding: 50px 0 0;
    margin-top: 60px;
    border-top: 4px solid #c0392b;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.5fr;
    gap: 40px;
    padding-bottom: 40px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

/* ====== العناوين (باللون الأحمر) ====== */
.footer-column h4 {
    color: #white;  /* أحمر */
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 12px;
}

.footer-column h4::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 40px;
    height: 3px;
    background: #e74c3c;  /* أحمر */
    border-radius: 2px;
}

/* ====== الشعار في الفوتر ====== */
.footer-logo {
    font-size: 28px;
    font-weight: bold;
    color: white;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.footer-logo i {
    color: #e74c3c;
    font-size: 32px;
}

.footer-logo strong {
    color: #e74c3c;
}

.footer-desc {
    font-size: 15px;
    line-height: 1.8;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 20px;
}

/* ====== الروابط السريعة ====== */
.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: 12px;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    font-size: 18px;
    transition: 0.3s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.footer-links a:hover {
    color: #e74c3c;  /* أحمر عند التمرير */
    transform: translateX(-5px);
}

.footer-links a i {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.5);
}

.footer-links .cat-count {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.4);
}

/* ====== معلومات الاتصال ====== */
.footer-contact {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-contact li {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 15px;
}

.footer-contact li i {
    width: 20px;
    color: #e74c3c;  /* أحمر */
    font-size: 18px;
    margin-top: 2px;
}

.footer-contact li .label {
    display: block;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.4);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.footer-contact li a,
.footer-contact li span {
    color: rgba(255, 255, 255, 0.8);
    font-size: 15px;
    text-decoration: none;
    transition: 0.3s;
}

.footer-contact li a:hover {
    color: #e74c3c;  /* أحمر عند التمرير */
}
/* ============================================================
   ===== أزرار المنتج (أضف للسلة + واتساب) =====
   ============================================================ */

/* ----- الزر الأساسي "أضف للسلة" ----- */
.btn-cart {
    background: #2a5298;
    color: #ffffff;
    border: none;
    border-radius: 8px;
    padding: 12px 30px;
    font-family: 'Tajawal', 'Segoe UI', Tahoma, sans-serif;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-width: 160px;
    box-shadow: 0 4px 12px rgba(42, 82, 152, 0.3);
    text-decoration: none;
}

.btn-cart:hover {
    background: #1e3c72;
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(42, 82, 152, 0.4);
    color: #ffffff;
}

.btn-cart:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(42, 82, 152, 0.2);
}

.btn-cart:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.btn-cart i {
    font-size: 18px;
}

/* ----- زر واتساب ----- */
.btn-whatsapp {
    background: #25D366;
    color: #ffffff;
    border: none;
    border-radius: 8px;
    padding: 12px 30px;
    font-family: 'Tajawal', 'Segoe UI', Tahoma, sans-serif;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-width: 160px;
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.3);
    text-decoration: none;
}

.btn-whatsapp:hover {
    background: #1da851;
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(37, 211, 102, 0.4);
    color: #ffffff;
}

.btn-whatsapp:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(37, 211, 102, 0.2);
}

.btn-whatsapp i {
    font-size: 20px;
}

/* ----- حاوية الأزرار (لتنظيم العرض) ----- */
.custom-buttons-wrapper {
    margin-top: 25px;
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    align-items: center;
    clear: both;
}

/* ----- استجابة للشاشات الصغيرة ----- */
@media (max-width: 576px) {
    .btn-cart,
    .btn-whatsapp {
        width: 100%;
        min-width: unset;
        padding: 14px 20px;
        font-size: 15px;
    }
    
    .custom-buttons-wrapper {
        flex-direction: column;
        gap: 12px;
    }
}
/* ====== أيقونات التواصل الاجتماعي ====== */
.footer-social {
    display: flex;
    gap: 12px;
    margin-top: 15px;
}

.footer-social a {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    transition: 0.3s;
    text-decoration: none;
}

.footer-social a:hover {
    background: #e74c3c;  /* أحمر عند التمرير */
    color: white;
    transform: translateY(-3px);
}

/* ====== شارات الثقة ====== */
.footer-trust {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 20px;
    padding: 30px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.trust-item {
    display: flex;
    align-items: center;
    gap: 12px;
    justify-content: center;
}

.trust-item i {
    color: #e74c3c;  /* أحمر */
    font-size: 24px;
}

.trust-item span {
    font-size: 15px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.8);
}

/* ====== حقوق النشر ====== */
.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    flex-wrap: wrap;
    gap: 15px;
}

.footer-bottom p {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.5);
    margin: 0;
}

.footer-bottom p strong {
    color: #e74c3c;  /* أحمر */
}

.footer-bottom p a {
    color: rgba(255, 255, 255, 0.5);
    text-decoration: none;
    transition: 0.3s;
}

.footer-bottom p a:hover {
    color: #e74c3c;  /* أحمر عند التمرير */
}

.footer-payments {
    display: flex;
    gap: 15px;
    font-size: 28px;
    color: rgba(255, 255, 255, 0.3);
}

.footer-payments i {
    transition: 0.3s;
}

.footer-payments i:hover {
    color: #e74c3c;  /* أحمر عند التمرير */
}
/* ============================================================
   ===== تحسينات صفحة تفاصيل المنتج =====
   ============================================================ */

/* ----- التصنيف والعلامة التجارية (Product Meta) ----- */
.product_meta {
    margin-top: 25px;
    padding-top: 20px;
    border-top: 2px solid #e8ecf1;
    display: flex;
    flex-wrap: wrap;
    gap: 15px 30px;
    font-size: 16px;
}

.product_meta > span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #f8f9fc;
    padding: 8px 18px;
    border-radius: 30px;
    font-weight: 600;
    color: #2d3436;
}

.product_meta > span.sku_wrapper {
    background: #eef2f7;
}

.product_meta > span.posted_in {
    background: #e8f0fe;
    color: #1e3c72;
}

.product_meta > span.tagged_as {
    background: #f0f8f0;
    color: #27ae60;
}

.product_meta .sku,
.product_meta a {
    font-weight: 700;
    color: #2a5298;
    text-decoration: none;
}

.product_meta a:hover {
    color: #1e3c72;
    text-decoration: underline;
}

.product_meta .posted_in a {
    background: rgba(42, 82, 152, 0.1);
    padding: 2px 12px;
    border-radius: 20px;
    transition: 0.3s;
}

.product_meta .posted_in a:hover {
    background: #2a5298;
    color: white;
    text-decoration: none;
}

/* ----- تبويبات المنتج (Tabs) ----- */
.woocommerce-tabs {
    margin-top: 40px;
    background: white;
    border-radius: 12px;
    padding: 25px 30px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

.woocommerce-tabs ul.tabs {
    display: flex;
    gap: 5px;
    border-bottom: 2px solid #e8ecf1;
    padding: 0;
    margin: 0 0 20px 0;
    list-style: none;
}

.woocommerce-tabs ul.tabs li {
    margin: 0;
}

.woocommerce-tabs ul.tabs li a {
    display: block;
    padding: 12px 24px;
    font-weight: 700;
    font-size: 15px;
    color: #7f8c8d;
    border-radius: 8px 8px 0 0;
    transition: 0.3s;
    text-decoration: none;
}

.woocommerce-tabs ul.tabs li a:hover {
    color: #1e3c72;
    background: #f8f9fc;
}

.woocommerce-tabs ul.tabs li.active a {
    color: #1e3c72;
    background: #e8f0fe;
    border-bottom: 3px solid #2a5298;
}

/* ============================================================
   ===== المنتجات ذات الصلة (Related Products) =====
   ============================================================ */

.related.products {
    margin-top: 50px;
    padding-top: 30px;
    border-top: 2px solid #e8ecf1;
}

.related.products > h2 {
    font-size: 22px;
    font-weight: 800;
    color: #1e3c72;
    margin-bottom: 25px;
    position: relative;
    padding-right: 15px;
}

.related.products > h2::before {
    content: '';
    position: absolute;
    right: 0;
    top: 4px;
    bottom: 4px;
    width: 4px;
    background: #2a5298;
    border-radius: 2px;
}

.related.products ul.products li.product {
    display: flex;
    flex-direction: column;
    height: 100%; /* مهم للشبكة */
}
.related.products ul.products li.product .woocommerce-loop-product__title {
    flex-grow: 1; /* دفع السعر والزر للأسفل */
}
/* أو لف العناصر في حاوية إذا لم تكن موجودة، لكن flex-grow على العنوان وحده قد لا يعمل إذا كانت العناصر الأخرى عائمة.
أفضل طريقة: جعل البطاقة flex column، ولف كل شيء ما عدا الصورة في div، ثم جعل هذا div flex: 1. */
/* ----- الشارة (عرض/تخفيض) ----- */
.related.products ul.products li.product .onsale {
    background: #e74c3c;
    color: white;
    font-size: 12px; /* زيادة حجم الخط */
    font-weight: 700;
    padding: 3px 12px;
    border-radius: 20px;
    position: absolute;
    top: 10px;
    left: 10px;
}

/* ----- تقييم المنتج (النجوم) ----- */
.related.products ul.products li.product .star-rating {
    font-size: 14px; /* زيادة حجم النجوم */
    margin: 6px 0 8px 0;
}

/* ===== استجابة للمنتجات ذات الصلة ===== */
@media (max-width: 992px) {
    .related.products ul.products {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    
    .related.products ul.products li.product img {
        height: 200px;
    }
}

@media (max-width: 576px) {
    .related.products ul.products {
        grid-template-columns: 1fr 1fr;
        gap: 15px;
    }
    
    .related.products ul.products li.product {
        padding: 12px;
    }
    
    .related.products ul.products li.product img {
        height: 160px;
    }
    
    .related.products ul.products li.product .woocommerce-loop-product__title {
        font-size: 15px;
        min-height: 42px;
    }
    
    .related.products ul.products li.product .price {
        font-size: 18px;
    }
}
/* ============================================================
   ===== استجابة الفوتر للشاشات الصغيرة =====
   ============================================================ */

@media (max-width: 992px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 30px;
    }
}

@media (max-width: 768px) {
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 30px;
        text-align: center;
    }
    
    .footer-column h4::after {
        right: 50%;
        transform: translateX(50%);
    }
    
    .footer-links a {
        justify-content: center;
    }
    
    .footer-links a:hover {
        transform: none;
    }
    
    .footer-contact li {
        justify-content: center;
    }
    
    .footer-social {
        justify-content: center;
    }
    
    .footer-trust {
        grid-template-columns: 1fr 1fr;
    }
    
    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }
    
    .footer-payments {
        justify-content: center;
    }
}

@media (max-width: 576px) {
    .site-footer {
        padding: 30px 0 0;
    }
    
    .footer-trust {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .trust-item {
        justify-content: center;
    }
}
/* ----- زر القائمة للجوال (Mobile Toggle) ----- */
.mobile-toggle {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    padding: 5px 10px;
}

/* ----- استجابة للشاشات الصغيرة ----- */
@media (max-width: 992px) {
    .main-header-content {
        flex-direction: column;
        align-items: stretch;
    }
    
    .header-search {
        max-width: 100%;
    }
    
    .header-actions {
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .top-bar {
        display: none;
    }
    
    .mobile-toggle {
        display: block;
    }
    
    .nav-links {
        display: none;
        flex-direction: column;
        width: 100%;
        background: #1e3c72;
        padding: 10px 0;
    }
    
    .nav-links.open {
        display: flex;
    }
    
    .nav-links li {
        width: 100%;
    }
    
    .nav-links a {
        padding: 12px 20px;
    }
    
    .dropdown-menu {
        position: static;
        background: rgba(255, 255, 255, 0.1);
        box-shadow: none;
        opacity: 1;
        visibility: visible;
        transform: none;
        display: none;
        padding: 0 20px;
    }
    
    .dropdown.open .dropdown-menu {
        display: block;
    }
    
    .nav-actions {
        display: none;
    }
    
    .logo {
        font-size: 22px;
    }
    
    .tagline {
        font-size: 10px;
    }
}

@media (max-width: 576px) {
    .contact-info {
        font-size: 12px;
        gap: 10px;
    }
    
    .header-actions {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .quote-btn {
        font-size: 13px;
        padding: 8px 16px;
    }
}

/* ===== استجابة للجوال ===== */
@media (max-width: 768px) {
    .navbar .container {
        flex-direction: column;
    }
    .detail-top-section {
        grid-template-columns: 1fr;
    }
    .main-product-image {
        height: 250px;
    }
    .specs-grid {
        grid-template-columns: 1fr;
    }
}
/* ===== تغيير لون السعر قبل الخصم ===== */
.price del {
    color: #e74c3c !important; /* أحمر */
    font-size: 25px;
    opacity: 0.8;
}

.price del .woocommerce-Price-amount {
    color: #e74c3c !important;
}

/* إذا كنت تريد لوناً مختلفاً */
.price del {
    color: #999 !important; /* رمادي فاتح */
    text-decoration: line-through;
}

/* تنسيق السعر الجديد (بعد الخصم) */
.price ins {
    color: #27ae60 !important; /* أخضر */
    text-decoration: none;
    font-weight: 800;
}
/* ============================================================
   ===== 1. تقليل تدوير زوايا البطاقات (Border-Radius) =====
   ============================================================ */

/* البطاقات في المنتجات ذات الصلة */
.related.products ul.products li.product {
    border-radius: 6px !important; /* قللنا من 12px إلى 6px */
    overflow: hidden;
}

/* الصورة داخل البطاقة */
.related.products ul.products li.product img {
    border-radius: 6px 6px 0 0 !important; /* تدوير الزوايا العلوية فقط */
}

/* ============================================================
   ===== 2. جعل أزرار المنتجات ذات الصلة مختلفة =====
   ============================================================ */

/* زر الإضافة في المنتجات ذات الصلة (لون مختلف) */
.related.products ul.products li.product .add_to_cart_button,
.related.products ul.products li.product .button {
    background: #e67e22 !important; /* برتقالي بدلاً من الأزرق */
    color: white !important;
    border-radius: 25px !important; /* أكثر استدارة */
    padding: 12px 20px !important;
    font-size: 15px !important;
    font-weight: 700;
    transition: 0.3s;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    box-shadow: 0 2px 8px rgba(230, 126, 34, 0.3);
}

/* عند التمرير على الزر (تأثير مختلف) */
.related.products ul.products li.product .add_to_cart_button:hover {
    background: #d35400 !important; /* برتقالي غامق */
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(230, 126, 34, 0.4);
}

/* ============================================================
   ===== المنتجات ذات الصلة (نسخة نهائية) =====
   ============================================================ */

/* الشبكة الرئيسية */
.related.products ul.products {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 15px !important;
    align-items: stretch !important;
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

/* كل بطاقة (Flex Column) */
.related.products ul.products li.product {
    display: flex !important;
    flex-direction: column !important;
    height: 100% !important;
    min-height: 320px !important; /* ارتفاع ثابت كحد أدنى */
    padding: 15px !important;
    background: white;
    border-radius: 8px !important;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease;
    position: relative;
}

.related.products ul.products li.product:hover {
    transform: translateY(-6px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
}

/* صورة المنتج */
.related.products ul.products li.product img {
    width: 100% !important;
    height: 200px !important;
    object-fit: cover !important;
    border-radius: 6px 6px 0 0 !important;
    margin-bottom: 8px !important;
}

/* شارة التخفيض */
.related.products ul.products li.product .onsale {
    position: absolute !important;
    top: 12px !important;
    left: 12px !important;
    background: #e74c3c !important;
    color: white !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    padding: 4px 14px !important;
    border-radius: 20px !important;
    z-index: 2 !important;
}

/* عنوان المنتج (يتمدد لدفع المحتوى للأسفل) */
.related.products ul.products li.product .woocommerce-loop-product__title {
    flex: 1 0 auto !important;
    font-size: 17px !important;
    font-weight: 700 !important;
    color: #1e3c72 !important;
    margin: 8px 0 6px !important;
    line-height: 1.4 !important;
    min-height: auto !important;
}

/* السعر */
.related.products ul.products li.product .price {
    font-size: 20px !important;
    font-weight: 800 !important;
    color: #e67e22 !important;
    display: block !important;
    margin: 4px 0 10px !important;
}

/* السعر القديم (قبل الخصم) */
.related.products ul.products li.product .price del {
    color: #e74c3c !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    opacity: 0.8;
    margin-left: 6px;
}

/* السعر الجديد (بعد الخصم) */
.related.products ul.products li.product .price ins {
    text-decoration: none !important;
    color: #27ae60 !important;
}

/* زر الإضافة (يدفع للأسفل) */
.related.products ul.products li.product .add_to_cart_button,
.related.products ul.products li.product .button {
    margin-top: auto !important;
    background: #e67e22 !important;
    color: white !important;
    border-radius: 25px !important;
    padding: 10px 16px !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    transition: all 0.3s ease !important;
    border: none !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    width: 100% !important;
    box-shadow: 0 2px 8px rgba(230, 126, 34, 0.25) !important;
}

.related.products ul.products li.product .add_to_cart_button:hover {
    background: #d35400 !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 20px rgba(230, 126, 34, 0.35) !important;
}

/* ===== استجابة للشاشات ===== */
@media (max-width: 992px) {
    .related.products ul.products {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 15px !important;
    }
}

@media (max-width: 576px) {
    .related.products ul.products {
        grid-template-columns: 1fr 1fr !important;
        gap: 12px !important;
    }
    
    .related.products ul.products li.product {
        min-height: 260px !important;
        padding: 10px !important;
    }
    
    .related.products ul.products li.product img {
        height: 140px !important;
    }
    
    .related.products ul.products li.product .woocommerce-loop-product__title {
        font-size: 14px !important;
    }
    
    .related.products ul.products li.product .price {
        font-size: 16px !important;
    }
    
    .related.products ul.products li.product .add_to_cart_button {
        font-size: 12px !important;
        padding: 8px 12px !important;
    }
}
/* ===== كود المنتج (SKU) في بطاقات المتجر ===== */
.product-sku-archive {
    font-size: 14px;
    color: #555;
    background: #f1f4f9;
    padding: 5px 14px;
    border-radius: 30px;
    display: inline-block;
    margin: 6px 0 10px;
    border: 1px solid #e8ecf1;
    direction: rtl;
}

.product-sku-archive i {
    color: #2a5298;
    margin-left: 6px;
    font-size: 14px;
}

.product-sku-archive .sku-label {
    color: #888;
    font-weight: 500;
}

.product-sku-archive strong {
    color: #1e3c72;
    font-weight: 700;
    margin-right: 3px;
}

/* تحسين المظهر عند التمرير على البطاقة */
.product-card:hover .product-sku-archive,
.related.products ul.products li.product:hover .product-sku-archive,
ul.products li.product:hover .product-sku-archive {
    background: #e8eef7;
    border-color: #2a5298;
    transition: all 0.3s ease;
}