@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;500;700&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Roboto', sans-serif;
}

:root {
    --primary-color: #1a237e;
    --secondary-color: #3949ab;
    --accent-color: #5c6bc0;
    --light-color: #e8eaf6;
    --dark-color: #263238;
    --text-color: #333;
    --white: #ffffff;
}

body {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    color: var(--text-color);
    line-height: 1.6;
    overflow-x: hidden;
}

/* خلفية متحركة */
.animated-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, #2365c9, #ffffff, #86a4f7);
    background-size: 400% 400%;
    animation: gradient 6s ease infinite;
    z-index: -1;
}

@keyframes gradient {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Loader Styles */
.loader-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #1a237e, #3949ab);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease;
}

.loader {
    position: relative;
    width: 150px;
    height: 150px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.loader-circle {
    position: absolute;
    width: 100%;
    height: 100%;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* استبدال النص بصورة الشعار */
.loader-logo {
    width: 80%;
    height: 80%;
    object-fit: contain;
    z-index: 1;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loader-hidden {
    opacity: 0;
    pointer-events: none;
}

/* الهيدر */
header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 1rem 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
}

.logo img {
    width: 60px;
    height: 60px;
    margin-right: 10px;
}

.logo h1 {
    color: var(--primary-color);
    font-size: 1.5rem;
    font-weight: bold;
}

/* أيقونة السلة - تحسين التصميم */
.cart-icon {
    position: relative;
    cursor: pointer;
    font-size: 1.8rem;
    color: var(--primary-color);
    transition: transform 0.3s ease;
}

.cart-icon:hover {
    transform: scale(1.1);
}

.cart-count {
    position: absolute;
    top: -12px;
    right: -12px;
    background: #ff5722;
    color: white;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: bold;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

/* شريط التنقل */
nav ul {
    list-style: none;
    display: flex;
    gap: 1.5rem;
}

nav a {
    text-decoration: none;
    color: var(--dark-color);
    font-weight: 500;
    transition: color 0.3s;
}

nav a:hover {
    color: var(--primary-color);
}

/* زر الهامبرغر للجوال */
.hamburger {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--dark-color);
}

/* قسم نبذة الشركة */
.company-intro {
    max-width: 1200px;
    margin: 3rem auto;
    padding: 0 1rem;
    display: flex;
    gap: 2rem;
    align-items: center;
    flex-wrap: wrap;
}

.intro-text {
    flex: 1 1 300px;
}

.intro-text h2 {
    color: var(--primary-color);
    font-size: 2rem;
    margin-bottom: 1rem;
}

.intro-text p {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    color: var(--dark-color);
}

.company-info {
    background: rgba(255, 255, 255, 0.9);
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.info-item {
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
}

.info-item i {
    color: var(--primary-color);
    margin-right: 10px;
    font-size: 1.2rem;
}

.intro-video {
    flex: 1 1 300px;
}

.intro-video video {
    width: 100%;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

/* قسم المنتجات */
.products-section {
    max-width: 1200px;
    margin: 3rem auto;
    padding: 0 1rem;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 3rem;
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 3px;
    background: var(--accent-color);
}

.product-tabs {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.tab {
    padding: 0.8rem 1.5rem;
    background: var(--white);
    border: none;
    border-radius: 25px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.tab.active {
    background: var(--primary-color);
    color: white;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
}

.product-card {
    background: var(--white);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s;
}

.product-card:hover {
    transform: translateY(-5px);
}

.product-image {
    height: 200px;
    background: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: var(--accent-color);
}

.product-info {
    padding: 1.5rem;
}

.product-name {
    font-size: 1.2rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
    color: var(--dark-color);
}

.product-description {
    color: #666;
    margin-bottom: 1rem;
    font-size: 0.95rem;
}

.product-rating {
    display: flex;
    margin-bottom: 1rem;
}

.product-rating i {
    color: #ffc107;
    margin-right: 2px;
}

.product-actions {
    display: flex;
    gap: 1rem;
}

.btn {
    padding: 0.6rem 1.2rem;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background: var(--secondary-color);
}

.btn-secondary {
    background: var(--light-color);
    color: var(--dark-color);
}

.btn-secondary:hover {
    background: #d1d9e6;
}

/* سلة الواتساب */
.whatsapp-cart {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    padding: 1rem;
    max-width: 300px;
    z-index: 1000;
    transform: translateY(100px);
    opacity: 0;
    transition: all 0.3s;
}

.whatsapp-cart.show {
    transform: translateY(0);
    opacity: 1;
}

.cart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.cart-title {
    font-weight: bold;
    color: var(--primary-color);
}

.close-cart {
    cursor: pointer;
    font-size: 1.2rem;
    color: #999;
}

.cart-items {
    max-height: 200px;
    overflow-y: auto;
    margin-bottom: 1rem;
}

.cart-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid #eee;
}

.cart-item-info {
    flex: 1;
}

.cart-item-name {
    font-weight: 500;
}

.cart-actions {
    display: flex;
    gap: 0.5rem;
}

.cart-actions button {
    background: none;
    border: none;
    cursor: pointer;
    color: #999;
    font-size: 1.1rem;
}

.branch-selection {
    margin-top: 1rem;
}

.branch-selection select {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 5px;
}

/* قسم التواصل */
.contact-section {
    max-width: 1200px;
    margin: 4rem auto;
    padding: 0 1rem;
}

.contact-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.contact-info, .contact-form {
    background: var(--white);
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.contact-info h3 {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
}

.social-links {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.social-links a {
    font-size: 1.5rem;
    color: var(--dark-color);
    transition: color 0.3s;
}

.social-links a:hover {
    color: var(--primary-color);
}

.branch {
    margin-bottom: 2rem;
}

.branch h4 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.branch p {
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
}

.branch p i {
    margin-right: 10px;
    color: var(--accent-color);
}

.map-placeholder {
    height: 150px;
    background: #f0f0f0;
    border-radius: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    margin-top: 1rem;
}

.contact-form h3 {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

/* الفوتر */
footer {
    background: var(--dark-color);
    color: var(--white);
    padding: 3rem 0;
    margin-top: 4rem;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
    text-align: center;
}

.footer-content p {
    margin-bottom: 1rem;
}

.footer-content a {
    color: var(--accent-color);
    text-decoration: none;
}

/* رسائل النجاح */
.success-message {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #4caf50;
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 5px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transform: translateX(100%);
    opacity: 0;
    transition: all 0.3s;
    z-index: 2000;
}

.success-message.show {
    transform: translateX(0);
    opacity: 1;
}

/* استجابة للجوال */
@media (max-width: 768px) {
    .hamburger {
        display: block;
    }

    nav ul {
        display: none;
        flex-direction: column;
        gap: 1rem;
        background: white;
        padding: 1rem;
        border-radius: 10px;
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
        position: absolute;
        top: 70px;
        right: 1rem;
        width: 200px;
    }

    nav ul.show {
        display: flex;
    }

    .company-intro {
        flex-direction: column;
    }

    .intro-video {
        order: 2;
    }

    .product-grid {
        grid-template-columns: 1fr;
    }

    .contact-content {
        grid-template-columns: 1fr;
    }
}