/* ====================================
   المتغيرات والألوان
==================================== */
:root {
    /* ألوان العلم الجزائري */
    --primary-green: #00843D;
    --primary-red: #D21034;
    --primary-white: #FFFFFF;
    
    /* ألوان إضافية */
    --secondary-color: #1a5f3f;
    --accent-color: #FF6B35;
    --dark-color: #1a1a1a;
    --gray-dark: #2c2c2c;
    --gray-medium: #666666;
    --gray-light: #f5f5f5;
    --border-color: #e0e0e0;
    
    /* الخطوط */
    --font-main: 'Cairo', sans-serif;
    
    /* الظلال */
    --shadow-sm: 0 2px 4px 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;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-main);
    background-color: var(--primary-white);
    color: var(--dark-color);
    line-height: 1.6;
    direction: rtl;
    overflow-x: hidden;
}

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

/* ====================================
   شريط الإعلانات
==================================== */
.announcement-bar {
    background: linear-gradient(135deg, var(--primary-green), var(--secondary-color));
    color: white;
    padding: 12px 0;
    overflow: hidden;
}

.announcement-content {
    display: flex;
    gap: 40px;
    animation: scroll-announcement 20s linear infinite;
    white-space: nowrap;
}

.announcement-content span {
    font-weight: 600;
    font-size: 14px;
    padding: 0 20px;
}

@keyframes scroll-announcement {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* ====================================
   الهيدر
==================================== */
.header {
    background: white;
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: var(--transition);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 24px;
    font-weight: 900;
    color: var(--dark-color);
    text-decoration: none;
}

.logo i {
    color: var(--primary-green);
    font-size: 32px;
}

.logo .highlight {
    color: var(--primary-red);
}

.nav-menu ul {
    display: flex;
    list-style: none;
    gap: 30px;
    align-items: center;
}

.nav-menu a {
    color: var(--dark-color);
    text-decoration: none;
    font-weight: 600;
    font-size: 16px;
    transition: var(--transition);
    position: relative;
}

.nav-menu a:hover,
.nav-menu a.active {
    color: var(--primary-green);
}

.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    right: 0;
    width: 0;
    height: 2px;
    background: var(--primary-green);
    transition: var(--transition);
}

.nav-menu a:hover::after,
.nav-menu a.active::after {
    width: 100%;
}

.btn-verify {
    background: linear-gradient(135deg, var(--primary-green), var(--secondary-color));
    color: white !important;
    padding: 8px 20px;
    border-radius: 25px;
}

.btn-verify::after {
    display: none;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 20px;
}

.cart-icon {
    position: relative;
    color: var(--dark-color);
    font-size: 24px;
    transition: var(--transition);
}

.cart-icon:hover {
    color: var(--primary-green);
}

.cart-count {
    position: absolute;
    top: -8px;
    left: -8px;
    background: var(--primary-red);
    color: white;
    font-size: 12px;
    font-weight: bold;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 24px;
    color: var(--dark-color);
    cursor: pointer;
}

/* ====================================
   Hero Section
==================================== */
.hero {
    background: linear-gradient(135deg, rgba(0,132,61,0.05), rgba(210,16,52,0.05));
    padding: 80px 0;
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.hero-title {
    font-size: 48px;
    font-weight: 900;
    color: var(--dark-color);
    margin-bottom: 20px;
    line-height: 1.2;
}

.hero-description {
    font-size: 18px;
    color: var(--gray-medium);
    margin-bottom: 30px;
    line-height: 1.8;
}

.hero-buttons {
    display: flex;
    gap: 15px;
    margin-bottom: 40px;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 30px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 16px;
    text-decoration: none;
    transition: var(--transition);
    cursor: pointer;
    border: none;
}

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

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

.btn-secondary {
    background: white;
    color: var(--primary-green);
    border: 2px solid var(--primary-green);
}

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

.btn-lg {
    padding: 15px 40px;
    font-size: 18px;
}

.hero-stats {
    display: flex;
    gap: 40px;
}

.stat-item {
    display: flex;
    flex-direction: column;
}

.stat-number {
    font-size: 32px;
    font-weight: 900;
    color: var(--primary-green);
}

.stat-label {
    font-size: 14px;
    color: var(--gray-medium);
}

.hero-image {
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-illustration {
    width: 400px;
    height: 400px;
    background: linear-gradient(135deg, var(--primary-green), var(--secondary-color));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-lg);
    animation: float 3s ease-in-out infinite;
}

.hero-illustration i {
    font-size: 200px;
    color: white;
}

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

/* ====================================
   الأقسام
==================================== */
section {
    padding: 80px 0;
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-header h2 {
    font-size: 40px;
    font-weight: 900;
    color: var(--dark-color);
    margin-bottom: 15px;
}

.section-header p {
    font-size: 18px;
    color: var(--gray-medium);
}

.section-footer {
    text-align: center;
    margin-top: 40px;
}

/* ====================================
   الفئات
==================================== */
.categories {
    background: var(--gray-light);
}

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

.category-card {
    background: white;
    padding: 30px;
    border-radius: 15px;
    text-align: center;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
    text-decoration: none;
    color: var(--dark-color);
}

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

.category-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--primary-green), var(--secondary-color));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}

.category-icon i {
    font-size: 40px;
    color: white;
}

.category-card h3 {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 10px;
}

.category-card p {
    font-size: 14px;
    color: var(--gray-medium);
    margin-bottom: 15px;
}

.category-badge {
    display: inline-block;
    background: var(--primary-red);
    color: white;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

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

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

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

.product-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: var(--primary-red);
    color: white;
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    z-index: 10;
}

.product-badge.best-seller {
    background: #FFD700;
    color: var(--dark-color);
}

.product-image {
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gray-light);
    padding: 30px;
}

.product-image i {
    color: var(--primary-green);
}

.product-info {
    padding: 25px;
}

.product-info h3 {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 10px;
}

.product-description {
    font-size: 14px;
    color: var(--gray-medium);
    margin-bottom: 15px;
}

.product-price {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
}

.old-price {
    font-size: 16px;
    color: var(--gray-medium);
    text-decoration: line-through;
}

.new-price {
    font-size: 24px;
    font-weight: 900;
    color: var(--primary-green);
}

.price-period {
    font-size: 14px;
    color: var(--gray-medium);
}

.btn-add-to-cart {
    width: 100%;
    background: linear-gradient(135deg, var(--primary-green), var(--secondary-color));
    color: white;
}

.btn-add-to-cart:hover {
    transform: none;
    opacity: 0.9;
}

/* ====================================
   خطوات العمل
==================================== */
.how-it-works {
    background: var(--gray-light);
}

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

.step-card {
    background: white;
    padding: 40px 30px;
    border-radius: 15px;
    text-align: center;
    box-shadow: var(--shadow-sm);
    position: relative;
}

.step-number {
    position: absolute;
    top: -20px;
    right: 50%;
    transform: translateX(50%);
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--primary-red), #ff3355);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: 900;
    box-shadow: var(--shadow-md);
}

.step-icon {
    width: 100px;
    height: 100px;
    background: linear-gradient(135deg, var(--primary-green), var(--secondary-color));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 20px auto 30px;
}

.step-icon i {
    font-size: 50px;
    color: white;
}

.step-card h3 {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 15px;
}

.step-card p {
    color: var(--gray-medium);
    line-height: 1.8;
}

/* ====================================
   لماذا نحن
==================================== */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.feature-card {
    background: white;
    padding: 30px;
    border-radius: 15px;
    text-align: center;
    border: 2px solid var(--border-color);
    transition: var(--transition);
}

.feature-card:hover {
    border-color: var(--primary-green);
    transform: translateY(-5px);
}

.feature-icon {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, rgba(0,132,61,0.1), rgba(0,132,61,0.2));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}

.feature-icon i {
    font-size: 35px;
    color: var(--primary-green);
}

.feature-card h3 {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 10px;
}

.feature-card p {
    color: var(--gray-medium);
    line-height: 1.8;
}

/* ====================================
   الشهادات
==================================== */
.testimonials {
    background: var(--gray-light);
}

.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
}

.testimonial-card {
    background: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: var(--shadow-sm);
}

.testimonial-rating {
    display: flex;
    gap: 5px;
    margin-bottom: 20px;
}

.testimonial-rating i {
    color: #FFD700;
    font-size: 18px;
}

.testimonial-text {
    font-size: 16px;
    color: var(--gray-medium);
    line-height: 1.8;
    margin-bottom: 25px;
    font-style: italic;
}

.testimonial-author {
    display: flex;
    align-items: center;
    gap: 15px;
}

.author-avatar {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--primary-green), var(--secondary-color));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.author-avatar i {
    font-size: 24px;
    color: white;
}

.author-info h4 {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 5px;
}

.author-info p {
    font-size: 13px;
    color: var(--gray-medium);
}

/* ====================================
   Call to Action
==================================== */
.cta {
    background: linear-gradient(135deg, var(--primary-green), var(--secondary-color));
    color: white;
    text-align: center;
}

.cta h2 {
    font-size: 40px;
    font-weight: 900;
    margin-bottom: 20px;
}

.cta p {
    font-size: 18px;
    margin-bottom: 30px;
    opacity: 0.9;
}

.cta-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.cta .btn-primary {
    background: white;
    color: var(--primary-green);
}

.cta .btn-secondary {
    background: transparent;
    border-color: white;
    color: white;
}

.cta .btn-secondary:hover {
    background: white;
    color: var(--primary-green);
}

/* ====================================
   الفوتر
==================================== */
.footer {
    background: var(--dark-color);
    color: white;
    padding: 60px 0 20px;
}

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

.footer-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 28px;
    font-weight: 900;
    margin-bottom: 15px;
}

.footer-logo i {
    color: var(--primary-green);
    font-size: 35px;
}

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

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

.social-link {
    width: 40px;
    height: 40px;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 18px;
    transition: var(--transition);
}

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

.footer-section h3 {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 20px;
}

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

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

.footer-links a {
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--primary-green);
    padding-right: 5px;
}

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

.footer-contact li {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
    color: rgba(255,255,255,0.7);
}

.footer-contact i {
    color: var(--primary-green);
    font-size: 18px;
}

.footer-contact a {
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    transition: var(--transition);
}

.footer-contact a:hover {
    color: var(--primary-green);
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.payment-methods {
    display: flex;
    align-items: center;
    gap: 15px;
    color: rgba(255,255,255,0.7);
}

.payment-methods i {
    font-size: 24px;
    color: var(--primary-green);
}

.copyright {
    color: rgba(255,255,255,0.5);
}

/* ====================================
   زر العودة للأعلى
==================================== */
.back-to-top {
    position: fixed;
    bottom: 30px;
    left: 30px;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--primary-green), var(--secondary-color));
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    box-shadow: var(--shadow-lg);
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    z-index: 999;
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    transform: translateY(-5px);
}

/* ====================================
   التصميم المتجاوب
==================================== */
@media (max-width: 968px) {
    .hero-content {
        grid-template-columns: 1fr;
    }
    
    .hero-illustration {
        width: 300px;
        height: 300px;
    }
    
    .hero-illustration i {
        font-size: 150px;
    }
    
    .hero-title {
        font-size: 36px;
    }
    
    .section-header h2 {
        font-size: 32px;
    }
}

@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        top: 70px;
        right: -100%;
        width: 70%;
        height: calc(100vh - 70px);
        background: white;
        box-shadow: var(--shadow-lg);
        transition: var(--transition);
        padding: 30px;
    }
    
    .nav-menu.active {
        right: 0;
    }
    
    .nav-menu ul {
        flex-direction: column;
        align-items: start;
    }
    
    .mobile-menu-toggle {
        display: block;
    }
    
    .hero-buttons {
        flex-direction: column;
    }
    
    .hero-stats {
        flex-direction: column;
        gap: 20px;
    }
    
    .cta-buttons {
        flex-direction: column;
    }
    
    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }
    
    .announcement-content span {
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 28px;
    }
    
    .hero-description {
        font-size: 16px;
    }
    
    .products-grid {
        grid-template-columns: 1fr;
    }
    
    .hero-illustration {
        width: 250px;
        height: 250px;
    }
    
    .hero-illustration i {
        font-size: 120px;
    }
}

/* ====================================
   أنماط إضافية للصفحات الأخرى
==================================== */

/* نماذج */
.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--dark-color);
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-family: var(--font-main);
    font-size: 16px;
    transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-green);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

/* الجداول */
table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

table th,
table td {
    padding: 15px;
    text-align: right;
}

table th {
    background: var(--primary-green);
    color: white;
    font-weight: 700;
}

table tbody tr {
    border-bottom: 1px solid var(--border-color);
}

table tbody tr:hover {
    background: var(--gray-light);
}

/* البطاقات */
.card {
    background: white;
    border-radius: 15px;
    padding: 30px;
    box-shadow: var(--shadow-sm);
}

/* التنبيهات */
.alert {
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.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;
}

/* محمل التحميل */
.loader {
    border: 4px solid var(--gray-light);
    border-top: 4px solid var(--primary-green);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 20px auto;
}

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