/* ================================
   Category Catalog Widget
   ================================ */

.category-catalog-wrapper {
  display: flex;
  flex-direction: column;
  gap: 80px;
}

.category-catalog-item {
  display: flex;
  flex-direction: column;
  gap: 30px;
}

/* Title + button row */
.category-catalog-item .catalog-item-title-btn-wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
}

.category-catalog-item .catalog-item-title-wrapper {
  display: flex;
  align-items: baseline;
  gap: 12px;
  flex-wrap: wrap;
}

.category-catalog-item .catalog-item-title-btn-wrapper .elementor-heading-title {
  margin: 0;
}

.category-catalog-item .category-catalog-count {
  font-size: 0.7em;
  opacity: 0.6;
  white-space: nowrap;
}

/* Explore button: red like the rest of the site.
   The arrow icon and divider are added automatically by the theme's
   `.common-button a::after` rule, so we only fix the colors here. */
.category-catalog-item .catalog-item-explore-category-btn .elementor-button {
  background-color: var(--e-global-color-0e4a347, #C1002B) !important;
  color: #ffffff !important;
  font-family: "DM Sans", sans-serif !important;
  font-size: 16px !important;
  font-weight: 500 !important;
  line-height: 1.2 !important;
  padding: 8px 16px !important;
  /* Reserve space for the arrow box that sits outside the right edge,
     so it stays inside the container. Roughly the arrow width. */
  margin-right: 35px !important;
}

.category-catalog-item .catalog-item-explore-category-btn .elementor-button:hover,
.category-catalog-item .catalog-item-explore-category-btn .elementor-button:focus {
  background-color: var(--e-global-color-0e4a347, #C1002B) !important;
  color: #ffffff !important;
}

.category-catalog-item .catalog-item-explore-category-btn .elementor-button .elementor-button-text,
.category-catalog-item .catalog-item-explore-category-btn .elementor-button .letter {
  color: #ffffff !important;
  font-family: "DM Sans", sans-serif !important;
  font-size: 16px !important;
  font-weight: 500 !important;
  text-transform: uppercase !important;
}

/* Arrow box: same height as the button and square, so it never looks
   oversized/unbalanced next to the text. */
.category-catalog-item .catalog-item-explore-category-btn .elementor-button::after {
  height: 100% !important;
  width: auto !important;
  aspect-ratio: 1 / 1 !important;
  right: 0 !important;
  top: 0 !important;
  transform: translateX(100%);
  background-size: 16px !important;
}

/* Products grid */
.category-catalog-wrapper .catalog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  column-gap: 30px;
  row-gap: 30px;
}

.category-catalog-wrapper .catalog-grid-item {
  min-width: 0;
}

.category-catalog-wrapper .e-loop-nothing-found-message {
  grid-column: 1 / -1;
}

@media (max-width: 1024px) {
  .category-catalog-wrapper .catalog-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 767px) {
  .category-catalog-wrapper .catalog-grid {
    grid-template-columns: 1fr;
  }

  .category-catalog-item .catalog-item-title-btn-wrapper {
    align-items: flex-start;
    flex-direction: column;
  }
}

/* ================================
   Products carousel
   ================================ */
.category-catalog-item .catalog-carousel {
  width: 100%;
  position: relative;
}

.category-catalog-item .catalog-carousel .swiper-slide {
  height: auto;
  min-width: 0;
}

.category-catalog-item .catalog-carousel-item {
  display: flex;
}

.category-catalog-item .catalog-carousel-item > .elementor {
  width: 100%;
}

/* Navigation */
.category-catalog-item .catalog-carousel-nav {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  margin-top: 24px;
}

.category-catalog-item .catalog-carousel .swiper-button-prev,
.category-catalog-item .catalog-carousel .swiper-button-next {
  position: static;
  width: 44px;
  height: 44px;
  margin: 0;
  border-radius: 50%;
  border: 1px solid currentColor;
  background: transparent;
  cursor: pointer;
  color: inherit;
  transition: background 0.25s ease, color 0.25s ease;
}

.category-catalog-item .catalog-carousel .swiper-button-prev::after,
.category-catalog-item .catalog-carousel .swiper-button-next::after {
  font-size: 16px;
  font-weight: 700;
}

.category-catalog-item .catalog-carousel .swiper-button-prev:hover,
.category-catalog-item .catalog-carousel .swiper-button-next:hover {
  background: var(--e-global-color-accent, #c8102e);
  color: #fff;
  border-color: var(--e-global-color-accent, #c8102e);
}

.category-catalog-item .catalog-carousel .swiper-button-disabled {
  opacity: 0.35;
  pointer-events: none;
}

/* Pagination */
.category-catalog-item .catalog-carousel .swiper-pagination {
  position: static;
  margin-top: 20px;
}

.category-catalog-item .catalog-carousel .swiper-pagination-bullet-active {
  background: var(--e-global-color-accent, #c8102e);
}

