/* Custom CSS for Latest Products Page */

/* Hero Section */
.latest-products-hero {
    /* تم تعديل هذا السطر ليحتوي على الصورة مع تظليل فوقها */
    /* [1] تظليل شبه شفاف: يجعل النص أوضح فوق الصورة */
    /* [2] مسار الصورة: استبدل 'path/to/your-image.jpg' بالمسار الفعلي لصورتك */
    background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url('../images/background-water.jpg');
    background-size: cover; /* تجعل الصورة تغطي المساحة بالكامل */
    background-position: center center; /* تضع الصورة في المنتصف */
    background-repeat: no-repeat; /* تمنع تكرار الصورة */
    color: #fff; /* تأكد أن النصوص بيضاء أو لون فاتح لتظهر فوق الخلفية */
    padding: 8rem 0; /* زيادة المساحة الرأسية */
    position: relative; /* مهم ليتيح لك استخدام z-index للعناصر المتداخلة */
    overflow: hidden; /* لمنع المحتوى الزائد من الظهور */

    /* تم إزالة خصائص background-size و animation المتعلقة بالتدرج اللوني القديم،
       حيث لم تعد تنطبق مباشرة على الخلفية التي أصبحت الآن صورة. */
}
.namew{
    background-color: var(--primary-color);
}

.latest-products-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* هذا هو كود الـ SVG الخاص بتأثير الفقاعات/التموجات الذي أردت الاحتفاظ به */
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" preserveAspectRatio="none"><path fill="rgba(255,255,255,0.1)" d="M0,0 L0,100 L100,100 L100,0 L0,0 Z M50,50 C75,25 75,75 50,100 C25,75 25,25 50,0 Z"></path></svg>');
    background-size: 150px 150px; /* حجم فقاعات الماء */
    opacity: 0.2; /* شفافية الفقاعات */
    animation: waterRipple 20s linear infinite; /* حركة الفقاعات */
    z-index: 1; /* تأكد أنها فوق الخلفية الرئيسية (الصورة والتظليل) */
}

/* تأكد أن المحتوى نفسه (النص والأزرار) له z-index أعلى ليظهر فوق الخلفية وتأثير الفقاعات */
.latest-products-hero .container {
    position: relative;
    z-index: 2; /* يجب أن يكون أعلى من z-index لـ ::before */
}

/* تم الاحتفاظ بالـ keyframes الخاص بـ gradientAnimation و waterRipple
   لكن gradientAnimation لم يعد يؤثر على الخلفية الرئيسية مباشرة */
@keyframes gradientAnimation {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes waterRipple {
    0% { transform: scale(1) rotate(0deg); opacity: 0.1; }
    50% { transform: scale(1.2) rotate(180deg); opacity: 0.3; }
    100% { transform: scale(1) rotate(360deg); opacity: 0.1; }
}

/* -------------------------------------------------------- */
/* باقي أكواد CSS كما هي لم يتم تعديلها */
/* -------------------------------------------------------- */

.bg-light-blue {
    background-color: #f0f8ff; /* لون أزرق فاتح جداً للخلفية */
}

.section-header {
    margin-bottom: 3rem;
}

.section-subtitle {
    color: #007bff; /* لون أزرق للعنوان الفرعي */
    letter-spacing: 1px;
}

.section-main-title {
    font-weight: 700;
    line-height: 1.2;
}

/* Product Card Styling */
.product-card {
    border: none;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
    background-color: #ffffff;
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 1rem 3rem rgba(0, 123, 255, 0.2) !important; /* ظل أزرق جذاب عند التحويم */
}

.product-image-container {
    height: 250px; /* ارتفاع ثابت للصور للحفاظ على التناسق */
    overflow: hidden;
    position: relative;
    background-color: var(--primary-color); /* خلفية خفيفة في حالة عدم وجود صورة */
    border-bottom: 1px solid var(--primary-color);
}

.product-main-img {
    height: 100%;
    width: 100%;
    object-fit: contain; /* للحفاظ على أبعاد الصورة مع ملء المساحة */
    transition: transform 0.5s ease;
}

.product-card:hover .product-main-img {
    transform: scale(1.05); /* تكبير خفيف للصورة عند التحويم */
}

.product-badge-new {
    position: absolute;
    top: 15px;
    right: 15px;
    padding: 0.5em 1em;
    font-size: 0.9em;
    font-weight: bold;
    border-radius: 50px;
    background-color: #28a745 !important; /* لون أخضر للجديد */
    color: #fff;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.product-title {
    color: #0056b3; /* أزرق أغمق للعناوين */
    font-weight: 600;
}

.product-short-desc {
    font-size: 0.95em;
    color: #555;
    min-height: 45px; /* لمنع اهتزاز البطاقات إذا كان الوصف قصيرًا جدًا */
}

.product-pricing .old-price {
    font-size: 0.9em;
    color: #dc3545; /* أحمر للسعر القديم */
}

.product-pricing .current-price {
    color: #28a745; /* أخضر للسعر الجديد/الحالي */
}

/* Modal Styling */
#productDetailsModal .modal-content {
    border: none;
}

#productDetailsModal .modal-title {
    color: #007bff;
}

#modalProductImage {
    border: 1px solid #eee;
    padding: 10px;
}

#modalProductFullDesc {
    line-height: 1.8;
    color: #444;
}

.product-features-list li {
    margin-bottom: 8px;
    font-size: 1.05em;
    color: #333;
}
.product-features-list li i {
    color: #28a745; /* لون أخضر لأيقونة الصح */
}

/* Responsive Adjustments */
@media (max-width: 767.98px) {
    .latest-products-hero {
        padding: 6rem 0;
    }
    .latest-products-hero h1 {
        font-size: 2.5rem;
    }
    .latest-products-hero p {
        font-size: 1rem;
    }
    .section-main-title {
        font-size: 2.2rem;
    }
    .product-image-container {
        height: 200px;
    }
}