/* ==========================================================================
   ملف التنسيقات المطور والمحسن بالكامل للموبايل - شركة الفجر للتجهيزات الطبية
   ========================================================================== */

:root {
    --primary-color: #1a5276;
    --accent-color: #27ae60;
    --dark-color: #2c3e50;
    --bg-color: #f4f6f8;
    --card-bg: #ffffff;
    --text-color: #34495e;
    --price-color: #e74c3c;
    --border-color: #eef2f5;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    direction: rtl;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
}

a {
    color: inherit;
    text-decoration: none;
}

/* شريط الاتصال العلوي - مرن ومناسب للجوال */
.contact-bar {
    background-color: var(--primary-color);
    color: white;
    padding: 10px 15px;
    text-align: center;
    font-size: 12px;
    border-bottom: 3px solid var(--accent-color);
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
}

.site-header {
    background-color: var(--card-bg);
    box-shadow: 0 4px 15px rgba(0,0,0,0.04);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid var(--border-color);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-area {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo-area img {
    max-height: 50px;
}

.logo-text {
    font-size: 18px;
    font-weight: 700;
    color: var(--primary-color);
}

/* القائمة الرئيسية */
.main-menu {
    display: flex;
    list-style: none;
    gap: 15px;
    align-items: center;
}

.main-menu a {
    font-weight: 600;
    color: var(--dark-color);
    padding: 6px 12px;
    border-radius: 8px;
    transition: all 0.3s ease;
}

/* تمييز زر الدخول بشكل ملفت وبخلفية مظللة فاخرة */
.main-menu a.login-btn {
    background-color: #ebf5fb; 
    color: var(--primary-color) !important;
    border: 1px solid rgba(26, 82, 118, 0.3);
    box-shadow: 0 4px 10px rgba(26, 82, 118, 0.15);
    font-weight: 700;
}

.main-menu a.login-btn:hover {
    background-color: var(--primary-color);
    color: white !important;
    box-shadow: 0 4px 12px rgba(26, 82, 118, 0.3);
}

/* الواجهة الرئيسية */
.hero-section {
    background: linear-gradient(135deg, rgba(26, 82, 118, 0.9), rgba(41, 128, 185, 0.8));
    color: white;
    padding: 50px 20px;
    text-align: center;
}

.hero-content h1 {
    font-size: 2rem;
    margin-bottom: 15px;
}

.search-container {
    max-width: 600px;
    margin: 20px auto 0 auto;
    display: flex;
    background: white;
    padding: 5px;
    border-radius: 50px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.search-container input {
    flex: 1;
    border: none;
    padding: 10px 15px;
    font-size: 15px;
    outline: none;
    border-radius: 50px;
}

.search-container button {
    background-color: var(--accent-color);
    color: white;
    border: none;
    padding: 10px 22px;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
}

.container {
    max-width: 1200px;
    margin: 30px auto;
    padding: 0 15px;
}

.section-title {
    color: var(--primary-color);
    text-align: center;
    margin-bottom: 30px;
    font-size: 1.6rem;
}

.section-title span {
    border-bottom: 4px solid var(--accent-color);
    padding-bottom: 8px;
}

/* شبكة المنتجات المستجيبة والمعدلة بالكامل للجوال واللابتوب */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
}

.product-card {
    background: var(--card-bg);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.04);
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
}

.product-image-area {
    width: 100%;
    height: 240px;
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    border-bottom: 1px solid var(--border-color);
    padding: 15px;
}

.product-image-area img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.product-info-box {
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.product-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--dark-color);
    margin-bottom: 10px;
}

.badge-code {
    font-size: 11px;
    color: white;
    background-color: var(--primary-color);
    padding: 3px 10px;
    border-radius: 50px;
    width: fit-content;
    margin-bottom: 12px;
}

.size-details {
    font-size: 12px;
    background: rgba(0, 0, 0, 0.02);
    border: 1px dashed var(--border-color);
    padding: 8px;
    border-radius: 8px;
    margin-bottom: 15px;
}

.price-footer {
    border-top: 1px solid var(--border-color);
    padding-top: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.price-value {
    font-size: 19px;
    color: var(--price-color);
    font-weight: 700;
}

.whatsapp-float {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: #25d366;
    color: white;
    width: 55px;
    height: 55px;
    border-radius: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    z-index: 999;
}

.site-footer {
    background-color: var(--dark-color);
    color: #ecf0f1;
    padding: 35px 15px;
    margin-top: 50px;
    text-align: center;
    border-top: 5px solid var(--accent-color);
    font-size: 14px;
}

.admin-box { background: white; padding: 25px; border-radius: 12px; margin-bottom: 30px; border: 1px solid var(--border-color); }
.form-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 15px; margin-bottom: 15px; }
.form-row input { width: 100%; padding: 10px; border: 1px solid #cbd5e0; border-radius: 6px; }
table { width: 100%; border-collapse: collapse; margin-top: 20px; background:white; }
th, td { padding: 12px 10px; text-align: right; border-bottom: 1px solid #e2e8f0; font-size: 14px; }
th { background: #1a5276; color: white; }

/* 📱 تحسينات مخصصة ودقيقة جداً لشاشات الجوال */
@media (max-width: 768px) {
    .nav-container { 
        flex-direction: column; 
        gap: 15px; 
        padding: 15px 10px;
    }
    
    .main-menu { 
        width: 100%;
        justify-content: center; 
        gap: 8px;
        padding: 5px 0;
    }
    
    .main-menu a {
        font-size: 14px;
        padding: 6px 10px;
    }
    
    .hero-section {
        padding: 40px 15px;
    }
    
    .hero-content h1 {
        font-size: 1.6rem;
    }
    
    /* جعل المنتجات تترتب بشكل طولي متناسق على شاشة الموبايل */
    .products-grid {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 0 5px;
    }
    
    .product-image-area {
        height: 220px;
    }
}