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

:root {
    --primary: #6C5CE7;
    --primary-dark: #5a4ad7;
    --secondary: #00D2FF;
    --dark: #0A0A0F;
    --card-bg: #1A1A2E;
    --text: #FFFFFF;
    --text-secondary: #A0A0B0;
    --border: rgba(108, 92, 231, 0.2);
    --gradient: linear-gradient(135deg, var(--primary), var(--secondary));
}

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

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

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

/* Header */
header {
    background: rgba(10, 10, 15, 0.95);
    backdrop-filter: blur(10px);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid var(--border);
}

nav {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo a {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}

.logo-icon { font-size: 1.8rem; }
.logo-text { font-size: 1.3rem; font-weight: 700; background: var(--gradient); -webkit-background-clip: text; background-clip: text; color: transparent; }
.logo-tagline { font-size: 0.7rem; color: var(--text-secondary); margin-right: 8px; }

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-menu a {
    text-decoration: none;
    color: var(--text-secondary);
    font-weight: 500;
    transition: color 0.3s;
}

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

.lang-switch {
    background: var(--card-bg);
    border: 1px solid var(--border);
    padding: 6px 12px;
    border-radius: 30px;
    cursor: pointer;
    color: var(--text);
    font-size: 0.8rem;
    transition: all 0.3s;
}

.lang-switch:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.cart-icon {
    position: relative;
    color: var(--text);
    font-size: 1.2rem;
    margin-left: 1rem;
    text-decoration: none;
}

.cart-count {
    position: absolute;
    top: -8px;
    right: -12px;
    background: var(--primary);
    color: white;
    font-size: 0.7rem;
    padding: 2px 6px;
    border-radius: 50%;
}

.menu-toggle {
    display: none;
    cursor: pointer;
    font-size: 1.5rem;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--dark) 0%, var(--card-bg) 100%);
    padding: 140px 20px 80px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 20% 50%, rgba(108, 92, 231, 0.1) 0%, transparent 50%);
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
    margin: 0 auto;
}

.hero-badge {
    display: inline-block;
    background: rgba(108, 92, 231, 0.2);
    color: var(--primary);
    padding: 8px 20px;
    border-radius: 50px;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    background: var(--gradient);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.hero p {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-primary, .btn-secondary, .btn-buy, .btn-plan {
    display: inline-block;
    padding: 12px 30px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: transform 0.3s, box-shadow 0.3s;
    cursor: pointer;
    border: none;
    font-family: inherit;
}

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

.btn-primary:hover, .btn-buy:hover, .btn-plan:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(108, 92, 231, 0.3);
}

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

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

/* Stats */
.stats {
    display: flex;
    justify-content: space-around;
    max-width: 1000px;
    margin: -40px auto 0;
    background: var(--card-bg);
    border-radius: 20px;
    padding: 2rem;
    position: relative;
    z-index: 2;
    flex-wrap: wrap;
    gap: 2rem;
}

.stat-item { text-align: center; }
.stat-number { display: block; font-size: 2rem; font-weight: 700; color: var(--primary); }
.stat-label { color: var(--text-secondary); font-size: 0.9rem; }

/* Sections */
.categories, .featured-products, .features, .plans { padding: 60px 0; }
.section-title { text-align: center; font-size: 2rem; margin-bottom: 0.5rem; }
.section-subtitle { text-align: center; color: var(--text-secondary); margin-bottom: 3rem; }

/* Grids */
.categories-grid, .products-grid, .plans-grid, .features-grid {
    display: grid;
    gap: 2rem;
}

.categories-grid { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.products-grid { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.plans-grid { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.features-grid { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }

/* Cards */
.category-card, .product-card, .plan-card, .feature-card {
    background: var(--card-bg);
    border-radius: 20px;
    padding: 1.5rem;
    text-align: center;
    border: 1px solid var(--border);
    transition: transform 0.3s;
}

.category-card:hover, .product-card:hover, .plan-card:hover, .feature-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary);
}

.category-card { padding: 1.5rem 1rem; }
.category-icon { font-size: 2.5rem; margin-bottom: 0.5rem; }
.category-card h3 { font-size: 1rem; margin-bottom: 0.25rem; }
.category-card p { font-size: 0.8rem; color: var(--primary); }

/* Product Card */
.product-card { position: relative; }
.product-badge {
    position: absolute;
    top: -10px;
    right: 20px;
    background: var(--gradient);
    color: white;
    font-size: 0.7rem;
    padding: 4px 12px;
    border-radius: 20px;
}
.product-icon { font-size: 3rem; margin-bottom: 1rem; }
.product-card h3 { font-size: 1.2rem; margin-bottom: 0.5rem; }
.product-card p { color: var(--text-secondary); font-size: 0.9rem; margin-bottom: 1rem; }
.price { font-size: 1.3rem; font-weight: 700; color: var(--primary); margin-bottom: 1rem; }
.old-price { font-size: 0.9rem; color: var(--text-secondary); text-decoration: line-through; margin-right: 0.5rem; }
.btn-buy { background: var(--gradient); color: white; padding: 10px 20px; font-size: 0.9rem; }

/* Plan Card */
.plan-card { position: relative; }
.plan-card.popular { border-color: var(--primary); transform: scale(1.02); }
.plan-badge {
    position: absolute;
    top: -10px;
    right: 20px;
    background: var(--gradient);
    color: white;
    font-size: 0.7rem;
    padding: 4px 12px;
    border-radius: 20px;
}
.plan-price { font-size: 2rem; font-weight: 700; color: var(--primary); margin: 1rem 0; }
.plan-price span { font-size: 0.9rem; color: var(--text-secondary); }
.plan-features { list-style: none; margin: 1.5rem 0; }
.plan-features li { margin-bottom: 0.5rem; color: var(--text-secondary); }
.plan-features li i { color: var(--primary); margin-left: 0.5rem; }
.btn-plan { background: var(--gradient); color: white; width: 100%; margin-top: 1rem; display: inline-block; text-align: center; }

/* Feature Card */
.feature-icon { font-size: 2.5rem; margin-bottom: 1rem; }
.feature-card h3 { margin-bottom: 0.5rem; }
.feature-card p { color: var(--text-secondary); font-size: 0.9rem; }

/* Newsletter */
.newsletter {
    padding: 60px 0;
    background: linear-gradient(135deg, var(--card-bg), var(--dark));
    text-align: center;
}

.newsletter-content { max-width: 600px; margin: 0 auto; }
.newsletter-content h3 { font-size: 1.5rem; margin-bottom: 0.5rem; }
.newsletter-content p { color: var(--text-secondary); margin-bottom: 1.5rem; }

.newsletter-form {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.newsletter-form input {
    padding: 12px 20px;
    border-radius: 50px;
    border: none;
    background: var(--dark);
    color: white;
    width: 300px;
    outline: none;
}

.newsletter-form button {
    background: var(--gradient);
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 50px;
    cursor: pointer;
    font-weight: 600;
}

/* Footer */
footer {
    background: #050507;
    padding: 60px 0 20px;
    border-top: 1px solid var(--border);
}

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

.footer-logo { font-size: 1.2rem; font-weight: 700; margin-bottom: 1rem; background: var(--gradient); -webkit-background-clip: text; background-clip: text; color: transparent; display: inline-block; }
.footer-col p, .footer-col ul li, .footer-col ul li a { color: var(--text-secondary); font-size: 0.9rem; text-decoration: none; }
.footer-col h4 { margin-bottom: 1rem; font-size: 1rem; color: var(--text); }
.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: 0.5rem; }
.footer-col ul li a:hover { color: var(--primary); }
.social-links { display: flex; gap: 1rem; margin-top: 1rem; }
.social-links a { color: var(--text-secondary); font-size: 1.2rem; transition: color 0.3s; }
.social-links a:hover { color: var(--primary); }
.footer-bottom { text-align: center; padding-top: 2rem; border-top: 1px solid var(--border); color: var(--text-secondary); font-size: 0.8rem; }

/* Chatbot */
.chatbot-toggle {
    position: fixed;
    bottom: 30px;
    left: 30px;
    background: var(--gradient);
    color: white;
    padding: 12px 20px;
    border-radius: 50px;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    z-index: 1000;
    transition: transform 0.3s;
    box-shadow: 0 5px 20px rgba(108, 92, 231, 0.3);
}

.chatbot-toggle:hover { transform: scale(1.05); }

/* Responsive */
@media (max-width: 992px) {
    .nav-menu {
        position: fixed;
        top: 70px;
        left: -100%;
        background: var(--dark);
        flex-direction: column;
        width: 100%;
        text-align: center;
        padding: 2rem;
        transition: left 0.3s;
        border-bottom: 1px solid var(--border);
    }
    .nav-menu.active { left: 0; }
    .menu-toggle { display: block; }
    .hero h1 { font-size: 2rem; }
    .stats { margin-top: -20px; }
}

@media (max-width: 768px) {
    .categories-grid { grid-template-columns: repeat(2, 1fr); }
    .products-grid, .plans-grid { grid-template-columns: 1fr; }
    .features-grid { grid-template-columns: 1fr; }
    .hero-buttons { flex-direction: column; align-items: center; }
    .btn-primary, .btn-secondary { width: 80%; text-align: center; }
}
