/* =====================
   Custom Modern Product Card
===================== */

/* النصوص المميزة */
.text-red-400 {
    font-size: 0.8rem;   
    color: #000000;
    font-weight: 500;
}

/* الرابط الأساسي يغطي كامل الكارد */
.product-card-container {
    position: relative;
    display: block;
    height: 100%;
    text-decoration: none;
    color: inherit;
    perspective: 1000px; /* تأثير ثلاثي الأبعاد على hover */
}

/* تصميم الكارد */
.product-card {
    position: relative;
    background: #ffffff;
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08), 0 0 0 1px rgba(0,0,0,0.03);
    display: flex;
    flex-direction: column;
    height: 100%;
  
}

/* تأثير hover للكارد */
.product-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2), 0 0 0 1px rgba(0,0,0,0.05);
    background: linear-gradient(135deg, #ffffff, #f8fafc);
}

/* الصورة */
.product-card__image {
    position: relative;
    width: 100%;
    height: 230px;
    overflow: hidden;
    border-bottom-left-radius: 16px;
    border-bottom-right-radius: 16px;
}

.product-card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.7s ease, filter 0.7s ease;
}

.product-card:hover .product-card__image img {
    transform: scale(1.1) rotate(1deg);
    filter: brightness(1.05) contrast(1.05);
}

/* محتوى الكارد */
.product-card__content {
    padding: 5px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    gap: 6px;
}

/* العنوان */
.product-card__title {
    flex-grow: 1;
    margin-bottom: 4px;
}

.product-card__title a {
    font-size: 1rem;
    font-weight: 600;
    color: #1a202c;
    text-decoration: none;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    pointer-events: none;
}

.product-card__title a:hover {
    color: #4a5568;
}

/* السعر */
.product-card__price {
    margin-top: auto;
}

.product-card__price h4 {
    font-weight: 700;
    font-size: 1.3rem;
    color: #2d3748;
    margin: 0 0 6px 0;
}

.product-card__price span {
    display: block;
    font-size: 0.9rem;
    color: #718096;
}

/* Badge حصري */
.product-card--exclusive::before {
    content: "حصري";
    position: absolute;
    top: 12px;
    right: 12px;
    background: #e53e3e;
    color: white;
    padding: 6px 10px;
    border-radius: 10px;
    font-size: 0.8rem;
    font-weight: 700;
    z-index: 10;
    box-shadow: 0 2px 6px rgba(0,0,0,0.3);
    transition: transform 0.3s ease;
}

.product-card:hover.product-card--exclusive::before {
    transform: translateY(-3px) scale(1.05);
}

/* Badge تخفيض */
.product-card--sale::after {
    content: "خصم!";
    position: absolute;
    top: 12px;
    left: 12px;
    background: #38b2ac;
    color: white;
    padding: 6px 10px;
    border-radius: 10px;
    font-size: 0.8rem;
    font-weight: 700;
    z-index: 10;
    box-shadow: 0 2px 6px rgba(0,0,0,0.3);
    transition: transform 0.3s ease;
}

.product-card:hover.product-card--sale::after {
    transform: translateY(-3px) scale(1.05);
}

/* الزر */
.product-card__button {
    margin-top: 16px;
    position: relative;
    z-index: 10;
}

.product-card__button .btn {
    width: 100%;
    background: linear-gradient(135deg, #2d3748, #4a5568);
    color: white;
    border: none;
    padding: 12px;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
    letter-spacing: 0.5px;
    pointer-events: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.product-card__button .btn:hover {
    background: linear-gradient(135deg, #4a5568, #2d3748);
    transform: scale(1.05);
}

/* تأثير ripple عند النقر */
.product-card__button .btn:active {
    transform: scale(0.97);
    transition: transform 0.1s ease;
}

/* متجاوب */
@media (max-width: 768px) {
    .product-card__content {
        padding: 14px;
    }
    
    .product-card__title a {
        font-size: 0.95rem;
    }
    
    .product-card__price h4 {
        font-size: 1.15rem;
    }
    
    .product-card__image {
        height: 180px;
    }
}

/* رابط يغطي الكارد بالكامل */
a.product-card-link {
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    opacity: 0;
}