:root {
	--wcsv-accent: #000000;
}

/* Reset agressivo: o tema pode aplicar fundo/borda/padding padrão em
   qualquer <button>, incluindo os nossos gatilhos de vídeo. Isso garante
   que só o nosso próprio visual (a bolinha, o card, etc.) apareça. */
.wcsv-bubble-btn,
.wcsv-carousel-item,
.wcsv-home-item,
.wcsv-highlight-item,
.wcsv-gallery-slide,
.wcsv-bubble-btn:hover,
.wcsv-bubble-btn:focus,
.wcsv-bubble-btn:active,
.wcsv-bubble-btn:visited,
.wcsv-carousel-item:hover,
.wcsv-carousel-item:focus,
.wcsv-carousel-item:active,
.wcsv-home-item:hover,
.wcsv-home-item:focus,
.wcsv-home-item:active,
.wcsv-highlight-item:hover,
.wcsv-highlight-item:focus,
.wcsv-highlight-item:active,
.wcsv-gallery-slide:hover,
.wcsv-gallery-slide:focus {
	background: none !important;
	background-color: transparent !important;
	border: 0 !important;
	box-shadow: none !important;
	outline: none !important;
	padding: 0 !important;
	border-radius: 0 !important;
	-webkit-appearance: none !important;
	appearance: none !important;
}

/* Evita que players de terceiros (ex: MediaElement.js do WordPress) tentem
   "vestir" nossos vídeos de miniatura com controles/skin próprios. */
.wcsv-bubble-ring .mejs-container,
.wcsv-thumb .mejs-container,
.wcsv-home-thumb .mejs-container {
	width: 100% !important;
	height: 100% !important;
	background: transparent !important;
}
.wcsv-bubble-ring .mejs-controls,
.wcsv-thumb .mejs-controls,
.wcsv-home-thumb .mejs-controls,
.wcsv-bubble-ring .mejs-overlay-button,
.wcsv-thumb .mejs-overlay-button,
.wcsv-home-thumb .mejs-overlay-button {
	display: none !important;
}

/* ---------- Bolha flutuante ---------- */
.wcsv-floating {
	position: fixed;
	bottom: 24px;
	z-index: 99998;
	text-align: center;
}
.wcsv-pos-right { right: 20px; }
.wcsv-pos-left { left: 20px; }

.wcsv-bubble-btn {
	background: none;
	border: none;
	cursor: pointer;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 4px;
	padding: 0;
}
.wcsv-bubble-ring {
	width: var(--wcsv-bubble-size, 64px);
	height: var(--wcsv-bubble-size, 64px);
	border-radius: 50%;
	padding: 3px;
	background: var(--wcsv-ring-bg, linear-gradient(45deg, #f9ce34, #ee2a7b, #6228d7));
	display: block;
	box-shadow: 0 2px 10px rgba(0,0,0,.25);
	overflow: hidden !important;
	box-sizing: border-box;
	clip-path: circle(50%);
	position: relative;
}
.wcsv-bubble-ring.small {
	width: calc(var(--wcsv-bubble-size, 64px) * 0.85);
	height: calc(var(--wcsv-bubble-size, 64px) * 0.85);
}
.wcsv-bubble-ring img,
.wcsv-bubble-ring .wcsv-thumb-video {
	position: absolute !important;
	top: 0 !important;
	left: 0 !important;
	width: 100% !important;
	height: 100% !important;
	object-fit: cover !important;
	border-radius: 50%;
	border: 2px solid #fff;
	display: block;
	box-sizing: border-box;
}
.wcsv-bubble-label {
	font-size: 12px;
	background: #fff;
	padding: 2px 8px;
	border-radius: 10px;
	box-shadow: 0 1px 4px rgba(0,0,0,.2);
	color: #111;
}

/* ---------- Carrossel ---------- */
.wcsv-carousel {
	display: flex;
	gap: 14px;
	overflow-x: auto;
	padding: 10px 4px;
	scrollbar-width: thin;
}
.wcsv-carousel-item {
	background: none;
	border: none;
	cursor: pointer;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 6px;
	flex: 0 0 auto;
	width: calc(var(--wcsv-card-width, 140px) * 0.65);
}
.wcsv-thumb {
	width: calc(var(--wcsv-card-width, 140px) * 0.6);
	height: calc(var(--wcsv-card-width, 140px) * 0.6);
	border-radius: 50%;
	overflow: hidden;
	padding: 3px;
	background: var(--wcsv-ring-bg, linear-gradient(45deg, #f9ce34, #ee2a7b, #6228d7));
	display: block;
	box-sizing: border-box;
}
.wcsv-thumb img,
.wcsv-thumb .wcsv-thumb-video {
	width: 100% !important;
	height: 100% !important;
	object-fit: cover !important;
	border-radius: 50%;
	border: 2px solid #fff;
}
.wcsv-carousel-title {
	font-size: 12px;
	max-width: calc(var(--wcsv-card-width, 140px) * 0.65);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	color: #111;
}

/* ---------- Destaques da loja (grid) ---------- */
.wcsv-home-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(var(--wcsv-card-width, 140px), 1fr));
	gap: 16px;
}
.wcsv-home-item {
	background: none;
	border: none;
	cursor: pointer;
	display: flex;
	flex-direction: column;
	gap: 6px;
}
.wcsv-home-thumb {
	position: relative;
	width: 100%;
	aspect-ratio: 9 / 16;
	border-radius: 12px;
	overflow: hidden;
	background: #111;
}
.wcsv-home-thumb img,
.wcsv-home-thumb .wcsv-thumb-video {
	width: 100% !important;
	height: 100% !important;
	object-fit: cover !important;
	display: block;
}
.wcsv-play-icon {
	position: absolute;
	bottom: 8px;
	left: 8px;
	color: #fff;
	font-size: 12px;
	background: rgba(0,0,0,.5);
	border-radius: 50%;
	width: 24px;
	height: 24px;
	display: flex;
	align-items: center;
	justify-content: center;
}
.wcsv-home-title {
	font-size: 13px;
	color: #111;
	text-align: left;
}

/* ---------- Destaques no produto ---------- */
.wcsv-product-highlights {
	display: flex;
	gap: 16px;
	flex-wrap: wrap;
	margin: 16px 0;
}
.wcsv-highlight-item {
	background: none;
	border: none;
	cursor: pointer;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 4px;
	width: 70px;
}
.wcsv-highlight-title {
	font-size: 11px;
	color: #111;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	max-width: 70px;
}

/* ---------- Slide de vídeo dentro da galeria de fotos do produto ---------- */
/* O slide principal (área grande) fica do tamanho natural que o
   flexslider do WooCommerce já controla — não travamos isso, senão
   quebra o funcionamento do slider grande. */
.woocommerce-product-gallery__image.wcsv-gallery-slide {
	background: #000;
}
.wcsv-gallery-video {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	background: #000;
}
/* Miniatura da galeria (a fileira PEQUENA de navegação, clonada pelo
   WooCommerce a partir do slide principal): aqui sim travamos em 138x138
   pra ficar do mesmo tamanho que as miniaturas das fotos. */
.wcsv-gallery-thumb {
	position: relative !important;
	width: 138px !important;
	height: 138px !important;
}
.wcsv-gallery-thumb img {
	width: 138px !important;
	height: 138px !important;
	object-fit: cover !important;
}
.wcsv-gallery-thumb::after {
	content: "";
	position: absolute;
	top: 50%;
	left: 50%;
	width: 22px;
	height: 22px;
	transform: translate(-50%, -50%);
	background: rgba(0,0,0,.45);
	border-radius: 50%;
	pointer-events: none;
}
.wcsv-gallery-thumb::before {
	content: "";
	position: absolute;
	top: 50%;
	left: 50%;
	width: 0;
	height: 0;
	border-top: 6px solid transparent;
	border-bottom: 6px solid transparent;
	border-left: 9px solid #fff;
	transform: translate(-40%, -50%);
	z-index: 2;
	pointer-events: none;
}

/* No mobile, alguns temas não usam a fileira separada de miniaturas
   (.flex-control-thumbs) — mostram os próprios slides como se fossem a
   fileira de fotos, sem tamanho fixo. Isso faz nosso vídeo aparecer maior
   e sozinho numa linha. Aqui forçamos o mesmo comportamento das fotos
   nesse cenário específico, só até 767px, sem mexer no desktop. */
@media (max-width: 767px) {
	/* Estiliza o próprio item, sem depender de como o construtor de página
	   (Elementor etc) organiza o elemento pai — usamos float, que funciona
	   independente do pai ser flex, grid ou bloco comum. */
	.woocommerce-product-gallery__image.wcsv-gallery-slide {
		display: inline-block !important;
		float: left !important;
		width: 31% !important;
		max-width: 31% !important;
		min-width: 0 !important;
		margin: 0 1% 8px 0 !important;
		vertical-align: top !important;
		aspect-ratio: 1 / 1;
		overflow: hidden;
	}
	.woocommerce-product-gallery__image.wcsv-gallery-slide .wcsv-gallery-video {
		width: 100% !important;
		height: 100% !important;
		min-width: 0 !important;
		object-fit: cover !important;
	}
}
.wcsv-modal {
	position: fixed;
	inset: 0;
	background: rgba(0,0,0,.92);
	z-index: 999999;
	display: none;
	align-items: center;
	justify-content: center;
}
.wcsv-modal.wcsv-open { display: flex; }

.wcsv-modal-inner {
	position: relative;
	width: 100%;
	max-width: 420px;
	height: 100%;
	max-height: 100vh;
	background: #000;
	overflow: hidden;
}
@media (min-width: 600px) {
	.wcsv-modal-inner {
		height: 90vh;
		max-height: 780px;
		border-radius: 16px;
	}
}

.wcsv-video {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	background: #000;
}
.wcsv-video-error {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	text-align: center;
	color: #fff;
	background: #111;
	padding: 30px;
	font-size: 14px;
	z-index: 3;
}

.wcsv-progress-row {
	position: absolute;
	top: 10px;
	left: 10px;
	right: 10px;
	display: flex;
	gap: 4px;
	z-index: 5;
}
.wcsv-progress-track {
	flex: 1;
	height: 3px;
	background: rgba(255,255,255,.35);
	border-radius: 2px;
	overflow: hidden;
}
.wcsv-progress-fill {
	height: 100%;
	width: 0%;
	background: #fff;
}

.wcsv-close, .wcsv-mute {
	position: absolute;
	top: 20px;
	z-index: 6;
	background: rgba(0,0,0,.4);
	color: #fff;
	border: none;
	border-radius: 50%;
	width: 32px;
	height: 32px;
	font-size: 16px;
	cursor: pointer;
}
.wcsv-close { right: 10px; }
.wcsv-mute { right: 50px; }

.wcsv-tap-zone {
	position: absolute;
	top: 0;
	bottom: 0;
	width: 30%;
	z-index: 4;
}
.wcsv-tap-prev { left: 0; }
.wcsv-tap-next { right: 0; }

.wcsv-product-card {
	position: absolute;
	left: 12px;
	right: 12px;
	bottom: 78px;
	background: rgba(255,255,255,.95);
	border-radius: 10px;
	padding: 8px 10px;
	display: none;
	align-items: center;
	gap: 10px;
	z-index: 6;
}
.wcsv-product-card.wcsv-show { display: flex; }
.wcsv-product-card img {
	width: 40px;
	height: 40px;
	object-fit: cover;
	border-radius: 6px;
}
.wcsv-product-card .wcsv-p-name {
	font-size: 13px;
	font-weight: 600;
	color: #111;
}
.wcsv-product-card .wcsv-p-price {
	font-size: 12px;
	color: #555;
}

.wcsv-actions {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 14px;
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 0 12px;
	z-index: 6;
}
.wcsv-like-btn, .wcsv-comment-toggle {
	background: rgba(0,0,0,.4);
	border: none;
	color: #fff;
	border-radius: 20px;
	padding: 8px 12px;
	display: flex;
	align-items: center;
	gap: 6px;
	cursor: pointer;
	font-size: 14px;
}
.wcsv-like-btn.wcsv-liked .wcsv-heart { color: #ee2a7b; }
.wcsv-cta-btn {
	flex: 1;
	background: var(--wcsv-accent, #000);
	color: #fff !important;
	text-align: center;
	padding: 10px 14px;
	border-radius: 20px;
	font-size: 14px;
	font-weight: 600;
	text-decoration: none;
	transition: background-color .2s ease, transform .15s ease;
}
.wcsv-cta-btn.wcsv-cta-loading {
	opacity: .7;
	pointer-events: none;
}
.wcsv-cta-btn.wcsv-cta-added {
	background: #1db954 !important;
	pointer-events: none;
}

.wcsv-comments-panel {
	position: absolute;
	inset: 0;
	background: #fff;
	transform: translateY(100%);
	transition: transform .25s ease;
	z-index: 8;
	display: flex;
	flex-direction: column;
	padding: 14px;
}
.wcsv-comments-panel.wcsv-show { transform: translateY(0); }
.wcsv-comments-list {
	flex: 1;
	overflow-y: auto;
	margin-bottom: 10px;
}
.wcsv-comments-list .wcsv-comment {
	padding: 8px 0;
	border-bottom: 1px solid #eee;
	font-size: 13px;
	color: #222;
}
.wcsv-comments-list .wcsv-comment strong { display: block; font-size: 12px; color: #555; }
.wcsv-comment-form {
	display: flex;
	flex-direction: column;
	gap: 8px;
}
.wcsv-comment-form input,
.wcsv-comment-form textarea {
	border: 1px solid #ddd;
	border-radius: 8px;
	padding: 8px 10px;
	font-size: 13px;
}
.wcsv-comment-form button {
	background: var(--wcsv-accent, #000);
	color: #fff;
	border: none;
	border-radius: 20px;
	padding: 10px;
	font-weight: 600;
	cursor: pointer;
}
