/**
 * GreenLife - TikTok Video Shop & Carousel Frontend Styles
 * All class names uniquely namespaced with 'gltok-' to prevent conflicts.
 */

/* Contenedor Principal de la Sección (Sin padding superior/inferior por defecto, configurable) */
.gltok-section-wrapper {
	background-color: transparent;
	background-image: none;
	width: 100%;
	max-width: 100%;
	padding: 0 !important;
	margin: 0 !important;
	position: relative;
	overflow: hidden;
	border: none;
	font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
	box-sizing: border-box;
}

/* Header: Badge, Título y Subtítulo */
.gltok-section-header {
	text-align: center;
	max-width: 820px;
	margin: 0 auto;
	padding: 0 20px;
	box-sizing: border-box;
}

.gltok-badge-pill {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	background-color: #E6EFD9;
	color: #2D5830;
	font-size: 12px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	padding: 6px 16px;
	border-radius: 9999px;
	margin-bottom: 14px;
}

.gltok-badge-pill svg {
	color: #2D5830;
	fill: currentColor;
}

.gltok-title-heading {
	font-size: 38px;
	font-weight: 800;
	color: #1E462A;
	letter-spacing: -0.02em;
	margin: 0 0 12px 0;
	line-height: 1.18;
}

.gltok-subtitle-text {
	font-size: 15px;
	color: #4b5563;
	margin: 0;
	font-weight: 500;
	line-height: 1.5;
}

@media (max-width: 768px) {
	.gltok-title-heading {
		font-size: 28px;
	}
	.gltok-section-wrapper {
		padding: 0 !important;
		margin: 0 !important;
	}
	.gltok-subtitle-text {
		font-size: 14px;
	}
}

/* Escenario del Carrusel (Con espacio vertical exacto para que la tarjeta central escalada no se corte arriba ni abajo) */
.gltok-carousel-stage {
	position: relative;
	width: 100%;
	max-width: 100%;
	margin: 0 auto;
	overflow: hidden;
	padding: 38px 0 52px 0 !important;
	touch-action: pan-y;
	box-sizing: border-box;
}

/* Track de Tarjetas */
.gltok-slider-track {
	display: flex;
	position: relative;
	width: max-content;
	transition: transform 0.45s cubic-bezier(0.25, 1, 0.5, 1);
	will-change: transform;
	cursor: grab;
	user-select: none;
	-webkit-user-select: none;
}

.gltok-slider-track.gltok-is-dragging {
	cursor: grabbing !important;
	transition: none !important;
}

/* Tarjeta Individual */
.gltok-shop-card {
	flex: 0 0 264px;
	width: 264px;
	margin: 0 14px;
	background: #ffffff;
	border-radius: 20px;
	border: 1px solid rgba(0, 0, 0, 0.08);
	overflow: hidden;
	display: flex;
	flex-direction: column;
	transform: scale(0.90);
	opacity: 1;
	transition: transform 0.45s cubic-bezier(0.25, 1, 0.5, 1), 
	            border-color 0.45s ease,
	            box-shadow 0.45s ease;
	z-index: 1;
	box-sizing: border-box;
}

/* Tarjeta del Centro (Destacada: Borde suave verde con transparencia) */
.gltok-shop-card.gltok-is-center {
	transform: scale(1.08);
	opacity: 1;
	z-index: 10;
	border: 2px solid rgba(0, 138, 84, 0.35);
	box-shadow: 0 10px 24px rgba(0, 138, 84, 0.12) !important;
}

@media (max-width: 640px) {
	.gltok-carousel-stage {
		padding: 24px 0 36px 0 !important;
	}
	.gltok-shop-card {
		flex: 0 0 230px;
		width: 230px;
		margin: 0 10px;
		transform: scale(0.92);
	}
	.gltok-shop-card.gltok-is-center {
		transform: scale(1.05);
	}
}

/* Contenedor del Video Vertical (Aspect Ratio 9:15) */
.gltok-video-box {
	position: relative;
	width: 100%;
	aspect-ratio: 9 / 15;
	background-color: #000000;
	overflow: hidden;
	border-top-left-radius: 19px;
	border-top-right-radius: 19px;
	cursor: pointer;
}

.gltok-video-element {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	pointer-events: none;
}

/* Badge TikTok overlay */
.gltok-overlay-badge {
	position: absolute;
	top: 12px;
	left: 12px;
	background: rgba(0, 0, 0, 0.55);
	backdrop-filter: blur(6px);
	-webkit-backdrop-filter: blur(6px);
	color: #ffffff;
	font-size: 11px;
	font-weight: 600;
	padding: 4px 10px;
	border-radius: 20px;
	display: flex;
	align-items: center;
	gap: 6px;
	z-index: 2;
	letter-spacing: 0.02em;
}

.gltok-badge-link {
	text-decoration: none !important;
	cursor: pointer;
	transition: background-color 0.2s ease, transform 0.2s ease;
}

.gltok-badge-link:hover {
	background: rgba(0, 0, 0, 0.80);
	transform: scale(1.05);
}

.gltok-pulse-dot {
	width: 7px;
	height: 7px;
	background-color: #25F4EE;
	border-radius: 50%;
	box-shadow: 0 0 8px #25F4EE;
	display: inline-block;
}

/* Botón de Sonido Mute/Unmute */
.gltok-sound-btn {
	position: absolute;
	bottom: 12px;
	right: 12px;
	width: 36px;
	height: 36px;
	border-radius: 50%;
	background: rgba(0, 0, 0, 0.70);
	backdrop-filter: blur(8px);
	-webkit-backdrop-filter: blur(8px);
	color: #ffffff;
	border: 1px solid rgba(255, 255, 255, 0.35);
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	z-index: 15;
	padding: 0;
	transition: transform 0.2s ease, background 0.2s ease;
	box-sizing: border-box;
}

.gltok-sound-btn:hover {
	background: rgba(0, 0, 0, 0.90);
	transform: scale(1.1);
}

.gltok-sound-btn svg {
	width: 18px !important;
	height: 18px !important;
	min-width: 18px !important;
	min-height: 18px !important;
	max-width: 18px !important;
	max-height: 18px !important;
	stroke: #ffffff !important;
	fill: none !important;
	display: block !important;
	flex-shrink: 0;
	pointer-events: none;
}

/* Reglas de visibilidad de icono de sonido (Fail-safe puro CSS) */
.gltok-sound-btn .gltok-icon-muted {
	display: block !important;
}

.gltok-sound-btn .gltok-icon-unmuted {
	display: none !important;
}

.gltok-sound-btn.gltok-is-unmuted .gltok-icon-muted {
	display: none !important;
}

.gltok-sound-btn.gltok-is-unmuted .gltok-icon-unmuted {
	display: block !important;
}

/* Barra de Producto Inferior Adjunta (Pega el botón a la parte inferior y quita paddings excesivos) */
.gltok-product-bar {
	background: #ffffff;
	padding: 8px 8px 6px 8px;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 6px;
	border-top: 1px solid #F0EEE6;
	border-bottom-left-radius: 19px;
	border-bottom-right-radius: 19px;
	box-sizing: border-box;
}

.gltok-product-thumb {
	width: 44px;
	height: 44px;
	background: #F8F6F0;
	border-radius: 8px;
	padding: 3px;
	flex-shrink: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	border: 1px solid #ECE7DE;
	overflow: hidden;
	margin-left: 4px;
}

.gltok-product-thumb a {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 100%;
}

.gltok-product-thumb img {
	max-width: 100%;
	max-height: 100%;
	object-fit: contain;
}

.gltok-product-info {
	flex: 1;
	min-width: 0;
	margin-right: 4px;
}

.gltok-product-name {
	display: block;
	font-size: 13px;
	font-weight: 700;
	color: #1A1A1A;
	text-decoration: none;
	white-space: normal;
	line-height: 1.25;
	margin-bottom: 3px;
	transition: color 0.2s ease;
}

.gltok-product-name:hover {
	color: #2D5830;
}

.gltok-product-pricing {
	display: flex;
	align-items: center;
	gap: 6px;
}

.gltok-price-current {
	font-size: 14px;
	font-weight: 800;
	color: #1E462A;
}

.gltok-price-old {
	font-size: 12px;
	color: #999999;
	text-decoration: line-through;
}

/* Botón Comprar: Pegado a la parte inferior y con paddings balanceados */
.gltok-buy-btn {
	flex: 0 0 100%;
	width: 100%;
	background-color: #008a54;
	color: #ffffff;
	font-size: 13px;
	font-weight: 700;
	padding: 9px 12px;
	border-radius: 9999px;
	text-decoration: none;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	box-sizing: border-box;
	margin-top: 3px;
	margin-bottom: 2px;
	transition: background-color 0.2s ease, transform 0.15s ease;
	border: none;
	cursor: pointer;
	font-family: inherit;
	box-shadow: none !important;
}

.gltok-buy-btn:hover {
	background-color: #00683f;
	color: #ffffff;
	transform: translateY(-1px);
}

.gltok-buy-btn:active {
	transform: translateY(1px);
}

.gltok-buy-btn[disabled] {
	background-color: #9ca3af;
	cursor: not-allowed;
	transform: none;
}

.gltok-buy-btn svg {
	stroke: currentColor;
}

/* Flechas Flotantes Laterales */
.gltok-nav-arrow {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	width: 44px;
	height: 44px;
	border-radius: 50%;
	background: #ffffff;
	color: #1E462A;
	border: 1px solid #D5CFC5;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	z-index: 20;
	transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease, opacity 0.2s ease;
	padding: 0;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.gltok-nav-arrow:hover {
	background: #2D5830;
	color: #ffffff;
	transform: translateY(-50%) scale(1.1);
}

.gltok-nav-prev {
	left: 20px;
}

.gltok-nav-next {
	right: 20px;
}

@media (max-width: 768px) {
	.gltok-nav-arrow {
		display: none;
	}
}

/* Flechas de Navegación Inferiores (Ocultadas y con espacio 0 absoluto) */
.gltok-arrows-bottom-wrap,
.gltok-move-arrow,
.gltok-arrow-prev,
.gltok-arrow-next {
	display: none !important;
	height: 0 !important;
	max-height: 0 !important;
	min-height: 0 !important;
	margin: 0 !important;
	padding: 0 !important;
	border: none !important;
	visibility: hidden !important;
	opacity: 0 !important;
	pointer-events: none !important;
}
