/* أنماط حقل البحث */
textarea[name="search"] {
    min-height: 4rem;
    max-height: 20rem;
    resize: none;
    transition: height 0.3s ease;
    overflow-y: hidden;
    line-height: 1.5;
    padding: 0.5rem;
}

textarea[name="search"].expanded {
    height: 10rem;
    overflow-y: auto;
}

/* أنماط الاقتراحات */
#suggestions {
    position: absolute;
    width: 100%;
    max-height: 200px;
    overflow-y: auto;
    background: white;
    border: 1px solid #ddd;
    border-radius: 0 0 4px 4px;
    z-index: 1000;
    display: none;
}

.suggestion-item {
    padding: 8px 12px;
    cursor: pointer;
}

.suggestion-item:hover {
    background-color: #f5f5f5;
}

.message {
    padding: 12px 16px;
    margin-bottom: 16px;
    border-radius: 4px;
    font-weight: 500;
    display: block;
    animation: fadeIn 0.5s, fadeOut 0.5s 4.5s;
    animation-fill-mode: forwards;
}

.message.success {
    background-color: #d1fae5;
    color: #065f46;
    border-left: 4px solid #10b981;
}

.message.error {
    background-color: #fee2e2;
    color: #b91c1c;
    border-left: 4px solid #ef4444;
}

.message.warning {
    background-color: #fef3c7;
    color: #92400e;
    border-left: 4px solid #f59e0b;
}

.message.info {
    background-color: #dbeafe;
    color: #1e40af;
    border-left: 4px solid #3b82f6;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeOut {
    from { opacity: 1; transform: translateY(0); }
    to { opacity: 0; transform: translateY(-10px); }
}
.product-card {
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    transition: all 0.3s ease;
}
.product-card:hover {
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}
.product-name {
    font-weight: 600;
    color: #1a365d;
}
.product-make {
    color: #e53e3e;
}
td,
th {
vertical-align: middle;
}

/* تنسيق خاص لخلايا المفضلة والتوفر */
.wishlist-cell,
.availability-cell {
width: 80px;
/* يمكن تعديل القيمة حسب الحاجة */
}

/* تنسيق النجمة في المفضلة */
.wishlist-star {
display: inline-flex;
align-items: center;
justify-content: center;
width: 24px;
height: 24px;
}

/* Notification System - Improved Version */
.notification-container {
position: fixed;
top: 1rem;
right: 1rem;
z-index: 9999;
display: flex;
flex-direction: column;
gap: 0.5rem;
max-width: 24rem;
}

.notification {
display: flex;
background-color: white;
border-radius: 0.5rem;
box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
padding: 1rem;
transition: all 0.3s ease;
position: relative;
overflow: hidden;
border-right: 4px solid;
transform: translateX(0);
opacity: 1;
}

/* Notification Types */
.notification.success {
border-right-color: #10b981;
}

.notification.error {
border-right-color: #ef4444;
}

.notification.warning {
border-right-color: #f59e0b;
}

.notification.info {
border-right-color: #ef4444;
}

/* Notification Icon */
.notification-icon {
margin-right: 0.75rem;
display: flex;
align-items: center;
font-size: 1.25rem;
}

.notification.success .notification-icon {
color: #10b981;
}

.notification.error .notification-icon {
color: #ef4444;
}

.notification.warning .notification-icon {
color: #f59e0b;
}

.notification.info .notification-icon {
color: #ef4444;
}

/* Notification Content */
.notification-content {
flex: 1;
min-width: 0;
}

.notification-title {
font-weight: 600;
margin-bottom: 0.25rem;
color: #111827;
}

.notification-message {
color: #6b7280;
font-size: 0.875rem;
line-height: 1.25;
}

/* Close Button */
.notification-close {
color: #9ca3af;
cursor: pointer;
padding: 0.25rem;
margin-left: 0.5rem;
transition: color 0.2s;
}

.notification-close:hover {
color: #6b7280;
}

/* Progress Bar */
.notification-progress {
position: absolute;
bottom: 0;
left: 0;
width: 100%;
height: 3px;
background-color: rgba(0, 0, 0, 0.05);
}

.notification-progress-bar {
height: 100%;
width: 100%;
transform-origin: left;
animation: progress 5s linear forwards;
}

.notification.success .notification-progress-bar {
background-color: #10b981;
}

.notification.error .notification-progress-bar {
background-color: #ef4444;
}

.notification.warning .notification-progress-bar {
background-color: #f59e0b;
}

.notification.info .notification-progress-bar {
background-color: #ef4444;
}

/* Animations */
@keyframes progress {
from {
transform: scaleX(1);
}

to {
transform: scaleX(0);
}
}

.notification.hide {
opacity: 0;
transform: translateX(100%);
transition: all 0.3s ease;
}

/* RTL Support */
html[dir="rtl"] .notification-container {
right: auto;
left: 1rem;
}

html[dir="rtl"] .notification {
border-right: none;
border-left: 4px solid;
}

html[dir="rtl"] .notification-icon {
margin-right: 0;
margin-left: 0.75rem;
}

html[dir="rtl"] .notification-close {
margin-left: 0;
margin-right: 0.5rem;
}

/* Responsive */
@media (max-width: 640px) {
.notification-container {
max-width: 90%;
right: 0.5rem;
left: 0.5rem;
}

.notification {
padding: 0.75rem;
}
}

/* Mobile Card Layout */
.mobile-cards {
display: none;
}

@media (max-width: 768px) {
.desktop-table {
display: none;
}

.mobile-cards {
display: block;
}

.mobile-card-item {
background: white;
border: 1px solid #e5e7eb;
border-radius: 0.5rem;
padding: 1rem;
margin-bottom: 1rem;
}

.mobile-card-row {
display: flex;
justify-content: space-between;
align-items: center;
padding: 0.5rem 0;
border-bottom: 1px solid #f3f4f6;
}

.mobile-card-row:last-child {
border-bottom: none;
}

.mobile-card-label {
font-weight: 500;
color: #6b7280;
}

.mobile-card-value {
display: flex;
align-items: center;
gap: 0.5rem;
}
}

/* Cart Mobile Styles */
@media (max-width: 768px) {
.cart-item-body {
flex-direction: column;
align-items: flex-start;
}

.quantity-controls {
margin-bottom: 10px;
width: 100%;
justify-content: space-between;
}

.cart-item-price {
align-self: flex-end;
}
}

.pagination-container {
display: flex;
justify-content: center;
margin: 20px 0;
gap: 5px;
}

.pagination-item,
.pagination-active {
padding: 5px 10px;
border: 1px solid #ddd;
text-decoration: none;
}

.pagination-active {
background-color: #C3002F;
color: white;
border-color: #C3002F;
}

.pagination-item:hover {
background-color: #f5f5f5;
}

.cart-container {
transition: all 0.3s ease;
}

.hidden-cart {
display: none;
}

@media (max-width: 768px) {
.mobile-cards {
display: block;
}

.desktop-table {
display: none;
}
}