/* Al Rawnaq design — Departments page (pills + department cards) */
.depts-page:not(z) { padding-bottom: 88px; background: #fff; }
.depts-page > .container:not(z) { padding-top: var(--rw-hero-gap, 32px); }

/* department pills */
.depts-pills:not(z) { display: flex; flex-wrap: wrap; gap: 12px; margin: 0 0 40px; }
.depts-pill:not(z) {
  display: inline-flex; align-items: center; padding: 12px 22px; border-radius: 999px;
  background: var(--offwhite); border: 1px solid var(--line); color: var(--navy);
  font-size: 14px; line-height: 22px; font-weight: 400; text-transform: none; letter-spacing: 0; text-decoration: none; white-space: nowrap;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.depts-pill:hover:not(z), .depts-pill.is-active:not(z) { background: var(--navy); border-color: var(--navy); color: #fff; }

/* cards */
.depts-cards:not(z) { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
@media (max-width: 991px) { .depts-cards:not(z) { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .depts-cards:not(z) { grid-template-columns: 1fr; gap: 16px; } .depts-pills:not(z) { flex-wrap: nowrap; overflow-x: auto; margin-bottom: 24px; scrollbar-width: none; } .depts-pill:not(z) { flex: 0 0 auto; } }

.depts-box:not(z) { display: flex; flex-direction: column; gap: 16px; padding: 24px; border: 0 !important; border-radius: 28px !important; background: var(--offwhite); box-shadow: none !important; }
.depts-box:nth-child(3n+1):not(z) { background: var(--yellowtint); }
.depts-box:nth-child(3n+2):not(z) { background: var(--navytint); }
.depts-box:nth-child(3n+3):not(z) { background: var(--graytint); }

.depts-box__head:not(z) { display: flex; align-items: center; gap: 14px; padding: 0; border: 0; }
.depts-box__avatar:not(z) { width: 44px; height: 44px; flex: 0 0 44px; border-radius: 999px; background: var(--yellow); color: var(--navy); display: flex; align-items: center; justify-content: center; font-size: 18px; line-height: 26px; font-weight: 600; }
.depts-box:nth-child(3n+1) .depts-box__avatar:not(z) { background: var(--navy); color: var(--yellow); }
.depts-box__title:not(z) { margin: 0; font-size: 18px; line-height: 26px; font-weight: 600; color: var(--navy); text-transform: none; }
.depts-box__title a:not(z) { color: inherit; text-decoration: none; }
.depts-box__title a:hover:not(z) { text-decoration: underline; }
.depts-box__count:not(z) { font-size: 14px; line-height: 22px; color: var(--waterloo); }

.depts-box__list:not(z) { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.depts-row:not(z) { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 16px; background: #fff; text-decoration: none; color: var(--navy); transition: transform 0.15s ease; }
.depts-row:hover:not(z) { transform: translateX(2px); }
[dir="rtl"] .depts-row:hover:not(z) { transform: translateX(-2px); }
.depts-row__thumb:not(z) { width: 44px; height: 44px; flex: 0 0 44px; border-radius: 12px; object-fit: cover; background: var(--graytint); }
.depts-row__thumb--ph:not(z) { display: flex; align-items: center; justify-content: center; color: var(--waterloo); }
.depts-row__body:not(z) { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; }
.depts-row__title:not(z) { font-size: 14px; line-height: 22px; font-weight: 600; color: var(--navy); text-transform: none; letter-spacing: 0; }
.depts-row__count:not(z) { font-size: 14px; line-height: 22px; color: var(--gray); }
.depts-row__go:not(z) { width: 30px; height: 30px; padding: 8px; border-radius: 999px; background: var(--navy); color: var(--yellow); flex: 0 0 30px; }

.depts-box__more:not(z) { font-size: 14px; line-height: 22px; color: var(--waterloo); text-decoration: none; }
.depts-box__more:hover:not(z) { color: var(--navy); text-decoration: underline; }
.depts-box__browse:not(z) { margin-top: auto; display: inline-flex; align-items: center; gap: 8px; align-self: flex-start; padding: 12px 22px; border-radius: 999px; background: var(--navy); color: #fff; font-size: 14px; line-height: 20px; font-weight: 600; text-decoration: none; text-transform: none; letter-spacing: 0.02em; }
.depts-box__browse:hover:not(z) { background: #2d2e5c; }

.depts-empty__btn:not(z) { display: inline-flex; background: var(--navy); color: #fff; border-radius: 999px; padding: 16px 32px; font-weight: 600; text-decoration: none; }
.depts-empty__title:not(z) { color: var(--navy); text-transform: none; font-weight: 700; }

.depts-page .depts-pills:not(z) { margin: 0 0 40px !important; padding: 0 !important; }
.depts-page > .container:not(z) { padding-top: var(--rw-hero-gap, 32px) !important; margin-top: 0 !important; }

/* ===== Single department page: Figma "Category Card" grid ===== */
.dept-page:not(z) { padding-bottom: 88px; background: #fff; }
.dept-body:not(z) { padding-top: var(--rw-hero-gap, 32px) !important; margin-top: 0 !important; }
.dept-mobile-title:not(z) { margin: 0 0 16px; font-size: 24px; line-height: 32px; font-weight: 700; color: var(--navy); text-transform: none; letter-spacing: 0; }
@media (min-width: 768px) { .dept-mobile-title:not(z) { display: none; } }
.dept-hero__desc:not(z) { margin: 12px 0 0; font-size: 16px; line-height: 26px; color: var(--gray); max-width: none; }

.dept-grid:not(z) { display: grid !important; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 32px 24px; }
@media (max-width: 1099px) { .dept-grid:not(z) { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 767px) { .dept-grid:not(z) { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 14px; } }

.dept-card:not(z) { display: flex; flex-direction: column; gap: 14px; text-decoration: none; color: var(--navy); border: 0 !important; background: transparent !important; box-shadow: none !important; padding: 0 !important; border-radius: 0 !important; }
.dept-card__media:not(z) { height: 220px; border-radius: 24px; overflow: hidden; background: var(--yellowtint); display: flex; align-items: center; justify-content: center; color: var(--waterloo); }
.dept-card:nth-child(3n+2) .dept-card__media:not(z) { background: var(--navytint); }
.dept-card:nth-child(3n+3) .dept-card__media:not(z) { background: var(--graytint); }
.dept-card__media img:not(z) { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.35s ease; }
.dept-card:hover .dept-card__media img:not(z) { transform: scale(1.04); }
.dept-card__placeholder svg:not(z) { width: 56px; height: 56px; }
@media (max-width: 767px) { .dept-card__media:not(z) { height: 150px; border-radius: 20px; } }

.dept-card__details:not(z) { position: relative; display: flex; flex-direction: column; gap: 2px; padding-inline-end: 48px; min-height: 36px; justify-content: center; }
.dept-card__title:not(z) { margin: 0; font-size: 16px; line-height: 24px; font-weight: 600; color: var(--navy); text-transform: none; letter-spacing: 0; }
.dept-card__count:not(z) { font-size: 14px; line-height: 22px; color: var(--waterloo); }
.dept-card__details:not(z)::after {
  content: ""; position: absolute; inset-inline-end: 0; top: 50%; transform: translateY(-50%);
  width: 36px; height: 36px; border-radius: 999px; border: 1.5px solid var(--navy);
  background: url("data:image/svg+xml,%3Csvg%20preserveAspectRatio%3D%22none%22%20overflow%3D%22visible%22%20width%3D%2216%22%20height%3D%2216%22%20viewBox%3D%220%200%2016%2016%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cg%3E%3Cpath%20d%3D%22M3.33333%208H12.6667%22%20stroke-width%3D%221.8%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%20stroke%3D%22black%22%2F%3E%3Cpath%20d%3D%22M8%203.33333L12.6667%208L8%2012.6667%22%20stroke-width%3D%221.8%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%20stroke%3D%22black%22%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E") center / 16px 16px no-repeat; transition: background-color 0.15s ease;
}
[dir="rtl"] .dept-card__details:not(z)::after { background-image: url("data:image/svg+xml,%3Csvg%20preserveAspectRatio%3D%22none%22%20overflow%3D%22visible%22%20width%3D%2216%22%20height%3D%2216%22%20viewBox%3D%220%200%2016%2016%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cg%3E%3Cpath%20d%3D%22M3.33333%208H12.6667%22%20stroke-width%3D%221.8%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%20stroke%3D%22black%22%2F%3E%3Cpath%20d%3D%22M8%203.33333L12.6667%208L8%2012.6667%22%20stroke-width%3D%221.8%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%20stroke%3D%22black%22%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E"); transform: translateY(-50%) scaleX(-1); }
.dept-card:hover .dept-card__details:not(z)::after { background-color: var(--yellow); border-color: var(--yellow); }

.dept-empty__btn:not(z) { display: inline-flex; background: var(--navy); color: #fff; border-radius: 999px; padding: 16px 32px; font-weight: 600; text-decoration: none; }
.dept-empty__title:not(z) { color: var(--navy); text-transform: none; font-weight: 700; }

.dept-card .dept-card__details:not(z) { padding: 0 48px 0 0 !important; margin: 0 !important; min-height: 40px; justify-content: center; }
[dir="rtl"] .dept-card .dept-card__details:not(z) { padding: 0 0 0 48px !important; }

/* tighter department cards */
.depts-box:not(z) { padding: 18px; gap: 12px; border-radius: 24px !important; }
.depts-row:not(z) { padding: 8px 10px; }

.depts-box:not(z) { padding: 14px; }
.depts-row:not(z) { padding: 8px 10px; }

.depts-box:not(z) { padding: 16px; }

/* Mobile: sticky department pills — no bottom border, vertical breathing room */
@media (max-width: 767px) {
  .depts-page .depts-pills:not(z) { border-bottom: 0 !important; box-shadow: none !important; padding: 12px 0 !important; margin: 0 0 12px !important; }
}
