.R-products {
  --r-products-bg: var(--app-bg-color);
  --r-products-text: var(--text-color-primary-bg);
  --r-products-muted: color-mix(in srgb, var(--r-products-text) 68%, transparent);
  --r-products-active: var(--third-color, #064663);
  --r-products-nav-bg: color-mix(in srgb, var(--r-products-text) 9%, transparent);
  padding-block: clamp(3.5rem, 6vw, 5rem);
  overflow: hidden;
  background: var(--r-products-bg);
  color: var(--r-products-text);
}

.R-products *,
.R-products *::before,
.R-products *::after {
  box-sizing: border-box;
}

.R-products--custom-colors {
  --r-products-bg: var(--r-products-custom-bg-light);
  --r-products-text: var(--r-products-custom-text-light);
  --r-products-title-color: var(--r-products-custom-title-light);
  --r-products-subtitle-color: var(--r-products-custom-subtitle-light);
  --r-products-active: var(--r-products-custom-active-light);
  --r-products-nav-bg: var(--r-products-custom-nav-light);
}

.R-products__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  margin-bottom: 1.25rem;
}

.R-products__heading {
  min-width: 0;
  text-align: start;
}

.R-products__title,
.R-products__subtitle {
  margin: 0;
}

.R-products__title {
  color: var(--r-products-title-color, var(--r-products-text));
  font-size: clamp(1.25rem, 2vw, 1.5rem);
  font-weight: var(--font-weight-bold, 700);
  line-height: 1.35;
}

.R-products__subtitle {
  margin-top: 0.25rem;
  color: var(--r-products-subtitle-color, var(--r-products-muted));
  font-size: clamp(0.78rem, 1vw, 0.95rem);
  line-height: 1.5;
}

.R-products__navigation {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 0.5rem;
}

.R-products__nav {
  position: static;
  display: inline-grid;
  width: 2.5rem;
  height: 2.5rem;
  margin: 0;
  padding: 0;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: var(--r-products-nav-bg);
  color: var(--r-products-text);
  cursor: pointer;
  transition: opacity 0.2s ease, background-color 0.2s ease;
}

.R-products__nav::after {
  content: none;
}

.R-products__nav i {
  color: inherit;
  font-size: 0.85rem;
}

.R-products__nav:hover:not(:disabled) {
  background: color-mix(in srgb, var(--r-products-active) 16%, transparent);
}

.R-products__nav:disabled {
  opacity: 0.38;
  cursor: not-allowed;
}

.R-products__tabs {
  display: flex;
  width: 100%;
  margin-bottom: clamp(1.5rem, 3vw, 2.25rem);
  align-items: center;
  justify-content: flex-start;
  gap: clamp(0.25rem, 1vw, 0.75rem);
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  white-space: nowrap;
  overscroll-behavior-inline: contain;
}

.R-products__tabs::-webkit-scrollbar {
  display: none;
}

.R-products__tab {
  flex: 0 0 auto;
  min-height: 2.25rem;
  padding: 0.38rem 0.85rem;
  border: 0;
  border-radius: 0.35rem;
  background: transparent;
  color: var(--r-products-text);
  font-size: 0.86rem;
  line-height: 1.25;
  cursor: pointer;
  transition: color 0.18s ease, background-color 0.18s ease;
}

.R-products__tab:hover:not(.is-active) {
  background: color-mix(in srgb, var(--r-products-active) 9%, transparent);
}

.R-products__tab.is-active {
  background: var(--r-products-active);
  color: #fff;
}

.R-products__tab:focus-visible,
.R-products__nav:focus-visible {
  outline: 2px solid var(--r-products-active);
  outline-offset: 2px;
}

.R-products__panel[hidden] {
  display: none;
}

.R-products__panel {
  min-width: 0;
  overflow: hidden;
}

.R-products__slider {
  width: 100%;
  max-width: 100%;
  height: auto;
  overflow: hidden;
}

.R-products__slider .swiper-wrapper {
  align-items: stretch;
}

.R-products__slider .swiper-slide {
  display: flex;
  width: auto;
  height: auto;
  min-width: 0;
}

.R-products__slider .swiper-slide > .product-item {
  width: 100%;
  height: 100%;
}

.R-products__empty {
  display: grid;
  min-height: 16rem;
  place-items: center;
  align-content: center;
  color: var(--r-products-muted);
  text-align: center;
}

.R-products__empty p {
  margin: 0.75rem 0 0;
  color: inherit;
}

html.dark .R-products,
.dark .R-products {
  --r-products-muted: color-mix(in srgb, var(--r-products-text) 74%, transparent);
  --r-products-nav-bg: color-mix(in srgb, var(--r-products-text) 14%, transparent);
}

html.dark .R-products--custom-colors,
.dark .R-products--custom-colors {
  --r-products-bg: var(--r-products-custom-bg-dark);
  --r-products-text: var(--r-products-custom-text-dark);
  --r-products-title-color: var(--r-products-custom-title-dark);
  --r-products-subtitle-color: var(--r-products-custom-subtitle-dark);
  --r-products-active: var(--r-products-custom-active-dark);
  --r-products-nav-bg: var(--r-products-custom-nav-dark);
}

@media (min-width: 768px) {
  .R-products.product-grid .R-products__slider.swiper-disabled .swiper-wrapper {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
    transform: none !important;
  }

  .R-products.product-grid .R-products__slider.swiper-disabled .swiper-slide {
    width: auto !important;
    margin: 0 !important;
  }
}

@media (min-width: 992px) {
  .R-products.product-grid .R-products__slider.swiper-disabled .swiper-wrapper {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.125rem;
  }
}

@media (min-width: 1200px) {
  .R-products.product-grid .R-products__slider.swiper-disabled .swiper-wrapper {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1.25rem;
  }
}

@media (max-width: 767.98px) {
  .R-products {
    padding-block: clamp(2rem, 9vw, 2.75rem);
  }

  .R-products__header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
  }

  [dir="rtl"] .R-products__heading {
    grid-column: 2;
  }

  .R-products__navigation {
    grid-column: 1;
    justify-self: end;
  }

  [dir="rtl"] .R-products__heading {
    grid-column: 1;
    grid-row: 1;
  }

  [dir="rtl"] .R-products__navigation {
    grid-column: 1;
    grid-row: 1;
  }

  .R-products__title {
    font-size: clamp(1.15rem, 5vw, 1.3rem);
  }

  .R-products__subtitle {
    font-size: 0.78rem;
  }

  .R-products__nav {
    width: 2.25rem;
    height: 2.25rem;
  }

  .R-products__tabs {
    margin-inline: calc(var(--bs-gutter-x, 1.5rem) * -0.5);
    width: calc(100% + var(--bs-gutter-x, 1.5rem));
    margin-bottom: 1.35rem;
    padding-inline: calc(var(--bs-gutter-x, 1.5rem) * 0.5);
    gap: 0.2rem;
  }

  .R-products__tab {
    min-height: 2.1rem;
    padding-inline: 0.7rem;
    font-size: 0.78rem;
  }

}

@media (prefers-reduced-motion: reduce) {
  .R-products__nav,
  .R-products__tab {
    transition: none;
  }
}
