/* ===== أنماط عامة ===== */
:root {
    --primary: #2a5a8c;
    --secondary: #f5a623;
    --dark: #333;
    --light: #f8f9fa;
    --gray: #6c757d;
    --border: #dee2e6;
    --success: #28a745;
    --danger: #dc3545;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Tajawal', sans-serif;
    line-height: 1.6;
    color: var(--dark);
    background-color: #fff;
    direction: rtl;
    text-align: right;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: all 0.3s ease;
}

a:hover {
    color: var(--secondary);
    text-decoration: underline;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

.btn {
    display: inline-block;
    padding: 8px 20px;
    background-color: var(--primary);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.btn:hover {
    background-color: #1e466e;
    color: white;
    text-decoration: none;
}

.btn-secondary {
    background-color: var(--secondary);
}

.btn-secondary:hover {
    background-color: #e6951c;
}

/* ===== الهيدر ===== */
.top-bar {
    background-color: var(--dark);
    color: white;
    padding: 8px 0;
    font-size: 14px;
}

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

.contact-info span {
    margin-left: 20px;
}

.main-header {
    padding: 15px 0;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

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

.logo-area img {
    max-height: 60px;
}

.main-navigation .primary-menu {
    display: flex;
    list-style: none;
}

.main-navigation .primary-menu li {
    margin: 0 10px;
}

.main-navigation .primary-menu a {
    font-weight: 500;
    font-size: 16px;
    color: var(--dark);
}

.main-navigation .primary-menu a:hover {
    color: var(--primary);
}

.header-tools {
    display: flex;
    align-items: center;
}

.search-toggle, .mobile-menu-toggle {
    margin-right: 15px;
    font-size: 20px;
    cursor: pointer;
}

.search-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    display: none;
}

.search-overlay .container {
    position: relative;
    width: 80%;
}

.search-overlay .search-form {
    width: 100%;
}

.search-overlay .search-field {
    width: 100%;
    padding: 15px;
    font-size: 18px;
    border: none;
    border-radius: 4px;
}

.search-close {
    position: absolute;
    top: -50px;
    left: 0;
    color: white;
    font-size: 24px;
    background: none;
    border: none;
    cursor: pointer;
}

.mobile-menu {
    position: fixed;
    top: 0;
    right: -300px;
    width: 300px;
    height: 100%;
    background-color: white;
    z-index: 10000;
    overflow-y: auto;
    transition: right 0.3s ease;
}

.mobile-menu.active {
    right: 0;
}

.mobile-nav {
    list-style: none;
    padding: 20px;
}

.mobile-nav li {
    margin-bottom: 15px;
}

.mobile-nav a {
    font-size: 18px;
    color: var(--dark);
    display: block;
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
}

.secondary-nav {
    background-color: var(--light);
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
}

.secondary-nav ul {
    display: flex;
    list-style: none;
}

.secondary-nav li {
    margin-left: 20px;
}

/* ===== المنتجات ===== */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 25px;
    margin-top: 30px;
}

.products-grid.list-view {
    grid-template-columns: 1fr;
}

.product-card {
    border: 1px solid var(--border);
    border-radius: 5px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.products-grid.list-view .product-card {
    display: flex;
    align-items: center;
}

.products-grid.list-view .product-image {
    width: 200px;
    height: 150px;
}

.products-grid.list-view .product-info {
    padding: 15px;
}

.product-image {
    height: 200px;
    overflow: hidden;
    background: var(--light);
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.product-card:hover .product-image img {
    transform: scale(1.05);
}

.product-info {
    padding: 15px;
}

.product-title {
    font-size: 18px;
    margin-bottom: 5px;
}

.product-meta {
    color: var(--gray);
    font-size: 14px;
}

.stock-status {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 12px;
    margin-top: 5px;
}

.in-stock {
    background-color: rgba(40, 167, 69, 0.1);
    color: var(--success);
}

.out-stock {
    background-color: rgba(220, 53, 69, 0.1);
    color: var(--danger);
}

/* ===== صفحة منتج مفرد ===== */
.product-details {
    margin-top: 30px;
}

.breadcrumbs {
    font-size: 14px;
    color: var(--gray);
    margin-bottom: 20px;
}

.breadcrumbs a {
    color: var(--gray);
}

.breadcrumbs a:hover {
    color: var(--primary);
}

.product-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

.product-gallery .main-image {
    height: 400px;
    overflow: hidden;
    border-radius: 5px;
    margin-bottom: 15px;
}

.product-gallery .main-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.thumbnails {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

.thumbnails .thumb {
    height: 80px;
    cursor: pointer;
    border: 2px solid transparent;
    border-radius: 4px;
    overflow: hidden;
}

.thumbnails .thumb.active, .thumbnails .thumb:hover {
    border-color: var(--primary);
}

.thumbnails img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.technical-specs table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

.technical-specs th, .technical-specs td {
    padding: 10px;
    text-align: right;
    border-bottom: 1px solid var(--border);
}

.technical-specs th {
    background-color: var(--light);
    font-weight: 600;
}

.product-actions {
    margin-top: 30px;
    display: flex;
    gap: 15px;
}

/* ===== المدونة ===== */
.blog-card {
    border: 1px solid var(--border);
    border-radius: 5px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.blog-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.post-thumbnail {
    height: 200px;
    overflow: hidden;
}

.post-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.blog-card:hover .post-thumbnail img {
    transform: scale(1.05);
}

.post-content {
    padding: 15px;
}

.post-title {
    font-size: 18px;
    margin-bottom: 10px;
}

.post-excerpt {
    color: var(--gray);
    margin-bottom: 15px;
}

.post-meta {
    display: flex;
    gap: 15px;
    color: var(--gray);
    font-size: 14px;
}

/* ===== الفوتر ===== */
.site-footer {
    background-color: var(--dark);
    color: white;
    margin-top: 50px;
}

.footer-top {
    padding: 50px 0;
}

.footer-top .container {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
}

.footer-column h4 {
    font-size: 18px;
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 10px;
}

.footer-column h4::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 50px;
    height: 2px;
    background-color: var(--secondary);
}

.footer-logo img {
    max-height: 60px;
    margin-bottom: 15px;
}

.footer-description {
    margin-bottom: 20px;
}

.footer-menu {
    list-style: none;
}

.footer-menu li {
    margin-bottom: 10px;
}

.footer-menu a {
    color: #ccc;
}

.footer-menu a:hover {
    color: white;
}

.contact-info li {
    margin-bottom: 10px;
    display: flex;
    align-items: center;
}

.contact-info i {
    margin-left: 10px;
    color: var(--secondary);
}

.social-links {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background-color: rgba(255,255,255,0.1);
    border-radius: 50%;
    color: white;
    transition: all 0.3s ease;
}

.social-links a:hover {
    background-color: var(--secondary);
    transform: translateY(-3px);
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding: 20px 0;
    text-align: center;
    font-size: 14px;
    color: #aaa;
}

.footer-links a {
    color: #aaa;
    margin: 0 10px;
}

/* ===== متجاوب ===== */
@media (max-width: 992px) {
    .footer-top .container {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .product-content {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .main-navigation {
        display: none;
    }
    
    .mobile-menu-toggle {
        display: block;
    }
    
    .secondary-nav {
        display: none;
    }
    
    .footer-top .container {
        grid-template-columns: 1fr;
    }
    
    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }
}



/* ===== الفوتر - متجاوب ===== */
.site-footer {
    background-color: #2a2a2a;
    color: #eee;
}

.footer-summary {
    background-color: #1e1e1e;
    padding: 40px 0;
}

.footer-summary-inner {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 30px;
}

.footer-logo img {
    max-height: 60px;
}

.footer-description {
    max-width: 400px;
    color: #aaa;
}

.footer-newsletter {
    flex: 1;
    min-width: 300px;
}

.footer-newsletter h4 {
    margin-bottom: 15px;
    color: white;
}

.newsletter-form {
    display: flex;
    gap: 10px;
}

.newsletter-form input {
    flex: 1;
    padding: 12px 15px;
    border: none;
    border-radius: 4px;
    background: #333;
    color: white;
}

.newsletter-form button {
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 4px;
    padding: 0 25px;
    cursor: pointer;
    transition: background 0.3s;
}

.newsletter-form button:hover {
    background: #1e466e;
}

.footer-links-section {
    padding: 60px 0;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
}

.footer-column h4 {
    font-size: 18px;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--primary);
    color: white;
}

.footer-menu,
.product-categories,
.contact-info {
    list-style: none;
}

.footer-menu li,
.product-categories li {
    margin-bottom: 10px;
}

.footer-menu a,
.product-categories a {
    color: #aaa;
    display: flex;
    align-items: center;
    transition: color 0.3s;
}

.footer-menu a:hover,
.product-categories a:hover {
    color: white;
    text-decoration: none;
}

.product-categories .count {
    margin-right: 8px;
    background: #444;
    color: #ccc;
    font-size: 12px;
    padding: 1px 6px;
    border-radius: 10px;
}

.view-all {
    display: inline-block;
    margin-top: 10px;
    color: var(--secondary);
    font-weight: bold;
}

.recent-posts {
    list-style: none;
}

.recent-posts li {
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #444;
}

.recent-posts li:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.recent-posts a {
    display: flex;
    gap: 15px;
    align-items: center;
    color: #aaa;
}

.recent-posts img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 4px;
}

.recent-posts .post-info h5 {
    color: #ddd;
    margin-bottom: 5px;
    font-size: 15px;
}

.recent-posts .post-date {
    font-size: 13px;
    color: #777;
}

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

.contact-info i {
    margin-left: 10px;
    color: var(--secondary);
    font-size: 18px;
    min-width: 24px;
    text-align: center;
}

.social-links {
    display: flex;
    gap: 12px;
    margin-top: 20px;
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: #333;
    border-radius: 50%;
    color: white;
    font-size: 18px;
    transition: all 0.3s;
}

.social-links a:hover {
    background: var(--primary);
    transform: translateY(-3px);
}

.footer-map {
    background: #222;
    padding: 30px 0;
}

.map-container {
    height: 300px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

.map-container iframe {
    width: 100%;
    height: 100%;
    border: none;
}

.map-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    background: #333;
    color: #777;
    font-size: 24px;
}

.map-placeholder i {
    font-size: 60px;
    margin-bottom: 15px;
}

.footer-bottom {
    background: #151515;
    padding: 20px 0;
    font-size: 14px;
}

.footer-bottom-inner {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.footer-links {
    display: flex;
    gap: 20px;
}

.footer-links a {
    color: #777;
    transition: color 0.3s;
}

.footer-links a:hover {
    color: var(--secondary);
}

.payment-methods {
    display: flex;
    gap: 10px;
}

.payment-methods img {
    height: 24px;
    width: auto;
    opacity: 0.7;
    transition: opacity 0.3s;
}

.payment-methods img:hover {
    opacity: 1;
}

.back-to-top {
    position: fixed;
    bottom: 30px;
    left: 30px;
    width: 50px;
    height: 50px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s;
    z-index: 100;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    background: var(--secondary);
}

/* ===== متجاوب ===== */
@media (max-width: 992px) {
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .footer-summary-inner {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .footer-newsletter {
        width: 100%;
        min-width: auto;
    }
}

@media (max-width: 768px) {
    .footer-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-column {
        margin-bottom: 30px;
    }
    
    .footer-bottom-inner {
        flex-direction: column;
        text-align: center;
    }
    
    .footer-links {
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .map-container {
        height: 200px;
    }
    
    .back-to-top {
        bottom: 20px;
        left: 20px;
        width: 40px;
        height: 40px;
    }
}

@media (max-width: 480px) {
    .footer-summary {
        padding: 30px 0;
    }
    
    .newsletter-form {
        flex-direction: column;
    }
    
    .map-container {
        display: none; /* إخفاء الخريطة على الهواتف الصغيرة */
    }
}


/* في ملف custom.css */
.custom-logo {
    max-height: 60px;
    width: auto;
    transition: all 0.3s ease;
}

.logo-meta {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: #333;
    margin-top: 5px;
    line-height: 1.3;
}

@media (min-width: 992px) {
    .logo-area {
        flex: 0 0 220px;
    }
}

@media (max-width: 991px) {
    .logo-meta {
        display: none;
    }
}/*!
 * Sawiat Theme - Enhanced Main CSS File
 * نظام CSS محسن ومطور للقالب
 * Version: 3.0
 */

/* ===== المتغيرات العامة المحسنة ===== */
:root {
    /* الألوان الأساسية المحسنة */
    --primary-color: #2563eb;
    --primary-dark: #1d4ed8;
    --primary-light: #3b82f6;
    --primary-gradient: linear-gradient(135deg, #2563eb 0%, #3b82f6 100%);
    
    --secondary-color: #10b981;
    --secondary-dark: #059669;
    --secondary-light: #34d399;
    --secondary-gradient: linear-gradient(135deg, #10b981 0%, #34d399 100%);
    
    --accent-color: #f59e0b;
    --accent-dark: #d97706;
    --accent-light: #fbbf24;
    
    --danger-color: #ef4444;
    --warning-color: #f59e0b;
    --success-color: #10b981;
    --info-color: #3b82f6;
    
    /* الألوان المحايدة المحسنة */
    --text-primary: #1f2937;
    --text-secondary: #6b7280;
    --text-light: #9ca3af;
    --text-white: #ffffff;
    
    --background-primary: #ffffff;
    --background-secondary: #f9fafb;
    --background-tertiary: #f3f4f6;
    --background-dark: #1f2937;
    --background-overlay: rgba(0, 0, 0, 0.5);
    
    --border-color: #e5e7eb;
    --border-color-dark: #d1d5db;
    --border-color-light: #f3f4f6;
    
    /* الظلال المحسنة */
    --shadow-xs: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    --shadow-inner: inset 0 2px 4px 0 rgba(0, 0, 0, 0.06);
    
    /* الخطوط المحسنة */
    --font-primary: 'Cairo', 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
    --font-secondary: 'Roboto', 'Inter', system-ui, sans-serif;
    --font-mono: 'Fira Code', 'Monaco', 'Cascadia Code', monospace;
    
    --font-size-xs: 0.75rem;     /* 12px */
    --font-size-sm: 0.875rem;    /* 14px */
    --font-size-base: 1rem;      /* 16px */
    --font-size-lg: 1.125rem;    /* 18px */
    --font-size-xl: 1.25rem;     /* 20px */
    --font-size-2xl: 1.5rem;     /* 24px */
    --font-size-3xl: 1.875rem;   /* 30px */
    --font-size-4xl: 2.25rem;    /* 36px */
    --font-size-5xl: 3rem;       /* 48px */
    --font-size-6xl: 3.75rem;    /* 60px */
    
    --font-weight-light: 300;
    --font-weight-normal: 400;
    --font-weight-medium: 500;
    --font-weight-semibold: 600;
    --font-weight-bold: 700;
    --font-weight-extrabold: 800;
    
    --line-height-tight: 1.25;
    --line-height-snug: 1.375;
    --line-height-normal: 1.5;
    --line-height-relaxed: 1.625;
    --line-height-loose: 2;
    
    /* المسافات المحسنة */
    --spacing-0: 0;
    --spacing-px: 1px;
    --spacing-0-5: 0.125rem;    /* 2px */
    --spacing-1: 0.25rem;       /* 4px */
    --spacing-1-5: 0.375rem;    /* 6px */
    --spacing-2: 0.5rem;        /* 8px */
    --spacing-2-5: 0.625rem;    /* 10px */
    --spacing-3: 0.75rem;       /* 12px */
    --spacing-3-5: 0.875rem;    /* 14px */
    --spacing-4: 1rem;          /* 16px */
    --spacing-5: 1.25rem;       /* 20px */
    --spacing-6: 1.5rem;        /* 24px */
    --spacing-7: 1.75rem;       /* 28px */
    --spacing-8: 2rem;          /* 32px */
    --spacing-9: 2.25rem;       /* 36px */
    --spacing-10: 2.5rem;       /* 40px */
    --spacing-11: 2.75rem;      /* 44px */
    --spacing-12: 3rem;         /* 48px */
    --spacing-14: 3.5rem;       /* 56px */
    --spacing-16: 4rem;         /* 64px */
    --spacing-20: 5rem;         /* 80px */
    --spacing-24: 6rem;         /* 96px */
    --spacing-28: 7rem;         /* 112px */
    --spacing-32: 8rem;         /* 128px */
    
    /* الحدود والزوايا المحسنة */
    --border-width-0: 0;
    --border-width-1: 1px;
    --border-width-2: 2px;
    --border-width-4: 4px;
    --border-width-8: 8px;
    
    --border-radius-none: 0;
    --border-radius-sm: 0.125rem;   /* 2px */
    --border-radius: 0.25rem;       /* 4px */
    --border-radius-md: 0.375rem;   /* 6px */
    --border-radius-lg: 0.5rem;     /* 8px */
    --border-radius-xl: 0.75rem;    /* 12px */
    --border-radius-2xl: 1rem;      /* 16px */
    --border-radius-3xl: 1.5rem;    /* 24px */
    --border-radius-full: 9999px;
    
    /* الانتقالات المحسنة */
    --transition-none: none;
    --transition-all: all 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-colors: color 150ms cubic-bezier(0.4, 0, 0.2, 1), background-color 150ms cubic-bezier(0.4, 0, 0.2, 1), border-color 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-opacity: opacity 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-shadow: box-shadow 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-transform: transform 150ms cubic-bezier(0.4, 0, 0.2, 1);
    
    /* العرض الأقصى للحاويات */
    --container-sm: 640px;
    --container-md: 768px;
    --container-lg: 1024px;
    --container-xl: 1280px;
    --container-2xl: 1536px;
    
    /* نقاط التوقف للاستجابة */
    --breakpoint-sm: 640px;
    --breakpoint-md: 768px;
    --breakpoint-lg: 1024px;
    --breakpoint-xl: 1280px;
    --breakpoint-2xl: 1536px;
    
    /* Z-index layers */
    --z-dropdown: 1000;
    --z-sticky: 1020;
    --z-fixed: 1030;
    --z-modal-backdrop: 1040;
    --z-modal: 1050;
    --z-popover: 1060;
    --z-tooltip: 1070;
    --z-toast: 1080;
}

/* ===== إعادة تعيين الأنماط الأساسية المحسنة ===== */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
    -moz-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

body {
    font-family: var(--font-primary);
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-normal);
    line-height: var(--line-height-normal);
    color: var(--text-primary);
    background-color: var(--background-primary);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    overflow-x: hidden;
}

/* اتجاه النص حسب اللغة */
body.rtl {
    direction: rtl;
    text-align: right;
}

body.ltr {
    direction: ltr;
    text-align: left;
}

/* ===== العناصر الأساسية المحسنة ===== */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-primary);
    font-weight: var(--font-weight-bold);
    line-height: var(--line-height-tight);
    color: var(--text-primary);
    margin-bottom: var(--spacing-4);
}

h1 {
    font-size: var(--font-size-4xl);
    font-weight: var(--font-weight-extrabold);
    line-height: var(--line-height-tight);
}

h2 {
    font-size: var(--font-size-3xl);
    font-weight: var(--font-weight-bold);
}

h3 {
    font-size: var(--font-size-2xl);
    font-weight: var(--font-weight-semibold);
}

h4 {
    font-size: var(--font-size-xl);
    font-weight: var(--font-weight-semibold);
}

h5 {
    font-size: var(--font-size-lg);
    font-weight: var(--font-weight-medium);
}

h6 {
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-medium);
}

p {
    margin-bottom: var(--spacing-4);
    line-height: var(--line-height-relaxed);
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition-colors);
}

a:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

a:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* ===== الحاويات والشبكة ===== */
.container {
    width: 100%;
    margin-left: auto;
    margin-right: auto;
    padding-left: var(--spacing-4);
    padding-right: var(--spacing-4);
}

@media (min-width: 640px) {
    .container {
        max-width: var(--container-sm);
        padding-left: var(--spacing-6);
        padding-right: var(--spacing-6);
    }
}

@media (min-width: 768px) {
    .container {
        max-width: var(--container-md);
        padding-left: var(--spacing-8);
        padding-right: var(--spacing-8);
    }
}

@media (min-width: 1024px) {
    .container {
        max-width: var(--container-lg);
    }
}

@media (min-width: 1280px) {
    .container {
        max-width: var(--container-xl);
    }
}

@media (min-width: 1536px) {
    .container {
        max-width: var(--container-2xl);
    }
}

/* نظام الشبكة المرن */
.grid {
    display: grid;
    gap: var(--spacing-6);
}

.grid-cols-1 { grid-template-columns: repeat(1, minmax(0, 1fr)); }
.grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-cols-6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.grid-cols-12 { grid-template-columns: repeat(12, minmax(0, 1fr)); }

/* Flexbox utilities */
.flex {
    display: flex;
}

.flex-col {
    flex-direction: column;
}

.flex-wrap {
    flex-wrap: wrap;
}

.items-center {
    align-items: center;
}

.items-start {
    align-items: flex-start;
}

.items-end {
    align-items: flex-end;
}

.justify-center {
    justify-content: center;
}

.justify-between {
    justify-content: space-between;
}

.justify-around {
    justify-content: space-around;
}

.justify-start {
    justify-content: flex-start;
}

.justify-end {
    justify-content: flex-end;
}

/* ===== الأزرار المحسنة ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-3) var(--spacing-6);
    font-family: var(--font-primary);
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-medium);
    line-height: 1;
    text-align: center;
    text-decoration: none;
    border: var(--border-width-1) solid transparent;
    border-radius: var(--border-radius-lg);
    cursor: pointer;
    transition: var(--transition-all);
    user-select: none;
    white-space: nowrap;
    position: relative;
    overflow: hidden;
}

.btn:focus {
    outline: 2px solid transparent;
    outline-offset: 2px;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* أنواع الأزرار */
.btn-primary {
    background: var(--primary-gradient);
    color: var(--text-white);
    border-color: var(--primary-color);
    box-shadow: var(--shadow-sm);
}

.btn-primary:hover:not(:disabled) {
    background: var(--primary-dark);
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
}

.btn-secondary {
    background: var(--secondary-gradient);
    color: var(--text-white);
    border-color: var(--secondary-color);
    box-shadow: var(--shadow-sm);
}

.btn-secondary:hover:not(:disabled) {
    background: var(--secondary-dark);
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
}

.btn-outline {
    background: transparent;
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-outline:hover:not(:disabled) {
    background: var(--primary-color);
    color: var(--text-white);
    box-shadow: var(--shadow-md);
}

.btn-ghost {
    background: transparent;
    color: var(--primary-color);
    border-color: transparent;
}

.btn-ghost:hover:not(:disabled) {
    background: var(--background-secondary);
    color: var(--primary-dark);
}

/* أحجام الأزرار */
.btn-sm {
    padding: var(--spacing-2) var(--spacing-4);
    font-size: var(--font-size-xs);
}

.btn-lg {
    padding: var(--spacing-4) var(--spacing-8);
    font-size: var(--font-size-base);
}

.btn-xl {
    padding: var(--spacing-5) var(--spacing-10);
    font-size: var(--font-size-lg);
}

/* ===== البطاقات المحسنة ===== */
.card {
    background: var(--background-primary);
    border: var(--border-width-1) solid var(--border-color);
    border-radius: var(--border-radius-xl);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    transition: var(--transition-all);
}

.card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

.card-header {
    padding: var(--spacing-6);
    border-bottom: var(--border-width-1) solid var(--border-color);
    background: var(--background-secondary);
}

.card-body {
    padding: var(--spacing-6);
}

.card-footer {
    padding: var(--spacing-6);
    border-top: var(--border-width-1) solid var(--border-color);
    background: var(--background-secondary);
}

/* ===== الهيدر المحسن ===== */
.site-header {
    background: var(--background-primary);
    border-bottom: var(--border-width-1) solid var(--border-color);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: var(--z-sticky);
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.95);
}

.header-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--spacing-4) 0;
}

.site-logo {
    display: flex;
    align-items: center;
    font-size: var(--font-size-xl);
    font-weight: var(--font-weight-bold);
    color: var(--text-primary);
    text-decoration: none;
}

.site-logo:hover {
    color: var(--primary-color);
}

/* ===== القائمة الرئيسية المحسنة ===== */
.main-navigation {
    display: flex;
    align-items: center;
    gap: var(--spacing-8);
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: var(--spacing-6);
    margin: 0;
    padding: 0;
}

.nav-item {
    position: relative;
}

.nav-link {
    display: flex;
    align-items: center;
    padding: var(--spacing-2) var(--spacing-3);
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-medium);
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: var(--border-radius-md);
    transition: var(--transition-colors);
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary-color);
    background: var(--background-secondary);
}

/* القائمة الفرعية */
.sub-menu {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 200px;
    background: var(--background-primary);
    border: var(--border-width-1) solid var(--border-color);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-lg);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: var(--transition-all);
    z-index: var(--z-dropdown);
}

.nav-item:hover .sub-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.sub-menu .nav-link {
    display: block;
    padding: var(--spacing-3) var(--spacing-4);
    border-radius: 0;
}

/* ===== مبدل اللغة المحسن ===== */
.language-switcher {
    display: flex;
    align-items: center;
    gap: var(--spacing-2);
    padding: var(--spacing-2) var(--spacing-3);
    background: var(--background-secondary);
    border: var(--border-width-1) solid var(--border-color);
    border-radius: var(--border-radius-lg);
    cursor: pointer;
    transition: var(--transition-all);
}

.language-switcher:hover {
    background: var(--background-tertiary);
    box-shadow: var(--shadow-sm);
}

.language-flag {
    width: 20px;
    height: 15px;
    border-radius: var(--border-radius-sm);
    object-fit: cover;
}

.language-text {
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-medium);
    color: var(--text-secondary);
}

/* ===== قسم المنتجات المحسن ===== */
.products-section {
    padding: var(--spacing-20) 0;
    background: var(--background-secondary);
}

.section-header {
    text-align: center;
    margin-bottom: var(--spacing-16);
}

.section-title {
    font-size: var(--font-size-4xl);
    font-weight: var(--font-weight-extrabold);
    color: var(--text-primary);
    margin-bottom: var(--spacing-4);
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-description {
    font-size: var(--font-size-lg);
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--spacing-8);
}

.product-card {
    background: var(--background-primary);
    border-radius: var(--border-radius-2xl);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: var(--transition-all);
    position: relative;
}

.product-card:hover {
    box-shadow: var(--shadow-xl);
    transform: translateY(-4px);
}

.product-image {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16/10;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition-transform);
}

.product-card:hover .product-image img {
    transform: scale(1.05);
}

.product-badge {
    position: absolute;
    top: var(--spacing-4);
    right: var(--spacing-4);
    padding: var(--spacing-1) var(--spacing-3);
    background: var(--accent-color);
    color: var(--text-white);
    font-size: var(--font-size-xs);
    font-weight: var(--font-weight-semibold);
    border-radius: var(--border-radius-full);
}

.product-content {
    padding: var(--spacing-6);
}

.product-title {
    font-size: var(--font-size-xl);
    font-weight: var(--font-weight-semibold);
    color: var(--text-primary);
    margin-bottom: var(--spacing-2);
    line-height: var(--line-height-tight);
}

.product-description {
    color: var(--text-secondary);
    margin-bottom: var(--spacing-4);
    line-height: var(--line-height-relaxed);
}

.product-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--spacing-4);
}

.product-price {
    font-size: var(--font-size-lg);
    font-weight: var(--font-weight-bold);
    color: var(--primary-color);
}

.product-rating {
    display: flex;
    align-items: center;
    gap: var(--spacing-1);
}

.star {
    color: var(--accent-color);
    font-size: var(--font-size-sm);
}

.product-actions {
    display: flex;
    gap: var(--spacing-3);
}

/* ===== الفوتر المحسن ===== */
.site-footer {
    background: var(--background-dark);
    color: var(--text-white);
    padding: var(--spacing-20) 0 var(--spacing-8);
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--spacing-12);
    margin-bottom: var(--spacing-12);
}

.footer-section h3 {
    color: var(--text-white);
    margin-bottom: var(--spacing-6);
    font-size: var(--font-size-lg);
}

.footer-section p,
.footer-section a {
    color: rgba(255, 255, 255, 0.8);
    line-height: var(--line-height-relaxed);
}

.footer-section a:hover {
    color: var(--text-white);
}

.footer-bottom {
    border-top: var(--border-width-1) solid rgba(255, 255, 255, 0.1);
    padding-top: var(--spacing-8);
    text-align: center;
    color: rgba(255, 255, 255, 0.6);
}

/* ===== الاستجابة للشاشات الصغيرة ===== */
@media (max-width: 768px) {
    .main-navigation {
        display: none;
    }
    
    .products-grid {
        grid-template-columns: 1fr;
    }
    
    .section-title {
        font-size: var(--font-size-3xl);
    }
    
    .container {
        padding-left: var(--spacing-4);
        padding-right: var(--spacing-4);
    }
}

/* ===== تحسينات الأداء والحركة ===== */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* تحسين الطباعة */
@media print {
    .site-header,
    .site-footer,
    .language-switcher {
        display: none;
    }
    
    .container {
        max-width: none;
        padding: 0;
    }
    
    .product-card {
        break-inside: avoid;
        box-shadow: none;
        border: var(--border-width-1) solid var(--border-color);
    }
}

/* ===== تحسينات إضافية للجماليات ===== */
.gradient-text {
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.glass-effect {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: var(--border-width-1) solid rgba(255, 255, 255, 0.2);
}

.hover-lift {
    transition: var(--transition-transform);
}

.hover-lift:hover {
    transform: translateY(-2px);
}

.fade-in {
    opacity: 0;
    animation: fadeIn 0.6s ease forwards;
}

@keyframes fadeIn {
    to {
        opacity: 1;
    }
}

.slide-up {
    transform: translateY(20px);
    opacity: 0;
    animation: slideUp 0.6s ease forwards;
}

@keyframes slideUp {
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* تحسينات للتركيز وإمكانية الوصول */
.focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}



/* ===== تحسينات المحتوى الرئيسي ===== */
.site-content {
    padding: var(--spacing-16) 0;
    background-color: var(--background-primary);
}

.site-content .container {
    background-color: var(--background-primary);
    border-radius: var(--border-radius-2xl);
    box-shadow: var(--shadow-lg);
    padding: var(--spacing-12);
    margin-bottom: var(--spacing-12);
}

/* ===== تحسينات الفوتر ===== */
.site-footer {
    background: var(--background-dark);
    color: var(--text-white);
    padding: var(--spacing-20) 0 var(--spacing-8);
    position: relative;
    overflow: hidden;
}

.site-footer::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url("../images/footer-bg.webp") no-repeat center center;
    background-size: cover;
    opacity: 0.1;
    z-index: 0;
}

.footer-content {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--spacing-12);
    margin-bottom: var(--spacing-12);
}

.footer-section {
    padding: var(--spacing-6);
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: var(--border-radius-xl);
    box-shadow: var(--shadow-sm);
    transition: var(--transition-all);
}

.footer-section:hover {
    background-color: rgba(255, 255, 255, 0.1);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.footer-section h3 {
    color: var(--secondary-light);
    margin-bottom: var(--spacing-6);
    font-size: var(--font-size-xl);
    font-weight: var(--font-weight-bold);
    border-bottom: 2px solid var(--secondary-color);
    padding-bottom: var(--spacing-3);
    display: inline-block;
}

.footer-section p,
.footer-section a {
    color: rgba(255, 255, 255, 0.8);
    line-height: var(--line-height-relaxed);
    font-size: var(--font-size-sm);
}

.footer-section a {
    display: block;
    margin-bottom: var(--spacing-2);
}

.footer-section a:hover {
    color: var(--text-white);
    text-decoration: underline;
    transform: translateX(5px);
}

.footer-bottom {
    position: relative;
    z-index: 1;
    border-top: var(--border-width-1) solid rgba(255, 255, 255, 0.15);
    padding-top: var(--spacing-8);
    text-align: center;
    color: rgba(255, 255, 255, 0.7);
    font-size: var(--font-size-sm);
}

.footer-bottom p {
    margin-bottom: 0;
}

/* تحسينات أيقونات التواصل الاجتماعي في الفوتر */
.footer-social-links {
    display: flex;
    gap: var(--spacing-4);
    margin-top: var(--spacing-4);
    justify-content: center;
}

.footer-social-links a {
    color: var(--text-white);
    font-size: var(--font-size-xl);
    transition: var(--transition-transform);
}

.footer-social-links a:hover {
    color: var(--secondary-color);
    transform: translateY(-3px);
}

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

.footer-links-list li {
    margin-bottom: var(--spacing-2);
}

.footer-links-list a {
    display: flex;
    align-items: center;
    gap: var(--spacing-2);
    color: rgba(255, 255, 255, 0.8);
    transition: var(--transition-colors);
}

.footer-links-list a:hover {
    color: var(--text-white);
    text-decoration: none;
}

.footer-links-list a i {
    color: var(--secondary-color);
}

/* تحسينات لمدخلات النماذج في الفوتر (إذا وجدت) */
.footer-newsletter-form input[type="email"] {
    width: 100%;
    padding: var(--spacing-3) var(--spacing-4);
    border-radius: var(--border-radius-md);
    border: 1px solid rgba(255, 255, 255, 0.3);
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--text-white);
    font-size: var(--font-size-sm);
}

.footer-newsletter-form input[type="email"]::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.footer-newsletter-form button {
    margin-top: var(--spacing-4);
    width: 100%;
    background: var(--secondary-gradient);
    color: var(--text-white);
    border: none;
    padding: var(--spacing-3) var(--spacing-4);
    border-radius: var(--border-radius-md);
    cursor: pointer;
    transition: var(--transition-all);
}

.footer-newsletter-form button:hover {
    background: var(--secondary-dark);
    transform: translateY(-1px);
}

/* Media Queries للفوتر */
@media (max-width: 768px) {
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .footer-section h3 {
        display: block;
        text-align: center;
        margin-left: auto;
        margin-right: auto;
    }

    .footer-section a {
        display: inline-block;
        margin: 0 var(--spacing-2) var(--spacing-2);
    }

    .footer-social-links {
        justify-content: center;
    }
}

/* إضافة صورة خلفية للفوتر */
.site-footer {
    background-image: url('/home/ubuntu/upload/satemp_new_clean/satemp_new/assets/images/footer-bg.webp');
    background-size: cover;
    background-position: center;
    position: relative;
}

.site-footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(31, 41, 55, 0.9);
    z-index: 0;
}

.site-footer > .container {
    position: relative;
    z-index: 1;
}




/* ===== أنماط الودجات المحسنة ===== */
.enhanced-widget {
    background: var(--background-primary);
    border: var(--border-width-1) solid var(--border-color);
    border-radius: var(--border-radius-xl);
    box-shadow: var(--shadow-sm);
    padding: var(--spacing-6);
    margin-bottom: var(--spacing-8);
    transition: var(--transition-all);
}

.enhanced-widget:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.enhanced-widget-title {
    font-size: var(--font-size-xl);
    font-weight: var(--font-weight-bold);
    color: var(--primary-color);
    margin-bottom: var(--spacing-6);
    border-bottom: 2px solid var(--primary-light);
    padding-bottom: var(--spacing-3);
}

/* ودجت المقالات الحديثة المحسن */
.enhanced-recent-posts .enhanced-post-item {
    display: flex;
    align-items: flex-start;
    gap: var(--spacing-4);
    margin-bottom: var(--spacing-6);
    padding-bottom: var(--spacing-4);
    border-bottom: 1px dashed var(--border-color);
}

.enhanced-recent-posts .enhanced-post-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.enhanced-recent-posts .post-thumbnail {
    flex-shrink: 0;
    width: 80px;
    height: 80px;
    border-radius: var(--border-radius-md);
    overflow: hidden;
}

.enhanced-recent-posts .post-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.enhanced-recent-posts .post-content {
    flex-grow: 1;
}

.enhanced-recent-posts .post-title {
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-semibold);
    margin-bottom: var(--spacing-1);
    line-height: var(--line-height-snug);
}

.enhanced-recent-posts .post-title a {
    color: var(--text-primary);
    text-decoration: none;
}

.enhanced-recent-posts .post-title a:hover {
    color: var(--primary-color);
    text-decoration: underline;
}

.enhanced-recent-posts .post-date {
    font-size: var(--font-size-xs);
    color: var(--text-secondary);
    margin-bottom: var(--spacing-1);
}

.enhanced-recent-posts .post-excerpt {
    font-size: var(--font-size-sm);
    color: var(--text-secondary);
    line-height: var(--line-height-normal);
}

/* ودجت التصنيفات المحسن */
.enhanced-categories .category-item {
    margin-bottom: var(--spacing-3);
}

.enhanced-categories .category-link {
    display: flex;
    align-items: center;
    gap: var(--spacing-2);
    color: var(--text-primary);
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-medium);
    padding: var(--spacing-2) var(--spacing-3);
    border-radius: var(--border-radius-md);
    transition: var(--transition-colors);
}

.enhanced-categories .category-link:hover {
    background: var(--background-secondary);
    color: var(--primary-color);
    text-decoration: none;
}

.enhanced-categories .category-link i {
    color: var(--secondary-color);
}

.enhanced-categories .category-count {
    background: var(--primary-light);
    color: var(--text-white);
    font-size: var(--font-size-xs);
    padding: var(--spacing-0-5) var(--spacing-2);
    border-radius: var(--border-radius-full);
    margin-left: auto;
}

/* ودجت المنتجات المميزة */
.enhanced-featured-products .featured-product-item {
    display: flex;
    align-items: center;
    gap: var(--spacing-4);
    margin-bottom: var(--spacing-6);
    padding-bottom: var(--spacing-4);
    border-bottom: 1px dashed var(--border-color);
}

.enhanced-featured-products .featured-product-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.enhanced-featured-products .product-image {
    flex-shrink: 0;
    width: 90px;
    height: 90px;
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-xs);
}

.enhanced-featured-products .product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.enhanced-featured-products .product-info {
    flex-grow: 1;
}

.enhanced-featured-products .product-title {
    font-size: var(--font-size-lg);
    font-weight: var(--font-weight-semibold);
    margin-bottom: var(--spacing-1);
    line-height: var(--line-height-snug);
}

.enhanced-featured-products .product-title a {
    color: var(--text-primary);
    text-decoration: none;
}

.enhanced-featured-products .product-title a:hover {
    color: var(--primary-color);
    text-decoration: underline;
}

.enhanced-featured-products .product-code {
    font-size: var(--font-size-sm);
    color: var(--text-secondary);
}

/* ودجت معلومات الاتصال المحسن */
.enhanced-contact-info .contact-item {
    display: flex;
    align-items: center;
    gap: var(--spacing-3);
    margin-bottom: var(--spacing-4);
    color: var(--text-secondary);
    font-size: var(--font-size-base);
}

.enhanced-contact-info .contact-item i {
    color: var(--primary-color);
    font-size: var(--font-size-lg);
    flex-shrink: 0;
}

.enhanced-contact-info .contact-item a {
    color: var(--text-secondary);
    text-decoration: none;
}

.enhanced-contact-info .contact-item a:hover {
    color: var(--primary-color);
    text-decoration: underline;
}

.enhanced-contact-info .contact-item span {
    line-height: var(--line-height-normal);
}

/* أنماط الشريط الجانبي الأيسر */
.left-sidebar {
    padding: var(--spacing-8) 0;
}

.left-sidebar .enhanced-widget {
    margin-bottom: var(--spacing-8);
}

@media (max-width: 768px) {
    .left-sidebar {
        padding: var(--spacing-6) 0;
    }
}




/* ===== تخطيط المحتوى الرئيسي مع الشريط الجانبي ===== */
.main-content-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--spacing-8);
}

@media (min-width: 992px) {
    .main-content-grid {
        grid-template-columns: 1fr 3fr; /* الشريط الجانبي الأيسر والمحتوى الرئيسي */
    }
}

@media (min-width: 1200px) {
    .main-content-grid {
        grid-template-columns: 1fr 4fr; /* تخصيص أكبر للمحتوى الرئيسي على الشاشات الكبيرة */
    }
}


/*!
 * Sawiat Theme - Enhanced RTL CSS File
 * ملف CSS محسن لدعم اللغة العربية والاتجاه من اليمين لليسار
 * Version: 3.0
 */

/* ===== إعدادات RTL الأساسية ===== */
body.rtl {
    direction: rtl;
    text-align: right;
    font-family: 'Cairo', 'Tajawal', 'Amiri', 'Noto Sans Arabic', system-ui, sans-serif;
}

body.ltr {
    direction: ltr;
    text-align: left;
    font-family: 'Inter', 'Roboto', system-ui, sans-serif;
}

/* ===== تصحيح اتجاه النصوص والعناصر ===== */
.rtl input,
.rtl textarea,
.rtl select {
    text-align: right;
    direction: rtl;
}

.rtl .text-left {
    text-align: right !important;
}

.rtl .text-right {
    text-align: left !important;
}

.rtl .float-left {
    float: right !important;
}

.rtl .float-right {
    float: left !important;
}

/* ===== تصحيح الهوامش والحشو ===== */
.rtl .ml-1 { margin-right: var(--spacing-1) !important; margin-left: 0 !important; }
.rtl .ml-2 { margin-right: var(--spacing-2) !important; margin-left: 0 !important; }
.rtl .ml-3 { margin-right: var(--spacing-3) !important; margin-left: 0 !important; }
.rtl .ml-4 { margin-right: var(--spacing-4) !important; margin-left: 0 !important; }
.rtl .ml-5 { margin-right: var(--spacing-5) !important; margin-left: 0 !important; }
.rtl .ml-6 { margin-right: var(--spacing-6) !important; margin-left: 0 !important; }

.rtl .mr-1 { margin-left: var(--spacing-1) !important; margin-right: 0 !important; }
.rtl .mr-2 { margin-left: var(--spacing-2) !important; margin-right: 0 !important; }
.rtl .mr-3 { margin-left: var(--spacing-3) !important; margin-right: 0 !important; }
.rtl .mr-4 { margin-left: var(--spacing-4) !important; margin-right: 0 !important; }
.rtl .mr-5 { margin-left: var(--spacing-5) !important; margin-right: 0 !important; }
.rtl .mr-6 { margin-left: var(--spacing-6) !important; margin-right: 0 !important; }

.rtl .pl-1 { padding-right: var(--spacing-1) !important; padding-left: 0 !important; }
.rtl .pl-2 { padding-right: var(--spacing-2) !important; padding-left: 0 !important; }
.rtl .pl-3 { padding-right: var(--spacing-3) !important; padding-left: 0 !important; }
.rtl .pl-4 { padding-right: var(--spacing-4) !important; padding-left: 0 !important; }
.rtl .pl-5 { padding-right: var(--spacing-5) !important; padding-left: 0 !important; }
.rtl .pl-6 { padding-right: var(--spacing-6) !important; padding-left: 0 !important; }

.rtl .pr-1 { padding-left: var(--spacing-1) !important; padding-right: 0 !important; }
.rtl .pr-2 { padding-left: var(--spacing-2) !important; padding-right: 0 !important; }
.rtl .pr-3 { padding-left: var(--spacing-3) !important; padding-right: 0 !important; }
.rtl .pr-4 { padding-left: var(--spacing-4) !important; padding-right: 0 !important; }
.rtl .pr-5 { padding-left: var(--spacing-5) !important; padding-right: 0 !important; }
.rtl .pr-6 { padding-left: var(--spacing-6) !important; padding-right: 0 !important; }

/* ===== تصحيح الحدود ===== */
.rtl .border-left {
    border-right: var(--border-width-1) solid var(--border-color) !important;
    border-left: none !important;
}

.rtl .border-right {
    border-left: var(--border-width-1) solid var(--border-color) !important;
    border-right: none !important;
}

.rtl .rounded-l {
    border-top-right-radius: var(--border-radius) !important;
    border-bottom-right-radius: var(--border-radius) !important;
    border-top-left-radius: 0 !important;
    border-bottom-left-radius: 0 !important;
}

.rtl .rounded-r {
    border-top-left-radius: var(--border-radius) !important;
    border-bottom-left-radius: var(--border-radius) !important;
    border-top-right-radius: 0 !important;
    border-bottom-right-radius: 0 !important;
}

/* ===== تصحيح القوائم والتنقل ===== */
.rtl .nav-menu {
    flex-direction: row-reverse;
}

.rtl .breadcrumb {
    flex-direction: row-reverse;
}

.rtl .breadcrumb-item::before {
    content: none; /* أو display: none; */
    transform: rotate(180deg);
    
}

/* ===== تصحيح الجداول ===== */
.rtl table {
    direction: rtl;
}

.rtl th,
.rtl td {
    text-align: right;
}

.rtl .table-responsive {
    direction: rtl;
}

/* ===== تصحيح النماذج ===== */
.rtl .form-group {
    text-align: right;
}

.rtl .form-label {
    text-align: right;
    display: block;
}

.rtl .form-control {
    text-align: right;
    direction: rtl;
}

.rtl .form-check {
    text-align: right;
    padding-right: 1.25rem;
    padding-left: 0;
}

.rtl .form-check-input {
    margin-right: -1.25rem;
    margin-left: 0;
}

.rtl .form-check-label {
    padding-right: 0.5rem;
    padding-left: 0;
}

/* ===== تصحيح الأزرار والروابط ===== */
.rtl .btn-group {
    flex-direction: row-reverse;
}

.rtl .btn-group .btn:first-child {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
    border-top-right-radius: var(--border-radius);
    border-bottom-right-radius: var(--border-radius);
}

.rtl .btn-group .btn:last-child {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
    border-top-left-radius: var(--border-radius);
    border-bottom-left-radius: var(--border-radius);
}

/* ===== تصحيح التصفح والصفحات ===== */
.rtl .pagination {
    flex-direction: row-reverse;
}

.rtl .pagination .page-item:first-child .page-link {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
    border-top-right-radius: var(--border-radius);
    border-bottom-right-radius: var(--border-radius);
}

.rtl .pagination .page-item:last-child .page-link {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
    border-top-left-radius: var(--border-radius);
    border-bottom-left-radius: var(--border-radius);
}

.rtl .pagination .prev::before {
    content: "‹";
    transform: rotate(180deg);
}

.rtl .pagination .next::before {
    content: "›";
    transform: rotate(180deg);
}

/* ===== تصحيح القوائم المنسدلة ===== */
.rtl .dropdown-menu {
    right: 0;
    left: auto;
    text-align: right;
}

.rtl .dropdown-item {
    text-align: right;
    padding-right: 1rem;
    padding-left: 1rem;
}

.rtl .dropdown-divider {
    margin: 0.5rem 1rem;
}

/* ===== تصحيح البطاقات ===== */
.rtl .card-header {
    text-align: right;
}

.rtl .card-body {
    text-align: right;
}

.rtl .card-footer {
    text-align: right;
}

/* ===== تصحيح الشبكة والتخطيط ===== */
.rtl .row {
    margin-right: -15px;
    margin-left: -15px;
}

.rtl .col,
.rtl [class*="col-"] {
    padding-right: 15px;
    padding-left: 15px;
}

/* ===== تصحيح الأيقونات والرموز ===== */
.rtl .icon-left {
    margin-right: 0;
    margin-left: 0.5rem;
}

.rtl .icon-right {
    margin-left: 0;
    margin-right: 0.5rem;
}

.rtl .arrow-left::before {
    content: "→";
}

.rtl .arrow-right::before {
    content: "←";
}

/* ===== تصحيح الهيدر والفوتر ===== */
.rtl .site-header {
    text-align: right;
}

.rtl .header-container {
    flex-direction: row-reverse;
}

.rtl .site-logo {
    margin-left: 0;
    margin-right: auto;
}

.rtl .main-navigation {
}

.rtl .site-footer {
    text-align: right;
}

.rtl .footer-content {
    text-align: right;
}

/* ===== تصحيح المنتجات ===== */
.rtl .product-card {
    text-align: right;
}

.rtl .product-meta {
    flex-direction: row-reverse;
}

.rtl .product-actions {
    flex-direction: row-reverse;
}

.rtl .product-badge {
    right: auto;
    left: var(--spacing-4);
}

/* ===== تصحيح مبدل اللغة ===== */
.rtl .language-switcher {
    flex-direction: row-reverse;
}

.rtl .language-text {
    margin-right: 0;
    margin-left: var(--spacing-2);
}

/* ===== تصحيح القوائم الفرعية ===== */
.rtl .sub-menu {
    right: 0;
    left: auto;
    text-align: right;
}

.rtl .nav-item:hover .sub-menu {
    transform: translateY(0);
}

/* ===== تصحيح الحركات والانتقالات ===== */
.rtl .slide-in-left {
    animation: slideInRight 0.5s ease-out;
}

.rtl .slide-in-right {
    animation: slideInLeft 0.5s ease-out;
}

@keyframes slideInRight {
    from {
        transform: translateX(-100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideInLeft {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* ===== تصحيح النصوص الطويلة ===== */
.rtl .text-truncate {
    direction: rtl;
    text-align: right;
}

.rtl .text-wrap {
    word-wrap: break-word;
    word-break: break-word;
}

/* ===== تصحيح الأرقام والتواريخ ===== */
.rtl .number,
.rtl .date,
.rtl .time {
    direction: ltr;
    text-align: left;
    display: inline-block;
}

/* ===== تحسينات خاصة بالخط العربي ===== */
.rtl h1,
.rtl h2,
.rtl h3,
.rtl h4,
.rtl h5,
.rtl h6 {
    font-weight: var(--font-weight-bold);
    line-height: 1.4;
}

.rtl p {
    line-height: 1.8;
    text-align: justify;
}

.rtl .lead {
    font-size: 1.125rem;
    line-height: 1.7;
}

/* ===== تصحيح الاستجابة للشاشات الصغيرة ===== */
@media (max-width: 768px) {
    .rtl .container {
        padding-right: var(--spacing-4);
        padding-left: var(--spacing-4);
    }
    
    .rtl .nav-menu {
        flex-direction: column;
        text-align: right;
    }
    
    .rtl .header-container {
        flex-direction: column;
        align-items: flex-end;
    }
}

/* ===== تحسينات إضافية للعربية ===== */
.rtl .arabic-text {
    font-family: 'Amiri', 'Scheherazade', 'Traditional Arabic', serif;
    line-height: 2;
    font-size: 1.1em;
}

.rtl .arabic-title {
    font-family: 'Cairo', 'Tajawal', sans-serif;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.rtl .english-text {
    direction: ltr;
    text-align: left;
    font-family: 'Inter', 'Roboto', sans-serif;
    display: inline-block;
}

/* ===== تصحيح علامات الترقيم ===== */
.rtl .punctuation-ar {
    font-family: 'Cairo', 'Tajawal', sans-serif;
}

.rtl .quote::before {
    content: "«";
}

.rtl .quote::after {
    content: "»";
}

/* ===== تحسينات الطباعة للعربية ===== */
@media print {
    .rtl body {
        font-family: 'Traditional Arabic', 'Amiri', serif;
        line-height: 1.8;
    }
    
    .rtl h1,
    .rtl h2,
    .rtl h3 {
        page-break-after: avoid;
    }
    
    .rtl p {
        orphans: 3;
        widows: 3;
    }
}

/* ===== تحسينات CSS للقالب ===== */

/* تحسينات عامة للتصميم */
.product-category-page {
    padding: 2rem 0;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    min-height: 100vh;
}

.category-header {
    text-align: center;
    margin-bottom: 3rem;
    padding: 2rem;
    background: white;
    border-radius: 15px;
    box-shadow: var(--shadow-md);
    position: relative;
    overflow: hidden;
}

.category-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
}

.category-header h1 {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-weight: 700;
    position: relative;
}

.category-description {
    font-size: 1.1rem;
    color: var(--text-light);
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.8;
}

/* تحسينات الفلاتر */
.product-filters {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: var(--shadow-sm);
    margin-bottom: 2rem;
    border: 1px solid var(--border-color);
}

.filter-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--light-color);
}

.filter-header h3 {
    color: var(--primary-color);
    font-size: 1.3rem;
    font-weight: 600;
}

.products-count {
    background: var(--primary-color);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 25px;
    font-size: 0.9rem;
    font-weight: 600;
}

.filter-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.filter-btn {
    background: var(--light-color);
    border: 2px solid var(--border-color);
    color: var(--text-color);
    padding: 0.75rem 1.5rem;
    border-radius: 25px;
    cursor: pointer;
    transition: var(--transition);
    font-weight: 500;
    font-size: 0.95rem;
    position: relative;
    overflow: hidden;
}

.filter-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    transition: left 0.5s;
}

.filter-btn:hover::before {
    left: 100%;
}

.filter-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary-color);
}

.filter-btn.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* تحسينات شبكة المنتجات */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    padding: 1rem 0;
}

.product-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    border: 1px solid var(--border-color);
    position: relative;
}

.product-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.product-card:hover::before {
    transform: scaleX(1);
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}

.product-link {
    text-decoration: none;
    color: inherit;
    display: block;
    height: 100%;
}

.product-image {
    position: relative;
    height: 250px;
    overflow: hidden;
    background: var(--light-color);
}

.product-thumbnail {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.product-card:hover .product-thumbnail {
    transform: scale(1.05);
}

.no-image-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: var(--text-light);
    font-size: 1.1rem;
}

.no-image-placeholder i {
    font-size: 3rem;
    margin-bottom: 0.5rem;
    opacity: 0.5;
}

.product-rating {
    background: rgba(255,255,255,0.9);
    padding: 0.3rem 0.6rem;
    border-radius: 15px;
    backdrop-filter: blur(10px);
}

.star {
    color: #ddd;
    font-size: 0.9rem;
}

.star.filled {
    color: var(--secondary-color);
}

.product-content {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
}

.product-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 0.75rem;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-excerpt {
    color: var(--text-light);
    font-size: 0.95rem;
    margin-bottom: 1rem;
    line-height: 1.6;
    flex-grow: 1;
}

.product-meta {
    margin-bottom: 1rem;
}

.product-code {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--light-color);
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-size: 0.85rem;
    color: var(--text-color);
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.product-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.product-category {
    background: var(--primary-color);
    color: white;
    padding: 0.2rem 0.6rem;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 500;
}

.product-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
    margin-top: auto;
}

.view-details {
    color: var(--primary-color);
    font-weight: 600;
    font-size: 0.95rem;
}

.product-actions i {
    color: var(--primary-color);
    transition: transform 0.3s ease;
}

.product-card:hover .product-actions i {
    transform: translateX(-5px);
}

/* تحسينات التصفح */
.pagination {
    display: flex;
    justify-content: center;
    margin-top: 3rem;
    padding: 2rem 0;
}

.pagination .nav-links {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.pagination a,
.pagination span {
    padding: 0.75rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    text-decoration: none;
    color: var(--text-color);
    transition: var(--transition);
    font-weight: 500;
}

.pagination a:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    transform: translateY(-2px);
}

.pagination .current {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* تحسينات الاستجابة */
@media (max-width: 768px) {
    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 1.5rem;
    }
    
    .category-header h1 {
        font-size: 2rem;
    }
    
    .filter-buttons {
        justify-content: center;
    }
    
    .filter-header {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .product-filters {
        padding: 1.5rem;
    }
}

@media (max-width: 480px) {
    .products-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .category-header {
        padding: 1.5rem;
        margin-bottom: 2rem;
    }
    
    .category-header h1 {
        font-size: 1.8rem;
    }
    
    .filter-btn {
        padding: 0.6rem 1.2rem;
        font-size: 0.9rem;
    }
}

/* تحسينات الأنيميشن */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.product-card {
    animation: fadeInUp 0.6s ease forwards;
}

.product-card:nth-child(1) { animation-delay: 0.1s; }
.product-card:nth-child(2) { animation-delay: 0.2s; }
.product-card:nth-child(3) { animation-delay: 0.3s; }
.product-card:nth-child(4) { animation-delay: 0.4s; }
.product-card:nth-child(5) { animation-delay: 0.5s; }
.product-card:nth-child(6) { animation-delay: 0.6s; }

/* تحسينات إضافية للتفاعل */
.filter-btn:active {
    transform: translateY(0);
}

.product-card:active {
    transform: translateY(-4px);
}

/* تحسينات الوضع المظلم (اختياري) */
@media (prefers-color-scheme: dark) {
    :root {
        --text-color: #e9ecef;
        --text-light: #adb5bd;
        --border-color: #495057;
        --light-color: #343a40;
    }
    
    body {
        background-color: #212529;
        color: var(--text-color);
    }
    
    .product-card,
    .product-filters,
    .category-header {
        background: #343a40;
        border-color: var(--border-color);
    }
}

/* تحسينات إمكانية الوصول */
.filter-btn:focus,
.product-link:focus {
    outline: 3px solid var(--secondary-color);
    outline-offset: 2px;
}

/* تحسينات الطباعة */
@media print {
    .product-filters,
    .pagination {
        display: none;
    }
    
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    
    .product-card {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ccc;
    }
}

/* ===== أنماط زر تبديل اللغة ===== */

.language-switcher {
    position: relative;
    display: inline-block;
    margin-left: 15px;
}

.language-toggle {
    background: linear-gradient(135deg, #007cba, #00a0d2);
    border: none;
    border-radius: 25px;
    padding: 8px 15px;
    color: white;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 2px 10px rgba(0, 124, 186, 0.2);
    position: relative;
    overflow: hidden;
}

.language-toggle::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s ease;
}

.language-toggle:hover::before {
    left: 100%;
}

.language-toggle:hover {
    background: linear-gradient(135deg, #005a87, #007cba);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 124, 186, 0.3);
}

.language-toggle:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(0, 124, 186, 0.2);
}

.language-toggle i {
    font-size: 16px;
    animation: rotate 2s linear infinite;
}

.language-toggle:hover i {
    animation-duration: 0.5s;
}

@keyframes rotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.lang-text {
    font-family: 'Poppins', sans-serif;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

/* تأثير التحميل عند التبديل */
.language-toggle.loading {
    pointer-events: none;
    opacity: 0.7;
}

.language-toggle.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 16px;
    height: 16px;
    margin: -8px 0 0 -8px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top: 2px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* أنماط متجاوبة */
@media (max-width: 768px) {
    .language-switcher {
        margin-left: 10px;
    }
    
    .language-toggle {
        padding: 6px 12px;
        font-size: 12px;
        border-radius: 20px;
    }
    
    .language-toggle i {
        font-size: 14px;
    }
    
    .lang-text {
        display: none;
    }
}

@media (max-width: 480px) {
    .language-toggle {
        padding: 5px 10px;
        min-width: 40px;
        justify-content: center;
    }
    
    .language-toggle i {
        font-size: 12px;
    }
}

/* أنماط للوضع المظلم */
@media (prefers-color-scheme: dark) {
    .language-toggle {
        background: linear-gradient(135deg, #2c3e50, #34495e);
        box-shadow: 0 2px 10px rgba(44, 62, 80, 0.3);
    }
    
    .language-toggle:hover {
        background: linear-gradient(135deg, #1a252f, #2c3e50);
        box-shadow: 0 4px 15px rgba(44, 62, 80, 0.4);
    }
}

/* تحسينات إمكانية الوصول */
.language-toggle:focus {
    outline: 2px solid #007cba;
    outline-offset: 2px;
}

.language-toggle:focus:not(:focus-visible) {
    outline: none;
}

/* أنماط للطباعة */
@media print {
    .language-switcher {
        display: none;
    }
}

/* تأثيرات إضافية للتفاعل */
.language-toggle {
    position: relative;
    z-index: 1;
}

.language-toggle::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.1), transparent);
    border-radius: inherit;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: -1;
}

.language-toggle:hover::after {
    opacity: 1;
}

/* أنماط للحالات المختلفة */
.language-toggle[data-lang="en"] {
    direction: ltr;
}

.language-toggle[data-lang="ar"] {
    direction: rtl;
}

/* تحسينات الأداء */
.language-toggle {
    will-change: transform, box-shadow;
    backface-visibility: hidden;
    transform: translateZ(0);
}

/* أنماط للتفاعل مع اللمس */
@media (hover: none) and (pointer: coarse) {
    .language-toggle:hover {
        transform: none;
    }
    
    .language-toggle:active {
        transform: scale(0.95);
    }
}

/* أنماط للشاشات عالية الدقة */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .language-toggle {
        border: 0.5px solid rgba(255,255,255,0.1);
    }
}

/* تأثير النبضة للفت الانتباه */
@keyframes pulse {
    0% {
        box-shadow: 0 2px 10px rgba(0, 124, 186, 0.2);
    }
    50% {
        box-shadow: 0 2px 20px rgba(0, 124, 186, 0.4);
    }
    100% {
        box-shadow: 0 2px 10px rgba(0, 124, 186, 0.2);
    }
}

.language-toggle.highlight {
    animation: pulse 2s ease-in-out infinite;
}

/* أنماط للحالة النشطة */
.language-toggle.active {
    background: linear-gradient(135deg, #28a745, #20c997);
}

.language-toggle.active:hover {
    background: linear-gradient(135deg, #218838, #1e7e34);
}

/*!
 * Sawiat Theme - Main CSS File
 * نظام CSS موحد للقالب
 * Version: 2.0
 */

/* ===== المتغيرات العامة ===== */
:root {
    /* الألوان الأساسية */
    --primary-color: #007cba;
    --primary-dark: #005a87;
    --primary-light: #00a0d2;
    --secondary-color: #27ae60;
    --secondary-dark: #229954;
    --accent-color: #e74c3c;
    
    /* الألوان المحايدة */
    --text-primary: #2c3e50;
    --text-secondary: #7f8c8d;
    --text-light: #95a5a6;
    --background-primary: #ffffff;
    --background-secondary: #f8f9fa;
    --background-tertiary: #e9ecef;
    --border-color: #dee2e6;
    --shadow-light: rgba(0, 0, 0, 0.1);
    --shadow-medium: rgba(0, 0, 0, 0.15);
    --shadow-dark: rgba(0, 0, 0, 0.2);
    
    /* الخطوط */
    --font-primary: 'Cairo', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    --font-secondary: 'Roboto', Arial, sans-serif;
    --font-size-xs: 0.75rem;
    --font-size-sm: 0.875rem;
    --font-size-base: 1rem;
    --font-size-lg: 1.125rem;
    --font-size-xl: 1.25rem;
    --font-size-2xl: 1.5rem;
    --font-size-3xl: 1.875rem;
    --font-size-4xl: 2.25rem;
    
    /* المسافات */
    --spacing-xs: 0.25rem;
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 2rem;
    --spacing-2xl: 3rem;
    --spacing-3xl: 4rem;
    
    /* الحدود والزوايا */
    --border-radius-sm: 4px;
    --border-radius-md: 8px;
    --border-radius-lg: 12px;
    --border-radius-xl: 16px;
    --border-radius-full: 50%;
    
    /* الانتقالات */
    --transition-fast: 0.15s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
    
    /* الظلال */
    --shadow-sm: 0 2px 4px var(--shadow-light);
    --shadow-md: 0 4px 8px var(--shadow-light);
    --shadow-lg: 0 8px 16px var(--shadow-medium);
    --shadow-xl: 0 12px 24px var(--shadow-medium);
    
    /* العرض الأقصى للحاويات */
    --container-sm: 540px;
    --container-md: 720px;
    --container-lg: 960px;
    --container-xl: 1140px;
    --container-2xl: 1320px;
}

/* ===== إعادة تعيين الأنماط الأساسية ===== */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-primary);
    font-size: var(--font-size-base);
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--background-primary);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* اتجاه النص حسب اللغة */
body.rtl {
    direction: rtl;
    text-align: right;
}

body.ltr {
    direction: ltr;
    text-align: left;
}

/* ===== العناصر الأساسية ===== */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: var(--spacing-md);
    color: var(--text-primary);
}

h1 { font-size: var(--font-size-4xl); }
h2 { font-size: var(--font-size-3xl); }
h3 { font-size: var(--font-size-2xl); }
h4 { font-size: var(--font-size-xl); }
h5 { font-size: var(--font-size-lg); }
h6 { font-size: var(--font-size-base); }

p {
    margin-bottom: var(--spacing-md);
    color: var(--text-secondary);
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color var(--transition-normal);
}

a:hover {
    color: var(--primary-dark);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* ===== الحاويات ===== */
.container {
    width: 100%;
    max-width: var(--container-xl);
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

.container-fluid {
    width: 100%;
    padding: 0 var(--spacing-md);
}

/* ===== الشبكة المرنة ===== */
.row {
    display: flex;
    flex-wrap: wrap;
    margin: 0 calc(-1 * var(--spacing-md) / 2);
}

.col {
    flex: 1;
    padding: 0 calc(var(--spacing-md) / 2);
}

.col-1 { flex: 0 0 8.333333%; max-width: 8.333333%; }
.col-2 { flex: 0 0 16.666667%; max-width: 16.666667%; }
.col-3 { flex: 0 0 25%; max-width: 25%; }
.col-4 { flex: 0 0 33.333333%; max-width: 33.333333%; }
.col-6 { flex: 0 0 50%; max-width: 50%; }
.col-8 { flex: 0 0 66.666667%; max-width: 66.666667%; }
.col-9 { flex: 0 0 75%; max-width: 75%; }
.col-12 { flex: 0 0 100%; max-width: 100%; }

/* ===== الأزرار ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-sm) var(--spacing-lg);
    border: 2px solid transparent;
    border-radius: var(--border-radius-md);
    font-size: var(--font-size-base);
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all var(--transition-normal);
    min-height: 44px;
    white-space: nowrap;
}

.btn:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    color: white;
    border-color: var(--primary-color);
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary-color));
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    color: white;
}

.btn-secondary {
    background: var(--secondary-color);
    color: white;
    border-color: var(--secondary-color);
}

.btn-secondary:hover {
    background: var(--secondary-dark);
    border-color: var(--secondary-dark);
    color: white;
}

.btn-outline {
    background: transparent;
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-outline:hover {
    background: var(--primary-color);
    color: white;
}

.btn-sm {
    padding: var(--spacing-xs) var(--spacing-md);
    font-size: var(--font-size-sm);
    min-height: 36px;
}

.btn-lg {
    padding: var(--spacing-md) var(--spacing-xl);
    font-size: var(--font-size-lg);
    min-height: 52px;
}

/* ===== البطاقات ===== */
.card {
    background: var(--background-primary);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    transition: all var(--transition-normal);
}

.card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
}

.card-header {
    padding: var(--spacing-lg);
    border-bottom: 1px solid var(--border-color);
    background: var(--background-secondary);
}

.card-body {
    padding: var(--spacing-lg);
}

.card-footer {
    padding: var(--spacing-lg);
    border-top: 1px solid var(--border-color);
    background: var(--background-secondary);
}

/* ===== النماذج ===== */
.form-group {
    margin-bottom: var(--spacing-lg);
}

.form-label {
    display: block;
    margin-bottom: var(--spacing-sm);
    font-weight: 600;
    color: var(--text-primary);
}

.form-control {
    width: 100%;
    padding: var(--spacing-sm) var(--spacing-md);
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius-md);
    font-size: var(--font-size-base);
    font-family: inherit;
    background: var(--background-primary);
    color: var(--text-primary);
    transition: border-color var(--transition-normal);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 124, 186, 0.1);
}

.form-control::placeholder {
    color: var(--text-light);
}

textarea.form-control {
    resize: vertical;
    min-height: 100px;
}

/* ===== التنبيهات ===== */
.alert {
    padding: var(--spacing-md) var(--spacing-lg);
    border-radius: var(--border-radius-md);
    margin-bottom: var(--spacing-lg);
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.alert-info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

.alert-warning {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

/* ===== الشارات ===== */
.badge {
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-xs);
    padding: var(--spacing-xs) var(--spacing-sm);
    font-size: var(--font-size-xs);
    font-weight: 600;
    border-radius: var(--border-radius-full);
    white-space: nowrap;
}

.badge-primary {
    background: var(--primary-color);
    color: white;
}

.badge-success {
    background: var(--secondary-color);
    color: white;
}

.badge-danger {
    background: var(--accent-color);
    color: white;
}

.badge-secondary {
    background: var(--text-light);
    color: white;
}

/* ===== مسارات التنقل ===== */
.breadcrumbs {
    background: var(--background-primary);
    padding: var(--spacing-md) 0;
    margin-bottom: var(--spacing-xl);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-sm);
}

.breadcrumb-container {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--spacing-sm);
    font-size: var(--font-size-sm);
}

.breadcrumb-item {
    color: var(--primary-color);
    text-decoration: none;
    padding: var(--spacing-xs) var(--spacing-sm);
    border-radius: var(--border-radius-sm);
    transition: all var(--transition-normal);
}

.breadcrumb-item:hover {
    background: var(--background-secondary);
    color: var(--primary-dark);
}

.breadcrumbs .separator {
    color: var(--text-light);
    font-size: var(--font-size-xs);
}

.breadcrumbs .current {
    color: var(--text-primary);
    font-weight: 600;
}

/* ===== التصفح ===== */
.pagination-wrapper {
    text-align: center;
    margin: var(--spacing-2xl) 0;
}

.page-numbers {
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-xs);
    list-style: none;
    margin: 0;
    padding: 0;
}

.page-numbers li {
    margin: 0;
}

.page-numbers a,
.page-numbers span {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    height: 44px;
    padding: 0 var(--spacing-md);
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius-md);
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 600;
    transition: all var(--transition-normal);
}

.page-numbers a:hover,
.page-numbers .current {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

/* ===== الشبكات ===== */
.grid {
    display: grid;
    gap: var(--spacing-lg);
}

.grid-2 {
    grid-template-columns: repeat(2, 1fr);
}

.grid-3 {
    grid-template-columns: repeat(3, 1fr);
}

.grid-4 {
    grid-template-columns: repeat(4, 1fr);
}

.grid-auto {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

/* ===== الأدوات المساعدة ===== */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.text-primary { color: var(--primary-color); }
.text-secondary { color: var(--text-secondary); }
.text-muted { color: var(--text-light); }
.text-success { color: var(--secondary-color); }
.text-danger { color: var(--accent-color); }

.bg-primary { background-color: var(--primary-color); }
.bg-secondary { background-color: var(--background-secondary); }
.bg-light { background-color: var(--background-tertiary); }

.d-none { display: none; }
.d-block { display: block; }
.d-flex { display: flex; }
.d-grid { display: grid; }

.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.justify-around { justify-content: space-around; }

.align-center { align-items: center; }
.align-start { align-items: flex-start; }
.align-end { align-items: flex-end; }

.flex-wrap { flex-wrap: wrap; }
.flex-nowrap { flex-wrap: nowrap; }

.gap-sm { gap: var(--spacing-sm); }
.gap-md { gap: var(--spacing-md); }
.gap-lg { gap: var(--spacing-lg); }
.gap-xl { gap: var(--spacing-xl); }

.m-0 { margin: 0; }
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.ml-0 { margin-left: 0; }
.mr-0 { margin-right: 0; }

.m-1 { margin: var(--spacing-sm); }
.mt-1 { margin-top: var(--spacing-sm); }
.mb-1 { margin-bottom: var(--spacing-sm); }
.ml-1 { margin-left: var(--spacing-sm); }
.mr-1 { margin-right: var(--spacing-sm); }

.m-2 { margin: var(--spacing-md); }
.mt-2 { margin-top: var(--spacing-md); }
.mb-2 { margin-bottom: var(--spacing-md); }
.ml-2 { margin-left: var(--spacing-md); }
.mr-2 { margin-right: var(--spacing-md); }

.m-3 { margin: var(--spacing-lg); }
.mt-3 { margin-top: var(--spacing-lg); }
.mb-3 { margin-bottom: var(--spacing-lg); }
.ml-3 { margin-left: var(--spacing-lg); }
.mr-3 { margin-right: var(--spacing-lg); }

.p-0 { padding: 0; }
.pt-0 { padding-top: 0; }
.pb-0 { padding-bottom: 0; }
.pl-0 { padding-left: 0; }
.pr-0 { padding-right: 0; }

.p-1 { padding: var(--spacing-sm); }
.pt-1 { padding-top: var(--spacing-sm); }
.pb-1 { padding-bottom: var(--spacing-sm); }
.pl-1 { padding-left: var(--spacing-sm); }
.pr-1 { padding-right: var(--spacing-sm); }

.p-2 { padding: var(--spacing-md); }
.pt-2 { padding-top: var(--spacing-md); }
.pb-2 { padding-bottom: var(--spacing-md); }
.pl-2 { padding-left: var(--spacing-md); }
.pr-2 { padding-right: var(--spacing-md); }

.p-3 { padding: var(--spacing-lg); }
.pt-3 { padding-top: var(--spacing-lg); }
.pb-3 { padding-bottom: var(--spacing-lg); }
.pl-3 { padding-left: var(--spacing-lg); }
.pr-3 { padding-right: var(--spacing-lg); }

.rounded { border-radius: var(--border-radius-md); }
.rounded-sm { border-radius: var(--border-radius-sm); }
.rounded-lg { border-radius: var(--border-radius-lg); }
.rounded-xl { border-radius: var(--border-radius-xl); }
.rounded-full { border-radius: var(--border-radius-full); }

.shadow-sm { box-shadow: var(--shadow-sm); }
.shadow-md { box-shadow: var(--shadow-md); }
.shadow-lg { box-shadow: var(--shadow-lg); }
.shadow-xl { box-shadow: var(--shadow-xl); }

/* ===== الاستجابة للأجهزة المحمولة ===== */
@media (max-width: 1200px) {
    .container {
        max-width: var(--container-lg);
    }
    
    .grid-4 {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 992px) {
    .container {
        max-width: var(--container-md);
    }
    
    .grid-4,
    .grid-3 {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .col-md-6 { flex: 0 0 50%; max-width: 50%; }
    .col-md-12 { flex: 0 0 100%; max-width: 100%; }
}

@media (max-width: 768px) {
    :root {
        --font-size-4xl: 1.875rem;
        --font-size-3xl: 1.5rem;
        --font-size-2xl: 1.25rem;
    }
    
    .container {
        max-width: var(--container-sm);
        padding: 0 var(--spacing-sm);
    }
    
    .grid-4,
    .grid-3,
    .grid-2 {
        grid-template-columns: 1fr;
    }
    
    .row {
        margin: 0 calc(-1 * var(--spacing-sm) / 2);
    }
    
    .col {
        padding: 0 calc(var(--spacing-sm) / 2);
    }
    
    .col-sm-6 { flex: 0 0 50%; max-width: 50%; }
    .col-sm-12 { flex: 0 0 100%; max-width: 100%; }
    
    .btn {
        padding: var(--spacing-sm) var(--spacing-md);
        font-size: var(--font-size-sm);
    }
    
    .btn-lg {
        padding: var(--spacing-md) var(--spacing-lg);
        font-size: var(--font-size-base);
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 var(--spacing-xs);
    }
    
    .breadcrumb-container {
        font-size: var(--font-size-xs);
    }
    
    .page-numbers a,
    .page-numbers span {
        min-width: 36px;
        height: 36px;
        padding: 0 var(--spacing-sm);
        font-size: var(--font-size-sm);
    }
}

/* ===== تحسينات الأداء ===== */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ===== طباعة ===== */
@media print {
    .btn,
    .pagination-wrapper,
    .breadcrumbs {
        display: none;
    }
    
    .card {
        box-shadow: none;
        border: 1px solid var(--border-color);
    }
    
    a {
        color: var(--text-primary);
        text-decoration: underline;
    }
}

/* ===== تصميم متجاوب محسن للمنتجات ===== */

/* أنماط عامة للمنتجات */
.products-grid {
    display: grid;
    gap: 25px;
    margin-top: 40px;
    padding: 0 15px;
}

.product-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    position: relative;
    border: 1px solid rgba(0,0,0,0.05);
}

.product-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #007cba, #00a0d2, #0099cc);
    transform: scaleX(0);
    transition: transform 0.4s ease;
}

.product-card:hover::before {
    transform: scaleX(1);
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 35px rgba(0,0,0,0.15);
}

.product-link {
    text-decoration: none;
    color: inherit;
    display: block;
    height: 100%;
}

.product-image {
    height: 180px;
    overflow: hidden;
    position: relative;
    background: #f8f9fa;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.product-card:hover .product-image img {
    transform: scale(1.08);
}

.no-image {
    height: 100%;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #adb5bd;
    font-size: 36px;
}

.product-content {
    padding: 20px;
    min-height: 100px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.product-title {
    font-size: 15px;
    font-weight: 600;
    margin: 0 0 12px;
    color: #2c3e50;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.product-meta {
    margin-top: auto;
}

.product-code {
    font-size: 11px;
    color: #6c757d;
    background: #f8f9fa;
    padding: 6px 10px;
    border-radius: 20px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    border: 1px solid #e9ecef;
}

.product-code i {
    font-size: 10px;
}

/* ===== تخطيط متجاوب للشاشات المختلفة ===== */

/* شاشات كبيرة جداً (1400px+) */
@media (min-width: 1400px) {
    .products-grid {
        grid-template-columns: repeat(6, 1fr);
        gap: 30px;
    }
    
    
}

/* شاشات كبيرة (1200px - 1399px) */
@media (min-width: 1200px) and (max-width: 1399px) {
    .products-grid {
        grid-template-columns: repeat(5, 1fr);
        gap: 25px;
    }
}

/* شاشات متوسطة كبيرة (992px - 1199px) */
@media (min-width: 992px) and (max-width: 1199px) {
    .products-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 25px;
    }
}

/* شاشات متوسطة (768px - 991px) */
@media (min-width: 768px) and (max-width: 991px) {
    .products-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 20px;
    }
    
    .product-image {
        height: 160px;
    }
    
    .product-content {
        padding: 15px;
        min-height: 90px;
    }
    
    .product-title {
        font-size: 14px;
    }
}

/* شاشات صغيرة (576px - 767px) */
@media (min-width: 576px) and (max-width: 767px) {
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
        padding: 0 10px;
    }
    
    .product-image {
        height: 140px;
    }
    
    .product-content {
        padding: 12px;
        min-height: 80px;
    }
    
    .product-title {
        font-size: 13px;
        margin-bottom: 8px;
    }
    
    .product-code {
        font-size: 10px;
        padding: 4px 8px;
    }
}

/* شاشات صغيرة جداً (أقل من 576px) */
@media (max-width: 575px) {
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
        padding: 0 8px;
    }
    
    .product-card {
        border-radius: 12px;
    }
    
    .product-image {
        height: 120px;
    }
    
    .product-content {
        padding: 10px;
        min-height: 70px;
    }
    
    .product-title {
        font-size: 12px;
        margin-bottom: 6px;
        -webkit-line-clamp: 2;
    }
    
    .product-code {
        font-size: 9px;
        padding: 3px 6px;
    }
    
    .product-code i {
        font-size: 8px;
    }
}

/* ===== تحسينات إضافية للتفاعل ===== */

/* تأثيرات التحميل */
.product-card.loading {
    opacity: 0.7;
    pointer-events: none;
}

.product-card.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #007cba;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* تأثيرات الظهور */
.product-card {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.6s ease forwards;
}

.product-card:nth-child(1) { animation-delay: 0.1s; }
.product-card:nth-child(2) { animation-delay: 0.2s; }
.product-card:nth-child(3) { animation-delay: 0.3s; }
.product-card:nth-child(4) { animation-delay: 0.4s; }
.product-card:nth-child(5) { animation-delay: 0.5s; }
.product-card:nth-child(6) { animation-delay: 0.6s; }

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* تحسينات الأداء */
.product-image img {
    will-change: transform;
}

.product-card {
    will-change: transform, box-shadow;
}

/* تحسينات إمكانية الوصول */
.product-card:focus-within {
    outline: 2px solid #007cba;
    outline-offset: 2px;
}

.product-link:focus {
    outline: none;
}

/* تحسينات للطباعة */
@media print {
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    .product-card {
        box-shadow: none;
        border: 1px solid #ddd;
        break-inside: avoid;
    }
    
    .product-card:hover {
        transform: none;
        box-shadow: none;
    }
}

/* ===== أنماط خاصة للمنتجات المميزة ===== */
.product-card.featured {
    border: 2px solid #007cba;
    position: relative;
}

.product-card.featured::after {
    content: 'مميز';
    position: absolute;
    top: 10px;
    right: 10px;
    background: #007cba;
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 10px;
    font-weight: 600;
}

/* ===== أنماط للمنتجات غير المتوفرة ===== */
.product-card.out-of-stock {
    opacity: 0.6;
}

.product-card.out-of-stock::after {
    content: 'غير متوفر';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(220, 53, 69, 0.9);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    z-index: 10;
}

/* ===== تحسينات للوضع المظلم ===== */
@media (prefers-color-scheme: dark) {
    .product-card {
        background: #2c3e50;
        border-color: rgba(255,255,255,0.1);
        color: #ecf0f1;
    }
    
    .product-title {
        color: #ecf0f1;
    }
    
    .product-code {
        background: #34495e;
        color: #bdc3c7;
        border-color: rgba(255,255,255,0.1);
    }
    
    .no-image {
        background: linear-gradient(135deg, #34495e 0%, #2c3e50 100%);
        color: #7f8c8d;
    }
}

/* إضافة دعم كامل للغة العربية */
body {
    font-family: 'Tajawal', 'Arial', sans-serif;
}

/* تصحيح اتجاه العناصر */
input, textarea, select {
    text-align: right;
}

/* تصحيح اتجاه التصفح */
.pagination .nav-links {
    display: flex;
    justify-content: center;
}

.pagination .page-numbers {
    margin: 0 5px;
}

.pagination .prev,
.pagination .next {
    transform: rotate(180deg);
}

/* تصحيح اتجاه الجداول */
table {
    direction: rtl;
}

th, td {
    text-align: right;
}

/* إضافة دعم كامل للغة العربية */
body {
    font-family: 'Tajawal', 'Arial', sans-serif;
}

/* تصحيح اتجاه العناصر */
input, textarea, select {
    text-align: right;
}

/* تصحيح اتجاه التصفح */
.pagination .nav-links {
    display: flex;
    justify-content: center;
}

.pagination .page-numbers {
    margin: 0 5px;
}

.pagination .prev,
.pagination .next {
    transform: rotate(180deg);
}

/* تصحيح اتجاه الجداول */
table {
    direction: rtl;
}

th, td {
    text-align: right;
}

/* تصحيح اتجاه القوائم */
ul, ol {
    padding-right: 20px;
    padding-left: 0;
}

/* تصحيح اتجاه عناصر الواجهة */
.widget ul, .widget ol {
    padding-right: 0;
}

/* تصحيح اتجاه عناصر التعليقات */
.comment .avatar {
    float: right;
    margin-left: 15px;
    margin-right: 0;
}

.comment .comment-meta {
    text-align: right;
}

.comment .reply {
    text-align: left;
}/* ===== متغيرات التصميم ===== */
:root {
    --primary-color: #2a5a8c; /* اللون الأساسي - أزرق */
    --secondary-color: #f5a623; /* اللون الثانوي - برتقالي */
    --accent-color: #8e44ad; /* لون مميز - بنفسجي */
    --dark-color: #2c3e50; /* لون داكن - أزرق داكن */
    --light-color: #f8f9fa; /* لون فاتح - أبيض مائل للرمادي */
    --text-color: #333; /* لون النص الرئيسي */
    --text-light: #777; /* لون النص الثانوي */
    --border-color: #dee2e6; /* لون الحدود */
    --success-color: #27ae60; /* لون النجاح - أخضر */
    --warning-color: #e67e22; /* لون تحذير - برتقالي غامق */
    --danger-color: #e74c3c; /* لون خطأ - أحمر */
    
    /* ظلال */
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.1);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.15);
    --shadow-lg: 0 8px 24px rgba(0,0,0,0.2);
    
    /* أنيميشنات */
    --transition: all 0.3s ease;
}

/* استيراد خطوط جوجل العربية */
@import url('https://fonts.googleapis.com/css2?family=Almarai:wght@400;700&family=Droid+Arabic+Naskh&display=swap');
/* ===== إعادة تعيين عام ===== */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Almarai', 'Tajawal', sans-serif;
    font-weight: 400;
    line-height: 1.6;
    color: var(--text-color);
    background-color: #fff;
    direction: rtl;
    text-align: right;
    overflow-x: hidden;
}

/* للعناصر الإنجليزية */
.english-text {
    font-family: 'Poppins', sans-serif;
    direction: ltr;
    text-align: left;
}

/* ===== طباعة ===== */
@media print {
    body {
        background: none;
    }
    .no-print {
        display: none !important;
    }
}

/* ===== طبقة التحميل ===== */
#preloader {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--primary-color);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.5s, visibility 0.5s;
}

#preloader.hide {
    opacity: 0;
    visibility: hidden;
}

.loader {
    width: 80px;
    height: 80px;
    border: 8px solid rgba(255,255,255,0.2);
    border-top: 8px solid white;
    border-radius: 50%;
    animation: spin 1.5s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ===== هيكل الصفحة ===== */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

.section {
    padding: 80px 0;
}

.section-title {
    text-align: center;
    margin-bottom: 50px;
    position: relative;
    padding-bottom: 20px;
    font-size: 2.2rem;
    color: var(--dark-color);
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 50%;
    transform: translateX(50%);
    width: 80px;
    height: 4px;
    background: var(--secondary-color);
    border-radius: 2px;
}

/* ===== أنيميشنات عند التمرير ===== */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.animate-on-scroll.animated {
    opacity: 1;
    transform: translateY(0);
}

/* ===== أنماط عامة ===== */
a {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--secondary-color);
    text-decoration: underline;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

.btn {
    display: inline-block;
    padding: 12px 30px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 50px;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
    font-size: 1rem;
    box-shadow: var(--shadow-sm);
    position: relative;
    overflow: hidden;
}

.btn:hover {
    background: var(--secondary-color);
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
    color: white;
    text-decoration: none;
}

.btn::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255,255,255,0.2);
    transform: translateX(-100%);
    transition: transform 0.4s ease;
}

.btn:hover::after {
    transform: translateX(100%);
}

.btn-secondary {
    background: var(--secondary-color);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
}

.btn-outline:hover {
    background: var(--primary-color);
    color: white;
}

/* ===== أنماط المنتجات ===== */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
    margin-top: 30px;
}

.product-card {
    border-radius: 12px;
    overflow: hidden;
    transition: var(--transition);
    background: white;
    box-shadow: var(--shadow-sm);
    position: relative;
    animation: fadeIn 0.6s ease forwards;
    opacity: 0;
    animation-delay: calc(0.1s * var(--i));
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.product-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
}

.product-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    background: var(--secondary-color);
    color: white;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: bold;
    z-index: 2;
}

.product-image {
    height: 240px;
    overflow: hidden;
    background: var(--light-color);
    position: relative;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.8s ease;
}

.product-card:hover .product-image img {
    transform: scale(1.1);
}

.product-info {
    padding: 20px;
}

.product-title {
    font-size: 1.25rem;
    margin-bottom: 10px;
    font-weight: 700;
    color: var(--dark-color);
}

.product-excerpt {
    color: var(--text-light);
    margin-bottom: 15px;
    font-size: 0.95rem;
}

.product-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.product-price {
    font-weight: 700;
    font-size: 1.2rem;
    color: var(--primary-color);
}

.product-rating {
    color: var(--secondary-color);
}

/* ===== أنماط المقالات التقنية ===== */
.tech-posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 30px;
    margin-top: 30px;
}

.tech-post-card {
    border-radius: 12px;
    overflow: hidden;
    background: white;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    animation: fadeIn 0.6s ease forwards;
    opacity: 0;
    animation-delay: calc(0.1s * var(--i));
}

.tech-post-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
}

.post-thumbnail {
    height: 200px;
    overflow: hidden;
    position: relative;
}

.post-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.8s ease;
}

.tech-post-card:hover .post-thumbnail img {
    transform: scale(1.1);
}

.post-category {
    position: absolute;
    bottom: 15px;
    right: 15px;
    background: var(--primary-color);
    color: white;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.9rem;
}

.post-content {
    padding: 20px;
}

.post-title {
    font-size: 1.3rem;
    margin-bottom: 10px;
    font-weight: 700;
    color: var(--dark-color);
}

.post-excerpt {
    color: var(--text-light);
    margin-bottom: 15px;
    font-size: 0.95rem;
}

.post-meta {
    display: flex;
    justify-content: space-between;
    color: var(--text-light);
    font-size: 0.9rem;
    padding-top: 15px;
    border-top: 1px solid var(--border-color);
}

.post-date, .post-author {
    display: flex;
    align-items: center;
    gap: 5px;
}

/* ===== أنماط الفلاتر ===== */
.filters-section {
    background: var(--light-color);
    padding: 30px;
    border-radius: 12px;
    margin-bottom: 40px;
    box-shadow: var(--shadow-sm);
}

.filters-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.filter-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--dark-color);
}

.filter-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.filter-btn {
    background: white;
    border: 1px solid var(--border-color);
    padding: 10px 20px;
    border-radius: 30px;
    cursor: pointer;
    transition: var(--transition);
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.filter-btn::before {
    content: '';
    width: 16px;
    height: 16px;
    border: 2px solid var(--border-color);
    border-radius: 4px;
    transition: var(--transition);
}

.filter-btn.active::before, .filter-btn:hover::before {
    background: var(--primary-color);
    border-color: var(--primary-color);
}

.filter-btn.active, .filter-btn:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    box-shadow: var(--shadow-sm);
}

/* ===== أنماط متجاوبة ===== */
@media (max-width: 1200px) {
    .container {
        max-width: 100%;
        padding: 0 20px;
    }
}

@media (max-width: 992px) {
    .section {
        padding: 60px 0;
    }
    
    .products-grid,
    .tech-posts-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 20px;
    }
    
    .filter-buttons {
        gap: 8px;
    }
    
    .filter-btn {
        padding: 8px 15px;
        font-size: 0.9rem;
    }
}

@media (max-width: 768px) {
    .section {
        padding: 50px 0;
    }
    
    .section-title {
        font-size: 1.8rem;
        margin-bottom: 40px;
    }
    
    .products-grid,
    .tech-posts-grid {
        grid-template-columns: repeat(auto-fill, minmax(100%, 1fr));
        gap: 25px;
    }
    
    .filter-buttons {
        justify-content: center;
    }
}

@media (max-width: 576px) {
    .section {
        padding: 40px 0;
    }
    
    .section-title {
        font-size: 1.6rem;
        padding-bottom: 15px;
    }
    
    .btn {
        padding: 10px 25px;
        font-size: 0.9rem;
    }
    
    .filter-buttons {
        gap: 6px;
    }
    
    .filter-btn {
        padding: 6px 12px;
        font-size: 0.85rem;
    }
}

/* ===== أنيميشنات إضافية ===== */
@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
    100% { transform: translateY(0px); }
}

.pulse {
    animation: pulse 2s infinite;
}

.float {
    animation: float 3s ease-in-out infinite;
}

/* ===== تأثيرات عند الظهور ===== */
.fade-in {
    animation: fadeIn 0.8s ease forwards;
}

.slide-in-left {
    animation: slideInLeft 0.8s ease forwards;
}

@keyframes slideInLeft {
    from { opacity: 0; transform: translateX(50px); }
    to { opacity: 1; transform: translateX(0); }
}

.slide-in-right {
    animation: slideInRight 0.8s ease forwards;
}

@keyframes slideInRight {
    from { opacity: 0; transform: translateX(-50px); }
    to { opacity: 1; transform: translateX(0); }
}

/* ===== أنماط خاصة للخط السعودي ===== */
.saudi-style {
    position: relative;
    display: inline-block;
}

.saudi-style::after {
    content: '';
    position: absolute;
    bottom: -5px;
    right: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, var(--secondary-color), var(--primary-color));
    border-radius: 2px;
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.4s ease;
}

.saudi-style:hover::after {
    transform: scaleX(1);
    transform-origin: left;
}

/* ===== رتل ===== */
.rtl {
    direction: rtl;
    text-align: right;
}


/* أضف هذا لتحسين أداء الصور */
img {
  max-width: 100%;
  height: auto;
  aspect-ratio: attr(width) / attr(height); /* يحافظ على النسب */
}

/* تحسين الأداء على الأجهزة المحمولة */
@media (max-width: 480px) {
  .product-image, .post-thumbnail {
    height: auto !important;
    max-height: 200px;
  }
}


.product-card {
  transition: transform 0.3s ease;
  -webkit-transition: -webkit-transform 0.3s ease;
  -moz-transition: -moz-transform 0.3s ease;
}

/* إضافة في style.css */
img {
  max-width: 100%;
  height: auto;
  aspect-ratio: attr(width) / attr(height);
}

@media (max-width: 480px) {
  .product-image, .post-thumbnail {
    height: auto !important;
    max-height: 200px;
  }
}


.filter-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.products-count {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    background-color: #f8f9fa;
    padding: 5px 10px;
    border-radius: 4px;
    border: 1px solid #dee2e6;
}





/* --- أنماط الفوتر المتطور --- */

.site-footer {
    background: #2c3e50; /* لون خلفية داكن وجذاب */
    color: #ecf0f1; /* لون النص الفاتح */
    font-family: 'Arial', sans-serif; /* خط عام */
    position: relative;
    overflow: hidden; /* لمنع تجاوز العناصر المتحركة */
}

.site-footer .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* --- موجز الشركة --- */
.footer-summary {
    background: #34495e; /* لون أغمق قليلاً */
    padding: 50px 0;
    text-align: center;
    position: relative;
    z-index: 1; /* للتأكد من أنها فوق أي تأثيرات خلفية */
    border-bottom: 1px solid rgba(255, 255, 255, 0.08); /* خط فاصل خفيف */
}

.footer-summary-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 25px;
}

.footer-logo img {
    max-height: 80px; /* حجم الشعار */
    width: auto;
    filter: drop-shadow(0 0 5px rgba(0,0,0,0.3)); /* ظل خفيف للشعار */
    transition: transform 0.3s ease-in-out;
}
.footer-logo img:hover {
    transform: scale(1.05); /* تكبير الشعار عند التمرير */
}

.site-title-footer {
    font-size: 2.5rem;
    color: #f39c12; /* لون مميز للعنوان */
    margin: 0;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.4);
}

.footer-description {
    font-size: 1.1rem;
    line-height: 1.8;
    max-width: 800px;
    margin: 0 auto;
    color: #bdc3c7;
}

/* --- النشرة البريدية --- */
.footer-newsletter h4 {
    font-size: 1.4rem;
    margin-bottom: 20px;
    color: #f39c12; /* لون مميز */
}

.newsletter-form {
    display: flex;
    justify-content: center;
    gap: 10px;
    max-width: 500px;
    margin: 0 auto;
}

.newsletter-form input[type="email"] {
    flex-grow: 1;
    padding: 15px 20px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    background: rgba(255, 255, 255, 0.1);
    color: #ecf0f1;
    outline: none;
    transition: all 0.3s ease;
}

.newsletter-form input[type="email"]::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.newsletter-form input[type="email"]:focus {
    background: rgba(255, 255, 255, 0.2);
    box-shadow: 0 0 0 2px #f39c12; /* ظل تركيز بلون مميز */
}

.newsletter-form button {
    background: #f39c12; /* زر اشتراك بلون مميز */
    color: #2c3e50;
    border: none;
    padding: 15px 25px;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.newsletter-form button:hover {
    background: #e67e22; /* لون أغمق عند التمرير */
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

/* --- تأثير الزر المتحرك (Animated Button) --- */
.animated-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.2);
    transition: all 0.4s ease-in-out;
    transform: skewX(-20deg);
}
.animated-btn:hover::before {
    left: 100%;
}


/* --- أقسام روابط الفوتر --- */
.footer-links-section {
    padding: 60px 0;
    background: #2c3e50;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
}

.footer-column {
    padding: 20px;
    border-radius: 10px;
    transition: all 0.3s ease;
    position: relative; /* لترتيب الانيميشن */
}

.footer-column:hover {
    background: rgba(255, 255, 255, 0.05); /* خلفية خفيفة عند التمرير */
}

.footer-title {
    font-size: 1.3rem;
    color: #f39c12; /* لون مميز للعناوين */
    margin-bottom: 25px;
    position: relative;
    padding-bottom: 10px;
}

.footer-title::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 50px;
    height: 3px;
    background: #f39c12;
    border-radius: 2px;
}

/* قائمة الروابط */
.footer-menu, .product-categories, .contact-info, .recent-posts {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-menu li, .product-categories li, .contact-info li, .recent-posts li {
    margin-bottom: 12px;
}

.footer-menu a, .product-categories a, .contact-info a {
    color: #bdc3c7;
    text-decoration: none;
    font-size: 1rem;
    transition: color 0.3s ease, transform 0.3s ease;
    display: inline-block; /* للسماح بالتحريك */
}

.footer-menu a:hover, .product-categories a:hover, .contact-info a:hover {
    color: #f39c12;
    transform: translateX(5px); /* تحريك لليمين عند التمرير */
}

.product-categories .count {
    background: rgba(243, 156, 18, 0.2);
    color: #f39c12;
    padding: 2px 8px;
    border-radius: 5px;
    font-size: 0.85rem;
    margin-inline-start: 8px; /* المسافة بين الاسم والعدد */
}

.view-all {
    margin-top: 15px;
    display: inline-block;
    color: #f39c12;
    text-decoration: none;
    font-weight: bold;
    transition: all 0.3s ease;
}
.view-all:hover {
    transform: translateX(5px);
    opacity: 0.8;
}

/* --- أيقونات معلومات الاتصال --- */
.contact-info li {
    display: flex;
    align-items: flex-start; /* لمحاذاة النص متعدد الأسطر */
    gap: 15px; /* مسافة بين الأيقونة والنص */
}

.contact-icon {
    font-size: 1.3rem; /* حجم أيقونات الاتصال */
    color: #f39c12;
    flex-shrink: 0; /* منع الأيقونة من الانكماش */
    margin-top: 2px; /* لتوسيط الأيقونة مع أول سطر من النص */
}

/* --- المقالات الأخيرة --- */
.recent-posts li {
    display: flex;
    align-items: center;
    gap: 15px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}
.recent-posts li:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.recent-posts .post-item-link {
    display: flex; /* لجعل الصورة والمعلومات بجانب بعض */
    align-items: center;
    gap: 15px;
    text-decoration: none;
    color: inherit;
}

.recent-posts img {
    width: 60px; /* حجم الصورة المصغرة للمقال */
    height: 60px;
    object-fit: cover;
    border-radius: 8px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.recent-posts li:hover img {
    transform: scale(1.08); /* تكبير الصورة عند التمرير */
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

.recent-posts .post-info {
    flex-grow: 1;
}

.recent-posts h5 {
    font-size: 1rem;
    margin: 0 0 5px;
    color: #ecf0f1;
    transition: color 0.3s ease;
}

.recent-posts li:hover h5 {
    color: #f39c12;
}

.recent-posts .post-date {
    font-size: 0.85rem;
    color: #bdc3c7;
}

/* --- روابط التواصل الاجتماعي --- */
.social-links {
    margin-top: 25px;
    display: flex;
    gap: 15px;
    justify-content: flex-start; /* محاذاة لليسار */
    flex-wrap: wrap; /* للسماح بالعناصر بالانتقال إلى سطر جديد */
}

.social-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 45px; /* حجم الأيقونة الاجتماعية */
    height: 45px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    color: #ecf0f1;
    font-size: 1.2rem; /* حجم رمز الأيقونة */
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.social-icon:hover {
    transform: translateY(-5px) rotate(5deg); /* تحريك لأعلى ودوران خفيف */
    box-shadow: 0 8px 20px rgba(0,0,0,0.4);
}

/* ألوان مميزة لأيقونات التواصل الاجتماعي */
.social-icon.facebook-icon:hover { background: #3b5998; }
.social-icon.twitter-icon:hover { background: #00acee; }
.social-icon.linkedin-icon:hover { background: #0077b5; }
.social-icon.instagram-icon:hover { background: #C13584; }
.social-icon.youtube-icon:hover { background: #FF0000; }

/* --- خريطة الموقع --- */
.footer-map {
    background: #34495e;
    padding: 40px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.map-container {
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(0,0,0,0.3);
    position: relative;
    padding-bottom: 40%; /* نسبة العرض إلى الارتفاع لجعله متجاوبًا */
    height: 0;
}

.map-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.map-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    width: 100%;
    background: #4a627a;
    color: #ecf0f1;
    font-size: 1.2rem;
    position: absolute;
    top: 0;
    left: 0;
}
.map-placeholder i {
    font-size: 3rem;
    margin-bottom: 15px;
    color: #f39c12;
}


/* --- حقوق النشر --- */
.footer-bottom {
    background: #233140; /* لون أغمق لقسم حقوق النشر */
    padding: 25px 0;
}

.footer-bottom-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap; /* للسماح بالعناصر بالانتقال إلى سطر جديد */
    gap: 15px;
}

.copyright {
    font-size: 0.95rem;
    color: #bdc3c7;
}

.footer-links a {
    color: #bdc3c7;
    text-decoration: none;
    margin-inline-end: 20px;
    font-size: 0.95rem;
}
.footer-links a:last-child {
    margin-inline-end: 0;
}

/* --- تأثير الرابط المتحرك (Animated Link) --- */
.animated-link {
    position: relative;
    padding-bottom: 2px;
}

.animated-link::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 0;
    height: 2px;
    background: #f39c12; /* لون الخط السفلي */
    transition: width 0.3s ease-out;
}

.animated-link:hover::after {
    width: 100%;
}

.payment-methods img {
    height: 28px; /* حجم أيقونات الدفع */
    margin-inline-start: 10px;
    filter: grayscale(80%) brightness(1.2); /* لجعلها تبدو متناسقة مع الثيم */
    transition: filter 0.3s ease, transform 0.3s ease;
}

.payment-methods img:hover {
    filter: grayscale(0%) brightness(1); /* إزالة التظليل عند التمرير */
    transform: translateY(-3px);
}

/* --- زر العودة للأعلى --- */
.back-to-top {
    position: fixed;
    bottom: 90px; /* فوق زر الواتساب */
    right: 30px;
    background: #007cba; /* لون مميز لزر العودة للأعلى */
    color: white;
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    cursor: pointer;
    opacity: 0; /* مخفي في البداية */
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s ease-out;
    z-index: 1000;
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    background: #005a87;
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.4);
}

/* --- أنماط زر واتساب عائم (معدلة) --- */
.whatsapp-float {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 9999; /* تأكد من أنه في المقدمة */
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.4s ease;
    box-shadow: 0 5px 15px rgba(37, 211, 102, 0.4); /* ظل ناعم */
    border-radius: 20px; /* ليتناسق مع شكل الزر */
}

.whatsapp-float.visible {
    opacity: 1;
    transform: translateY(0);
}

/* لا يزال تأثير النبض جيداً */
.whatsapp-float.pulse {
    animation: pulse 2s infinite;
}

.whatsapp-float a {
    display: flex;
    align-items: center;
    text-decoration: none;
    background: #25D366; /* أخضر الواتساب */
    color: white;
    padding: 12px 18px; /* زيادة الحشو قليلاً */
    border-radius: 25px; /* شكل بيضاوي لطيف */
    box-shadow: 0 3px 10px rgba(37, 211, 102, 0.3);
    transition: all 0.3s ease;
}

.whatsapp-float a:hover {
    background: #128C7E; /* لون أغمق عند التمرير */
    transform: translateY(-5px) scale(1.02); /* تحريك لأعلى وتكبير طفيف */
    box-shadow: 0 8px 25px rgba(37, 211, 102, 0.6);
}

.whatsapp-icon {
    background: white;
    width: 38px; /* حجم الأيقونة أكبر قليلاً */
    height: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-inline-end: 10px; /* مسافة أفضل بين الأيقونة والنص */
    box-shadow: inset 0 0 5px rgba(0,0,0,0.2); /* ظل داخلي خفيف */
}

.whatsapp-icon svg {
    width: 28px; /* حجم رمز SVG */
    height: 28px;
    color: #25D366; /* لون أيقونة الواتساب */
}

.whatsapp-text {
    font-weight: 600; /* جعل النص أكثر سمكاً */
    font-size: 17px; /* حجم خط أكبر قليلاً */
    white-space: nowrap; /* منع النص من الالتفاف */
}

.whatsapp-notification {
    position: absolute;
    top: -5px; /* تعديل الموضع */
    right: -5px; /* تعديل الموضع */
    background: #ff4d4d; /* أحمر الإشعارات */
    color: white;
    border: 2px solid #25D366; /* حدود بلون الواتساب */
    border-radius: 50%;
    width: 28px; /* حجم أكبر قليلاً */
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: bold;
    animation: bounce 1.5s infinite;
}

/* --- إطار الأنيميشن (لن يتم تغييرها، تبدو جيدة) --- */
@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.7); }
    70% { box-shadow: 0 0 0 15px rgba(37, 211, 102, 0); }
    100% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0); }
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-10px); }
    60% { transform: translateY(-5px); }
}

/* --- أنيميشن الظهور المتدرج (Fade In Up) --- */
.fade-in-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.fade-in-up.show {
    opacity: 1;
    transform: translateY(0);
}

/* تأخير الظهور للعناصر المتعددة في الشبكة */
.fade-in-up.delay-1 { transition-delay: 0.1s; }
.fade-in-up.delay-2 { transition-delay: 0.2s; }
.fade-in-up.delay-3 { transition-delay: 0.3s; }
.fade-in-up.delay-4 { transition-delay: 0.4s; }
/* يمكنك إضافة المزيد من التأخير إذا كان لديك أعمدة إضافية */


/* --- المتجاوب (Responsive) --- */
@media (max-width: 992px) {
    .footer-grid {
        grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    }
}

@media (max-width: 768px) {
    .footer-summary {
        padding: 40px 0;
    }
    .footer-summary-inner {
        gap: 20px;
    }
    .site-title-footer {
        font-size: 2rem;
    }
    .footer-description {
        font-size: 1rem;
    }
    .newsletter-form {
        flex-direction: column;
        align-items: center;
    }
    .newsletter-form input[type="email"],
    .newsletter-form button {
        width: 100%;
        max-width: 300px;
    }

    .footer-links-section {
        padding: 40px 0;
    }
    .footer-grid {
        grid-template-columns: 1fr; /* عمود واحد على الأجهزة الصغيرة */
        gap: 30px;
    }
    .footer-column {
        text-align: center;
    }
    .footer-title::after {
        left: 50%;
        transform: translateX(-50%); /* توسيط الخط السفلي */
    }
    .social-links {
        justify-content: center; /* توسيط أيقونات التواصل الاجتماعي */
    }
    .recent-posts li {
        justify-content: center;
        flex-direction: column; /* جعل الصور والمعلومات فوق بعض */
        text-align: center;
    }
    .recent-posts img {
        margin-bottom: 10px;
    }

    .footer-bottom-inner {
        flex-direction: column;
        text-align: center;
        gap: 20px;
    }
    .footer-links {
        display: flex;
        flex-direction: column;
        gap: 10px;
        margin-inline-end: 0;
    }
    .footer-links a {
        margin-inline-end: 0;
    }
    .payment-methods {
        justify-content: center;
    }

    .back-to-top, .whatsapp-float {
        bottom: 20px;
        right: 20px;
    }
    .back-to-top {
        bottom: 80px; /* فوق زر الواتساب قليلا */
    }
    .whatsapp-text {
        display: none; /* إخفاء النص على الجوال كما كان من قبل */
    }
    .whatsapp-icon {
        margin-inline-end: 0; /* لا مسافة إذا كان النص غير موجود */
    }
    .whatsapp-float a {
        padding: 10px 15px; /* حشو أصغر قليلا */
    }
    .whatsapp-icon {
        width: 35px;
        height: 35px;
    }
    .whatsapp-icon svg {
        width: 25px;
        height: 25px;
    }
    .whatsapp-notification {
        width: 24px;
        height: 24px;
        font-size: 11px;
    }
}

@media (max-width: 480px) {
    .site-title-footer {
        font-size: 1.8rem;
    }
    .footer-summary, .footer-links-section, .footer-map, .footer-bottom {
        padding-left: 10px;
        padding-right: 10px;
    }
}



/* ====== General Body & Container ====== */
body {
    font-family: 'Arial', sans-serif; /* استخدم خطًا أفضل إذا كان متاحًا */
    margin: 0;
    padding: 0;
    line-height: 1.6;
    color: #333;
    background-color: #f8f8f8;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
    box-sizing: border-box;
}

/* ====== Top Bar ====== */
.top-bar {
    background-color: #2c3e50; /* لون داكن شيك */
    color: #ecf0f1; /* لون فاتح للنص */
    padding: 8px 0;
    font-size: 0.9em;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.top-bar-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap; /* للسماح بالتجاوب على الشاشات الصغيرة */
}

.top-bar-left, .top-bar-right {
    display: flex;
    align-items: center;
}

.top-bar-contact-item {
    color: #ecf0f1;
    text-decoration: none;
    margin-left: 20px;
    transition: color 0.3s ease;
}
.top-bar-contact-item:hover {
    color: #3498db; /* لون مميز عند التحويم */
}
.top-bar-contact-item i {
    margin-left: 8px;
    font-size: 1.1em;
}

/* Social Links */
.social-links a {
    color: #ecf0f1;
    margin-left: 15px;
    font-size: 1.2em;
    transition: transform 0.3s ease, color 0.3s ease;
    display: inline-block;
}
.social-links a:hover {
    transform: translateY(-3px) scale(1.1); /* تأثير خفيف عند التحويم */
    color: #3498db;
}

/* ====== Main Header ====== */
.main-header {
    background-color: #ffffff;
    padding: 15px 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: all 0.3s ease-in-out;
}

/* تأثير Sticky Header عند السكرول */
body.scrolled .main-header {
    padding: 10px 0;
    background-color: rgba(255, 255, 255, 0.95); /* شفافية خفيفة */
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

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

/* Logo Area */
.logo-area {
    display: flex;
    align-items: center;
}
.custom-logo-link {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: inherit;
    flex-direction: column;

}
.custom-logo {
    max-width: 180px; /* يمكن تعديلها */
    height: auto;
    transition: transform 0.3s ease;
}
.custom-logo-link:hover .custom-logo {
    transform: scale(1.05); /* تكبير الشعار عند التحويم */
}
.logo-meta {
    margin-right: 15px;
    font-size: 0.85em;
    color: #666;
    white-space: nowrap; /* يمنع التفاف النص */
    opacity: 0.8;
}

/* Main Navigation */
.main-navigation .primary-menu {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
}
.main-navigation .primary-menu li {
    position: relative;
    margin-left: 25px;
}
.main-navigation .primary-menu li a {
    display: block;
    padding: 10px 0;
    text-decoration: none;
    color: #333;
    font-weight: 600;
    font-size: 1.05em;
    transition: color 0.3s ease, transform 0.3s ease;
    position: relative;
}
.main-navigation .primary-menu li a:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0%;
    height: 2px;
    background-color: #3498db;
    transition: width 0.3s ease, left 0.3s ease;
}
.main-navigation .primary-menu li a:hover {
    color: #3498db;
    transform: translateY(-2px);
}
.main-navigation .primary-menu li a:hover:after {
    width: 100%;
    left: 0;
}

/* Sub-menu styling (assuming Sawiat_Walker_Nav_Menu handles structure) */
.main-navigation .primary-menu ul { /* for sub-menus */
    list-style: none;
    margin: 0;
    padding: 0;
    background-color: #fff;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    position: absolute;
    top: 100%;
    right: 0;
    min-width: 200px;
    display: none;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.3s ease, transform 0.3s ease;
    z-index: 999;
    border-top: 3px solid #3498db;
}
.main-navigation .primary-menu li:hover > ul {
    display: block;
    opacity: 1;
    transform: translateY(0);
}
.main-navigation .primary-menu ul li {
    margin: 0;
    border-bottom: 1px solid #eee;
}
.main-navigation .primary-menu ul li:last-child {
    border-bottom: none;
}
.main-navigation .primary-menu ul li a {
    padding: 12px 15px;
    font-size: 0.95em;
    color: #555;
    white-space: nowrap;
}
.main-navigation .primary-menu ul li a:hover {
    background-color: #f5f5f5;
    color: #3498db;
    transform: none; /* إلغاء تحريك الروابط الفرعية */
}

/* Header Tools */
.header-tools {
    display: flex;
    align-items: center;
    margin-right: 20px; /* مسافة عن القائمة */
}

.tool-item {
    font-size: 1.3em;
    color: #555;
    cursor: pointer;
    margin-left: 20px;
    transition: color 0.3s ease, transform 0.3s ease;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px; /* لضمان حجم منطقة النقر */
    height: 40px;
    border-radius: 50%; /* لجعلها دائرية */
}
.tool-item:hover {
    color: #3498db;
    transform: scale(1.1);
}

.cart-count {
    background-color: #e74c3c; /* لون مميز للسلة */
    color: #fff;
    font-size: 0.7em;
    position: absolute;
    top: -5px;
    right: -5px;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    animation: pulse 1.5s infinite; /* تأثير نبض على عدد السلة */
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none; /* مخفي افتراضيا، يظهر في الشاشات الصغيرة */
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 25px;
    cursor: pointer;
    padding: 5px;
}
.mobile-menu-toggle span {
    display: block;
    width: 100%;
    height: 3px;
    background-color: #555;
    border-radius: 2px;
    transition: all 0.3s ease;
}

/* Animation for toggle icon */
.mobile-menu-toggle.is-active span:nth-child(1) {
    transform: translateY(11px) rotate(45deg);
}
.mobile-menu-toggle.is-active span:nth-child(2) {
    opacity: 0;
}
.mobile-menu-toggle.is-active span:nth-child(3) {
    transform: translateY(-11px) rotate(-45deg);
}

/* ====== Search Overlay ====== */
.search-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1001;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}
.search-overlay.is-active {
    opacity: 1;
    visibility: visible;
}

.search-form-wrapper {
    background-color: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
    width: 90%;
    max-width: 600px;
    transform: translateY(-20px);
    transition: transform 0.3s ease;
}
.search-overlay.is-active .search-form-wrapper {
    transform: translateY(0);
}

.search-form {
    display: flex;
    border: 2px solid #3498db;
    border-radius: 5px;
    overflow: hidden;
}
.search-field {
    flex-grow: 1;
    border: none;
    padding: 12px 15px;
    font-size: 1.1em;
    outline: none;
}
.search-submit {
    background-color: #3498db;
    color: #fff;
    border: none;
    padding: 12px 20px;
    cursor: pointer;
    font-size: 1.1em;
    transition: background-color 0.3s ease;
}
.search-submit:hover {
    background-color: #2980b9;
}

.search-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    color: #fff;
    font-size: 2em;
    cursor: pointer;
    transition: transform 0.3s ease;
}
.search-close:hover {
    transform: rotate(90deg);
}

.search-suggestions {
    margin-top: 15px;
    color: #666;
    font-size: 0.9em;
}
.suggestions-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
}
.suggestions-list span {
    background-color: #eee;
    padding: 5px 10px;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}
.suggestions-list span:hover {
    background-color: #ddd;
}

/* ====== Mobile Menu ====== */
.mobile-menu {
    position: fixed;
    top: 0;
    right: -300px; /* مخفي في البداية */
    width: 280px;
    height: 100%;
    background-color: #fff;
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
    z-index: 1002;
    display: flex;
    flex-direction: column;
    transition: right 0.3s ease-out;
    overflow-y: auto; /* للسماح بالتمرير إذا كانت القائمة طويلة */
}
.mobile-menu.is-active {
    right: 0; /* يظهر عند التفعيل */
}

.mobile-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    border-bottom: 1px solid #eee;
}
.mobile-logo .custom-logo {
    max-width: 150px;
    height: auto;
}
.mobile-logo .site-title a {
    font-size: 1.5em;
    color: #333;
    text-decoration: none;
}

.mobile-menu-close {
    background: none;
    border: none;
    font-size: 1.8em;
    color: #555;
    cursor: pointer;
    transition: transform 0.3s ease;
}
.mobile-menu-close:hover {
    transform: rotate(90deg);
    color: #e74c3c;
}

.mobile-menu-body {
    flex-grow: 1;
    padding: 20px;
}
.mobile-nav {
    list-style: none;
    margin: 0;
    padding: 0;
}
.mobile-nav li {
    margin-bottom: 10px;
    border-bottom: 1px solid #f0f0f0;
    padding-bottom: 10px;
}
.mobile-nav li:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}
.mobile-nav li a {
    display: block;
    padding: 10px 0;
    text-decoration: none;
    color: #444;
    font-size: 1.1em;
    font-weight: 500;
    transition: color 0.3s ease, padding-right 0.3s ease;
}
.mobile-nav li a:hover {
    color: #3498db;
    padding-right: 5px;
}

.mobile-contact {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}
.mobile-contact a {
    display: block;
    color: #555;
    text-decoration: none;
    margin-bottom: 10px;
    font-size: 0.95em;
    transition: color 0.3s ease;
}
.mobile-contact a:hover {
    color: #3498db;
}
.mobile-contact i {
    margin-left: 8px;
    color: #777;
}

.mobile-social-links {
    margin-top: 20px;
    text-align: center;
    padding-top: 15px;
    border-top: 1px solid #eee;
}
.mobile-social-links a {
    color: #555;
    font-size: 1.4em;
    margin: 0 10px;
}
.mobile-social-links a:hover {
    color: #3498db;
}

/* ====== Secondary Navigation Bar ====== */
.secondary-nav {
    background-color: #f1f1f1;
    padding: 10px 0;
    border-bottom: 1px solid #ddd;
    box-shadow: inset 0 -1px 5px rgba(0, 0, 0, 0.05);
}
.secondary-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
    gap: 30px; /* مسافة بين العناصر */
    flex-wrap: wrap;
}
.secondary-nav li a {
    text-decoration: none;
    color: #555;
    font-weight: 500;
    display: flex;
    align-items: center;
    padding: 8px 15px;
    border-radius: 5px;
    transition: background-color 0.3s ease, color 0.3s ease, transform 0.3s ease;
}
.secondary-nav li a i {
    margin-left: 10px;
    font-size: 1.1em;
    color: #777;
    transition: color 0.3s ease;
}
.secondary-nav li a:hover {
    background-color: #e0e0e0;
    color: #3498db;
    transform: translateY(-2px);
}
.secondary-nav li a:hover i {
    color: #3498db;
}

/* ====== Responsive Adjustments ====== */
@media (max-width: 992px) {
    .main-navigation {
        display: none; /* إخفاء القائمة الرئيسية في الشاشات الصغيرة */
    }
    .header-tools {
        margin-right: 0;
    }
    .mobile-menu-toggle {
        display: flex; /* إظهار زر القائمة المتنقلة */
    }
    .top-bar-content {
        flex-direction: column;
        align-items: flex-start;
    }
    .top-bar-left, .top-bar-right {
        width: 100%;
        justify-content: center;
        margin-bottom: 5px;
    }
    .top-bar-left .top-bar-contact-item {
        margin-left: 10px;
        margin-right: 10px;
    }
    .top-bar-right .social-links a {
        margin: 0 8px;
    }
    .secondary-nav ul {
        flex-direction: column;
        gap: 10px;
        align-items: center;
    }
}

@media (max-width: 768px) {
    .logo-area {
        flex-grow: 1; /* للسماح للشعار بأخذ مساحة أكبر */
        justify-content: center;
    }
    .logo-meta {
        display: none; /* إخفاء الوصف الإضافي للشعار على شاشات صغيرة جداً */
    }
    .header-inner {
        justify-content: center;
        flex-direction: row;
    }
    .search-toggle, .cart-toggle {
        font-size: 1.1em; /* تصغير أيقونات الأدوات */
        width: 35px;
        height: 35px;
    }
}

@media (max-width: 576px) {
    .container {
        padding: 0 10px;
    }
    .search-form-wrapper {
        padding: 20px;
    }
    .search-field {
        font-size: 1em;
        padding: 10px;
    }
    .search-submit {
        padding: 10px 15px;
    }
    .search-close {
        font-size: 1.5em;
        top: 10px;
        right: 10px;
    }
    .mobile-menu {
        width: 100%; /* القائمة المتنقلة تأخذ عرض كامل على الجوالات الصغيرة جداً */
        right: -100%;
    }
    .mobile-menu.is-active {
        right: 0;
    }
}


/* Accessibility - Screen Reader Text */
.screen-reader-text {
    clip: rect(1px, 1px, 1px, 1px);
    position: absolute !important;
    height: 1px;
    width: 1px;
    overflow: hidden;
    word-wrap: normal !important;
}



/* ===== تحسينات التصميم المتجاوب ===== */
@media (max-width: 768px) {
    .container {
        padding: 0 10px;
    }
    
    .main-header .container {
        flex-direction: column;
        gap: 15px;
    }
    
    .top-bar .container {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
    
    .contact-info span {
        margin: 0 10px;
        display: block;
        margin-bottom: 5px;
    }
    
    /* إصلاح القوائم للجوال */
    .main-nav {
        width: 100%;
        order: 3;
    }
    
    .main-nav ul {
        flex-direction: column;
        background: white;
        box-shadow: 0 2px 10px rgba(0,0,0,0.1);
        border-radius: 8px;
        padding: 10px 0;
    }
    
    .main-nav li {
        width: 100%;
        text-align: center;
        border-bottom: 1px solid var(--border);
    }
    
    .main-nav li:last-child {
        border-bottom: none;
    }
    
    .main-nav a {
        display: block;
        padding: 12px 20px;
        width: 100%;
    }
    
    /* إصلاح الصفحة الرئيسية للجوال */
    .hero-section {
        padding: 40px 0;
        text-align: center;
    }
    
    .hero-title {
        font-size: 28px !important;
        line-height: 1.3;
        margin-bottom: 15px;
    }
    
    .hero-description {
        font-size: 16px;
        margin-bottom: 25px;
    }
    
    .hero-buttons {
        margin-top: 20px;
    }
    
    .hero-buttons .btn {
        display: block;
        width: 100%;
        max-width: 250px;
        margin: 0 auto 10px;
        padding: 12px 20px;
        font-size: 16px;
    }
    
    /* إصلاح شبكة المنتجات */
    .products-grid {
        grid-template-columns: 1fr !important;
        gap: 20px;
    }
    
    .product-card {
        max-width: 100%;
        margin: 0 auto;
    }
    
    /* إصلاح شبكة المدونة */
    .blog-grid {
        grid-template-columns: 1fr !important;
        gap: 20px;
    }
    
    /* إصلاح الفوتر */
    .footer-content {
        grid-template-columns: 1fr !important;
        gap: 30px;
        text-align: center;
    }
    
    .footer-widget {
        margin-bottom: 20px;
    }
    
    /* إصلاح الشريط الجانبي */
    .sidebar {
        margin-top: 40px;
    }
    
    .widget {
        margin-bottom: 30px;
    }
    
    /* إصلاح نموذج الاتصال */
    .contact-content {
        grid-template-columns: 1fr !important;
        gap: 30px;
    }
    
    .contact-form {
        order: 1;
    }
    
    .contact-info {
        order: 2;
        text-align: center;
    }
}

/* ===== إصلاح الصور ===== */
img {
    max-width: 100%;
    height: auto;
    display: block;
}

.product-image img,
.blog-image img,
.post-thumbnail img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    border-radius: 8px;
    transition: transform 0.3s ease;
}

.product-image:hover img,
.blog-image:hover img,
.post-thumbnail:hover img {
    transform: scale(1.05);
}

/* إصلاح الصور في المحتوى */
.entry-content img,
.post-content img,
.page-content img {
    max-width: 100%;
    height: auto;
    margin: 15px 0;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

/* إصلاح صور الجاليري */
.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin: 20px 0;
}

.gallery-item img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 8px;
}

/* إصلاح الصور المميزة */
.featured-image {
    width: 100%;
    max-height: 400px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 20px;
}

/* ===== تحسينات إضافية للجوال ===== */
@media (max-width: 480px) {
    .hero-title {
        font-size: 24px !important;
    }
    
    .section-title {
        font-size: 24px;
        margin-bottom: 20px;
    }
    
    .btn {
        padding: 10px 15px;
        font-size: 14px;
    }
    
    .product-card,
    .blog-card {
        padding: 15px;
    }
    
    .contact-item {
        flex-direction: column;
        text-align: center;
        gap: 5px;
    }
    
    .contact-item i {
        margin-bottom: 5px;
    }
}

/* ===== تحسينات الأداء ===== */
.lazy-load {
    opacity: 0;
    transition: opacity 0.3s;
}

.lazy-load.loaded {
    opacity: 1;
}

/* ===== تحسينات إمكانية الوصول ===== */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ===== تحسينات التفاعل ===== */
.btn,
.product-card,
.blog-card,
.widget {
    transition: all 0.3s ease;
}

.product-card:hover,
.blog-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.15);
}

/* ===== إصلاح التخطيط العام ===== */
.main-content {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 40px;
    margin: 40px 0;
}

@media (max-width: 768px) {
    .main-content {
        grid-template-columns: 1fr;
        gap: 20px;
        margin: 20px 0;
    }
}

/* ===== تحسينات النصوص ===== */
h1, h2, h3, h4, h5, h6 {
    line-height: 1.3;
    margin-bottom: 15px;
    color: var(--dark);
}

p {
    margin-bottom: 15px;
    line-height: 1.7;
}

/* ===== تحسينات الجداول ===== */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    overflow-x: auto;
    display: block;
    white-space: nowrap;
}

@media (max-width: 768px) {
    table {
        font-size: 14px;
    }
}

th, td {
    padding: 12px;
    text-align: right;
    border-bottom: 1px solid var(--border);
}

th {
    background-color: var(--light);
    font-weight: 600;
}


/* ===== أنماط الويدجات المتقدمة ===== */

/* ودجت المقالات المتقدم */
.advanced-posts-widget {
    margin-bottom: 30px;
}

.advanced-posts-widget.layout-list .advanced-post-item {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    padding: 15px;
    border: 1px solid var(--border);
    border-radius: 8px;
    transition: all 0.3s ease;
}

.advanced-posts-widget.layout-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.advanced-posts-widget.layout-card .advanced-post-item {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.advanced-posts-widget.layout-minimal .advanced-post-item {
    border-bottom: 1px solid var(--border);
    padding: 15px 0;
}

.advanced-post-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.15);
}

.advanced-post-item .post-image {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
}

.advanced-posts-widget.layout-list .post-image {
    width: 120px;
    height: 120px;
    flex-shrink: 0;
}

.advanced-posts-widget.layout-card .post-image {
    height: 200px;
}

.post-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

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

.post-category {
    position: absolute;
    top: 10px;
    right: 10px;
    background: var(--primary);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
}

.post-content {
    flex: 1;
    padding: 15px;
}

.post-title {
    margin-bottom: 10px;
    font-size: 16px;
    line-height: 1.4;
}

.post-title a {
    color: var(--dark);
    text-decoration: none;
}

.post-title a:hover {
    color: var(--primary);
}

.post-meta {
    display: flex;
    gap: 15px;
    margin-bottom: 10px;
    font-size: 12px;
    color: var(--gray);
}

.post-meta span {
    display: flex;
    align-items: center;
    gap: 5px;
}

.post-excerpt {
    color: var(--gray);
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 15px;
}

.read-more-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: var(--primary);
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s ease;
}

.read-more-btn:hover {
    color: var(--secondary);
    transform: translateX(-3px);
}

/* أنظمة الألوان للمقالات */
.advanced-posts-widget.color-blue {
    --widget-primary: #007bff;
    --widget-secondary: #0056b3;
}

.advanced-posts-widget.color-green {
    --widget-primary: #28a745;
    --widget-secondary: #1e7e34;
}

.advanced-posts-widget.color-orange {
    --widget-primary: #fd7e14;
    --widget-secondary: #e55a00;
}

.advanced-posts-widget.color-purple {
    --widget-primary: #6f42c1;
    --widget-secondary: #5a2d91;
}

.advanced-posts-widget.color-dark {
    --widget-primary: #343a40;
    --widget-secondary: #212529;
}

.advanced-posts-widget[class*="color-"] .post-category,
.advanced-posts-widget[class*="color-"] .read-more-btn {
    color: var(--widget-primary);
}

.advanced-posts-widget[class*="color-"] .post-category {
    background: var(--widget-primary);
    color: white;
}

/* ودجت المنتجات المتقدم */
.advanced-products-widget {
    margin-bottom: 30px;
}

.advanced-products-widget.layout-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.advanced-products-widget.layout-list .advanced-product-item {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    padding: 15px;
    border: 1px solid var(--border);
    border-radius: 8px;
}

.advanced-products-widget.layout-card .advanced-product-item {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.advanced-products-widget.layout-slider {
    overflow-x: auto;
    display: flex;
    gap: 20px;
    padding-bottom: 10px;
}

.advanced-products-widget.layout-slider .advanced-product-item {
    min-width: 250px;
    flex-shrink: 0;
}

.advanced-product-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.15);
}

.advanced-product-item .product-image {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
}

.advanced-products-widget.layout-list .product-image {
    width: 120px;
    height: 120px;
    flex-shrink: 0;
}

.advanced-products-widget.layout-card .product-image,
.advanced-products-widget.layout-grid .product-image {
    height: 180px;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

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

.availability-badge {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
}

.availability-badge.available {
    background: var(--success);
    color: white;
}

.availability-badge.unavailable {
    background: var(--danger);
    color: white;
}

.product-content {
    flex: 1;
    padding: 15px;
}

.product-title {
    margin-bottom: 8px;
    font-size: 16px;
    line-height: 1.4;
}

.product-title a {
    color: var(--dark);
    text-decoration: none;
}

.product-title a:hover {
    color: var(--primary);
}

.product-code {
    color: var(--gray);
    font-size: 12px;
    margin-bottom: 8px;
}

.product-category {
    display: flex;
    align-items: center;
    gap: 5px;
    color: var(--gray);
    font-size: 12px;
    margin-bottom: 10px;
}

.product-excerpt {
    color: var(--gray);
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 15px;
}

.view-product-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: var(--primary);
    color: white;
    padding: 8px 15px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.3s ease;
}

.view-product-btn:hover {
    background: var(--secondary);
    transform: translateY(-2px);
}

/* ودجت الإحصائيات */
.statistics-widget {
    margin-bottom: 30px;
}

.statistics-widget.layout-vertical {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.statistics-widget.layout-horizontal {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.statistics-widget.layout-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 20px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.stat-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
}

.stat-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: white;
    background: var(--primary);
}

.stat-content {
    flex: 1;
}

.stat-number {
    font-size: 24px;
    font-weight: 700;
    color: var(--dark);
    line-height: 1;
}

.stat-label {
    color: var(--gray);
    font-size: 14px;
    margin-top: 5px;
}

/* أنظمة الألوان للإحصائيات */
.statistics-widget.color-colorful .stat-item:nth-child(1) .stat-icon {
    background: #007bff;
}

.statistics-widget.color-colorful .stat-item:nth-child(2) .stat-icon {
    background: #28a745;
}

.statistics-widget.color-colorful .stat-item:nth-child(3) .stat-icon {
    background: #fd7e14;
}

.statistics-widget.color-colorful .stat-item:nth-child(4) .stat-icon {
    background: #6f42c1;
}

.statistics-widget.color-minimal .stat-item {
    background: var(--light);
    border: 1px solid var(--border);
}

.statistics-widget.color-minimal .stat-icon {
    background: var(--gray);
}

.statistics-widget.color-dark .stat-item {
    background: var(--dark);
    color: white;
}

.statistics-widget.color-dark .stat-number {
    color: white;
}

.statistics-widget.color-dark .stat-label {
    color: #adb5bd;
}

/* تأثيرات الحركة */
.animation-fade .advanced-post-item,
.animation-fade .advanced-product-item,
.animation-fade .stat-item {
    opacity: 0;
    animation: fadeIn 0.6s ease forwards;
}

.animation-slide .advanced-post-item,
.animation-slide .advanced-product-item,
.animation-slide .stat-item {
    transform: translateX(30px);
    opacity: 0;
    animation: slideIn 0.6s ease forwards;
}

.animation-zoom .advanced-post-item,
.animation-zoom .advanced-product-item,
.animation-zoom .stat-item {
    transform: scale(0.8);
    opacity: 0;
    animation: zoomIn 0.6s ease forwards;
}

.animation-bounce .advanced-post-item,
.animation-bounce .advanced-product-item,
.animation-bounce .stat-item {
    animation: bounceIn 0.8s ease forwards;
}

.animation-flip .advanced-product-item {
    animation: flipIn 0.8s ease forwards;
}

@keyframes fadeIn {
    to {
        opacity: 1;
    }
}

@keyframes slideIn {
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes zoomIn {
    to {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes bounceIn {
    0% {
        transform: scale(0.3);
        opacity: 0;
    }
    50% {
        transform: scale(1.05);
    }
    70% {
        transform: scale(0.9);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes flipIn {
    0% {
        transform: perspective(400px) rotateY(90deg);
        opacity: 0;
    }
    40% {
        transform: perspective(400px) rotateY(-10deg);
    }
    70% {
        transform: perspective(400px) rotateY(10deg);
    }
    100% {
        transform: perspective(400px) rotateY(0deg);
        opacity: 1;
    }
}

/* تأخير الحركة للعناصر المتعددة */
.advanced-post-item:nth-child(1),
.advanced-product-item:nth-child(1),
.stat-item:nth-child(1) {
    animation-delay: 0.1s;
}

.advanced-post-item:nth-child(2),
.advanced-product-item:nth-child(2),
.stat-item:nth-child(2) {
    animation-delay: 0.2s;
}

.advanced-post-item:nth-child(3),
.advanced-product-item:nth-child(3),
.stat-item:nth-child(3) {
    animation-delay: 0.3s;
}

.advanced-post-item:nth-child(4),
.advanced-product-item:nth-child(4),
.stat-item:nth-child(4) {
    animation-delay: 0.4s;
}

/* تحسينات للجوال */
@media (max-width: 768px) {
    .advanced-posts-widget.layout-grid,
    .advanced-products-widget.layout-grid {
        grid-template-columns: 1fr;
    }
    
    .advanced-posts-widget.layout-list .advanced-post-item,
    .advanced-products-widget.layout-list .advanced-product-item {
        flex-direction: column;
    }
    
    .advanced-posts-widget.layout-list .post-image,
    .advanced-products-widget.layout-list .product-image {
        width: 100%;
        height: 200px;
    }
    
    .statistics-widget.layout-horizontal {
        flex-direction: column;
    }
    
    .statistics-widget.layout-grid {
        grid-template-columns: 1fr;
    }
    
    .advanced-products-widget.layout-slider {
        gap: 15px;
    }
    
    .advanced-products-widget.layout-slider .advanced-product-item {
        min-width: 200px;
    }
}



/* في ملف admin.css أو عبر wp_add_inline_style */
.wrap {
    background: white;
    padding: 20px;
    border-radius: 5px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.wp-list-table th {
    background: #f1f1f1;
}

.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
}

.modal-content {
    background: white;
    margin: 10% auto;
    padding: 20px;
    width: 50%;
    border-radius: 5px;
}









/* --- أنماط لم تتغير --- */
.product-category-page { padding: 20px 0 60px; background: #f8f9fa; }
.breadcrumbs { background: white; padding: 15px 0; margin-bottom: 30px; border-radius: 10px; box-shadow: 0 2px 10px rgba(0,0,0,0.1); }
.breadcrumb-container { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; font-size: 14px; }
.breadcrumb-item { color: #007cba; text-decoration: none; padding: 5px 10px; border-radius: 5px; transition: all 0.3s ease; }
.breadcrumb-item:hover { background: #f0f8ff; color: #005a87; }
.breadcrumbs .separator { color: #dee2e6; font-size: 12px; }
.breadcrumbs .current { color: #2c3e50; font-weight: 600; }
.category-header { background: white; padding: 40px; border-radius: 15px; box-shadow: 0 5px 20px rgba(0,0,0,0.1); margin-bottom: 30px; display: flex; justify-content: space-between; align-items: flex-start; gap: 30px; }
.category-info { flex: 1; }
.category-title { font-size: 2.2rem; color: #2c3e50; margin: 0 0 15px; display: flex; align-items: center; gap: 15px; }
.category-title i { color: #007cba; }
.category-description { color: #495057; line-height: 1.6; margin-bottom: 20px; }
.category-meta { display: flex; gap: 25px; flex-wrap: wrap; }
.meta-item { display: flex; align-items: center; gap: 8px; color: #7f8c8d; font-size: 14px; }
.meta-item i { color: #007cba; }
.category-switcher { position: relative; margin-bottom:30px; }
.category-switch-btn { background: linear-gradient(135deg, #007cba, #00a0d2); color: white; border: none; padding: 15px 25px; border-radius: 10px; font-size: 1rem; font-weight: 600; cursor: pointer; display: flex; align-items: center; gap: 10px; transition: all 0.3s ease; min-width: 200px; justify-content: space-between; }
.category-switch-btn:hover { background: linear-gradient(135deg, #005a87, #007cba); transform: translateY(-2px); }
.dropdown-arrow { transition: transform 0.3s ease; }
.category-switch-btn.active .dropdown-arrow { transform: rotate(180deg); }
.category-dropdown { position: absolute; top: 100%; right: 0; background: white; border-radius: 10px; box-shadow: 0 10px 30px rgba(0,0,0,0.2); min-width: 300px; max-height: 400px; overflow-y: auto; z-index: 1000; opacity: 0; visibility: hidden; transform: translateY(-10px); transition: all 0.3s ease; }
.category-dropdown.show { opacity: 1; visibility: visible; transform: translateY(0); }
.dropdown-header { padding: 20px; border-bottom: 1px solid #f8f9fa; }
.dropdown-header h4 { margin: 0; color: #2c3e50; font-size: 1.1rem; }
.categories-list { padding: 10px 0; }
.category-option { display: flex; align-items: center; gap: 15px; padding: 15px 20px; color: #2c3e50; text-decoration: none; transition: all 0.3s ease; border-bottom: 1px solid #f8f9fa; }
.category-option:hover { background: #f8f9fa; color: #007cba; }
.category-option:last-child { border-bottom: none; }
.category-option.all-products { background: #f8f9fa; font-weight: 600; }
.category-icon { width: 40px; height: 40px; background: #f8f9fa; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: #007cba; }
.category-details { flex: 1; }
.category-name { display: block; font-weight: 600; margin-bottom: 4px; }
.category-count { font-size: 12px; color: #7f8c8d; }
.products-controls { background: white; padding: 20px; border-radius: 10px; box-shadow: 0 2px 10px rgba(0,0,0,0.1); margin-bottom: 30px; display: flex; justify-content: space-between; align-items: center; gap: 20px; }
.view-options { display: flex; gap: 5px; border: 2px solid #e9ecef; border-radius: 8px; overflow: hidden; }
.view-btn { width: 40px; height: 40px; border: none; background: #f8f9fa; color: #7f8c8d; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: all 0.3s ease; }
.view-btn:hover, .view-btn.active { background: #007cba; color: white; }
.sort-options select { padding: 10px 15px; border: 2px solid #e9ecef; border-radius: 8px; background: white; color: #2c3e50; font-size: 14px; cursor: pointer; min-width: 200px; }
.sort-options select:focus { outline: none; border-color: #007cba; }
.products-container { background: white; padding: 30px; border-radius: 15px; box-shadow: 0 5px 20px rgba(0,0,0,0.1); margin-bottom: 40px; }

/* === الأنماط المعدلة والمضافة === */

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

/* بطاقة المنتج - النمط الأساسي */
.product-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    transition: all 0.3s ease;
    position: relative;
    border: 1px solid #e9ecef;
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 124, 186, 0.15);
}

/* رأس المنتج والعنوان */
.product-header {
    background-color: #007cba;
    padding: 12px 15px;
    order: 1; 
}

.product-title a {
    color: white;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
    text-align: center;
    display: block;
}

/* حاوية الصورة */
.product-image-container {
    position: relative;
    overflow: hidden;
    order: 2; 
}

.product-image {
    overflow: hidden;
    background: white;
    padding: 10px;
}

.product-image img {
    width: 100%; height: 100%; object-fit: contain; transition: transform 0.3s ease;
}

.product-card:hover .product-image img {
    transform: scale(1.05);
}

/* محتوى المنتج */
.product-content {
    padding: 15px;
    order: 3;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.product-main-info {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.product-code {
    display: flex; align-items: center; gap: 6px; font-size: 12px; color: #7f8c8d; background: #f8f9fa; padding: 4px 8px; border-radius: 4px; width: fit-content; margin: 0 auto 15px auto;
}

/* تنسيق للرقم التسلسلي (الوصف) */
.product-serial-description {
    padding: 10px;
    background-color: #f8f9fa;
    border-radius: 8px;
    font-size: 14px;
    color: #495057;
    margin-bottom: 15px;
    text-align: center;
}

/* تنسيق حاوية السعر والتقييم */
.product-details-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    margin-top: auto; /* يدفع هذا الجزء للأسفل قليلاً إذا كان هناك فراغ */
}

.product-price {
    font-size: 1.2rem; font-weight: 700; color: #2c3e50; display: flex; align-items: baseline; justify-content: center; gap: 8px;
    margin-bottom: 10px; /* إضافة مسافة تحت السعر */
}
.product-price .regular-price-old { text-decoration: line-through; color: #7f8c8d; font-size: 0.9em; font-weight: 400; }
.product-price .sale-price { color: #e74c3c; }

/* تنسيق التقييم والتوفر (تحت بعضهما البعض) */
.product-meta-details {
    display: flex;
    flex-direction: column; 
    align-items: center;
    justify-content: center;
    gap: 10px; 
}

.availability-badge {
    padding: 5px 10px; border-radius: 20px; font-size: 12px; font-weight: 600; display: flex; align-items: center; gap: 5px;
}
.availability-badge.available { background: #e8f5e9; color: #2e7d32; }
.availability-badge.unavailable { background: #ffebee; color: #c62828; }

.product-rating {
    display: flex; align-items: center; gap: 3px; color: #f39c12;
}
.product-rating .far.fa-star { color: #ccc; }
.product-rating .rating-value { font-size: 13px; color: #7f8c8d; margin-left: 5px; }


/************************************************************/
/********** تعديل الأزرار (الحل القوي والنهائي) **********/
/************************************************************/
.product-footer {
    margin-top: auto;
    padding-top: 15px;
    border-top: 1px solid #e9ecef;
}

.product-actions {
    display: flex !important;
    flex-direction: column !important;
    gap: 10px !important;
}

.action-btn {
    width: 100% !important;
    padding: 10px 15px !important; 
    border: none !important; 
    border-radius: 8px !important; 
    font-size: 14px !important; 
    font-weight: 600 !important; 
    cursor: pointer !important; 
    display: flex !important; 
    align-items: center !important; 
    justify-content: center !important; 
    gap: 8px !important; 
    text-decoration: none !important; 
    transition: all 0.3s ease !important;
    box-sizing: border-box !important;
}

.view-details-btn { background: #007cba; color: white; }
.view-details-btn:hover { background: #005a87; color: white; }
.quick-add-btn { background: #27ae60; color: white; }
.quick-add-btn:hover { background: #229954; }
/************************************************************/
/***************** نهاية تعديل الأزرار *****************/
/************************************************************/


/* === أنماط عرض القائمة (List View) === */
.products-grid.list-view { grid-template-columns: 1fr; gap: 15px; }
.products-grid.list-view .product-card { flex-direction: row; align-items: stretch; }
.products-grid.list-view .product-header { display: none; }
.products-grid.list-view .product-image-container { display: none; }
.products-grid.list-view .product-content::before { content: attr(data-name); font-size: 1.1rem; font-weight: 600; color: #2c3e50; margin-bottom: 10px; }
.products-grid.list-view .product-content { order: 1; flex-direction: row; justify-content: space-between; align-items: center; width: 100%; }
.products-grid.list-view .product-code { margin: 0; }
.products-grid.list-view .product-details-wrapper, .products-grid.list-view .product-meta-details { flex-direction: row; align-items: center; gap: 15px; }
.products-grid.list-view .product-price { margin-bottom: 0; }
.products-grid.list-view .product-footer { flex-shrink: 0; width: 160px; border: none; padding: 0; margin: 0; }

/* --- أنماط لم تتغير --- */
.no-products { grid-column: 1 / -1; text-align: center; padding: 60px 20px; }
.no-products-content i { font-size: 80px; color: #dee2e6; margin-bottom: 30px; }
.no-products-content h3 { font-size: 1.5rem; color: #2c3e50; margin: 0 0 15px; }
.no-products-content p { color: #7f8c8d; margin-bottom: 30px; }
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 12px 25px; border-radius: 8px; text-decoration: none; font-weight: 600; transition: all 0.3s ease; }
.btn-primary { background: linear-gradient(135deg, #007cba, #00a0d2); color: white; }
.btn-primary:hover { background: linear-gradient(135deg, #005a87, #007cba); transform: translateY(-2px); color: white; }
.pagination-wrapper { text-align: center; margin-top: 40px; }
.pagination-wrapper .page-numbers { display: inline-flex; align-items: center; gap: 5px; list-style: none; margin: 0; padding: 0; }
.pagination-wrapper .page-numbers li { margin: 0; }
.pagination-wrapper .page-numbers a, .pagination-wrapper .page-numbers span { display: flex; align-items: center; justify-content: center; min-width: 45px; height: 45px; padding: 0 15px; border: 2px solid #e9ecef; border-radius: 8px; color: #2c3e50; text-decoration: none; font-weight: 600; transition: all 0.3s ease; }
.pagination-wrapper .page-numbers a:hover, .pagination-wrapper .page-numbers .current { background: #007cba; border-color: #007cba; color: white; }

/* استجابة للأجهزة المحمولة */
@media (max-width: 768px) {
    .products-controls { flex-direction: column; align-items: stretch; gap: 15px; }
    .products-grid { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 15px; }
    .products-container { padding: 20px; }
    .products-grid.list-view .product-content { flex-direction: column; align-items: flex-start; gap: 15px; }
    .products-grid.list-view .product-footer { width: 100%; }
}

@media (max-width: 480px) {
    .products-grid { grid-template-columns: 1fr; }
}
