/* BRUXÃO MENU — Aba lateral YouTube (página produto, coluna direita) */

.bm-yt--rail {
  margin-top: 1rem;
  display: flex;
  flex-direction: column;
  min-height: 0;
  max-height: min(72vh, 38rem);
  padding: 0.85rem 0.85rem 0.95rem;
  border-radius: var(--radius, 0.6rem);
  border: 1px solid hsl(var(--primary) / 0.22);
  background: linear-gradient(
    165deg,
    rgb(var(--background) / 0.58) 0%,
    hsl(var(--primary) / 0.07) 42%,
    rgb(var(--background) / 0.64) 100%
  );
  backdrop-filter: blur(14px) saturate(1.25);
  -webkit-backdrop-filter: blur(14px) saturate(1.25);
  box-shadow:
    0 0 0 1px hsl(0 0% 100% / 0.04) inset,
    0 10px 32px hsl(0 0% 0% / 0.22),
    0 0 24px hsl(var(--primary) / 0.1);
}

@media (min-width: 768px) {
  .bm-yt--rail {
    max-height: min(78vh, 44rem);
  }
}

.bm-yt__head {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  margin-bottom: 0.65rem;
  flex-shrink: 0;
}

.bm-yt__head-icon {
  flex-shrink: 0;
  width: 2.25rem;
  height: 2.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.5rem;
  color: hsl(var(--primary));
  background: hsl(var(--primary) / 0.12);
  border: 1px solid hsl(var(--primary) / 0.28);
  box-shadow: 0 0 12px hsl(var(--primary) / 0.18);
}

.bm-yt__head-copy {
  min-width: 0;
}

.bm-yt__title {
  margin: 0;
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: hsl(0 0% 98% / 0.96);
  text-shadow: 0 0 12px hsl(var(--primary) / 0.18);
}

.bm-yt__sub {
  margin: 0.18rem 0 0;
  font-size: 0.68rem;
  line-height: 1.4;
  color: hsl(0 0% 100% / 0.52);
}

.bm-yt__channel-link {
  display: inline-flex;
  margin-top: 0.35rem;
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: hsl(var(--primary));
  text-decoration: none;
  border-bottom: 1px solid hsl(var(--primary) / 0.35);
  transition: color 0.2s ease, border-color 0.2s ease, text-shadow 0.2s ease;
}

.bm-yt__channel-link:hover {
  color: hsl(0 0% 100% / 0.95);
  border-color: hsl(var(--primary) / 0.65);
  text-shadow: 0 0 10px hsl(var(--primary) / 0.35);
}

/* Lista com rolagem: não empurra layout infinito */
.bm-yt__scroller {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 0.15rem;
  margin-right: -0.15rem;
  scrollbar-width: thin;
  scrollbar-color: hsl(var(--primary) / 0.35) transparent;
}

.bm-yt__scroller::-webkit-scrollbar {
  width: 5px;
}

.bm-yt__scroller::-webkit-scrollbar-thumb {
  background: hsl(var(--primary) / 0.35);
  border-radius: 99px;
}

.bm-yt__grid {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

/* Mobile: carrossel horizontal (recomendados) */
@media (max-width: 767px) {
  .bm-yt--rail {
    max-height: none;
    padding: 0.85rem;
  }

  .bm-yt__scroller {
    overflow-x: auto;
    overflow-y: hidden;
    padding-right: 0;
    margin-right: 0;
    padding-bottom: 0.35rem;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
  }

  .bm-yt__grid {
    flex-direction: row;
    gap: 0.65rem;
    width: max-content;
    padding-bottom: 0.15rem;
  }

  .bm-yt__card {
    flex: 0 0 min(58vw, 11.25rem);
    flex-direction: column;
    scroll-snap-align: start;
    padding: 0.4rem;
  }

  .bm-yt__thumb-wrap {
    flex: none;
    width: 100%;
    align-self: stretch;
  }

  .bm-yt__body {
    padding: 0.35rem 0.15rem 0.15rem;
  }

  .bm-yt__card-title {
    -webkit-line-clamp: 2;
    font-size: 0.68rem;
  }
}

/* Card compacto estilo sidebar YouTube */
.bm-yt__card {
  position: relative;
  display: flex;
  flex-direction: row;
  align-items: stretch;
  gap: 0.55rem;
  border-radius: 0.5rem;
  overflow: hidden;
  border: 1px solid hsl(0 0% 100% / 0.07);
  background: hsl(0 0% 100% / 0.03);
  text-decoration: none;
  color: inherit;
  padding: 0.45rem;
  transition:
    transform 0.32s cubic-bezier(0.22, 1, 0.36, 1),
    border-color 0.3s ease,
    box-shadow 0.3s ease;
}

.bm-yt__card:hover {
  transform: translateY(-2px);
  border-color: hsl(var(--primary) / 0.42);
  box-shadow:
    0 0 0 1px hsl(var(--primary) / 0.1) inset,
    0 6px 22px hsl(0 0% 0% / 0.32),
    0 0 18px hsl(var(--primary) / 0.22);
}

.bm-yt__thumb-wrap {
  position: relative;
  flex: 0 0 6.75rem;
  width: 6.75rem;
  border-radius: 0.4rem;
  overflow: hidden;
  background: hsl(0 0% 0% / 0.4);
  align-self: center;
}

@media (min-width: 768px) {
  .bm-yt__thumb-wrap {
    flex-basis: 7.25rem;
    width: 7.25rem;
  }
}

.bm-yt__thumb {
  width: 100%;
  height: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  display: block;
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1), filter 0.3s ease;
}

.bm-yt__card:hover .bm-yt__thumb {
  transform: scale(1.05);
  filter: saturate(1.08) brightness(1.04);
}

.bm-yt__duration {
  position: absolute;
  right: 0.28rem;
  bottom: 0.28rem;
  padding: 0.12rem 0.32rem;
  border-radius: 0.25rem;
  font-size: 0.58rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
  color: hsl(0 0% 100% / 0.95);
  background: hsl(0 0% 0% / 0.72);
  border: 1px solid hsl(0 0% 100% / 0.12);
}

.bm-yt__shine {
  position: absolute;
  inset: -25% -40%;
  width: 50%;
  pointer-events: none;
  background: linear-gradient(
    118deg,
    transparent 0%,
    rgba(255, 255, 255, 0) 40%,
    rgba(255, 255, 255, 0.1) 50%,
    transparent 58%
  );
  transform: translateX(-130%) skewX(-11deg);
  opacity: 0;
}

.bm-yt__card:hover .bm-yt__shine {
  animation: bm-yt-shine 0.7s ease-out forwards;
}

@keyframes bm-yt-shine {
  0% {
    transform: translateX(-130%) skewX(-11deg);
    opacity: 0;
  }
  20% {
    opacity: 1;
  }
  100% {
    transform: translateX(160%) skewX(-11deg);
    opacity: 0;
  }
}

.bm-yt__play {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%) scale(0.92);
  width: 2.1rem;
  height: 2.1rem;
  border-radius: 9999px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: hsl(var(--primary) / 0.92);
  border: 1px solid hsl(0 0% 100% / 0.22);
  color: white;
  box-shadow: 0 0 14px hsl(var(--primary) / 0.45);
  opacity: 0;
  transition:
    opacity 0.28s ease,
    transform 0.28s ease,
    box-shadow 0.28s ease;
}

.bm-yt__card:hover .bm-yt__play {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
  box-shadow: 0 0 22px hsl(var(--primary) / 0.65);
}

.bm-yt__play svg {
  width: 0.95rem;
  height: 0.95rem;
  margin-left: 2px;
}

.bm-yt__body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.28rem;
  padding: 0.05rem 0.1rem 0.05rem 0;
}

.bm-yt__card-title {
  margin: 0;
  font-size: 0.72rem;
  font-weight: 600;
  line-height: 1.32;
  color: hsl(0 0% 98% / 0.93);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.bm-yt__stats {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.62rem;
  color: hsl(0 0% 100% / 0.48);
}

.bm-yt__stat {
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: hsl(0 0% 100% / 0.58);
}

.bm-yt__stat-label {
  font-weight: 500;
  text-transform: lowercase;
  opacity: 0.85;
}

.bm-yt__status {
  margin: 0.55rem 0 0;
  font-size: 0.68rem;
  color: hsl(0 0% 100% / 0.5);
  flex-shrink: 0;
}

.bm-yt__status[data-tone='error'] {
  color: hsl(0 72% 62% / 0.95);
}

@media (prefers-reduced-motion: reduce) {
  .bm-yt__card,
  .bm-yt__thumb,
  .bm-yt__play {
    transition: none;
  }

  .bm-yt__card:hover {
    transform: none;
  }

  .bm-yt__card:hover .bm-yt__thumb {
    transform: none;
    filter: none;
  }

  .bm-yt__card:hover .bm-yt__shine {
    animation: none;
  }

  .bm-yt__play {
    opacity: 1;
    transform: translate(-50%, -50%) scale(0.92);
  }
}
