/* ======== إعدادات أساسية وخطوط ======== */
@import url('https://fonts.googleapis.com/css2?family=Tajawal:wght@400;500;700&display=swap');

:root {
    --primary-color: #0056b3; /* درجة أزرق أساسية */
    --secondary-color: #6c757d; /* درجة رمادي ثانوية */
    --light-gray: #f8f9fa; /* رمادي فاتح للخلفيات */
    --dark-color: #343a40; /* لون نص داكن */
    --white-color: #ffffff;
    --container-width: 90%;
    --max-width: 1100px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Tajawal', sans-serif;
    direction: rtl;
    line-height: 1.6;
    background-color: var(--white-color);
    color: var(--dark-color);
}

.container {
    width: var(--container-width);
    max-width: var(--max-width);
    margin: 0 auto;
    overflow: hidden;
}

ul {
    list-style: none;
}

a {
    text-decoration: none;
    color: var(--primary-color);
}

img {
    max-width: 100%;
}

h1, h2, h3 {
    margin-bottom: 1rem;
    font-weight: 700;
}

/* ======== 1. شريط التنقل (Navbar) ======== */
.navbar {
    background-color: var(--white-color);
    border-bottom: 2px solid var(--light-gray);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.navbar .logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

.navbar .nav-links {
    display: flex;
}

.navbar .nav-links li {
    margin-right: 1.5rem;
}

.navbar .nav-links a {
    color: var(--dark-color);
    font-weight: 500;
    transition: color 0.3s ease;
}

.navbar .nav-links a:hover,
.navbar .nav-links a.active {
    color: var(--primary-color);
}

/* ======== 2. قسم التعريف (Hero) ======== */
.hero {
    background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url('https://via.placeholder.com/1500x500.png?text=Modern+Furniture') no-repeat center center/cover;
    /* ملاحظة: قم بتغيير الرابط أعلاه إلى رابط صورة خلفية أنيقة من عندك */
    color: var(--white-color);
    height: 60vh;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 0 1rem;
}

.hero h1 {
    font-size: 3rem;
}

.hero p {
    font-size: 1.25rem;
}

/* ======== 3. قسم "وصل حديثًا" (Recent Products) ======== */
.recent-products, .all-products {
    padding: 4rem 0;
    text-align: center;
}

.recent-products {
    background-color: var(--light-gray);
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
    text-align: left;
}

.product-item {
    background: var(--white-color);
    border: 1px solid #ddd;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.product-item img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
    cursor: pointer;
}

.product-item h3 {
    font-size: 1.1rem;
    padding: 1rem;
    color: var(--dark-color);
    text-align: center;
    margin-bottom: 0;
}

.product-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
}

/* زر عرض الكل */
.view-all-btn {
    margin-top: 2rem;
}

.btn {
    display: inline-block;
    background: var(--primary-color);
    color: var(--white-color);
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 5px;
    font-weight: 500;
    font-family: 'Tajawal', sans-serif;
    cursor: pointer;
    transition: background 0.3s ease;
}

.btn:hover {
    background: #004494; /* درجة أغمق من الأزرق */
}

/* ======== 4. تذييل الصفحة (Footer) ======== */
footer {
    background: var(--dark-color);
    color: var(--light-gray);
    text-align: center;
    padding: 2rem 0;
}

footer p {
    margin: 0.5rem 0;
}

/* ======== 5. نافذة العرض المكبر (Lightbox) ======== */
.lightbox {
    display: none; /* مخفي افتراضيًا */
    position: fixed;
    z-index: 1000;
    padding-top: 50px;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.9);
}

.lightbox-content {
    margin: auto;
    display: block;
    width: 80%;
    max-width: 700px;
    animation-name: zoom;
    animation-duration: 0.6s;
}

@keyframes zoom {
    from {transform: scale(0)}
    to {transform: scale(1)}
}

#lightbox-caption {
    margin: auto;
    display: block;
    width: 80%;
    max-width: 700px;
    text-align: center;
    color: #ccc;
    padding: 10px 0;
}

.close-lightbox {
    position: absolute;
    top: 15px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    transition: 0.3s;
    cursor: pointer;
}

.close-lightbox:hover,
.close-lightbox:focus {
    color: #bbb;
    text-decoration: none;
}

/* ======== 6. التجاوب (Responsiveness) ======== */
@media (max-width: 768px) {
    .navbar .container {
        flex-direction: column;
    }

    .navbar .logo {
        margin-bottom: 1rem;
    }
    
    .navbar .nav-links {
        width: 100%;
        justify-content: space-around;
    }
    
    .navbar .nav-links li {
        margin-right: 0;
    }

    .hero h1 {
        font-size: 2rem;
    }
    .hero p {
        font-size: 1rem;
    }
}