/* ============================================
   assets/css/product-card.css
   تنسيقات بطاقة المنتج والفلاتر
   ============================================ */

/* ===== بطاقة المنتج ===== */
.product-card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.15);
}

/* صورة المنتج */
.product-image {
    height: 220px;
    background: linear-gradient(135deg, #e9ecef 0%, #dee2e6 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    position: relative;
    overflow: hidden;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.product-card:hover .product-image img {
    transform: scale(1.1);
}

/* شارة المنتج */
.product-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: linear-gradient(135deg, #947752 0%, #78480b 100%);
    color: white;
    padding: 4px 12px;
    border-radius: 30px;
    font-size: 0.7rem;
    font-weight: bold;
    z-index: 1;
}

/* معلومات المنتج */
.product-info {
    padding: 1.5rem;
    text-align: center;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.product-title {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: #333;
    line-height: 1.4;
}

.product-description {
    font-size: 0.85rem;
    color: #666;
    margin-bottom: 1rem;
    line-height: 1.5;
    flex: 1;
}

.product-category {
    display: inline-block;
    background: #f0f0f0;
    color: #78480b;
    padding: 2px 10px;
    border-radius: 20px;
    font-size: 0.7rem;
    margin-bottom: 0.5rem;
}

/* سعر المنتج */
.product-price {
    margin: 1rem 0;
}

.price-usd {
    font-size: 1.5rem;
    font-weight: 800;
    color: #947752;
}

.price-lbp {
    font-size: 0.9rem;
    color: #FF8F00;
    margin-top: 0.25rem;
}

/* تنبيه المخزون المنخفض */
.stock-warning {
    background: #fff3cd;
    color: #856404;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 0.7rem;
    margin-bottom: 1rem;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.stock-warning i {
    font-size: 0.7rem;
}

/* زر الإضافة للسلة */
.btn-add {
    background: linear-gradient(135deg, #947752 0%, #78480b 100%);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 30px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    width: 100%;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-add:hover {
    transform: scale(1.02);
    box-shadow: 0 5px 15px rgba(148,119,82,0.3);
}

.btn-add:active {
    transform: scale(0.98);
}

/* رسالة نجاح مؤقتة */
.btn-add.success {
    background: #28a745;
}

.btn-add.success i {
    animation: checkmark 0.3s ease;
}

@keyframes checkmark {
    0% { transform: scale(0); }
    80% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

/* ===== شبكة المنتجات ===== */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
}

/* عدم وجود منتجات */
.no-products {
    text-align: center;
    grid-column: 1/-1;
    padding: 3rem;
    background: white;
    border-radius: 20px;
}

.no-products i {
    color: #ccc;
    margin-bottom: 1rem;
}

.no-products p {
    color: #666;
    margin-bottom: 1rem;
}

.btn-admin {
    display: inline-block;
    background: linear-gradient(135deg, #947752 0%, #78480b 100%);
    color: white;
    padding: 0.6rem 1.5rem;
    border-radius: 30px;
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.3s;
}

.btn-admin:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(148,119,82,0.3);
}

/* ===== الفلاتر ===== */
.filters {
    background: white;
    padding: 1.5rem;
    border-radius: 20px;
    margin-bottom: 2rem;
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: flex-end;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.filter-group {
    flex: 1;
    min-width: 180px;
}

.filter-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #555;
    font-size: 0.85rem;
}

.filter-group label i {
    margin-left: 0.3rem;
    color: #947752;
}

.filter-group select,
.filter-group input {
    width: 100%;
    padding: 0.8rem 1rem;
    border: 1px solid #ddd;
    border-radius: 12px;
    font-family: inherit;
    font-size: 0.9rem;
    transition: all 0.3s;
}

.filter-group select:focus,
.filter-group input:focus {
    outline: none;
    border-color: #947752;
    box-shadow: 0 0 0 3px rgba(148,119,82,0.1);
}

.filter-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.btn-filter,
.btn-reset {
    padding: 0.8rem 1.2rem;
    border-radius: 12px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    border: none;
}

.btn-filter {
    background: linear-gradient(135deg, #947752 0%, #78480b 100%);
    color: white;
    flex: 1;
}

.btn-filter:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(148,119,82,0.3);
}

.btn-reset {
    background: #6c757d;
    color: white;
}

.btn-reset:hover {
    background: #5a6268;
    transform: translateY(-2px);
}

/* ===== عنوان الصفحة ===== */
.page-header {
    text-align: center;
    margin-bottom: 2rem;
}

.page-header h1 {
    color: #78480b;
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.product-count {
    color: #666;
    font-size: 0.9rem;
}

/* ===== تحسينات للجوال ===== */
@media (max-width: 768px) {
    .product-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .product-image {
        height: 200px;
    }
    
    .product-title {
        font-size: 1.1rem;
    }
    
    .price-usd {
        font-size: 1.3rem;
    }
    
    .filters {
        flex-direction: column;
    }
    
    .filter-group {
        width: 100%;
        min-width: auto;
    }
    
    .filter-actions {
        flex-direction: column;
    }
    
    .btn-filter,
    .btn-reset {
        width: 100%;
        justify-content: center;
    }
    
    .page-header h1 {
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    .product-image {
        height: 180px;
    }
    
    .product-info {
        padding: 1rem;
    }
    
    .btn-add {
        padding: 0.6rem 1rem;
    }
}