.hps,
.hps * {
  box-sizing: border-box;
}

.hps {
  --hps-content: 1252px;
  --hps-card: 294px;
  --hps-card-tablet: 300px;
  --hps-card-mobile: 82vw;
  --hps-gap: 25px;
  --hps-radius: 30px;
  --hps-dark: #151006;
  --hps-fade: 120px;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  padding-inline: var(--hps-side-padding, 0px);
  font-family: inherit;
}

/* Keep the infinite track from contributing its intrinsic width to Elementor flex/grid items. */
.elementor-widget-hps-long-product-slider,
.elementor-widget-hps-compact-product-slider,
.elementor-widget-hps-long-product-slider > .elementor-widget-container,
.elementor-widget-hps-compact-product-slider > .elementor-widget-container {
  min-width: 0;
  max-width: 100%;
}

.hps a,
.hps a:hover,
.hps a:focus {
  text-decoration: none;
}

.hps-viewport {
  position: relative;
  width: min(100%, var(--hps-content));
  min-width: 0;
  max-width: 100%;
  margin-inline: auto;
  overflow: hidden;
  touch-action: pan-y pinch-zoom;
  user-select: none;
}

.hps-track {
  display: flex;
  align-items: stretch;
  gap: var(--hps-gap);
  width: max-content;
  will-change: transform;
  transform: translate3d(0, 0, 0);
}

.hps-viewport:not([data-hps-ready="true"]) .hps-track {
  visibility: hidden;
}

.hps-slide {
  position: relative;
  flex: 0 0 var(--hps-card);
  width: var(--hps-card);
  min-width: 0;
}

.hps-arrow {
  position: absolute;
  top: 50%;
  z-index: 12;
  display: grid;
  place-items: center;
  width: 60px;
  height: 60px;
  padding: 0;
  color: #0b1117;
  font: 400 25px/1 Arial, sans-serif;
  background: #fff;
  border: 0;
  border-radius: 50%;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  cursor: pointer;
  transform: translateY(-50%);
  transition: transform 0.25s ease, color 0.25s ease, background-color 0.25s ease, border-color 0.25s ease;
}

.hps-arrow:hover {
  transform: translateY(-50%) scale(1.06);
}

.hps-arrow:focus-visible {
  outline: 3px solid rgba(255, 255, 255, 0.65);
  outline-offset: 3px;
}

.hps-prev {
  left: 10px;
}

.hps-next {
  right: 10px;
}

/* Long reference-style cards */
.hps-long {
  --hps-height: 560px;
  --hps-height-tablet: 500px;
  --hps-height-mobile: 460px;
  position: relative;
  isolation: isolate;
  padding-top: var(--hps-pad-top, 0px);
  padding-bottom: var(--hps-pad-bottom, 0px);
  overflow: hidden;
  background-color: var(--hps-section-bg, transparent);
  background-image: var(--hps-bg-image, none);
  background-repeat: no-repeat;
  background-position: var(--hps-bg-position, center);
  background-size: var(--hps-bg-size, cover);
}

.hps-long::before {
  position: absolute;
  inset: 0;
  z-index: 0;
  content: "";
  pointer-events: none;
  background: var(--hps-overlay-color, #000);
  opacity: var(--hps-section-overlay, 0);
}

.hps-long .hps-viewport {
  z-index: 1;
}

.hps-long .hps-slide,
.hps-long-card {
  height: var(--hps-height);
}

.hps-long-card {
  position: relative;
  display: block;
  width: 100%;
  overflow: hidden;
  color: #fff;
  background: #1a1a1a;
  border-radius: var(--hps-radius);
  isolation: isolate;
}

.hps-long-card img {
  position: absolute;
  inset: 0;
  z-index: -1;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.001);
  transition: transform 0.7s cubic-bezier(0.2, 0.65, 0.3, 1);
}

.hps-long-card:hover img,
.hps-long-card:focus-visible img {
  transform: scale(var(--hps-hover-scale, 1.08));
}

.hps-long-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: flex-start;
  padding: 35px;
  color: #fff;
  background: linear-gradient(to top, var(--hps-card-overlay-bottom, rgba(0, 0, 0, 0.92)), var(--hps-card-overlay-top, rgba(0, 0, 0, 0.2)));
}

.hps-category,
.hps-compact-category {
  display: inline-flex;
  align-items: center;
  min-height: 35px;
  margin: 0 0 15px;
  padding: 8px 18px;
  color: #fff;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.5;
  letter-spacing: 0.04em;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 50px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.hps-long-overlay h3 {
  max-width: 100%;
  margin: 0;
  color: #fff;
  font-family: inherit;
  font-size: clamp(22px, 2.05vw, 28px);
  font-weight: 400;
  line-height: 1.3;
}

/* Compact dark slider with the reference's side blend */
.hps-compact-section {
  position: relative;
  isolation: isolate;
  width: 100%;
  padding: var(--hps-pad-top, 48px) var(--hps-side-padding, 0px) var(--hps-pad-bottom, 48px);
  overflow: hidden;
  color: #fff;
  background-color: var(--hps-dark);
  background-image: var(--hps-bg-image);
  background-repeat: no-repeat;
  background-position: var(--hps-bg-position, center);
  background-size: var(--hps-bg-size, cover);
}

.hps-compact-section::before {
  position: absolute;
  inset: 0;
  z-index: -1;
  content: "";
  background: var(--hps-overlay-color, #000);
  opacity: var(--hps-dark-opacity);
}

.hps-compact-inner {
  position: relative;
  width: 100%;
  margin-inline: auto;
}

.hps-compact-section .hps-viewport {
  min-height: 0;
}

.hps-compact-section .hps-track {
  align-items: flex-start;
}

.hps-faded::before,
.hps-faded::after {
  position: absolute;
  top: 0;
  bottom: 0;
  z-index: 10;
  width: var(--hps-fade);
  content: "";
  pointer-events: none;
}

.hps-faded::before {
  left: 0;
  background: linear-gradient(to right, var(--hps-fade-color, var(--hps-dark)), transparent);
}

.hps-faded::after {
  right: 0;
  background: linear-gradient(to left, var(--hps-fade-color, var(--hps-dark)), transparent);
}

.hps-compact-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  min-height: 0;
  padding: 9px 21px 20px;
  overflow: hidden;
  color: #fff;
  text-align: center;
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 24px;
  transition: transform 0.4s ease;
}

.hps-compact-card:hover {
  transform: translateY(calc(-1 * var(--hps-hover-lift, 5px)));
}

.hps-compact-image {
  width: min(100%, var(--hps-image));
  height: var(--hps-image-height);
  overflow: hidden;
  background: rgba(255, 255, 255, 0.05);
  border-radius: var(--hps-radius);
}

.hps-compact-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s cubic-bezier(0.2, 0.65, 0.3, 1);
}

.hps-compact-card:hover img,
.hps-compact-card:focus-visible img {
  transform: scale(var(--hps-hover-scale, 1.08));
}

.hps-compact-card h3 {
  width: 100%;
  margin: 18px 0;
  color: #fff;
  font-family: inherit;
  font-size: 20px;
  font-weight: 600;
  line-height: 1.2;
}

.hps-compact-category {
  min-height: 0;
  margin: 15px 0 -6px;
  padding: 5px 12px;
  font-size: 11px;
}

.hps-read-more {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 0;
  color: #fff;
  font-size: 14px;
  line-height: 1.5;
}

.hps-read-more b {
  font-size: 18px;
  font-weight: 400;
  transition: transform 0.25s ease;
}

.hps-compact-card:hover .hps-read-more b {
  transform: translateX(4px);
}

.hps-empty {
  padding: 18px 22px;
  color: #6b7280;
  background: #f7f8fa;
  border: 1px dashed #cfd5dd;
  border-radius: 10px;
}

@media (max-width: 1024px) {
  .hps-slide {
    flex-basis: var(--hps-card-tablet);
    width: var(--hps-card-tablet);
  }

  .hps-long .hps-slide,
  .hps-long-card {
    height: var(--hps-height-tablet);
  }

  .hps-long-overlay {
    padding: 28px;
  }

  .hps-faded::before,
  .hps-faded::after {
    width: min(var(--hps-fade), 80px);
  }
}

@media (max-width: 767px) {
  .hps-slide {
    flex-basis: var(--hps-card-mobile);
    width: var(--hps-card-mobile);
  }

  .hps-long .hps-slide,
  .hps-long-card {
    height: var(--hps-height-mobile);
  }

  .hps-long-overlay {
    padding: 24px;
  }

  .hps-long-overlay h3 {
    font-size: 24px;
  }

  .hps-category {
    padding: 7px 14px;
    font-size: 12px;
  }

  .hps-arrow {
    width: 46px;
    height: 46px;
    font-size: 21px;
  }

  .hps-prev {
    left: 8px;
  }

  .hps-next {
    right: 8px;
  }

  .hps-compact-card {
    padding-inline: 12px;
  }

  .hps-faded::before,
  .hps-faded::after {
    width: min(var(--hps-fade), 50px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .hps-track,
  .hps-long-card img,
  .hps-compact-image img,
  .hps-compact-card {
    transition-duration: 0.01ms !important;
  }
}
