/* --- Shop Page Layout --- */
.shop-layout { display: flex; gap: 40px; padding: 40px 0; }
.shop-sidebar { width: 220px; flex-shrink: 0; }
.filter-list { list-style: none; padding: 0; }
.filter-list li a { 
    display: block; padding: 12px 0; color: #666; 
    text-decoration: none; border-bottom: 1px solid #eee; transition: 0.3s;
}
.filter-list li a.active-cat { color: #c5a059; font-weight: bold; border-bottom-color: #c5a059; }

.products-grid { 
    display: grid; flex: 1;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); 
    gap: 30px; 
}

/* --- Mini Product Card --- */
.product-mini-card { background: #fff; padding: 15px; border: 1px solid #f5f5f5; transition: 0.4s; }
.product-mini-card:hover { box-shadow: 0 10px 30px rgba(0,0,0,0.05); }
.card-img { position: relative; height: 200px; overflow: hidden; background: #fafafa; }
.card-img img { width: 100%; height: 100%; object-fit: contain; }
.card-overlay { 
    position: absolute; top: 0; left: 0; width: 100%; height: 100%; 
    background: rgba(0,0,0,0.4); display: flex; align-items: center; 
    justify-content: center; opacity: 0; transition: 0.3s; 
}
.product-mini-card:hover .card-overlay { opacity: 1; }
.view-link { color: #fff; text-decoration: none; border: 1px solid #fff; padding: 8px 20px; }

/* --- Single Product Layout --- */
.product-grid-detail { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; padding: 60px 0; }
.p-title { font-family: 'Amiri', serif; font-size: 3rem; margin-bottom: 15px; }
.p-price { font-size: 2rem; color: #c5a059; font-weight: bold; margin-bottom: 30px; }
.buy-now-btn { 
    display: block; background: #111; color: #fff; text-align: center; 
    padding: 20px; text-decoration: none; font-weight: 600; font-size: 1.1rem; 

}

/* الحاوية الكبرى */
.product-page-wrapper {
    padding: 60px 0;
    overflow-x: hidden; /* لمنع أي سكرول جانبي مزعج */
}

/* التخطيط الأساسي (حاسوب) */
.product-main-layout {
    display: flex;
    flex-wrap: wrap; /* يسمح بالعناصر بالنزول لأسفل في الجوال */
    gap: 50px;
    align-items: flex-start;
}

/* مساحة الصورة */
.product-visual-area {
    flex: 1;
    min-width: 300px; /* لضمان عدم صغر الصورة جداً */
}

.image-card {
    background: #fff;
    padding: 20px;
    border: 1px solid #f1f1f1;
    text-align: center;
}

.image-card img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
}

/* مساحة المحتوى */
.product-content-area {
    flex: 1;
    min-width: 300px;
}

.product-title {
    font-family: 'Amiri', serif;
    font-size: 3rem;
    color: #111;
    margin: 15px 0;
    line-height: 1.2;
}

.product-price {
    font-size: 2.2rem;
    color: #c5a059;
    font-weight: bold;
    margin-bottom: 30px;
}

.product-description h3 {
    font-size: 1.1rem;
    margin-bottom: 15px;
    border-bottom: 1px solid #c5a059;
    display: inline-block;
}

.product-description p {
    color: #666;
    line-height: 1.8;
    margin-bottom: 40px;
}

.btn-buy-luxury {
    display: block;
    background: #111;
    color: #fff;
    text-align: center;
    padding: 20px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
    transition: 0.3s ease;
}

.btn-buy-luxury:hover { background: #c5a059; }

.trust-icons {
    display: flex;
    gap: 20px;
    margin-top: 25px;
    color: #999;
    font-size: 0.85rem;
}

/* الحاوية الكبرى */
.shop-wrapper { padding: 40px 0; overflow-x: hidden; }

.shop-intro { text-align: center; margin-bottom: 50px; }
.shop-intro h1 { font-family: 'Amiri', serif; font-size: 2.8rem; color: #111; }
.shop-intro p { color: #888; font-weight: 300; }

/* التخطيط (حاسوب) */
.shop-main-layout { display: flex; gap: 40px; align-items: flex-start; }

/* الشريط الجانبي */
.shop-sidebar { width: 240px; flex-shrink: 0; position: sticky; top: 20px; }
.filter-card { background: #fff; padding: 25px; border: 1px solid #eee; }
.filter-card h3 { font-size: 1rem; margin-bottom: 20px; border-bottom: 1px solid #c5a059; padding-bottom: 10px; }

.categories-nav { list-style: none; padding: 0; }
.categories-nav li a { 
    display: block; padding: 12px 0; color: #555; text-decoration: none; 
    font-size: 0.9rem; transition: 0.3s; border-bottom: 1px solid #f9f9f9; 
}
.categories-nav li a:hover, .categories-nav li a.active-link { color: #c5a059; padding-right: 10px; }

/* شبكة المنتجات */
.products-content-area { flex: 1; }
 .products-grid-system { 
display: grid; 
    /* تقسيم الشاشة لـ 3 أعمدة متساوية */
    grid-template-columns: repeat(3, 1fr); 
    gap: 30px; /* مسافة مريحة بين البطاقات */ 
}

/* بطاقة المنتج */
.product-item-card {display: flex;
    flex-direction: column; /* الصورة فوق والنص تحت */
    background: #fff; 
    border: 1px solid #eee; 
    transition: 0.4s ease-in-out;
    height: 100%; /* لتوحيد ارتفاع البطاقات في الصف الواحد */}
.product-item-card:hover { transform: translateY(-10px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.05); }

.item-img-box { width: 100%; 
    height: 280px; /* ارتفاع ثابت للصور لضمان التوازي */
    background: #fafafa; 
    overflow: hidden;
    position: relative;}
.item-img-box img { width: 100%; height: 100%; object-fit: contain; }

.overlay-btn { 
    position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.5);
    color: #fff; display: flex; align-items: center; justify-content: center;
    opacity: 0; transition: 0.3s; text-decoration: none;
}
.item-img-box:hover .overlay-btn { opacity: 1; }

.item-details { padding: 20px; text-align: center; }
.item-details h3 { font-size: 1rem; margin-bottom: 10px; color: #333; height: 2.4em; overflow: hidden; }
.item-price { color: #c5a059; font-weight: 700; font-size: 1.1rem; margin-bottom: 15px; }

.add-to-cart-btn { 
    display: block; border: 1px solid #111; color: #111; padding: 10px; 
    text-decoration: none; font-size: 0.85rem; transition: 0.3s; 
}
.add-to-cart-btn:hover { background: #111; color: #fff; }

/* --- تعديلات الجوال (Tablet & Mobile) --- */
@media (max-width: 992px) {
    .shop-main-layout { flex-direction: column; }
    .shop-sidebar { width: 100%; position: static; }
    
    /* تحويل القائمة الجانبية إلى شريط تمرير أفقي */
    .categories-nav { display: flex; overflow-x: auto; gap: 10px; padding-bottom: 10px; }
    .categories-nav li { flex-shrink: 0; }
    .categories-nav li a { 
        border: 1px solid #eee; padding: 8px 20px; border-radius: 30px; 
        background: #fff; border-bottom: none;
    }
    .categories-nav li a.active-link { background: #c5a059; color: #fff; border-color: #c5a059; }
}

/* --- للشاشات المتوسطة (تابلت - أقل من 1024px) --- */
@media (max-width: 1024px) {
    .products-grid-system { 
        grid-template-columns: repeat(2, 1fr); /* نتحول لعمودين */
    }
}

/* --- للشاشات الصغيرة (جوال - أقل من 768px) --- */
@media (max-width: 768px) {
    .shop-main-layout {
        flex-direction: column;
    }
    
    .products-grid-system { 
        grid-template-columns: repeat(2, 1fr); /* نبقى على عمودين لسهولة التصفح */
        gap: 15px;
    }

    .item-img-box { height: 200px; } /* تصغير الصور لتناسب الجوال */
    
    .item-details h3 { font-size: 1rem; }
}

/* --- للجوالات الصغيرة جداً (أقل من 480px) --- */
@media (max-width: 480px) {
    .products-grid-system { 
        grid-template-columns: 1fr; /* عمود واحد فقط لتركيز كامل على المنتج */
    }
}

/* --- تعديلات الجوال الصارمة --- */
@media (max-width: 768px) {
    .product-page-wrapper {
        padding: 20px 0;
    }

    .product-main-layout {
        flex-direction: column; /* تحويل الأعمدة لأسطر */
        gap: 30px;
    }

    .product-visual-area, .product-content-area {
        width: 100%; /* تأكيد أخذ كامل العرض */
        min-width: 100%;
    }

    .product-title {
        font-size: 2rem; /* تصغير العنوان ليناسب شاشة الهاتف */
    }

    .product-price {
        font-size: 1.8rem;
    }

    .image-card {
        padding: 10px; /* تقليل الحواف لزيادة مساحة الصورة */
    }
}
