/* =========================================
   متغيرات وتنسيقات عامة
========================================= */
:root {
    --primary-color: #2ECC71;
    --primary-hover: #27AE60;
    --dark-bg: #1A1A1A;
    --light-bg: #F8F9FA;
    --white: #FFFFFF;
    --text-dark: #333333;
    --text-light: #666666;
    --shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease-in-out;
}

* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Tajawal', sans-serif; }
body { background-color: var(--light-bg); color: var(--text-dark); line-height: 1.6; }

.hidden { display: none !important; }
.active { display: block !important; }
.w-100 { width: 100%; }
.mt-40 { margin-top: 40px; }

button { cursor: pointer; border: none; outline: none; transition: var(--transition); }
.btn-primary { background-color: var(--primary-color); color: var(--white); padding: 12px 24px; border-radius: 8px; font-size: 16px; font-weight: bold; }
.btn-primary:hover { background-color: var(--primary-hover); transform: translateY(-2px); box-shadow: var(--shadow); }
.btn-secondary { background-color: var(--dark-bg); color: var(--white); padding: 10px 20px; border-radius: 8px; }
.btn-secondary:hover { background-color: #000; }
.btn-danger { background-color: #e74c3c; color: white; padding: 8px 15px; border-radius: 5px; font-weight: bold;}
.btn-danger:hover { background-color: #c0392b; }

/* =========================================
   صفحة الترحيب والمكونات العلوية
========================================= */
#landing-page { height: 100vh; background: url('https://images.unsplash.com/photo-1542838132-92c53300491e?ixlib=rb-1.2.1&auto=format&fit=crop&w=1920&q=80') no-repeat center center/cover; position: relative; }
.overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0, 0, 0, 0.6); display: flex; justify-content: center; align-items: center; text-align: center; }
.landing-content { color: var(--white); animation: fadeIn 1.5s ease-in-out; }
.logo-circle { font-size: 60px; width: 120px; height: 120px; background: var(--primary-color); border-radius: 50%; display: flex; align-items: center; justify-content: center; margin: 0 auto 20px auto; box-shadow: 0 0 20px rgba(46, 204, 113, 0.5); }

header { background-color: var(--white); padding: 20px 5%; display: flex; justify-content: space-between; align-items: center; box-shadow: var(--shadow); position: sticky; top: 0; z-index: 100; }
.header-left { display: flex; gap: 15px; align-items: center; }
.cart-btn { background-color: var(--dark-bg); color: var(--white); padding: 10px 20px; border-radius: 20px; font-weight: bold; display: flex; align-items: center; gap: 10px; }
.cart-btn:hover { background-color: var(--primary-color); }
#cart-count { background-color: var(--primary-color); padding: 2px 8px; border-radius: 50%; font-size: 14px; }
.icon-btn { background: none; font-size: 24px; color: var(--dark-bg); }

/* =========================================
   المنتجات
========================================= */
main { padding: 40px 5%; }
.section-title { text-align: center; font-size: 2rem; margin-bottom: 40px; }
.products-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 30px; }
.product-card { background: var(--white); border-radius: 15px; overflow: hidden; box-shadow: var(--shadow); transition: var(--transition); text-align: center; padding-bottom: 20px; border: 1px solid #eee; }
.product-card:hover { background-color: var(--dark-bg); color: var(--white); transform: translateY(-10px); box-shadow: 0 15px 30px rgba(0,0,0,0.3); }
.product-card:hover h3, .product-card:hover .price { color: var(--white); }
.product-card img { width: 100%; height: 200px; object-fit: cover; border-bottom: 3px solid var(--primary-color); }
.product-card h3 { margin: 15px 0 5px; font-size: 1.3rem; color: var(--text-dark); transition: var(--transition); }
.product-card .price { font-size: 1.2rem; font-weight: bold; color: var(--primary-color); margin-bottom: 15px; transition: var(--transition);}
.product-card .buttons { display: flex; justify-content: center; gap: 10px; padding: 0 15px; }

/* =========================================
   النوافذ المنبثقة (Modals)
========================================= */
.modal { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.7); display: flex; justify-content: center; align-items: center; z-index: 1000; backdrop-filter: blur(5px); }
.modal-content { background: var(--white); padding: 30px; border-radius: 15px; width: 90%; max-width: 600px; max-height: 90vh; overflow-y: auto; position: relative; animation: slideUp 0.4s ease-out; }
.close-btn { position: absolute; top: 15px; left: 20px; font-size: 28px; cursor: pointer; color: var(--text-light); }
.close-btn:hover { color: red; }

.product-details-container img { width: 100%; border-radius: 10px; margin-bottom: 20px; height: 300px; object-fit: cover; }
.detail-info h2 { color: var(--dark-bg); margin-bottom: 10px; }
.detail-info p { color: var(--text-light); margin-bottom: 15px; }
.detail-info h3 { color: var(--primary-color); font-size: 1.5rem; margin-bottom: 20px; }
.sizes-container, .quantity-container { margin-bottom: 20px; }
.size-options { display: flex; gap: 15px; margin-top: 10px; }
.quantity-container input { padding: 8px; width: 80px; border-radius: 5px; border: 1px solid #ccc; text-align: center; font-size: 16px;}

.cart-items { margin-top: 20px; border-top: 1px solid #eee; padding-top: 20px; }
.cart-item { display: flex; justify-content: space-between; align-items: center; padding: 10px 0; border-bottom: 1px solid #eee; }
.cart-item-controls { display: flex; align-items: center; gap: 10px; }
.cart-item-controls button { background: var(--light-bg); border: 1px solid #ccc; width: 30px; height: 30px; border-radius: 5px; }
.delete-btn { color: red; background: none !important; border: none !important; font-size: 20px; }
.cart-summary { margin-top: 20px; text-align: left; }

/* =========================================
   النماذج ولوحة تحكم الأدمن
========================================= */
.form-group { margin-bottom: 15px; text-align: right; }
.form-group label { display: block; margin-bottom: 5px; font-weight: bold; }
.form-group input, .form-group textarea { width: 100%; padding: 10px; border: 1px solid #ccc; border-radius: 5px; font$-family: inherit; }

.admin-header { display: flex; justify-content: space-between; align-items: center; padding: 20px 5%; background: var(--dark-bg); color: var(--white); }
.admin-main { padding: 40px 5%; }
.admin-section { background: var(--white); padding: 30px; border-radius: 10px; box-shadow: var(--shadow); margin-bottom: 30px;}
.admin-divider { border: none; border-top: 3px dashed #ccc; margin: 40px 0; }
.admin-form { background: var(--light-bg); padding: 20px; border-radius: 8px; border: 1px solid #ddd; }
.prices-inputs { display: flex; gap: 15px; }

.table-container { overflow-x: auto; margin-top: 20px; }
table { width: 100%; border-collapse: collapse; text-align: right; }
th, td { padding: 15px; border-bottom: 1px solid #eee; }
th { background: var(--light-bg); color: var(--dark-bg); }
.product-thumbnail { width: 50px; height: 50px; object-fit: cover; border-radius: 5px; }

.admin-login { text-align: center; }
.admin-login input { width: 100%; padding: 12px; margin: 20px 0; text-align: center; font-size: 20px; letter-spacing: 5px; }

/* =========================================
   تأثيرات والتجاوب
========================================= */
.toast { position: fixed; top: 20px; left: 50%; transform: translateX(-50%); background: var(--primary-color); color: var(--white); padding: 15px 30px; border-radius: 30px; box-shadow: var(--shadow); z-index: 9999; font-weight: bold; transition: var(--transition); }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp { from { transform: translateY(50px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

@media (max-width: 768px) {
    .prices-inputs { flex-direction: column; gap: 0; }
    .landing-content h1 { font-size: 2rem; }
    .header-right h2 { font-size: 1.2rem; }
}