/**
 * RSSlider v3 — Resonance Unified Slider System
 * ─────────────────────────────────────────────
 * Cross-browser, no HTML entity arrows, CSS-only chevrons.
 * Works identically in Chrome, Firefox, Safari, Edge.
 * All sliders use the same wrapper/track/arrow pattern.
 */

/* ═══════════════════════════════════════════════════════════════
   SECTION BACKGROUNDS
═══════════════════════════════════════════════════════════════ */
.rt-section,
.products,
.designs-section,
.bulk-section,
.readymades-section,
.brand-search-section,
.customize,
.offer-zone-new,
.community-cta-section {
  position: relative;
  overflow: hidden;
  max-width: 100%;
  box-sizing: border-box;
}

.rt-section::before,
.designs-section::before,
.community-cta-section::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background: none;
}

.products::before,
.bulk-section::before,
.readymades-section::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background: none;
}

[data-theme="light"] .rt-section::before,
[data-theme="light"] .designs-section::before {
  background: none;
}

[data-theme="light"] .products::before,
[data-theme="light"] .bulk-section::before,
[data-theme="light"] .readymades-section::before {
  background: none;
}

/* Ensure section children are above the pseudo-element */
.rt-section > *,
.products > *,
.designs-section > *,
.bulk-section > *,
.readymades-section > *,
.brand-search-section > *,
.customize > *,
.offer-zone-new > *,
.community-cta-section > * {
  position: relative;
  z-index: 1;
}

/* ═══════════════════════════════════════════════════════════════
   SLIDER WRAPPER — flex layout with floating overlay arrows
═══════════════════════════════════════════════════════════════ */
.slider-wrapper,
.rt-slider-outer,
.readymades-slider-wrap {
  position: relative;
  display: flex;
  align-items: stretch;
  width: 100%;
  overflow: visible;
  box-sizing: border-box;
}

/* ═══════════════════════════════════════════════════════════════
   SLIDER TRACKS — the scrollable flex row
═══════════════════════════════════════════════════════════════ */
.product-slider,
.showcase-slider,
.readymades-slider,
.rt-track {
  flex: 1;
  min-width: 0;
  display: flex;
  gap: 16px;
  overflow-x: auto;
  overflow-y: visible;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  cursor: grab;
  touch-action: pan-y;
  padding: 8px 4px 20px;
  scroll-behavior: smooth;
  max-width: 100%;
  box-sizing: border-box;
}

.product-slider::-webkit-scrollbar,
.showcase-slider::-webkit-scrollbar,
.readymades-slider::-webkit-scrollbar,
.rt-track::-webkit-scrollbar {
  display: none;
}

.product-slider:active,
.showcase-slider:active,
.readymades-slider:active,
.rt-track:active {
  cursor: grabbing;
}

/* ═══════════════════════════════════════════════════════════════
   ARROW BUTTONS — Slim, semi-transparent, flex siblings
   Sit beside the track as thin strips with CSS chevrons.
═══════════════════════════════════════════════════════════════ */
.arrow,
.rt-arrow {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 32px;
  min-width: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.12);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  border: none;
  border-radius: 0;
  cursor: pointer;
  z-index: 20;
  padding: 0;
  margin: 0;
  transition: background 0.3s ease, box-shadow 0.3s ease;
  font-size: 0;
  line-height: 0;
  color: transparent;
  text-indent: -9999px;
  overflow: hidden;
  outline: none;
}

.arrow.left,
.rt-arrow-left {
  left: 0;
}

.arrow.right,
.rt-arrow-right {
  right: 0;
}

/* ── Hover / Active ── */
.arrow:hover,
.rt-arrow:hover {
  background: rgba(255, 78, 205, 0.18);
  box-shadow: inset 0 0 12px rgba(255, 78, 205, 0.1);
}

.arrow:active,
.rt-arrow:active {
  background: rgba(255, 78, 205, 0.45);
}

/* ── CSS-only chevron via ::before ── */
.arrow::before,
.rt-arrow::before {
  content: '';
  display: block;
  width: 12px;
  height: 12px;
  border-style: solid;
  border-color: rgba(255, 255, 255, 0.4);
  border-width: 0 2.5px 2.5px 0;
  transition: border-color 0.3s ease, transform 0.2s ease;
  flex-shrink: 0;
  text-indent: 0;
}

/* Left chevron */
.arrow.left::before,
.rt-arrow-left::before {
  transform: rotate(135deg);
  margin-left: 4px;
}

/* Right chevron */
.arrow.right::before,
.rt-arrow-right::before {
  transform: rotate(-45deg);
  margin-right: 4px;
}

/* Chevron glow on hover */
.arrow:hover::before,
.rt-arrow:hover::before {
  border-color: rgba(255, 78, 205, 0.7);
}

.arrow:active::before,
.rt-arrow:active::before {
  border-color: #ff4ecd;
}

/* ── Light theme ── */
[data-theme="light"] .arrow,
[data-theme="light"] .rt-arrow {
  background: rgba(0, 0, 0, 0.02);
}

[data-theme="light"] .arrow::before,
[data-theme="light"] .rt-arrow::before {
  border-color: rgba(0, 0, 0, 0.25);
}

[data-theme="light"] .arrow:hover,
[data-theme="light"] .rt-arrow:hover {
  background: rgba(255, 78, 205, 0.06);
  box-shadow: inset 0 0 16px rgba(255, 78, 205, 0.08);
}

[data-theme="light"] .arrow:hover::before,
[data-theme="light"] .rt-arrow:hover::before {
  border-color: rgba(255, 78, 205, 0.7);
}

/* ── Touch devices — slightly more visible chevron ── */
@media (hover: none) {
  .arrow::before,
  .rt-arrow::before {
    border-color: rgba(255, 255, 255, 0.4);
  }

  [data-theme="light"] .arrow::before,
  [data-theme="light"] .rt-arrow::before {
    border-color: rgba(0, 0, 0, 0.35);
  }
}

/* ═══════════════════════════════════════════════════════════════
   CARD SIZES — consistent across all sliders
═══════════════════════════════════════════════════════════════ */

/* Product cards (designs slider, bulk slider) */
.product-card {
  flex: 0 0 clamp(160px, 22vw, 240px);
  scroll-snap-align: start;
  /* Prevent card from causing overflow */
  min-width: 0;
  box-sizing: border-box;
}

/* Readymades cards */
.rm-card {
  flex: 0 0 clamp(160px, 20vw, 220px);
  scroll-snap-align: start;
  min-width: 0;
  box-sizing: border-box;
}

/* Showcase slides — base fallback (overridden by section.showcase rules below) */
.showcase-slide {
  flex: 0 0 clamp(280px, 22vw, 380px);
  scroll-snap-align: center;
  min-width: 0;
  box-sizing: border-box;
}

/* RT Blanks cards */
.rt-card {
  flex: 0 0 clamp(200px, 24vw, 270px);
  scroll-snap-align: start;
  min-width: 0;
  box-sizing: border-box;
}

/* ═══════════════════════════════════════════════════════════════
   RESPONSIVE CARD SIZES
═══════════════════════════════════════════════════════════════ */
@media (max-width: 767px) {
  .product-card,
  .rm-card {
    flex: 0 0 calc(50vw - 28px);
  }

  .showcase-slide {
    flex: 0 0 clamp(200px, 58vw, 280px);
    height: auto;
    aspect-ratio: 9 / 16;
  }

  .rt-card {
    flex: 0 0 calc(68vw - 16px);
  }

  .product-slider,
  .readymades-slider,
  .rt-track {
    padding-left: 8px;
    padding-right: 8px;
    gap: 12px;
  }

  .arrow,
  .rm-arrow {
    width: 30px;
    min-width: 30px;
  }
}

@media (max-width: 400px) {
  .product-card,
  .rm-card {
    flex: 0 0 calc(50vw - 20px);
  }

  .showcase-slide {
    flex: 0 0 clamp(180px, 62vw, 260px);
    aspect-ratio: 9 / 16;
    height: auto;
  }

  .rt-card {
    flex: 0 0 calc(75vw - 16px);
  }

  .product-slider,
  .showcase-slider,
  .readymades-slider,
  .rt-track {
    padding-left: 6px;
    padding-right: 6px;
  }

  .arrow,
  .rt-arrow,
  .rm-arrow {
    width: 26px;
    min-width: 26px;
  }
}

@media (min-width: 1280px) {
  .product-card,
  .rm-card {
    flex: 0 0 220px;
  }

  .rt-card {
    flex: 0 0 260px;
  }

  .showcase-slide {
    flex: 0 0 290px;
  }
}

/* ═══════════════════════════════════════════════════════════════
   RT BLANKS SLIDER — special layout with arrows as flex siblings
═══════════════════════════════════════════════════════════════ */
.rt-slider-outer {
  position: relative;
  display: flex;
  align-items: stretch;
  padding: 0 0 8px;
  width: 100%;
  overflow: visible;
}

.rt-slider-wrap {
  flex: 1;
  overflow: hidden;
  min-width: 0;
  position: relative;
  padding: 0;
}

.rt-track {
  padding: 8px 4px 16px;
}

/* RT Blanks arrows — floating absolute */
.rt-slider-outer > .rt-arrow {
  position: absolute;
  top: 0;
  bottom: 0;
  z-index: 20;
}

.rt-slider-outer > .rt-arrow-left  { left: 0; }
.rt-slider-outer > .rt-arrow-right { right: 0; }

/* ═══════════════════════════════════════════════════════════════
   READYMADES SLIDER — uses rm-arrow (same tall rectangular style)
═══════════════════════════════════════════════════════════════ */
.readymades-slider-wrap {
  position: relative;
  display: flex;
  align-items: stretch;
  gap: 0;
  padding: 0;
  width: 100%;
  box-sizing: border-box;
  overflow: visible;
}

.readymades-slider {
  flex: 1;
  display: flex;
  gap: 16px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  padding: 8px 12px 8px;
  -webkit-overflow-scrolling: touch;
}

.readymades-slider::-webkit-scrollbar { display: none; }

/* Readymades arrows — unified floating style */
.rm-arrow {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 32px;
  min-width: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.12);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  border: none;
  border-radius: 0;
  cursor: pointer;
  z-index: 20;
  padding: 0;
  margin: 0;
  transition: background 0.3s ease, box-shadow 0.3s ease;
  font-size: 0;
  line-height: 0;
  color: transparent;
  text-indent: -9999px;
  overflow: hidden;
  outline: none;
}

.rm-arrow-left { left: 0; }
.rm-arrow-right { right: 0; }

.rm-arrow:hover {
  background: rgba(255, 78, 205, 0.18);
  box-shadow: inset 0 0 12px rgba(255, 78, 205, 0.1);
}

.rm-arrow:active {
  background: rgba(255, 78, 205, 0.45);
}

.rm-arrow::before {
  content: '';
  display: block;
  width: 12px;
  height: 12px;
  border-style: solid;
  border-color: rgba(255, 255, 255, 0.4);
  border-width: 0 2.5px 2.5px 0;
  transition: border-color 0.3s ease;
  flex-shrink: 0;
  text-indent: 0;
}

.rm-arrow-left::before {
  transform: rotate(135deg);
  margin-left: 4px;
}

.rm-arrow-right::before {
  transform: rotate(-45deg);
  margin-right: 4px;
}

.rm-arrow:hover::before {
  border-color: rgba(255, 78, 205, 0.7);
}

@media (max-width: 767px) {
  .readymades-slider-wrap {
    padding: 0;
  }

  .rm-arrow {
    width: 30px;
    min-width: 30px;
  }
}

/* ═══════════════════════════════════════════════════════════════
   SHOWCASE SLIDER — Brand showcase (videos + images)
   ─────────────────────────────────────────────────────────────
   AUTHORITATIVE STYLES — override all legacy conflicts from
   rt-core.css, resonance_ss.css, and rt-responsive.css.
   Uses section-scoped selectors for higher specificity.
═══════════════════════════════════════════════════════════════ */

/* Section container */
section.showcase {
  position: relative;
  width: 100%;
  padding: 32px 0 40px;
  overflow: hidden;
  box-sizing: border-box;
}

/* Slider wrapper — flex layout for arrows as siblings */
section.showcase .slider-wrapper {
  position: relative;
  width: 100%;
  overflow: visible;
  display: flex;
  align-items: stretch;
}

/* Track — the scrollable flex row */
section.showcase .showcase-slider {
  flex: 1;
  min-width: 0;
  display: flex;
  gap: 20px;
  overflow-x: auto;
  overflow-y: visible;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  cursor: grab;
  touch-action: pan-y;
  padding: 16px 12px 24px;
  scroll-behavior: auto;
  scroll-snap-type: none;
  max-width: 100%;
  box-sizing: border-box;
  align-items: stretch;
}

section.showcase .showcase-slider::-webkit-scrollbar {
  display: none;
}

section.showcase .showcase-slider:active {
  cursor: grabbing;
}

/* ── Slide cards — tall portrait ratio for brand showcase ── */
section.showcase .showcase-slide {
  flex: 0 0 clamp(220px, 18vw, 310px);
  width: clamp(220px, 18vw, 310px);
  height: clamp(300px, 34vw, 450px);
  border-radius: 16px;
  overflow: hidden;
  background: #0a0a10;
  cursor: pointer;
  position: relative;
  flex-shrink: 0;
  transition: transform 0.4s cubic-bezier(.22,.68,0,1.2), box-shadow 0.4s ease;
  box-sizing: border-box;
  scroll-snap-align: center;
}

section.showcase .showcase-slide:hover {
  transform: scale(1.05) translateY(-6px);
  box-shadow:
    0 16px 48px rgba(255, 78, 205, 0.3),
    0 0 24px rgba(79, 220, 255, 0.15),
    inset 0 0 0 1px rgba(255, 78, 205, 0.2);
  z-index: 2;
}

/* ── Inner media wrapper — fills the entire slide card ── */
section.showcase .showcase-slide .showcase-slider-img,
section.showcase .showcase-slide > picture {
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  border-radius: 16px;
  overflow: hidden;
  display: block !important;
  flex: none !important;
  aspect-ratio: unset !important;
  margin: 0 !important;
  padding: 0 !important;
}

/* ── Videos — fill the card completely, no gaps ── */
section.showcase .showcase-slide .showcase-slider-img video,
section.showcase .showcase-slide .showcase-slider-video,
section.showcase .showcase-slide video {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  object-position: center center !important;
  border-radius: 16px;
  display: block !important;
  background: #0a0a10;
  margin: 0 !important;
  padding: 0 !important;
}

/* ── Images — fill the card completely ── */
section.showcase .showcase-slide img,
section.showcase .showcase-slide picture img,
section.showcase .showcase-slide .showcase-slider-img img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  object-position: center center !important;
  border-radius: 16px;
  display: block !important;
  transition: transform 0.4s ease;
  margin: 0 !important;
  padding: 0 !important;
}

section.showcase .showcase-slide:hover img,
section.showcase .showcase-slide:hover video {
  transform: scale(1.04);
}

/* ── Arrows — tall rectangular, same height as cards, at slider edges ── */
section.showcase .rt-arrow {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 32px;
  min-width: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.12);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  border: none;
  border-radius: 0;
  cursor: pointer;
  z-index: 25;
  padding: 0;
  margin: 0;
  transition: background 0.3s ease, box-shadow 0.3s ease;
  font-size: 0; line-height: 0; color: transparent;
  text-indent: -9999px; overflow: hidden; outline: none;
}

section.showcase .rt-arrow-left {
  left: 0;
}

section.showcase .rt-arrow-right {
  right: 0;
}

section.showcase .rt-arrow:hover {
  background: rgba(255, 78, 205, 0.18);
  box-shadow: inset 0 0 12px rgba(255, 78, 205, 0.1);
}

section.showcase .rt-arrow:active {
  background: rgba(255, 78, 205, 0.45);
}

section.showcase .rt-arrow::before {
  content: '';
  display: block;
  width: 11px;
  height: 11px;
  border-style: solid;
  border-color: rgba(255, 255, 255, 0.35);
  border-width: 0 2.5px 2.5px 0;
  text-indent: 0;
  flex-shrink: 0;
  transition: border-color 0.3s ease;
}

section.showcase .rt-arrow-left::before {
  transform: rotate(135deg);
  margin-left: 4px;
}

section.showcase .rt-arrow-right::before {
  transform: rotate(-45deg);
  margin-right: 4px;
}

section.showcase .rt-arrow:hover::before {
  border-color: rgba(255, 78, 205, 0.7);
}

section.showcase .rt-arrow:active::before {
  border-color: #ff4ecd;
}

/* ═══════════════════════════════════════════════════════════════
   SHOWCASE RESPONSIVE — device-adaptive sizing
═══════════════════════════════════════════════════════════════ */

/* Large desktops */
@media (min-width: 1440px) {
  section.showcase .showcase-slide {
    flex: 0 0 320px;
    width: 320px;
    height: 460px;
  }

  section.showcase .showcase-slider {
    gap: 24px;
    padding: 20px 12px 28px;
  }
}

/* Standard desktop */
@media (min-width: 1024px) and (max-width: 1439px) {
  section.showcase .showcase-slide {
    flex: 0 0 clamp(240px, 20vw, 310px);
    width: clamp(240px, 20vw, 310px);
    height: clamp(340px, 30vw, 440px);
  }

  section.showcase .showcase-slider {
    gap: 20px;
    padding: 16px 12px 24px;
  }
}

/* Tablets */
@media (min-width: 768px) and (max-width: 1023px) {
  section.showcase .showcase-slide {
    flex: 0 0 clamp(240px, 32vw, 320px);
    width: clamp(240px, 32vw, 320px);
    height: clamp(340px, 44vw, 460px);
  }

  section.showcase .showcase-slider {
    gap: 16px;
    padding: 12px 10px 20px;
  }
}

/* Mobile landscape & large phones */
@media (max-width: 767px) {
  section.showcase {
    padding: 20px 0 28px;
  }

  section.showcase .showcase-slide {
    flex: 0 0 clamp(200px, 58vw, 280px) !important;
    width: clamp(200px, 58vw, 280px) !important;
    /* 9:16 ratio calculated from width — e.g. 226px width → 401px height */
    height: clamp(356px, 103vw, 498px) !important;
    border-radius: 14px;
    min-height: unset;
  }

  section.showcase .showcase-slide .showcase-slider-img,
  section.showcase .showcase-slide .showcase-slider-img video,
  section.showcase .showcase-slide img,
  section.showcase .showcase-slide picture img {
    border-radius: 14px;
  }

  section.showcase .showcase-slider {
    gap: 14px;
    padding: 12px 8px 20px;
  }

  section.showcase .rt-arrow {
    width: 30px;
    min-width: 30px;
  }
}

/* Small phones */
@media (max-width: 480px) {
  section.showcase .showcase-slide {
    flex: 0 0 clamp(180px, 62vw, 260px) !important;
    width: clamp(180px, 62vw, 260px) !important;
    /* 9:16 ratio — e.g. 240px width → 427px height */
    height: clamp(320px, 110vw, 462px) !important;
    border-radius: 12px;
  }

  section.showcase .showcase-slide .showcase-slider-img,
  section.showcase .showcase-slide .showcase-slider-img video,
  section.showcase .showcase-slide img,
  section.showcase .showcase-slide picture img {
    border-radius: 12px;
  }

  section.showcase .showcase-slider {
    gap: 12px;
    padding: 10px 6px 16px;
  }

  section.showcase .rt-arrow {
    width: 26px;
    min-width: 26px;
  }
}

/* Light theme adjustments */
[data-theme="light"] section.showcase .rt-arrow {
  background: rgba(0, 0, 0, 0.02);
}

[data-theme="light"] section.showcase .rt-arrow::before {
  border-color: rgba(0, 0, 0, 0.25);
}

[data-theme="light"] section.showcase .rt-arrow:hover {
  background: rgba(255, 78, 205, 0.06);
  box-shadow: inset 0 0 16px rgba(255, 78, 205, 0.08);
}

[data-theme="light"] section.showcase .rt-arrow:hover::before {
  border-color: rgba(255, 78, 205, 0.7);
}

[data-theme="light"] section.showcase .showcase-slide {
  background: #f0f0f4;
}

/* ═══════════════════════════════════════════════════════════════
   PERFORMANCE — lazy loading hint for slider images
═══════════════════════════════════════════════════════════════ */
.product-slider img,
.showcase-slider img,
.readymades-slider img,
.rt-track img {
  /* Images in sliders should be lazy loaded */
  content-visibility: auto;
}
/* RSSlider v3 */
