/**
 * Categories reels — sticky horizontal scrub + rounded cards.
 */

.arsam-v2-cats--reels {
  padding: 0 !important;
  overflow: visible !important;
  position: relative;
  z-index: 4;
}

.arsam-v2-cats--reels .arsam-v2-cats__runway {
  position: relative !important;
  width: 100%;
}

.arsam-v2-cats--reels .arsam-v2-cats__pin {
  position: sticky !important;
  top: 0 !important;
  z-index: 8 !important;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: clamp(18px, 2.5vw, 32px);
  padding: clamp(72px, 10vh, 110px) 0 clamp(28px, 4vh, 48px);
  box-sizing: border-box;
  background: var(--arsam-v2-bg, #050a12);
  overflow: visible !important;
}

.arsam-v2-cats--reels .arsam-v2-cats__head-wrap {
  width: min(100% - 48px, 1100px);
  margin-inline: auto;
  flex: 0 0 auto;
}

.arsam-v2-cats--reels .arsam-v2-cats__viewport {
  width: 100%;
  overflow: hidden !important;
  perspective: 1400px;
  perspective-origin: 50% 50%;
  flex: 0 0 auto;
  /* Parent section is RTL; RTL overflow parks a wide track on the RIGHT
     so the first cards sit off-screen. Force LTR so scrub starts at card 1. */
  direction: ltr !important;
}

.arsam-v2-cats--reels .arsam-v2-cats__track {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  align-items: stretch;
  gap: clamp(16px, 1.8vw, 28px);
  width: max-content !important;
  max-width: none !important;
  margin: 0 !important;
  margin-inline: 0 !important;
  padding: 8px 0 16px;
  direction: ltr !important;
  will-change: transform;
  transform-style: preserve-3d;
  grid-template-columns: none !important;
  position: relative;
  left: 0;
  right: auto;
}

.arsam-v2-cats--reels .arsam-site .arsam-v2-cat,
.arsam-v2-cats--reels .arsam-v2-cat {
  flex: 0 0 auto !important;
  /* Comfortable size: first card leads, next peeks from the right. */
  width: min(52vw, 480px) !important;
  height: min(58vh, 520px) !important;
  min-height: 380px !important;
  max-height: none !important;
  aspect-ratio: auto !important;
  border-radius: 2.5rem !important;
  overflow: hidden;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.35);
  transform-origin: center center;
  will-change: transform;
  transition: none !important;
}

.arsam-v2-cats--reels .arsam-v2-cat:hover {
  transform: none !important;
}

.arsam-v2-cats--reels .arsam-v2-cat__meta {
  padding: 0 20px 22px;
  gap: 10px;
}

.arsam-v2-cats--reels .arsam-v2-cat__icon {
  width: 38px;
  height: 38px;
}

.arsam-v2-cats--reels .arsam-v2-cat__title {
  font-size: clamp(14px, 1.15vw, 17px);
  max-width: 14ch;
}

html[data-arsam-cats-reels="on"],
html[data-arsam-cats-reels="on"] body,
html[data-arsam-cats-reels="on"] body.arsam-site,
html[data-arsam-cats-reels="on"] .arsam-main,
html[data-arsam-cats-reels="on"] #content,
html[data-arsam-cats-reels="on"] .elementor {
  overflow: visible !important;
  overflow-x: clip !important;
  transform: none !important;
  filter: none !important;
  perspective: none !important;
  contain: none !important;
}

@media (max-width: 900px) {
  .arsam-v2-cats--reels .arsam-v2-cats__pin {
    padding: 48px 0 28px;
  }

  .arsam-v2-cats--reels .arsam-v2-cat {
    width: min(72vw, 340px) !important;
    height: min(52vh, 440px) !important;
    min-height: 320px !important;
    border-radius: 1.6rem !important;
  }
}

/* Keep pin + horizontal scrub even when OS "reduce motion" is on.
   Only soften decorative tilt (handled in JS). */

@media (max-width: 900px) and (prefers-reduced-motion: reduce) {
  .arsam-v2-cats--reels .arsam-v2-cat {
    border-radius: 1.5rem !important;
  }
}
