/*
 * Woo Product Categories Slider UI
 * Use with the [cat_slider] PHP snippet. Includes responsive sizing, snap scrolling, navigation controls, and drag-safe images.
 */
.ng-cat-slider {
  position: relative;
  box-sizing: border-box;
  width: min(100%, 1440px);
  max-width: 1440px;
  margin-inline: auto;
  --gap: 28px;
  --item: 186px;
  --thumb: 186px;
  --badge: 50px;
  --badge-inset: -4px;
  --title-line-height: 22.4px;
  --title-h: 67.2px;
  --nav: 40px;
  --nav-gap: 16px;
  --gutter-left: 64px;
  --gutter-right: 64px;
}

.ng-cat-slider .ngcs-viewport {
  width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  scroll-snap-type: none;
  overscroll-behavior-x: contain;
  padding-left: var(--gutter-left);
  padding-right: var(--gutter-right);
  scroll-padding-left: var(--gutter-left);
  scroll-padding-right: var(--gutter-right);
  cursor: grab;
  user-select: none;
}

.ng-cat-slider .ngcs-viewport::-webkit-scrollbar {
  display: none;
}

.ng-cat-slider .ngcs-viewport.ngcs-dragging {
  cursor: grabbing;
}

.ng-cat-slider .ngcs-track {
  display: flex;
  align-items: stretch;
  gap: 0 var(--gap);
  padding: 24px 0;
  margin: 0;
  list-style: none;
}

.ng-cat-slider .ngcs-item {
  box-sizing: border-box;
  flex: 0 0 var(--item);
  width: var(--item);
  min-width: 0;
  scroll-snap-align: start;
  user-select: none;
}

.ng-cat-slider .ngcs-item:last-child {
  scroll-snap-align: end;
}

.ng-cat-slider .ngcs-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  min-width: 0;
  gap: 14px;
  color: inherit;
  text-decoration: none;
  text-align: center;
}

.ng-cat-slider .ngcs-thumb {
  position: relative;
  z-index: 1;
  flex: 0 0 var(--thumb);
  width: var(--thumb);
  max-width: 100%;
  height: auto;
  aspect-ratio: 1;
  border-radius: 999px;
  background: #f5f5f7;
  display: grid;
  place-items: center;
  overflow: visible;
  transition: background-color .2s ease;
}

.ng-cat-slider .ngcs-card:hover .ngcs-thumb,
.ng-cat-slider .ngcs-card:focus-visible .ngcs-thumb {
  background: #ebebee;
}

.ng-cat-slider .ngcs-card:active .ngcs-thumb {
  background: #e2e2e6;
}

.ng-cat-slider .ngcs-img {
  width: calc(var(--thumb) * 0.80);
  height: calc(var(--thumb) * 0.70);
  max-width: 80%;
  max-height: 70%;
  border-radius: inherit;
  object-fit: contain;
  -webkit-user-drag: none;
  -webkit-user-select: none;
  user-select: none;
}

.ng-cat-slider .ngcs-card {
  -webkit-user-drag: none;
}

.ng-cat-slider .ngcs-count {
  position: absolute;
  top: var(--badge-inset);
  right: var(--badge-inset);
  z-index: 3;
  width: var(--badge);
  height: var(--badge);
  border-radius: 999px;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  line-height: 26px;
  font-weight: 600;
  color: #09090b;
  box-shadow: 0 6px 18px rgba(0, 0, 0, .08);
  pointer-events: none;
}

.ng-cat-slider .ngcs-title {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  color: #09090b;
  font-size: 16px;
  font-weight: 500;
  line-height: var(--title-line-height);
  height: var(--title-h);
  max-height: var(--title-h);
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  white-space: normal;
  overflow-wrap: anywhere;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ng-cat-slider .ngcs-card:hover .ngcs-title,
.ng-cat-slider .ngcs-card:focus-visible .ngcs-title {
  text-decoration: underline;
  text-underline-offset: 2px;
}

.ng-cat-slider .ngcs-arrow {
  position: absolute;
  top: 50%;
  z-index: 5;
  width: var(--nav);
  height: var(--nav);
  box-sizing: border-box;
  border: 1px solid currentColor;
  border-radius: 999px;
  background: #fff;
  color: #09090b;
  display: grid;
  place-items: center;
  box-shadow: 0 6px 18px rgba(0, 0, 0, .08);
  transform: translateY(-50%);
  transform-origin: center;
  transition:
    transform .18s cubic-bezier(.2, .7, .2, 1),
    box-shadow .18s ease,
    border-color .18s ease,
    background .18s ease,
    color .18s ease;
  padding: 0;
}

.ng-cat-slider .ngcs-prev {
  left: var(--nav-gap);
}

.ng-cat-slider .ngcs-next {
  right: var(--nav-gap);
}

.ng-cat-slider .ngcs-arrow span {
  font-size: 16px;
  line-height: 16px;
  font-weight: 400;
  font-family: "NovaIcons", sans-serif !important;
  color: inherit;
}

.ng-cat-slider .ngcs-arrow:hover,
.ng-cat-slider .ngcs-arrow:focus-visible {
  transform: translateY(-50%) scale(1.08);
  background: #09090b;
  color: #fff;
  box-shadow: 0 12px 24px rgba(0, 0, 0, .14);
  outline: none;
}

.ng-cat-slider .ngcs-arrow:active {
  transform: translateY(-50%) scale(0.96);
  box-shadow: 0 8px 18px rgba(0, 0, 0, .12);
}

.ng-cat-slider .ngcs-arrow:disabled,
.ng-cat-slider .ngcs-arrow.is-disabled,
.ng-cat-slider .ngcs-arrow:disabled:hover,
.ng-cat-slider .ngcs-arrow.is-disabled:hover,
.ng-cat-slider .ngcs-arrow:disabled:focus-visible,
.ng-cat-slider .ngcs-arrow.is-disabled:focus-visible {
  transform: translateY(-50%);
  background: #fff;
  color: #09090b;
  box-shadow: 0 6px 18px rgba(0, 0, 0, .08);
  opacity: .42;
  cursor: not-allowed;
}

/* Brands carousel: logo-only presentation, isolated from product categories. */
.ng-cat-slider.ng-brand-slider {
  --brand-logo-height: 120px;
  --brand-logo-box-width: 160px;
  --brand-logo-box-height: 72px;
}

.ng-cat-slider.ng-brand-slider .ngcs-card {
  gap: 0;
}

.ng-cat-slider.ng-brand-slider .ngcs-thumb,
.ng-cat-slider.ng-brand-slider .ngcs-card:hover .ngcs-thumb,
.ng-cat-slider.ng-brand-slider .ngcs-card:focus-visible .ngcs-thumb,
.ng-cat-slider.ng-brand-slider .ngcs-card:active .ngcs-thumb {
  box-sizing: border-box;
  flex-basis: var(--brand-logo-height);
  width: 100%;
  height: var(--brand-logo-height);
  aspect-ratio: auto;
  padding: 8px;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.ng-cat-slider.ng-brand-slider .ngcs-img {
  display: block;
  width: var(--brand-logo-box-width);
  height: var(--brand-logo-box-height);
  max-width: 100%;
  max-height: 100%;
  border-radius: 0;
  object-fit: contain;
  object-position: center;
}

.ng-cat-slider.ng-brand-slider .ngcs-count,
.ng-cat-slider.ng-brand-slider .ngcs-title {
  display: none !important;
}

@media (prefers-reduced-motion: reduce) {
  .ng-cat-slider .ngcs-arrow {
    transition: none;
  }
}

.ng-cat-slider[data-dir="rtl"] .ngcs-prev {
  right: var(--nav-gap);
  left: auto;
}

.ng-cat-slider[data-dir="rtl"] .ngcs-next {
  left: var(--nav-gap);
  right: auto;
}

.ngcs-no-snap {
  scroll-snap-type: none !important;
}

.ngcs-no-snap .ngcs-item,
.ngcs-no-snap .ngcs-track {
  transition: none !important;
}

.ng-cat-slider {
  overflow: hidden;
  --safe: calc(var(--nav) + var(--nav-gap) * 2);
}

.ng-cat-slider .ngcs-viewport {
  box-sizing: border-box;
  width: 100%;
  padding-left: max(var(--gutter-left, 0px), var(--safe));
  padding-right: max(var(--gutter-right, 0px), var(--safe));
  scroll-padding-left: max(var(--gutter-left, 0px), var(--safe));
  scroll-padding-right: max(var(--gutter-right, 0px), var(--safe));
}

.ng-cat-slider .ngcs-track {
  flex-wrap: nowrap;
}

@media (max-width:1024px) {
  .ng-cat-slider {
    --gap: 24px;
    --item: 180px;
    --thumb: 180px;
    --badge: 56px;
  }

  .ng-cat-slider.ng-brand-slider {
    --brand-logo-height: 108px;
    --brand-logo-box-width: 148px;
    --brand-logo-box-height: 68px;
  }

  .ng-cat-slider .ngcs-viewport {
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    scroll-snap-type: none;
    overscroll-behavior-x: contain;
    touch-action: auto;
    cursor: auto;
  }
}

@media (max-width:640px) {
  .ng-cat-slider {
    --gap: 20px;
    --item: 150px;
    --thumb: 150px;
    --badge: 48px;
    --title-line-height: 21px;
    --title-h: 63px;
    --nav: 36px;
    --nav-gap: 8px;
  }

  .ng-cat-slider.ng-brand-slider {
    --brand-logo-height: 88px;
    --brand-logo-box-width: 124px;
    --brand-logo-box-height: 56px;
  }
  .ng-cat-slider .ngcs-arrow {
    box-shadow: 0 4px 12px rgba(0, 0, 0, .08);
  }
}

@media (max-width:420px) {
  .ng-cat-slider {
    --gap: 16px;
    --item: 140px;
    --thumb: 140px;
    --badge: 44px;
  }


  .ng-cat-slider.ng-brand-slider {
    --brand-logo-height: 80px;
    --brand-logo-box-width: 112px;
    --brand-logo-box-height: 52px;
  }
}
