/*
 * Theme Name:   Blocksy Child
 * Template:     blocksy
 */

/* ================================
   1. أنماط الشبكة العامة (الفئات الفرعية والمنتجات)
   ================================ */
.cat-grid {
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

/* بطاقات الفئات (عامة) */
.cat-item {
  background-color: #ffffff;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  transition: box-shadow 0.2s, transform 0.2s, border-color 0.2s;
  position: relative;
}

.cat-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.07);
  border-color: #d0d0d0;
}

.cat-item img {
  width: 28px;
  height: auto;
  object-fit: contain;
  border-radius: 3px;
  margin-right: 12px;
  flex-shrink: 0;
}

.cat-item h3,
.cat-item h4 {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
  color: #2f3843;
  flex-grow: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* السهم الصغير في أقصى يمين البطاقة */
.cat-item::after {
  content: "▾";
  font-size: 0.8rem;
  color: #999999;
  margin-left: 8px;
  flex-shrink: 0;
}

.cat-grid.parents .cat-item h3 {
  font-size: 1rem;
}

.cat-grid.children .cat-item h4 {
  font-size: 0.95rem;
  color: #444444;
}

.cat-grid.children {
  margin-top: 12px;
}

#cat-products {
  margin-top: 28px;
}


/* ================================
   2. تحسينات شريط التبويبات (Tabs)
   ================================ */
/* نجعل parents container عبارة عن flex أفقي مركزي، بدون التفاف */
.cat-grid.parents {
  display: flex !important;
  justify-content: center;          /* توسيط التبويبات داخل الحاوية */
  flex-wrap: nowrap;                 /* منع التفاف التبويبات إلى السطر الآخر */
  gap: 16px;                         /* مسافة أفقية بين التبويبات */
  border-bottom: 1px solid #e0e0e0;  /* حد سفلي خفيف */
  margin-bottom: 0;
  padding: 16px 0 8px;               /* هوامش عمودية حول شريط التبويبات */
  background-color: #fafafa;         /* خلفية فاتحة خفيفة للتباين */
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05); /* ظل خفيف أسفل الشريط */
}

/* إزالة أي شريط تمرير أفقي */
.cat-grid.parents {
  overflow-x: visible;
}

/* تعديل أنماط كل تاب (كل .cat-item داخل parents) */
.cat-grid.parents .cat-item {
  background-color: transparent;
  border: none;
  border-bottom: 3px solid transparent; /* حد سفلي مخفي مبدئيًا */
  border-radius: 0;
  padding: 14px 24px;                     /* يُقلَّص في الموبايل لاحقًا */
  font-size: 1.15rem;                     /* حجم خط أكبر */
  font-weight: 700;                       /* سمك خط أثقل */
  color: #555555;                         /* لون نص التاب غير النشط */
  display: flex;
  align-items: center;
  cursor: pointer;
  transition: color 0.2s, border-bottom-color 0.2s;
  white-space: nowrap;                    /* منع التفاف نص التاب نفسه */
}

/* إخفاء صورة التصنيف والرمز الافتراضي (::after) في شريط التبويبات */
.cat-grid.parents .cat-item img,
.cat-grid.parents .cat-item::after {
  display: none;
}

/* عندما يكون التاب في حالة hover أو نشط (active) */
.cat-grid.parents .cat-item:hover,
.cat-grid.parents .cat-item.active {
  color: #0073aa;               /* لون نص أزرق للتاب النشط/hover */
  border-bottom-color: #0073aa; /* ظهور حد سفلي باللون الأزرق */
}


/* ================================
   3. تحسين العرض على شاشات الموبايل (بدون تغيير ترتيب الصف)
   ================================ */
@media (max-width: 600px) {
  /* نجعل التبويبات تُقلّص أبعادها قليلاً حتى تظهر الثلاثة في صف واحد */
  .cat-grid.parents .cat-item {
    padding: 8px 10px;        /* تخفيض الهوامش الداخلية لأقصى حد */
    font-size: 0.95rem;       /* تصغير حجم الخط قليلاً */
  }

  /* تقليل مسافة gap حتى تتسع التبويبات الثلاث */
  .cat-grid.parents {
    gap: 8px;
  }

  /* تراعي أسماء الفئات الفرعية داخل بطاقات .cat-item */
  .cat-grid .cat-item h3,
  .cat-grid .cat-item h4 {
    font-size: 0.9rem;
  }
}




/* ===== قسم Why Choose Us (2×2) ===== */
/* ===== Why Section (2×2) ===== */
#why-section {
  padding: 60px 20px;
  background-color: #f9f9f9;
}
#why-section .section-title {
  text-align: center;
  font-size: 2rem;
  margin-bottom: 40px;
  color: #333;
}
#why-section .why-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 30px;
}
#why-section .why-card {
  background: #fff;
  border-radius: 12px;
	
/*   box-shadow: 0 4px 12px rgba(0,0,0,0.05); */
	
	  /* ===== هنا نضيف الظل ===== */
  box-shadow: 0 10px 18px rgba(0, 0, 0, 0.12), 
              0 4px 8px rgba(0, 0, 0, 0.06);
	
  padding: 30px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}
#why-section .why-card .icon img {
  width: 160px;
  height: auto;
  margin-bottom: 20px;
}
#why-section .why-card .card-title {
  font-size: 1.25rem;
  margin-bottom: 8px;
  color: #333; /* نفس اللون الغامق من الصورة 11 */
}
#why-section .why-card .card-subtitle {
  font-size: 0.9rem;
  color: #777;
  margin-bottom: 12px;
}
#why-section .why-card .stars {
  margin-bottom: 20px;
}
#why-section .why-card .stars img {
  width: 16px;
  margin: 0 2px;
}
#why-section .why-card .testimonial {
  background: #f1f1f1;
  border-radius: 8px;
  padding: 15px;
  width: 100%;
  margin-top: auto;
}
#why-section .why-card .testimonial-text {
  font-size: 0.9rem;
  color: #555;
  margin-bottom: 10px;
}
#why-section .why-card .testimonial-author {
  font-size: 0.85rem;
  color: #333;
  font-weight: bold;
}
@media (max-width: 768px) {
  #why-section .why-grid {
    grid-template-columns: 1fr;
  }
}
