/* ============================================================
   RR Carrossel Premium v1.1.0
   Design System Premium White Label
   - Coverflow 3D + blur progressivo + auto-scroll suave
   - Lightbox com object-fit:contain (NUNCA corta)
   - Navegação prev/next + counter no lightbox
============================================================ */

/* ========== DESIGN SYSTEM TOKENS ========== */
.rr-carousel-section,
.rr-lb {
  --rr-accent: #D4A017;
  --rr-accent-soft: #F2C84B;
  --rr-bg-dark: #0E0E10;
  --rr-bg-card: #16161A;
  --rr-bg-light: #FAFAF7;
  --rr-text-light: #FFFFFF;
  --rr-text-muted: rgba(255,255,255,.65);
  --rr-text-dim: rgba(255,255,255,.45);
  --rr-text-dark: #0E0E10;
  --rr-text-gray: #71717A;
  --rr-radius-card: 18px;
  --rr-radius-lg: 24px;
  --rr-shadow-soft: 0 4px 16px rgba(14,14,16,.06), 0 2px 4px rgba(14,14,16,.04);
  --rr-shadow-lift: 0 18px 40px rgba(14,14,16,.12), 0 6px 14px rgba(14,14,16,.06);
  --rr-shadow-deep: 0 30px 70px rgba(0,0,0,.45), 0 8px 20px rgba(0,0,0,.25);
  --rr-ease: cubic-bezier(.2,.8,.2,1);
  --rr-ease-pop: cubic-bezier(.2,.9,.3,1.2);
}

/* ========== SECTION ========== */
.rr-carousel-section {
  padding: 64px 0 72px;
  background: linear-gradient(180deg, #FFFFFF 0%, var(--rr-bg-light) 100%);
  overflow: hidden;
  position: relative;
  isolation: isolate;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ========== HEADER DA SEÇÃO ========== */
.rr-section-header {
  text-align: center;
  margin-bottom: 32px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 0 16px;
}
.rr-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: rgba(212,160,23,.08);
  border: 1px solid rgba(212,160,23,.25);
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--rr-accent);
}
.rr-dot {
  width: 6px;
  height: 6px;
  background: var(--rr-accent);
  border-radius: 50%;
  animation: rr-dot-pulse 2s infinite;
}
@keyframes rr-dot-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(212,160,23,.7); }
  50% { box-shadow: 0 0 0 6px rgba(212,160,23,0); }
}
.rr-h2 {
  font-size: 32px;
  font-weight: 800;
  letter-spacing: -.6px;
  line-height: 1.18;
  margin: 0;
  max-width: 780px;
  color: var(--rr-text-dark);
  font-family: inherit;
}

/* ========== STAGE (palco) ========== */
.rr-carousel-stage {
  position: relative;
  z-index: 1;
  contain: layout;
  max-width: 1400px;
  margin: 0 auto;
}

/* ========== MASK (fade lateral) ========== */
.rr-carousel-mask {
  position: relative;
  -webkit-mask-image: linear-gradient(90deg,
    transparent 0%, rgba(0,0,0,.04) 4%, rgba(0,0,0,.18) 9%,
    rgba(0,0,0,.42) 14%, rgba(0,0,0,.72) 20%, rgba(0,0,0,.92) 26%,
    #000 32%, #000 68%,
    rgba(0,0,0,.92) 74%, rgba(0,0,0,.72) 80%, rgba(0,0,0,.42) 86%,
    rgba(0,0,0,.18) 91%, rgba(0,0,0,.04) 96%, transparent 100%);
  mask-image: linear-gradient(90deg,
    transparent 0%, rgba(0,0,0,.04) 4%, rgba(0,0,0,.18) 9%,
    rgba(0,0,0,.42) 14%, rgba(0,0,0,.72) 20%, rgba(0,0,0,.92) 26%,
    #000 32%, #000 68%,
    rgba(0,0,0,.92) 74%, rgba(0,0,0,.72) 80%, rgba(0,0,0,.42) 86%,
    rgba(0,0,0,.18) 91%, rgba(0,0,0,.04) 96%, transparent 100%);
  padding: 36px 0;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  -ms-overflow-style: none;
  scroll-behavior: auto;
  cursor: grab;
  touch-action: pan-x;
  perspective: 1500px;
  perspective-origin: center 50%;
}
.rr-carousel-mask::-webkit-scrollbar { display: none; }
.rr-carousel-mask.is-dragging { cursor: grabbing; user-select: none; }

/* ========== TRACK ========== */
.rr-carousel-track {
  display: flex;
  gap: 16px;
  width: max-content;
  padding: 0 calc(50vw - 132px);
  will-change: transform;
  transform-style: preserve-3d;
}

/* ========== CARD ========== */
.rr-carousel-item {
  flex-shrink: 0;
  width: 240px;
  height: 300px;
  border-radius: var(--rr-radius-card);
  overflow: hidden;
  position: relative;
  background: var(--rr-bg-card);
  will-change: transform, filter, opacity;
  cursor: pointer;
  transform-style: preserve-3d;
  backface-visibility: hidden;
  transform: scale(1);
  filter: none;
  opacity: 1;
  box-shadow: none;
  transition: box-shadow .55s var(--rr-ease);
}
.rr-carousel-item.is-center {
  box-shadow: 0 0 0 1.5px rgba(212,160,23,.4);
}
.rr-carousel-item img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
  display: block;
}
.rr-carousel-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg,
    rgba(14,14,16,0) 35%,
    rgba(14,14,16,.45) 65%,
    rgba(14,14,16,.92) 100%);
  z-index: 1;
  pointer-events: none;
}
.rr-carousel-content {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 18px 18px 16px;
  z-index: 2;
  color: var(--rr-text-light);
  transform: translateY(4px);
  opacity: .85;
  transition: all .5s ease;
}
.rr-carousel-item.is-center .rr-carousel-content {
  transform: translateY(0);
  opacity: 1;
}
.rr-carousel-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--rr-accent);
  margin-bottom: 6px;
  padding: 4px 8px;
  background: rgba(212,160,23,.18);
  border: 1px solid rgba(212,160,23,.4);
  border-radius: 999px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.rr-carousel-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--rr-text-light);
  letter-spacing: -.2px;
  margin-bottom: 2px;
  line-height: 1.25;
}
.rr-carousel-meta {
  font-size: 11px;
  color: rgba(255,255,255,.7);
  font-weight: 500;
}

/* ========== ICON ZOOM (centro) ========== */
.rr-carousel-zoom {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255,255,255,.18);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,.3);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--rr-text-light);
  opacity: 0;
  transform: translateY(-4px);
  transition: all .35s ease;
  z-index: 3;
  pointer-events: none;
}
.rr-carousel-item.is-center .rr-carousel-zoom {
  opacity: 1;
  transform: translateY(0);
}
.rr-carousel-zoom svg { width: 14px; height: 14px; }

/* ========== SETAS DE NAVEGAÇÃO — RESET FORTE PRA THEME OVERRIDE ========== */
button.rr-carousel-nav,
.rr-carousel-stage button.rr-carousel-nav {
  position: absolute !important;
  top: 50% !important;
  width: 46px !important;
  height: 46px !important;
  min-width: 46px !important;
  min-height: 46px !important;
  max-width: 46px !important;
  border-radius: 50% !important;
  background: #FFFFFF !important;
  background-color: #FFFFFF !important;
  background-image: none !important;
  border: 1px solid rgba(14,14,16,.1) !important;
  box-shadow: 0 14px 32px rgba(14,14,16,.18), 0 4px 8px rgba(14,14,16,.06) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  color: #0E0E10 !important;
  cursor: pointer !important;
  transition: all .3s ease !important;
  z-index: 10 !important;
  opacity: .85;
  padding: 0 !important;
  margin: 0 !important;
  font: inherit !important;
  text-decoration: none !important;
  text-shadow: none !important;
  -webkit-appearance: none !important;
  -moz-appearance: none !important;
  appearance: none !important;
  transform: translateY(-50%) !important;
  line-height: 1 !important;
  outline: none;
}
.rr-carousel-stage:hover button.rr-carousel-nav { opacity: 1; }
button.rr-carousel-nav:hover,
.rr-carousel-stage button.rr-carousel-nav:hover {
  background: var(--rr-accent, #D4A017) !important;
  background-color: var(--rr-accent, #D4A017) !important;
  background-image: none !important;
  color: #0E0E10 !important;
  border-color: var(--rr-accent, #D4A017) !important;
  transform: translateY(-50%) scale(1.08) !important;
  box-shadow: 0 16px 40px rgba(212,160,23,.45) !important;
}
button.rr-carousel-nav:focus-visible {
  outline: none !important;
  box-shadow: 0 14px 32px rgba(14,14,16,.18), 0 0 0 3px rgba(212,160,23,.4) !important;
}
button.rr-carousel-nav.rr-prev { left: 12px !important; right: auto !important; }
button.rr-carousel-nav.rr-next { right: 12px !important; left: auto !important; }
.rr-carousel-nav svg {
  width: 18px !important;
  height: 18px !important;
  fill: none !important;
  stroke: currentColor !important;
  display: block !important;
}
@media (max-width: 768px) { button.rr-carousel-nav { display: none !important; } }

/* ========== CTA TEXT ABAIXO ========== */
.rr-carousel-cta {
  text-align: center;
  margin-top: 24px;
  font-size: 13px;
  color: var(--rr-text-gray);
  padding: 0 16px;
}
.rr-carousel-cta strong { color: var(--rr-accent); }

/* ============================================================
   LIGHTBOX PREMIUM v2 (object-fit:contain — NUNCA corta)
============================================================ */
.rr-lb {
  position: fixed;
  inset: 0;
  z-index: 100001;
  background: rgba(14,14,16,.96);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity .35s ease, visibility .35s ease;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
}
.rr-lb.is-open {
  opacity: 1;
  visibility: visible;
}

/* Stage do lightbox — flex centralizando + responsivo */
.rr-lb-stage {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 64px 24px 88px;
  box-sizing: border-box;
  gap: 20px;
}

/* Figure responsiva — ocupa todo espaço disponível, centraliza tudo */
.rr-lb-figure {
  width: 100%;
  max-width: 1400px;
  max-height: calc(100vh - 200px);
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  position: relative;
  transform: scale(.95);
  transition: transform .45s var(--rr-ease-pop);
  box-sizing: border-box;
}
.rr-lb.is-open .rr-lb-figure { transform: scale(1); }

/* Wrap da imagem — centralizada, mantém aspect ratio sempre */
.rr-lb-img-wrap {
  position: relative;
  width: 100%;
  flex: 1 1 auto;
  min-height: 0;
  max-height: calc(100vh - 280px);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--rr-radius-lg);
  overflow: hidden;
  box-shadow: var(--rr-shadow-deep);
  background: var(--rr-bg-card);
}
/* IMAGEM — object-fit:contain garante que NUNCA corta */
.rr-lb-img {
  display: block;
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  background: var(--rr-bg-card);
  margin: 0 auto;
}
.rr-lb-loader {
  position: absolute;
  width: 32px;
  height: 32px;
  border: 3px solid rgba(255,255,255,.15);
  border-top-color: var(--rr-accent);
  border-radius: 50%;
  animation: rr-spin .8s linear infinite;
  opacity: 0;
  transition: opacity .25s ease;
}
.rr-lb.is-loading .rr-lb-loader { opacity: 1; }
@keyframes rr-spin { to { transform: rotate(360deg); } }

/* CAPTION abaixo da imagem (fora dela, premium) */
.rr-lb-caption {
  text-align: center;
  color: var(--rr-text-light);
  max-width: 600px;
  padding: 0 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}
.rr-lb-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--rr-accent);
  padding: 5px 12px;
  background: rgba(212,160,23,.12);
  border: 1px solid rgba(212,160,23,.3);
  border-radius: 999px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.rr-lb-tag:empty { display: none; }
.rr-lb-name {
  font-size: 22px;
  font-weight: 800;
  color: var(--rr-text-light);
  letter-spacing: -.4px;
  line-height: 1.2;
  margin: 4px 0 0;
}
.rr-lb-meta {
  font-size: 13px;
  color: var(--rr-text-muted);
  margin: 0;
  font-weight: 500;
}
.rr-lb-meta:empty { display: none; }

/* CONTROLES DO LIGHTBOX */
.rr-lb-close,
.rr-lb-prev,
.rr-lb-next {
  position: absolute;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255,255,255,.08);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255,255,255,.14);
  color: var(--rr-text-light);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all .25s ease;
  z-index: 5;
  padding: 0;
  font: inherit;
}
.rr-lb-close:hover,
.rr-lb-prev:hover,
.rr-lb-next:hover {
  background: var(--rr-accent);
  color: var(--rr-text-dark);
  border-color: var(--rr-accent);
  transform: scale(1.06);
}
.rr-lb-close { top: 20px; right: 20px; }
.rr-lb-close:hover { transform: rotate(90deg); }
.rr-lb-prev { top: 50%; left: 20px; transform: translateY(-50%); }
.rr-lb-next { top: 50%; right: 20px; transform: translateY(-50%); }
.rr-lb-prev:hover { transform: translateY(-50%) scale(1.06); }
.rr-lb-next:hover { transform: translateY(-50%) scale(1.06); }
.rr-lb-close svg,
.rr-lb-prev svg,
.rr-lb-next svg { width: 16px; height: 16px; }
.rr-lb-prev svg { margin-right: 2px; }
.rr-lb-next svg { margin-left: 2px; }

/* COUNTER (1/8) */
.rr-lb-counter {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(255,255,255,.08);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255,255,255,.14);
  color: var(--rr-text-light);
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .5px;
  font-variant-numeric: tabular-nums;
}
.rr-lb-counter strong { color: var(--rr-accent); }

/* MOBILE LIGHTBOX */
@media (max-width: 768px) {
  .rr-lb-stage {
    padding: 64px 16px 96px;
  }
  .rr-lb-img-wrap, .rr-lb-img {
    max-height: calc(100vh - 280px);
  }
  .rr-lb-figure { gap: 16px; }
  .rr-lb-name { font-size: 18px; }
  .rr-lb-meta { font-size: 12px; }
  .rr-lb-close { top: 14px; right: 14px; }
  .rr-lb-prev { left: 8px; width: 38px; height: 38px; }
  .rr-lb-next { right: 8px; width: 38px; height: 38px; }
  .rr-lb-counter { bottom: 18px; font-size: 11px; }
}

/* ========== MOBILE RESPONSIVE CARROSSEL ========== */
@media (max-width: 768px) {
  .rr-carousel-section { padding: 48px 0 56px; }
  .rr-carousel-item { width: 200px; height: 260px; }
  .rr-carousel-track { gap: 10px; padding: 0 calc(50vw - 110px); }
  .rr-carousel-mask { padding: 20px 0; }
  .rr-h2 { font-size: 22px; }
}

/* ========== A11Y — REDUCED MOTION ========== */
@media (prefers-reduced-motion: reduce) {
  .rr-carousel-item,
  .rr-carousel-content,
  .rr-carousel-zoom,
  .rr-lb-figure,
  .rr-dot { animation: none !important; transition: none !important; }
}
