/* 1. الهيدر والشعار */
header, .site-header { height: auto !important; }
img[alt="LUNEVAL"] {
    max-height: 80px !important;
    width: auto !important;
    object-fit: contain !important;
    padding: 5px 0;
}

/* 2. تحسين جودة البانر */
.hero-banner img {
    image-rendering: auto;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
}

/* 3. الشبكة (2 في الجوال و 4 في الكمبيوتر) */
div[data-grid-root="true"] {
    background-color: #f0eee4 !important;
    display: grid !important;
    gap: 8px !important;
    padding: 8px !important;
}

@media (max-width: 1023px) {
    div[data-grid-root="true"] {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }
}

@media (min-width: 1024px) {
    div[data-grid-root="true"] {
        grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
        max-width: 1300px !important;
        margin: 0 auto !important;
    }
}

/* 4. كرت المنتج والصور */
div[data-product-card] {
    background-color: #ffffff !important;
    border-radius: 2px !important;
    display: flex !important;
    flex-direction: column !important;
    padding: 10px !important; /* مساحة داخلية متناسقة للكرت */
}

div[data-product-card] img {
    width: 100% !important;
    aspect-ratio: 1/1 !important;
    object-fit: cover !important;
    margin-bottom: 8px !important;
}

/* 5. تنسيق الأسماء والأسعار ومحاذاتها لليمين تماماً */
div[data-product-card] h3,
div[data-product-card] .product-title,
div[data-product-card] a[href*="/products/"] {
    text-align: right !important;
    direction: rtl !important;
    font-size: 13px !important; /* حجم أنيق ومناسب للعمودين */
    line-height: 1.4 !important;
    margin: 4px 0 !important;
    display: block !important;
    color: #222222 !important;
}

div[data-product-card] .product-price,
div[data-product-card] .price,
div[data-product-card] [class*="price"] {
    text-align: right !important;
    direction: rtl !important;
    font-size: 13px !important;
    font-weight: bold !important;
    margin-top: auto !important; /* يدفع السعر ليكون دائماً في أسفل الكرت وبنفس المحاذاة */
    display: block !important;
}

/* 6. التنظيف النهائي (إخفاء الأزرار، النجوم، وأرقام التقييم المتبقية) */
div[data-product-card] button.btn-outlined,
div[data-product-card] button.w-full,
div[data-product-card] .review-stars,
div[data-product-card] .rating,
div[data-product-card] [class*="rating"],
div[data-product-card] [class*="review"],
div[data-product-card] svg { 
    display: none !important;
}

/* استثناء لحماية أيقونة القلب والمفضلة */
div[data-product-card] button[class*="wishlist"],
div[data-product-card] svg[class*="heart"],
div[data-product-card] .wishlist-icon {
    display: inline-flex !important;
    visibility: visible !important;
}