/* Mega Tech Store - الأنماط المخصصة */

:root {
    --primary-color: #0d6efd;
    --secondary-color: #6c757d;
    --success-color: #198754;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #0dcaf0;
    --light-color: #f8f9fa;
    --dark-color: #212529;
    --border-radius: 8px;
    --box-shadow: 0 2px 15px rgba(0,0,0,0.1);
    --transition: all 0.3s ease;
}

/* أنماط عامة */
body {
    font-family: 'Segoe UI', 'Tahoma', 'Geneva', 'Verdana', sans-serif;
    color: #333;
    line-height: 1.6;
}

a {
    text-decoration: none;
    color: var(--primary-color);
    transition: var(--transition);
}

a:hover {
    color: #0a58ca;
}

/* تحسينات Bootstrap */
.btn {
    border-radius: var(--border-radius);
    padding: 0.5rem 1.5rem;
    font-weight: 500;
    transition: var(--transition);
}

.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-primary:hover {
    background-color: #0a58ca;
    border-color: #0a58ca;
    transform: translateY(-2px);
    box-shadow: var(--box-shadow);
}

.btn-outline-primary:hover {
    transform: translateY(-2px);
}

.card {
    border-radius: var(--border-radius);
    border: 1px solid rgba(0,0,0,0.125);
    box-shadow: var(--box-shadow);
    transition: var(--transition);
}

.card:hover {
    box-shadow: 0 5px 20px rgba(0,0,0,0.15);
}

/* شريط التنقل */
.navbar {
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    padding: 1rem 0;
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--primary-color) !important;
}

.nav-link {
    font-weight: 500;
    padding: 0.5rem 1rem !important;
    border-radius: var(--border-radius);
    margin: 0 0.2rem;
}

.nav-link:hover {
    background-color: rgba(13, 110, 253, 0.1);
}

/* بطاقات المنتجات */
.product-card {
    border: 1px solid #e9ecef;
    border-radius: var(--border-radius);
    overflow: hidden;
    height: 100%;
    transition: var(--transition);
    position: relative;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
}

.product-image-container {
    height: 200px;
    overflow: hidden;
    position: relative;
}

.product-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.product-card:hover .product-image {
    transform: scale(1.05);
}

.product-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 2;
}

.product-body {
    padding: 1.25rem;
}

.product-title {
    font-weight: 600;
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    color: var(--dark-color);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    height: 3rem;
}

.product-price {
    color: var(--primary-color);
    font-weight: 700;
    font-size: 1.25rem;
}

.product-old-price {
    color: var(--danger-color);
    text-decoration: line-through;
    font-size: 0.9rem;
    margin-right: 0.5rem;
}

/* قسم الهيرو */
.hero-section {
    background: linear-gradient(135deg, var(--primary-color) 0%, #4a6cf7 100%);
    color: white;
    border-radius: var(--border-radius);
    padding: 4rem 2rem;
    margin-bottom: 3rem;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('../images/pattern.png') repeat;
    opacity: 0.1;
}

.hero-content {
    position: relative;
    z-index: 1;
}

/* الفوتر */
.footer {
    background-color: var(--dark-color);
    color: white;
    padding: 3rem 0;
    margin-top: 4rem;
}

.footer h5 {
    color: white;
    margin-bottom: 1.5rem;
    font-weight: 600;
}

.footer-links a {
    color: rgba(255,255,255,0.8);
    display: block;
    margin-bottom: 0.5rem;
    transition: var(--transition);
}

.footer-links a:hover {
    color: white;
    padding-right: 0.5rem;
}

.footer-social a {
    display: inline-block;
    width: 40px;
    height: 40px;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
    text-align: center;
    line-height: 40px;
    margin-left: 0.5rem;
    transition: var(--transition);
}

.footer-social a:hover {
    background: var(--primary-color);
    transform: translateY(-3px);
}

/* صفحة المنتج */
.product-gallery {
    margin-bottom: 2rem;
}

.product-main-image {
    border-radius: var(--border-radius);
    overflow: hidden;
    margin-bottom: 1rem;
}

.product-thumbnails {
    display: flex;
    gap: 0.5rem;
}

.product-thumbnail {
    width: 80px;
    height: 80px;
    border-radius: var(--border-radius);
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    transition: var(--transition);
}

.product-thumbnail.active {
    border-color: var(--primary-color);
}

.product-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* سلة التسوق */
.cart-item {
    border-bottom: 1px solid #eee;
    padding: 1rem 0;
}

.cart-item:last-child {
    border-bottom: none;
}

.quantity-input {
    width: 70px;
    text-align: center;
}

/* لوحة التحكم */
.sidebar-menu {
    background: var(--light-color);
    border-radius: var(--border-radius);
    padding: 1rem;
}

.sidebar-menu .nav-link {
    color: var(--dark-color);
    padding: 0.75rem 1rem !important;
    margin: 0.25rem 0;
    border-radius: var(--border-radius);
}

.sidebar-menu .nav-link.active {
    background: var(--primary-color);
    color: white;
}

.sidebar-menu .nav-link:hover:not(.active) {
    background: rgba(13, 110, 253, 0.1);
}

/* تتبع الطلب */
.timeline {
    position: relative;
    padding: 2rem 0;
}

.timeline::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    right: 50%;
    width: 2px;
    background: var(--primary-color);
    transform: translateX(50%);
}

.timeline-step {
    position: relative;
    margin-bottom: 2rem;
}

.timeline-step.completed .timeline-icon {
    background: var(--success-color);
    color: white;
}

.timeline-step.current .timeline-icon {
    background: var(--primary-color);
    color: white;
    transform: scale(1.1);
    box-shadow: 0 0 0 10px rgba(13, 110, 253, 0.2);
}

.timeline-icon {
    width: 50px;
    height: 50px;
    background: var(--light-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin: 0 auto 1rem;
    position: relative;
    z-index: 1;
    transition: var(--transition);
}

.timeline-content {
    text-align: center;
    padding: 0 1rem;
}

/* أنماط متجاوبة */
@media (max-width: 768px) {
    .hero-section {
        padding: 2rem 1rem;
        text-align: center;
    }
    
    .product-card {
        margin-bottom: 1.5rem;
    }
    
    .timeline::before {
        right: 30px;
    }
    
    .timeline-step {
        padding-right: 60px;
    }
    
    .timeline-icon {
        position: absolute;
        right: 0;
        margin: 0;
    }
}

/* تحسينات للطباعة */
@media print {
    .no-print {
        display: none !important;
    }
    
    .container {
        width: 100% !important;
        max-width: none !important;
    }
    
    .card {
        border: none !important;
        box-shadow: none !important;
    }
}

/* الرسوم المتحركة */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.5s ease-out;
}

/* شريط التحميل */
.loading {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255,255,255,0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 5px solid #f3f3f3;
    border-top: 5px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* رسائل التنبيه */
.alert {
    border-radius: var(--border-radius);
    border: none;
    box-shadow: var(--box-shadow);
}

.alert-dismissible .btn-close {
    padding: 1rem;
}

/* أشكال خاصة */
.ribbon {
    position: absolute;
    top: 10px;
    left: -10px;
    background: var(--danger-color);
    color: white;
    padding: 0.25rem 1rem;
    font-size: 0.8rem;
    font-weight: 600;
    z-index: 2;
}

.ribbon::before {
    content: '';
    position: absolute;
    top: 100%;
    left: 0;
    border-width: 5px;
    border-style: solid;
    border-color: #b02a37 transparent transparent #b02a37;
}

/* تظليل الأزرار */
.btn-shadow {
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.btn-shadow:hover {
    box-shadow: 0 6px 20px rgba(0,0,0,0.25);
}

/* خلفيات خاصة */
.bg-gradient {
    background: linear-gradient(135deg, var(--primary-color) 0%, #4a6cf7 100%);
}

/* حدود دائرية */
.rounded-lg {
    border-radius: 15px;
}

.rounded-xl {
    border-radius: 20px;
}

