.shop-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 2rem;
  margin-top: 2rem;
}

.shop-sidebar {
  background: #fff;
  border-radius: 20px;
  padding: 1.5rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.shop-filter {
  margin-bottom: 2rem;
}

.shop-filter h3 {
  font-size: 18px;
  margin-bottom: 1rem;
  font-weight: 600;
  color: #333;
}

.shop-filter ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.shop-filter li {
  margin-bottom: 0.6rem;
}

.shop-filter a {
  color: #444;
  text-decoration: none;
  transition: color 0.2s ease;
}

.shop-filter a:hover {
  color: var(--color-main);
}

.price-filter-form input {
  width: 100%;
  padding: 5px;
  margin-bottom: 10px;
  border: 1px solid #ddd;
  border-radius: 5px;
}

.price-filter-form button {
  width: 100%;
  background-color: var(--color-main);
  color: #fff;
  border: none;
  padding: 10px;
  border-radius: 6px;
  cursor: pointer;
}
.price-filter-form button:hover {
  background-color: #335d1b;
}
/* ✅ Sidebar structure */
.shop-sidebar {
  background: #fff;
  border-radius: 20px;
  padding: 1.5rem;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

/* 🟩 filter box */
.shop-filter {
  background: #fff;
  border-radius: 16px;
  padding: 1.2rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.shop-filter h3 {
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 1rem;
  color: #111;
}

/* 🟩 category checkboxes */
.category-checkbox {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 10px;
  border: 1px solid #eee;
  border-radius: 8px;
  margin-bottom: 8px;
  font-size: 15px;
  color: #222;
  background: #fff;
  transition: all 0.2s ease;
}
.category-checkbox:hover {
  border-color: #2d7a1f;
  color: #2d7a1f;
}
.category-checkbox input {
  accent-color: #2d7a1f;
  width: 18px;
  height: 18px;
}

/* 🟩 price filter single range */
.price-filter {
  padding: 10px 0;
}
.price-values {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
  color: #444;
  margin-bottom: 10px;
}
.price-filter input[type="range"] {
  -webkit-appearance: none;
  width: 100%;
  height: 6px;
  background: #ddd;
  border-radius: 5px;
  outline: none;
}
.price-filter input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  background: #2d7a1f;
  border-radius: 50%;
  cursor: pointer;
}

/* 🟩 Apply button */
.filter-submit {
  margin-top: 10px;
}
.btn-apply {
  width: 100%;
  background: #2d7a1f;
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 10px 0;
  font-weight: 600;
  cursor: pointer;
  transition: 0.3s;
}
.btn-apply:hover {
  background: #225e17;
}

/* ==============================================
   تنسيق شبكة المنتجات (Product Grid)
============================================== */

.products-headline {
    font-size: 2rem;
    color: var(--color-text-dark);
    margin-bottom: 2rem;
    font-weight: 700;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* 3 أعمدة في الشاشات الكبيرة */
    gap: 20px;
}

/* 🟩 تنسيق كارت المنتج */
.product-card {
    background-color: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    overflow: hidden;
    text-align: center;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.08);
}

.product-image-link {
    position: relative;
    display: block;
}
.product-image-link img {
    width: 100%;
    height: 240px; /* توحيد ارتفاع الصورة */
    object-fit: cover;
    display: block;
}

/* شارة التخفيض */
.product-sale-badge {
    position: absolute;
    top: 10px;
    left: 10px; /* أو right: 10px للإنجليزية */
    background-color: var(--color-main);
    color: #fff;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    z-index: 1;
}
html[dir="ltr"] .product-sale-badge {
    left: 10px;
    right: auto;
}

/* محتوى الكارت */
.product-card-content {
    padding: 1.2rem;
    flex-grow: 1; /* لجعل الزر في الأسفل دائماً */
    display: flex;
    flex-direction: column;
}
.product-category {
    font-size: 0.8rem;
    color: #888;
    margin-bottom: 5px;
    text-transform: uppercase;
}
.product-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 10px;
}
.product-title a {
    text-decoration: none;
    color: var(--color-text-dark);
}
.product-price {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--color-main);
    margin-bottom: 15px;
}
.product-price ins {
    text-decoration: none;
}
.product-price del {
    font-size: 0.9rem;
    color: #999;
    margin-right: 5px;
}
.btn-read-more {
    margin-top: auto; /* يدفع الزر لأسفل الكارت */
    border: 2px solid var(--color-main);
    color: var(--color-main);
    padding: 8px 15px;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
}
.btn-read-more:hover {
    background-color: var(--color-main);
    color: #fff;
}


/* ==============================================
   تنسيق الموبايل (Responsive)
============================================== */

/* 1. شاشات التابلت (992px) */
@media (max-width: 992px) {
    .shop-layout {
        grid-template-columns: 240px 1fr; /* تصغير الشريط الجانبي */
        gap: 1.5rem;
    }
    .products-grid {
        grid-template-columns: repeat(2, 1fr); /* عمودين للمنتجات */
    }
}

/* 2. شاشات الموبايل (768px) */
@media (max-width: 768px) {
    .shop-layout {
        grid-template-columns: 1fr; /* (الحل) عمود واحد فقط */
        gap: 1.5rem;
    }
    .products-headline {
        text-align: center;
        margin-bottom: 1rem;
    }
}

/* 3. شاشات الموبايل الأصغر (480px) */
@media (max-width: 480px) {
    .products-grid {
        grid-template-columns: 1fr; /* عمود واحد للمنتجات */
    }
}

/* ==============================================
   تنسيق ترقيم الصفحات (Pagination)
============================================== */

/* ==============================================
   تنسيق ترقيم الصفحات (Pagination) - (نسخة مُصححة للتوسيط)
============================================== */

.shop-pagination {
    margin-top: 3rem;
    clear: both;
    width: 100%;
    text-align: center; /* (جديد) لتوسيط الـ <ul> */
}

/* 🟩 الحاوية <ul> */
.shop-pagination ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: inline-flex; /* يجعلها كتلة واحدة قابلة للتوسيط */
    flex-wrap: wrap; 
    justify-content: center;
    align-items: center;
    /* (تم حذف width: 100%) */
}

/* 🟩 عناصر القائمة (li) */
.shop-pagination li {
    display: inline-block;
    margin: 0;
}

/* 🟩 الأزرار (أرقام + التالي/السابق) */
.shop-pagination .page-numbers {
    display: inline-block;
    padding: 10px 18px;
    margin: 4px;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    color: var(--color-text-dark);
    background-color: #fff;
    border: 1px solid #eee;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
}

/* 🟩 زر الصفحة الحالية (Current) */
.shop-pagination .page-numbers.current {
    background-color: var(--color-main);
    color: #fff;
    border-color: var(--color-main);
    cursor: default;
}

/* 🟩 عند المرور (Hover) */
.shop-pagination a.page-numbers:hover {
    background-color: var(--color-main);
    color: #fff;
    border-color: var(--color-main);
    transform: translateY(-2px);
}

/* 🟩 النقاط (...) */
.shop-pagination .page-numbers.dots {
    background-color: transparent;
    border: none;
    box-shadow: none;
    padding: 10px 5px;
}