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

:root {
    --primary-blue: #1e3a8a; /* أزرق غامق */
    --secondary-blue: #60a5fa; /* أزرق فاتح */
    --accent-red: #dc2626; /* أحمر */
    --light-color: #ffffff; /* أبيض */
    --dark-color: #0f172a; /* أسود/أزرق داكن جداً */
    --gray-color: #f8fafc; /* رمادي فاتح */
    --transition: all 0.3s ease;
    --shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 8px 24px rgba(0, 0, 0, 0.15);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Cairo', sans-serif;
    line-height: 1.6;
    color: var(--dark-color);
    background-color: var(--light-color);
    overflow-x: hidden;
}

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

section {
    padding: 80px 0;
}

/* تنسيقات النصوص */
h1, h2, h3, h4 {
    font-weight: 700;
    line-height: 1.2;
}

p {
    margin-bottom: 15px;
}

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

ul {
    list-style: none;
}

/* الأزرار */
.btn {
    display: inline-block;
    padding: 12px 30px;
    border-radius: 5px;
    font-weight: 600;
    font-size: 16px;
    cursor: pointer;
    border: none;
    transition: var(--transition);
    text-align: center;
}

.btn-primary {
    background-color: var(--primary-blue);
    color: var(--light-color);
}

.btn-primary:hover {
    background-color: #1e40af;
    transform: translateY(-3px);
    box-shadow: var(--shadow-hover);
}

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

.btn-secondary:hover {
    background-color: #3b82f6;
    transform: translateY(-3px);
    box-shadow: var(--shadow-hover);
}

.btn-category {
    background-color: transparent;
    color: var(--primary-blue);
    border: 2px solid var(--primary-blue);
    padding: 8px 20px;
    font-size: 14px;
}

.btn-category:hover {
    background-color: var(--primary-blue);
    color: var(--light-color);
}

.btn-block {
    display: block;
    width: 100%;
}

/* الترويسة */
.header {
    background-color: var(--light-color);
    box-shadow: var(--shadow);
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 15px 0;
}

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

.logo h1 {
    font-size: 22px;
    margin-bottom: 5px;
}

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

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

.logo-tagline {
    font-size: 12px;
    color: #666;
}

.nav ul {
    display: flex;
    gap: 25px;
}

.nav a {
    font-weight: 600;
    font-size: 16px;
    position: relative;
}

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

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

.nav a.active {
    color: var(--accent-red);
}

.cart-icon {
    position: relative;
    margin-right: 20px;
}

.cart-icon a {
    font-size: 22px;
    color: var(--primary-blue);
}

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

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

/* القسم الرئيسي */
.hero {
    background: linear-gradient(rgba(30, 58, 138, 0.85), rgba(30, 58, 138, 0.9)), url('https://images.unsplash.com/photo-1551650975-87deedd944c3?ixlib=rb-4.0.3&auto=format&fit=crop&w=1470&q=80');
    background-size: cover;
    background-position: center;
    color: var(--light-color);
    min-height: 100vh;
    display: flex;
    align-items: center;
    margin-top: 70px;
}

.hero-overlay {
    width: 100%;
    padding: 60px 0;
}

.hero-content {
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.hero-title {
    font-size: 48px;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.hero-subtitle {
    font-size: 22px;
    margin-bottom: 40px;
    opacity: 0.9;
}

.hero-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
}

/* المميزات */
.features {
    background-color: var(--gray-color);
}

.section-title {
    text-align: center;
    font-size: 36px;
    margin-bottom: 15px;
    color: var(--primary-blue);
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    right: 50%;
    transform: translateX(50%);
    width: 80px;
    height: 4px;
    background-color: var(--accent-red);
}

.section-subtitle {
    text-align: center;
    color: #666;
    margin-bottom: 50px;
    font-size: 18px;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-top: 50px;
}

.feature-card {
    background-color: var(--light-color);
    border-radius: 10px;
    padding: 30px;
    text-align: center;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

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

.feature-icon {
    font-size: 40px;
    color: var(--primary-blue);
    margin-bottom: 20px;
}

.feature-card h3 {
    font-size: 22px;
    margin-bottom: 15px;
    color: var(--dark-color);
}

/* المنتجات */
.products-filter {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 10px 25px;
    background-color: var(--gray-color);
    border: none;
    border-radius: 30px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

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

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

.product-card {
    background-color: var(--light-color);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    position: relative;
}

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

.product-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background-color: var(--accent-red);
    color: white;
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 12px;
    font-weight: bold;
}

.product-img {
    height: 200px;
    overflow: hidden;
}

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

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

.product-content {
    padding: 20px;
}

.product-title {
    font-size: 20px;
    margin-bottom: 10px;
    color: var(--dark-color);
}

.product-description {
    color: #666;
    font-size: 14px;
    margin-bottom: 15px;
    height: 60px;
    overflow: hidden;
}

.product-price {
    font-size: 22px;
    font-weight: bold;
    color: var(--primary-blue);
    margin-bottom: 15px;
}

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

/* الأقسام */
.categories {
    background-color: var(--gray-color);
}

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

.category-card {
    background-color: var(--light-color);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

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

.category-img {
    height: 180px;
    overflow: hidden;
}

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

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

.category-content {
    padding: 20px;
}

.category-content h3 {
    font-size: 22px;
    margin-bottom: 10px;
    color: var(--primary-blue);
}

.category-content p {
    color: #666;
    margin-bottom: 20px;
    font-size: 14px;
}

/* عن الشركة */
.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
}

.about-text p {
    margin-bottom: 25px;
    font-size: 16px;
    line-height: 1.8;
}

.about-stats {
    display: flex;
    justify-content: space-between;
    margin-top: 40px;
}

.stat {
    text-align: center;
}

.stat h3 {
    font-size: 36px;
    color: var(--accent-red);
    margin-bottom: 5px;
}

.stat p {
    font-size: 14px;
    color: #666;
    margin: 0;
}

.about-img {
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow-hover);
}

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

/* الاتصال */
.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
}

.contact-item {
    display: flex;
    margin-bottom: 30px;
    align-items: flex-start;
}

.contact-icon {
    background-color: var(--secondary-blue);
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    margin-left: 15px;
    flex-shrink: 0;
}

.contact-text h3 {
    font-size: 20px;
    margin-bottom: 5px;
    color: var(--primary-blue);
}

.contact-form .form-group {
    margin-bottom: 20px;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-family: 'Cairo', sans-serif;
    font-size: 16px;
    transition: var(--transition);
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: var(--primary-blue);
}

/* سلة التسوق */
.cart-sidebar {
    position: fixed;
    top: 0;
    left: -400px;
    width: 350px;
    height: 100%;
    background-color: var(--light-color);
    box-shadow: var(--shadow-hover);
    z-index: 1100;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

.cart-sidebar.active {
    left: 0;
}

.cart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background-color: var(--primary-blue);
    color: white;
}

.cart-header h3 {
    font-size: 22px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.close-cart {
    background: none;
    border: none;
    color: white;
    font-size: 28px;
    cursor: pointer;
    line-height: 1;
}

.cart-items {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

.cart-empty {
    text-align: center;
    padding: 50px 0;
    color: #999;
}

.cart-empty i {
    font-size: 60px;
    margin-bottom: 20px;
    color: #ddd;
}

.cart-item {
    display: flex;
    padding: 15px 0;
    border-bottom: 1px solid #eee;
    align-items: center;
}

.cart-item-img {
    width: 70px;
    height: 70px;
    border-radius: 5px;
    overflow: hidden;
    margin-left: 15px;
}

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

.cart-item-details {
    flex: 1;
}

.cart-item-title {
    font-weight: 600;
    margin-bottom: 5px;
}

.cart-item-price {
    color: var(--primary-blue);
    font-weight: bold;
}

.cart-item-remove {
    background: none;
    border: none;
    color: var(--accent-red);
    font-size: 20px;
    cursor: pointer;
    padding: 5px;
}

.cart-footer {
    padding: 20px;
    border-top: 1px solid #eee;
}

.cart-total {
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
    font-size: 20px;
    font-weight: bold;
}

.total-price {
    color: var(--accent-red);
}

.btn-checkout,
.btn-clear {
    width: 100%;
    margin-bottom: 10px;
}

.cart-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1050;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.cart-overlay.active {
    opacity: 1;
    visibility: visible;
}

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

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

.footer-links h4,
.footer-social h4 {
    font-size: 20px;
    margin-bottom: 20px;
    color: var(--secondary-blue);
}

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

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

.social-icons {
    display: flex;
    gap: 15px;
}

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

.social-icons a:hover {
    background-color: var(--accent-red);
    transform: translateY(-5px);
}

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

.footer-bottom p {
    margin-bottom: 10px;
}

/* نموذج الطلب */
.order-modal,
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1200;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.order-modal.active,
.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-overlay {
    background-color: rgba(0, 0, 0, 0.7);
}

.order-modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    background-color: var(--light-color);
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    border-radius: 10px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    transition: var(--transition);
}

.order-modal.active .order-modal-content {
    transform: translate(-50%, -50%) scale(1);
}

.order-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background-color: var(--primary-blue);
    color: white;
    border-radius: 10px 10px 0 0;
}

.order-modal-header h3 {
    font-size: 22px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.close-order-modal {
    background: none;
    border: none;
    color: white;
    font-size: 28px;
    cursor: pointer;
    line-height: 1;
}

.order-modal-body {
    padding: 30px;
}

.order-summary {
    background-color: var(--gray-color);
    padding: 20px;
    border-radius: 10px;
    margin: 20px 0;
}

.order-summary h4 {
    margin-bottom: 15px;
    color: var(--primary-blue);
}

.order-summary-item {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid #ddd;
}

.order-summary-item:last-child {
    border-bottom: none;
}

.order-total {
    display: flex;
    justify-content: space-between;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 2px solid var(--primary-blue);
    font-size: 20px;
    font-weight: bold;
}

/* الحركات والتفاعلات */
@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

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

.animate-fade-up {
    animation: fadeUp 0.8s ease forwards;
}

.animate-fade-left {
    animation: fadeLeft 0.8s ease forwards;
}

.animate-fade-right {
    animation: fadeRight 0.8s ease forwards;
}

/* التجاوب مع الأجهزة المختلفة */
@media (max-width: 992px) {
    .hero-title {
        font-size: 36px;
    }
    
    .hero-subtitle {
        font-size: 18px;
    }
    
    .about-content,
    .contact-content {
        grid-template-columns: 1fr;
    }
    
    .about-img {
        order: -1;
    }
    
    .features-grid,
    .categories-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .menu-toggle {
        display: block;
    }
    
    .nav {
        position: fixed;
        top: 70px;
        right: -100%;
        width: 80%;
        height: calc(100vh - 70px);
        background-color: var(--light-color);
        flex-direction: column;
        padding: 30px;
        transition: var(--transition);
        box-shadow: var(--shadow-hover);
        z-index: 100;
    }
    
    .nav.active {
        right: 0;
    }
    
    .nav ul {
        flex-direction: column;
        gap: 20px;
        margin-bottom: 30px;
    }
    
    .cart-sidebar {
        width: 100%;
        left: -100%;
    }
    
    .hero-buttons {
        flex-direction: column;
        gap: 15px;
    }
    
    .features-grid,
    .categories-grid {
        grid-template-columns: 1fr;
    }
    
    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }
    
    .about-stats {
        flex-direction: column;
        gap: 20px;
    }
}

@media (max-width: 576px) {
    .section-title {
        font-size: 28px;
    }
    
    .hero-title {
        font-size: 28px;
    }
    
    .hero-subtitle {
        font-size: 16px;
    }
    
    .btn {
        padding: 10px 20px;
        font-size: 14px;
    }
    
    .products-filter {
        flex-direction: column;
        align-items: center;
    }
    
    .filter-btn {
        width: 100%;
        max-width: 250px;
    }
    
    .order-modal-content {
        width: 95%;
    }
}