/* استيراد الخط العربي */
@import url('https://fonts.googleapis.com/css2?family=Tajawal:wght@300;500;700;900&display=swap');

:root {
    --primary: #f47a20; /* لون Glass Corner البرتقالي */
    --dark: #111;
    --light-bg: #f4f6f8;
    --white: #ffffff;
    --grey: #e0e0e0;
    --transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    --shadow: 0 10px 30px rgba(0,0,0,0.08);
}

* { 
    box-sizing: border-box; 
    margin: 0; 
    padding: 0; 
    font-family: 'Tajawal', sans-serif; 
}

body { 
    background-color: var(--light-bg); 
    color: var(--dark); 
    direction: rtl; 
    overflow-x: hidden; 
    line-height: 1.6;
}

/* الهيدر (شريط التنقل) */
header {
    background: rgba(255, 255, 255, 0.98);
    padding: 15px 8%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0; 
    z-index: 1000;
    box-shadow: 0 2px 15px rgba(0,0,0,0.05);
}

.logo h1 { font-weight: 900; font-size: 1.6rem; letter-spacing: -1px; }
.logo span { color: var(--primary); }

.nav-links { display: flex; align-items: center; gap: 15px; }
.nav-links a {
    text-decoration: none; 
    color: var(--dark); 
    font-weight: bold;
    padding: 10px 20px; 
    border-radius: 8px; 
    transition: var(--transition);
}

.btn-login { 
    background: var(--primary); 
    color: white !important; 
    box-shadow: 0 4px 10px rgba(244, 122, 32, 0.3);
}
.btn-login:hover { transform: translateY(-2px); box-shadow: 0 6px 15px rgba(244, 122, 32, 0.4); }

/* قسم الهيرو (الواجهة الرئيسية) */
.hero {
    height: 35vh; 
    background: var(--dark); 
    color: white;
    display: flex; 
    flex-direction: column; 
    align-items: center; 
    justify-content: center;
    text-align: center; 
    margin-bottom: 50px;
    background-image: linear-gradient(45deg, #111 0%, #222 100%);
}

.hero h1 { font-size: 3rem; font-weight: 900; margin-bottom: 10px; }
.hero p { opacity: 0.8; font-weight: 300; font-size: 1.2rem; }

/* الحاوية والشبكة */
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

.grid {
    display: grid; 
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px; 
    padding-bottom: 50px;
}

/* كارت المنتج الفاخر */
.product-card {
    background: var(--white); 
    padding: 20px; 
    transition: var(--transition);
    border: 1px solid #eee; 
    position: relative;
    border-radius: 4px; /* زوايا حادة لتعطي طابعاً معمارياً فخماً */
}

.product-card:hover {
    transform: translateY(-10px); 
    box-shadow: var(--shadow);
    border-color: var(--primary);
}

.img-box { 
    width: 100%; 
    height: 280px; 
    overflow: hidden; 
    background: #fff; 
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.img-box img { width: 100%; height: 100%; object-fit: contain; transition: var(--transition); }
.product-card:hover .img-box img { transform: scale(1.05); }

.code-tag { 
    font-size: 11px; 
    color: var(--primary); 
    font-weight: 700; 
    margin-bottom: 8px; 
    display: block; 
    letter-spacing: 1px;
}
.product-name { 
    font-size: 1.15rem; 
    font-weight: 600; 
    margin-bottom: 15px; 
    height: 50px; 
    overflow: hidden; 
    color: #222;
}

.price-wrapper { border-top: 1px solid #f0f0f0; padding-top: 15px; }
.retail-price { display: block; font-size: 1.4rem; font-weight: 900; color: var(--dark); }
.vat-label { font-size: 0.8rem; color: #888; }

/* صندوق سعر التاجر الخاص */
.trader-price-box {
    margin-top: 12px; 
    background: #fff8f2; 
    padding: 12px;
    border-right: 4px solid var(--primary);
    animation: fadeIn 0.5s ease;
}
.trader-label { font-size: 0.75rem; color: var(--primary); font-weight: bold; display: block; margin-bottom: 2px; }
.trader-price { font-size: 1.3rem; font-weight: 900; color: #d35400; }

/* لوحة التحكم ونظام التبويبات */
.tabs { display: flex; gap: 10px; margin-bottom: 25px; justify-content: center; }
.tab-btn { 
    padding: 12px 25px; 
    border: none; 
    background: var(--grey); 
    border-radius: 8px; 
    cursor: pointer; 
    font-weight: bold; 
    transition: 0.3s;
    font-size: 1rem;
}
.tab-btn.active { background: var(--primary); color: white; box-shadow: 0 4px 12px rgba(244,122,32,0.2); }

.section-card { 
    background: var(--white); 
    padding: 30px; 
    border-radius: 15px; 
    box-shadow: 0 4px 15px rgba(0,0,0,0.05); 
    margin-bottom: 30px; 
}

/* النماذج والمدخلات */
.form-container { max-width: 500px; margin: 50px auto; background: white; padding: 40px; border-radius: 15px; box-shadow: var(--shadow); }
input {
    width: 100%; 
    padding: 14px; 
    border: 1px solid #ddd; 
    border-radius: 8px; 
    outline: none; 
    font-size: 1rem;
    transition: 0.3s;
    background: #fafafa;
}
input:focus { border-color: var(--primary); background: #fff; }

.btn-submit {
    width: 100%; 
    padding: 16px; 
    background: var(--primary); 
    color: white;
    border: none; 
    border-radius: 8px; 
    cursor: pointer; 
    font-weight: 900; 
    font-size: 1.1rem;
    transition: 0.3s;
}
.btn-submit:hover { background: #d35400; transform: translateY(-2px); }

/* حالة التحميل ومنع الضغط المكرر */
.loading { 
    opacity: 0.6; 
    pointer-events: none; 
    cursor: not-allowed; 
    position: relative;
}

/* الجداول في الإدارة */
.admin-table { width: 100%; border-collapse: collapse; margin-top: 20px; background: white; border-radius: 10px; overflow: hidden; }
.admin-table th, .admin-table td { padding: 15px; border-bottom: 1px solid #eee; text-align: right; }
.admin-table th { background: var(--dark); color: white; font-weight: bold; }
.admin-table tr:hover { background: #fcfcfc; }

.btn-del { color: #e74c3c; background: none; border: none; cursor: pointer; font-weight: bold; font-size: 0.9rem; }
.btn-del:hover { text-decoration: underline; }

/* أنيميشن بسيط */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* التوافق مع الجوال */
@media (max-width: 768px) {
    .hero h1 { font-size: 2rem; }
    header { padding: 15px 5%; }
    .grid { grid-template-columns: 1fr; }
    .tabs { flex-direction: column; }
}

/* أضف هذا في نهاية ملف style.css */
.category-title {
    color: var(--dark);
    position: relative;
    padding-right: 15px;
}
.category-title::before {
    content: "";
    position: absolute;
    right: 0;
    top: 20%;
    height: 60%;
    width: 5px;
    background: var(--primary);
}