/* التنسيقات العامة */
:root {
    --primary-color: #007bff;
    --secondary-color: #6c757d;
    --success-color: #28a745;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #17a2b8;
    --light-color: #f8f9fa;
    --dark-color: #343a40;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
}

/* بطاقة المنتج */
.product-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: none;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.15);
}

.discount-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 1;
}

/* معرض الصور */
.thumbnail {
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.thumbnail:hover {
    border-color: var(--primary-color);
}

.thumbnail.active {
    border-color: var(--primary-color);
}

/* سلة التسوق */
.cart-item {
    transition: background-color 0.3s ease;
}

.cart-item:hover {
    background-color: var(--light-color);
}

.quantity-controls {
    display: inline-flex;
    align-items: center;
    border: 1px solid #dee2e6;
    border-radius: 0.375rem;
    overflow: hidden;
}

.quantity-controls button {
    border: none;
    background: #f8f9fa;
    padding: 0.375rem 0.75rem;
    cursor: pointer;
}

.quantity-controls button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.quantity-controls .quantity {
    padding: 0.375rem 0.75rem;
    min-width: 50px;
    text-align: center;
    background: white;
}

/* النجوم */
.stars {
    color: var(--warning-color);
}

/* الألوان */
.color-option {
    transition: all 0.3s ease;
    border: 2px solid transparent !important;
}

.color-option:hover {
    transform: scale(1.1);
    border-color: var(--primary-color) !important;
}

.color-option.active {
    border-color: var(--primary-color) !important;
    transform: scale(1.1);
}

/* التنبيهات */
.alert {
    border: none;
    border-radius: 0.5rem;
}

.alert-success {
    background-color: #d1e7dd;
    color: #0f5132;
}

.alert-danger {
    background-color: #f8d7da;
    color: #721c24;
}

.alert-warning {
    background-color: #fff3cd;
    color: #856404;
}

/* التجاوب مع الأجهزة المختلفة */
@media (max-width: 768px) {
    .navbar-nav {
        text-align: center;
    }
    
    .search-filter .row {
        margin-bottom: 1rem;
    }
    
    .product-card {
        margin-bottom: 1rem;
    }
    
    .cart-item {
        text-align: center;
    }
    
    .cart-item .col-md-2 {
        margin-bottom: 1rem;
    }
}

@media (max-width: 576px) {
    .container {
        padding-left: 10px;
        padding-right: 10px;
    }
    
    .btn {
        font-size: 0.875rem;
    }
}

/* تخصيص Bootstrap للغة العربية */
[dir="rtl"] .me-2 {
    margin-left: 0.5rem !important;
    margin-right: 0 !important;
}

[dir="rtl"] .ms-2 {
    margin-right: 0.5rem !important;
    margin-left: 0 !important;
}

[dir="rtl"] .text-end {
    text-align: left !important;
}

[dir="rtl"] .text-start {
    text-align: right !important;
}