أحدث تشكيلة iPhone

:root { --bg-color: #f0f2f5; --card-bg: #ffffff; --accent-orange: #ff9f43; --accent-green: #2ecc71; --text-main: #333; --text-muted: #666; --shadow-light: 0 5px 15px rgba(0,0,0,0.08); --shadow-hover: 0 15px 30px rgba(0,0,0,0.15); --border-radius: 15px; --button-hover-color: #25a25a; /* Glassmorphism for concepts */ --glass-bg: rgba(255, 255, 255, 0.6); --glass-border: 1px solid rgba(255, 255, 255, 0.3); --glass-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.1); } body { font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; background-color: var(--bg-color); margin: 0; padding: 20px; color: var(--text-main); line-height: 1.6; direction: rtl; /* لكي يكون المتصفح من اليمين لليسار */ } header { text-align: center; margin-bottom: 50px; padding: 20px; background: linear-gradient(to left, #6dd5ed, #2193b0); color: white; border-radius: var(--border-radius); box-shadow: var(--shadow-light); } h1 { font-size: 2.8rem; margin: 0; text-shadow: 2px 2px 4px rgba(0,0,0,0.2); } .grid-container { display: grid; /* Responsive grid: min 280px, max fill the space */ grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 30px; max-width: 1300px; margin: 0 auto; } .product-card { background: var(--card-bg); border-radius: var(--border-radius); padding: 25px; text-align: center; position: relative; box-shadow: var(--shadow-light); transition: transform 0.3s ease, box-shadow 0.3s ease; display: flex; flex-direction: column; align-items: center; justify-content: space-between; /* Ensures buttons align at bottom */ min-height: 400px; /* Consistent card height */ } /* Hover Effect: Lift and Glow */ .product-card:hover { transform: translateY(-10px); box-shadow: var(--shadow-hover); } .badge { position: absolute; top: 15px; right: 15px; /* Adjust for RTL */ background: var(--accent-orange); color: white; padding: 5px 12px; border-radius: 8px; font-size: 0.85rem; font-weight: bold; z-index: 10; } .product-image { width: 100%; height: 200px; /* Fixed height for images */ display: flex; justify-content: center; align-items: center; margin-bottom: 20px; } .product-image img { max-width: 100%; max-height: 100%; object-fit: contain; transition: transform 0.2s ease; } .product-card:hover .product-image img { transform: scale(1.05); /* Slight zoom on image hover */ } .product-title { font-size: 1.6rem; margin: 10px 0 5px; font-weight: 600; color: var(--text-main); } .specs { color: var(--text-muted); font-size: 0.95rem; margin-bottom: 10px; line-height: 1.5; } .price { font-weight: bold; font-size: 1.4rem; margin-bottom: 25px; color: #007bff; /* Blue for price */ } .claim-btn { background-color: transparent; border: 2px solid var(--accent-green); color: var(--accent-green); padding: 12px 30px; border-radius: 30px; font-weight: bold; cursor: pointer; transition: background 0.3s, color 0.3s, transform 0.2s; display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: auto; /* Push button to the bottom */ width: 80%; /* Make button wider */ } .claim-btn:hover { background-color: var(--accent-green); color: white; transform: scale(1.05); } /* Special Styling for Concept Phones (Glassmorphism + Ultra-thin shadow) */ .concept-card { background: var(--glass-bg); backdrop-filter: blur(12px); /* Frosted glass effect */ -webkit-backdrop-filter: blur(12px); /* Safari support */ border: var(--glass-border); box-shadow: var(--glass-shadow); color: #2c3e50; /* Darker text for readability on lighter glass */ } .concept-card .badge { background: #00bcd4; /* Different badge color for concepts */ } .concept-card .claim-btn { border-color: #00bcd4; color: #00bcd4; } .concept-card .claim-btn:hover { background-color: #00bcd4; color: white; } /* Modal Styles */ .modal { display: none; /* Hidden by default */ position: fixed; /* Stay in place */ z-index: 1000; /* Sit on top */ left: 0; top: 0; width: 100%; /* Full width */ height: 100%; /* Full height */ overflow: auto; /* Enable scroll if needed */ background-color: rgba(0,0,0,0.5); /* Black w/ opacity */ justify-content: center; align-items: center; } .modal-content { background-color: #fefefe; margin: auto; padding: 30px; border-radius: var(--border-radius); box-shadow: var(--shadow-hover); position: relative; width: 90%; max-width: 500px; text-align: right; /* Adjust for RTL */ } .close-button { color: #aaa; float: left; /* Adjust for RTL */ font-size: 30px; font-weight: bold; cursor: pointer; } .close-button:hover, .close-button:focus { color: black; text-decoration: none; cursor: pointer; } .modal h2 { font-size: 2rem; color: var(--text-main); margin-bottom: 20px; } .modal p { font-size: 1.1rem; margin-bottom: 20px; } .modal form label { display: block; margin-bottom: 8px; font-weight: bold; color: var(--text-main); } .modal form input[type="text"], .modal form input[type="email"] { width: calc(100% - 20px); padding: 10px; margin-bottom: 20px; border: 1px solid #ccc; border-radius: 8px; font-size: 1rem; direction: rtl; /* For input fields in RTL */ } .modal form button[type="submit"] { background-color: var(--accent-green); color: white; padding: 12px 25px; border: none; border-radius: 30px; cursor: pointer; font-size: 1.1rem; font-weight: bold; transition: background-color 0.3s; width: 100%; } .modal form button[type="submit"]:hover { background-color: var(--button-hover-color); } document.addEventListener('DOMContentLoaded', () => { // قائمة المنتجات التي سيتم عرضها const phonesData = [ { name: "iPhone 15 Pro Max", image: "https://i.ibb.co/L5w2R7R/iphone15-pro-max-back.webp", // مثال على صورة خلفية imageFront: "https://i.ibb.co/q5k1s8c/iphone15-pro-max-front.webp", // مثال على صورة أمامية specs: "1TB - Black Titanium - Unlocked - Dual eSIM", price: "$1499", isFree: false, type: "normal" }, { name: "iPhone 15 Plus", image: "https://i.ibb.co/3WpB6N2/iphone15-plus-back.webp", imageFront: "https://i.ibb.co/k2Wc2mX/iphone15-plus-front.webp", specs: "256GB - Pink - Locked Verizon - Dual eSIM", price: "$0.00 (FREE)", isFree: true, type: "normal" }, { name: "iPhone 15", image: "https://i.ibb.co/K509mQc/iphone15-back.webp", imageFront: "https://i.ibb.co/y4p1R3y/iphone15-front.webp", specs: "128GB - Blue - Unlocked - Dual eSIM", price: "$799", isFree: false, type: "normal" }, { name: "iPhone 14 Pro Max", image: "https://i.ibb.co/YyY2t7b/iphone14-pro-max-back.webp", imageFront: "https://i.ibb.co/4T0bHh6/iphone14-pro-max-front.webp", specs: "512GB - Deep Purple - Unlocked - Dual eSIM", price: "$999", isFree: false, type: "normal" }, { name: "iPhone 14", image: "https://i.ibb.co/yQ6M7yV/iphone14-back.webp", imageFront: "https://i.ibb.co/tZ5M6f2/iphone14-front.webp", specs: "128GB - Midnight - Locked AT&T - Dual eSIM", price: "$0.00 (FREE)", isFree: true, type: "normal" }, { name: "iPhone 16 (Concept)", image: "https://i.ibb.co/H2Lz7wX/iphone16-concept-back.webp", // صورة تخيلية imageFront: "https://i.ibb.co/Wc19Gf6/iphone16-concept-front.webp", // صورة تخيلية specs: "512GB - Stellar Gray - Unlocked - Quad eSIM", price: "$1799", isFree: false, type: "concept" // نوع خاص لتطبيق Glassmorphism }, { name: "iPhone 16 Pro (Concept)", image: "https://i.ibb.co/H2Lz7wX/iphone16-concept-back.webp", imageFront: "https://i.ibb.co/Wc19Gf6/iphone16-concept-front.webp", specs: "1TB - Cosmic Blue - Unlocked - Quad eSIM", price: "$1999", isFree: false, type: "concept" }, { name: "iPhone 17 (Futuristic)", image: "https://i.ibb.co/G3XnN10/iphone17-futuristic-back.webp", // صورة تخيلية imageFront: "https://i.ibb.co/SdnL1H6/iphone17-futuristic-front.webp", // صورة تخيلية specs: "2TB - Quantum Gold - Unlocked - Octa eSIM", price: "$2999", isFree: false, type: "concept" }, { name: "iPhone Air (Ultra-Thin)", image: "https://i.ibb.co/C04Yc5S/iphone-air-back.webp", // صورة تخيلية imageFront: "https://i.ibb.co/Qf98cQj/iphone-air-front.webp", // صورة تخيلية specs: "256GB - Vapor White - Unlocked - Flexible Display", price: "$1599", isFree: false, type: "concept" }, // كرر بعض الهواتف للحصول على "الكثير" من المنتجات كما طلبت { name: "iPhone 15 Pro", image: "https://i.ibb.co/jVf2hYc/iphone15-pro-back.webp", imageFront: "https://i.ibb.co/n7h1b58/iphone15-pro-front.webp", specs: "512GB - Natural Titanium - Unlocked - Dual eSIM", price: "$1199", isFree: false, type: "normal" }, { name: "iPhone 14 Plus", image: "https://i.ibb.co/Y2zH04M/iphone14-plus-back.webp", imageFront: "https://i.ibb.co/XzN4v38/iphone14-plus-front.webp", specs: "256GB - Starlight - Unlocked - Dual eSIM", price: "$0.00 (FREE)", isFree: true, type: "normal" }, { name: "iPhone SE (2024 Concept)", image: "https://i.ibb.co/yYv3Vky/iphone-se-back.webp", imageFront: "https://i.ibb.co/b39j2r9/iphone-se-front.webp", specs: "128GB - Red - Unlocked - Compact Design", price: "$499", isFree: false, type: "normal" }, { name: "iPhone 16 Plus (Concept)", image: "https://i.ibb.co/H2Lz7wX/iphone16-concept-back.webp", imageFront: "https://i.ibb.co/Wc19Gf6/iphone16-concept-front.webp", specs: "512GB - Emerald Green - Unlocked - Enhanced Battery", price: "$1899", isFree: false, type: "concept" }, { name: "iPhone 17 Pro (Futuristic)", image: "https://i.ibb.co/G3XnN10/iphone17-futuristic-back.webp", imageFront: "https://i.ibb.co/SdnL1H6/iphone17-futuristic-front.webp", specs: "4TB - Liquid Silver - Unlocked - AI Integration", price: "$3499", isFree: false, type: "concept" }, { name: "iPhone Air Pro (Concept)", image: "https://i.ibb.co/C04Yc5S/iphone-air-back.webp", imageFront: "https://i.ibb.co/Qf98cQj/iphone-air-front.webp", specs: "512GB - Shadow Black - Unlocked - Rollable Display", price: "$1899", isFree: false, type: "concept" } ]; const productsGrid = document.getElementById('productsGrid'); const claimModal = document.getElementById('claimModal'); const closeButton = document.querySelector('.close-button'); const modalProductName = document.getElementById('modalProductName'); const claimForm = document.getElementById('claimForm'); // إنشاء بطاقات المنتجات ديناميكياً phonesData.forEach(phone => { const card = document.createElement('article'); card.classList.add('product-card'); if (phone.type === 'concept') { card.classList.add('concept-card'); // إضافة كلاس Glassmorphism للهواتف المفاهيمية } card.innerHTML = ` In Stock
${phone.name} Front

${phone.name}

${phone.specs}

${phone.price}

`; productsGrid.appendChild(card); // تبديل الصورة الأمامية/الخلفية عند التمرير بالماوس const productImageDiv = card.querySelector('.product-image'); const frontImage = card.querySelector('.front-image'); const backImage = card.querySelector('.back-image'); productImageDiv.addEventListener('mouseenter', () => { frontImage.style.display = 'none'; backImage.style.display = 'block'; }); productImageDiv.addEventListener('mouseleave', () => { frontImage.style.display = 'block'; backImage.style.display = 'none'; }); }); // فتح نافذة الـ Pop-up عند الضغط على زر Claim Now productsGrid.addEventListener('click', (event) => { if (event.target.classList.contains('claim-btn')) { const productName = event.target.dataset.productName; modalProductName.textContent = productName; claimModal.style.display = 'flex'; // استخدام flex لتوسيط النافذة } }); // إغلاق نافذة الـ Pop-up عند الضغط على زر الإغلاق closeButton.addEventListener('click', () => { claimModal.style.display = 'none'; }); // إغلاق نافذة الـ Pop-up عند الضغط خارجها window.addEventListener('click', (event) => { if (event.target === claimModal) { claimModal.style.display = 'none'; } }); // معالجة إرسال نموذج المطالبة (يمكنك إضافة منطق الإرسال الفعلي هنا) claimForm.addEventListener('submit', (event) => { event.preventDefault(); // منع الإرسال الافتراضي للصفحة const name = document.getElementById('name').value; const email = document.getElementById('email').value; const product = modalProductName.textContent; alert(`تم استلام طلبك لـ ${product} بواسطة ${name} (${email}). سنقوم بالتواصل معك قريباً!`); console.log(`Product Claimed: ${product}, Name: ${name}, Email: ${email}`); // إغلاق النافذة بعد الإرسال claimModal.style.display = 'none'; claimForm.reset(); // إعادة تعيين النموذج }); });