/* Wrapper */
.category-swiper-block {
  position: relative;

}

.category-swiper-block .swiper {
  padding: 0.25rem 0.5rem 3rem 0.5rem;
  margin: 0 3rem;
}

.category-swiper-block .cssb-card {
  display: block;
  text-decoration: none;
  color: inherit;
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.07);
  transition: transform .2s ease, box-shadow .2s ease;
}

.category-swiper-block .cssb-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.10);
}

.category-swiper-block .cssb-media img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  display: block;
}

.category-swiper-block .cssb-body {
  padding: 16px;
}


.category-swiper-block .cssb-excerpt {
  margin: 0;
}

/* Equal-height cards per row */
.category-swiper-block .swiper-wrapper {
  /* Swiper already uses flex, but this ensures stretching */
  display: flex;
  align-items: stretch;
}

.category-swiper-block .swiper-slide {
  display: flex;
  /* make slide a flex container */
  height: auto;
  /* allow height to grow with tallest card */
}

.category-swiper-block .cssb-card {
  display: flex;
  /* stack media + body vertically */
  flex-direction: column;
  flex: 1 1 auto;
  /* fill full height of the slide */
}

/* Optional: ensure body fills remaining space nicely */
.category-swiper-block .cssb-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  /* pushes body to consume remaining height evenly */
}

.cssb-button-wrap.wp-block-button {
  margin-top: auto;
}

.cssb-button-wrap.wp-block-button .cssb-button {
  width: 100%;
}


.category-swiper-block .swiper-button-prev,
.category-swiper-block .swiper-button-next {
  color: #111;
}

.category-swiper-block .swiper-pagination-bullet-active {
  background: #111;
}

.cssb-editor-hint {
  margin-bottom: 10px;
  padding: 8px 12px;
  background: #f6f7f7;
  border-radius: 6px;
  font-size: 13px;
}

.swiper-button-next::after,
.swiper-button-prev::after {
  font-size: 2em;
  color: rgba(var(--wp--preset--color--global--secondary), 1);
}

.category-swiper-block .swiper-pagination-bullet-active {
  background: rgba(var(--wp--preset--color--global--secondary), 1);
}




/* Move Swiper arrows outside the slider */
.swiper-button-next {
  margin-top: 0px;
  position: absolute;
  top: 50%;
  right: -0.5rem;
  width: 36px;
  height: 36px;
  transform: translateY(-50%);
}

.swiper-button-prev {
  position: absolute;
  top: 50%;
  left: -0.5rem;
  width: 36px;
  height: 36px;
  transform: translateY(-50%);
  margin-top: 0px;
}