/* ==========================================
   🎯 كارت المنتج وتثبيت الأبعاد
   ========================================== */
.custom-product-card {
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.custom-product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.08) !important;
}

.product-thumb-container {
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background-color: #f3f4f6;
}

.product-thumb-img {
    aspect-ratio: 1 / 1;
    object-fit: cover;
    transition: transform 0.35s ease;
}

.custom-product-card:hover .product-thumb-img {
    transform: scale(1.05);
}

.product-card-title {
    min-height: 42px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.4;
}

.min-h-badges {
    min-height: 24px;
}

.min-h-price-row {
    min-height: 34px;
}

/* ضمان بقاء السعر والخصم في سطر واحد دون انكسار */
.price-container-single-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    flex-wrap: nowrap !important;
    gap: 6px;
}

.price-main-text {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.price-discount-badge {
    white-space: nowrap;
    flex-shrink: 0;
}

/* ==========================================
   🎀 شريط الخصم المائل 45° أعلى اليسار
   ========================================== */
.product-ribbon-corner-left {
    position: absolute;
    top: 0;
    left: 0;
    width: 85px;
    height: 85px;
    overflow: hidden;
    pointer-events: none;
}

.product-ribbon-corner-left .ribbon-inner {
    position: absolute;
    display: block;
    width: 125px;
    padding: 5px 0;
    background: linear-gradient(135deg, #ef4444, #dc2626);
    box-shadow: 0 3px 6px rgba(220, 38, 38, 0.4);
    color: #ffffff;
    font-size: 11px;
    font-weight: 800;
    text-align: center;
    left: -32px;
    top: 18px;
    transform: rotate(-45deg);
    letter-spacing: 0.5px;
    direction: ltr;
}

/* ==========================================
   🖱️ أزرار الإجراءات (Hover Effect على الشاشات الكبيرة)
   ========================================== */
.product-card-actions {
    transition: opacity 0.25s ease, transform 0.25s ease;
}

@media (min-width: 992px) {
    .product-card-actions {
        opacity: 0;
        transform: translateX(-6px);
        pointer-events: none;
    }

    .custom-product-card:hover .product-card-actions {
        opacity: 1;
        transform: translateX(0);
        pointer-events: auto;
    }
}

@media (max-width: 991.98px) {
    .product-card-actions {
        opacity: 1;
        transform: none;
    }
}

/* ==========================================
   ✨ تأثير الشيمر (Shimmer Loading)
   ========================================== */
.shimmer-placeholder {
    background: linear-gradient(90deg, #f3f4f6 25%, #e5e7eb 50%, #f3f4f6 75%);
    background-size: 200% 100%;
    animation: shimmerEffect 1.5s infinite linear;
}

@keyframes shimmerEffect {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}