/* استيراد الخطوط */
@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@300;400;700;900&display=swap');
@import url('https://fonts.googleapis.com/css2?family=El+Messiri:wght@400;500;600;700&display=swap');

:root {
    --primary-gold: #c5a059;
    --deep-navy: #0f172a;
    --soft-gray: #f8fafc;
    --transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    /* الخط الأساسي للعناوين (فخامة كلاسيكية) */
    --font-heading: 'Amiri', serif;
    
    /* الخط الأساسي للنصوص والأزرار (فخامة هندسية) */
    --font-body: 'Alexandria', sans-serif;
}

body {
        font-family: 'El Messiri', sans-serif;
    font-weight: 400; /* وزن خفيف للنصوص العادية */
    background-color: #ffffff;
    line-height: 1.6;
}

h1, h2, h3, .section-title, .expressive-title {
    font-family: var(--font-heading);
    font-weight: 700;
}

.expressive-title {
    font-family: 'Amiri', serif;
    font-size: 4.5rem; /* حجم كبير ليعوض بساطة الكلمات */
    color: #0f172a;
    text-align: center;
    margin-bottom: 20px;
    font-weight: 700;
}

.luxury-underline {
    width: 60px;
    height: 3px;
    background: #c5a059; /* الذهبي الخاص بطيبة */
    margin: 0 auto 80px; /* مسافة كبيرة قبل أول منتج */
}

/* شبكة المنتجات المتجاوبة */
/* التنسيق المطور لشبكة الأعمدة الثلاثة */
.luxury-grid {
    display: grid;
    /* تحديد 3 أعمدة متساوية في الحجم */
    grid-template-columns: repeat(3, 1fr);
    gap: 3rem; /* مسافة أوسع بين العناصر لزيادة الفخامة */
    padding: 1rem 0;
}

/* التجاوب الذكي (Responsive) */
@media (max-width: 1024px) {
    /* في الأجهزة اللوحية (Tablets) ننتقل لعمودين */
    .luxury-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
    }
}

@media (max-width: 640px) {
    /* في الهواتف الذكية نكتفي بعمود واحد لتوضيح تفاصيل المنتج */
    .luxury-grid {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }
}

/* لمسة جمالية إضافية لإطارات الصور لتناسب توزيع الـ 3 أعمدة */
.luxury-item .image-wrapper {
    aspect-ratio: 4 / 5; /* نسبة طولية أكثر أناقة للمجموعات المختارة */
    border-bottom: 2px solid var(--soft-gray);
}

.item-content {
    padding: 2rem 1rem;
    background: linear-gradient(to bottom, #ffffff, #fafafa);
}

.luxury-item {
    background: #fff;
    border-radius: 20px;
    overflow: hidden;
    transition: var(--transition);
    border: 1px solid #f1f5f9;
    position: relative;
}

.luxury-item:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(15, 23, 42, 0.08);
}

/* معالجة الصور */
.image-wrapper {
    position: relative;
    aspect-ratio: 1/1.2;
    overflow: hidden;
}

.image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.luxury-item:hover img {
    transform: scale(1.1);
}

/* تأثير الطبقة فوق الصورة */
.item-overlay {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.6);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    opacity: 0;
    transition: var(--transition);
    backdrop-filter: blur(4px);
}

.luxury-item:hover .item-overlay {
    opacity: 1;
}

/* الأزرار */
.btn-action {
    padding: 0.8rem 1.5rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.9rem;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.quick-add {
    background: var(--primary-gold);
    color: white;
}

.view-details {
    background: white;
    color: var(--deep-navy);
    width: 45px;
    height: 45px;
    display: flex;
    justify-content: center;
    padding: 0;
}

.btn-action:hover {
    transform: scale(1.05);
    filter: brightness(1.1);
}

/* المحتوى السفلي */
.item-content {
    padding: 1.5rem;
    text-align: center;
}

.item-title {
    font-family: 'El Messiri', sans-serif;
    font-weight: 400; /* وزن خفيف للنصوص العادية */
    font-size: 1.2rem;
    color: var(--deep-navy);
    margin-bottom: 0.8rem;
    font-weight: 700;
}

.price-tag {
    display: flex;
    justify-content: center;
    align-items: baseline;
    gap: 4px;
    color: var(--primary-gold);
    font-weight: 900;
    font-size: 1.3rem;
}

.cur {
    font-size: 0.8rem;
    font-weight: 400;
}

/* التجاوب مع الجوال */
@media (max-width: 768px) {
    .section-title { font-size: 1.8rem; }
    .luxury-grid { gap: 1.5rem; }
}

.categories-nav {
    margin: 40px auto;
    text-align: center;
}

.cat-list {
    list-style: none;
    padding: 0;
    display: flex;
    justify-content: center;
    gap: 30px;
    border-bottom: 1px solid #eee;
    padding-bottom: 15px;
}

.cat-list li a {
    text-decoration: none;
    color: #888;
        font-family: 'El Messiri', sans-serif;
    font-weight: 400; /* وزن خفيف للنصوص العادية */
    font-size: 0.95rem;
    font-weight: 300;
    transition: 0.3s;
    position: relative;
    padding-bottom: 10px;
}

.cat-list li a:hover, .cat-list li a.active-cat {
    color: #c5a059; /* ذهبي طيبة */
}

.cat-list li a.active-cat::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: #c5a059;
}
/* الحاوية الرئيسية للشبكة */
.books-triple-grid {
    display: grid;
    /* ثلاثة أعمدة متساوية في الشاشات الكبيرة */
    grid-template-columns: repeat(3, 1fr); 
    gap: 40px;
    direction: rtl;
    padding: 20px 0;
}

/* بطاقة الكتاب بهوية طيبة */
.taiba-book-card {
    background: #fff;
    border: 1px solid #eaeaea;
    transition: all 0.3s ease-in-out;
    display: flex;
    flex-direction: column;
}

.taiba-book-card:hover {
    border-color: #c5a059;
    box-shadow: 0 10px 25px rgba(0,0,0,0.05);
}

.image-box {
    position: relative;
    height: 400px;
    background: #fcfcfc;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.image-box img {
    max-width: 85%;
    max-height: 85%;
    object-fit: contain;
    transition: transform 0.6s cubic-bezier(0.2, 1, 0.3, 1);
}

.btn-view-modern {
    flex: 1; /* يأخذ المساحة الأكبر */
    background: #f4f4f4; /* رمادي فاتح فخم */
    color: #333;
    padding: 10px;
    text-align: center;
    text-decoration: none;
    font-size: 0.9rem;
    font-family: 'Amiri', serif;
    border-radius: 4px;
    transition: 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

.btn-view-modern:hover {
    background: #ebebeb;
    color: #000;
}

.taiba-book-card:hover img {
    transform: scale(1.08);
}

/* التحكم بالتجاوب (Responsive) */

/* الشاشات المتوسطة (Tablets) - عمودين فقط */
@media (max-width: 992px) {
    .books-triple-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 25px;
    }
}

/* الشاشات الصغيرة (Mobile) - عمود واحد */
@media (max-width: 600px) {
    .books-triple-grid {
        grid-template-columns: 1fr;
    }
    .image-box {
        height: 300px;
    }
}

/* تنسيقات النصوص */
.taiba-title-wrapper {
    text-align: center;
    margin-bottom: 60px;
}

.taiba-title-wrapper h2 {
        font-family: 'El Messiri', sans-serif;
    font-weight: 400; /* وزن خفيف للنصوص العادية */
    font-size: 2.8rem;
    color: #111;
    position: relative;
    display: inline-block;
    padding-bottom: 15px;
}

.taiba-title-wrapper h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 25%;
    width: 50%;
    height: 2px;
    background: #c5a059;
}

.content-box {
    padding: 25px;
    text-align: right;
}

.content-box h3 {
        font-family: 'El Messiri', sans-serif;
    font-weight: 400; /* وزن خفيف للنصوص العادية */
    font-size: 1.4rem;
    margin-bottom: 10px;
    color: #1a1a1a;
}

.content-box .author {
    display: block;
    color: #777;
    font-size: 0.95rem;
    margin-bottom: 20px;
}

.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid #f5f5f5;
    padding-top: 20px;
}

.price {
    font-size: 1.2rem;
    font-weight: 700;
    color: #111;
}

.add-cart-icon {
    color: #c5a059;
    font-size: 1.3rem;
    transition: 0.3s;
}

.add-cart-icon:hover {
    color: #111;
    transform: rotate(-10deg);
}

/* إعدادات عامة للفوتر */
.taiba-footer {
    background-color: #111; /* أسود فاخر */
    color: #fff;
    padding: 70px 0 0;
    direction: rtl;
}

.footer-main-logo {
    max-width: 120px; /* يمكنك تكبير أو تصغير الشعار من هنا */
    height: auto;
    object-fit: contain;
    /* إضافة فلتر لجعل الشعار يميل للذهبي إذا كان أبيض أو أسود (اختياري) */
    /* filter: drop-shadow(0px 0px 5px rgba(197, 160, 89, 0.5)); */
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1.2fr; /* توزيع الأعمدة */
    gap: 40px;
    margin-bottom: 50px;
}

.footer-col .logo-text {
    color: #c5a059; /* لون ذهبي */
    font-size: 2rem;
    margin-bottom: 20px;
}

.brand-description {
    color: #aaa;
    line-height: 1.8;
    font-size: 0.95rem;
    margin-bottom: 25px;
}

.footer-title {
    color: #fff;
    font-size: 1.3rem;
    margin-bottom: 25px;
    position: relative;
    padding-bottom: 10px;
}

.footer-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 40px;
    height: 2px;
    background-color: #c5a059;
}

/* روابط الفوتر */
.footer-links {
    list-style: none;
    padding: 0;
}

.footer-links li {
    margin-bottom: 12px;
}

.footer-links a {
    color: #aaa;
    text-decoration: none;
    transition: 0.3s;
    font-size: 0.95rem;
}

.footer-links a:hover {
    color: #c5a059;
    padding-right: 10px;
}

/* معلومات التواصل */
.contact-info {
    list-style: none;
    padding: 0;
}

.contact-info li {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
    color: #aaa;
}

.contact-info i {
    color: #c5a059;
    font-size: 1.1rem;
}

/* وسائل التواصل الاجتماعي */
.social-links {
    display: flex;
    gap: 15px;
}

.social-links a {
    width: 40px;
    height: 40px;
    background: #222;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    border-radius: 50%;
    transition: 0.3s;
    text-decoration: none;
}

.social-links a:hover {
    background: #c5a059;
    color: #111;
}

/* الجزء السفلي */
.footer-bottom {
    background: #0a0a0a;
    padding: 25px 0;
    border-top: 1px solid #222;
}

.bottom-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.bottom-flex p {
    color: #666;
    font-size: 0.9rem;
}

.payment-icons {
    display: flex;
    gap: 20px;
    font-size: 1.5rem;
    color: #444;
}

/* التجاوب (Responsive) */
@media (max-width: 992px) {
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .footer-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }
    .footer-title::after {
        right: 50%;
        transform: translateX(50%);
    }
    .contact-info li {
        justify-content: center;
    }
    .social-links {
        justify-content: center;
    }
    .bottom-flex {
        justify-content: center;
    }
}


/* Responsive */
@media (max-width: 768px) {
    .luxury-grid { gap: 30px; }
    .item-overlay { bottom: 0; background: transparent; }
    .quick-add { padding: 10px 20px; font-size: 0.8rem; }
}