/* ART DESIGN — بطاقات التصنيفات الفرعية */
.category-subcats-nav-wrap .category-subcats-swiper { overflow: visible !important; }
.category-subcats-nav-wrap .category-subcats-swiper > .swiper-wrapper {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  height: auto !important;
}
.category-subcats-nav-wrap .category-subcats-swiper .swiper-slide {
  width: auto !important;
  height: auto !important;
  min-width: 0;
  margin: 0 !important;
}
.category-subcats-nav-wrap .category-subcats-nav__link {
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  width: 100%;
  height: 100%;
  padding: 10px 4px;
  border: 1px solid #e0d9cf;
  border-radius: 14px;
  background: #fff;
  color: #24201b;
  text-align: center;
  white-space: normal;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.4;
}
.category-subcats-nav-wrap .category-subcats-nav__link > span { white-space: normal; overflow-wrap: anywhere; }
.category-subcats-nav-wrap .category-subcats-nav__link > .category-subcats-nav__thumb {
  width: min(90px, 100%);
  height: auto;
  aspect-ratio: 1;
  object-fit: contain;
  border-radius: 9px;
}
.category-subcats-nav-wrap .category-subcats-nav__link:is(:hover, :focus-visible) { border-color: #80644b; }
.category-subcats-nav-wrap .category-subcats-swiper :is(.swiper-button-prev, .swiper-button-next, .swiper-pagination, .swiper-scrollbar) { display: none !important; }

@media (min-width: 768px) {
  .category-subcats-nav-wrap .category-subcats-swiper > .swiper-wrapper { transform: none !important; }
}
.category-subcats-nav-wrap .category-subcats-nav__link {
  max-width: 180px;
  margin-inline: auto;
  padding: 0;
  gap: 7px;
  border: 0;
  border-radius: 0;
  background: transparent;
}
.category-subcats-nav-wrap .category-subcats-nav__link > .category-subcats-nav__thumb {
  display: block;
  box-sizing: border-box;
  width: 100%;
  max-width: none;
  height: auto;
  aspect-ratio: 1;
  object-fit: cover;
  border: 1px solid #e0d9cf;
  border-radius: 12px;
  background: #f6f4ef;
}
.category-subcats-nav-wrap .category-subcats-nav__link > span { padding-inline: 2px; }
.category-subcats-nav-wrap .category-subcats-nav__link:is(:hover, :focus-visible) > .category-subcats-nav__thumb { border-color: #80644b; }
/* Subcategory cards: three cards per mobile viewport, with native RTL scrolling. */
@media (max-width: 768px) {
  .category-page-intro .category-subcats-nav-wrap .category-subcats-swiper {
    overflow-x: auto !important;
    overflow-y: hidden !important;
    touch-action: auto !important;
    overscroll-behavior-x: contain;
    scroll-snap-type: x proximity;
  }
  .category-page-intro .category-subcats-nav-wrap .category-subcats-swiper > .swiper-wrapper {
    display: grid !important;
    grid-template-columns: none !important;
    grid-template-rows: auto;
    grid-auto-flow: column;
    grid-auto-columns: calc((100% - 16px) / 3);
    gap: 8px;
    width: 100%;
    transform: none !important;
    touch-action: auto;
  }
  .category-page-intro .category-subcats-nav-wrap .category-subcats-swiper .swiper-slide {
    width: 100% !important;
    min-width: 0;
    margin: 0 !important;
    scroll-snap-align: start;
  }
  .category-page-intro .category-subcats-nav-wrap .category-subcats-nav__link {
    width: 100%;
    max-width: none;
    padding: 0;
    font-size: 15px;
    justify-content: flex-start;
  }
}

/* Hide the Chipboard category cover */
.flex-subTitle > img[alt="بديل الشيبورد"][src*="b97ceac0-7067-4659-962e-83ba9fb0961f"] { display: none; }

/* Hide heading covers on subcategory pages. */
body:has(.breadcrumb a[href*="/categories/"]) .category-page-hero > .subTitle-detail > .container > .flex-subTitle > img {
  display: none;
}

/* Hide the Home category heading image. */
.category-page-hero > .subTitle-detail > .container > .flex-subTitle > img[alt="المنزل"][src*="1cb2e140-2667-443a-a25e-88e79fd41014"] { display: none; }

.category-cover-img {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 7;
  max-height: 380px;
  object-fit: cover;
  object-position: center;
}

@media (max-width: 767px) {
  .category-cover-img {
    aspect-ratio: 3 / 2;
    max-height: 220px;
  }
}