/**
 * iFody — CSS do Slide de Vídeos (Home Page).
 *
 * Totalmente integrado à identidade visual e aos design tokens do tema iFody:
 *  - Estética premium em Dark Mode com glassmorphism avançado.
 *  - Sombras neon degradê, bordas brilhantes e botões com gradiente iFody.
 *  - Layout responsivo otimizado para mobile-first.
 */

.video-slider {
	background: radial-gradient(circle at top, var(--bg-2) 0%, var(--bg) 100%);
	padding: 64px 0;
	position: relative;
	overflow: hidden;
	color: var(--text);
	border-bottom: 1px solid var(--line);
}

.video-slider__header {
	text-align: center;
	margin-bottom: 40px;
}

.video-slider__kicker {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 5px 12px;
	border-radius: 999px;
	background: rgba(255, 61, 138, .12);
	border: 1px solid rgba(255, 61, 138, .25);
	font-size: 10px;
	font-weight: 600;
	letter-spacing: .14em;
	text-transform: uppercase;
	color: var(--pink-light);
	margin-bottom: 12px;
}

.video-slider__title {
	font-family: var(--font);
	font-size: clamp(24px, 4.5vw, 38px);
	font-weight: 700;
	letter-spacing: -0.025em;
	color: var(--text);
	margin: 0;
}

.video-slider__title em {
	font-style: normal;
	background: var(--grad-primary);
	-webkit-background-clip: text;
	background-clip: text;
	color: transparent;
}

/* Carrossel */
.video-slider__carousel {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	max-width: 1200px;
	margin: 0 auto;
	padding: 0 40px;
}

.video-slider__viewport {
	overflow: hidden;
	width: 100%;
	padding: 20px 0;
}

.video-slider__track {
	display: flex;
	align-items: center;
	justify-content: flex-start;
	gap: 24px;
	transition: transform 0.45s var(--ease);
	will-change: transform;
}

/* Slide Individual */
.video-slide {
	flex: 0 0 280px;
	width: 280px;
	transition: all 0.45s var(--ease);
	opacity: 0.4;
	transform: scale(0.85);
	cursor: pointer;
	pointer-events: none; /* Apenas o slide ativo recebe cliques nos controles */
	will-change: transform, opacity;
}

.video-slide.is-active {
	opacity: 1;
	transform: scale(1.04);
	pointer-events: auto;
}

.video-slide__container {
	position: relative;
	width: 100%;
	aspect-ratio: 9/16;
	background: var(--bg-2);
	border-radius: 20px;
	overflow: hidden;
	box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
	border: 2px solid var(--line);
	transition: border-color 0.45s, box-shadow 0.45s;
	
	/* GPU Compositing Hacks to prevent black screens/blank videos inside rounded/transformed containers */
	-webkit-transform: translate3d(0, 0, 0);
	transform: translate3d(0, 0, 0);
	-webkit-backface-visibility: hidden;
	backface-visibility: hidden;
	-webkit-mask-image: -webkit-radial-gradient(white, black); /* Forces Safari WebKit to clip and composite correctly */
}

.video-slide.is-active .video-slide__container {
	border-color: var(--pink);
	box-shadow: 0 0 35px rgba(255, 61, 138, 0.35);
}

/* Reprodutor de mídia */
.video-slide__media {
	position: absolute;
	left: 0;
	top: 0;
	width: 100%;
	height: 100%;
	z-index: 1;
}

.video-slide__poster {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: opacity 0.35s var(--ease);
}

.video-slide__media video {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	
	/* GPU Compositing Hacks to force frame rendering */
	-webkit-transform: translate3d(0, 0, 0);
	transform: translate3d(0, 0, 0);
	-webkit-backface-visibility: hidden;
	backface-visibility: hidden;
}

/* Detalhes do Stories */
.video-slide__star {
	position: absolute;
	left: 16px;
	top: 16px;
	background: var(--grad-gold);
	color: #2a1a0a;
	width: 32px;
	height: 32px;
	border-radius: 8px;
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 5;
	box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}
.video-slide__star .dashicons,
.video-slide__star svg {
	font-size: 16px;
	width: 16px;
	height: 16px;
}

.video-slide__avatar {
	position: absolute;
	left: 50%;
	top: 50%;
	transform: translate(-50%, -50%);
	width: 72px;
	height: 72px;
	border-radius: 50%;
	border: 3px solid var(--pink);
	overflow: hidden;
	z-index: 5;
	box-shadow: 0 0 20px rgba(255, 61, 138, 0.5), 0 6px 15px rgba(0, 0, 0, 0.4);
	pointer-events: none;
	background: var(--surface);
	display: flex;
	align-items: center;
	justify-content: center;
}

.video-slide__avatar img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.video-slide__volume {
	position: absolute;
	right: 16px;
	bottom: 16px;
	background: rgba(15, 10, 26, 0.7);
	backdrop-filter: blur(10px);
	-webkit-backdrop-filter: blur(10px);
	border: 1px solid rgba(255, 255, 255, 0.15);
	color: var(--text);
	width: 36px;
	height: 36px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	z-index: 5;
	transition: background 0.2s, transform 0.2s, opacity 0.3s;
	opacity: 0;
	pointer-events: none;
}

.video-slide.is-active .video-slide__volume {
	opacity: 1;
	pointer-events: auto;
}

.video-slide__volume:hover {
	background: rgba(15, 10, 26, 0.95);
	transform: scale(1.08);
}

.video-slide__volume .dashicons,
.video-slide__volume svg {
	font-size: 18px;
	width: 18px;
	height: 18px;
}

/* Card do Produto associado no Rodapé */
.video-slide__product-card {
	display: flex;
	align-items: center;
	gap: 12px;
	background: rgba(28, 20, 40, 0.85);
	backdrop-filter: blur(12px);
	-webkit-backdrop-filter: blur(12px);
	border: 1px solid var(--line);
	border-radius: 16px;
	padding: 12px 14px;
	margin-top: 14px;
	box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
	transition: opacity 0.45s, transform 0.45s, border-color 0.3s;
	opacity: 0.3;
	transform: translateY(10px);
}

.video-slide.is-active .video-slide__product-card {
	opacity: 1;
	transform: translateY(0);
	border-color: rgba(255, 61, 138, 0.3);
}

.video-slide__product-img {
	width: 44px;
	height: 44px;
	border-radius: 10px;
	object-fit: cover;
	background: var(--surface-2);
	border: 1px solid rgba(255, 255, 255, 0.05);
	flex-shrink: 0;
}

.video-slide__product-info {
	flex: 1;
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 2px;
}

.video-slide__product-title {
	display: block;
	color: var(--text);
	font-weight: 700;
	font-size: 13px;
	line-height: 1.35;
	text-decoration: none;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	transition: color 0.2s;
}

.video-slide__product-title:hover {
	color: var(--pink-light);
}

.video-slide__product-price {
	display: flex;
	align-items: baseline;
	gap: 4px;
	line-height: 1;
}

/* Formatação do preço WooCommerce para herdar o visual iFody */
.video-slide__product-price ins,
.video-slide__product-price .price-box__now,
.video-slide__product-price span {
	background: linear-gradient(135deg, #00C48C 0%, #00A876 100%) !important;
	-webkit-background-clip: text !important;
	background-clip: text !important;
	color: transparent !important;
	font-weight: 800 !important;
	font-size: 13px !important;
}

.video-slide__product-price del,
.video-slide__product-price .price-box__was {
	font-size: 10px !important;
	color: var(--text-3) !important;
	text-decoration: line-through !important;
}

.video-slide__product-price .price-box__pix-tag {
	display: none !important;
}

.video-slide__add-to-cart {
	background: var(--grad-primary);
	border: 0;
	color: #ffffff;
	width: 36px;
	height: 36px;
	border-radius: 10px;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
	flex-shrink: 0;
	position: relative;
	box-shadow: 0 4px 12px rgba(255, 61, 138, 0.3);
}

.video-slide__add-to-cart:hover {
	transform: scale(1.08) rotate(3deg);
	box-shadow: 0 6px 16px rgba(255, 61, 138, 0.5);
}

.video-slide__add-to-cart:active {
	transform: scale(0.95);
}

.video-slide__add-to-cart .dashicons,
.video-slide__add-to-cart svg {
	font-size: 16px;
	width: 16px;
	height: 16px;
}

/* Navegação */
.video-slider__nav {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	z-index: 10;
	background: rgba(255, 255, 255, 0.08);
	backdrop-filter: blur(10px);
	-webkit-backdrop-filter: blur(10px);
	border: 1px solid rgba(255, 255, 255, 0.15);
	color: #ffffff;
	width: 48px;
	height: 48px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	transition: background 0.3s, border-color 0.3s, transform 0.2s;
}

.video-slider__nav:hover {
	background: var(--pink);
	border-color: var(--pink);
	transform: translateY(-50%) scale(1.08);
	box-shadow: 0 0 20px rgba(255, 61, 138, 0.4);
}

.video-slider__nav--prev {
	left: -10px;
}

.video-slider__nav--next {
	right: -10px;
}

.video-slider__nav .dashicons,
.video-slider__nav svg {
	font-size: 20px;
	width: 20px;
	height: 20px;
}

/* Responsividade */
@media (max-width: 768px) {
	.video-slider {
		padding: 48px 0;
	}
	.video-slider__title {
		font-size: 26px;
	}
	.video-slider__carousel {
		padding: 0 10px;
	}
	.video-slider__nav {
		width: 40px;
		height: 40px;
	}
	.video-slider__nav--prev {
		left: 5px;
	}
	.video-slider__nav--next {
		right: 5px;
	}
	.video-slide {
		flex: 0 0 240px;
		width: 240px;
	}
	.video-slide__product-card {
		padding: 10px 12px;
		border-radius: 12px;
		margin-top: 10px;
	}
	.video-slide__avatar {
		width: 56px;
		height: 56px;
	}
}

/* ============================================
   STORIES VIDEO OVERLAY MODAL (Home & PDP)
   ============================================ */
.ifody-video-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(10, 5, 18, 0.96);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  animation: ifodyFadeIn 0.3s ease forwards;
}
.ifody-video-overlay.is-open {
  display: flex;
}
.ifody-video-overlay__backdrop {
  position: absolute;
  inset: 0;
  cursor: pointer;
}
.ifody-video-overlay__shell {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 360px;
  height: 90vh;
  max-height: 640px;
  aspect-ratio: 9/16;
  background: #0a0512;
  border-radius: 20px;
  overflow: hidden;
  border: 2px solid rgba(255, 61, 138, 0.8);
  box-shadow: 0 0 40px rgba(255, 61, 138, 0.4), 0 0 80px rgba(139, 60, 255, 0.2);
  display: flex;
  flex-direction: column;
  animation: ifodySlideUp 0.35s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}
.ifody-video-overlay__video-container {
  position: absolute;
  inset: 0;
  z-index: 1;
}
.ifody-video-overlay__player {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.ifody-video-overlay__close {
  position: absolute;
  right: 16px;
  top: 16px;
  z-index: 10;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.2);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-size: 22px;
  line-height: 34px;
  cursor: pointer;
  text-align: center;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(4px);
}
.ifody-video-overlay__close:hover {
  background: var(--pink);
  border-color: var(--pink);
  transform: scale(1.1);
}
.ifody-video-overlay__volume {
  position: absolute;
  right: 16px;
  bottom: 100px;
  z-index: 10;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.2);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  backdrop-filter: blur(4px);
}
.ifody-video-overlay__volume:hover {
  background: rgba(255, 61, 138, 0.8);
  transform: scale(1.1);
}
.ifody-video-overlay__volume .dashicons,
.ifody-video-overlay__volume svg {
  font-size: 18px;
  width: 18px;
  height: 18px;
}
.ifody-video-overlay__product-card {
  position: absolute;
  bottom: 16px;
  left: 16px;
  right: 16px;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-radius: 14px;
  padding: 10px 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.2);
  animation: ifodyCardPop 0.4s 0.2s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}
.ifody-video-overlay__product-img {
  width: 46px;
  height: 46px;
  border-radius: 8px;
  object-fit: cover;
  border: 1px solid rgba(0, 0, 0, 0.05);
}
.ifody-video-overlay__product-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.ifody-video-overlay__product-title {
  display: block;
  color: #0d0714;
  font-weight: 700;
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ifody-video-overlay__product-price {
  display: flex;
  align-items: baseline;
  gap: 4px;
  line-height: 1;
}
/* Adaptacao para herdar preco do WC */
.ifody-video-overlay__product-price span,
.ifody-video-overlay__product-price bdi,
.ifody-video-overlay__product-price ins,
.ifody-video-overlay__product-price .price-box__now,
.ifody-video-overlay__product-price .price-box__now span {
  background: linear-gradient(135deg, #00C48C 0%, #00A876 100%) !important;
  -webkit-background-clip: text !important;
  background-clip: text !important;
  color: transparent !important;
  -webkit-text-fill-color: transparent !important;
  font-weight: 800 !important;
  font-size: 15px !important;
  display: inline-block !important;
}
.ifody-video-overlay__product-price .price-box__was,
.ifody-video-overlay__product-price del {
  font-size: 11px !important;
  color: #7a7582 !important;
  text-decoration: line-through !important;
}
.ifody-video-overlay__product-price .price-box__pix-tag {
  display: none !important;
}
.ifody-video-overlay__add-to-cart {
  background: linear-gradient(135deg, #8B3CFF, #FF3D8A);
  border: 0;
  color: #fff;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 12px rgba(139, 60, 255, 0.3);
}
.ifody-video-overlay__add-to-cart:hover {
  transform: scale(1.08) rotate(3deg);
  box-shadow: 0 6px 16px rgba(255, 61, 138, 0.4);
}
.ifody-video-overlay__add-to-cart .dashicons,
.ifody-video-overlay__add-to-cart svg {
  font-size: 18px;
  width: 18px;
  height: 18px;
}

/* Animations */
@keyframes ifodyFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes ifodySlideUp {
  from { opacity: 0; transform: translateY(40px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes ifodyCardPop {
  from { opacity: 0; transform: scale(0.9) translateY(10px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

@media (max-width: 480px) {
  .ifody-video-overlay__shell {
    max-width: 100%;
    height: 100%;
    max-height: 100%;
    border-radius: 0;
    border: 0;
  }
}

.ifody-video-overlay__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #ffffff;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.3s, border-color 0.3s, transform 0.2s, opacity 0.3s;
}

.ifody-video-overlay__nav:hover {
  background: var(--pink);
  border-color: var(--pink);
  transform: translateY(-50%) scale(1.08);
  box-shadow: 0 0 20px rgba(255, 61, 138, 0.4);
}

.ifody-video-overlay__nav:active {
  transform: translateY(-50%) scale(0.95);
}

.ifody-video-overlay__nav--prev {
  left: 24px;
}

.ifody-video-overlay__nav--next {
  right: 24px;
}

.ifody-video-overlay__nav svg {
  display: block;
  pointer-events: none;
}

@media (max-width: 768px) {
  .ifody-video-overlay__nav {
    width: 40px;
    height: 40px;
  }
  .ifody-video-overlay__nav--prev {
    left: 8px;
  }
  .ifody-video-overlay__nav--next {
    right: 8px;
  }
}
