/* تحسينات إضافية لتصميم المنيو - محسنة للموبايل */

/* تحسينات للبطاقات - محسنة للمس */
.product-card {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform, box-shadow;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.product-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
}

.product-card:active {
    transform: translateY(0);
    transition: transform 0.1s ease;
}

/* تحسينات للصور */
.product-image {
    transition: transform 0.3s ease;
}

.product-card:hover .product-image {
    transform: scale(1.02);
}

/* تحسينات للنصوص */
.product-name {
    transition: color 0.3s ease;
}

.product-card:hover .product-name {
    color: var(--primary);
}

/* تحسينات للأزرار */
.add-to-cart-btn {
    position: relative;
    overflow: hidden;
}

.add-to-cart-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.add-to-cart-btn:hover::before {
    left: 100%;
}

/* تحسينات للتصميم المتجاوب */
@media (max-width: 768px) {
    .product-card {
        margin-bottom: 12px;
    }
    
    .product-content {
        padding: 16px 12px;
    }
    
    .product-name {
        font-size: 1.1rem;
        line-height: 1.2;
    }
    
    .product-description {
        font-size: 0.85rem;
        line-height: 1.3;
    }
}

@media (max-width: 480px) {
    .product-card {
        margin-bottom: 10px;
    }
    
    .product-content {
        padding: 12px 10px;
    }
    
    .product-name {
        font-size: 1rem;
        margin-bottom: 4px;
    }
    
    .product-description {
        font-size: 0.8rem;
        margin-bottom: 6px;
    }
    
    .add-to-cart-btn {
        font-size: 0.75rem;
        padding: 6px 10px;
    }
}

/* تحسينات للظلال والحدود */
.product-card {
    border: 1px solid rgba(0, 0, 0, 0.05);
    backdrop-filter: blur(10px);
}

.product-card:hover {
    border-color: rgba(220, 53, 69, 0.2);
}

/* تحسينات للانتقالات */
* {
    transition: all 0.3s ease;
}

/* تحسينات للألوان */
.product-price .price-amount {
    background: linear-gradient(135deg, var(--primary), #e74c3c);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* تحسينات للعرض */
.product-card {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
}

/* تحسينات للوصولية */
.product-card:focus-within {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* تحسينات خاصة بالموبايل */
@media (max-width: 768px) {
    /* تحسينات للمس */
    .product-card {
        touch-action: manipulation;
        -webkit-touch-callout: none;
        -webkit-user-select: none;
        -khtml-user-select: none;
        -moz-user-select: none;
        -ms-user-select: none;
        user-select: none;
    }
    
    /* تحسينات للفئات */
    .category-tabs {
        scroll-behavior: smooth;
        -webkit-overflow-scrolling: touch;
    }
    
    /* تحسينات للبحث */
    .search-input {
        -webkit-appearance: none;
        border-radius: 25px;
    }
    
    /* تحسينات للأزرار */
    .add-to-cart-btn, .cart-toggle {
        min-height: 44px; /* الحد الأدنى للمس */
        touch-action: manipulation;
    }
    
    /* تحسينات للعرض السريع */
    .product-card {
        contain: layout style paint;
    }
    
    /* تحسينات للخطوط */
    body {
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
        text-rendering: optimizeLegibility;
    }
}

/* تحسينات للشاشات الصغيرة جداً */
@media (max-width: 480px) {
    /* تحسينات إضافية للمس */
    .product-card {
        min-height: 44px; /* الحد الأدنى للمس */
    }
    
    /* تحسينات للفئات */
    .category-tab {
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    /* تحسينات للبحث */
    .search-input {
        min-height: 44px;
        font-size: 16px; /* منع التكبير في iOS */
    }
    
    /* تحسينات للعرض */
    .product-image {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
}

/* تحسينات للطباعة */
@media print {
    .product-card {
        box-shadow: none;
        border: 1px solid #ccc;
        break-inside: avoid;
    }
}
