

/* حاوية الصورة مع تأثير التقليب */
.product-img-container {
    position: relative;
    width: 100%;
    height: 180px;
    perspective: 1000px;
}

.flip-card {
    width: 100%;
    height: 100%;
    position: relative;
    cursor: pointer;
}

.flip-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    text-align: center;
    transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    transform-style: preserve-3d;
    border-radius: 12px;
}

.flip-card:hover .flip-card-inner {
    transform: rotateY(180deg);
}

/* الوجه الأمامي والخلفي */
.flip-card-front, .flip-card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    border-radius: 12px 12px 0 0;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.flip-card-front {
    background: white;
}

.flip-card-front img {
    width: 100%;
    height: auto;
    object-fit: contain;
    transition: transform 0.5s ease;
}

.flip-card:hover .flip-card-front img {
    transform: scale(1.05);
}

.flip-card-back {
    background:black;
    color: white;
    transform: rotateY(180deg);
    padding: 25px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}

/* تنسيق المكونات */
.ingredients-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 15px;
}

.ingredients-content h3 {
    color: #fff;
    font-size: 1.3rem;
    margin-bottom: 5px;
    position: relative;
    padding-bottom: 10px;
    font-weight: 600;
}

.ingredients-content h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 50px;
    height: 2px;
    background: linear-gradient(to right, transparent, #f0a500, transparent);
}

.ingredients-text {
    color: #e0e0e0;
    font-size: 0.90rem;
    line-height: 1.4;
    margin-bottom: -5px;
    text-align: center;
    padding: 0 10px;
}

.ingredients-footer {
    margin-top: 10px;
    padding-top: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    width: 100%;
}

.ingredients-footer span {
    color: #f0a500;
    font-size: 0.85rem;
    font-style: italic;
}

/* تأثيرات إضافية */
.flip-card {
    transition: transform 0.1s ease;
}

.flip-card:hover {
    transform: translateY(-5px);
}

/* تأثير الوهج */
.flip-card-back::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(240,190,0,0.1) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.5s ease;
}

.flip-card:hover .flip-card-back::before {
    opacity: 1;
}


@media (min-width: 768px) {
    .product-img-container {
    height: 250px;
  
      }
}



.promo-badge {
    position: absolute;
    top:19%; /* وسط البطاقة رأسيًا */
    right: -6px;
    transform: translateY(-50%); /* نحركه باش يكون فعليًا في الوسط */
    background-color: red;
    color: white;
    padding: 8px 5px;
    font-size: 12px;
    font-weight: bold;
    text-align: center;
    width: 25px;
    height: auto;
    min-height: 80px;
    writing-mode: vertical-rl;
    text-orientation: mixed;
    line-height: 1.4;
    z-index: 10;
    border-radius: 3px 0 0 3px;
    box-shadow: -2px 2px 5px rgba(0,0,0,0.2);
}

.promo-badge span {
    display: inline-block;
    transform: rotate(180deg);
    padding: 5px 0;
}

/* الظل للمزيد من التأثير */
.promo-badge::before {
    content: '';
    position: absolute;
    top: 8%;
    right: 100%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-right: 8px solid red;
    border-top: 8px solid transparent;
    border-bottom: 8px solid transparent;
}



/* تنسيقات عداد المشتريات الدائري الذهبي في الزاوية */
.product-card {
    position: relative;
    overflow: hidden;
}

.product-card .purchase-badge {
    position: absolute;
    bottom: 40%;
    left: 12px;
    width: 45px;
    height: 45px;
    background: radial-gradient(circle, #FFD700 0%, #D4AF37 70%, #B8860B 100%);
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #8B4513;
    font-weight: bold;
    box-shadow: 0 4px 12px rgba(212, 175, 55, 0.4);
    z-index: 10;
    border: 2px solid rgba(255, 215, 0, 0.8);
    overflow: hidden;
    transition: all 0.3s ease;
}

.product-card .purchase-badge::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    border-radius: 50%;
    animation: goldShine 3s infinite linear;
    z-index: -1;
}

.product-card .purchase-badge:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 16px rgba(212, 175, 55, 0.6);
}

.product-card .purchase-count {
    font-size: 11px;
    font-weight: 800;
    line-height: 1;
    text-align: center;
    z-index: 2;
    text-shadow: 0 1px 1px rgba(255, 255, 255, 0.5);
}

.product-card .purchase-count .number {
    font-size: 14px;
    display: block;
    margin-bottom: 1px;
}

.product-card .purchase-count .text {
    font-size: 7px;
    display: block;
    opacity: 0.9;
    font-weight: 700;
    letter-spacing: 0.5px;
}

/* تأثيرات الحركة للذهب */
@keyframes goldShine {
    0% { transform: rotate(0deg); opacity: 0.5; }
    50% { opacity: 0.8; }
    100% { transform: rotate(360deg); opacity: 0.5; }
}

@keyframes goldPulse {
    0% { transform: scale(1); box-shadow: 0 4px 12px rgba(212, 175, 55, 0.4); }
    50% { transform: scale(1.1); box-shadow: 0 6px 18px rgba(212, 175, 55, 0.7); }
    100% { transform: scale(1); box-shadow: 0 4px 12px rgba(212, 175, 55, 0.4); }
}

.purchase-badge.updating {
    animation: goldPulse 0.8s ease-in-out;
}

/* تأثير الإشعار عند التحديث */
.purchase-update-notification {
    position: absolute;
    bottom: 0px;
    right: 5px;
    background:red;
    color: white;
    font-size: 5px;
    padding: 2px 5px;
    border-radius: 8px;
    font-weight: bold;
    animation: notificationFade 2s ease-in-out;
    z-index: 20;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    white-space: nowrap;
}

@keyframes notificationFade {
    0%, 100% { opacity: 0; transform: translateY(0) scale(0.8); }
    20%, 80% { opacity: 1; transform: translateY(-3px) scale(1); }
}

/* تأثير للأرقام عند التغيير */
@keyframes numberChange {
    0% { transform: scale(1); color: #8B4513; }
    50% { transform: scale(1.3); color: #FF4500; }
    100% { transform: scale(1); color: #8B4513; }
}

.number-changing {
    animation: numberChange 0.5s ease-in-out;
    }
         




.product-info {
    position: relative;
    padding: 20px;
    text-align: center;
}

.product-card h3 {
    position: relative;
    display: inline-block;
    background-color: white; /* خلفية سوداء داكنة */
    color: black; /* النص أبيض */
    padding: 6px 12px; /* أصغر شوي */
    font-size: 16px; /* حجم النص أصغر شوي */
    font-weight: 600;
    text-transform: uppercase;
    border-radius: 4px; /* أصغر شوي */
    
    letter-spacing: 1px;
}

/* السهم فوق العنوان في الوسط */
.product-card h3::before {
    content: '';
    position: absolute;
    top: -10px; /* رفع السهم فوق العنوان */
    left: 50%; /* في الوسط */
    transform: translateX(-50%); /* لضبطه في الوسط بالضبط */
    width: 0;
    height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-bottom: 8px solid #222; /* السهم لأسفل بلون الخلفية */
}

/* تأثير shine خفيف */
.product-card h3::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 50%;
    height: 100%;
    background: linear-gradient(120deg, rgba(255,255,255,0.2), rgba(255,255,255,0));
    border-radius: 4px;
    pointer-events: none;
    transform: skewX(-20deg);
    }

@media (max-width: 768px) {
    
.ingredients-text {
    color: #e0e0e0;
    font-size: 4rem;
    line-height: 5;
    margin-bottom: -5px;
    text-align: center;
    padding: 0 10px;
}
}


/* للهواتف الصغيرة */
@media (max-width: 480px) {
    
.ingredients-text {
    color: #e0e0e0;
    font-size: 0.45rem;
    line-height: 0.90;
    margin-bottom: -5px;
    text-align: center;
    padding: 0 10px;
}
}

